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

Fix 'New quiz' button is visible in the print report #12945

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

Conversation

AllanOXDi
Copy link
Member

Summary

This PR fixes the 'New quiz' / New lesson button being displayed in the 'Print preview.

Before

image

After

Screenshot 2024-12-13 at 21 36 34 Screenshot 2024-12-13 at 21 40 07

References

closes #12715

Reviewer guidance

  1. Import the QA channel (nakav-mafak) and create quizzes assigned to learners
  2. Complete some of the quizzes and go to Coach > Plan
  3. Click the 'Print report' icon

@github-actions github-actions bot added APP: Coach Re: Coach App (lessons, quizzes, groups, reports, etc.) DEV: frontend labels Dec 13, 2024
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.

Hi @AllanOXDi - thanks for working on this. The solution you came up with is creative and does seem to fix the problem. For more simplicity, I think you could take your same idea but make use of some of the existing print functionality. Using @media print may be the most straightforward option, but if there are scenarios where this doesn't work, you could also look into the beforeprint and afterprint - there are some examples in the documentation. (This is actually a very similar idea to what you are already doing, actually, just a bit more specific - the benefit of which is that there is an exact event, rather than relying on guessing a number of ms for a timeout.)

Why don't you give these alternatives a try, see what you think, and let me know if you have any questions?

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.

0.18 - Plan quizzes - Print report - The 'New quiz' button is visible in the print report
2 participants