Skip to content

Commit

Permalink
MDL-39833 course: require token change
Browse files Browse the repository at this point in the history
MDL-39833 course: require token change
  • Loading branch information
shashitechno committed Apr 5, 2014
1 parent 1a727e1 commit 600be27
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 5 additions & 4 deletions course/format/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions lang/en/moodle.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.';
Expand Down

0 comments on commit 600be27

Please sign in to comment.