You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Steps To Reproduce
Add a parseAutoresult hook to the lab's config file that returns a score hash that differs from what would be obtained from a simple JSON.parse.
This can be achieved by replacing parseScore with something like
defgetScores(scores)score_hash=scores.map{ |s|
[s.problem.name,s.score]}.to_hif@jsonFeedback&.key?("_scores_order") == false@jsonFeedback["_scores_order"]=score_hash.keysend@total=0score_hash.keys.eachdo |k|
@total += score_hash[k].to_frescueNoMethodErrorflash.now[:error] ||= ""flash.now[:error] += "The score for #{k} could not be parsed.<br>"flash.now[:html_safe]=trueendscore_hash["_total"]=@totalscore_hashend
and calling @scoreHash = getScores @submission.scores.includes(:problem)
However, there is currently a distinction between autograded scores and "manual" scores, where the sidebar displays differently for manually graded scores. If we want to maintain this distinction, we should check the grader_id and only set @scoreHash if it is not 0.
Steps To Reproduce
Add a
parseAutoresult
hook to the lab's config file that returns a score hash that differs from what would be obtained from a simpleJSON.parse
.For example,
Current behavior
viewFeedback page shows scores based on score JSON
Expected behavior
viewFeedback page shows the final scores (after any hooks)
The text was updated successfully, but these errors were encountered: