Description:
new default config file
git-svn-id: http://theory.cpe.ku.ac.th/grader/cli/trunk/scripts@25 6386c4cd-e34a-4fa8-8920-d93eb39b512e
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r12:dd4ebb184900 - - 1 file changed: 2 inserted, 2 deleted
@@ -68,13 +68,13 | |||||
|
68 | submission.compiler_message = result[:cmp_msg] |
|
68 | submission.compiler_message = result[:cmp_msg] |
|
69 | submission.save |
|
69 | submission.save |
|
70 | end |
|
70 | end |
|
71 |
|
71 | ||
|
72 | def copy_script(problem_home) |
|
72 | def copy_script(problem_home) |
|
73 | script_dir = "#{problem_home}/script" |
|
73 | script_dir = "#{problem_home}/script" |
|
74 |
- std_script_dir = File.dirname(__FILE__) + '/std-script |
|
74 | + std_script_dir = File.dirname(__FILE__) + '/std-script' |
|
75 | scripts = Dir[std_script_dir + '/*'] |
|
75 | scripts = Dir[std_script_dir + '/*'] |
|
76 |
|
76 | ||
|
77 | copied = [] |
|
77 | copied = [] |
|
78 |
|
78 | ||
|
79 | scripts.each do |s| |
|
79 | scripts.each do |s| |
|
80 | fname = File.basename(s) |
|
80 | fname = File.basename(s) |
@@ -84,13 +84,13 | |||||
|
84 | end |
|
84 | end |
|
85 | end |
|
85 | end |
|
86 |
|
86 | ||
|
87 | return copied |
|
87 | return copied |
|
88 | end |
|
88 | end |
|
89 |
|
89 | ||
|
90 |
- def clear_script(problem_home |
|
90 | + def clear_script(log,problem_home) |
|
91 | log.each do |s| |
|
91 | log.each do |s| |
|
92 | system("rm #{problem_home}/script/#{s}") |
|
92 | system("rm #{problem_home}/script/#{s}") |
|
93 | end |
|
93 | end |
|
94 | end |
|
94 | end |
|
95 |
|
95 | ||
|
96 | def grade(submission_id) |
|
96 | def grade(submission_id) |
You need to be logged in to leave comments.
Login now