Releases: jmshea/jupyterquiz
MathJax fix and Hidden span fix
Two fixes, plus lots of little improvements:
- Jupyter Lab 4 broke MathJax support because it ships with a nonstandard MathJax that lives in the standard MathJax namespace. I filed an issue(jupyterlab/jupyterlab#15614) and was waiting for Jupyter Lab to provide a method to ask MathJax to rerender elements, but I don't see any evidence that is being provided. This had been previously kept in a separate branch and distributed as alpha versions, but it is time to stop waiting on Jupyter Lab and make this mainstream.
My hacky solution is to load the real MathJax on top of Jupyter Lab's non-standard one. This is dangerous and may break in the future, but it is the best solution I know for now. I wish the Jupyter Lab community would implement the feature needed to avoid this behavior, and I don't have the expertise to implement that myself. If MathJax breaks for you and you are using JupyterQuiz, please let me know, and I will see what I can do to fix it.
- Jupyter Lab 4.2.5+ started stripping id's when rendering HTML elements in Markdown cells. I'm sure there is a reason, but this broke the way I was finding hidden spans containing JupyterQuiz questions embedded in notebooks. I think this affects a pretty small community. Since JL does not strip classes from the HTML elements, I have included a secondary search for an element with the specified class if the id search fails. You will have to update your HTML elements accordingly if you are on 4.2.5 or later versions. I have filed an issue (jupyterlab/jupyterlab#16937) about this with Jupyter Lab, so maybe the old behavior will return.
Support for JupyterLite
Bug fix release
Fix some missing "var" in Javascript and use separate display(HTML()) and display(Javascript()) for some non-Jupyter applications
Option to preserve student responses (fixes broken link)
This is identical to v2.0 but fixes a broken link in the README
Option to preserve student responses
Please read the Readme carefully if you are interested in preserving student responses (for them to submit in their notebook to you). See https://github.com/jmshea/jupyterquiz/blob/main/preserve-responses.ipynb for an example.
Add MathJax 3.x compatibility
Make compatible with MathJax 3.x
Had to update way that dynamic content retriggers rendering by MathJax. Handling asynchronous loading of MathJax is complicated and current approach just waits 0.5 s for MathJax to finish loading if it is not ready when the questions are displayed. May not be enough on all systems.
Better security, hiding example
Improve security of decoding JSON question data.
Much more detailed example/instructions for hiding question/answer data in HideQuiz.ipynb
Hide answers when embedding in Jupyter Notebooks
Supports embedding questions in Jupyter Notebooks with question source data (especially the answers) are hidden from users.
Fixed math output in feedback for numerical questions
This version fixes a bug where LaTeX in the feedback for numerical questions would not be properly typeset. It should work now.
Improved math handling and animated button colors
Improved handling of LaTeX math input as $ $ for inline math or $$ $$ for display math. Animation for color changes on multiple-choice buttons.