Permalink
Browse files

Added "enrol" parameter to role_assign which records how this assignment

was made
  • Loading branch information...
1 parent eb744c5 commit f44152f44cce506538d916c3dad4cf9f242fc0e8 moodler committed Aug 31, 2006
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/accesslib.php
View
@@ -1093,7 +1093,7 @@ function get_roles_with_capability($capability, $permission=NULL) {
* @uses $USER
* @return id - new id of the assigment
*/
-function role_assign($roleid, $userid, $groupid, $contextid, $timestart=0, $timeend=0, $hidden=0) {
+function role_assign($roleid, $userid, $groupid, $contextid, $timestart=0, $timeend=0, $hidden=0, $enrol='manual') {
global $USER, $CFG;
if ($CFG->debug > 7) {
@@ -1138,6 +1138,7 @@ function role_assign($roleid, $userid, $groupid, $contextid, $timestart=0, $time
$newra->groupid = $groupid;
$newra->hidden = $hidden;
+ $newra->enrol = $enrol;
$newra->timestart = $timestart;
$newra->timeend = $timeend;
$newra->timemodified = time();
@@ -1149,6 +1150,7 @@ function role_assign($roleid, $userid, $groupid, $contextid, $timestart=0, $time
$newra->id = $ra->id;
$newra->hidden = $hidden;
+ $newra->enrol = $enrol;
$newra->timestart = $timestart;
$newra->timeend = $timeend;
$newra->timemodified = time();

0 comments on commit f44152f

Please sign in to comment.