Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-31595 do not show enrolee link to guest account

  • Loading branch information...
commit 45962a179c0c26a939578dee2123e480fe873b00 1 parent 5f51b09
@skodak skodak authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/enrollib.php
View
4 lib/enrollib.php
@@ -477,7 +477,9 @@ function enrol_add_course_navigation(navigation_node $coursenode, $course) {
if ($course->id != SITEID) {
// Unenrol link
- if (is_enrolled($coursecontext)) {
+ if (isguestuser() or !isloggedin()) {
+ // guest account can not be enrolled
+ } else if (is_enrolled($coursecontext)) {
foreach ($instances as $instance) {
if (!isset($plugins[$instance->enrol])) {
continue;
Please sign in to comment.
Something went wrong with that request. Please try again.