From 8399f5a230fbc77d9eec161bb46518e5e650ed8e Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Sun, 17 Jul 2011 20:39:20 +0200 Subject: [PATCH] MDL-28348 fix spelling and some whitespace issues --- enrol/meta/locallib.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/enrol/meta/locallib.php b/enrol/meta/locallib.php index fda823026f7..c8676ddc087 100644 --- a/enrol/meta/locallib.php +++ b/enrol/meta/locallib.php @@ -1,5 +1,4 @@ contextid); if ($parentcontext->contextlevel != CONTEXT_COURSE) { return true; @@ -81,7 +80,7 @@ class enrol_meta_handler { public function role_unassigned($ra) { global $DB; - //note: do not test if plugin enabled, we want to keep removing previous roles + // note: do not test if plugin enabled, we want to keep removing previous roles // prevent circular dependencies - we can not sync meta roles recursively if ($ra->component === 'enrol_meta') { @@ -99,7 +98,7 @@ class enrol_meta_handler { return true; } - //note: do not check 'nosyncroleids', somebody might have just enabled it, we want to get rid of nosync roles gradually + // note: do not check 'nosyncroleids', somebody might have just enabled it, we want to get rid of nosync roles gradually foreach ($enrols as $enrol) { // Is the user enrolled? We want to sync only really enrolled users @@ -114,7 +113,7 @@ class enrol_meta_handler { continue; } - // unassing role, there is no other role assignment in parent course + // unassign role, there is no other role assignment in parent course role_unassign($ra->roleid, $ra->userid, $context->id, 'enrol_meta', $enrol->id); } @@ -175,7 +174,7 @@ class enrol_meta_handler { public function course_deleted($course) { global $DB; - //note: do not test if plugin enabled, we want to keep removing previously linked courses + // note: do not test if plugin enabled, we want to keep removing previously linked courses // does anything want to sync with this parent? if (!$enrols = $DB->get_records('enrol', array('customint1'=>$course->id, 'enrol'=>'meta'), 'id ASC')) { @@ -184,7 +183,7 @@ class enrol_meta_handler { $plugin = enrol_get_plugin('meta'); foreach ($enrols as $enrol) { - //unenrol all users + // unenrol all users $ues = $DB->get_recordset('user_enrolments', array('enrolid'=>$enrol->id)); foreach ($ues as $ue) { $plugin->unenrol_user($enrol, $ue->userid); @@ -196,6 +195,7 @@ class enrol_meta_handler { } } + /** * Sync all meta course links. * @param int $courseid one course, empty mean all -- 2.11.4.GIT