MDL-24419 section availability: display availability info to teachers
authorDan Poltawski <dan@moodle.com>
Fri, 18 May 2012 06:56:00 +0000 (14:56 +0800)
committerDan Poltawski <dan@moodle.com>
Fri, 18 May 2012 06:56:00 +0000 (14:56 +0800)
course/format/renderer.php

index 63f3bdc..45977d4 100644 (file)
@@ -291,7 +291,7 @@ abstract class format_section_renderer_base extends plugin_renderer_base {
      */
     protected function section_availability_message($section) {
         $o = '';
-        if (!$section->uservisible) {
+        if (!$section->uservisible || $section->availableinfo) {
             $o .= html_writer::start_tag('div', array('class' => 'availabilityinfo'));
             if (!empty($section->availableinfo)) {
                 $o .= $section->availableinfo;