Description:
redact user name on view submission
Commit status:
[Not Reviewed]
References:
merge algo
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r848:057622a7b534 - - 3 files changed: 24 inserted, 18 deleted

@@ -23,8 +23,10
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 - if submission.graded_at
25 - if submission.graded_at
26 - %button.btn.btn-info.btn-xs{type: 'button', data: {toggle: 'modal', target: '#compiler'}}
26 + = link_to "#{t 'main.cmp_msg'}", compiler_msg_submission_path(submission), {popup: true,remote: true,class: 'btn btn-xs btn-info'}
27 - =t 'main.cmp_msg'
27 + -#
28 + %button.btn.btn-info.btn-xs{type: 'button', data: {toggle: 'modal', target: '#compiler'}}
29 + =t 'main.cmp_msg'
28 = link_to "#{t 'main.src_link'}", download_submission_path(submission.id), class: 'btn btn-xs btn-info'
30 = link_to "#{t 'main.src_link'}", download_submission_path(submission.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'
31 = link_to "#{t 'main.submissions_link'}", problem_submissions_path(problem_id), class: 'btn btn-xs btn-info'
30
32
@@ -48,18 +48,19
48 = render :partial => 'submission_short',
48 = render :partial => 'submission_short',
49 :locals => {submission: @submission, problem_name: @problem.name, problem_id: @problem.id }
49 :locals => {submission: @submission, problem_name: @problem.name, problem_id: @problem.id }
50
50
51 - - if @submission
51 + .modal.fade#compiler{tabindex: -1,role: 'dialog'}
52 - .modal.fade#compiler{tabindex: -1,role: 'dialog'}
52 + .modal-dialog.modal-lg{role:'document'}
53 - .modal-dialog.modal-lg{role:'document'}
53 + .modal-content
54 - .modal-content
54 + .modal-header
55 - .modal-header
55 + %button.close{type: 'button', data: {dismissed: :modal}, aria: {label: 'close'}}
56 - %button.close{type: 'button', data: {dismissed: :modal}, aria: {label: 'close'}}
56 + %span{aria: {hidden: 'true'}, data: {dismiss: 'modal'}} ×
57 - %span{aria: {hidden: 'true'}, data: {dismiss: 'modal'}} ×
57 + %h4 Compiler message
58 - %h4 Compiler message
58 + .modal-body
59 - .modal-body
59 + %pre#compiler_msg
60 - %pre#compiler_msg= @submission.compiler_message
60 + - if @submission
61 - .modal-footer
61 + = @submission.compiler_message
62 - %button.btn.btn-default{type: 'button', data: {dismiss: 'modal'}} Close
62 + .modal-footer
63 + %button.btn.btn-default{type: 'button', data: {dismiss: 'modal'}} Close
63
64
64 :javascript
65 :javascript
65 $(document).ready(function() {
66 $(document).ready(function() {
@@ -30,11 +30,14
30 %td.text-right
30 %td.text-right
31 %strong User
31 %strong User
32 %td
32 %td
33 - - if @submission.user
33 + - if @current_user.admin? ||@current_user == @submission.user
34 - = link_to "#{@submission.user.login}", stat_user_path(@submission.user)
34 + - if @submission.user
35 - = @submission.user.full_name
35 + = link_to "#{@submission.user.login}", stat_user_path(@submission.user)
36 + = @submission.user.full_name
37 + - else
38 + = "(n/a)"
36 - else
39 - else
37 - = "(n/a)"
40 + = '-- REDACTED --'
38 %tr
41 %tr
39 %td.text-right
42 %td.text-right
40 %strong Task
43 %strong Task
You need to be logged in to leave comments. Login now