Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-72431

TeX is sometimes removed in multi-choice question choices

    • MOODLE_311_STABLE
    • MDL-72431-401
    • MDL-72431-403
    • MDL-72431-404
    • MDL-72431-master
    • Hide

      In the database run update queries that insert at least a space before and after the brakets or greater smaller. For the answer options a query may look like:

      UPDATE question_answers
      SET answer = REPLACE(answer, '<', ' < ')
      WHERE answer LIKE '%$$%<%$$%'
      AND NOT answer LIKE '%$$% < %$$%'; 

      for the question text this may look like:

      UPDATE question
      SET questiontext =
      REPLACE(questiontext, '<', ' < ')
      WHERE questiontext LIKE '%$$%<%$$%'
      AND NOT questiontext LIKE '%$$% < %$$%'; 

      These queries fix such issues for < and only in questions and answer options. Tex can be used in many other places too and of course that doesnt fix all the possible issues.

      Show
      In the database run update queries that insert at least a space before and after the brakets or greater smaller. For the answer options a query may look like: UPDATE question_answers SET answer = REPLACE(answer, '&lt;' , ' &lt; ' ) WHERE answer LIKE '%$$%&lt;%$$%' AND NOT answer LIKE '%$$% &lt; %$$%' ; for the question text this may look like: UPDATE question SET questiontext = REPLACE(questiontext, '&lt;' , ' &lt; ' ) WHERE questiontext LIKE '%$$%&lt;%$$%' AND NOT questiontext LIKE '%$$% &lt; %$$%' ; These queries fix such issues for < and only in questions and answer options. Tex can be used in many other places too and of course that doesnt fix all the possible issues.
    • Hide

      Covered in testcase: filter_tex\filter_test::test_filter() and filter_tex\filter_test::test_tex_for_html()

      Full regression test must be done against MDL-69911.

      Show
      Covered in testcase: filter_tex\filter_test::test_filter() and filter_tex\filter_test::test_tex_for_html() Full regression test must be done against MDL-69911 .

      $$(2,3)$$  <- this is removed
      $$ (2,3) $$ <- this renders correctly
       
      $$<12, 6, 12>$$ < this is removed
      $$ < 12, 6, 12 > $$ < this renders correctly

            strobotta Stephan Robotta
            syxton Matthew Davidson
            Glyn (Mathew) May Glyn (Mathew) May
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 30 minutes
                2h 30m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.