From 89eccbccb29ec5dde38c8e28bc8409ab6e391d42 Mon Sep 17 00:00:00 2001 From: nfreear Date: Tue, 25 Sep 2007 12:08:19 +0000 Subject: [PATCH] MDL-1149 Accessibility: Current week/topic is NOT indicated non-visually, only in styling. Merged. --- course/format/lams/format.php | 4 +++- course/format/topics/format.php | 4 +++- course/format/weeks/format.php | 5 +++-- course/format/weekscss/format.php | 4 +++- lang/en_utf8/access.php | 3 +++ 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/course/format/lams/format.php b/course/format/lams/format.php index 7f4e11c369f..016fec00f4c 100644 --- a/course/format/lams/format.php +++ b/course/format/lams/format.php @@ -242,17 +242,19 @@ while ($section <= $course->numsections) { $currenttopic = ($course->marker == $section); + $currenttext = ''; if (!$thissection->visible) { $sectionstyle = ' hidden'; } else if ($currenttopic) { $sectionstyle = ' current'; + $currenttext = get_accesshide(get_string('currenttopic','access')); } else { $sectionstyle = ''; } echo ''; - echo ' '; + echo ' '.$currenttext.''; echo ''; if (!has_capability('moodle/course:viewhiddensections', $context) and !$thissection->visible) { // Hidden for students diff --git a/course/format/topics/format.php b/course/format/topics/format.php index 2b1bf52b564..b71fcf32376 100644 --- a/course/format/topics/format.php +++ b/course/format/topics/format.php @@ -192,16 +192,18 @@ $currenttopic = ($course->marker == $section); + $currenttext = ''; if (!$thissection->visible) { $sectionstyle = ' hidden'; } else if ($currenttopic) { $sectionstyle = ' current'; + $currenttext = get_accesshide(get_string('currenttopic','access')); } else { $sectionstyle = ''; } echo ''; - echo ''.$section.''; + echo ''.$currenttext.$section.''; echo ''; if (!has_capability('moodle/course:viewhiddensections', $context) and !$thissection->visible) { // Hidden for students diff --git a/course/format/weeks/format.php b/course/format/weeks/format.php index 217d4fa1c49..24ac056ac4e 100644 --- a/course/format/weeks/format.php +++ b/course/format/weeks/format.php @@ -187,19 +187,20 @@ $currentweek = (($weekdate <= $timenow) && ($timenow < $nextweekdate)); + $currenttext = ''; if (!$thissection->visible) { $sectionstyle = ' hidden'; } else if ($currentweek) { $sectionstyle = ' current'; + $currenttext = get_accesshide(get_string('currentweek','access')); } else { $sectionstyle = ''; } echo ''; - echo ' '; + echo ' '.$currenttext.''; $weekperiod = $weekday.' - '.$endweekday; - echo ''; if (!has_capability('moodle/course:viewhiddensections', $context) and !$thissection->visible) { // Hidden for students diff --git a/course/format/weekscss/format.php b/course/format/weekscss/format.php index adbcaddf079..96bb47fb9ca 100644 --- a/course/format/weekscss/format.php +++ b/course/format/weekscss/format.php @@ -184,10 +184,12 @@ $currentweek = (($weekdate <= $timenow) && ($timenow < $nextweekdate)); + $currenttext = ''; if (!$thissection->visible) { $sectionstyle = ' hidden'; } else if ($currentweek) { $sectionstyle = ' current'; + $currenttext = get_accesshide(get_string('currentweek','access')); } else { $sectionstyle = ''; } @@ -195,7 +197,7 @@ echo '
  • '; //'
     
    '; // Note, 'right side' is BEFORE content. - echo '