Skip to content

Commit 275e615

Browse files
author
Yiming Zong
committed
Merge pull request #247 from autolab/hotfix_feedback_issue
Fixed the loop that traverses live jobs
2 parents b6b877a + c4e0aaf commit 275e615

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/controllers/assessment/autograde.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def autogradeAfterHandin(submission)
3232
flash[:error] = "There was an error (#{job}) submitting your autograding job. " +
3333
"Please contact your instructor."
3434
else
35-
link = "<a href=\"#{url_for(:controller=>'jobs')}\">Job ID = #{job}</a>"
35+
link = "<a href=\"#{url_for(:controller=>"jobs", :action=>"getjob", :id=>job)}\">Job ID = #{job}</a>"
3636
flash[:success] = ("Submitted file #{@submission.filename} (#{link}) for autograding." +
3737
" Refresh the page to see the results.").html_safe
3838
end

app/controllers/jobs_controller.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,13 @@ def getjob
9595
is_live = false
9696
if raw_live_jobs and raw_dead_jobs then
9797
for item in raw_live_jobs do
98-
if item[:id] == job_id then
98+
if item["id"] == job_id then
9999
rjob = item
100100
is_live = true
101101
break
102102
end
103103
end
104-
if not rjob then
104+
if rjob.nil? then
105105
for item in raw_dead_jobs do
106106
if item["id"] == job_id then
107107
rjob = item

0 commit comments

Comments
 (0)