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

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.9
    • Fix Version/s: 1.9.10
    • Component/s: Module: Certificate
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      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

            Assignee:
            mchurch Mike Churchward
            Reporter:
            jgramp Jessica Gramp
            Participants:
            Component watchers:
            Mark Nelson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              25/Oct/10