Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-13152

This improvement allows to create a group that doesn't exist in a course but exist in a registry of a csv file.

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.8.4, 1.9
    • Fix Version/s: 1.9
    • Component/s: Administration
    • Labels:
      None
    • Affected Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      /admin/uploaduser.php
      line 660

      This improvement allows to create a group that doesn't exist in a course but exist in a registry of a csv file.
      The group is created and the user is added as member .

      if (!array_key_exists($addgroup, $ccache[$shortname]->groups)) {
      // if group doesn't exist, create it
      $newgroupdata = new object();
      $newgroupdata->name = $addgroup;
      $newgroupdata->courseid = $ccache[$shortname]->id;
      if ($ccache[$shortname]>groups[$addgroup]>id = groups_create_group($newgroupdata))

      { $ccache[$shortname]->groups[$addgroup]->name = $newgroupdata->name; }

      else

      { $upt->track('enrolments', get_string('unknowgroup', 'error', $addgroup), 'error'); continue; }

      }

        Attachments

          Activity

            People

            Assignee:
            dougiamas Martin Dougiamas
            Reporter:
            darkath Dariem Garces (Demian)
            Participants:
            Component watchers:
            Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              3/Mar/08