-
Notifications
You must be signed in to change notification settings - Fork 245
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
Bugfix: allow annotations on parent assignments with released peer reviews #7222
Bugfix: allow annotations on parent assignments with released peer reviews #7222
Conversation
Pull Request Test Coverage Report for Build 11016940797Details
💛 - Coveralls |
app/models/annotation.rb
Outdated
@@ -72,6 +72,8 @@ def check_if_released | |||
|
|||
return if result.is_a_review? && !result.released_to_students | |||
|
|||
return if result.submission.non_pr_results.where('results.released_to_students': true).empty? |
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.
I'm not convinced another check is necessary. Can't we modify line 65 to use non_pr_results
?
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.
@david-yz-liu Thanks! I think you are correct, and in fact this logic is better.
Proposed Changes
(Describe your changes here. Also describe the motivation for your changes: what problem do they solve, or how do they improve the application or codebase? If this pull request fixes an open issue, use a keyword to link this pull request to the issue.)
Currently, if a submission has a released peer review, the annotation validations prevent adding new annotations on the result in the parent assignment. This is a bug, which this PR fixes. Resolves #7184
...
Screenshots of your changes (if applicable)
Associated documentation repository pull request (if applicable)
Type of Change
(Write an
X
or a brief description next to the type or types that best describe your changes.)Checklist
(Complete each of the following items for your pull request. Indicate that you have completed an item by changing the
[ ]
into a[x]
in the raw text, or by clicking on the checkbox in the rendered description on GitHub.)Before opening your pull request:
After opening your pull request:
Questions and Comments
(Include any questions or comments you have regarding your changes.)