Permalink
Browse files

MDL-39833 course: require token change

MDL-39833 course: require token change
  • Loading branch information...
1 parent 1a727e1 commit 600be271c63b074d8355e8c2f51f9856062576f2 @shashitechno shashitechno committed Mar 19, 2014
Showing with 6 additions and 4 deletions.
  1. +5 −4 course/format/renderer.php
  2. +1 −0 lang/en/moodle.php
@@ -555,13 +555,14 @@ protected function stealth_section_footer() {
* @param int $sectionno The section number in the coruse which is being dsiplayed
* @return string HTML to output.
*/
- protected function section_hidden($sectionno) {
+ protected function section_hidden($sectionno, $courseorid) {
$o = '';
$o.= html_writer::start_tag('li', array('id' => 'section-'.$sectionno, 'class' => 'section main clearfix hidden'));
$o.= html_writer::tag('div', '', array('class' => 'left side'));
$o.= html_writer::tag('div', '', array('class' => 'right side'));
$o.= html_writer::start_tag('div', array('class' => 'content'));
- $o.= get_string('notavailable');
+ $o .= html_writer::tag('div', get_string('notavailablecourse', '', get_section_name(
+ $courseorid, $sectionno, array('class' => 'availabilityinfo'))));
$o.= html_writer::end_tag('div');
$o.= html_writer::end_tag('li');
return $o;
@@ -626,7 +627,7 @@ public function print_single_section_page($course, $sections, $mods, $modnames,
if (!$sectioninfo->uservisible) {
if (!$course->hiddensections) {
echo $this->start_section_list();
- echo $this->section_hidden($displaysection);
+ echo $this->section_hidden($displaysection, $course->id);
echo $this->end_section_list();
}
// Can't view this section.
@@ -745,7 +746,7 @@ public function print_multiple_section_page($course, $sections, $mods, $modnames
// Hidden section message is overridden by 'unavailable' control
// (showavailability option).
if (!$course->hiddensections && $thissection->available) {
- echo $this->section_hidden($section);
+ echo $this->section_hidden($section, $course->id);
}
continue;
View
@@ -1314,6 +1314,7 @@
$string['nostudentsyet'] = 'No students enrolled in this course yet';
$string['nosuchemail'] = 'No such email address';
$string['notavailable'] = 'Not available';
+$string['notavailablecourse'] = '{$a} is not available';
$string['noteachersyet'] = 'No teachers in this course yet';
$string['notenrolled'] = '{$a} is not enrolled in this course.';
$string['notenrolledprofile'] = 'This profile is not available because this user is not enrolled in this course.';

0 comments on commit 600be27

Please sign in to comment.