Skip to content

Commit

Permalink
Merge branch 'wip-MDL-46338-m26' of git://github.com/marinaglancy/moo…
Browse files Browse the repository at this point in the history
…dle into MOODLE_26_STABLE
  • Loading branch information
danpoltawski committed Jul 29, 2014
2 parents 2d1ac61 + 198c28c commit 765ba4c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions enrol/self/lib.php
Expand Up @@ -48,8 +48,11 @@ public function get_info_icons(array $instances) {
$key = false; $key = false;
$nokey = false; $nokey = false;
foreach ($instances as $instance) { foreach ($instances as $instance) {
if (!$instance->customint6) { if ($this->can_self_enrol($instance, false) !== true) {
// New enrols not allowed. // User can not enrol himself.
// Note that we do not check here if user is already enrolled for performance reasons -
// such check would execute extra queries for each course in the list of courses and
// would hide self-enrolment icons from guests.
continue; continue;
} }
if ($instance->password or $instance->customint1) { if ($instance->password or $instance->customint1) {
Expand Down

0 comments on commit 765ba4c

Please sign in to comment.