Skip to content

Commit

Permalink
Restore group members, fixes #33
Browse files Browse the repository at this point in the history
  • Loading branch information
ndunand committed Aug 23, 2021
1 parent d3cbb93 commit 418d407
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,19 @@ public static function process_enrolments($event = null, $instanceid = null) {
return $nbenrolled;
}

/**
* @param stdClass $instance
* @param int $groupid
* @param int $userid
*
* @throws coding_exception
*/
public function restore_group_member($instance, $groupid, $userid) {
global $CFG;
require_once("$CFG->dirroot/group/lib.php");
groups_add_member($groupid, $userid);
}

public static function attrsyntax_toarray($attrsyntax) { // TODO : protected
global $DB;

Expand Down

0 comments on commit 418d407

Please sign in to comment.