-
Notifications
You must be signed in to change notification settings - Fork 727
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
Update preview plan quiz #12685
Update preview plan quiz #12685
Changes from 8 commits
41e0ac3
950f81a
a535618
35f1795
6ebe48a
b117f6a
a51769c
d915ea2
13aa97b
a006f88
4998b30
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ | |
/> | ||
</h1> | ||
<StatusElapsedTime | ||
v-if="examOrLesson !== 'exam'" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is curiosity, not a leading question -- I can't quite figure out why this change is needed just from reading the diff. I can see that this component (the file There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh the thing is that we use this But as this header component was also being used for lessons, and we dont have yet the creation time in the |
||
v-show="!$isPrint" | ||
:date="createdDate" | ||
actionType="created" | ||
|
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 handler, in a very not-straightforward way, is working in some cases, but causing a 500 error when you open a quiz that has not yet been started. Another function within the handler is dispatching
questionList/setItemStats
, which is assuming thatQuizDifficulties
(aka "Difficult Questions") exists.One way to go might be to updates the
setItemsStats
action, to me that seems as though it would be simpler to conditionalize that, rather that to recreate a similar action to build state for draft quizzes. It also seems to only be called in that one function (showQuestionListView
), so I think there would be minimal chance of regression.@rtibbles any thoughts here re: coach handlers/state management that I'm not thinking of?
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 guess the main thing is that for a draft quiz, we will get 500s because things are missing. We should update the API endpoint that is returning a 500, to instead return a 404 when the quiz is only a draft, and then make the handler handle the 404 gracefully (or just not even try it if it already knows the quiz is a draft).
More generally, most of the reports stuff is inapplicable when a quiz is still a draft, so we may need to utilize empty states here well too, and disabling tabs when not applicable?
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.
From the code read through, I think there are already updates in the UI for empty state when not applicable, but the data is still being fetched (or, trying to be and erroring)
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.
The problem is also with the handler, I havent looked in deph all that it was doing, but it was fetching de exam and the resources again, but we dont need this, as we already do this in the fetchQuizSummaryPageData. So I will better remove this handler for this route and handle this within the fetchQuizSummaryPage function, and conditionally fetch the difficult questions if the exam is not a draft.
Yes, we currently have a condition to not show the tab if the quiz is a draft: https://github.com/AlexVelezLl/kolibri/blob/d915ea27c67992f6a9c290f618bffaa004f33e52/kolibri/plugins/coach/assets/src/views/plan/QuizSummaryPage/index.vue#L204