apluslms/a-plus-rst-tools

When the user inspect a questionnaire that uses the `math` role, the content is not render to proper HTML

Closed this issue · 1 comments

A questionnaire that uses the math role for the questions is rendered properly in the questionnaire iframe.

.. questionnaire:: questionnaire_randomized 20
  :title: Use the randomized settings
  :submissions: 3
  :points-to-pass: 20

  .. pick-any:: 10
    :randomized: 4
    :correct-count: 1

    :math:`10` is the result of the following arithmetic operation.

    *a. :math:`5 \times 2`
    *b. :math:`50 \div 5`
    *c. :math:`2+2+2+2+2`
    d. :math:`50 \div 4`
    e. :math:`3+2+4+2`
    *f. :math:`3 \times 2+4`
    g. :math:`2 \times 2+3`
    h. :math:`3+3+3+3`
    *i. :math:`2 \times (2+3)`

image

But it is not rendered properly in the inspect window

image

There is no iframe element in normal exercises, but anyway, the questionnaire is rendered correctly in the chapter.

If you don't add the MathJax.js library to the A+ course setting "head URLs", then MathJax is not included in other A+ pages than the chapter pages. This is why the math can not be rendered in the inspect submission page. MathJax works in chapters at any rate if the MathJax.js library is added to the RST/Sphinx template _templates/layout.html with the data-aplus HTML attribute.

If MathJax is added to the course head URLs, it must not be added in the template. MathJax breaks if you add it twice in the same page.

@jaguarfi This is currently the intended way it works, hence we could close this issue. There is no bug.