Permalink
Browse files

Block normal users to gain access to meta courses

  • Loading branch information...
patrickslee
patrickslee committed Oct 31, 2005
1 parent 25340ce commit df7f761f53a7178a922dee47e1e104b8c2838cb2
Showing with 7 additions and 0 deletions.
  1. +6 −0 course/enrol.php
  2. +1 −0 lang/en/moodle.php
View
@@ -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();
View
@@ -206,6 +206,7 @@
$string['courseformats'] = 'Course formats';
$string['coursegrades'] = 'Course grades';
$string['courseinfo'] = 'Course info';
+$string['coursenotaccessible'] = 'This course does not allow public access';
$string['courserestore'] = 'Course restore';
$string['courses'] = 'Courses';
$string['coursestaught'] = 'Courses I have taught';

0 comments on commit df7f761

Please sign in to comment.