StudentQuiz: Student can view and attempt the questions that belong t… #459
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.
Hi @timhunt ,
I have resolved this ticket by updating the function
require_access_to_a_relevant_group
. After spending time investigating this issue, I realized that the functionrequire_access_to_a_relevant_group
only covers cases where the user doesn't have the current group and tries to access the student quiz with the group mode set to separate groups.However, in situations where the user has another group that does not belong to the valid group, this function does not handle it properly. Therefore, I believe it's necessary to update this function to address this scenario.
Regarding the use of
exit()
in this function, it makes it challenging to write unit tests for it when it always stop the code flow, so that I can't write Unite test for it.Commit ID: 4cbcd6d8b267e83f7ff29616fa2df3a08aeb0d94
I'd appreciate your feedback on my changes. Please let me know your thoughts. Thank you.