Correctly display orphaned annotations on viewFeedback page#1658
Conversation
|
I would suggest making the following simple change to allow orphaned annotations to be deleted (and also edited, to change the problem): Add the lines # Associated problem was deleted
return if score.problem_id && score.problem.nil?inside We check for |
damianhxy
left a comment
There was a problem hiding this comment.
Verified that course assistants and instructors can now see annotations even when the problem is not released.
Also verified that orphaned annotations show up under Deleted Problem(s).
|
For consistency, could you also update function getProblemNameWithId(problem_id) {
var problem_id = parseInt(problem_id, 10);
var problem = _.findWhere(problems, { "id": problem_id });
if (problem == undefined) return "Deleted Problem(s)";
return problem.name;
} |
…tency, allow orphaned annotations to be deleted
….com/autolab/Autolab into bugfix/viewFeedback-orphaned-problem
|
lgtm! |


Description
Previously, if you add an annotation for a problem, delete the problem, and go view feedback, there was an error caused by calling
problem.name.If the problem is nil, the header is updated to say "Deleted Problem(s)", to match how orphaned problems are handled in #1629.

The issue of annotations for deleted problems was fixed by #1629, but this prevents an error on the view feedback page for pages where a problem was deleted before the patch was implemented.
Also updated check so that instructors & course assistants can view annotations even if they're not released.
How Has This Been Tested?
Types of changes
Checklist:
overcommit --install && overcommit --signto use pre-commit hook for linting