From 52b601e87ff2206b6b0a3ca35632283a621fa97f Mon Sep 17 00:00:00 2001 From: phish108 <> Date: Fri, 9 Mar 2018 23:24:10 +0100 Subject: [PATCH] whitespace fix --- classes/condition.php | 14 +++++++------- classes/frontend.php | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/classes/condition.php b/classes/condition.php index 0530e19..4760f7f 100644 --- a/classes/condition.php +++ b/classes/condition.php @@ -64,13 +64,13 @@ public function is_available($not, \core_availability\info $info, $grabthelot, $ $context = \context_course::instance($course->id); $allow = is_enrolled($context, $userid, '', true); - // The NOT condition applies before accessallgroups (i.e. if you - // set something to be available to those NOT in group X, - // people with accessallgroups can still access it even if - // they are in group X). - if ($not) { - $allow = !$allow; - } + // The NOT condition applies before accessallgroups (i.e. if you + // set something to be available to those NOT in group X, + // people with accessallgroups can still access it even if + // they are in group X). + if ($not) { + $allow = !$allow; + } return $allow; } diff --git a/classes/frontend.php b/classes/frontend.php index 0be824c..5461362 100644 --- a/classes/frontend.php +++ b/classes/frontend.php @@ -59,14 +59,14 @@ protected function get_javascript_init_params($course, \cm_info $cm = null, */ protected function allow_add($course, \cm_info $cm = null, \section_info $section = null) { - + // This condition is only availavble if guest access is active $instances = enrol_get_instances($course->id, false); foreach ($instances as $instance) { - if ($instance->enrol === "guest") { - return true; - } + if ($instance->enrol === "guest") { + return true; + } } return false;