feat: add assignment type count warning #32068
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a message warning when the number of counted assignment types within a course don't match with the number defined in the grading config. I also added a corresponding message when the number of assignments matches the defined number.
Example Flow #1:An assignment type has one assignment and is defined as having one assignment. It has the corresponding success message (image one). We edit the total number from 1 to 3 (image two). After clicking save, the message is updated to reflect that the number of assignments no longer matches (image three)Example Flow #2:An assignment type has a mismatch of numbers and has the message informing the course author that the numbers do not match. (image 1) we edit the name to "homeworkedited". A non-blocking error message informs us that we will need to change the assignment types of all "homework" assignments in order for grading to work correctly. (image 2) after saving, the warning now states that there are no "homeworkedited" assignments defined in the courseExample flow #3:A user creates a new assignment type. No message, success or otherwise, is displayed when the type is first created (image 1) We put in the assignment type info (image 2) and then after we save we recieve the message that there are no corresponding assignments (image 3)