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

Display badge indicating when a student dropped an assignment #6898

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

acelaya
Copy link
Contributor

@acelaya acelaya commented Dec 4, 2024

Depends on #6871

This PR adds a drop badge next to student names, if they have been marked as not active.

This property will be relevant only when the list of students comes from an LMS roster, but the BE will consistently return it as true for all students when the list is generated from launches.

image

The badge applies to unknown users as well.

image

Note

At the moment of creating this PR, designs show a tooltip with the date in which a student dropped the assignment, but the BE does not expose that yet. Because of that, the tooltip is not addressed here.

Improvements

Some future improvements that might make sense but are out of this PR scope, since they have not been aligned.

  1. Use a lighter/italic/smaller font size for students that dropped the assignment.
  2. Put all students that dropped the assignment at the end of the list.
  3. Allow to sort list based on the fact that students dropped the assignment or not.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Extracted from GradeIndicator, to reuse in other places.

@acelaya acelaya force-pushed the roster-student-drop branch 2 times, most recently from b0ca281 to dfaced7 Compare December 4, 2024 13:04
@acelaya acelaya marked this pull request as ready for review December 4, 2024 13:05
@acelaya
Copy link
Contributor Author

acelaya commented Dec 4, 2024

@marcospri I added you as reviewer mostly for awareness. No need to do an actual code review unless you want to.

@acelaya acelaya force-pushed the roster-student-drop branch from dfaced7 to 38dc4ce Compare December 4, 2024 13:13
@marcospri
Copy link
Member

We have to exclude drop students from the ones we try to sync the grade for.

We could do that on the BE, just don't attempt to sync those but I wonder if driving that from the FE would make things simpler.

If the BE makes the decisions, does it just exclude from the sync? Include it but mark it as an early failure?

In any case this is outside the scope of this PR, created an issue about it on the board.

@acelaya
Copy link
Contributor Author

acelaya commented Dec 4, 2024

We have to exclude drop students from the ones we try to sync the grade for.

We could do that on the BE, just don't attempt to sync those but I wonder if driving that from the FE would make things simpler.

If the BE makes the decisions, does it just exclude from the sync? Include it but mark it as an early failure?

Good point! I think it makes sense to filter them out in the FE, as that's how the whole thing is designed.

In any case this is outside the scope of this PR, created an issue about it on the board.

Is it? I could include it here.

@acelaya acelaya force-pushed the roster-student-drop branch from 38dc4ce to 4813a77 Compare December 4, 2024 15:51
@acelaya
Copy link
Contributor Author

acelaya commented Dec 4, 2024

We have to exclude drop students from the ones we try to sync the grade for.

We could do that on the BE, just don't attempt to sync those but I wonder if driving that from the FE would make things simpler.

If the BE makes the decisions, does it just exclude from the sync? Include it but mark it as an early failure?

In any case this is outside the scope of this PR, created an issue about it on the board.

I have included the logic to not sync users that dropped the assignment. The change was quite simple.

@@ -150,7 +154,8 @@ export default function AssignmentActivity() {

return students.data.students
.filter(
({ auto_grading_grade }) =>
({ auto_grading_grade, active }) =>
active &&
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Inactive users should not sync their grades.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, it does look simple, nice 👍

@robertknight
Copy link
Member

At the moment of creating this PR, designs show this badge in the grade column, not the student one.

This note looks out of date judging by the screenshot. Can you revise the description to reflect any other changes I should know about.

@acelaya
Copy link
Contributor Author

acelaya commented Dec 5, 2024

At the moment of creating this PR, designs show this badge in the grade column, not the student one.

This note looks out of date judging by the screenshot. Can you revise the description to reflect any other changes I should know about.

The designs have been updated to match the implementation here. I'll adjust that note from the PR description.

@acelaya acelaya force-pushed the roster-student-drop branch 2 times, most recently from cae02a7 to 0fa323f Compare December 5, 2024 13:31
@acelaya acelaya requested a review from robertknight December 5, 2024 13:33
{type === 'error' && 'Error'}
{type === 'syncing' && 'Syncing'}
{type === 'drop' && 'Drop'}
</div>
Copy link
Member

Choose a reason for hiding this comment

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

Can this badge live update while the page is loaded? If so we may need to consider accessibility affordances for this. Leave that out of scope for this PR though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The ones related with grades sync can update at runtime.

When clicking sync grades, all badges showing "new" or "error" will transition into syncing, and once finished, they will either disappear or transition back to error.

I'll create a separate issue to wrap them into an aria-live container.

@acelaya acelaya force-pushed the roster-student-drop branch from 0fa323f to 4e495fe Compare December 5, 2024 15:37
@acelaya acelaya merged commit 0af5322 into roster-dashboard-api Dec 10, 2024
9 checks passed
@acelaya acelaya deleted the roster-student-drop branch December 10, 2024 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants