Fixes for MDL-7861.
authorvyshane <vyshane>
Mon, 15 Jan 2007 07:29:25 +0000 (07:29 +0000)
committervyshane <vyshane>
Mon, 15 Jan 2007 07:29:25 +0000 (07:29 +0000)
admin/report/courseoverview/index.php
lib/adminlib.php

index c32e3b0..b0721e9 100644 (file)
     $timeoptions = stats_get_time_options($now,$lastweekend,$lastmonthend,$earliestday,$earliestweek,$earliestmonth);
 
     if (empty($timeoptions)) {
-        error(get_string('nostatstodisplay'), $CFG->wwwroot.'/course/view.php?id='.$course->id);
+        error(get_string('nostatstodisplay'), $CFG->wwwroot.'/course/view.php?id='.$course->id, $adminroot);
     }
 
     echo '<form action="index.php" method="post">'."\n";
+    echo '<fieldset class="invisiblefieldset">';
 
     $table->width = '*';
-
     $table->align = array('left','left','left','left','left','left');
     $table->data[] = array(get_string('statsreporttype'),choose_from_menu($reportoptions,'report',$report,'','','',true),
                            get_string('statstimeperiod'),choose_from_menu($timeoptions,'time',$time,'','','',true),
@@ -60,6 +60,7 @@
                            '<input type="submit" value="'.get_string('view').'" />') ;
 
     print_table($table);
+    echo '</fieldset>';
     echo '</form>';
 
     if (!empty($report) && !empty($time)) {
         $courses = get_records_sql($sql, 0, $numcourses);
 
         if (empty($courses)) {
-            notify(get_string('statsnodata'));
+            notify(get_string('statsnodata'));echo '</td></tr></table>';echo '<p>after notify</p>';
 
         } else {
             if (empty($CFG->gdversion)) {
-                echo '<div align="center">(' . get_string("gdneed") .')</div>';
+                echo '<div class="boxaligncenter">(' . get_string("gdneed") .')</div>';
             } else {
-                echo '<div align="center"><img alt="'.get_string('courseoverviewgraph').'" src="'.$CFG->wwwroot.'/'.$CFG->admin.'/report/courseoverview/reportsgraph.php?time='.$time.'&report='.$report.'&numcourses='.$numcourses.'" /></div>';
+                echo '<div class="boxaligncenter"><img alt="'.get_string('courseoverviewgraph').'" src="'.$CFG->wwwroot.'/'.$CFG->admin.'/report/courseoverview/reportsgraph.php?time='.$time.'&report='.$report.'&numcourses='.$numcourses.'" /></div>';
             }
 
             $table = new StdClass;
             print_table($table);
         }
     }
-
     admin_externalpage_print_footer($adminroot);
 
-?>
+?>
\ No newline at end of file
index fbacaff..767f7e0 100644 (file)
@@ -2596,9 +2596,9 @@ function admin_externalpage_print_header($adminroot) {
     if (!empty($SITE->fullname)) {
         $pageblocks = blocks_setup($PAGE);
 
-        $preferred_width_left = bounded_number(BLOCK_L_MIN_WIDTH, blocks_preferred_width($pageblocks[BLOCK_POS_LEFT]),
+        $preferred_width_left = bounded_number(BLOCK_L_MIN_WIDTH,
+                                               blocks_preferred_width($pageblocks[BLOCK_POS_LEFT]),
                                                BLOCK_L_MAX_WIDTH);
-
         $PAGE->print_header();
         echo '<table id="layout-table"><tr>';
         echo '<td style="width: ' . $preferred_width_left . 'px;" id="left-column">';
@@ -2608,7 +2608,6 @@ function admin_externalpage_print_header($adminroot) {
     } else {
         print_header();
     }
-
 }
 
 function admin_externalpage_print_footer($adminroot) {
@@ -2617,14 +2616,14 @@ function admin_externalpage_print_footer($adminroot) {
 
     if (!empty($SITE->fullname)) {
         $pageblocks = blocks_setup($PAGE);
-        $preferred_width_right = bounded_number(BLOCK_R_MIN_WIDTH, blocks_preferred_width($pageblocks[BLOCK_POS_RIGHT]),
+        $preferred_width_right = bounded_number(BLOCK_R_MIN_WIDTH,
+                                                blocks_preferred_width($pageblocks[BLOCK_POS_RIGHT]),
                                                 BLOCK_R_MAX_WIDTH);
         echo '</td>';
         echo '<td style="width: ' . $preferred_width_right . 'px;" id="right-column">';
         blocks_print_group($PAGE, $pageblocks, BLOCK_POS_RIGHT);
         echo '</td></tr></table>';
     }
-
     print_footer();
 }