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

Calculated multiple choice questions: {} in TeX does not work because it is used for question variables

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.8.6, 2.9, 3.5
    • Fix Version/s: None
    • Component/s: Maths filters, Questions
    • Labels:
    • Database:
      MySQL
    • Testing Instructions:
      Hide

      Setup

      1. Login as admin
      2. Create a course
      3. Check that the course has the "MathJax" filter enabled

      Testing scenario

      1. Login as teacher and access to the course
      2. Create a quiz activity
      3. Add a "Calculated multichoice" question with the following choices:
        1. Choice 1: $$ 4x^3 \ + \ \left(x \ + \ \frac{42}{1 + x^4}\right) $$
        2. Choice 2: $${={a1}+{a2}}\bf\hat{xx}$$
      4. Fill in all the mandatory fields, unmark the "Shuffle the choices?" checkbox and click over the "Save changes" button
        • CHECK that under the "Mandatory wild cards present in answers" section, the following wild cards are displayed: a1, a2 and xx
        • CHECK that all the wild card lists contains the option "nothing - it is not a wild card" 
      5. Select "nothing - it is not a wild card" for the {xx} wild card and leave "will use the same existing private dataset as before" for {a1} and {a2}.
      6. Leave the "Do not synchronise" default value and click to the "Next page" button
      7. Go to the "Add | Add item" section and click over the "Add" button to generate a dataset.
      8. Click on the "Preview" button
        • CHECK that a correct formula is displayed for both options
        • CHECK that the second formula has a number followed up for a xx with a hat on top (be sure the {xx} is not replaced by a number)
      Show
      Setup Login as admin Create a course Check that the course has the "MathJax" filter enabled Testing scenario Login as teacher and access to the course Create a quiz activity Add a "Calculated multichoice" question with the following choices: Choice 1: $$ 4x^3 \ + \ \left(x \ + \ \frac{42}{1 + x^4}\right) $$ Choice 2: $${={a1}+{a2}}\bf\hat{xx}$$ Fill in all the mandatory fields, unmark the "Shuffle the choices?" checkbox and click over the "Save changes" button CHECK  that under the "Mandatory wild cards present in answers" section, the following wild cards are displayed: a1, a2 and xx CHECK that all the wild card lists contains the option "nothing - it is not a wild card"  Select "nothing - it is not a wild card" for the {xx} wild card and leave "will use the same existing private dataset as before" for {a1} and {a2}. Leave the "Do not synchronise" default value and click to the "Next page" button Go to the "Add | Add item" section and click over the "Add" button to generate a dataset. Click on the "Preview" button CHECK that a correct formula is displayed for both options CHECK that the second formula has a number followed up for a xx with a hat on top (be sure the {xx} is not replaced by a number)
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_28_STABLE, MOODLE_29_STABLE, MOODLE_35_STABLE
    • Pull from Repository:
    • Pull 3.5 Branch:
    • Pull Master Branch:
      MDL-51477-master

      Description

      occurs on moodle 2.8.1, 2.8.3 and 2.9
      This issue occurs in physics questions of vectors

      Start creating Multiple choice calculated question
      Use string

      ={n3}+{n6}}\bf\hat{x}
      

      in one of the answers, where

      {n1} and {n2} are variables

      Expected result:
      The answer should contain sum of {n1}

      and

      {n2}

      with x + Caret (hat) above it

      Actual result:
      Application suggests me to turn x to another variable

      Please help.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                8 Vote for this issue
                Watchers:
                8 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 - 1 minute
                  1m