Description:
wip
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r870:9386e234b7f9 - - 29 files changed: 587 inserted, 683 deleted
@@ -0,0 +1,1 | |||||
|
|
1 | + $font-size-base: 0.875rem; |
@@ -0,0 +1,416 | |||||
|
|
1 | + | ||
|
|
2 | + .secondnavbar { | ||
|
|
3 | + top: 50px; | ||
|
|
4 | + } | ||
|
|
5 | + | ||
|
|
6 | + // --------------- bootstrap file upload ---------------------- | ||
|
|
7 | + .btn-file { | ||
|
|
8 | + position: relative; | ||
|
|
9 | + overflow: hidden; | ||
|
|
10 | + } | ||
|
|
11 | + | ||
|
|
12 | + .btn-file input[type=file] { | ||
|
|
13 | + position: absolute; | ||
|
|
14 | + top: 0; | ||
|
|
15 | + right: 0; | ||
|
|
16 | + min-width: 100%; | ||
|
|
17 | + min-height: 100%; | ||
|
|
18 | + font-size: 100px; | ||
|
|
19 | + text-align: right; | ||
|
|
20 | + filter: alpha(opacity = 0); | ||
|
|
21 | + opacity: 0; | ||
|
|
22 | + outline: none; | ||
|
|
23 | + background: white; | ||
|
|
24 | + cursor: inherit; | ||
|
|
25 | + display: block; | ||
|
|
26 | + } | ||
|
|
27 | + | ||
|
|
28 | + body { | ||
|
|
29 | + //font-size: 13px | ||
|
|
30 | + font-family: 'Krub', Tahoma, "sans-serif"; | ||
|
|
31 | + margin: 10px; | ||
|
|
32 | + padding: 10px; | ||
|
|
33 | + padding-top: 60px; | ||
|
|
34 | + } | ||
|
|
35 | + | ||
|
|
36 | + // ------------------ bootstrap sortable -------------------- | ||
|
|
37 | + table.sortable th { | ||
|
|
38 | + padding-right: 20px !important; | ||
|
|
39 | + | ||
|
|
40 | + span.sign { | ||
|
|
41 | + right: (-15px) !important; | ||
|
|
42 | + } | ||
|
|
43 | + | ||
|
|
44 | + &.text-right { | ||
|
|
45 | + padding-left: 20px !important; | ||
|
|
46 | + padding-right: 8px !important; | ||
|
|
47 | + | ||
|
|
48 | + &:after, span.sign { | ||
|
|
49 | + left: (-15px) !important; | ||
|
|
50 | + } | ||
|
|
51 | + } | ||
|
|
52 | + } | ||
|
|
53 | + | ||
|
|
54 | + input { | ||
|
|
55 | + font-family: Tahoma, "sans-serif"; | ||
|
|
56 | + } | ||
|
|
57 | + | ||
|
|
58 | + h1 { | ||
|
|
59 | + color: #334488; | ||
|
|
60 | + } | ||
|
|
61 | + | ||
|
|
62 | + h2 { | ||
|
|
63 | + color: #5566bb; | ||
|
|
64 | + } | ||
|
|
65 | + | ||
|
|
66 | + hr { | ||
|
|
67 | + border-top: 1px solid #dddddd; | ||
|
|
68 | + border-bottom: 1px solid #eeeeee; | ||
|
|
69 | + } | ||
|
|
70 | + | ||
|
|
71 | + //#a | ||
|
|
72 | + // color: #6666cc | ||
|
|
73 | + // text-decoration: none | ||
|
|
74 | + // | ||
|
|
75 | + // &:link, &:visited | ||
|
|
76 | + // color: #6666cc | ||
|
|
77 | + // text-decoration: none | ||
|
|
78 | + // | ||
|
|
79 | + // &:hover, &:focus | ||
|
|
80 | + // color: #111166 | ||
|
|
81 | + // text-decoration: none | ||
|
|
82 | + | ||
|
|
83 | + div { | ||
|
|
84 | + &.userbar { | ||
|
|
85 | + line-height: 1.5em; | ||
|
|
86 | + text-align: right; | ||
|
|
87 | + font-size: 12px; | ||
|
|
88 | + } | ||
|
|
89 | + | ||
|
|
90 | + &.title { | ||
|
|
91 | + padding: 10px 0px; | ||
|
|
92 | + line-height: 1.5em; | ||
|
|
93 | + font-size: 13px; | ||
|
|
94 | + | ||
|
|
95 | + span.contest-over-msg { | ||
|
|
96 | + font-size: 15px; | ||
|
|
97 | + color: red; | ||
|
|
98 | + } | ||
|
|
99 | + | ||
|
|
100 | + table { | ||
|
|
101 | + width: 100%; | ||
|
|
102 | + font-weight: bold; | ||
|
|
103 | + } | ||
|
|
104 | + | ||
|
|
105 | + td { | ||
|
|
106 | + &.left-col { | ||
|
|
107 | + text-align: left; | ||
|
|
108 | + vertical-align: top; | ||
|
|
109 | + color: #444444; | ||
|
|
110 | + } | ||
|
|
111 | + | ||
|
|
112 | + &.right-col { | ||
|
|
113 | + text-align: right; | ||
|
|
114 | + vertical-align: top; | ||
|
|
115 | + font-size: 18px; | ||
|
|
116 | + color: #116699; | ||
|
|
117 | + } | ||
|
|
118 | + } | ||
|
|
119 | + } | ||
|
|
120 | + } | ||
|
|
121 | + | ||
|
|
122 | + table.info { | ||
|
|
123 | + margin: 10px 0; | ||
|
|
124 | + border: 1px solid #666666; | ||
|
|
125 | + border-collapse: collapse; | ||
|
|
126 | + font-size: 12px; | ||
|
|
127 | + | ||
|
|
128 | + th { | ||
|
|
129 | + border: 1px solid #666666; | ||
|
|
130 | + line-height: 1.5em; | ||
|
|
131 | + padding: 0 0.5em; | ||
|
|
132 | + } | ||
|
|
133 | + | ||
|
|
134 | + td { | ||
|
|
135 | + border-left: 1px solid #666666; | ||
|
|
136 | + border-right: 1px solid #666666; | ||
|
|
137 | + line-height: 1.5em; | ||
|
|
138 | + padding: 0 0.5em; | ||
|
|
139 | + } | ||
|
|
140 | + } | ||
|
|
141 | + | ||
|
|
142 | + tr { | ||
|
|
143 | + &.info-head { | ||
|
|
144 | + background: #777777; | ||
|
|
145 | + color: white; | ||
|
|
146 | + } | ||
|
|
147 | + | ||
|
|
148 | + &.info-odd { | ||
|
|
149 | + background: #eeeeee; | ||
|
|
150 | + } | ||
|
|
151 | + | ||
|
|
152 | + &.info-even { | ||
|
|
153 | + background: #fcfcfc; | ||
|
|
154 | + } | ||
|
|
155 | + } | ||
|
|
156 | + | ||
|
|
157 | + @mixin basicbox { | ||
|
|
158 | + background: #eeeeff; | ||
|
|
159 | + border: 1px dotted #99aaee; | ||
|
|
160 | + padding: 5px; | ||
|
|
161 | + margin: 10px 0px; | ||
|
|
162 | + color: black; | ||
|
|
163 | + font-size: 13px; | ||
|
|
164 | + } | ||
|
|
165 | + | ||
|
|
166 | + .infobox { | ||
|
|
167 | + @include basicbox; | ||
|
|
168 | + } | ||
|
|
169 | + | ||
|
|
170 | + .submitbox { | ||
|
|
171 | + @include basicbox; | ||
|
|
172 | + } | ||
|
|
173 | + | ||
|
|
174 | + .errorExplanation { | ||
|
|
175 | + border: 1px dotted gray; | ||
|
|
176 | + color: #bb2222; | ||
|
|
177 | + padding: 5px 15px 5px 15px; | ||
|
|
178 | + margin-bottom: 5px; | ||
|
|
179 | + background-color: white; | ||
|
|
180 | + font-weight: normal; | ||
|
|
181 | + | ||
|
|
182 | + h2 { | ||
|
|
183 | + color: #cc1111; | ||
|
|
184 | + font-weight: bold; | ||
|
|
185 | + } | ||
|
|
186 | + } | ||
|
|
187 | + | ||
|
|
188 | + table.uinfo { | ||
|
|
189 | + border-collapse: collapse; | ||
|
|
190 | + border: 1px solid black; | ||
|
|
191 | + font-size: 13px; | ||
|
|
192 | + } | ||
|
|
193 | + | ||
|
|
194 | + td.uinfo { | ||
|
|
195 | + vertical-align: top; | ||
|
|
196 | + border: 1px solid black; | ||
|
|
197 | + padding: 5px; | ||
|
|
198 | + } | ||
|
|
199 | + | ||
|
|
200 | + th.uinfo { | ||
|
|
201 | + background: lightgreen; | ||
|
|
202 | + vertical-align: top; | ||
|
|
203 | + text-align: right; | ||
|
|
204 | + border: 1px solid black; | ||
|
|
205 | + padding: 5px; | ||
|
|
206 | + } | ||
|
|
207 | + | ||
|
|
208 | + div { | ||
|
|
209 | + &.compilermsgbody { | ||
|
|
210 | + font-family: monospace; | ||
|
|
211 | + } | ||
|
|
212 | + | ||
|
|
213 | + &.task-menu { | ||
|
|
214 | + text-align: center; | ||
|
|
215 | + font-size: 13px; | ||
|
|
216 | + line-height: 1.75em; | ||
|
|
217 | + font-weight: bold; | ||
|
|
218 | + border-top: 1px dashed gray; | ||
|
|
219 | + border-bottom: 1px dashed gray; | ||
|
|
220 | + margin-top: 2px; | ||
|
|
221 | + margin-bottom: 4px; | ||
|
|
222 | + } | ||
|
|
223 | + } | ||
|
|
224 | + | ||
|
|
225 | + table.taskdesc { | ||
|
|
226 | + border: 2px solid #dddddd; | ||
|
|
227 | + border-collapse: collapse; | ||
|
|
228 | + margin: 10px auto; | ||
|
|
229 | + width: 90%; | ||
|
|
230 | + font-size: 13px; | ||
|
|
231 | + | ||
|
|
232 | + p { | ||
|
|
233 | + font-size: 13px; | ||
|
|
234 | + } | ||
|
|
235 | + | ||
|
|
236 | + tr.name { | ||
|
|
237 | + border: 2px solid #dddddd; | ||
|
|
238 | + background: #dddddd; | ||
|
|
239 | + color: #333333; | ||
|
|
240 | + font-weight: bold; | ||
|
|
241 | + font-size: 14px; | ||
|
|
242 | + line-height: 1.5em; | ||
|
|
243 | + text-align: center; | ||
|
|
244 | + } | ||
|
|
245 | + | ||
|
|
246 | + td { | ||
|
|
247 | + &.desc-odd { | ||
|
|
248 | + padding: 5px; | ||
|
|
249 | + padding-left: 20px; | ||
|
|
250 | + background: #fefeee; | ||
|
|
251 | + } | ||
|
|
252 | + | ||
|
|
253 | + &.desc-even { | ||
|
|
254 | + padding: 5px; | ||
|
|
255 | + padding-left: 20px; | ||
|
|
256 | + background: #feeefe; | ||
|
|
257 | + } | ||
|
|
258 | + } | ||
|
|
259 | + } | ||
|
|
260 | + | ||
|
|
261 | + .announcementbox { | ||
|
|
262 | + margin: 10px 0px; | ||
|
|
263 | + background: #bbddee; | ||
|
|
264 | + padding: 1px; | ||
|
|
265 | + | ||
|
|
266 | + span.title { | ||
|
|
267 | + font-weight: bold; | ||
|
|
268 | + color: #224455; | ||
|
|
269 | + padding-left: 10px; | ||
|
|
270 | + line-height: 1.6em; | ||
|
|
271 | + } | ||
|
|
272 | + } | ||
|
|
273 | + | ||
|
|
274 | + .announcement { | ||
|
|
275 | + margin: 2px; | ||
|
|
276 | + background: white; | ||
|
|
277 | + padding: 1px; | ||
|
|
278 | + padding-left: 10px; | ||
|
|
279 | + padding-right: 10px; | ||
|
|
280 | + padding-top: 5px; | ||
|
|
281 | + padding-bottom: 5px; | ||
|
|
282 | + } | ||
|
|
283 | + | ||
|
|
284 | + .announcement p { | ||
|
|
285 | + font-size: 12px; | ||
|
|
286 | + margin: 2px; | ||
|
|
287 | + } | ||
|
|
288 | + | ||
|
|
289 | + .pub-info { | ||
|
|
290 | + text-align: right; | ||
|
|
291 | + font-style: italic; | ||
|
|
292 | + font-size: 9px; | ||
|
|
293 | + | ||
|
|
294 | + p { | ||
|
|
295 | + text-align: right; | ||
|
|
296 | + font-style: italic; | ||
|
|
297 | + font-size: 9px; | ||
|
|
298 | + } | ||
|
|
299 | + } | ||
|
|
300 | + | ||
|
|
301 | + .announcement { | ||
|
|
302 | + .toggles { | ||
|
|
303 | + font-weight: normal; | ||
|
|
304 | + float: right; | ||
|
|
305 | + font-size: 80%; | ||
|
|
306 | + } | ||
|
|
307 | + | ||
|
|
308 | + .announcement-title { | ||
|
|
309 | + font-weight: bold; | ||
|
|
310 | + } | ||
|
|
311 | + } | ||
|
|
312 | + | ||
|
|
313 | + div { | ||
|
|
314 | + &.message { | ||
|
|
315 | + margin: 10px 0 0; | ||
|
|
316 | + | ||
|
|
317 | + div { | ||
|
|
318 | + &.message { | ||
|
|
319 | + margin: 0 0 0 30px; | ||
|
|
320 | + } | ||
|
|
321 | + | ||
|
|
322 | + &.body { | ||
|
|
323 | + border: 2px solid #dddddd; | ||
|
|
324 | + background: #fff8f8; | ||
|
|
325 | + padding-left: 5px; | ||
|
|
326 | + } | ||
|
|
327 | + | ||
|
|
328 | + &.reply-body { | ||
|
|
329 | + border: 2px solid #bbbbbb; | ||
|
|
330 | + background: #fffff8; | ||
|
|
331 | + padding-left: 5px; | ||
|
|
332 | + } | ||
|
|
333 | + | ||
|
|
334 | + &.stat { | ||
|
|
335 | + font-size: 10px; | ||
|
|
336 | + line-height: 1.75em; | ||
|
|
337 | + padding: 0 5px; | ||
|
|
338 | + color: #333333; | ||
|
|
339 | + background: #dddddd; | ||
|
|
340 | + font-weight: bold; | ||
|
|
341 | + } | ||
|
|
342 | + | ||
|
|
343 | + &.message div.stat { | ||
|
|
344 | + font-size: 10px; | ||
|
|
345 | + line-height: 1.75em; | ||
|
|
346 | + padding: 0 5px; | ||
|
|
347 | + color: #444444; | ||
|
|
348 | + background: #bbbbbb; | ||
|
|
349 | + font-weight: bold; | ||
|
|
350 | + } | ||
|
|
351 | + } | ||
|
|
352 | + } | ||
|
|
353 | + | ||
|
|
354 | + &.contest-title { | ||
|
|
355 | + color: white; | ||
|
|
356 | + text-align: center; | ||
|
|
357 | + line-height: 2em; | ||
|
|
358 | + } | ||
|
|
359 | + | ||
|
|
360 | + &.registration-desc, &.test-desc { | ||
|
|
361 | + border: 1px dotted gray; | ||
|
|
362 | + background: #f5f5f5; | ||
|
|
363 | + padding: 5px; | ||
|
|
364 | + margin: 10px 0; | ||
|
|
365 | + font-size: 12px; | ||
|
|
366 | + line-height: 1.5em; | ||
|
|
367 | + } | ||
|
|
368 | + } | ||
|
|
369 | + | ||
|
|
370 | + h2.contest-title { | ||
|
|
371 | + margin-top: 5px; | ||
|
|
372 | + margin-bottom: 5px; | ||
|
|
373 | + } | ||
|
|
374 | + | ||
|
|
375 | + | ||
|
|
376 | + | ||
|
|
377 | + .grader-comment { | ||
|
|
378 | + word-wrap: break-word; | ||
|
|
379 | + font-family: consolas; | ||
|
|
380 | + } | ||
|
|
381 | + | ||
|
|
382 | + | ||
|
|
383 | + golden-btn + .golden-btn { margin-top: 1em; } | ||
|
|
384 | + | ||
|
|
385 | + .golden-btn { | ||
|
|
386 | + display: inline-block; | ||
|
|
387 | + outline: none; | ||
|
|
388 | + font-family: inherit; | ||
|
|
389 | + box-sizing: border-box; | ||
|
|
390 | + border: none; | ||
|
|
391 | + box-shadow: 0 3px 6px rgba(0,0,0,.16), 0 3px 6px rgba(110,80,20,.4), | ||
|
|
392 | + inset 0 -2px 5px 1px rgba(139,66,8,1), | ||
|
|
393 | + inset 0 -1px 1px 3px rgba(250,227,133,1); | ||
|
|
394 | + background-image: linear-gradient(160deg, #a54e07, #b47e11, #fef1a2, #bc881b, #a54e07) !important; | ||
|
|
395 | + border: 1px solid #a55d07; | ||
|
|
396 | + color: rgb(120,50,5); | ||
|
|
397 | + text-shadow: 0 2px 2px rgba(250, 227, 133, 1); | ||
|
|
398 | + cursor: pointer; | ||
|
|
399 | + transition: all .2s ease-in-out; | ||
|
|
400 | + background-size: 100% 100%; | ||
|
|
401 | + background-position:center; | ||
|
|
402 | + } | ||
|
|
403 | + .golden-btn:focus, | ||
|
|
404 | + .golden-btn:hover { | ||
|
|
405 | + background-size: 150% 150%; | ||
|
|
406 | + box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23), | ||
|
|
407 | + inset 0 -2px 5px 1px #b17d10, | ||
|
|
408 | + inset 0 -1px 1px 3px rgba(250,227,133,1); | ||
|
|
409 | + border: 1px solid rgba(165,93,7,.6); | ||
|
|
410 | + color: rgba(120,50,5,.8); | ||
|
|
411 | + } | ||
|
|
412 | + .golden-btn:active { | ||
|
|
413 | + box-shadow: 0 3px 6px rgba(0,0,0,.16), 0 3px 6px rgba(110,80,20,.4), | ||
|
|
414 | + inset 0 -2px 5px 1px #b17d10, | ||
|
|
415 | + inset 0 -1px 1px 3px rgba(250,227,133,1); | ||
|
|
416 | + } |
@@ -30,6 +30,8 | |||||
|
30 |
|
30 | ||
|
31 | #ignore rvm setting file |
|
31 | #ignore rvm setting file |
|
32 | #.ruby-gemset |
|
32 | #.ruby-gemset |
|
33 | #.ruby-version |
|
33 | #.ruby-version |
|
34 |
|
34 | ||
|
35 | /config/secrets.yml |
|
35 | /config/secrets.yml |
|
|
36 | + | ||
|
|
37 | + /.byebug_history |
@@ -99,13 +99,13 | |||||
|
99 | #---------------- for console -------------------- |
|
99 | #---------------- for console -------------------- |
|
100 | gem 'fuzzy-string-match' |
|
100 | gem 'fuzzy-string-match' |
|
101 |
|
101 | ||
|
102 |
|
102 | ||
|
103 | group :development, :test do |
|
103 | group :development, :test do |
|
104 | # Call 'byebug' anywhere in the code to stop execution and get a debugger console |
|
104 | # Call 'byebug' anywhere in the code to stop execution and get a debugger console |
|
105 | - gem 'debug', platforms: [:mri, :mingw, :x64_mingw] |
|
105 | + gem 'byebug' |
|
106 | end |
|
106 | end |
|
107 |
|
107 | ||
|
108 | group :development do |
|
108 | group :development do |
|
109 | # Access an interactive console on exception pages or by calling 'console' anywhere in the code. |
|
109 | # Access an interactive console on exception pages or by calling 'console' anywhere in the code. |
|
110 | gem 'web-console', '>= 3.3.0' |
|
110 | gem 'web-console', '>= 3.3.0' |
|
111 | gem 'listen', '>= 3.0.5', '< 3.2' |
|
111 | gem 'listen', '>= 3.0.5', '< 3.2' |
@@ -89,17 +89,18 | |||||
|
89 | ansi (1.5.0) |
|
89 | ansi (1.5.0) |
|
90 | autoprefixer-rails (10.4.7.0) |
|
90 | autoprefixer-rails (10.4.7.0) |
|
91 | execjs (~> 2) |
|
91 | execjs (~> 2) |
|
92 | bindex (0.8.1) |
|
92 | bindex (0.8.1) |
|
93 | bootsnap (1.13.0) |
|
93 | bootsnap (1.13.0) |
|
94 | msgpack (~> 1.2) |
|
94 | msgpack (~> 1.2) |
|
95 |
- bootstrap (5.2. |
|
95 | + bootstrap (5.2.1) |
|
96 | autoprefixer-rails (>= 9.1.0) |
|
96 | autoprefixer-rails (>= 9.1.0) |
|
97 |
- popper_js (>= 2.11. |
|
97 | + popper_js (>= 2.11.6, < 3) |
|
98 | sassc-rails (>= 2.0.0) |
|
98 | sassc-rails (>= 2.0.0) |
|
99 | builder (3.2.4) |
|
99 | builder (3.2.4) |
|
|
100 | + byebug (11.1.3) | ||
|
100 | capybara (3.37.1) |
|
101 | capybara (3.37.1) |
|
101 | addressable |
|
102 | addressable |
|
102 | matrix |
|
103 | matrix |
|
103 | mini_mime (>= 0.1.3) |
|
104 | mini_mime (>= 0.1.3) |
|
104 | nokogiri (~> 1.8) |
|
105 | nokogiri (~> 1.8) |
|
105 | rack (>= 1.6.0) |
|
106 | rack (>= 1.6.0) |
@@ -113,15 +114,12 | |||||
|
113 | coffee-script (2.4.1) |
|
114 | coffee-script (2.4.1) |
|
114 | coffee-script-source |
|
115 | coffee-script-source |
|
115 | execjs |
|
116 | execjs |
|
116 | coffee-script-source (1.12.2) |
|
117 | coffee-script-source (1.12.2) |
|
117 | concurrent-ruby (1.1.10) |
|
118 | concurrent-ruby (1.1.10) |
|
118 | crass (1.0.6) |
|
119 | crass (1.0.6) |
|
119 | - debug (1.6.2) |
|
||
|
120 | - irb (>= 1.3.6) |
|
||
|
121 | - reline (>= 0.3.1) |
|
||
|
122 | digest (3.1.0) |
|
120 | digest (3.1.0) |
|
123 | dynamic_form (1.1.4) |
|
121 | dynamic_form (1.1.4) |
|
124 | erubi (1.11.0) |
|
122 | erubi (1.11.0) |
|
125 | erubis (2.7.0) |
|
123 | erubis (2.7.0) |
|
126 | execjs (2.8.1) |
|
124 | execjs (2.8.1) |
|
127 | ffi (1.15.5) |
|
125 | ffi (1.15.5) |
@@ -146,26 +144,23 | |||||
|
146 | i18n (1.12.0) |
|
144 | i18n (1.12.0) |
|
147 | concurrent-ruby (~> 1.0) |
|
145 | concurrent-ruby (~> 1.0) |
|
148 | importmap-rails (1.1.5) |
|
146 | importmap-rails (1.1.5) |
|
149 | actionpack (>= 6.0.0) |
|
147 | actionpack (>= 6.0.0) |
|
150 | railties (>= 6.0.0) |
|
148 | railties (>= 6.0.0) |
|
151 | in_place_editing (1.2.0) |
|
149 | in_place_editing (1.2.0) |
|
152 | - io-console (0.5.11) |
|
||
|
153 | - irb (1.4.1) |
|
||
|
154 | - reline (>= 0.3.0) |
|
||
|
155 | jbuilder (2.11.5) |
|
150 | jbuilder (2.11.5) |
|
156 | actionview (>= 5.0.0) |
|
151 | actionview (>= 5.0.0) |
|
157 | activesupport (>= 5.0.0) |
|
152 | activesupport (>= 5.0.0) |
|
158 | jquery-rails (4.5.0) |
|
153 | jquery-rails (4.5.0) |
|
159 | rails-dom-testing (>= 1, < 3) |
|
154 | rails-dom-testing (>= 1, < 3) |
|
160 | railties (>= 4.2.0) |
|
155 | railties (>= 4.2.0) |
|
161 | thor (>= 0.14, < 2.0) |
|
156 | thor (>= 0.14, < 2.0) |
|
162 | listen (3.0.8) |
|
157 | listen (3.0.8) |
|
163 | rb-fsevent (~> 0.9, >= 0.9.4) |
|
158 | rb-fsevent (~> 0.9, >= 0.9.4) |
|
164 | rb-inotify (~> 0.9, >= 0.9.7) |
|
159 | rb-inotify (~> 0.9, >= 0.9.7) |
|
165 |
- loofah (2.1 |
|
160 | + loofah (2.19.0) |
|
166 | crass (~> 1.0.2) |
|
161 | crass (~> 1.0.2) |
|
167 | nokogiri (>= 1.5.9) |
|
162 | nokogiri (>= 1.5.9) |
|
168 | mail (2.7.1) |
|
163 | mail (2.7.1) |
|
169 | mini_mime (>= 0.1.1) |
|
164 | mini_mime (>= 0.1.1) |
|
170 | marcel (1.0.2) |
|
165 | marcel (1.0.2) |
|
171 | material_icons (2.2.1) |
|
166 | material_icons (2.2.1) |
@@ -196,17 +191,15 | |||||
|
196 | timeout |
|
191 | timeout |
|
197 | net-smtp (0.3.1) |
|
192 | net-smtp (0.3.1) |
|
198 | digest |
|
193 | digest |
|
199 | net-protocol |
|
194 | net-protocol |
|
200 | timeout |
|
195 | timeout |
|
201 | nio4r (2.5.8) |
|
196 | nio4r (2.5.8) |
|
202 | - nokogiri (1.13.8-x86_64-darwin) |
|
||
|
203 | - racc (~> 1.4) |
|
||
|
204 | nokogiri (1.13.8-x86_64-linux) |
|
197 | nokogiri (1.13.8-x86_64-linux) |
|
205 | racc (~> 1.4) |
|
198 | racc (~> 1.4) |
|
206 |
- popper_js (2.11. |
|
199 | + popper_js (2.11.6) |
|
207 | public_suffix (5.0.0) |
|
200 | public_suffix (5.0.0) |
|
208 | puma (5.6.5) |
|
201 | puma (5.6.5) |
|
209 | nio4r (~> 2.0) |
|
202 | nio4r (~> 2.0) |
|
210 | racc (1.6.0) |
|
203 | racc (1.6.0) |
|
211 | rack (2.2.4) |
|
204 | rack (2.2.4) |
|
212 | rack-test (2.0.2) |
|
205 | rack-test (2.0.2) |
@@ -240,14 +233,12 | |||||
|
240 | rake (13.0.6) |
|
233 | rake (13.0.6) |
|
241 | rb-fsevent (0.11.2) |
|
234 | rb-fsevent (0.11.2) |
|
242 | rb-inotify (0.10.1) |
|
235 | rb-inotify (0.10.1) |
|
243 | ffi (~> 1.0) |
|
236 | ffi (~> 1.0) |
|
244 | rdiscount (2.2.0.2) |
|
237 | rdiscount (2.2.0.2) |
|
245 | regexp_parser (2.5.0) |
|
238 | regexp_parser (2.5.0) |
|
246 | - reline (0.3.1) |
|
||
|
247 | - io-console (~> 0.5) |
|
||
|
248 | rexml (3.2.5) |
|
239 | rexml (3.2.5) |
|
249 | rouge (4.0.0) |
|
240 | rouge (4.0.0) |
|
250 | ruby-progressbar (1.11.0) |
|
241 | ruby-progressbar (1.11.0) |
|
251 | ruby_parser (3.19.1) |
|
242 | ruby_parser (3.19.1) |
|
252 | sexp_processor (~> 4.16) |
|
243 | sexp_processor (~> 4.16) |
|
253 | rubyzip (2.3.2) |
|
244 | rubyzip (2.3.2) |
@@ -276,13 +267,12 | |||||
|
276 | concurrent-ruby (~> 1.0) |
|
267 | concurrent-ruby (~> 1.0) |
|
277 | rack (> 1, < 3) |
|
268 | rack (> 1, < 3) |
|
278 | sprockets-rails (3.4.2) |
|
269 | sprockets-rails (3.4.2) |
|
279 | actionpack (>= 5.2) |
|
270 | actionpack (>= 5.2) |
|
280 | activesupport (>= 5.2) |
|
271 | activesupport (>= 5.2) |
|
281 | sprockets (>= 3.0.0) |
|
272 | sprockets (>= 3.0.0) |
|
282 | - sqlite3 (1.5.0-x86_64-darwin) |
|
||
|
283 | sqlite3 (1.5.0-x86_64-linux) |
|
273 | sqlite3 (1.5.0-x86_64-linux) |
|
284 | strscan (3.0.4) |
|
274 | strscan (3.0.4) |
|
285 | temple (0.8.2) |
|
275 | temple (0.8.2) |
|
286 | thor (1.2.1) |
|
276 | thor (1.2.1) |
|
287 | tilt (2.0.11) |
|
277 | tilt (2.0.11) |
|
288 | timeout (0.3.0) |
|
278 | timeout (0.3.0) |
@@ -290,37 +280,36 | |||||
|
290 | concurrent-ruby (~> 1.0) |
|
280 | concurrent-ruby (~> 1.0) |
|
291 | web-console (4.2.0) |
|
281 | web-console (4.2.0) |
|
292 | actionview (>= 6.0.0) |
|
282 | actionview (>= 6.0.0) |
|
293 | activemodel (>= 6.0.0) |
|
283 | activemodel (>= 6.0.0) |
|
294 | bindex (>= 0.4.0) |
|
284 | bindex (>= 0.4.0) |
|
295 | railties (>= 6.0.0) |
|
285 | railties (>= 6.0.0) |
|
296 |
- webdrivers (5. |
|
286 | + webdrivers (5.1.0) |
|
297 | nokogiri (~> 1.6) |
|
287 | nokogiri (~> 1.6) |
|
298 | rubyzip (>= 1.3.0) |
|
288 | rubyzip (>= 1.3.0) |
|
299 | selenium-webdriver (~> 4.0) |
|
289 | selenium-webdriver (~> 4.0) |
|
300 | websocket (1.2.9) |
|
290 | websocket (1.2.9) |
|
301 | websocket-driver (0.7.5) |
|
291 | websocket-driver (0.7.5) |
|
302 | websocket-extensions (>= 0.1.0) |
|
292 | websocket-extensions (>= 0.1.0) |
|
303 | websocket-extensions (0.1.5) |
|
293 | websocket-extensions (0.1.5) |
|
304 | xpath (3.2.0) |
|
294 | xpath (3.2.0) |
|
305 | nokogiri (~> 1.8) |
|
295 | nokogiri (~> 1.8) |
|
306 | zeitwerk (2.6.0) |
|
296 | zeitwerk (2.6.0) |
|
307 |
|
297 | ||
|
308 | PLATFORMS |
|
298 | PLATFORMS |
|
309 | - x86_64-darwin-20 |
|
||
|
310 | x86_64-linux |
|
299 | x86_64-linux |
|
311 |
|
300 | ||
|
312 | DEPENDENCIES |
|
301 | DEPENDENCIES |
|
313 | ace-rails-ap |
|
302 | ace-rails-ap |
|
314 | activerecord-session_store |
|
303 | activerecord-session_store |
|
315 | best_in_place! |
|
304 | best_in_place! |
|
316 | bootsnap |
|
305 | bootsnap |
|
317 | bootstrap (~> 5.2) |
|
306 | bootstrap (~> 5.2) |
|
|
307 | + byebug | ||
|
318 | capybara |
|
308 | capybara |
|
319 | coffee-rails |
|
309 | coffee-rails |
|
320 | - debug |
|
||
|
321 | dynamic_form |
|
310 | dynamic_form |
|
322 | fuzzy-string-match |
|
311 | fuzzy-string-match |
|
323 | haml |
|
312 | haml |
|
324 | haml-rails |
|
313 | haml-rails |
|
325 | importmap-rails (~> 1.1) |
|
314 | importmap-rails (~> 1.1) |
|
326 | in_place_editing |
|
315 | in_place_editing |
@@ -1,8 +1,9 | |||||
|
1 | //main entry point for sprocket |
|
1 | //main entry point for sprocket |
|
2 | - //= require jquery |
|
2 | + //= require jquery3 |
|
|
3 | + //= require jquery_ujs | ||
|
3 | //= require moment |
|
4 | //= require moment |
|
4 | //= require moment/th |
|
5 | //= require moment/th |
|
5 | //= require ace-rails-ap |
|
6 | //= require ace-rails-ap |
|
6 | //= require ace/mode-c_cpp |
|
7 | //= require ace/mode-c_cpp |
|
7 | //= require ace/mode-python |
|
8 | //= require ace/mode-python |
|
8 | //= require ace/mode-ruby |
|
9 | //= require ace/mode-ruby |
@@ -23,12 +23,13 | |||||
|
23 | //@import "jquery-tablesorter/theme.metro-dark"; |
|
23 | //@import "jquery-tablesorter/theme.metro-dark"; |
|
24 | //@import "jquery.countdown"; |
|
24 | //@import "jquery.countdown"; |
|
25 | //@import "tablesorter-theme.cafe"; |
|
25 | //@import "tablesorter-theme.cafe"; |
|
26 |
|
26 | ||
|
27 | //bootstrap |
|
27 | //bootstrap |
|
28 | //@import "bootstrap-sprockets"; |
|
28 | //@import "bootstrap-sprockets"; |
|
|
29 | + @import "my_bootstrap_var"; | ||
|
29 | @import "bootstrap"; |
|
30 | @import "bootstrap"; |
|
30 | @import "select2/select2.min"; |
|
31 | @import "select2/select2.min"; |
|
31 | @import "select2/select2-bootstrap-5-theme.min"; |
|
32 | @import "select2/select2-bootstrap-5-theme.min"; |
|
32 |
|
33 | ||
|
33 | //@import bootstrap3-switch |
|
34 | //@import bootstrap3-switch |
|
34 | //@import "bootstrap-toggle"; |
|
35 | //@import "bootstrap-toggle"; |
@@ -40,12 +41,13 | |||||
|
40 |
|
41 | ||
|
41 | //new import |
|
42 | //new import |
|
42 | @import 'datatables/datatables.min'; |
|
43 | @import 'datatables/datatables.min'; |
|
43 | @import 'material_icons'; |
|
44 | @import 'material_icons'; |
|
44 |
|
45 | ||
|
45 | //bootstrap navbar color (from) |
|
46 | //bootstrap navbar color (from) |
|
|
47 | + /* | ||
|
46 | $bgDefault: #19197b; |
|
48 | $bgDefault: #19197b; |
|
47 | $bgHighlight: #06064b; |
|
49 | $bgHighlight: #06064b; |
|
48 | $colDefault: #8e8eb4; |
|
50 | $colDefault: #8e8eb4; |
|
49 | $colHighlight: #ffffff; |
|
51 | $colHighlight: #ffffff; |
|
50 | $dropDown: false; |
|
52 | $dropDown: false; |
|
51 |
|
53 | ||
@@ -54,12 +56,15 | |||||
|
54 | src: font-path('bootstrap/glyphicons-halflings-regular.eot'); |
|
56 | src: font-path('bootstrap/glyphicons-halflings-regular.eot'); |
|
55 | src: font-path('bootstrap/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), |
|
57 | src: font-path('bootstrap/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), |
|
56 | font-path('bootstrap/glyphicons-halflings-regular.woff') format('woff'), |
|
58 | font-path('bootstrap/glyphicons-halflings-regular.woff') format('woff'), |
|
57 | font-path('bootstrap/glyphicons-halflings-regular.ttf') format('truetype'), |
|
59 | font-path('bootstrap/glyphicons-halflings-regular.ttf') format('truetype'), |
|
58 | font-path('bootstrap/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg'); |
|
60 | font-path('bootstrap/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg'); |
|
59 |
|
|
61 | } |
|
|
62 | + */ | ||
|
|
63 | + | ||
|
|
64 | + @import 'my_custom' | ||
|
60 |
|
65 | ||
|
61 | /* |
|
66 | /* |
|
62 | .navbar-default { |
|
67 | .navbar-default { |
|
63 | background-color: $bgDefault; |
|
68 | background-color: $bgDefault; |
|
64 | border-color: $bgHighlight; |
|
69 | border-color: $bgHighlight; |
|
65 |
|
70 | ||
@@ -173,428 +178,8 | |||||
|
173 | color: $colHighlight; |
|
178 | color: $colHighlight; |
|
174 | background-color: $bgHighlight; |
|
179 | background-color: $bgHighlight; |
|
175 | } |
|
180 | } |
|
176 | } |
|
181 | } |
|
177 | } |
|
182 | } |
|
178 | } |
|
183 | } |
|
179 | - |
|
||
|
180 | */ |
|
184 | */ |
|
181 | - .secondnavbar { |
|
||
|
182 | - top: 50px; |
|
||
|
183 | - } |
|
||
|
184 | - |
|
||
|
185 | - // --------------- bootstrap file upload ---------------------- |
|
||
|
186 | - .btn-file { |
|
||
|
187 | - position: relative; |
|
||
|
188 | - overflow: hidden; |
|
||
|
189 | - } |
|
||
|
190 | - |
|
||
|
191 | - .btn-file input[type=file] { |
|
||
|
192 | - position: absolute; |
|
||
|
193 | - top: 0; |
|
||
|
194 | - right: 0; |
|
||
|
195 | - min-width: 100%; |
|
||
|
196 | - min-height: 100%; |
|
||
|
197 | - font-size: 100px; |
|
||
|
198 | - text-align: right; |
|
||
|
199 | - filter: alpha(opacity = 0); |
|
||
|
200 | - opacity: 0; |
|
||
|
201 | - outline: none; |
|
||
|
202 | - background: white; |
|
||
|
203 | - cursor: inherit; |
|
||
|
204 | - display: block; |
|
||
|
205 | - } |
|
||
|
206 | - |
|
||
|
207 | - body { |
|
||
|
208 | - background: white image-url("topbg.jpg") repeat-x top center; |
|
||
|
209 | - |
|
||
|
210 | - //font-size: 13px |
|
||
|
211 | - //font-family: Tahoma, "sans-serif" |
|
||
|
212 | - margin: 10px; |
|
||
|
213 | - padding: 10px; |
|
||
|
214 | - padding-top: 60px; |
|
||
|
215 | - } |
|
||
|
216 | - |
|
||
|
217 | - // ------------------ bootstrap sortable -------------------- |
|
||
|
218 | - table.sortable th { |
|
||
|
219 | - padding-right: 20px !important; |
|
||
|
220 | - |
|
||
|
221 | - span.sign { |
|
||
|
222 | - right: (-15px) !important; |
|
||
|
223 | - } |
|
||
|
224 | - |
|
||
|
225 | - &.text-right { |
|
||
|
226 | - padding-left: 20px !important; |
|
||
|
227 | - padding-right: 8px !important; |
|
||
|
228 | - |
|
||
|
229 | - &:after, span.sign { |
|
||
|
230 | - left: (-15px) !important; |
|
||
|
231 | - } |
|
||
|
232 | - } |
|
||
|
233 | - } |
|
||
|
234 | - |
|
||
|
235 | - input { |
|
||
|
236 | - font-family: Tahoma, "sans-serif"; |
|
||
|
237 | - } |
|
||
|
238 | - |
|
||
|
239 | - h1 { |
|
||
|
240 | - font-size: 24px; |
|
||
|
241 | - color: #334488; |
|
||
|
242 | - line-height: 2em; |
|
||
|
243 | - } |
|
||
|
244 | - |
|
||
|
245 | - h2 { |
|
||
|
246 | - font-size: 18px; |
|
||
|
247 | - color: #5566bb; |
|
||
|
248 | - line-height: 1.5em; |
|
||
|
249 | - } |
|
||
|
250 | - |
|
||
|
251 | - hr { |
|
||
|
252 | - border-top: 1px solid #dddddd; |
|
||
|
253 | - border-bottom: 1px solid #eeeeee; |
|
||
|
254 | - } |
|
||
|
255 | - |
|
||
|
256 | - //#a |
|
||
|
257 | - // color: #6666cc |
|
||
|
258 | - // text-decoration: none |
|
||
|
259 | - // |
|
||
|
260 | - // &:link, &:visited |
|
||
|
261 | - // color: #6666cc |
|
||
|
262 | - // text-decoration: none |
|
||
|
263 | - // |
|
||
|
264 | - // &:hover, &:focus |
|
||
|
265 | - // color: #111166 |
|
||
|
266 | - // text-decoration: none |
|
||
|
267 | - |
|
||
|
268 | - div { |
|
||
|
269 | - &.userbar { |
|
||
|
270 | - line-height: 1.5em; |
|
||
|
271 | - text-align: right; |
|
||
|
272 | - font-size: 12px; |
|
||
|
273 | - } |
|
||
|
274 | - |
|
||
|
275 | - &.title { |
|
||
|
276 | - padding: 10px 0px; |
|
||
|
277 | - line-height: 1.5em; |
|
||
|
278 | - font-size: 13px; |
|
||
|
279 | - |
|
||
|
280 | - span.contest-over-msg { |
|
||
|
281 | - font-size: 15px; |
|
||
|
282 | - color: red; |
|
||
|
283 | - } |
|
||
|
284 | - |
|
||
|
285 | - table { |
|
||
|
286 | - width: 100%; |
|
||
|
287 | - font-weight: bold; |
|
||
|
288 | - } |
|
||
|
289 | - |
|
||
|
290 | - td { |
|
||
|
291 | - &.left-col { |
|
||
|
292 | - text-align: left; |
|
||
|
293 | - vertical-align: top; |
|
||
|
294 | - color: #444444; |
|
||
|
295 | - } |
|
||
|
296 | - |
|
||
|
297 | - &.right-col { |
|
||
|
298 | - text-align: right; |
|
||
|
299 | - vertical-align: top; |
|
||
|
300 | - font-size: 18px; |
|
||
|
301 | - color: #116699; |
|
||
|
302 | - } |
|
||
|
303 | - } |
|
||
|
304 | - } |
|
||
|
305 | - } |
|
||
|
306 | - |
|
||
|
307 | - table.info { |
|
||
|
308 | - margin: 10px 0; |
|
||
|
309 | - border: 1px solid #666666; |
|
||
|
310 | - border-collapse: collapse; |
|
||
|
311 | - font-size: 12px; |
|
||
|
312 | - |
|
||
|
313 | - th { |
|
||
|
314 | - border: 1px solid #666666; |
|
||
|
315 | - line-height: 1.5em; |
|
||
|
316 | - padding: 0 0.5em; |
|
||
|
317 | - } |
|
||
|
318 | - |
|
||
|
319 | - td { |
|
||
|
320 | - border-left: 1px solid #666666; |
|
||
|
321 | - border-right: 1px solid #666666; |
|
||
|
322 | - line-height: 1.5em; |
|
||
|
323 | - padding: 0 0.5em; |
|
||
|
324 | - } |
|
||
|
325 | - } |
|
||
|
326 | - |
|
||
|
327 | - tr { |
|
||
|
328 | - &.info-head { |
|
||
|
329 | - background: #777777; |
|
||
|
330 | - color: white; |
|
||
|
331 | - } |
|
||
|
332 | - |
|
||
|
333 | - &.info-odd { |
|
||
|
334 | - background: #eeeeee; |
|
||
|
335 | - } |
|
||
|
336 | - |
|
||
|
337 | - &.info-even { |
|
||
|
338 | - background: #fcfcfc; |
|
||
|
339 | - } |
|
||
|
340 | - } |
|
||
|
341 | - |
|
||
|
342 | - @mixin basicbox { |
|
||
|
343 | - background: #eeeeff; |
|
||
|
344 | - border: 1px dotted #99aaee; |
|
||
|
345 | - padding: 5px; |
|
||
|
346 | - margin: 10px 0px; |
|
||
|
347 | - color: black; |
|
||
|
348 | - font-size: 13px; |
|
||
|
349 | - } |
|
||
|
350 | - |
|
||
|
351 | - .infobox { |
|
||
|
352 | - @include basicbox; |
|
||
|
353 | - } |
|
||
|
354 | - |
|
||
|
355 | - .submitbox { |
|
||
|
356 | - @include basicbox; |
|
||
|
357 | - } |
|
||
|
358 | - |
|
||
|
359 | - .errorExplanation { |
|
||
|
360 | - border: 1px dotted gray; |
|
||
|
361 | - color: #bb2222; |
|
||
|
362 | - padding: 5px 15px 5px 15px; |
|
||
|
363 | - margin-bottom: 5px; |
|
||
|
364 | - background-color: white; |
|
||
|
365 | - font-weight: normal; |
|
||
|
366 | - |
|
||
|
367 | - h2 { |
|
||
|
368 | - color: #cc1111; |
|
||
|
369 | - font-weight: bold; |
|
||
|
370 | - } |
|
||
|
371 | - } |
|
||
|
372 | - |
|
||
|
373 | - table.uinfo { |
|
||
|
374 | - border-collapse: collapse; |
|
||
|
375 | - border: 1px solid black; |
|
||
|
376 | - font-size: 13px; |
|
||
|
377 | - } |
|
||
|
378 | - |
|
||
|
379 | - td.uinfo { |
|
||
|
380 | - vertical-align: top; |
|
||
|
381 | - border: 1px solid black; |
|
||
|
382 | - padding: 5px; |
|
||
|
383 | - } |
|
||
|
384 |
|
185 | ||
|
385 | - th.uinfo { |
|
||
|
386 | - background: lightgreen; |
|
||
|
387 | - vertical-align: top; |
|
||
|
388 | - text-align: right; |
|
||
|
389 | - border: 1px solid black; |
|
||
|
390 | - padding: 5px; |
|
||
|
391 | - } |
|
||
|
392 | - |
|
||
|
393 | - div { |
|
||
|
394 | - &.compilermsgbody { |
|
||
|
395 | - font-family: monospace; |
|
||
|
396 | - } |
|
||
|
397 | - |
|
||
|
398 | - &.task-menu { |
|
||
|
399 | - text-align: center; |
|
||
|
400 | - font-size: 13px; |
|
||
|
401 | - line-height: 1.75em; |
|
||
|
402 | - font-weight: bold; |
|
||
|
403 | - border-top: 1px dashed gray; |
|
||
|
404 | - border-bottom: 1px dashed gray; |
|
||
|
405 | - margin-top: 2px; |
|
||
|
406 | - margin-bottom: 4px; |
|
||
|
407 | - } |
|
||
|
408 | - } |
|
||
|
409 | - |
|
||
|
410 | - table.taskdesc { |
|
||
|
411 | - border: 2px solid #dddddd; |
|
||
|
412 | - border-collapse: collapse; |
|
||
|
413 | - margin: 10px auto; |
|
||
|
414 | - width: 90%; |
|
||
|
415 | - font-size: 13px; |
|
||
|
416 | - |
|
||
|
417 | - p { |
|
||
|
418 | - font-size: 13px; |
|
||
|
419 | - } |
|
||
|
420 | - |
|
||
|
421 | - tr.name { |
|
||
|
422 | - border: 2px solid #dddddd; |
|
||
|
423 | - background: #dddddd; |
|
||
|
424 | - color: #333333; |
|
||
|
425 | - font-weight: bold; |
|
||
|
426 | - font-size: 14px; |
|
||
|
427 | - line-height: 1.5em; |
|
||
|
428 | - text-align: center; |
|
||
|
429 | - } |
|
||
|
430 | - |
|
||
|
431 | - td { |
|
||
|
432 | - &.desc-odd { |
|
||
|
433 | - padding: 5px; |
|
||
|
434 | - padding-left: 20px; |
|
||
|
435 | - background: #fefeee; |
|
||
|
436 | - } |
|
||
|
437 | - |
|
||
|
438 | - &.desc-even { |
|
||
|
439 | - padding: 5px; |
|
||
|
440 | - padding-left: 20px; |
|
||
|
441 | - background: #feeefe; |
|
||
|
442 | - } |
|
||
|
443 | - } |
|
||
|
444 | - } |
|
||
|
445 | - |
|
||
|
446 | - .announcementbox { |
|
||
|
447 | - margin: 10px 0px; |
|
||
|
448 | - background: #bbddee; |
|
||
|
449 | - padding: 1px; |
|
||
|
450 | - |
|
||
|
451 | - span.title { |
|
||
|
452 | - font-weight: bold; |
|
||
|
453 | - color: #224455; |
|
||
|
454 | - padding-left: 10px; |
|
||
|
455 | - line-height: 1.6em; |
|
||
|
456 | - } |
|
||
|
457 | - } |
|
||
|
458 | - |
|
||
|
459 | - .announcement { |
|
||
|
460 | - margin: 2px; |
|
||
|
461 | - background: white; |
|
||
|
462 | - padding: 1px; |
|
||
|
463 | - padding-left: 10px; |
|
||
|
464 | - padding-right: 10px; |
|
||
|
465 | - padding-top: 5px; |
|
||
|
466 | - padding-bottom: 5px; |
|
||
|
467 | - } |
|
||
|
468 | - |
|
||
|
469 | - .announcement p { |
|
||
|
470 | - font-size: 12px; |
|
||
|
471 | - margin: 2px; |
|
||
|
472 | - } |
|
||
|
473 | - |
|
||
|
474 | - .pub-info { |
|
||
|
475 | - text-align: right; |
|
||
|
476 | - font-style: italic; |
|
||
|
477 | - font-size: 9px; |
|
||
|
478 | - |
|
||
|
479 | - p { |
|
||
|
480 | - text-align: right; |
|
||
|
481 | - font-style: italic; |
|
||
|
482 | - font-size: 9px; |
|
||
|
483 | - } |
|
||
|
484 | - } |
|
||
|
485 | - |
|
||
|
486 | - .announcement { |
|
||
|
487 | - .toggles { |
|
||
|
488 | - font-weight: normal; |
|
||
|
489 | - float: right; |
|
||
|
490 | - font-size: 80%; |
|
||
|
491 | - } |
|
||
|
492 | - |
|
||
|
493 | - .announcement-title { |
|
||
|
494 | - font-weight: bold; |
|
||
|
495 | - } |
|
||
|
496 | - } |
|
||
|
497 | - |
|
||
|
498 | - div { |
|
||
|
499 | - &.message { |
|
||
|
500 | - margin: 10px 0 0; |
|
||
|
501 | - |
|
||
|
502 | - div { |
|
||
|
503 | - &.message { |
|
||
|
504 | - margin: 0 0 0 30px; |
|
||
|
505 | - } |
|
||
|
506 | - |
|
||
|
507 | - &.body { |
|
||
|
508 | - border: 2px solid #dddddd; |
|
||
|
509 | - background: #fff8f8; |
|
||
|
510 | - padding-left: 5px; |
|
||
|
511 | - } |
|
||
|
512 | - |
|
||
|
513 | - &.reply-body { |
|
||
|
514 | - border: 2px solid #bbbbbb; |
|
||
|
515 | - background: #fffff8; |
|
||
|
516 | - padding-left: 5px; |
|
||
|
517 | - } |
|
||
|
518 | - |
|
||
|
519 | - &.stat { |
|
||
|
520 | - font-size: 10px; |
|
||
|
521 | - line-height: 1.75em; |
|
||
|
522 | - padding: 0 5px; |
|
||
|
523 | - color: #333333; |
|
||
|
524 | - background: #dddddd; |
|
||
|
525 | - font-weight: bold; |
|
||
|
526 | - } |
|
||
|
527 | - |
|
||
|
528 | - &.message div.stat { |
|
||
|
529 | - font-size: 10px; |
|
||
|
530 | - line-height: 1.75em; |
|
||
|
531 | - padding: 0 5px; |
|
||
|
532 | - color: #444444; |
|
||
|
533 | - background: #bbbbbb; |
|
||
|
534 | - font-weight: bold; |
|
||
|
535 | - } |
|
||
|
536 | - } |
|
||
|
537 | - } |
|
||
|
538 | - |
|
||
|
539 | - &.contest-title { |
|
||
|
540 | - color: white; |
|
||
|
541 | - text-align: center; |
|
||
|
542 | - line-height: 2em; |
|
||
|
543 | - } |
|
||
|
544 | - |
|
||
|
545 | - &.registration-desc, &.test-desc { |
|
||
|
546 | - border: 1px dotted gray; |
|
||
|
547 | - background: #f5f5f5; |
|
||
|
548 | - padding: 5px; |
|
||
|
549 | - margin: 10px 0; |
|
||
|
550 | - font-size: 12px; |
|
||
|
551 | - line-height: 1.5em; |
|
||
|
552 | - } |
|
||
|
553 | - } |
|
||
|
554 | - |
|
||
|
555 | - h2.contest-title { |
|
||
|
556 | - margin-top: 5px; |
|
||
|
557 | - margin-bottom: 5px; |
|
||
|
558 | - } |
|
||
|
559 | - |
|
||
|
560 | - |
|
||
|
561 | - |
|
||
|
562 | - .grader-comment { |
|
||
|
563 | - word-wrap: break-word; |
|
||
|
564 | - } |
|
||
|
565 | - |
|
||
|
566 | - |
|
||
|
567 | - golden-btn + .golden-btn { margin-top: 1em; } |
|
||
|
568 | - |
|
||
|
569 | - .golden-btn { |
|
||
|
570 | - display: inline-block; |
|
||
|
571 | - outline: none; |
|
||
|
572 | - font-family: inherit; |
|
||
|
573 | - box-sizing: border-box; |
|
||
|
574 | - border: none; |
|
||
|
575 | - box-shadow: 0 3px 6px rgba(0,0,0,.16), 0 3px 6px rgba(110,80,20,.4), |
|
||
|
576 | - inset 0 -2px 5px 1px rgba(139,66,8,1), |
|
||
|
577 | - inset 0 -1px 1px 3px rgba(250,227,133,1); |
|
||
|
578 | - background-image: linear-gradient(160deg, #a54e07, #b47e11, #fef1a2, #bc881b, #a54e07) !important; |
|
||
|
579 | - border: 1px solid #a55d07; |
|
||
|
580 | - color: rgb(120,50,5); |
|
||
|
581 | - text-shadow: 0 2px 2px rgba(250, 227, 133, 1); |
|
||
|
582 | - cursor: pointer; |
|
||
|
583 | - transition: all .2s ease-in-out; |
|
||
|
584 | - background-size: 100% 100%; |
|
||
|
585 | - background-position:center; |
|
||
|
586 | - } |
|
||
|
587 | - .golden-btn:focus, |
|
||
|
588 | - .golden-btn:hover { |
|
||
|
589 | - background-size: 150% 150%; |
|
||
|
590 | - box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23), |
|
||
|
591 | - inset 0 -2px 5px 1px #b17d10, |
|
||
|
592 | - inset 0 -1px 1px 3px rgba(250,227,133,1); |
|
||
|
593 | - border: 1px solid rgba(165,93,7,.6); |
|
||
|
594 | - color: rgba(120,50,5,.8); |
|
||
|
595 | - } |
|
||
|
596 | - .golden-btn:active { |
|
||
|
597 | - box-shadow: 0 3px 6px rgba(0,0,0,.16), 0 3px 6px rgba(110,80,20,.4), |
|
||
|
598 | - inset 0 -2px 5px 1px #b17d10, |
|
||
|
599 | - inset 0 -1px 1px 3px rgba(250,227,133,1); |
|
||
|
600 | - } |
|
@@ -1,25 +1,21 | |||||
|
1 | // Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails |
|
1 | // Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails |
|
2 | //import "@hotwired/turbo-rails" |
|
2 | //import "@hotwired/turbo-rails" |
|
3 | //import "controllers" |
|
3 | //import "controllers" |
|
4 | // |
|
4 | // |
|
5 |
|
5 | ||
|
6 | - //import "my_sprocket" |
|
||
|
7 | - import "pdfmake" |
|
||
|
8 | - import "pdfmake-vfs" |
|
||
|
9 | - import "jszip" |
|
||
|
10 |
|
6 | ||
|
11 |
|
|
7 | //bootstrap |
|
12 | import "bootstrap" |
|
8 | import "bootstrap" |
|
13 | window.bootstrap = bootstrap |
|
9 | window.bootstrap = bootstrap |
|
14 | - console.log($); // ok |
|
||
|
15 | - console.log(bootstrap) |
|
||
|
16 | - console.log(JSZip); |
|
||
|
17 |
|
10 | ||
|
18 | //datatable |
|
11 | //datatable |
|
19 | //import 'datatables-bundle' |
|
12 | //import 'datatables-bundle' |
|
|
13 | + import "pdfmake" | ||
|
|
14 | + import "pdfmake-vfs" | ||
|
|
15 | + import "jszip" | ||
|
20 | import "datatables" |
|
16 | import "datatables" |
|
21 | import "datatables-bs5" |
|
17 | import "datatables-bs5" |
|
22 | import "datatables-editor" |
|
18 | import "datatables-editor" |
|
23 | import "datatables-editor-bs5" |
|
19 | import "datatables-editor-bs5" |
|
24 | import "datatables-autofill" |
|
20 | import "datatables-autofill" |
|
25 | import "datatables-autofill-bs5" |
|
21 | import "datatables-autofill-bs5" |
@@ -46,16 +42,12 | |||||
|
46 | import "datatables-staterestore" |
|
42 | import "datatables-staterestore" |
|
47 | import "datatables-staterestore-bs5" |
|
43 | import "datatables-staterestore-bs5" |
|
48 | /* */ |
|
44 | /* */ |
|
49 |
|
45 | ||
|
50 | import "select2" |
|
46 | import "select2" |
|
51 |
|
47 | ||
|
52 | - //import "ace-rails-ap" |
|
||
|
53 | - //import "ace/theme-merbivore" |
|
||
|
54 | - //import "ace/mode-python" |
|
||
|
55 | - |
|
||
|
56 | //my own customization |
|
48 | //my own customization |
|
57 | import 'custom' |
|
49 | import 'custom' |
|
58 |
|
50 | ||
|
59 |
|
51 | ||
|
60 | console.log('application.js ready') |
|
52 | console.log('application.js ready') |
|
61 |
|
53 |
@@ -5,13 +5,18 | |||||
|
5 | label = input.val().replace(/\\/g, '/').replace(/.*\//, ''); |
|
5 | label = input.val().replace(/\\/g, '/').replace(/.*\//, ''); |
|
6 | input.trigger('fileselect', [numFiles, label]); |
|
6 | input.trigger('fileselect', [numFiles, label]); |
|
7 | }); |
|
7 | }); |
|
8 |
|
8 | ||
|
9 | $(function() { |
|
9 | $(function() { |
|
10 | var e; |
|
10 | var e; |
|
11 |
- $(".select2").select2({ |
|
11 | + $(".select2").select2({ |
|
|
12 | + theme: "bootstrap-5", | ||
|
|
13 | + //selectionCssClass: "select2--small", | ||
|
|
14 | + //dropdownCssClass: "select2--small", | ||
|
|
15 | + }); | ||
|
|
16 | + | ||
|
12 | $('.btn-file :file').on('fileselect', function(event, numFiles, label) { |
|
17 | $('.btn-file :file').on('fileselect', function(event, numFiles, label) { |
|
13 | var input, log; |
|
18 | var input, log; |
|
14 | input = $(this).parents('.input-group').find(':text'); |
|
19 | input = $(this).parents('.input-group').find(':text'); |
|
15 | log = numFiles > 1 ? numFiles + ' files selected' : label; |
|
20 | log = numFiles > 1 ? numFiles + ' files selected' : label; |
|
16 | if (input.length) { |
|
21 | if (input.length) { |
|
17 | input.val(log); |
|
22 | input.val(log); |
@@ -1,3 +1,3 | |||||
|
1 | class ApplicationRecord < ActiveRecord::Base |
|
1 | class ApplicationRecord < ActiveRecord::Base |
|
2 |
- |
|
2 | + primary_abstract_class |
|
3 | end |
|
3 | end |
@@ -1,7 +1,7 | |||||
|
1 |
- class Submission < A |
|
1 | + class Submission < ApplicationRecord |
|
2 |
|
2 | ||
|
3 | enum tag: {default: 0, model: 1}, _prefix: true |
|
3 | enum tag: {default: 0, model: 1}, _prefix: true |
|
4 |
|
4 | ||
|
5 | belongs_to :language |
|
5 | belongs_to :language |
|
6 | belongs_to :problem |
|
6 | belongs_to :problem |
|
7 | belongs_to :user |
|
7 | belongs_to :user |
@@ -88,13 +88,13 | |||||
|
88 | return nil |
|
88 | return nil |
|
89 | end |
|
89 | end |
|
90 |
|
90 | ||
|
91 | def self.find_language_in_source(source, source_filename="") |
|
91 | def self.find_language_in_source(source, source_filename="") |
|
92 | langopt = find_option_in_source(/^LANG:/,source) |
|
92 | langopt = find_option_in_source(/^LANG:/,source) |
|
93 | if langopt |
|
93 | if langopt |
|
94 |
- return (Language.find_by_name(langopt) || |
|
94 | + return (Language.find_by_name(langopt) || |
|
95 | Language.find_by_pretty_name(langopt)) |
|
95 | Language.find_by_pretty_name(langopt)) |
|
96 | else |
|
96 | else |
|
97 | if source_filename |
|
97 | if source_filename |
|
98 | return Language.find_by_extension(source_filename.split('.').last) |
|
98 | return Language.find_by_extension(source_filename.split('.').last) |
|
99 | else |
|
99 | else |
|
100 | return nil |
|
100 | return nil |
@@ -140,20 +140,20 | |||||
|
140 | return if self.source==nil |
|
140 | return if self.source==nil |
|
141 |
|
141 | ||
|
142 | # for output_only tasks |
|
142 | # for output_only tasks |
|
143 | return if self.problem!=nil and self.problem.output_only |
|
143 | return if self.problem!=nil and self.problem.output_only |
|
144 |
|
144 | ||
|
145 | if self.language == nil |
|
145 | if self.language == nil |
|
146 |
- errors.add( |
|
146 | + errors.add(:source,:invalid,message: "Cannot detect language. Did you submit a correct source file?") |
|
147 | end |
|
147 | end |
|
148 | end |
|
148 | end |
|
149 |
|
149 | ||
|
150 | def must_have_valid_problem |
|
150 | def must_have_valid_problem |
|
151 | return if self.source==nil |
|
151 | return if self.source==nil |
|
152 | if self.problem==nil |
|
152 | if self.problem==nil |
|
153 | - errors.add('problem',"must be specified.") |
|
153 | + errors.add(:problem,:blank,'aaa') |
|
154 | else |
|
154 | else |
|
155 | #admin always have right |
|
155 | #admin always have right |
|
156 | return if self.user.admin? |
|
156 | return if self.user.admin? |
|
157 |
|
157 | ||
|
158 | #check if user has the right to submit the problem |
|
158 | #check if user has the right to submit the problem |
|
159 | errors[:base] << "Authorization error: you have no right to submit to this problem" if (!self.user.available_problems.include?(self.problem)) and (self.new_record?) |
|
159 | errors[:base] << "Authorization error: you have no right to submit to this problem" if (!self.user.available_problems.include?(self.problem)) and (self.new_record?) |
@@ -9,18 +9,11 | |||||
|
9 | = "( #{time_ago_in_words(submission.submitted_at)} ago)" |
|
9 | = "( #{time_ago_in_words(submission.submitted_at)} ago)" |
|
10 | %td |
|
10 | %td |
|
11 | = submission.source_filename |
|
11 | = submission.source_filename |
|
12 | = " (#{submission.language.pretty_name}) " |
|
12 | = " (#{submission.language.pretty_name}) " |
|
13 | = link_to '[load]', download_submission_path(submission) |
|
13 | = link_to '[load]', download_submission_path(submission) |
|
14 | %td |
|
14 | %td |
|
15 | - - if submission.graded_at |
|
15 | + = render 'submission_short', submission: submission, show_button: false, problem_id: submission&.problem&.id |
|
16 | - = "Graded at #{format_short_time(submission.graded_at)}." |
|
||
|
17 | - %br/ |
|
||
|
18 | - = "Score: #{(submission.points*100/submission.problem.full_score).to_i} " if GraderConfiguration['ui.show_score'] |
|
||
|
19 | - = " [" |
|
||
|
20 | - %tt |
|
||
|
21 | - = submission.grader_comment |
|
||
|
22 | - = "]" |
|
||
|
23 | %td |
|
16 | %td |
|
24 | = render :partial => 'compiler_message', :locals => {:compiler_message => submission.compiler_message } |
|
17 | = render :partial => 'compiler_message', :locals => {:compiler_message => submission.compiler_message } |
|
25 | %td |
|
18 | %td |
|
26 | = link_to 'Edit', edit_submission_path(submission.id), class: 'btn btn-success' |
|
19 | = link_to 'Edit', edit_submission_path(submission.id), class: 'btn btn-success' |
@@ -1,32 +1,33 | |||||
|
1 | - if submission.nil? |
|
1 | - if submission.nil? |
|
2 | = "-" |
|
2 | = "-" |
|
3 | - else |
|
3 | - else |
|
4 | - %strong= "Submission ID:" |
|
4 | + - if local_assigns[:show_id] |
|
5 | - = submission.id |
|
5 | + .row |
|
6 | - %br |
|
6 | + .col-3.text-secondary |
|
|
7 | + Sub ID: | ||
|
|
8 | + %strong.col-9= submission.id | ||
|
7 | - unless submission.graded_at |
|
9 | - unless submission.graded_at |
|
8 | - %strong= t 'main.submitted_at:' |
|
10 | + .row |
|
9 | - = format_full_time_ago(submission.submitted_at.localtime) |
|
11 | + .col-3.text-secondary= t 'main.submitted_at' |
|
|
12 | + %strong.col-9= format_full_time_ago(submission.submitted_at.localtime) | ||
|
10 | - else |
|
13 | - else |
|
11 | - %strong= t 'main.graded_at:' |
|
14 | + .row |
|
12 | - = format_full_time_ago(submission.graded_at.localtime) |
|
15 | + .col-3.text-secondary= t 'main.graded_at' |
|
13 | - %br |
|
16 | + %strong.col-9= format_full_time_ago(submission.graded_at.localtime) |
|
14 | - if GraderConfiguration['ui.show_score'] |
|
17 | - if GraderConfiguration['ui.show_score'] |
|
15 | - %strong=t 'main.score' |
|
18 | + .row |
|
16 | - = "#{(submission.points*100/submission.problem.full_score).to_i} " |
|
19 | + .col-3.text-secondary=t 'main.score' |
|
17 | - = " [" |
|
20 | + %strong.col-9 |
|
18 | - %tt |
|
21 | + = (submission.points*100/submission.problem.full_score).to_i |
|
19 |
- |
|
22 | + %tt.grader-comment |
|
20 | - = "]" |
|
23 | + = " [#{submission.grader_comment}]" |
|
21 | - %br |
|
24 | + - if local_assigns[:show_button] |
|
22 | - %strong View: |
|
25 | + - if submission.graded_at |
|
23 | - - if GraderConfiguration.show_grading_result |
|
26 | + - if GraderConfiguration.show_grading_result |
|
24 | - = link_to '[detailed result]', :action => 'result', :id => submission.id |
|
27 | + = link_to '[detailed result]', :action => 'result', :id => submission.id |
|
25 | - - if submission.graded_at |
|
28 | + = link_to "#{t 'main.cmp_msg'}", compiler_msg_submission_path(submission), {popup: true,remote: true,class: 'btn btn-sm btn-info'} |
|
26 |
- = link_to "#{t 'main. |
|
29 | + = link_to "#{t 'main.src_link'}",download_submission_path(submission), class: 'btn btn-sm btn-info' |
|
27 | - -# |
|
30 | + = link_to "#{t 'main.submissions_link'}", problem_submissions_path(submission.problem.id), class: 'btn btn-sm btn-info' |
|
28 | - %button.btn.btn-info.btn-xs{type: 'button', data: {toggle: 'modal', target: '#compiler'}} |
|
31 | + - if GraderConfiguration.show_testcase |
|
29 | - =t 'main.cmp_msg' |
|
32 | + = link_to "testcases", show_problem_testcases_path(submission.problem.id), class: 'btn btn-sm btn-info' |
|
30 | - = link_to "#{t 'main.src_link'}", download_submission_path(submission.id), class: 'btn btn-xs btn-info' |
|
||
|
31 | - = link_to "#{t 'main.submissions_link'}", problem_submissions_path(problem_id), class: 'btn btn-xs btn-info' |
|
||
|
32 |
|
33 |
@@ -11,13 +11,15 | |||||
|
11 | = content_for :header |
|
11 | = content_for :header |
|
12 | = yield :head |
|
12 | = yield :head |
|
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"} |
|
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 | -# %script{src:"https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js",integrity:"sha384-oBqDVmMz9ATKxIep9tiCxS/Z9fNfEXiDAYTujMAeBAsjFuCZSmKbSSUnQlmh/jp3",crossorigin:"anonymous"} |
|
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 | -# %script{src:"https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/js/bootstrap.bundle.min.js",integrity:"sha384-7VPbUDkoPSGFnVtYi0QogXtr74QeVeeIs99Qfg5YCF+TidwNdjvaKZX19NZ/e6oz",crossorigin:"anonymous"} |
|
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 | + <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"> | ||
|
18 |
|
20 | ||
|
19 | %body |
|
21 | %body |
|
20 | - unless local_assigns[:skip_header] |
|
22 | - unless local_assigns[:skip_header] |
|
21 | = render 'layouts/header' |
|
23 | = render 'layouts/header' |
|
22 |
|
24 | ||
|
23 | /= content_tag(:p,flash[:notice],class: 'alert alert-success') if flash[:notice]!=nil |
|
25 | /= content_tag(:p,flash[:notice],class: 'alert alert-success') if flash[:notice]!=nil |
@@ -1,11 +1,12 | |||||
|
1 | - .card-body |
|
1 | + %li.list-group-item |
|
2 | .card-title |
|
2 | .card-title |
|
3 | - = announcement.title |
|
3 | + %h1 |
|
4 | - - if @current_user and @current_user.admin? |
|
4 | + = announcement.title |
|
5 | - = link_to 'Edit', edit_announcement_path(announcement), class: 'btn btn-xs btn-default' |
|
5 | + - if @current_user and @current_user.admin? |
|
|
6 | + = link_to 'Edit', edit_announcement_path(announcement), class: 'btn btn-sm btn-outline-secondary' | ||
|
6 | .card-subtitle |
|
7 | .card-subtitle |
|
7 | = "(updated #{time_ago_in_words(announcement.updated_at)} ago on #{announcement.updated_at})" |
|
8 | = "(updated #{time_ago_in_words(announcement.updated_at)} ago on #{announcement.updated_at})" |
|
8 | .card-text |
|
9 | .card-text |
|
9 | = markdown(announcement.body) |
|
10 | = markdown(announcement.body) |
|
10 |
|
11 | ||
|
11 |
|
12 |
@@ -10,13 +10,13 | |||||
|
10 | %br |
|
10 | %br |
|
11 | = link_to_description_if_any "[#{t 'main.problem_desc'}] <span class='glyphicon glyphicon-file'></span>".html_safe, problem |
|
11 | = link_to_description_if_any "[#{t 'main.problem_desc'}] <span class='glyphicon glyphicon-file'></span>".html_safe, problem |
|
12 | %td |
|
12 | %td |
|
13 | = @prob_submissions[problem.id][:count] |
|
13 | = @prob_submissions[problem.id][:count] |
|
14 | -#= link_to "[subs]", main_submission_path(problem.id) |
|
14 | -#= link_to "[subs]", main_submission_path(problem.id) |
|
15 | %td |
|
15 | %td |
|
16 |
- = render |
|
16 | + = render partial: 'submission_short', |
|
17 |
- |
|
17 | + locals: {:submission => @prob_submissions[problem.id][:submission], :problem_name => problem.name, :problem_id => problem.id, show_button: true } |
|
18 | %td |
|
18 | %td |
|
19 | - if @prob_submissions[problem.id][:submission] |
|
19 | - if @prob_submissions[problem.id][:submission] |
|
20 | = link_to 'Edit', edit_submission_path(@prob_submissions[problem.id][:submission]), class: 'btn btn-success' |
|
20 | = link_to 'Edit', edit_submission_path(@prob_submissions[problem.id][:submission]), class: 'btn btn-success' |
|
21 | - else |
|
21 | - else |
|
22 | = link_to 'New', direct_edit_problem_submissions_path(problem.id), class: 'btn btn-success' |
|
22 | = link_to 'New', direct_edit_problem_submissions_path(problem.id), class: 'btn btn-success' |
@@ -44,19 +44,19 | |||||
|
44 | %th |
|
44 | %th |
|
45 | = render :partial => 'problem', :collection => cp[:problems] |
|
45 | = render :partial => 'problem', :collection => cp[:problems] |
|
46 | .col-md-5 |
|
46 | .col-md-5 |
|
47 | .card |
|
47 | .card |
|
48 | .card-header |
|
48 | .card-header |
|
49 | Announcement |
|
49 | Announcement |
|
50 |
- = link_to 'Manage', announcements_path, class: 'btn btn-sm |
|
50 | + = link_to 'Manage', announcements_path, class: 'btn btn-secondary btn-sm' |
|
51 | - .card-body |
|
51 | + %ul.list-group.list-group-flush |
|
52 | = render :partial => 'announcement', :collection => @announcements |
|
52 | = render :partial => 'announcement', :collection => @announcements |
|
53 | - |
|
53 | + -# |
|
54 |
- |
|
54 | + %script{:type => 'text/javascript'} |
|
55 | - = "Announcement.refreshUrl = '#{url_for :controller => 'main', :action => 'announcements'}';" |
|
55 | + = "Announcement.refreshUrl = '#{url_for :controller => 'main', :action => 'announcements'}';".html_safe |
|
56 | - Announcement.registerRefreshEventTimer(); |
|
56 | + Announcement.registerRefreshEventTimer(); |
|
57 |
|
57 | ||
|
58 | .modal.fade#compiler{tabindex: -1,role: 'dialog'} |
|
58 | .modal.fade#compiler{tabindex: -1,role: 'dialog'} |
|
59 | .modal-dialog.modal-lg{role:'document'} |
|
59 | .modal-dialog.modal-lg{role:'document'} |
|
60 | .modal-content |
|
60 | .modal-content |
|
61 | .modal-header |
|
61 | .modal-header |
|
62 | %button.close{type: 'button', data: {dismissed: :modal}, aria: {label: 'close'}} |
|
62 | %button.close{type: 'button', data: {dismissed: :modal}, aria: {label: 'close'}} |
@@ -1,4 +1,4 | |||||
|
1 | :plain |
|
1 | :plain |
|
2 | $("#compiler_msg").html("#{j @submission.compiler_message}"); |
|
2 | $("#compiler_msg").html("#{j @submission.compiler_message}"); |
|
3 | - $("#compiler").modal(); |
|
3 | + $("#compiler").modal('show'); |
|
4 |
|
4 |
@@ -9,47 +9,50 | |||||
|
9 | .alert.alert-info |
|
9 | .alert.alert-info |
|
10 | Write your code in the following box, choose language, and click submit button when finished |
|
10 | Write your code in the following box, choose language, and click submit button when finished |
|
11 | .row |
|
11 | .row |
|
12 | .col-md-8 |
|
12 | .col-md-8 |
|
13 | %div#editor{style: 'height: 500px; border-radius: 7px; font-size: 14px;'} |
|
13 | %div#editor{style: 'height: 500px; border-radius: 7px; font-size: 14px;'} |
|
14 | .col-md-4 |
|
14 | .col-md-4 |
|
15 |
- - |
|
15 | + -# submission form |
|
16 | - = form_tag({controller: :main, :action => 'submit'}, :multipart => true, class: 'form') do |
|
16 | + .card.mb-3 |
|
17 | - |
|
17 | + .card-header |
|
18 | - = hidden_field_tag 'editor_text', @source |
|
18 | + Submission |
|
19 | - = hidden_field_tag 'submission[problem_id]', @problem.id |
|
19 | + .card-body |
|
20 | - .form-group |
|
20 | + = form_with url: submit_main_path, :multipart => true, class: 'form' do |form| |
|
21 | - = label_tag "Task:" |
|
21 | + = hidden_field_tag 'editor_text', @source |
|
22 | - = text_field_tag 'asdf', "#{@problem.long_name}", class: 'form-control', disabled: true |
|
22 | + = hidden_field_tag 'submission[problem_id]', @problem.id |
|
23 | - .form-group |
|
23 | + .row.mb-2 |
|
24 | - = label_tag "Description:" |
|
24 | + .col-md-4 |
|
25 | - = link_to_description_if_any "[download] <span class='glyphicon glyphicon-file'></span>".html_safe, @problem |
|
25 | + = form.label "Task", class: 'col-form-label text-secondary' |
|
|
26 | + .col-md-8 | ||
|
|
27 | + = form.label nil, "#{@problem.long_name}", class: 'col-form-label fw-bold' | ||
|
|
28 | + .row.mb-2 | ||
|
|
29 | + .col-md-4 | ||
|
|
30 | + = form.label "Description", class: 'col-form-label text-secondary' | ||
|
|
31 | + .col-md-8 | ||
|
|
32 | + = link_to_description_if_any "[download] <span class='mi'>description</span>".html_safe, @problem | ||
|
|
33 | + .row.mb-2 | ||
|
|
34 | + .col-md-4 | ||
|
|
35 | + = form.label :language_id, 'Language', class: 'col-form-label text-secondary' | ||
|
|
36 | + .col-md-8 | ||
|
|
37 | + = form.select :language_id, options_from_collection_for_select(Language.all, 'id', 'pretty_name', @lang_id || @current_user.default_language || Language.find_by_pretty_name("Python").id || Language.first.id), {}, class: 'form-select', style: "width: 100px", id: 'language_id' | ||
|
|
38 | + .row.mb-2 | ||
|
|
39 | + .col-12 | ||
|
|
40 | + = form.file_field :load_file, class: 'form-control', id: 'load_file' | ||
|
|
41 | + .row.mb-2 | ||
|
|
42 | + .col-12 | ||
|
|
43 | + = submit_tag 'Submit', class: 'btn ' + (@submission && @submission.number >= 100 ? 'golden-btn' : 'btn-success'), id: 'live_submit', | ||
|
|
44 | + data: {confirm: "Submitting this source code for task #{@problem.long_name}?"} | ||
|
26 |
|
45 | ||
|
27 | - .form-group |
|
46 | + -# latest submission status |
|
28 | - = label_tag 'Language:' |
|
47 | + .card |
|
29 | - = select_tag 'language_id', options_from_collection_for_select(Language.all, 'id', 'pretty_name', @lang_id || @current_user.default_language || Language.find_by_pretty_name("Python").id || Language.first.id), class: 'form-control select', style: "width: 100px" |
|
48 | + .card-header.text-bg-info.border-info |
|
30 | - .form-group |
|
||
|
31 | - .input-group |
|
||
|
32 | - %span.input-group-btn |
|
||
|
33 | - %span.btn.btn-default.btn-file |
|
||
|
34 | - Browse |
|
||
|
35 | - = file_field_tag 'load_file' |
|
||
|
36 | - = text_field_tag '' , nil, {readonly: true, class: 'form-control'} |
|
||
|
37 | - .form-group |
|
||
|
38 | - = submit_tag 'Submit', class: 'btn ' + (@submission && @submission.number >= 100 ? 'golden-btn' : 'btn-success'), id: 'live_submit', |
|
||
|
39 | - data: {confirm: "Submitting this source code for task #{@problem.long_name}?"} |
|
||
|
40 | - - # latest submission status |
|
||
|
41 | - .panel{class: (@submission && @submission.graded_at) ? "panel-info" : "panel-warning"} |
|
||
|
42 | - .panel-heading |
|
||
|
43 | Latest Submission Status |
|
49 | Latest Submission Status |
|
44 |
- = link_to "Refresh",get_latest_submission_status_submissions_path(@submission.user,@problem), class: "btn btn- |
|
50 | + = link_to "Refresh",get_latest_submission_status_submissions_path(@submission.user,@problem), id: 'refresh', class: "btn btn-light btn-sm", remote: true if @submission |
|
45 |
- . |
|
51 | + .card-body |
|
46 |
- |
|
52 | + #latest_status |
|
47 | - - if @submission |
|
||
|
48 | - = render :partial => 'submission_short', |
|
||
|
49 | - :locals => {submission: @submission, problem_name: @problem.name, problem_id: @problem.id } |
|
||
|
50 |
|
53 | ||
|
51 | .modal.fade#compiler{tabindex: -1,role: 'dialog'} |
|
54 | .modal.fade#compiler{tabindex: -1,role: 'dialog'} |
|
52 | .modal-dialog.modal-lg{role:'document'} |
|
55 | .modal-dialog.modal-lg{role:'document'} |
|
53 | .modal-content |
|
56 | .modal-content |
|
54 | .modal-header |
|
57 | .modal-header |
|
55 | %button.close{type: 'button', data: {dismissed: :modal}, aria: {label: 'close'}} |
|
58 | %button.close{type: 'button', data: {dismissed: :modal}, aria: {label: 'close'}} |
@@ -61,13 +64,13 | |||||
|
61 | = @submission.compiler_message |
|
64 | = @submission.compiler_message |
|
62 | .modal-footer |
|
65 | .modal-footer |
|
63 | %button.btn.btn-default{type: 'button', data: {dismiss: 'modal'}} Close |
|
66 | %button.btn.btn-default{type: 'button', data: {dismiss: 'modal'}} Close |
|
64 |
|
67 | ||
|
65 | :javascript |
|
68 | :javascript |
|
66 | $(document).ready(function() { |
|
69 | $(document).ready(function() { |
|
67 | - e = ace.edit("editor") |
|
70 | + var e = ace.edit("editor") |
|
68 | e.setValue($("#text_sourcecode").val()); |
|
71 | e.setValue($("#text_sourcecode").val()); |
|
69 | e.gotoLine(1); |
|
72 | e.gotoLine(1); |
|
70 | $("#language_id").trigger('change'); |
|
73 | $("#language_id").trigger('change'); |
|
71 |
|
74 | ||
|
72 | $("#load_file").on('change',function(evt) { |
|
75 | $("#load_file").on('change',function(evt) { |
|
73 | var file = evt.target.files[0]; |
|
76 | var file = evt.target.files[0]; |
@@ -77,12 +80,41 | |||||
|
77 | e.setValue(theFile.target.result); |
|
80 | e.setValue(theFile.target.result); |
|
78 | e.gotoLine(1); |
|
81 | e.gotoLine(1); |
|
79 | }; |
|
82 | }; |
|
80 | reader.readAsText(file) |
|
83 | reader.readAsText(file) |
|
81 | }); |
|
84 | }); |
|
82 |
|
85 | ||
|
|
86 | + $("#live_submit").on("click", function(event) { | ||
|
|
87 | + $("#editor_text").val(e.getValue()); | ||
|
|
88 | + }); | ||
|
|
89 | + | ||
|
|
90 | + $("#language_id").on("change", function(event) { | ||
|
|
91 | + text = $("#language_id option:selected").text(); | ||
|
|
92 | + mode = 'ace/mode/c_cpp'; | ||
|
|
93 | + switch (text) { | ||
|
|
94 | + case 'Pascal': | ||
|
|
95 | + mode = 'ace/mode/pascal'; | ||
|
|
96 | + break; | ||
|
|
97 | + case 'C++': | ||
|
|
98 | + case 'C': | ||
|
|
99 | + mode = 'ace/mode/c_cpp'; | ||
|
|
100 | + break; | ||
|
|
101 | + case 'Ruby': | ||
|
|
102 | + mode = 'ace/mode/ruby'; | ||
|
|
103 | + break; | ||
|
|
104 | + case 'Python': | ||
|
|
105 | + mode = 'ace/mode/python'; | ||
|
|
106 | + break; | ||
|
|
107 | + case 'Java': | ||
|
|
108 | + mode = 'ace/mode/java'; | ||
|
|
109 | + } | ||
|
|
110 | + e.getSession().setMode(mode); | ||
|
|
111 | + }); | ||
|
|
112 | + | ||
|
83 | //brython(); |
|
113 | //brython(); |
|
|
114 | + $('#refresh').click() | ||
|
|
115 | + | ||
|
84 | }); |
|
116 | }); |
|
85 |
|
117 | ||
|
86 |
|
118 | ||
|
87 |
|
119 | ||
|
88 |
|
120 |
@@ -1,2 +1,2 | |||||
|
1 | :plain |
|
1 | :plain |
|
2 |
- $("#latest_status").html("#{j render({partial: 'submission_short', locals: {submission: @submission, |
|
2 | + $("#latest_status").html("#{j render({partial: 'submission_short', locals: {submission: @submission, show_id: true, show_button: true } })}") |
@@ -1,17 +1,19 | |||||
|
1 | - .panel.panel-info |
|
1 | + .card.border-info.mb-2 |
|
2 | - .panel-heading |
|
2 | + .card-header.text-bg-info.border-info |
|
3 | Select Problems |
|
3 | Select Problems |
|
4 |
- . |
|
4 | + .card-body |
|
5 | - .form-inline |
|
5 | + .row |
|
6 | - = select 'submission', |
|
6 | + .col-6 |
|
7 | - 'problem_id', |
|
7 | + = select 'submission', |
|
8 | - @problems.collect {|p| ["[#{p.name}] #{p.full_name}", problem_submissions_url(p.id)]}, |
|
8 | + 'problem_id', |
|
9 | - { selected: (@problem ? problem_submissions_url(@problem) : -1) }, |
|
9 | + @problems.collect {|p| ["[#{p.name}] #{p.full_name}", problem_submissions_url(p.id)]}, |
|
10 | - { class: 'select2 form-control'} |
|
10 | + { selected: (@problem ? problem_submissions_url(@problem) : -1) }, |
|
11 | - %button.btn.btn-primary.btn-sm.go-button#problem_go{data: {source: '#submission_problem_id'}} Go |
|
11 | + { class: 'select2 form-control'} |
|
|
12 | + .col-6 | ||
|
|
13 | + %a.btn.btn-primary.go-button#problem_go{data: {source: '#submission_problem_id'}} Go | ||
|
12 |
|
14 | ||
|
13 | - if @problem!=nil |
|
15 | - if @problem!=nil |
|
14 | %h2= "Task: #{@problem.full_name} (#{@problem.name})" |
|
16 | %h2= "Task: #{@problem.full_name} (#{@problem.name})" |
|
15 |
|
17 | ||
|
16 | - if @submissions!=nil |
|
18 | - if @submissions!=nil |
|
17 | - if @submissions.length>0 |
|
19 | - if @submissions.length>0 |
@@ -84,38 +84,38 | |||||
|
84 | %strong Memory (kb) |
|
84 | %strong Memory (kb) |
|
85 | %td #{@submission.peak_memory} |
|
85 | %td #{@submission.peak_memory} |
|
86 | %tr |
|
86 | %tr |
|
87 | %td.text-right |
|
87 | %td.text-right |
|
88 | %strong Compiler result |
|
88 | %strong Compiler result |
|
89 | %td |
|
89 | %td |
|
90 |
- %button.btn.btn-info.btn- |
|
90 | + %button.btn.btn-info.btn-sm{type: 'button', data: {toggle: 'modal', target: '#compiler'}} |
|
91 | view |
|
91 | view |
|
92 | %tr |
|
92 | %tr |
|
93 | %td.text-right |
|
93 | %td.text-right |
|
94 | %strong Grading Task Status |
|
94 | %strong Grading Task Status |
|
95 | %td |
|
95 | %td |
|
96 | = @task.status_str if @task |
|
96 | = @task.status_str if @task |
|
97 | - if @current_user.admin? |
|
97 | - if @current_user.admin? |
|
98 |
- = link_to "rejudge", rejudge_submission_path, data: {remote: true}, class: 'btn btn-info btn- |
|
98 | + = link_to "rejudge", rejudge_submission_path, data: {remote: true}, class: 'btn btn-info btn-sm' |
|
99 | - if @current_user.has_role?('ta') |
|
99 | - if @current_user.has_role?('ta') |
|
100 | %tr |
|
100 | %tr |
|
101 | %td.text-right |
|
101 | %td.text-right |
|
102 | %strong IP |
|
102 | %strong IP |
|
103 | %td #{@submission.ip_address} |
|
103 | %td #{@submission.ip_address} |
|
104 | %tr |
|
104 | %tr |
|
105 | %td.text-right |
|
105 | %td.text-right |
|
106 | %strong Model solution |
|
106 | %strong Model solution |
|
107 | %td |
|
107 | %td |
|
108 | - if @submission.tag_model? |
|
108 | - if @submission.tag_model? |
|
109 | YES |
|
109 | YES |
|
110 | - if @current_user.has_role?('ta') |
|
110 | - if @current_user.has_role?('ta') |
|
111 |
- = link_to "remove model status", set_tag_submission_path(@submission, tag: :default), class: 'btn btn-warning btn- |
|
111 | + = link_to "remove model status", set_tag_submission_path(@submission, tag: :default), class: 'btn btn-warning btn-sm' |
|
112 | - else |
|
112 | - else |
|
113 | No |
|
113 | No |
|
114 | - if @current_user.has_role?('ta') |
|
114 | - if @current_user.has_role?('ta') |
|
115 |
- = link_to "set as model solution", set_tag_submission_path(@submission, tag: :model), class: 'btn btn-success btn- |
|
115 | + = link_to "set as model solution", set_tag_submission_path(@submission, tag: :model), class: 'btn btn-success btn-sm' |
|
116 |
|
116 | ||
|
117 |
|
117 | ||
|
118 | .modal.fade#compiler{tabindex: -1,role: 'dialog'} |
|
118 | .modal.fade#compiler{tabindex: -1,role: 'dialog'} |
|
119 | .modal-dialog.modal-lg{role:'document'} |
|
119 | .modal-dialog.modal-lg{role:'document'} |
|
120 | .modal-content |
|
120 | .modal-content |
|
121 | .modal-header |
|
121 | .modal-header |
@@ -3,13 +3,14 | |||||
|
3 | #entry point |
|
3 | #entry point |
|
4 | pin "application" |
|
4 | pin "application" |
|
5 | pin "prepend_jquery" |
|
5 | pin "prepend_jquery" |
|
6 | pin "my_sprocket" |
|
6 | pin "my_sprocket" |
|
7 | pin_all_from "app/javascript/controllers", under: "controllers" |
|
7 | pin_all_from "app/javascript/controllers", under: "controllers" |
|
8 |
|
8 | ||
|
9 | - pin "jquery", to: 'jquery.js', preload: true |
|
9 | + #we don't need jquery in importmap because we use sprocket version |
|
|
10 | + #pin "jquery", to: 'jquery.js', preload: true | ||
|
10 | pin "bootstrap", to: "bootstrap.bundle.min.js", preload: true |
|
11 | pin "bootstrap", to: "bootstrap.bundle.min.js", preload: true |
|
11 | #no need popper, because bundled already in bootstrap |
|
12 | #no need popper, because bundled already in bootstrap |
|
12 | #pin "@popperjs/core", to: "https://ga.jspm.io/npm:@popperjs/core@2.11.6/lib/index.js" |
|
13 | #pin "@popperjs/core", to: "https://ga.jspm.io/npm:@popperjs/core@2.11.6/lib/index.js" |
|
13 |
|
14 | ||
|
14 | # datatable |
|
15 | # datatable |
|
15 | # I have to fix vfs_font.js for this to work |
|
16 | # I have to fix vfs_font.js for this to work |
@@ -3,23 +3,23 | |||||
|
3 | # This file contains migration options to ease your Rails 5.0 upgrade. |
|
3 | # This file contains migration options to ease your Rails 5.0 upgrade. |
|
4 | # |
|
4 | # |
|
5 | # Once upgraded flip defaults one by one to migrate to the new default. |
|
5 | # Once upgraded flip defaults one by one to migrate to the new default. |
|
6 | # |
|
6 | # |
|
7 | # Read the Guide for Upgrading Ruby on Rails for more info on each option. |
|
7 | # Read the Guide for Upgrading Ruby on Rails for more info on each option. |
|
8 |
|
8 | ||
|
9 | - Rails.application.config.action_controller.raise_on_unfiltered_parameters = true |
|
9 | + #Rails.application.config.action_controller.raise_on_unfiltered_parameters = true |
|
10 |
|
10 | ||
|
11 | # Enable per-form CSRF tokens. Previous versions had false. |
|
11 | # Enable per-form CSRF tokens. Previous versions had false. |
|
12 | - Rails.application.config.action_controller.per_form_csrf_tokens = false |
|
12 | + #Rails.application.config.action_controller.per_form_csrf_tokens = false |
|
13 |
|
13 | ||
|
14 | # Enable origin-checking CSRF mitigation. Previous versions had false. |
|
14 | # Enable origin-checking CSRF mitigation. Previous versions had false. |
|
15 | - Rails.application.config.action_controller.forgery_protection_origin_check = false |
|
15 | + #Rails.application.config.action_controller.forgery_protection_origin_check = false |
|
16 |
|
16 | ||
|
17 | # Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`. |
|
17 | # Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`. |
|
18 | # Previous versions had false. |
|
18 | # Previous versions had false. |
|
19 | - ActiveSupport.to_time_preserves_timezone = false |
|
19 | + #ActiveSupport.to_time_preserves_timezone = false |
|
20 |
|
20 | ||
|
21 | # Require `belongs_to` associations by default. Previous versions had false. |
|
21 | # Require `belongs_to` associations by default. Previous versions had false. |
|
22 | - Rails.application.config.active_record.belongs_to_required_by_default = false |
|
22 | + #Rails.application.config.active_record.belongs_to_required_by_default = false |
|
23 |
|
23 | ||
|
24 | # Do not halt callback chains when a callback returns false. Previous versions had true. |
|
24 | # Do not halt callback chains when a callback returns false. Previous versions had true. |
|
25 | # ActiveSupport.halt_callback_chains_on_return_false = true |
|
25 | # ActiveSupport.halt_callback_chains_on_return_false = true |
@@ -39,16 +39,17 | |||||
|
39 | forget_password: 'Forget password?' |
|
39 | forget_password: 'Forget password?' |
|
40 |
|
40 | ||
|
41 | main: |
|
41 | main: |
|
42 | start_soon: "The contest at your site will start soon. Please wait." |
|
42 | start_soon: "The contest at your site will start soon. Please wait." |
|
43 | specified_in_header: "Specified in header" |
|
43 | specified_in_header: "Specified in header" |
|
44 |
|
44 | ||
|
45 |
- problem_desc: |
|
45 | + problem_desc: desc |
|
46 | - submitted_at: "Submitted at" |
|
46 | + submission_id: Sub ID |
|
47 | - graded_at: "Graded at" |
|
47 | + submitted_at: Submitted |
|
48 | - score: "score: " |
|
48 | + graded_at: Graded |
|
|
49 | + score: score | ||
|
49 | cmp_msg: "compiler msg" |
|
50 | cmp_msg: "compiler msg" |
|
50 | src_link: "src" |
|
51 | src_link: "src" |
|
51 | submissions_link: "submissions" |
|
52 | submissions_link: "submissions" |
|
52 |
|
53 | ||
|
53 | confirm_contest_start: |
|
54 | confirm_contest_start: |
|
54 | box_title: "Contest confirmation" |
|
55 | box_title: "Contest confirmation" |
deleted file |
deleted file |
deleted file |
deleted file |
You need to be logged in to leave comments.
Login now