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

Event "question_manually_graded" is triggered in single comment view only

    XMLWordPrintable

Details

    • MOODLE_27_STABLE, MOODLE_28_STABLE
    • MOODLE_27_STABLE, MOODLE_28_STABLE
    • MDL-47692_master
    • 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.
    • 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

              markn Mark Nelson
              johannes.albert Johannes Albert
              Tim Hunt Tim Hunt
              Andrew Lyons Andrew Lyons
              Simey Lameze Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                2/Feb/15