Description:
- change user_admin default action from list to index - remove duplicate button in grader control
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r588:8bdb0ec71018 - - 4 files changed: 21 inserted, 23 deleted

@@ -33,6 +33,7
33 33 @last_test_request = TestRequest.find(:first,
34 34 :order => 'created_at DESC')
35 35 @submission = Submission.order("id desc").limit(20)
36 + @backlog_submission = Submission.where('graded_at is null')
36 37 end
37 38
38 39 def clear
@@ -16,11 +16,6
16 16 :redirect_to => { :action => :list }
17 17
18 18 def index
19 - list
20 - render :action => 'list'
21 - end
22 -
23 - def list
24 19 @user_count = User.count
25 20 if params[:page] == 'all'
26 21 @users = User.all
@@ -1,6 +1,7
1 1 # Methods added to this helper will be available to all templates in the application.
2 2 module ApplicationHelper
3 3
4 + #new bootstrap header
4 5 def navbar_user_header
5 6 left_menu = ''
6 7 right_menu = ''
@@ -15,23 +15,6
15 15 =link_to 'Stop all running Graders', { action: 'stop_all'}, class: 'btn btn-default', method: 'post'
16 16 =link_to 'Clear all data', { action: 'clear_all'}, class: 'btn btn-default', method: 'post'
17 17
18 - .submitbox
19 - .item
20 - Grader control:
21 - .item
22 - = form_for :clear, :url => {:action => 'start_grading'} do |f|
23 - = submit_tag 'Start graders in grading env'
24 - .item
25 - = form_for :clear, :url => {:action => 'start_exam'} do |f|
26 - = submit_tag 'Start graders in exam env'
27 - .item
28 - = form_for :clear, :url => {:action => 'stop_all'} do |f|
29 - = submit_tag 'Stop all running graders'
30 - .item
31 - = form_for :clear, :url => {:action => 'clear_all'} do |f|
32 - = submit_tag 'Clear all data'
33 - %br{:style => 'clear:both'}/
34 -
35 18 .row
36 19 .col-md-6
37 20 - if @last_task
@@ -67,7 +50,6
67 50 %th Submitted
68 51 %th Graded
69 52 %th Result
70 - %th
71 53 %tbody
72 54 - @submission.each do |sub|
73 55 %tr.inactive
@@ -77,5 +59,24
77 59 %td= "#{time_ago_in_words(sub.submitted_at)} ago"
78 60 %td= sub.graded_at ? "#{time_ago_in_words(sub.graded_at)} ago" : " "
79 61 %td= sub.grader_comment
62 + %h2 Ungraded submission
63 + %table.table.table-striped.table-condensed
64 + %thead
65 + %th ID
66 + %th User
67 + %th Problem
68 + %th Submitted
69 + %th Graded
70 + %th Result
71 + %tbody
72 + - @backlog_submission.each do |sub|
73 + %tr.inactive
74 + %td= link_to sub.id, controller: 'graders' ,action: 'submission', id: sub.id
75 + %td= sub.try(:user).try(:full_name)
76 + %td= sub.try(:problem).try(:full_name)
77 + %td= "#{time_ago_in_words(sub.submitted_at)} ago"
78 + %td= sub.graded_at ? "#{time_ago_in_words(sub.graded_at)} ago" : " "
79 + %td= sub.grader_comment
80 80
81 81
82 +
You need to be logged in to leave comments. Login now