Skip to content

Commit

Permalink
whitespace fix
Browse files Browse the repository at this point in the history
  • Loading branch information
phish108 committed Mar 9, 2018
1 parent cb998f0 commit 52b601e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions classes/condition.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
8 changes: 4 additions & 4 deletions classes/frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 52b601e

Please sign in to comment.