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

Quiz auto-save, process_attempt and redo_question should be logged

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.9.7, 3.10.4, 3.11, 4.0
    • 4.0
    • Quiz
    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • MOODLE_400_STABLE
    • MDL-71984-master
    • Hide
      1. Pre-condition:
      • There is existing quiz which contains several questions.
      • Admin configs the autosave period for Quiz = 30 seconds (set the autosaveperiod value via: admin/search.php?query=autosaveperiod in Site administration)
      • Admin configs Question bahavior section in Quiz setting as follows:
        + How questions behave = Interactive with multiple tries + Allow redo within an attempt = Yes
      • Student 1 has been enrolled in the above course.
      1. Student 1 goes to Quiz in the above course, click on "Attempt quiz" button, then answer all questions.
      2. After 40 seconds, student has not submitted the attempt yet.
      3. Admin goes to the log page via Website administration --> Reports --> Log.
        Observe the log file of Quiz attempt auto-saved => The Quiz attempt auto-saved event should be exist, Ex: The user with id '3' is working on page '1' of the attempt with id '34' for the the quiz with course module id '6', and their latest responses have been saved automatically. The url should be the /mod/quiz/review.php with attempt id and page
      4. Then, Student 1 click on "check", "next page", "previous page" buttons or page number navigation links.
      5. Admin goes to the log page via Website administration --> Reports --> Log.
        Observe the log file of Quiz attempt updated => the Quiz attempt updated event should be exist, Ex: The user with id '3' has updated response on page '1' of the attempt with id '33' belonging to the user with id '3' for the quiz with course module id '6'. The url should be the /mod/quiz/review.php with attempt id and page.
      6. Then, Student 1 click on "check" button after chose a wrong answer and wait for the result.
      7. After that, Student 1 Click on "Try another question like this one" button.
      8. Admin goes to the log page via Website administration --> Reports --> Log.
        Observe the log file of Quiz attempt question restarted => The Quiz attempt question restarted event should be exist with correct new question id and slot number, Ex: The user with id '1' has restarted question at slot '0' on page '1' of the attempt with id '2' belonging to the user with id '1' for the quiz with course module id '3', and the new question id is '2'. The url should be the /mod/quiz/review.php with attempt id and page.
      9. Then, Student 1 click on navigation buttons or links (next page, previous page, page number) to navigate to other page.
      10. Admin goes to the log page via Website administration --> Reports --> Log.
        Observe the log file of Quiz attempt viewed => the Quiz attempt viewed event description should be include the page number, Ex:The user with id '3' has viewed response on page '1' of the attempt with id '33' belonging to the user with id '3' for the quiz with course module id '6'. The url should be the /mod/quiz/review.php with attempt id and page.
      Show
      Pre-condition: There is existing quiz which contains several questions. Admin configs the autosave period for Quiz = 30 seconds (set the autosaveperiod value via: admin/search.php?query=autosaveperiod in Site administration) Admin configs Question bahavior section in Quiz setting as follows: + How questions behave = Interactive with multiple tries + Allow redo within an attempt = Yes Student 1 has been enrolled in the above course. Student 1 goes to Quiz in the above course, click on "Attempt quiz" button, then answer all questions. After 40 seconds, student has not submitted the attempt yet. Admin goes to the log page via Website administration --> Reports --> Log. Observe the log file of Quiz attempt auto-saved => The Quiz   attempt auto-saved event should be exist, Ex:  The user with id '3' is working on page '1' of the attempt with id '34' for the the quiz with course module id '6', and their latest responses have been saved automatically.  The url should be the  /mod/quiz/review.php  with attempt id and page Then, Student 1 click on "check", "next page", "previous page" buttons or page number navigation links. Admin goes to the log page via Website administration --> Reports --> Log. Observe the log file of Quiz attempt updated => the Quiz attempt updated event should be exist, Ex:  The user with id '3' has updated response on page '1' of the attempt with id '33' belonging to the user with id '3' for the quiz with course module id '6'. The url should be the  /mod/quiz/review.php  with attempt id and page. Then, Student 1 click on "check" button after chose a wrong answer and wait for the result. After that, Student 1 Click on "Try another question like this one" button. Admin goes to the log page via Website administration --> Reports --> Log. Observe the log file of Quiz attempt question restarted => The Quiz attempt question restarted event should be exist with correct new question id and slot number, Ex:  The user with id '1' has restarted question at slot '0' on page '1' of the attempt with id '2' belonging to the user with id '1' for the quiz with course module id '3', and the new question id is '2'. The url should be the  /mod/quiz/review.php  with attempt id and page. Then, Student 1 click on navigation buttons or links (next page, previous page, page number) to navigate to other page. Admin goes to the log page via Website administration --> Reports --> Log. Observe the log file of Quiz attempt viewed => the Quiz attempt viewed event description should be include the page number, Ex: The user with id '3' has viewed response on page '1' of the attempt with id '33' belonging to the user with id '3' for the quiz with course module id '6'.  The url should be the  /mod/quiz/review.php  with attempt id and page.

    Description

      For historical reasons, which I don't entirely remember, certain things in the quiz are not logged. However, having had to investigate some potential incidents recently, I now think they should be:

      1. Quiz autosave - I think originally we did not make this log, because auto saves were not 'real' actions by the user. However, autosave running is good evidence that the student is actively working on the quiz (a save is only done after a response is changed), so I think this is worth logging.
      2. Quiz processing responses - currently processattempt.php only logs if it changes the state of the attept (e.g. Submit all and finish). In other cases it does not, on the theory that we are about to redirect the user back to attempt.php, and that will log. However, it will make things clearer if processattempt.php also logs when it just saves responses for the user.
      3. While checking out the other two, I also noticed that the user clicking on "Try another question like this one" (when that is enabled) is not logged. That is a significant user action, so definitely should be.

      Edit: I notice that attempt_viewed does not log the page number. It should. (Probably change fire_attempt_viewed_event to take an optional $page = null argument.)

      Attachments

        1. 04.png
          04.png
          113 kB
        2. MDL-71984.jpg
          MDL-71984.jpg
          52 kB
        3. MDL-71984 (2).jpg
          MDL-71984 (2).jpg
          54 kB

        Activity

          People

            tiennguyenphuc Tien Nguyen
            timhunt Tim Hunt
            Tim Hunt Tim Hunt
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Anna Carissa Sadia Anna Carissa Sadia
            Tim Hunt, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
            Votes:
            3 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              19/Apr/22

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 20 minutes
                2h 20m