mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-50673 workshop: Fix the way how submissions are counted
The count_submissions() method does not take the actual enrolment into account. It is part of the API that looks on all existing data regardless the actual status of their owner. The author of the submission may be unenrolled or suspended, in which case they are not displayed in the report and we would get wrong figures.
This commit is contained in:
parent
bfde810a8b
commit
65ba4cdad2
@ -230,7 +230,7 @@ case workshop::PHASE_SUBMISSION:
|
||||
$data = $workshop->prepare_grading_report_data($USER->id, $groupid, $page, $perpage, $sortby, $sorthow);
|
||||
if ($data) {
|
||||
$countparticipants = $workshop->count_participants();
|
||||
$countsubmissions = $workshop->count_submissions('all', $groupid);
|
||||
$countsubmissions = $workshop->count_submissions(array_keys($data->grades), $groupid);
|
||||
$a = new stdClass();
|
||||
$a->submitted = $countsubmissions;
|
||||
$a->notsubmitted = $data->totalcount - $countsubmissions;
|
||||
|
Loading…
x
Reference in New Issue
Block a user