Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-6531

Moodle Workshop Submission Phase Display Does Not Respect Groupings

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 2.9.8, 3.1.3
    • None
    • Latest
    • MOODLE_29_STABLE, MOODLE_31_STABLE

      In the main overview display page for a Moodle workshop, in the Submission phase column, the number of submissions expected does not respect groupings. For example, in a course with 3 groups, each with 20 students, the instructor of Group A sees that 60 submissions are expected, even though that instructor only has 20 students.

      Submission phase
      Provide instructions for assessment
      Set up scheduled allocation
      Allocate submissions
      expected: 60 <-- This should be 20 as the instructor only has 20 students in his group
      submitted: 1 <--This should only be the submissions for the relevant group
      to allocate: 1

      If I'm understanding the code correctly, the exact code is found in Lines 3111 and 3112 in /mod/workshop/locallib.php:

      $numofauthors = $workshop->count_potential_authors(false);
      $numofsubmissions = $DB->count_records('workshop_submissions', array('workshopid'=>$workshop->id, 'example'=>0));

      The count_potential_authors function specifies $groupid = 0 so it counts all the groups (starting on line 573).

      public function count_potential_authors($musthavesubmission=true, $groupid=0) {
      global $DB;
      list($sql, $params) = $this->get_users_with_capability_sql('mod/workshop:submit', $musthavesubmission, $groupid);
      if (empty($sql))

      { return 0; }

      $sql = "SELECT COUNT
      FROM ($sql) tmp";
      return $DB->count_records_sql($sql, $params);
      }

      GITHUB LINK: https://github.com/moodle/moodle/blob/MOODLE_31_STABLE/mod/workshop/locallib.php

      The code counts the total number of submissions and authors, ignoring the fact that the module is set to Separate Groups.

            aborrow Anthony Borrow
            christian.thompson Christian Thompson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.