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

TeX is sometimes removed in multi-choice question choices

Details

    • MOODLE_311_STABLE
    • MDL-72431-401
    • 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()

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

    Description

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

      Attachments

        Activity

          People

            strobotta Stephan Robotta
            syxton Matthew Davidson
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 30 minutes
                30m

                Clockify

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