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

Question modifications made during quiz preview are not visible

XMLWordPrintable

    • MOODLE_400_STABLE, MOODLE_401_STABLE, MOODLE_402_STABLE, MOODLE_403_STABLE
    • MOODLE_402_STABLE, MOODLE_403_STABLE
    • MDL-78547_402
    • MDL-78547_403
    • Hide

      Initial setup

      1. Create a course or use an existing one.
      2. Create a Quiz activity.
      3. Add a multiple-choice question that contains 2 choices to that Quiz.
      4. Login as a teacher.

      Testing 1

      1. Preview the Quiz.
      2. Verify that you will see the answers of the question.
      3. Click Edit question on the preview page.
      4. Change the answer of Choice 1 to any different value (Example: foo).
      5. Change the answer of Choice 2 to any different value (Example: bar).
      6. Click Save changes.
      7. Verify that you will be redirected back to the preview page.
      8. Verify that you will not see the old choices anymore.
      9. Verify that you will see the new choices you have defined in the 4th and 5th steps.
      10. Finish the attempt.

      Testing 2

      1. Preview the Quiz.
      2. Verify that you will see the answers of the question.
      3. Click Edit question on the preview page.
      4. Click the Blanks for 3 more choices button.
      5. Try to add 3 more choices.
      6. Click Save changes.
      7. Verify that you will be redirected back to the preview page.
      8. Verify that you will see 3 new choices.
      9. Verify that you will see 5 choices in total.
      10. Finish the attempt.

       

       

      Show
      Initial setup Create a course or use an existing one. Create a Quiz activity. Add a multiple-choice question that contains 2 choices to that Quiz. Login as a teacher. Testing 1 Preview the Quiz. Verify that you will see the answers of the question. Click Edit question on the preview page. Change the answer of Choice 1 to any different value (Example: foo). Change the answer of Choice 2 to any different value (Example: bar). Click Save changes. Verify that you will be redirected back to the preview page. Verify that you will not see the old choices anymore. Verify that you will see the new choices you have defined in the 4th and 5th steps. Finish the attempt. Testing 2 Preview the Quiz. Verify that you will see the answers of the question. Click Edit question on the preview page. Click the Blanks for 3 more choices button. Try to add 3 more choices. Click Save changes. Verify that you will be redirected back to the preview page. Verify that you will see 3 new choices. Verify that you will see 5 choices in total. Finish the attempt.    

      This issue comes from this forum thread, and other similar ones. At the moment, users get the following confusing experience:

      1. Create a quiz and add questions.
      2. Preview the quiz, and answer some things.
      3. Notice a mistake in one question.
      4. Click the edit link provided, and fix the problem with the question.
      5. Save changes and get back to the quiz preview.
      6. Get confused because the edit they just made is not visible

      (Why? becuase the preview is still referring to the previous version of question, even though a later version now exists.)

      MDL-77745 should help the situation, by giving some clue about what is going on with the question versions. However, that does not really solve the problem. We are violating the "Don't make me think" UX principle. I can think of two possibilities only one workable possiblity:

      1. Simple and crude: in somewhere like mod/quiz/attempt.php, if the current attempt is a preview, the call some logic to see if any question that should appear in this quiz attempt has been edited, and if so, restart the entire preview (as if re-start preview had been clicked. That is, delete the current preview, and redirect to startattempt.php to create a new one, with a notifcation message to say that the preview was re-started because one or more questoins had been edited).
      2. More nuanced: it should be possible to just re-start the attempts at the questions that have been edited, without destroying the entire preview. This would be a bit harder to code, but might be a better user experience. (For example, if the quiz uses random selection of questoins, then completely recreating the preview would select different questions, which would be very confusing. Right, so we have to do this Option 2.) This code probably lives in mod/quiz/attempt.php, and starts with a call $attemptobj->update_outdated_questions_in_preview();

      Thoughts about implementation of that:

      The code to work out if a question has changed in a way that affects the current attempt exists in get_new_question_for_regrade in mod/quiz/report/overview/report.php, but that just does one question at a time. We should try to do that efficitly for all questions in the quiz attempt, which means the logic should probably live in the structure or qbank_helper classes.

      question_usage_by_activity::add_question_in_place_of_other is similar to what we need to implement this change, but we need something different, say a new question_usage_by_activity::replace_question_attempt. Before replaing the old attempt completely, we coudl first try doing a regrade, to preseve any respones, and only do a replace if that is not possible because the questoin has been edited too much.

        1. Manual Grading incorrect.png
          Manual Grading incorrect.png
          183 kB
        2. MDL-78547.png
          MDL-78547.png
          425 kB
        3. MDL-78547-test 1.png
          MDL-78547-test 1.png
          188 kB
        4. MDL-78547-test 2.png
          MDL-78547-test 2.png
          141 kB

            timhunt Tim Hunt
            timhunt Tim Hunt
            Khoa Nguyen Dang Khoa Nguyen Dang
            Huong Nguyen Huong Nguyen
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            27 Vote for this issue
            Watchers:
            28 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 5 hours, 21 minutes
                5h 21m

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