]> git.mjollnir.org Git - moodle.git/commitdiff
Small cleanup of a notification
authormoodler <moodler>
Wed, 9 Aug 2006 05:37:31 +0000 (05:37 +0000)
committermoodler <moodler>
Wed, 9 Aug 2006 05:37:31 +0000 (05:37 +0000)
lib/accesslib.php

index caede3c47e0d9fbf54a19290cd2e30012939645c..1537854595e14bf019ebaddb35f6cf3ce5a4a627 100755 (executable)
@@ -928,9 +928,11 @@ function get_roles_with_capability($capability, $permission=NULL) {
  * @return id - new id of the assigment
  */
 function role_assign($roleid, $userid, $groupid, $contextid, $timestart=0, $timeend=0, $hidden=0) {
-    global $USER;
+    global $USER, $CFG;
 
-       echo "attempting to assign roleid $roleid userid $userid contextid $contextid";
+    if ($CFG->debug) {
+           notify("Assign roleid $roleid userid $userid contextid $contextid", 'notifytiny');
+    }
 
     if (empty($roleid)) {
         error ('you need to select a role');