Moodle

Assigment counter doesn't work with separated groups

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.8.3
  • Fix Version/s: 1.8.3, 1.8.4, 1.9
  • Component/s: Assignment
  • 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').")"

Activity

Hide
Mike Churchward added a comment -

Added code to treat group selection properly for users who can select group. Other code changes mentioned in this ticket already present.

Show
Mike Churchward added a comment - Added code to treat group selection properly for users who can select group. Other code changes mentioned in this ticket already present.
Hide
Martin Dougiamas added a comment -

Thanks Mike. Please don't forget to update the "Fix versions" after a fix is made.

Show
Martin Dougiamas added a comment - Thanks Mike. Please don't forget to update the "Fix versions" after a fix is made.
Hide
Sara Arjona added a comment -

We have updated our Moodle to 1.8.4 and there's still the same problem. Wich version of Moodle includes the fixed resolution?

Show
Sara Arjona added a comment - We have updated our Moodle to 1.8.4 and there's still the same problem. Wich version of Moodle includes the fixed resolution?
Hide
Mike Churchward added a comment -

The fixes are there in 1.8 STABLE (from 1.8.3 onward)...

Is it a particular assignment type that is giving you the problem?

Show
Mike Churchward added a comment - The fixes are there in 1.8 STABLE (from 1.8.3 onward)... Is it a particular assignment type that is giving you the problem?
Hide
Sara Arjona added a comment -

Hi! We detected the problem with "Advanced uploading of files" assignment type, but we don't know if there is the same problem with the others. Remember that this problem only appears when the assignment has separated groups.

Show
Sara Arjona added a comment - Hi! We detected the problem with "Advanced uploading of files" assignment type, but we don't know if there is the same problem with the others. Remember that this problem only appears when the assignment has separated groups.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: