Moodle
  1. Moodle
  2. MDL-30854

Calculated question not added into the Quiz automatically

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.6, 2.1.4, 2.2.1, 2.3
    • Fix Version/s: 2.1.5, 2.2.2
    • Component/s: Quiz
    • Labels:
    • Testing Instructions:
      Hide

      Because of the mess that was found while fixing this, the fix need to be tested for each of

      A. A normal simple question (e.g. True/false)
      B. A calculated question.
      C. A calculatedmulti question.

      For each of those question types:

      0. On the Edit quiz page for a quiz.
      1. Click the 'Add a question ...' button on a page of the quiz.
      2. Choose to create a question of that type, and work through the editing form until you are don.
      3. Verify that you get back to the edit quiz page, and that the new question has been added to the page you chose.

      (Note that there is a separate, know, issue where sometimes a random empty page is added to the quiz too. Don't worry about that for now. It will be fixed separately.)

      4. Also make sure there are no problems if you create a question of this type directly in the question bank (If necessary, click the [Show] link where it says Question bank contents.)
      5. Go to the question bank for the course (using the link in the course settings block, not in the quiz settings), and make sure there are no regressions when creating questions of the given type there either.

      D. We also need to test random questions.

      1. Back on the quiz edit page, add a random question, picking from an existing category, somewhere in the quiz.
      2. Then click the 'Configure question' link.
      3. Change something on that form (or don't) and click save.
      4. Verify that there are no errors.

      Show
      Because of the mess that was found while fixing this, the fix need to be tested for each of A. A normal simple question (e.g. True/false) B. A calculated question. C. A calculatedmulti question. For each of those question types: 0. On the Edit quiz page for a quiz. 1. Click the 'Add a question ...' button on a page of the quiz. 2. Choose to create a question of that type, and work through the editing form until you are don. 3. Verify that you get back to the edit quiz page, and that the new question has been added to the page you chose. (Note that there is a separate, know, issue where sometimes a random empty page is added to the quiz too. Don't worry about that for now. It will be fixed separately.) 4. Also make sure there are no problems if you create a question of this type directly in the question bank (If necessary, click the [Show] link where it says Question bank contents.) 5. Go to the question bank for the course (using the link in the course settings block, not in the quiz settings), and make sure there are no regressions when creating questions of the given type there either. D. We also need to test random questions. 1. Back on the quiz edit page, add a random question, picking from an existing category, somewhere in the quiz. 2. Then click the 'Configure question' link. 3. Change something on that form (or don't) and click save. 4. Verify that there are no errors.
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:
    • Rank:
      33854

      Description

      How to reproduce

      1. When editing quiz, click the "Add a question..." at the bottom of a page frame
      2. Choose "Calculated" question type
      3. Define the question and save it

      Expected result

      • The question is added into the quiz at the place where the add button was pressed (like other questions do - tested with the Numerical)

      What actually happens

      • The question is created in the bank only and must be added to the quiz manually

      note: this was discovered while testing MDL-30739 though it does not seem to be linked anyhow

      1. smurf_master.xml
        3 kB
        Eloy Lafuente (stronk7)

        Activity

          People

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

            Dates

            • Created:
              Updated:
              Resolved: