Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-40267

T&Q (and likely other tools) delivered via lessons does not render MathJax

    Details

    • Type: Bug
    • Status: Verified
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 11.5 [Tentative], 12.3, 19.0
    • Fix Version/s: 12.4, 19.0
    • Labels:
      None
    • 12 status:
      Resolved
    • Test Plan:
      Hide
      • Create a site with Lessons and T&Q with at least one student
      • In the "Edit Tools" of Site Manage, make sure "Enable MathJax" is checked"
      • Create an assessment T&Q
      • Multiple Choice, give it some points
      • For the text add the value contained in the file (copy and pasting from this box often adds extra characters that don't work)

      latex_sample_equation.txt

      If the equations don't appear after saving the question you may need to enable the rich text editor and paste into source mode. Ensure that no extra HTML tags are in the content.

      • Add the 2 required options select one as correct
      • You should see the math rendered
      • Publish the assessment
      • In Lessons, link to the assessment you published
      • Logout and login as the student
      • Try to take the assessment as a student

      Expected: Math renders
      Actual: Math does not render

      • If you take the test via T&Q it should already work as expected
      Show
      Create a site with Lessons and T&Q with at least one student In the "Edit Tools" of Site Manage, make sure "Enable MathJax" is checked" Create an assessment T&Q Multiple Choice, give it some points For the text add the value contained in the file (copy and pasting from this box often adds extra characters that don't work) latex_sample_equation.txt If the equations don't appear after saving the question you may need to enable the rich text editor and paste into source mode. Ensure that no extra HTML tags are in the content. Add the 2 required options select one as correct You should see the math rendered Publish the assessment In Lessons, link to the assessment you published Logout and login as the student Try to take the assessment as a student Expected: Math renders Actual: Math does not render If you take the test via T&Q it should already work as expected

      Description

      If you create LaTeX math in a Samigo assessment and turn on MathJax in the site, the math renders as expected delivered directly through Samigo. However when linked up in a Lessons, it does not. See test plan for details. I also tested assignment which DOES appear to work fine so it's probably just a Samigo thing.

      This might be because the content is in an iframe in lessons and mathjax isn't rendering in the iframe. Maybe this would be useful?
      https://stackoverflow.com/a/32117794/3708872

      This also happened on SAK-25979 before where the synoptic tools are in iframes

      I believe the fix for this would be to refactor the code in portal to supply the headers and other code to Samigo (included in header.inc jsp) rather than Samigo hardcoding all of it. I feel like this would be easier and probably better than trying to get portal to inject the MathJax code into the iframes where needed, since it's just Samigo that seems to have this issue.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jcebellan Jose Cebellán (Entornos de Formación)
                  Reporter:
                  jonespm Matthew Jones
                • Votes:
                  2 Vote for this issue
                  Watchers:
                  8 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Git Source Code