Skip to content

Commit

Permalink
Block normal users to gain access to meta courses (Merged from MOODLE…
Browse files Browse the repository at this point in the history
…_15_STABLE)
  • Loading branch information
patrickslee committed Oct 31, 2005
1 parent 49465c3 commit 56144ef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions course/enrol.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@
error("Could not find a site!");
}

/// Check if the course is a meta course
if ($course->metacourse) {
print_header_simple();
notice(get_string('coursenotaccessible'), $CFG->wwwroot);
}

check_for_restricted_user($USER->username);

$enrol = new enrolment_plugin();
Expand Down
1 change: 1 addition & 0 deletions lang/en/moodle.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@
$string['coursecategory'] = 'Course category';
$string['coursecreators'] = 'Course creators';
$string['coursemessage'] = 'Message course users';
$string['coursenotaccessible'] = 'This course does not allow public access';
$string['coursefiles'] = 'Course files';
$string['courseformats'] = 'Course formats';
$string['coursegrades'] = 'Course grades';
Expand Down

0 comments on commit 56144ef

Please sign in to comment.