SCM

Forum: support

Monitor Forum | Start New Thread Start New Thread
RE: Importing or migrating quiz to Canvas question bank removes math text [ Reply ]
By: Achim Zeileis on 2024-08-13 21:10
[forum:49958]
Excellent, Niels, thanks a lot!

I had also tested on Instructure's demo Canvas server which is typically not running all the latest features. It worked there as well.

Thanks & best wishes,
Achim

RE: Importing or migrating quiz to Canvas question bank removes math text [ Reply ]
By: Niels Smits on 2024-08-13 08:16
[forum:49957]
For completeness, I also checked Achim's fix in UvA's Canvas using two ways of selecting materials in Canvas' "Import Course Content":

Canvas course export package (called "Canvas Common Cartridge" in Canvas' display of import jobs)
QTI .zip file (called "QTI" in Canvas' display of import jobs)

and it works prefectly as well!

Best,

Niels

RE: Importing or migrating quiz to Canvas question bank removes math text [ Reply ]
By: Achim Zeileis on 2024-08-13 06:28
[forum:49956]
Thanks for checking, very much appreciated (and documented in the NEWS)!

RE: Importing or migrating quiz to Canvas question bank removes math text [ Reply ]
By: Jeff Pisklak on 2024-08-13 02:12
[forum:49955]
Just tested it. It worked beautifully.

RE: Importing or migrating quiz to Canvas question bank removes math text [ Reply ]
By: Achim Zeileis on 2024-08-12 22:19
[forum:49954]
Thank you very much for testing and reporting this. I have now changed the default in exams2canvas() to converter = "pandoc-mathjax" in the development version of the package here on R-Forge. If you install version 2.4-2 via

install.packages("exams", repos = "https://R-Forge.R-project.org", type = "source")

then everything should work out of the box.

Thanks & best wishes, Achim

RE: Importing or migrating quiz to Canvas question bank removes math text [ Reply ]
By: Jeff Pisklak on 2024-08-12 14:56
[forum:49953]
You solved it! Thank you.

The issue appears to be the math formatting converter. MathJax (which the exams2canvas function doesn't permit the use of) allows the LaTeX equations within a quiz to be successfully transferred to the item-bank, MathML does not.

The exams2canvas documentation states that "currently, Canvas requires HTML with MathML." However, looking online, MathJax has been supported for a few years now:

https://community.canvaslms.com/t5/Canvas-Releases/Canvas-Release-Notes-2021-02-20/ta-p/434781#toc-hId-698876024

Since exams2canvas is just a wrapper of exams2qti12, hopefully this is an easy fix for an update.

P.S. Keep up the good work with the package. It's tremendously helpful and appreciated.

RE: Importing or migrating quiz to Canvas question bank removes math text [ Reply ]
By: Achim Zeileis on 2024-08-12 09:42
[forum:49951]
Hmm, that's a good question. I'm fairly certain that this worked when we implemented the exams2canvas() function but possibly the behavior of Canvas changed.

Maybe Canvas simultaneously tries to switch the format from Classic Quiz to New Quiz? For some reason this doesn't work properly and we haven't worked out why.

As for the source of the differences: exams2canvas() turns the mathematical expressions into MathML (embedded in HTML for QTI 1.2). This was the only reliable math formatting at the time of implementation. Maybe other strategies now work as well. You can try:

exams2qti12(..., converter = "pandoc-mathjax", flavor = "canvas", base64 = FALSE, quiztype = "assignment", template = "canvas_qti12.xml")

Maybe this works? Might be worth a shot...but as I said: It didn't work when I last tried it.

Maybe other Canvas users can share any insights here?

Importing or migrating quiz to Canvas question bank removes math text [ Reply ]
By: Jeff Pisklak on 2024-08-11 19:21
[forum:49949]
I have created a quiz using exams2canvas() from R markdown (.Rmd) files. These files contain mathematical equations written using LaTeX code.

E.g., $x = \frac{-b \pm \sqrt{b^{2} - 4ac}}{2a}$

I can import the quiz generated by rexams into Canvas without issue; however, migrating the quiz to the question bank or importing the quiz to the question bank directly causes the math expressions to disappear.

I can only assume this has something to with rexams treatment of math text because creating test questions with equations directly in Canvas using its question editor doesn't result in the equations vanishing when migrated/imported.

It's possible there is something I am overlooking when generating the zip file, but I can't imagine what it is.

Thanks to:
Vienna University of Economics and Business Powered By FusionForge