diff --git a/lang/en/moodle.php b/lang/en/moodle.php index 9224edf..fbcccce 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -321,6 +321,7 @@ $string['coursehelpnewsitemsnumber'] = 'Number of recent items from the news for $string['coursehelpnumberweeks'] = 'Number of sections in the course (applies to certain course formats only).'; $string['coursehelpshowgrades'] = 'Enable the display of the gradebook. It does not prevent grades from being displayed within the individual activities.'; $string['coursehidden'] = 'This course is currently unavailable to students'; +$string['coursehiddenuser'] = 'This course is currently unavailable to {$a}'; $string['courseoverviewfiles'] = 'Course summary files'; $string['courseoverviewfilesext'] = 'Course summary files extensions'; $string['courseoverviewfileslimit'] = 'Course summary files limit'; diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 63131c6..7d7c789 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -3033,7 +3033,8 @@ function require_login($courseorid = NULL, $autologinguest = true, $cm = NULL, $ // been added to the navigation and thus the navigation will mess up // when trying to find it. navigation_node::override_active_url(new moodle_url('/')); - notice(get_string('coursehidden'), $CFG->wwwroot .'/'); + $name = role_get_name($DB->get_record('role', array('shortname'=>'student')), $coursecontext); + notice(get_string('coursehiddenuser', 'moodle', $name), $CFG->wwwroot .'/'); } } }