Skip to content

Commit

Permalink
Merge pull request #247 from autolab/hotfix_feedback_issue
Browse files Browse the repository at this point in the history
Fixed the loop that traverses live jobs
  • Loading branch information
Yiming Zong committed Feb 4, 2015
2 parents b6b877a + c4e0aaf commit 275e615
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/controllers/assessment/autograde.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def autogradeAfterHandin(submission)
flash[:error] = "There was an error (#{job}) submitting your autograding job. " +
"Please contact your instructor."
else
link = "<a href=\"#{url_for(:controller=>'jobs')}\">Job ID = #{job}</a>"
link = "<a href=\"#{url_for(:controller=>"jobs", :action=>"getjob", :id=>job)}\">Job ID = #{job}</a>"
flash[:success] = ("Submitted file #{@submission.filename} (#{link}) for autograding." +
" Refresh the page to see the results.").html_safe
end
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/jobs_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ def getjob
is_live = false
if raw_live_jobs and raw_dead_jobs then
for item in raw_live_jobs do
if item[:id] == job_id then
if item["id"] == job_id then
rjob = item
is_live = true
break
end
end
if not rjob then
if rjob.nil? then
for item in raw_dead_jobs do
if item["id"] == job_id then
rjob = item
Expand Down

0 comments on commit 275e615

Please sign in to comment.