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

Teacher doesn't receive mail notifications for assignments (depends on groups settings)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.7
    • Fix Version/s: 1.8.1
    • Component/s: Assignment (2.2)
    • Labels:
      None
    • Affected Branches:
      MOODLE_17_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE

      Description

      Recently I upgraded to Moodle 1.7, and since that day the teacher doesn't receive anymore mail notifications when student upload a submission for the assignment.

      Other email (ex. backup notif) seems to work correctly.

      I checked in code, I think that the problem is that the course is group-separated, but the student is not in a group. In fact, the problem is here (file /mod/assignment/lib.php, line 1379):

      if (groupmode($this->course, $this->cm) == SEPARATEGROUPS) { // Separate groups are being used
      if ($groups = user_group($this->course->id, $user->id)) { // Try to find groups
      $teachers = array();
      foreach ($groups as $group) {
      $teachers = array_merge($teachers, get_group_teachers($this->course->id, $group->id));
      }
      } else {
      $teachers = get_group_teachers($this->course->id, 0); // Works even if not in group
      }
      } else {
      $teachers = get_course_teachers($this->course->id);
      }

      No teachers are found... if I set to FALSE the first "if", the mail is sent..

      I previusly opened a forum thread, but without any reply: http://moodle.org/mod/forum/discuss.php?d=59256

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              skodak Petr Skoda
              Reporter:
              thepisu Stefano Bagnatica
              Tester:
              Nobody Nobody
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/Jun/07