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

Assigment counter doesn't work with separated groups

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8.3
    • Fix Version/s: 1.8.3, 1.8.4, 1.9
    • Component/s: Assignment (2.2)
    • Labels:
      None
    • Environment:
      Solaris + Oracle
    • Database:
      Oracle
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      The counter for submitted assignments doesn't work with separated groups. With the debug mode following error appears:

      ORA-00909: invalid number of arguments

      SELECT COUNT(DISTINCT gm.userid, gm.groupid) FROM mlassignment_submissions a, mlgroups_members gm WHERE a.assignment = 61 AND a.timemodified > 0 AND gm.groupid = '81' AND a.userid = gm.userid
      line 677 of lib/dmllib.php: call to debugging()
      line 372 of lib/dmllib.php: call to get_recordset_sql()
      line 2273 of mod/assignment/lib.php: call to count_records_sql()
      line 1352 of mod/assignment/lib.php: call to assignment_count_real_submissions()
      line 294 of mod/assignment/lib.php: call to assignment_base->count_real_submissions()
      line 160 of mod/assignment/lib.php: call to assignment_base->submittedlink()
      line 24 of mod/assignment/type/upload/assignment.class.php: call to assignment_base->view_header()
      line 39 of mod/assignment/view.php: call to assignment_upload->view()

      We have solved this with following SQL query:

      SELECT COUNT FROM (SELECT DISTINCT gm.userid, gm.groupid
      FROM {$CFG->prefix}assignment_submissions a,
      ".groups_members_from_sql()."
      WHERE a.assignment = $assignment->id
      AND a.timemodified > 0
      AND ".groups_members_where_sql($groupid, 'a.userid').")"

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/Oct/07