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

Event "question_manually_graded" is triggered in single comment view only

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Create a quiz.
      2. Add an essay question.
      3. Complete the quiz as two students.
      4. As a teacher click on the quiz.
      5. Visit 'Quiz administration' > 'Results' > 'Manual grading'.
      6. Click on 'grade' under 'To grade'.
      7. Mark both of the attempts.
      8. Visit 'Course administration' > 'Reports' > 'Logs'.
      9. Click on 'Get these logs'.
      10. Confirm there are two question_manually_graded events.
      Show
      Create a quiz. Add an essay question. Complete the quiz as two students. As a teacher click on the quiz. Visit 'Quiz administration' > 'Results' > 'Manual grading'. Click on 'grade' under 'To grade'. Mark both of the attempts. Visit 'Course administration' > 'Reports' > 'Logs'. Click on 'Get these logs'. Confirm there are two question_manually_graded events.
    • Affected Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-47692_master
    • Sprint:
      Team B Sprint 1

      Description

      Event \mod_quiz\event\question_manually_graded is meant to provide a hook for plugins to react to manual grading (eg. by sending a comment/grade notification to the graded student(s)). However, in the current implementation, the event only gets triggered when the grade is set via /mod/quiz/comment.php. Grade and comment modifications in the "Quiz administration > Results > Manual grading" view (/mod/quiz/report.php?id=<id>&mode=grading (which is most likely the way most teachers grade their essay questions) don't seem to trigger the event.

      Steps to reproduce

      Grep for "question_manually_graded" in $CFG->dirroot.

      Solution

      Trigger the event for each quba at the end of quiz_grading_report::process_submitted_data() in /mod/quiz/report/grading/report.php after all attempt data has been committed (so that observers can access the new grading data).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              markn Mark Nelson
              Reporter:
              johannes.albert Johannes Albert
              Peer reviewer:
              Tim Hunt
              Integrator:
              Andrew Nicols
              Tester:
              Simey Lameze
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón, Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                2/Feb/15