]> git.mjollnir.org Git - moodle.git/commitdiff
When there are no courses to list in the block, then include a link for adding one.
authormoodler <moodler>
Thu, 18 Nov 2004 06:33:23 +0000 (06:33 +0000)
committermoodler <moodler>
Thu, 18 Nov 2004 06:33:23 +0000 (06:33 +0000)
blocks/course_list/block_course_list.php

index cda9e3e8d7e76bd8e19b171d92e8abfab98d94da..137ed123f7984057c073033848ab713178a4f2ed 100644 (file)
@@ -91,7 +91,9 @@ class CourseBlock_course_list extends MoodleBlock {
                 } else {
                     $this->content->items = array();
                     $this->content->icons = array();
-                    $this->content->footer = get_string('nocoursesyet');
+                    $this->content->footer = get_string('nocoursesyet').'<br /><br />'.
+                            '<a href="'.$CFG->wwwroot.'/course/edit.php?category='.$category->id.'">'.
+                            get_string("addnewcourse").'</a>...';
                 }
                 $this->title = get_string('courses');
             }