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

Undefined ANSWER_REGEX and ANSWER_REGEX_ANSWER_TYPE_MULTICHOICE constants

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.0
    • Fix Version/s: 3.0.1
    • Component/s: Questions
    • Labels:
    • Testing Instructions:
      Hide

      Based on MDL-52203 testing instructions.

      1. In Moodle 2.9 create several cloze questions, see examples in https://docs.moodle.org/29/en/Embedded_Answers_%28Cloze%29_question_type, ensure they include multichoice questions
      2. Manually edit one of them in the database, in table question_multianswer replace sequence '1,2,3,4' with ',,,'
      3. Perform upgrade to 3.0 branch
      4. Make sure it succeeded
      Show
      Based on MDL-52203 testing instructions. In Moodle 2.9 create several cloze questions, see examples in https://docs.moodle.org/29/en/Embedded_Answers_%28Cloze%29_question_type , ensure they include multichoice questions Manually edit one of them in the database, in table question_multianswer replace sequence '1,2,3,4' with ',,,' Perform upgrade to 3.0 branch Make sure it succeeded
    • Affected Branches:
      MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-52553_master

      Description

      I've upgraded a monster database to 3.0 and I see some php notices in the CLI output:

      Notice: Use of undefined constant ANSWER_REGEX - assumed 'ANSWER_REGEX' in /home/davidm/Desktop/moodlecode/int/MOODLE_30_STABLE/question/type/multianswer/db/upgrade.php on line 85
       
      Notice: Use of undefined constant ANSWER_REGEX_ANSWER_TYPE_MULTICHOICE - assumed 'ANSWER_REGEX_ANSWER_TYPE_MULTICHOICE' in /home/davidm/Desktop/moodlecode/int/MOODLE_30_STABLE/question/type/multianswer/db/upgrade.php on line 86
      

      This is probably a regression caused by MDL-52162, as I removed question/type/multianswer/questiontype.php include there.

      Would be good to fix this before releasing 3.0.1.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  21/Dec/15