Skip to content
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

Add quiz recipients selector as Side Panel #12952

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

AlexVelezLl
Copy link
Member

@AlexVelezLl AlexVelezLl commented Dec 16, 2024

Summary

Add quiz recipients selector as Side Panel.

Compartir.pantalla.-.2024-12-17.10_59_21.mp4

References

Closes #12901.

Reviewer guidance

  • Create a new quiz and assign an entire class, groups or students.
  • Edit a created quiz and assig an entire class, groups or students.
  • Check error statuses.

@github-actions github-actions bot added APP: Coach Re: Coach App (lessons, quizzes, groups, reports, etc.) DEV: frontend labels Dec 16, 2024
@AlexVelezLl AlexVelezLl marked this pull request as ready for review December 17, 2024 15:54
@@ -0,0 +1,130 @@
<template>
Copy link
Member Author

@AlexVelezLl AlexVelezLl Dec 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just a refactor to break down the current IndividualLearnerSelector component to have an IndividualLearnerSelectorTable that we can reuse in the LearnersSelectorSidePanel. I havent edited the logic of this component, just extracted the table.

{{ $tr('selectGroupsAndIndividualLearnersTitle') }}
</h1>
</template>
<div style="padding-top: 30px">
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once #12895 is merged we will need to remove this div, as its adding a fixing-padding that wont be needed after #12895

display: flex;
justify-content: flex-end;
width: 100%;
margin-bottom: 16px;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once #12895 is merged we will need to remove this maring, as its adding a fixing-marging that wont be needed after #12895

Copy link
Member

@marcellamaki marcellamaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this looks really good @AlexVelezLl - I don't think I'll have time to do a second pass today (so it will be merged after the new year) but on initial read through overall the code changes make sense to me. I'd love for @pcenov to do some more robust QA especially since he is so good at finding those edge cases. If you can get to it tomorrow (Friday 20th) Peter, great, but no problem if it's not til after the holidays as well.

One small UI note - I'm not sure if this may be resolved after we merge your resource selection and sidepanel refactors PR, but the page content for a long learner list is cut off. All of the learners are visible, but because the pagination is covered by the bottom bar, it looks as if something might be "missing" (and presumably, if there were enough learners to paginate, this would prevent the user from being able to). If this will be fixed after rebasing that other PR, please disregard!

Screenshot 2024-12-19 at 12 58 54 PM after deleting the bottom bar element in the browser: Screenshot 2024-12-19 at 1 59 07 PM

@@ -11,6 +11,10 @@
{{ submitErrorMessage }}
</UiAlert>

<!--
TODO: Refactor or rename this component, setting a title or a description
is not part of an "assignment" process (?)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think calling it something more like "QuizTitleAndRecipientsHeader" would make more sense even if it's longer

@pageChanged="currentPageLearners = $event.items"
>
<template #default="{ items }">
<CoreTable
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is absolutely not required and not blocking, but just a thought, @AlexVelezLl - do you think that using the new KTable here would be difficult to refactor in? If it's going to add lots of work, we don't have to. I just wonder if there might be any a11y benefits and this is a moment when we could refactor it in "in the course of" rather than in separate work as tech debt tasks.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you could spend 30-60 minutes and see how it goes? If it seems like it would take a lot longer and introduce complexities, we don't have to do it now. If it seems like something you could do in a few hours, perhaps worth it (especially as the next couple of weeks will be quite)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For sure! I can give it a try and see how it goes :).

{
label: this.$tr('copyQuizAction'),
value: 'COPY',
},
{ label: this.coreString('deleteAction'), value: 'DELETE' },
];
if (!this.exam?.archive) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this just because the archive key would exist so we can use that instead of the draft prop? If so, how is that distinct from this.exam?.draft that we are using below for the label condition?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh no, there are three different "states". exam in draft, exam "active"(once the exam is published) and exam closed. The this.exam?.archive represents that the exam was closed. So when the exam is "not archived", it can be either in draft or not.

@AlexVelezLl
Copy link
Member Author

AlexVelezLl commented Dec 19, 2024

Thanks @marcellamaki. Yes! The issue with the hidden pagination buttons will be fixed once #12895 is merged too :).

@AlexVelezLl AlexVelezLl force-pushed the quiz-assignment-side-panel branch from bb801dd to ef6d377 Compare December 19, 2024 20:24
@pcenov
Copy link
Member

pcenov commented Dec 20, 2024

Hi @AlexVelezLl and @marcellamaki, just some comments/points for discussion:

  1. Why are we introducing the "All Ungrouped Learners" label? Previously we had "Individual learners" and it's still in use in Coach > Lessons. If we decide to use the new label, then the capitalization should be corrected, so that it's changed to "All ungrouped learners", but also we will have to use the same label at Coach > Lessons for consistency.

2024-12-20_14-14-40

  1. With the current implementation of the "All ungrouped learners" checkbox it's duplicating the function of the "Select all on page" checkbox in the '"Individual learners table. Previously selecting the "Individual learners" button resulted in actually showing the "Individual learners" table while now it's constantly shown. So again the question is - will that be implemented in the same way in Coach > Lessons and is that the correct implementation?
select.all.mp4

Also when there aren't any learners yet the checkbox "All ungrouped learners" is selected by default and cannot be deselected:

selected by default

  1. Introducing validation here is also a bit problematic, because currently I can create and assign a quiz to the entire class when there's not a single learner enrolled in that class, I can also assign the quiz to an empty group but if I select the "Groups and individual learners" radio button and don't select learners then I am seeing the validation. It even let's me "save" the side panel selection without any users selected:
validation.mp4

@pcenov
Copy link
Member

pcenov commented Dec 20, 2024

Also we probably should have the same implementation when copying a quiz, as currently it's not changed there:

copy.quiz.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
APP: Coach Re: Coach App (lessons, quizzes, groups, reports, etc.) DEV: frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update quiz assignment workflow to use side panel UI
3 participants