MDL-33126 Fix error on first view of new course page
authorsam marshall <s.marshall@open.ac.uk>
Mon, 21 May 2012 11:05:30 +0000 (12:05 +0100)
committersam marshall <s.marshall@open.ac.uk>
Mon, 21 May 2012 11:05:30 +0000 (12:05 +0100)
course/format/renderer.php

index 45977d4..5b6ca4b 100644 (file)
@@ -552,6 +552,8 @@ abstract class format_section_renderer_base extends plugin_renderer_base {
                 // a section_info object - we will need at least the uservisible
                 // field in it.
                 $thissection->uservisible = true;
+                $thissection->availableinfo = null;
+                $thissection->showavailability = 0;
             }
             // Show the section if the user is permitted to access it, OR if it's not available
             // but showavailability is turned on