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

quiz notification to a teacher with groupings

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 2.8.9, 2.9.3
    • 2.8.8, 2.9
    • Quiz
    • MOODLE_28_STABLE, MOODLE_29_STABLE
    • MOODLE_28_STABLE, MOODLE_29_STABLE
    • Hide
      • Create a course
      • Enrol two non editing teachers (tutor1 and tutor2)
      • Enrol two students (student1 and student2)
      • Create two groups for the two teachers (t1 and t2)
      • gt1 members: tutor1, student1 and student2
      • gt2 members: tutor2, student1 and student2
      • Create two groupings( gr1 and gr2)
      • gr1 contains gt1
      • gr2 contains gt2
      • Create a quiz: quiz1, group mode: SEPARATE GROUPS, grouping: GR1
      • create a new ESSAY QUESTION
      • go to quiz administration: permissions, allow NON EDITING TEACHER the "Get a notification message when an attempt is submitted" capability (mod/quiz:emailnotifysubmission)
      • go to Site administration ► Users ► Permissions ► Define roles
      • choose non editing teacher, edit
      • Access all groups (moodle/site:accessallgroups): not set
      • Attempt the quiz as a student.
      • Verify that only tutor1 gets an email.
      Show
      Create a course Enrol two non editing teachers (tutor1 and tutor2) Enrol two students (student1 and student2) Create two groups for the two teachers (t1 and t2) gt1 members: tutor1, student1 and student2 gt2 members: tutor2, student1 and student2 Create two groupings( gr1 and gr2) gr1 contains gt1 gr2 contains gt2 Create a quiz: quiz1, group mode: SEPARATE GROUPS, grouping: GR1 create a new ESSAY QUESTION go to quiz administration: permissions, allow NON EDITING TEACHER the "Get a notification message when an attempt is submitted" capability (mod/quiz:emailnotifysubmission) go to Site administration ► Users ► Permissions ► Define roles choose non editing teacher, edit Access all groups (moodle/site:accessallgroups): not set Attempt the quiz as a student. Verify that only tutor1 gets an email.

    Description

      The quiz notification ignores the GROUPING settings.
      For example we have got two tutors in the same course but they would like to share the grading task between themselves: tutor1 would like to mark Quiz1 and tutor2 would like to mark Quiz2 and we would like to send them notification to let them know when a student submitted something...

      • Create a course
      • Enrol two non editing teachers (tutor1 and tutor2)
      • Enrol two students (student1 and student2)
      • Create two groups for the two teachers (t1 and t2)
      • t1 members: tutor1, student1 and student2
      • t2 members: tutor2, student1 and student2
      • Create two groupings( gr1 and gr2)
      • gr1 contains t1
      • gr2 contains t2
      • Create a quiz: quiz1, group mode: SEPARATE GROUPS, grouping: GR1
      • create a new ESSAY QUESTION
      • go to quiz administration: permissions, allow NON EDITING TEACHER the "Get a notification message when an attempt is submitted" capability (mod/quiz:emailnotifysubmission)
      • go to Site administration / ► Users / ► Permissions / ► Define roles
      • choose non editing teacher, edit
      • Access all groups (moodle/site:accessallgroups): not set

      After these settings when a student submit a quiz attempt ONLY tutor1 should get a notification about the submission, but if you login as student1 and attempt the quiz, both tutor will get a notification.

      The problem is in the
      mod/quiz/locallib.php
      file:
      line 1553:
      $groups = groups_get_all_groups($course->id, $submitter->id);
      should be:
      $groups = groups_get_all_groups($course->id, $submitter->id, $cm->groupingid);

      see my solution here:
      https://github.com/lengyelke/moodle/commit/2fa0eaaa3244a94b76974b94f737ea29b63814bf

      I hope I was clear enough
      Thanks
      Frank

      Attachments

        Issue Links

          Activity

            People

              timhunt Tim Hunt
              lengyelke Ferenc Lengyel
              Tim Hunt Tim Hunt
              Dan Poltawski Dan Poltawski
              Jun Pataleta Jun Pataleta
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                9/Nov/15