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 112ecf68ba729773c9ecb4fef0fc4a14bfd3f73a 1 parent 90ba17e
@skodak skodak authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/enrollib.php
View
4 lib/enrollib.php
@@ -470,7 +470,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.