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: 19 inserted, 3 deleted
new file 100644 | |||
binary diff hidden |
@@ -205,25 +205,34 | |||
|
205 | 205 | prepare_announcements |
|
206 | 206 | end |
|
207 | 207 | |
|
208 | 208 | def check_viewability |
|
209 | 209 | @user = User.find(session[:user_id]) |
|
210 | 210 | if (!Configuration.show_tasks_to?(@user)) and |
|
211 | 211 | ((action_name=='submission') or (action_name=='submit')) |
|
212 | 212 | redirect_to :action => 'list' and return |
|
213 | 213 | end |
|
214 | 214 | end |
|
215 | 215 | |
|
216 | 216 | def prepare_grading_result(submission) |
|
217 | + if Configuration.task_grading_info.has_key? submission.problem.name | |
|
217 | 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 | 227 | @test_runs = [] |
|
219 | 228 | if grading_info['testruns'].is_a? Integer |
|
220 | 229 | trun_count = grading_info['testruns'] |
|
221 | 230 | trun_count.times do |i| |
|
222 | 231 | @test_runs << [ read_grading_result(@user.login, |
|
223 | 232 | submission.problem.name, |
|
224 | 233 | submission.id, |
|
225 | 234 | i+1) ] |
|
226 | 235 | end |
|
227 | 236 | else |
|
228 | 237 | grading_info['testruns'].keys.sort.each do |num| |
|
229 | 238 | run = [] |
@@ -3,25 +3,25 | |||
|
3 | 3 | background: white url(../images/topbg.jpg) repeat-x top center; |
|
4 | 4 | font-size: 13px; |
|
5 | 5 | font-family: Tahoma, "sans-serif"; |
|
6 | 6 | margin: 10px; |
|
7 | 7 | padding: 10px; |
|
8 | 8 | } |
|
9 | 9 | |
|
10 | 10 | /* Form Font */ |
|
11 | 11 | input { |
|
12 | 12 | font-family: Tahoma, "sans-serif"; |
|
13 | 13 | } |
|
14 | 14 | |
|
15 |
- /* Heading 1 |
|
|
15 | + /* Heading 1&2 */ | |
|
16 | 16 | h1 { |
|
17 | 17 | font-size: 24px; |
|
18 | 18 | color: #334488; |
|
19 | 19 | line-height: 2em; |
|
20 | 20 | } |
|
21 | 21 | |
|
22 | 22 | h2 { |
|
23 | 23 | font-size: 18px; |
|
24 | 24 | color: #5566bb; |
|
25 | 25 | line-height: 1.5em; |
|
26 | 26 | } |
|
27 | 27 | |
@@ -56,37 +56,37 | |||
|
56 | 56 | padding: 10px 0px; |
|
57 | 57 | line-height: 1.5em; |
|
58 | 58 | font-size: 13px; |
|
59 | 59 | } |
|
60 | 60 | |
|
61 | 61 | div.title span.contest-over-msg { |
|
62 | 62 | font-size: 15px; |
|
63 | 63 | color: red; |
|
64 | 64 | } |
|
65 | 65 | |
|
66 | 66 | div.title table { |
|
67 | 67 | width: 100%; |
|
68 | + font-weight: bold; | |
|
68 | 69 | } |
|
69 | 70 | |
|
70 | 71 | div.title td.left-col { |
|
71 | 72 | text-align: left; |
|
72 | 73 | vertical-align: top; |
|
73 | 74 | color: #444444; |
|
74 | 75 | } |
|
75 | 76 | |
|
76 | 77 | div.title td.right-col { |
|
77 | 78 | text-align: right; |
|
78 | 79 | vertical-align: top; |
|
79 |
- font-size: 1 |
|
|
80 | - font-weight: bold; | |
|
80 | + font-size: 18px; | |
|
81 | 81 | color: #116699; |
|
82 | 82 | } |
|
83 | 83 | |
|
84 | 84 | /* Standard table with header and rows with alternating background */ |
|
85 | 85 | table.info { |
|
86 | 86 | margin: 10px 0; |
|
87 | 87 | border: 1px solid #666666; |
|
88 | 88 | border-collapse: collapse; |
|
89 | 89 | font-size: 12px; |
|
90 | 90 | } |
|
91 | 91 | |
|
92 | 92 | table.info th { |
@@ -125,24 +125,31 | |||
|
125 | 125 | margin: 10px 0px; |
|
126 | 126 | color: black; |
|
127 | 127 | font-weight: bold; |
|
128 | 128 | font-size: 13px; |
|
129 | 129 | } |
|
130 | 130 | |
|
131 | 131 | div.errorExplanation { |
|
132 | 132 | border: 1px dotted gray; |
|
133 | 133 | color: #bb2222; |
|
134 | 134 | padding: 5px 15px 5px 15px; |
|
135 | 135 | margin-bottom: 5px; |
|
136 | 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 | 147 | [Settings] |
|
141 | 148 | ********************************/ |
|
142 | 149 | table.uinfo { |
|
143 | 150 | border-collapse: collapse; |
|
144 | 151 | border: 1px solid black; |
|
145 | 152 | font-size: 13px; |
|
146 | 153 | } |
|
147 | 154 | |
|
148 | 155 | td.uinfo { |
You need to be logged in to leave comments.
Login now