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

When a teacher edits a question from a quiz preview, the changes do not show up, which is very confusing

Details

    • MOODLE_400_STABLE, MOODLE_401_STABLE, MOODLE_402_STABLE, MOODLE_403_STABLE
    • MDL-78547_402
    • MDL-78547_403
    • Hide
      1. As a teacher, create a quiz that contains one multiple-choice question.
      2. Try to preview the quiz and respond to the existing question.
      3. Before completing the preview, attempt to update the question.

      There are two scenarios:

      S1:

      If the teacher only updates the question text (or does not update it significantly), then press Save Changes to redirect to the current attempt.

      Expected: The question will be up-to-date with the latest version.

      Also, retain the response of the current teacher.

      Actual: The question still retains the current question version.

      S2:

      If the teacher updates the answer, such as changing the number of answers (updates significantly), then press Save Changes to redirect to the current attempt.

      Expected: The question will be up-to-date with the latest version.

      And do not retain the existing response.

      Actual: The question still retains the current question version.

       
      Note: The updated behavior will also be applicable to random questions.

      Show
      As a teacher, create a quiz that contains one multiple-choice question. Try to preview the quiz and respond to the existing question. Before completing the preview, attempt to update the question. There are two scenarios: S1: If the teacher only updates the question text (or does not update it significantly), then press Save Changes to redirect to the current attempt. Expected: The question will be up-to-date with the latest version. Also, retain the response of the current teacher. Actual: The question still retains the current question version. S2: If the teacher updates the answer, such as changing the number of answers (updates significantly), then press Save Changes to redirect to the current attempt. Expected: The question will be up-to-date with the latest version. And do not retain the existing response. Actual: The question still retains the current question version.   Note: The updated behavior will also be applicable to random questions.

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              timhunt Tim Hunt
              timhunt Tim Hunt
              Khoa Nguyen Dang Khoa Nguyen Dang
              Votes:
              26 Vote for this issue
              Watchers:
              26 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.