-
Notifications
You must be signed in to change notification settings - Fork 15
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
Conversation
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.
Extracted from GradeIndicator
, to reuse in other places.
b0ca281
to
dfaced7
Compare
@marcospri I added you as reviewer mostly for awareness. No need to do an actual code review unless you want to. |
dfaced7
to
38dc4ce
Compare
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. |
Good point! I think it makes sense to filter them out in the FE, as that's how the whole thing is designed.
Is it? I could include it here. |
38dc4ce
to
4813a77
Compare
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 && |
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.
Inactive users should not sync their grades.
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.
Ah, it does look simple, nice 👍
This note looks out of date judging by the screenshot. Can you revise the description to reflect any other changes I should know about. |
lms/static/scripts/frontend_apps/components/dashboard/AssignmentActivity.tsx
Outdated
Show resolved
Hide resolved
The designs have been updated to match the implementation here. I'll adjust that note from the PR description. |
cae02a7
to
0fa323f
Compare
lms/static/scripts/frontend_apps/components/dashboard/AssignmentActivity.tsx
Show resolved
Hide resolved
lms/static/scripts/frontend_apps/components/dashboard/StudentStatusBadge.tsx
Show resolved
Hide resolved
lms/static/scripts/frontend_apps/components/dashboard/StudentStatusBadge.tsx
Show resolved
Hide resolved
{type === 'error' && 'Error'} | ||
{type === 'syncing' && 'Syncing'} | ||
{type === 'drop' && 'Drop'} | ||
</div> |
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.
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.
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 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.
0fa323f
to
4e495fe
Compare
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.The badge applies to unknown users as well.
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.