-
Bug
-
Resolution: Fixed
-
Minor
-
1.8.3
-
None
-
Solaris + Oracle
-
Oracle
-
MOODLE_18_STABLE
-
MOODLE_18_STABLE, MOODLE_19_STABLE
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').")"