Show More
Commit Description:
fig bugs in login report
Commit Description:
fig bugs in login report
File last commit:
Show/Diff file:
Action:
app/controllers/graders_controller.rb | 86 lines | 2.2 KiB | text/x-ruby | RubyLexer |
jittat
started grader_process...
r29 class GradersController < ApplicationController
jittat
add grader list...
r32
change depricated before_filter to before_action
r745 before_action :admin_authorization
jittat
[web] updated grader monitoring...
r105
def index
redirect_to :action => 'list'
end
jittat
add grader list...
r32
def list
jittat
updated grader list page...
r175 @grader_processes = GraderProcess.find_running_graders
jittat
add grader list...
r32 @stalled_processes = GraderProcess.find_stalled_process
jittat
updated grader list page...
r175
@terminated_processes = GraderProcess.find_terminated_graders
jittat
[web] more info on grader queues...
r127
change find(:xxx) to correct syntax for rails 4
r619 @last_task = Task.last
@last_test_request = TestRequest.last
add last 20 submissions status
r461 @submission = Submission.order("id desc").limit(20)
- change user_admin default action from list to index...
r588 @backlog_submission = Submission.where('graded_at is null')
jittat
add grader list...
r32 end
def clear
grader_proc = GraderProcess.find(params[:id])
grader_proc.destroy if grader_proc!=nil
redirect_to :action => 'list'
end
jittat
updated grader list page...
r175 def clear_terminated
GraderProcess.find_terminated_graders.each do |p|
p.destroy
end
redirect_to :action => 'list'
end
jittat
[web] updated grader monitoring...
r105 def clear_all
change find(:xxx) to correct syntax for rails 4
r619 GraderProcess.all.each do |p|
jittat
[web] updated grader monitoring...
r105 p.destroy
end
redirect_to :action => 'list'
end
def view
if params[:type]=='Task'
redirect_to :action => 'task', :id => params[:id]
else
redirect_to :action => 'test_request', :id => params[:id]
end
end
def test_request
@test_request = TestRequest.find(params[:id])
end
def task
@task = Task.find(params[:id])
end
jittat
added first grader script calls from web (to stop grader)...
r202 # various grader controls
def stop
grader_proc = GraderProcess.find(params[:id])
jittat
added more grader control...
r203 GraderScript.stop_grader(grader_proc.pid)
flash[:notice] = 'Grader stopped. It may not disappear now, but it should disappear shortly.'
redirect_to :action => 'list'
end
def stop_all
GraderScript.stop_graders(GraderProcess.find_running_graders +
GraderProcess.find_stalled_process)
flash[:notice] = 'Graders stopped. They may not disappear now, but they should disappear shortly.'
jittat
added first grader script calls from web (to stop grader)...
r202 redirect_to :action => 'list'
end
jittat
added more grader control...
r203 def start_grading
GraderScript.start_grader('grading')
flash[:notice] = '2 graders in grading env started, one for grading queue tasks, another for grading test request'
redirect_to :action => 'list'
end
jittat
added first grader script calls from web (to stop grader)...
r202
jittat
added more grader control...
r203 def start_exam
GraderScript.start_grader('exam')
flash[:notice] = '2 graders in grading env started, one for grading queue tasks, another for grading test request'
redirect_to :action => 'list'
jittat
added first grader script calls from web (to stop grader)...
r202 end
jittat
started grader_process...
r29 end