Description:
MERGED changeset 404:406 from ytopc branch
git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@425 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
r197:7e5cbcab36dd - - 3 files changed: 20 inserted, 4 deleted
new file 100644 | |||||
binary diff hidden |
@@ -211,13 +211,22 | |||||
|
211 | ((action_name=='submission') or (action_name=='submit')) |
|
211 | ((action_name=='submission') or (action_name=='submit')) |
|
212 | redirect_to :action => 'list' and return |
|
212 | redirect_to :action => 'list' and return |
|
213 | end |
|
213 | end |
|
214 | end |
|
214 | end |
|
215 |
|
215 | ||
|
216 | def prepare_grading_result(submission) |
|
216 | def prepare_grading_result(submission) |
|
217 |
- |
|
217 | + if Configuration.task_grading_info.has_key? submission.problem.name |
|
|
218 | + grading_info = Configuration.task_grading_info[submission.problem.name] | ||
|
|
219 | + else | ||
|
|
220 | + # guess task info from problem.full_score | ||
|
|
221 | + cases = submission.problem.full_score / 10 | ||
|
|
222 | + grading_info = { | ||
|
|
223 | + 'testruns' => cases, | ||
|
|
224 | + 'testcases' => cases | ||
|
|
225 | + } | ||
|
|
226 | + end | ||
|
218 | @test_runs = [] |
|
227 | @test_runs = [] |
|
219 | if grading_info['testruns'].is_a? Integer |
|
228 | if grading_info['testruns'].is_a? Integer |
|
220 | trun_count = grading_info['testruns'] |
|
229 | trun_count = grading_info['testruns'] |
|
221 | trun_count.times do |i| |
|
230 | trun_count.times do |i| |
|
222 | @test_runs << [ read_grading_result(@user.login, |
|
231 | @test_runs << [ read_grading_result(@user.login, |
|
223 | submission.problem.name, |
|
232 | submission.problem.name, |
@@ -9,13 +9,13 | |||||
|
9 |
|
9 | ||
|
10 | /* Form Font */ |
|
10 | /* Form Font */ |
|
11 | input { |
|
11 | input { |
|
12 | font-family: Tahoma, "sans-serif"; |
|
12 | font-family: Tahoma, "sans-serif"; |
|
13 | } |
|
13 | } |
|
14 |
|
14 | ||
|
15 |
- /* Heading 1 |
|
15 | + /* Heading 1&2 */ |
|
16 | h1 { |
|
16 | h1 { |
|
17 | font-size: 24px; |
|
17 | font-size: 24px; |
|
18 | color: #334488; |
|
18 | color: #334488; |
|
19 | line-height: 2em; |
|
19 | line-height: 2em; |
|
20 | } |
|
20 | } |
|
21 |
|
21 | ||
@@ -62,25 +62,25 | |||||
|
62 | font-size: 15px; |
|
62 | font-size: 15px; |
|
63 | color: red; |
|
63 | color: red; |
|
64 | } |
|
64 | } |
|
65 |
|
65 | ||
|
66 | div.title table { |
|
66 | div.title table { |
|
67 | width: 100%; |
|
67 | width: 100%; |
|
|
68 | + font-weight: bold; | ||
|
68 | } |
|
69 | } |
|
69 |
|
70 | ||
|
70 | div.title td.left-col { |
|
71 | div.title td.left-col { |
|
71 | text-align: left; |
|
72 | text-align: left; |
|
72 | vertical-align: top; |
|
73 | vertical-align: top; |
|
73 | color: #444444; |
|
74 | color: #444444; |
|
74 | } |
|
75 | } |
|
75 |
|
76 | ||
|
76 | div.title td.right-col { |
|
77 | div.title td.right-col { |
|
77 | text-align: right; |
|
78 | text-align: right; |
|
78 | vertical-align: top; |
|
79 | vertical-align: top; |
|
79 |
- font-size: 1 |
|
80 | + font-size: 18px; |
|
80 | - font-weight: bold; |
|
||
|
81 | color: #116699; |
|
81 | color: #116699; |
|
82 | } |
|
82 | } |
|
83 |
|
83 | ||
|
84 | /* Standard table with header and rows with alternating background */ |
|
84 | /* Standard table with header and rows with alternating background */ |
|
85 | table.info { |
|
85 | table.info { |
|
86 | margin: 10px 0; |
|
86 | margin: 10px 0; |
@@ -131,12 +131,19 | |||||
|
131 | div.errorExplanation { |
|
131 | div.errorExplanation { |
|
132 | border: 1px dotted gray; |
|
132 | border: 1px dotted gray; |
|
133 | color: #bb2222; |
|
133 | color: #bb2222; |
|
134 | padding: 5px 15px 5px 15px; |
|
134 | padding: 5px 15px 5px 15px; |
|
135 | margin-bottom: 5px; |
|
135 | margin-bottom: 5px; |
|
136 | background-color: white; |
|
136 | background-color: white; |
|
|
137 | + font-weight: normal; | ||
|
|
138 | + } | ||
|
|
139 | + | ||
|
|
140 | + | ||
|
|
141 | + div.errorExplanation h2 { | ||
|
|
142 | + color: #cc1111; | ||
|
|
143 | + font-weight: bold; | ||
|
137 | } |
|
144 | } |
|
138 |
|
145 | ||
|
139 | /******************************* |
|
146 | /******************************* |
|
140 | [Settings] |
|
147 | [Settings] |
|
141 | ********************************/ |
|
148 | ********************************/ |
|
142 | table.uinfo { |
|
149 | table.uinfo { |
You need to be logged in to leave comments.
Login now