Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
1.9.9
-
None
-
MOODLE_19_STABLE
-
MOODLE_19_STABLE
Description
'View issued certificates' displays a blank page when the certificate is set to use groupings with the 'Available for group members only' setting ticked if there are users in the grouping's groups. If there are no users in this grouping it displays fine.
The error thrown is:
Catchable fatal error: Object of class stdClass could not be converted to string in /data/apache/htdocs/moodle-dev/v199/mod/certificate/lib.php on line 532
This points to this code in certificate/lib.php:
// if groupmembersonly used, remove users who are not in any group
if (!empty($users) and !empty($CFG->enablegroupings) and $cm->groupmembersonly) {
if ($groupingusers = groups_get_grouping_members($cm->groupingid, 'u.id', 'u.id'))
{ $users = array_intersect($users, array_keys($groupingusers)); }}