Description:
fix compiler message
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r742:4c1b44c35caf - - 2 files changed: 15 inserted, 1 deleted
@@ -1,28 +1,30 | |||||
|
1 | - if submission.nil? |
|
1 | - if submission.nil? |
|
2 | = "-" |
|
2 | = "-" |
|
3 | - else |
|
3 | - else |
|
4 | %strong= "Submission ID:" |
|
4 | %strong= "Submission ID:" |
|
5 | = submission.id |
|
5 | = submission.id |
|
6 | %br |
|
6 | %br |
|
7 | - unless submission.graded_at |
|
7 | - unless submission.graded_at |
|
8 | %strong= t 'main.submitted_at:' |
|
8 | %strong= t 'main.submitted_at:' |
|
9 | = format_full_time_ago(submission.submitted_at.localtime) |
|
9 | = format_full_time_ago(submission.submitted_at.localtime) |
|
10 | - else |
|
10 | - else |
|
11 | %strong= t 'main.graded_at:' |
|
11 | %strong= t 'main.graded_at:' |
|
12 | = format_full_time_ago(submission.graded_at.localtime) |
|
12 | = format_full_time_ago(submission.graded_at.localtime) |
|
13 | %br |
|
13 | %br |
|
14 | - if GraderConfiguration['ui.show_score'] |
|
14 | - if GraderConfiguration['ui.show_score'] |
|
15 | %strong=t 'main.score' |
|
15 | %strong=t 'main.score' |
|
16 | = "#{(submission.points*100/submission.problem.full_score).to_i} " |
|
16 | = "#{(submission.points*100/submission.problem.full_score).to_i} " |
|
17 | = " [" |
|
17 | = " [" |
|
18 | %tt |
|
18 | %tt |
|
19 | = submission.grader_comment |
|
19 | = submission.grader_comment |
|
20 | = "]" |
|
20 | = "]" |
|
21 | %br |
|
21 | %br |
|
22 | %strong View: |
|
22 | %strong View: |
|
23 | - if GraderConfiguration.show_grading_result |
|
23 | - if GraderConfiguration.show_grading_result |
|
24 | = link_to '[detailed result]', :action => 'result', :id => submission.id |
|
24 | = link_to '[detailed result]', :action => 'result', :id => submission.id |
|
25 | - = link_to "#{t 'main.cmp_msg'}", {:action => 'compiler_msg', :id => submission.id}, {popup: true,class: 'btn btn-xs btn-info'} if submission.graded_at |
|
25 | + - if submission.graded_at |
|
|
26 | + %button.btn.btn-info.btn-xs{type: 'button', data: {toggle: 'modal', target: '#compiler'}} | ||
|
|
27 | + =t 'main.cmp_msg' | ||
|
26 | = link_to "#{t 'main.src_link'}", download_submission_path(submission.id), class: 'btn btn-xs btn-info' |
|
28 | = link_to "#{t 'main.src_link'}", download_submission_path(submission.id), class: 'btn btn-xs btn-info' |
|
27 | = link_to "#{t 'main.submissions_link'}", problem_submissions_path(problem_id), class: 'btn btn-xs btn-info' |
|
29 | = link_to "#{t 'main.submissions_link'}", problem_submissions_path(problem_id), class: 'btn btn-xs btn-info' |
|
28 |
|
30 |
@@ -30,48 +30,60 | |||||
|
30 | .input-group |
|
30 | .input-group |
|
31 | %span.input-group-btn |
|
31 | %span.input-group-btn |
|
32 | %span.btn.btn-default.btn-file |
|
32 | %span.btn.btn-default.btn-file |
|
33 | Browse |
|
33 | Browse |
|
34 | = file_field_tag 'load_file' |
|
34 | = file_field_tag 'load_file' |
|
35 | = text_field_tag '' , nil, {readonly: true, class: 'form-control'} |
|
35 | = text_field_tag '' , nil, {readonly: true, class: 'form-control'} |
|
36 | .form-group |
|
36 | .form-group |
|
37 | = submit_tag 'Submit', class: 'btn btn-success', id: 'live_submit', |
|
37 | = submit_tag 'Submit', class: 'btn btn-success', id: 'live_submit', |
|
38 | data: {confirm: "Submitting this source code for task #{@problem.long_name}?"} |
|
38 | data: {confirm: "Submitting this source code for task #{@problem.long_name}?"} |
|
39 | - # latest submission status |
|
39 | - # latest submission status |
|
40 | .panel{class: (@submission && @submission.graded_at) ? "panel-info" : "panel-warning"} |
|
40 | .panel{class: (@submission && @submission.graded_at) ? "panel-info" : "panel-warning"} |
|
41 | .panel-heading |
|
41 | .panel-heading |
|
42 | Latest Submission Status |
|
42 | Latest Submission Status |
|
43 | = link_to "Refresh",get_latest_submission_status_submissions_path(@submission.user,@problem), class: "btn btn-default btn-sm", remote: true if @submission |
|
43 | = link_to "Refresh",get_latest_submission_status_submissions_path(@submission.user,@problem), class: "btn btn-default btn-sm", remote: true if @submission |
|
44 | .panel-body |
|
44 | .panel-body |
|
45 | %div#latest_status |
|
45 | %div#latest_status |
|
46 | - if @submission |
|
46 | - if @submission |
|
47 | = render :partial => 'submission_short', |
|
47 | = render :partial => 'submission_short', |
|
48 | :locals => {submission: @submission, problem_name: @problem.name, problem_id: @problem.id } |
|
48 | :locals => {submission: @submission, problem_name: @problem.name, problem_id: @problem.id } |
|
49 | .row |
|
49 | .row |
|
50 | .col-md-12 |
|
50 | .col-md-12 |
|
51 | %h2 Console |
|
51 | %h2 Console |
|
52 | %textarea#console{style: 'height: 100%; width: 100%;background-color:#000;color:#fff;font-family: consolas, monaco, "Droid Sans Mono";',rows: 20} |
|
52 | %textarea#console{style: 'height: 100%; width: 100%;background-color:#000;color:#fff;font-family: consolas, monaco, "Droid Sans Mono";',rows: 20} |
|
53 |
|
53 | ||
|
|
54 | + .modal.fade#compiler{tabindex: -1,role: 'dialog'} | ||
|
|
55 | + .modal-dialog.modal-lg{role:'document'} | ||
|
|
56 | + .modal-content | ||
|
|
57 | + .modal-header | ||
|
|
58 | + %button.close{type: 'button', data: {dismissed: :modal}, aria: {label: 'close'}} | ||
|
|
59 | + %span{aria: {hidden: 'true'}, data: {dismiss: 'modal'}} × | ||
|
|
60 | + %h4 Compiler message | ||
|
|
61 | + .modal-body | ||
|
|
62 | + %pre#compiler_msg= @submission.compiler_message | ||
|
|
63 | + .modal-footer | ||
|
|
64 | + %button.btn.btn-default{type: 'button', data: {dismiss: 'modal'}} Close | ||
|
|
65 | + | ||
|
54 | :javascript |
|
66 | :javascript |
|
55 | $(document).ready(function() { |
|
67 | $(document).ready(function() { |
|
56 | e = ace.edit("editor") |
|
68 | e = ace.edit("editor") |
|
57 | e.setValue($("#text_sourcecode").val()); |
|
69 | e.setValue($("#text_sourcecode").val()); |
|
58 | e.gotoLine(1); |
|
70 | e.gotoLine(1); |
|
59 | $("#language_id").trigger('change'); |
|
71 | $("#language_id").trigger('change'); |
|
60 |
|
72 | ||
|
61 | $("#load_file").on('change',function(evt) { |
|
73 | $("#load_file").on('change',function(evt) { |
|
62 | var file = evt.target.files[0]; |
|
74 | var file = evt.target.files[0]; |
|
63 | var reader = new FileReader(); |
|
75 | var reader = new FileReader(); |
|
64 | reader.onload = function(theFile) { |
|
76 | reader.onload = function(theFile) { |
|
65 | var e = ace.edit("editor") |
|
77 | var e = ace.edit("editor") |
|
66 | e.setValue(theFile.target.result); |
|
78 | e.setValue(theFile.target.result); |
|
67 | e.gotoLine(1); |
|
79 | e.gotoLine(1); |
|
68 | }; |
|
80 | }; |
|
69 | reader.readAsText(file) |
|
81 | reader.readAsText(file) |
|
70 | }); |
|
82 | }); |
|
71 |
|
83 | ||
|
72 | //brython(); |
|
84 | //brython(); |
|
73 | }); |
|
85 | }); |
|
74 |
|
86 | ||
|
75 |
|
87 | ||
|
76 |
|
88 | ||
|
77 |
|
89 |
You need to be logged in to leave comments.
Login now