-
Notifications
You must be signed in to change notification settings - Fork 730
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
Conversation
Build Artifacts
|
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.
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?
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.
Thanks @AllanOXDi - LGTM!
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.
thanks @AllanOXDi!
Summary
This PR fixes the 'New quiz' / New lesson button being displayed in the 'Print preview.
Before
After
References
closes #12715
Reviewer guidance