Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-2351

View issued certificates shows a blank page when set to 'available to group members only' for a grouping that has users assigned to it

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.9.9
    • 1.9.10
    • Module: Certificate
    • 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)); }

      }

      Attachments

        Activity

          People

            mchurch Mike Churchward
            jgramp Jess Gramp (old account)
            Mark Nelson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              25/Oct/10