Using Watu quizzes and Latex in WordPress

Many years ago, I modified a JavaScript code to develop online quizzes for Numerical Methods.  An example of that is here – right click to “View Page Source”. http://nm.mathforcollege.com/mcquizzes/01aae/quiz_01aae_introduction.html

The above quiz is adequate but looks vintage and I am currently in the process of migrating my whole numerical methods site to WordPress.  As part of this migration, I tried to update the JavaScript code to work on WordPress but that turned out to be above my pay grade.

After much searching, I found the WATU quiz plugin and am using it to redevelop the quizzes from scratch with much of the text being cut and paste from old quizzes.

WATU is quite versatile but I faced issues with rendering of the equations.  For that I use the WP-Katex plugin.  Simply put the equations between the  tagname latex in brackets []  followed by /latex in brackets [], and this shortcode works.  I would show an example to illustrate the use of the shortcode, but it gets rendered.  See usage here.

This use of latex shortcode worked well for the question statements in the quiz but when latex shortcode was put in the distractors, equations would show up with weird spacing.  This was resolved quickly by WATU support where they suggested to edit the WATU style.css file.  See https://wordpress.org/support/topic/latex-not-displaying-properly-in-multiple-choice-answers/ for the solution.  It worked.

Now, another Latex issue cropped up when a user would submit a quiz  and it shows the right answers to the user.  The equations written in Latex would not get rendered and instead it would show the linear form of the equations.   Those were resolved by going to general settings in the WATU quizzes and check marking quizzes to not use Ajax.

WATU is a complete solution for posting online quizzes on the web for student practice.  I am not using WATU to collect data or to assign a grade, but these capabilities do exist in WATU.

See the new version of the quiz I created now on WordPress: https://numericalmethods.autarkaw.com/quiz-chapter-01-01-introduction-to-numerical-methods-2/  Please do not bookmark the quiz as this is a test website and I will be migrating the test website to the original site (http://mathforcollege.com) by the time Fall semester starts.  This will create the least disruption to maintain legacy of open course ware.

Leave a Reply