• Resolved Ari123

    (@ucdguy)


    Hi!

    Thank you again for a great plugin!

    (Note: I’ve already asked the MathJax team for help with this and they recommended that I ask here instead.)

    I’m using MathJax with their lazy load configuration that is described here, which is working fine for the most part.

    For example, for this question and with these settings, the question and answer display correctly as shown here.

    However, I don’t have the same luck on the results page. The question explanation does not render the maths, as shown here. (The fact that the original unrendered text doesn’t show makes me think that MathJax did in fact try to render it but failed for some reason, rather than that it failed to find the text at all.)

    I did however notice that the question and answers still displayed the rendered maths on the results page and therefore I realised that changing the “Show messages for right/wrong answers” to “on both” might be a solution as I can show that instead of the question explanation, and the right/wrong answers do indeed show correctly on the results page as seen here.

    However, if the question is skipped (which is necessary for my use case), I return to the same problem again, as shown here.

    Any ideas on how to get it working?

    Thanks!

    (Turning off lazy loading is not an option for me as I typically have a large page full of equations with a quiz at the end and it would severely affects my load time.)

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Jasmine

    (@hyenokian)

    Dear @ucdguy,

    Thank you for the topic.

    I want to mention, that, currently, we need more information for further investigation of your case.

    So, please provide us with the link, where the given quiz is located so that I can pass your case to our Development Team for further investigation.

    Looking forward to your reply.

    Thank you.

    Thread Starter Ari123

    (@ucdguy)

    Hi!

    Thank you for a quick reply.

    My website is unfortunately not currently live. However, it’s quite easy to reproduce from scratch and I just tried it there.

    1) Install a fresh copy of WordPress and install the Quiz Maker plugin.

    2) Add the following scripts:

    <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>

    <script id="mjconfig" type="text/javascript">
    MathJax = {
        loader: {load: ['ui/lazy']}
    };
    </script>

    3) Add \(x^2\) to a question, an answer and the question explanation field.

    4) If the second script is removed, the \(x^2\) renders correctly in the question, the answer and the question explanation field on the results page. However, if the second script is included, the \(x^2\) does not render in the question explanation field on the results page.

    Thanks again!

    Plugin Author ays-pro

    (@ays-pro)

    Dear @ucdguy,

    Thank you for your reply.

    I want to mention that the content is not being loaded from the beginning. When you submit the result, the AJAX request is sent.
    As our response comes via AJAX, your scripts don’t work with the response.

    Most presumably, your second script is being connected later, that is why the following case occurs for you.

    Please note, that this doesn’t come and is not connected with our plugin.
    So, please try to configure the MathJax settings accordingly so that the problem can be solved for you.

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘MathJax issue on results page’ is closed to new replies.