-
Notifications
You must be signed in to change notification settings - Fork 745
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
Quiz creation: Question replacement & a bevy of misc fixes and polish #11937
Quiz creation: Question replacement & a bevy of misc fixes and polish #11937
Conversation
Hi @nucleogenesis the following issues from above are still not fixed:
Expand-collapse-both-enabled.mp4
Current.section.is.not.selected.mp4
No.prompt.mp4Also now I can't delete the last remaining question in a section, so I can 't fully retest the issue "Section settings - Once I delete all the questions I can't add them again as the 'Save changes' button remains disabled": 1.Can.t.delete.all.questions.mp4New issues noticed:
Can.t.preview.questions.after.having.replaced.them.mp4
Clicking.outside.the.modal.mp4 |
Thank you @pcenov , listing each issue noted: Previous issues
New issues
|
The test here was previously accounting for a possibility where the same resource from a different channel was being used -- however, we only select questions now by using a fully unique ID combining the exercise_id:question_id so this test is no longer needed
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.
More than just being neater, I think there is an actual bug in the updates to the learn viewset.
Some tests of the useQuizCreation updates for the synthetic id generation would be helpful. I am also not seeing where we are stripping out those ideas before sending the data to the backend, but maybe that was already happening and I'm not seeing in it in a more restricted diff.
const { question_count } = updates; | ||
if (question_count) { | ||
if (question_count < (targetSection.question_count || 0)) { | ||
// Make sure all questions in the an updated pool have proper unique IDs |
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.
Possible additional refactoring in the future - the resource pool and questions could maybe be factored out into separate functions, that are both called from this one?
for exam in exams: | ||
exam_node_ids |= { |
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 mentioned this on slack, but this diff would be simpler:
from kolibri.core.exam.models import exam_assignment_lookup
then here:
exam_node_ids |= {
exercise_id for exercise_id, _ in exam_assignment_lookup(exam.get("question_sources", []))
}
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.
Aye I hadn't considered that exam_assignment_lookup
handles the backward compatibility for us , thanks!
kolibri/plugins/learn/viewsets.py
Outdated
@@ -218,7 +234,7 @@ def consolidate(self, items, queryset): | |||
} | |||
exam["missing_resource"] = any( | |||
question["exercise_id"] not in available_exam_ids | |||
for question in exam.get("question_sources") | |||
for question in (section_questions or exam.get("question_sources")) |
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.
and here:
for question, _ in exam_assignment_lookup(exam.get("question_sources", [])
This is better, because currently the section_questions
will be collecting all questions from every exam, so this will mean that if any quiz has missing resources, then all quizzes will be marked as having missing resources (because section_questions will always be all of the questions from every exam).
this was kind of a pain to work out, ultimately, the method to select random questions needed to take a parameter for the resource_pool it will select from. this implementation results in a massive updateSection method. an ideal alternative would probably involve changes to the API overall, which would require a moderate refactor but would also likely result in a much cleaner interface
Hi @nucleogenesis, here are the latest findings of my testing which I'll just list again for you to sort out other whether they will be addressed here or as follow-ups: Questions replacement/deletion/order:
replace.-.no.preview.mp4
replaced.question.s.position.mp4
selected.question.mp4
randomized.mp4Other general issues:
no.title.no.questions.mp4
Number.of.questions.mp4
section.order.mp4 |
Thanks @nucleogenesis - I can confirm that in the latest build I can see the preview of the replacement questions but only if the questions in the 'Question list' are not expanded and if I am opening the preview separately for each question - in any case it's best for us to wait for the Perseus bug to be fixed to fully test the preview: preview.mp4 |
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.
Just one last possible thing that I think might bite us.
kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/ReplaceQuestions.vue
Outdated
Show resolved
Hide resolved
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.
This looks good to me - still some cleanup to do, but have been filed in follow up issues.
Summary
References
Closes #11017
Closes #11013
Closes #11015
Closes #4708
Closes #4766
This directly impacts the following Product Issues - I hope that this can close them @radinamatic so please let me know your thoughts. I'll be going through them to make sure they're up-to-date with design decisions
Reviewer guidance
Known issues
_I will be preparing some follow-up issues for the items below. Sorry to disappoint re: the keyboard navigation @radinamatic 😭 but we'll get it worked out 💪🏻 _
Cannot navigate between the Section Tabs by way of keyboard due to [issue to be created soon]FIXEDQA Review
There are no gherkins yet for this version of the feature, so I suspect that walking through all possible paths is the best way to go. The issues in the 10xxx range are feature-level issues.
I think that maybe I can lay out some potential variables that you can test combinations of to ensure things work as expected. I hope that this, in combination with the issues above, can serve as a guide of what to test.
Content on device
Side panel
Snackbars
Content selection
tigil-fajod
for a channel that has one folder with enough exercises to trigger our lazy loadingAdd, Replace, Sort questions
Testing checklist
PR process
Reviewer checklist
yarn
andpip
)