]> git.mjollnir.org Git - moodle.git/commitdiff
Replace the add course button that somehow disappeared from 1.5
authormoodler <moodler>
Mon, 10 Apr 2006 15:41:57 +0000 (15:41 +0000)
committermoodler <moodler>
Mon, 10 Apr 2006 15:41:57 +0000 (15:41 +0000)
course/lib.php

index 7710092c6b7f7c2276fdbfe2454c32b03a2a9d69..24c26992e6e7f38942e753db5b3e4f5477d2cab6 100644 (file)
@@ -1212,6 +1212,13 @@ function print_courses($category, $width="100%", $hidesitecourse = false) {
         }
     } else {
         print_heading(get_string("nocoursesyet"));
+        if (iscreator()) {  // Make it obvious for newbies on new sites how to add a course
+            $options = array();
+            $options['category'] = $category->id;
+            echo '<div class="addcoursebutton" align="center">';
+            print_single_button($CFG->wwwroot.'/course/edit.php', $options, get_string("addnewcourse"));
+            echo '</div>';
+        }
     }
 
 }