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

Only show attempts column in lesson reports for practice quizzes #13046

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

nucleogenesis
Copy link
Member

@nucleogenesis nucleogenesis commented Jan 31, 2025

Summary

Modifies the condition in the ReportsLearnersTable for showing the attempts column so that it only shows if the currently viewed piece of content is a practice quiz.

Only affects the case in which the report is viewing a particular piece of content in a lesson.

References

Fixes #13011

Reviewer guidance

  • Make a lesson w/ a Practice Quiz in it (available in QA channel > exercises > practice quizzes)
  • Also add a regular exercise (QA channel > exercises > KA Perseus)
  • Make some attempts with a user
  • Go to Coach > Class Lessons > (your lesson) > (the practice quiz) and you should see the attempts column
  • View the non-practice quiz, you should not see the attempts column

Edge case: When you have a practice quiz but no attempts then in this case there should be no attempts column.

@github-actions github-actions bot added APP: Coach Re: Coach App (lessons, quizzes, groups, reports, etc.) DEV: frontend labels Jan 31, 2025
@nucleogenesis nucleogenesis marked this pull request as ready for review January 31, 2025 23:48
anyTries() {
return this.entries.some(entry => !isUndefined(entry.statusObj.tries));
},
// Presumes this is a Lesson report table as quizId is only present in quiz routes
Copy link
Member Author

@nucleogenesis nucleogenesis Jan 31, 2025

Choose a reason for hiding this comment

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

This got me a bit confused initially, thought this might help future-me (or someone else) because I was trying to use this.exam to get the currently-viewed resource and didn't realize the need to handle varying route params

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.

Remove the "Attempts" column for non-practice quiz resources
1 participant