MDL-32508 Close the topic/week ul before showing the add section link
authorAndrew Robert Nicols <andrew.nicols@luns.net.uk>
Thu, 3 May 2012 11:38:31 +0000 (12:38 +0100)
committerDan Poltawski <dan@moodle.com>
Fri, 4 May 2012 02:53:06 +0000 (10:53 +0800)
course/format/renderer.php

index c829e2c..e98cec9 100644 (file)
@@ -553,6 +553,9 @@ abstract class format_section_renderer_base extends plugin_renderer_base {
                 echo $this->stealth_section_footer();
             }
 
+            echo $this->end_section_list();
+
+            // Print the add section link
             $straddsection = get_string('addanadditionalsection', 'moodle');
             echo html_writer::start_tag('div', array('class' => 'mdl-align'));
             echo $this->output->action_link(
@@ -562,9 +565,9 @@ abstract class format_section_renderer_base extends plugin_renderer_base {
                     array('class' => 'addsectionlink')
             );
             echo html_writer::end_tag('div');
+        } else {
+            echo $this->end_section_list();
         }
 
-        echo $this->end_section_list();
-
     }
 }