Description:
wip
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r873:a7f456a02c5b - - 5 files changed: 26 inserted, 9 deleted
@@ -1,424 +1,424 | |||
|
1 | 1 | |
|
2 | 2 | .secondnavbar { |
|
3 | 3 | top: 50px; |
|
4 | 4 | } |
|
5 | 5 | |
|
6 | 6 | |
|
7 | 7 | //for google material design |
|
8 | 8 | .mi-bs { |
|
9 | 9 | vertical-align: middle; |
|
10 | 10 | position: relative; |
|
11 | 11 | top: -3px; |
|
12 | 12 | } |
|
13 | 13 | |
|
14 | 14 | // --------------- bootstrap file upload ---------------------- |
|
15 | 15 | .btn-file { |
|
16 | 16 | position: relative; |
|
17 | 17 | overflow: hidden; |
|
18 | 18 | } |
|
19 | 19 | |
|
20 | 20 | .btn-file input[type=file] { |
|
21 | 21 | position: absolute; |
|
22 | 22 | top: 0; |
|
23 | 23 | right: 0; |
|
24 | 24 | min-width: 100%; |
|
25 | 25 | min-height: 100%; |
|
26 | 26 | font-size: 100px; |
|
27 | 27 | text-align: right; |
|
28 | 28 | filter: alpha(opacity = 0); |
|
29 | 29 | opacity: 0; |
|
30 | 30 | outline: none; |
|
31 | 31 | background: white; |
|
32 | 32 | cursor: inherit; |
|
33 | 33 | display: block; |
|
34 | 34 | } |
|
35 | 35 | |
|
36 | 36 | body { |
|
37 | 37 | //font-size: 13px |
|
38 |
- font-family: ' |
|
|
38 | + font-family: 'Noto Sans Thai', Tahoma, "sans-serif"; | |
|
39 | 39 | margin: 10px; |
|
40 | 40 | padding: 10px; |
|
41 | 41 | padding-top: 60px; |
|
42 | 42 | } |
|
43 | 43 | |
|
44 | 44 | // ------------------ bootstrap sortable -------------------- |
|
45 | 45 | table.sortable th { |
|
46 | 46 | padding-right: 20px !important; |
|
47 | 47 | |
|
48 | 48 | span.sign { |
|
49 | 49 | right: (-15px) !important; |
|
50 | 50 | } |
|
51 | 51 | |
|
52 | 52 | &.text-right { |
|
53 | 53 | padding-left: 20px !important; |
|
54 | 54 | padding-right: 8px !important; |
|
55 | 55 | |
|
56 | 56 | &:after, span.sign { |
|
57 | 57 | left: (-15px) !important; |
|
58 | 58 | } |
|
59 | 59 | } |
|
60 | 60 | } |
|
61 | 61 | |
|
62 | 62 | input { |
|
63 | 63 | font-family: Tahoma, "sans-serif"; |
|
64 | 64 | } |
|
65 | 65 | |
|
66 | 66 | h1 { |
|
67 | 67 | color: #334488; |
|
68 | 68 | } |
|
69 | 69 | |
|
70 | 70 | h2 { |
|
71 | 71 | color: #5566bb; |
|
72 | 72 | } |
|
73 | 73 | |
|
74 | 74 | hr { |
|
75 | 75 | border-top: 1px solid #dddddd; |
|
76 | 76 | border-bottom: 1px solid #eeeeee; |
|
77 | 77 | } |
|
78 | 78 | |
|
79 | 79 | //#a |
|
80 | 80 | // color: #6666cc |
|
81 | 81 | // text-decoration: none |
|
82 | 82 | // |
|
83 | 83 | // &:link, &:visited |
|
84 | 84 | // color: #6666cc |
|
85 | 85 | // text-decoration: none |
|
86 | 86 | // |
|
87 | 87 | // &:hover, &:focus |
|
88 | 88 | // color: #111166 |
|
89 | 89 | // text-decoration: none |
|
90 | 90 | |
|
91 | 91 | div { |
|
92 | 92 | &.userbar { |
|
93 | 93 | line-height: 1.5em; |
|
94 | 94 | text-align: right; |
|
95 | 95 | font-size: 12px; |
|
96 | 96 | } |
|
97 | 97 | |
|
98 | 98 | &.title { |
|
99 | 99 | padding: 10px 0px; |
|
100 | 100 | line-height: 1.5em; |
|
101 | 101 | font-size: 13px; |
|
102 | 102 | |
|
103 | 103 | span.contest-over-msg { |
|
104 | 104 | font-size: 15px; |
|
105 | 105 | color: red; |
|
106 | 106 | } |
|
107 | 107 | |
|
108 | 108 | table { |
|
109 | 109 | width: 100%; |
|
110 | 110 | font-weight: bold; |
|
111 | 111 | } |
|
112 | 112 | |
|
113 | 113 | td { |
|
114 | 114 | &.left-col { |
|
115 | 115 | text-align: left; |
|
116 | 116 | vertical-align: top; |
|
117 | 117 | color: #444444; |
|
118 | 118 | } |
|
119 | 119 | |
|
120 | 120 | &.right-col { |
|
121 | 121 | text-align: right; |
|
122 | 122 | vertical-align: top; |
|
123 | 123 | font-size: 18px; |
|
124 | 124 | color: #116699; |
|
125 | 125 | } |
|
126 | 126 | } |
|
127 | 127 | } |
|
128 | 128 | } |
|
129 | 129 | |
|
130 | 130 | table.info { |
|
131 | 131 | margin: 10px 0; |
|
132 | 132 | border: 1px solid #666666; |
|
133 | 133 | border-collapse: collapse; |
|
134 | 134 | font-size: 12px; |
|
135 | 135 | |
|
136 | 136 | th { |
|
137 | 137 | border: 1px solid #666666; |
|
138 | 138 | line-height: 1.5em; |
|
139 | 139 | padding: 0 0.5em; |
|
140 | 140 | } |
|
141 | 141 | |
|
142 | 142 | td { |
|
143 | 143 | border-left: 1px solid #666666; |
|
144 | 144 | border-right: 1px solid #666666; |
|
145 | 145 | line-height: 1.5em; |
|
146 | 146 | padding: 0 0.5em; |
|
147 | 147 | } |
|
148 | 148 | } |
|
149 | 149 | |
|
150 | 150 | tr { |
|
151 | 151 | &.info-head { |
|
152 | 152 | background: #777777; |
|
153 | 153 | color: white; |
|
154 | 154 | } |
|
155 | 155 | |
|
156 | 156 | &.info-odd { |
|
157 | 157 | background: #eeeeee; |
|
158 | 158 | } |
|
159 | 159 | |
|
160 | 160 | &.info-even { |
|
161 | 161 | background: #fcfcfc; |
|
162 | 162 | } |
|
163 | 163 | } |
|
164 | 164 | |
|
165 | 165 | @mixin basicbox { |
|
166 | 166 | background: #eeeeff; |
|
167 | 167 | border: 1px dotted #99aaee; |
|
168 | 168 | padding: 5px; |
|
169 | 169 | margin: 10px 0px; |
|
170 | 170 | color: black; |
|
171 | 171 | font-size: 13px; |
|
172 | 172 | } |
|
173 | 173 | |
|
174 | 174 | .infobox { |
|
175 | 175 | @include basicbox; |
|
176 | 176 | } |
|
177 | 177 | |
|
178 | 178 | .submitbox { |
|
179 | 179 | @include basicbox; |
|
180 | 180 | } |
|
181 | 181 | |
|
182 | 182 | .errorExplanation { |
|
183 | 183 | border: 1px dotted gray; |
|
184 | 184 | color: #bb2222; |
|
185 | 185 | padding: 5px 15px 5px 15px; |
|
186 | 186 | margin-bottom: 5px; |
|
187 | 187 | background-color: white; |
|
188 | 188 | font-weight: normal; |
|
189 | 189 | |
|
190 | 190 | h2 { |
|
191 | 191 | color: #cc1111; |
|
192 | 192 | font-weight: bold; |
|
193 | 193 | } |
|
194 | 194 | } |
|
195 | 195 | |
|
196 | 196 | table.uinfo { |
|
197 | 197 | border-collapse: collapse; |
|
198 | 198 | border: 1px solid black; |
|
199 | 199 | font-size: 13px; |
|
200 | 200 | } |
|
201 | 201 | |
|
202 | 202 | td.uinfo { |
|
203 | 203 | vertical-align: top; |
|
204 | 204 | border: 1px solid black; |
|
205 | 205 | padding: 5px; |
|
206 | 206 | } |
|
207 | 207 | |
|
208 | 208 | th.uinfo { |
|
209 | 209 | background: lightgreen; |
|
210 | 210 | vertical-align: top; |
|
211 | 211 | text-align: right; |
|
212 | 212 | border: 1px solid black; |
|
213 | 213 | padding: 5px; |
|
214 | 214 | } |
|
215 | 215 | |
|
216 | 216 | div { |
|
217 | 217 | &.compilermsgbody { |
|
218 | 218 | font-family: monospace; |
|
219 | 219 | } |
|
220 | 220 | |
|
221 | 221 | &.task-menu { |
|
222 | 222 | text-align: center; |
|
223 | 223 | font-size: 13px; |
|
224 | 224 | line-height: 1.75em; |
|
225 | 225 | font-weight: bold; |
|
226 | 226 | border-top: 1px dashed gray; |
|
227 | 227 | border-bottom: 1px dashed gray; |
|
228 | 228 | margin-top: 2px; |
|
229 | 229 | margin-bottom: 4px; |
|
230 | 230 | } |
|
231 | 231 | } |
|
232 | 232 | |
|
233 | 233 | table.taskdesc { |
|
234 | 234 | border: 2px solid #dddddd; |
|
235 | 235 | border-collapse: collapse; |
|
236 | 236 | margin: 10px auto; |
|
237 | 237 | width: 90%; |
|
238 | 238 | font-size: 13px; |
|
239 | 239 | |
|
240 | 240 | p { |
|
241 | 241 | font-size: 13px; |
|
242 | 242 | } |
|
243 | 243 | |
|
244 | 244 | tr.name { |
|
245 | 245 | border: 2px solid #dddddd; |
|
246 | 246 | background: #dddddd; |
|
247 | 247 | color: #333333; |
|
248 | 248 | font-weight: bold; |
|
249 | 249 | font-size: 14px; |
|
250 | 250 | line-height: 1.5em; |
|
251 | 251 | text-align: center; |
|
252 | 252 | } |
|
253 | 253 | |
|
254 | 254 | td { |
|
255 | 255 | &.desc-odd { |
|
256 | 256 | padding: 5px; |
|
257 | 257 | padding-left: 20px; |
|
258 | 258 | background: #fefeee; |
|
259 | 259 | } |
|
260 | 260 | |
|
261 | 261 | &.desc-even { |
|
262 | 262 | padding: 5px; |
|
263 | 263 | padding-left: 20px; |
|
264 | 264 | background: #feeefe; |
|
265 | 265 | } |
|
266 | 266 | } |
|
267 | 267 | } |
|
268 | 268 | |
|
269 | 269 | .announcementbox { |
|
270 | 270 | margin: 10px 0px; |
|
271 | 271 | background: #bbddee; |
|
272 | 272 | padding: 1px; |
|
273 | 273 | |
|
274 | 274 | span.title { |
|
275 | 275 | font-weight: bold; |
|
276 | 276 | color: #224455; |
|
277 | 277 | padding-left: 10px; |
|
278 | 278 | line-height: 1.6em; |
|
279 | 279 | } |
|
280 | 280 | } |
|
281 | 281 | |
|
282 | 282 | .announcement { |
|
283 | 283 | margin: 2px; |
|
284 | 284 | background: white; |
|
285 | 285 | padding: 1px; |
|
286 | 286 | padding-left: 10px; |
|
287 | 287 | padding-right: 10px; |
|
288 | 288 | padding-top: 5px; |
|
289 | 289 | padding-bottom: 5px; |
|
290 | 290 | } |
|
291 | 291 | |
|
292 | 292 | .announcement p { |
|
293 | 293 | font-size: 12px; |
|
294 | 294 | margin: 2px; |
|
295 | 295 | } |
|
296 | 296 | |
|
297 | 297 | .pub-info { |
|
298 | 298 | text-align: right; |
|
299 | 299 | font-style: italic; |
|
300 | 300 | font-size: 9px; |
|
301 | 301 | |
|
302 | 302 | p { |
|
303 | 303 | text-align: right; |
|
304 | 304 | font-style: italic; |
|
305 | 305 | font-size: 9px; |
|
306 | 306 | } |
|
307 | 307 | } |
|
308 | 308 | |
|
309 | 309 | .announcement { |
|
310 | 310 | .toggles { |
|
311 | 311 | font-weight: normal; |
|
312 | 312 | float: right; |
|
313 | 313 | font-size: 80%; |
|
314 | 314 | } |
|
315 | 315 | |
|
316 | 316 | .announcement-title { |
|
317 | 317 | font-weight: bold; |
|
318 | 318 | } |
|
319 | 319 | } |
|
320 | 320 | |
|
321 | 321 | div { |
|
322 | 322 | &.message { |
|
323 | 323 | margin: 10px 0 0; |
|
324 | 324 | |
|
325 | 325 | div { |
|
326 | 326 | &.message { |
|
327 | 327 | margin: 0 0 0 30px; |
|
328 | 328 | } |
|
329 | 329 | |
|
330 | 330 | &.body { |
|
331 | 331 | border: 2px solid #dddddd; |
|
332 | 332 | background: #fff8f8; |
|
333 | 333 | padding-left: 5px; |
|
334 | 334 | } |
|
335 | 335 | |
|
336 | 336 | &.reply-body { |
|
337 | 337 | border: 2px solid #bbbbbb; |
|
338 | 338 | background: #fffff8; |
|
339 | 339 | padding-left: 5px; |
|
340 | 340 | } |
|
341 | 341 | |
|
342 | 342 | &.stat { |
|
343 | 343 | font-size: 10px; |
|
344 | 344 | line-height: 1.75em; |
|
345 | 345 | padding: 0 5px; |
|
346 | 346 | color: #333333; |
|
347 | 347 | background: #dddddd; |
|
348 | 348 | font-weight: bold; |
|
349 | 349 | } |
|
350 | 350 | |
|
351 | 351 | &.message div.stat { |
|
352 | 352 | font-size: 10px; |
|
353 | 353 | line-height: 1.75em; |
|
354 | 354 | padding: 0 5px; |
|
355 | 355 | color: #444444; |
|
356 | 356 | background: #bbbbbb; |
|
357 | 357 | font-weight: bold; |
|
358 | 358 | } |
|
359 | 359 | } |
|
360 | 360 | } |
|
361 | 361 | |
|
362 | 362 | &.contest-title { |
|
363 | 363 | color: white; |
|
364 | 364 | text-align: center; |
|
365 | 365 | line-height: 2em; |
|
366 | 366 | } |
|
367 | 367 | |
|
368 | 368 | &.registration-desc, &.test-desc { |
|
369 | 369 | border: 1px dotted gray; |
|
370 | 370 | background: #f5f5f5; |
|
371 | 371 | padding: 5px; |
|
372 | 372 | margin: 10px 0; |
|
373 | 373 | font-size: 12px; |
|
374 | 374 | line-height: 1.5em; |
|
375 | 375 | } |
|
376 | 376 | } |
|
377 | 377 | |
|
378 | 378 | h2.contest-title { |
|
379 | 379 | margin-top: 5px; |
|
380 | 380 | margin-bottom: 5px; |
|
381 | 381 | } |
|
382 | 382 | |
|
383 | 383 | |
|
384 | 384 | |
|
385 | 385 | .grader-comment { |
|
386 | 386 | word-wrap: break-word; |
|
387 | 387 | font-family: consolas; |
|
388 | 388 | } |
|
389 | 389 | |
|
390 | 390 | |
|
391 | 391 | golden-btn + .golden-btn { margin-top: 1em; } |
|
392 | 392 | |
|
393 | 393 | .golden-btn { |
|
394 | 394 | display: inline-block; |
|
395 | 395 | outline: none; |
|
396 | 396 | font-family: inherit; |
|
397 | 397 | box-sizing: border-box; |
|
398 | 398 | border: none; |
|
399 | 399 | box-shadow: 0 3px 6px rgba(0,0,0,.16), 0 3px 6px rgba(110,80,20,.4), |
|
400 | 400 | inset 0 -2px 5px 1px rgba(139,66,8,1), |
|
401 | 401 | inset 0 -1px 1px 3px rgba(250,227,133,1); |
|
402 | 402 | background-image: linear-gradient(160deg, #a54e07, #b47e11, #fef1a2, #bc881b, #a54e07) !important; |
|
403 | 403 | border: 1px solid #a55d07; |
|
404 | 404 | color: rgb(120,50,5); |
|
405 | 405 | text-shadow: 0 2px 2px rgba(250, 227, 133, 1); |
|
406 | 406 | cursor: pointer; |
|
407 | 407 | transition: all .2s ease-in-out; |
|
408 | 408 | background-size: 100% 100%; |
|
409 | 409 | background-position:center; |
|
410 | 410 | } |
|
411 | 411 | .golden-btn:focus, |
|
412 | 412 | .golden-btn:hover { |
|
413 | 413 | background-size: 150% 150%; |
|
414 | 414 | box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23), |
|
415 | 415 | inset 0 -2px 5px 1px #b17d10, |
|
416 | 416 | inset 0 -1px 1px 3px rgba(250,227,133,1); |
|
417 | 417 | border: 1px solid rgba(165,93,7,.6); |
|
418 | 418 | color: rgba(120,50,5,.8); |
|
419 | 419 | } |
|
420 | 420 | .golden-btn:active { |
|
421 | 421 | box-shadow: 0 3px 6px rgba(0,0,0,.16), 0 3px 6px rgba(110,80,20,.4), |
|
422 | 422 | inset 0 -2px 5px 1px #b17d10, |
|
423 | 423 | inset 0 -1px 1px 3px rgba(250,227,133,1); |
|
424 | 424 | } |
@@ -1,27 +1,33 | |||
|
1 | 1 | <!DOCTYPE html> |
|
2 | 2 | %html |
|
3 | 3 | %head |
|
4 | 4 | %title= GraderConfiguration['contest.name'] |
|
5 | 5 | = stylesheet_link_tag "application", params[:controller], :media => "all" |
|
6 | 6 | = csrf_meta_tags |
|
7 | 7 | = csp_meta_tag |
|
8 | 8 | = javascript_include_tag :my_app |
|
9 | 9 | -# = javascript_import_module_tag('prepend_jquery') |
|
10 | 10 | = javascript_importmap_tags |
|
11 | 11 | = content_for :header |
|
12 | 12 | = yield :head |
|
13 | 13 | -# %link{href:"https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/css/bootstrap.min.css",rel:"stylesheet",integrity:"sha384-iYQeCzEYFbKjA/T2uDLTpkwGzCiq6soy8tYaI1GyVh/UjpbCx/TYkiZhlZB6+fzT",crossorigin:"anonymous"} |
|
14 | 14 | -# %script{src:"https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js",integrity:"sha384-oBqDVmMz9ATKxIep9tiCxS/Z9fNfEXiDAYTujMAeBAsjFuCZSmKbSSUnQlmh/jp3",crossorigin:"anonymous"} |
|
15 | 15 | -# %script{src:"https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/js/bootstrap.bundle.min.js",integrity:"sha384-7VPbUDkoPSGFnVtYi0QogXtr74QeVeeIs99Qfg5YCF+TidwNdjvaKZX19NZ/e6oz",crossorigin:"anonymous"} |
|
16 | 16 | |
|
17 | 17 | <link rel="preconnect" href="https://fonts.googleapis.com"> |
|
18 | 18 | <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> |
|
19 | - <link href="https://fonts.googleapis.com/css2?family=Bai+Jamjuree:ital@0;1&family=Krub:ital,wght@0,200;0,400;0,600;1,200;1,400;1,600&family=Sarabun:ital,wght@0,200;0,400;0,600;1,200;1,400;1,600&display=swap" rel="stylesheet"> | |
|
19 | + -# | |
|
20 | + <link href="https://fonts.googleapis.com/css2?family=Bai+Jamjuree:ital,wght@0,200;0,400;0,600;1,200;1,400;1,600&family=Krub:ital,wght@0,200;0,400;0,600;1,200;1,400;1,600&family=Sarabun:ital,wght@0,200;0,400;0,600;1,200;1,400;1,600&display=swap" rel="stylesheet"> | |
|
21 | + <link href="https://fonts.googleapis.com/css2?family=Mitr:ital,wght@0,300;1,300&family=Kodchasan:ital,wght@0,200;0,400;0,600;1,200;1,400;1,600&family=Noto+Serif+Thai:ital,wght@0,200;0,400;0,600;1,200;1,400;1,600&family=Noto+Sans+Thai:ital,wght@0,200;0,400;0,600;1,200;1,400;1,600&display=swap" rel="stylesheet"> | |
|
22 | + <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+Thai:ital,wght@0,200;0,400;0,600;1,200;1,400;1,600&family=Noto+Sans+Thai:ital,wght@0,200;0,400;0,600;1,200;1,400;1,600&display=swap" rel="stylesheet"> | |
|
23 | + <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+Thai:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&display=swap" rel="stylesheet"> | |
|
24 | + <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&display=swap" rel="stylesheet"> | |
|
25 | + <link href="https://fonts.googleapis.com/css2?family=Sarabun:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&display=swap" rel="stylesheet"> | |
|
20 | 26 | |
|
21 | 27 | %body |
|
22 | 28 | - unless local_assigns[:skip_header] |
|
23 | 29 | = render 'layouts/header' |
|
24 | 30 | |
|
25 | 31 | /= content_tag(:p,flash[:notice],class: 'alert alert-success') if flash[:notice]!=nil |
|
26 | 32 | = flash_messages |
|
27 | 33 | = yield |
@@ -1,12 +1,13 | |||
|
1 | 1 | %h1= GraderConfiguration['ui.front.title'] |
|
2 | 2 | |
|
3 | 3 | .row |
|
4 | 4 | .col-md-6 |
|
5 | - - if @announcements.length!=0 | |
|
6 | - .announcementbox{:style => 'margin-top: 0px'} | |
|
7 | - %span{:class => 'title'} | |
|
8 | - Announcements | |
|
5 | + .card | |
|
6 | + .card-header | |
|
7 | + Announcement | |
|
8 | + = link_to 'Manage', announcements_path, class: 'btn btn-secondary btn-sm' | |
|
9 | + %ul.list-group.list-group-flush | |
|
9 | 10 | = render :partial => 'announcement', :collection => @announcements |
|
10 | 11 | .col-md-4{style: "padding-left: 20px;"} |
|
11 | 12 | = render :partial => 'login_box' |
|
12 | 13 | = "current ip is #{@remote_ip}" |
@@ -1,72 +1,82 | |||
|
1 | 1 | - content_for :head do |
|
2 | 2 | = stylesheet_link_tag 'problems' |
|
3 | 3 | |
|
4 | 4 | %h1 Import problems |
|
5 | 5 | |
|
6 | 6 | %p= link_to '[Back to problem list]', problems_path |
|
7 | 7 | |
|
8 | 8 | - if @problem and @problem.errors |
|
9 | 9 | =error_messages_for 'problem' |
|
10 | 10 | |
|
11 |
- = form_ |
|
|
11 | + = form_with url: do_import_problems_path, :multipart => true do |f| | |
|
12 | + .row.mb-2 | |
|
13 | + .col-md-1 | |
|
14 | + = f.label :name, 'Name' | |
|
15 | + .col-md-11 | |
|
16 | + = f.text_field :name, class: 'form-control' | |
|
17 | + .row.mb-2 | |
|
18 | + .col-md-1 | |
|
19 | + = f.label :full_name, 'Full Name' | |
|
20 | + .col-md-11 | |
|
21 | + = f.text_field :full_name, class: 'form-control' | |
|
12 | 22 | |
|
13 | 23 | .submitbox |
|
14 | 24 | %table |
|
15 | 25 | %tr |
|
16 | 26 | %td Name: |
|
17 | 27 | %td= text_field_tag 'name' |
|
18 | 28 | %tr |
|
19 | 29 | %td Full name: |
|
20 | 30 | %td |
|
21 | 31 | = text_field_tag 'full_name' |
|
22 | 32 | %span{:class => 'help'} Leave blank to use the same value as the name above. |
|
23 | 33 | %tr |
|
24 | 34 | %td Testdata file: |
|
25 | 35 | %td= file_field_tag 'file' |
|
26 | 36 | %tr |
|
27 | 37 | %td |
|
28 | 38 | %td |
|
29 | 39 | %span{:class => 'help'} |
|
30 | 40 | In .zip, .tgz, tar.gz, .tar format. |
|
31 | 41 | It should includes inputs (e.g., 1.in, 2a.in, 2b.in) |
|
32 | 42 | and solutions (e.g., 1.sol, 2a.sol, 2b.sol). |
|
33 | 43 | %br/ |
|
34 | 44 | You may put task description in *.html for raw html |
|
35 | 45 | and *.md or *.markdown for markdown. |
|
36 | 46 | %br/ |
|
37 | 47 | You may also put a pdf file for the task description |
|
38 | 48 | %tr |
|
39 | 49 | %td Checker: |
|
40 | 50 | %td= select_tag 'checker', options_for_select([['Text checker','text'],['Float checker','float']], 'text') |
|
41 | 51 | %tr |
|
42 | 52 | %td |
|
43 | 53 | %td |
|
44 | 54 | %span{:class => 'help'} |
|
45 | 55 | "Text" checker checks if the text (including numbers) is the same, ignoring any whitespace |
|
46 | 56 | %br/ |
|
47 | 57 | "Float" checker checks if all numbers is within EPSILON error using formula |a-b| < EPSILON * max(|a|,|b|) |
|
48 | 58 | |
|
49 | 59 | - if @allow_test_pair_import |
|
50 | 60 | %tr |
|
51 | 61 | %td |
|
52 | 62 | %td |
|
53 | 63 | = check_box_tag 'import_to_db' |
|
54 | 64 | Import test data to database (for a test-pair task) |
|
55 | 65 | %tr |
|
56 | 66 | %td Time limit: |
|
57 | 67 | %td |
|
58 | 68 | = text_field_tag 'time_limit' |
|
59 | 69 | %span{:class => 'help'} In seconds. Leave blank to use 1 sec. |
|
60 | 70 | %tr |
|
61 | 71 | %td Memory limit: |
|
62 | 72 | %td |
|
63 | 73 | = text_field_tag 'memory_limit' |
|
64 | 74 | %span{:class => 'help'} In MB. Leave blank to use 32MB. |
|
65 | 75 | %tr |
|
66 | 76 | %td |
|
67 | 77 | %td= submit_tag 'Import problem' |
|
68 | 78 | |
|
69 | 79 | - if @log |
|
70 | 80 | %h3 Import log |
|
71 | 81 | %pre.import-log |
|
72 | 82 | = @log |
@@ -1,65 +1,65 | |||
|
1 | 1 | - content_for :head do |
|
2 | 2 | = stylesheet_link_tag 'problems' |
|
3 | 3 | %h1 Problems |
|
4 | 4 | %p |
|
5 | 5 | = link_to 'Import problems', {:action => 'import'}, class: 'btn btn-success btn-sm' |
|
6 | 6 | = link_to 'New problem', new_problem_path, class: 'btn btn-success btn-sm' |
|
7 | 7 | = link_to 'Bulk Manage', { action: 'manage'}, class: 'btn btn-info btn-sm' |
|
8 |
- = link_to 'Turn off all problems', {:action => 'turn_all_off'}, class: 'btn btn- |
|
|
9 |
- = link_to 'Turn on all problems', {:action => 'turn_all_on'}, class: 'btn btn- |
|
|
8 | + = link_to 'Turn off all problems', {:action => 'turn_all_off'}, class: 'btn btn-secondary btn-sm' | |
|
9 | + = link_to 'Turn on all problems', {:action => 'turn_all_on'}, class: 'btn btn-secondary btn-sm' | |
|
10 | 10 | .submitbox |
|
11 | 11 | = form_tag action: 'quick_create', controller: 'problems' do |
|
12 | 12 | %b Quick New: |
|
13 | 13 | %label{:for => "problem_name"} Name |
|
14 | 14 | = text_field 'problem', 'name' |
|
15 | 15 | | |
|
16 | 16 | %label{:for => "problem_full_name"} Full name |
|
17 | 17 | = text_field 'problem', 'full_name' |
|
18 | 18 | = submit_tag "Create" |
|
19 | 19 | %table.table.table-condense.table-hover |
|
20 | 20 | %thead |
|
21 | 21 | %th Name |
|
22 | 22 | %th Full name |
|
23 | 23 | %th.text-right Full score |
|
24 | 24 | %th Tags |
|
25 | 25 | %th |
|
26 | 26 | Submit |
|
27 | 27 | %sup{class: 'text-primary',data: {toggle: 'tooltip'}, title: 'Admin can always submit to any problem' } [?] |
|
28 | 28 | %th Date added |
|
29 | 29 | %th.text-center |
|
30 | 30 | Avail? |
|
31 | 31 | %sup{class: 'text-primary',data: {toggle: 'tooltip'}, title: 'Let user submits to this problem?' } [?] |
|
32 | 32 | %th.text-center |
|
33 | 33 | View Data? |
|
34 | 34 | %sup{class: 'text-primary',data: {toggle: 'tooltip'}, title: 'Let user view the testcase of this problem?' } [?] |
|
35 | 35 | %th.text-center |
|
36 | 36 | Test? |
|
37 | 37 | %sup{class: 'text-primary',data: {toggle: 'tooltip'}, title: 'Let user uses test interface on this problem?' } [?] |
|
38 | 38 | - if GraderConfiguration.multicontests? |
|
39 | 39 | %th Contests |
|
40 | 40 | - for problem in @problems |
|
41 | 41 | %tr{:class => "#{(problem.available) ? "bg-success bg-opacity-25" : "bg-opacity-25"}", :id => "prob-#{problem.id}", :name => "prob-#{problem.id}"} |
|
42 | 42 | - @problem=problem |
|
43 | 43 | %td= problem.name #in_place_editor_field :problem, :name, {}, :rows=>1 |
|
44 | 44 | %td |
|
45 | 45 | = problem.full_name #in_place_editor_field :problem, :full_name, {}, :rows=>1 |
|
46 | 46 | = link_to_description_if_any "[#{t 'main.problem_desc'}] <span class='glyphicon glyphicon-file'></span>".html_safe, problem |
|
47 | 47 | %td.text-right= problem.full_score #in_place_editor_field :problem, :full_score, {}, :rows=>1 |
|
48 | 48 | %td |
|
49 | 49 | - problem.tags.each do |t| |
|
50 | 50 | - #%button.btn.btn-default.btn-sm= t.name |
|
51 | 51 | %span.label.label-default= t.name |
|
52 | 52 | %td= link_to "Submit", direct_edit_problem_submissions_path(problem,@current_user.id), class: 'btn btn-sm btn-primary' |
|
53 | 53 | %td= problem.date_added |
|
54 | 54 | %td= toggle_button(@problem.available?, toggle_problem_path(@problem), "problem-avail-#{@problem.id}") |
|
55 | 55 | %td= toggle_button(@problem.view_testcase?, toggle_view_testcase_problem_path(@problem), "problem-view-testcase-#{@problem.id}") |
|
56 | 56 | %td= toggle_button(@problem.test_allowed?, toggle_test_problem_path(@problem), "problem-test-#{@problem.id}") |
|
57 | 57 | - if GraderConfiguration.multicontests? |
|
58 | 58 | %td |
|
59 | 59 | = problem.contests.collect { |c| c.name }.join(', ') |
|
60 | 60 | %td= link_to 'Stat', {:action => 'stat', :id => problem.id}, class: 'btn btn-info btn-sm btn-block' |
|
61 | 61 | %td= link_to 'Show', {:action => 'show', :id => problem}, class: 'btn btn-info btn-sm btn-block' |
|
62 | 62 | %td= link_to 'Edit', {:action => 'edit', :id => problem}, class: 'btn btn-info btn-sm btn-block' |
|
63 | 63 | %td= link_to 'Destroy', { :action => 'destroy', :id => problem }, :confirm => 'Are you sure?', :method => :delete, class: 'btn btn-danger btn-sm btn-block' |
|
64 | 64 | %br/ |
|
65 | 65 | = link_to '[New problem]', :action => 'new' |
You need to be logged in to leave comments.
Login now