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:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r12:dd4ebb184900 - - 1 file changed: 2 inserted, 2 deleted

@@ -62,41 +62,41
62 62 submission.points = result[:points]
63 63 if submission.points == problem.full_score
64 64 submission.grader_comment = 'PASSED: ' + report_comment(result[:comment])
65 65 else
66 66 submission.grader_comment = 'FAILED: ' + report_comment(result[:comment])
67 67 end
68 68 submission.compiler_message = result[:cmp_msg]
69 69 submission.save
70 70 end
71 71
72 72 def copy_script(problem_home)
73 73 script_dir = "#{problem_home}/script"
74 - std_script_dir = File.dirname(__FILE__) + '/std-scripts'
74 + std_script_dir = File.dirname(__FILE__) + '/std-script'
75 75 scripts = Dir[std_script_dir + '/*']
76 76
77 77 copied = []
78 78
79 79 scripts.each do |s|
80 80 fname = File.basename(s)
81 81 if !FileTest.exist?("#{script_dir}/#{fname}")
82 82 copied << fname
83 83 system("cp #{s} #{script_dir}")
84 84 end
85 85 end
86 86
87 87 return copied
88 88 end
89 89
90 - def clear_script(problem_home,log)
90 + def clear_script(log,problem_home)
91 91 log.each do |s|
92 92 system("rm #{problem_home}/script/#{s}")
93 93 end
94 94 end
95 95
96 96 def grade(submission_id)
97 97 current_dir = `pwd`.chomp
98 98
99 99 sub = Submission.find(submission_id)
100 100 user = sub.user
101 101 problem = sub.problem
102 102
You need to be logged in to leave comments. Login now