From e9b9c1d8104089c51242134dbe10c85215c7a76a Mon Sep 17 00:00:00 2001 From: nfreear Date: Tue, 25 Sep 2007 12:00:51 +0000 Subject: [PATCH] MDL-1149 Accessibility: Current week is NOT indicated non-visually, only in styling. --- course/format/topics/format.php | 4 +++- course/format/weeks/format.php | 5 +++-- course/format/weekscss/format.php | 4 +++- lang/en_utf8/access.php | 3 +++ 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/course/format/topics/format.php b/course/format/topics/format.php index 514f91a78a..91fd095dc1 100644 --- a/course/format/topics/format.php +++ b/course/format/topics/format.php @@ -187,16 +187,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 f3c35b34f5..5a83f23bbf 100644 --- a/course/format/weeks/format.php +++ b/course/format/weeks/format.php @@ -180,19 +180,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 fec9bc6e67..8c705d4cee 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 '