-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 --sign
to use pre-commit hook for linting