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
Show teacher's questions only when using category questions #4148
Conversation
assets/blocks/quiz/category-question-block/category-question-settings.js
Show resolved
Hide resolved
I wonder if it's a legit use case that teachers want to share questions with each other. It works currently, right? Would it be safer to keep allowing it by default, and have the filter (or possibly a setting) to disable it? |
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.
Tested this and it works really well! I also tried switching to this branch when the learner has a saved quiz but hasn't submitted it and it doesn't remove the questions (which is good, I think).
One tiny doc change and then I'm ready to approve.
@yscik Before teachers weren't allowed to add category questions (just if an admin transferred an admin course to a teacher). I think it is safer to assume not so other teacher's questions don't start appearing on their quizzes.
Co-authored-by: Jake Oehler Morrison <jake.morrison@automattic.com>
@yscik just wanted to add that I think that the main issue with the current way this works is that while questions belonging to another teacher can be included in the quiz, the quiz owner cannot access these questions in admin. |
Overview
In the quiz editor, when a category question was added, all questions were included regardless if they belong to the teacher or not. With this change this is now fixed.
Changes proposed in this Pull Request
sensei_filter_category_questions_by_author
to restore the previous behaviour.Testing instructions
New Filter
sensei_filter_category_questions_by_author
- Whether category questions should be filtered by author.Deprecated Functions
Sensei_Frontend::sensei_get_user_quiz_answers
- UseSensei_Quiz::get_user_answers
instead.Sensei_Quiz::stop_quiz_questions_loop
- No replacement.