]> git.mjollnir.org Git - moodle.git/commitdiff
fixed data/index.php when no databases available, initialized array in get_all_instan...
authorskodak <skodak>
Sun, 8 Oct 2006 19:45:29 +0000 (19:45 +0000)
committerskodak <skodak>
Sun, 8 Oct 2006 19:45:29 +0000 (19:45 +0000)
lib/datalib.php
mod/data/index.php

index 634e75b9eaa54c2727599759c508ae4d3d35811c..4e3f12f799331d58e202e9790385ec7e0ed2a362 100644 (file)
@@ -1188,6 +1188,8 @@ function get_all_instances_in_course($modulename, $course) {
         $invisible = 0;
     }
 
+    $outputarray = array();
+
     foreach ($modinfo as $mod) {
         if ($mod->mod == $modulename and $mod->visible > $invisible) {
             $instance = $rawmods[$mod->cm];
index 1880e0e5ead251701ee709991f09fb0421dba800..ecf4ed133a48190eea233b96ee1359e84f80c342 100755 (executable)
     $strtopic = get_string('topic');
     $strname = get_string('name');
     $strdata = get_string('modulename','data');
+
+    print_header_simple($strdata, '', $strdata, '', '', true, "", navmenu($course));
   
     if (! $datas = get_all_instances_in_course("data", $course)) {
         notice("There are no databases", "$CFG->wwwroot/course/view.php?id=$course->id");
     }
 
-    print_header_simple($strdata, '', $strdata, '', '', true, "", navmenu($course));
-
     $timenow  = time();
     $strname  = get_string('name');
     $strweek  = get_string('week');