]> git.mjollnir.org Git - moodle.git/commitdiff
Fixes for MDL-7861.
authorvyshane <vyshane>
Mon, 15 Jan 2007 07:59:28 +0000 (07:59 +0000)
committervyshane <vyshane>
Mon, 15 Jan 2007 07:59:28 +0000 (07:59 +0000)
admin/report/log/index.php
course/report/log/lib.php

index 94761326417c8cef304d92ed7d74d24853a6ac93..d89c533812fd716a3c57999c7fb9d6e2b15a271f 100644 (file)
     echo '<br />';
     print_heading(get_string('chooselivelogs') .':');
 
-    echo '<center><h3>';
-    link_to_popup_window('/course/report/log/live.php?id='. $course->id,'livelog', get_string('livelogs'), 500, 800);
-    echo '</h3></center>';
+    $heading = link_to_popup_window('/course/report/log/live.php?id='. $course->id,
+                                    'livelog', get_string('livelogs'),
+                                    500, 800, '', 'none', true);
+
+    print_heading($heading, 'center', 3);
 
 
     admin_externalpage_print_footer($adminroot);
 
-?>
+?>
\ No newline at end of file
index 4bbebde8f59124ef02577f99367d95c0f6a0b6a2..17b267c22b99e37d6029bff38938e15379133f9b 100644 (file)
@@ -84,10 +84,11 @@ function print_mnet_log_selector_form($hostid, $course, $selecteduser=0, $select
                 h.id = l.hostid
             order by
                 h.name";
-    $hosts = get_records_sql($sql);
 
-    foreach($hosts as $host) {
-        $hostarray[$host->id] = $host->name;
+    if ($hosts = get_records_sql($sql)) {
+        foreach($hosts as $host) {
+            $hostarray[$host->id] = $host->name;
+        }
     }
 
     $hostarray[$CFG->mnet_localhost_id] = $SITE->fullname;
@@ -212,8 +213,8 @@ function print_mnet_log_selector_form($hostid, $course, $selecteduser=0, $select
     }
 
     $cid = empty($course->id)? '1' : $course->id;
-    echo "<center>\n";
-    echo "<form action=\"$CFG->wwwroot/course/report/log/index.php\" method=\"get\">\n";
+    echo "<form class=\"mform\" action=\"$CFG->wwwroot/course/report/log/index.php\" method=\"get\">\n";
+    echo "<fieldset class=\"invisiblefieldset boxaligncenter\">\n";
     echo "<input type=\"hidden\" name=\"chooselog\" value=\"1\" />\n";
     echo "<input type=\"hidden\" name=\"showusers\" value=\"$showusers\" />\n";
     echo "<input type=\"hidden\" name=\"showcourses\" value=\"$showcourses\" />\n";
@@ -261,6 +262,7 @@ function print_mnet_log_selector_form($hostid, $course, $selecteduser=0, $select
         print_string('logtoomanyusers','moodle',$a);
     }
     choose_from_menu ($dates, "date", $selecteddate, get_string("alldays"));
+    echo '<br />';
     choose_from_menu ($activities, "modid", $selectedactivity, get_string("allactivities"), "", "");
     choose_from_menu ($actions, 'modaction', $modaction, get_string("allactions"));
     
@@ -275,8 +277,8 @@ function print_mnet_log_selector_form($hostid, $course, $selecteduser=0, $select
     */
     choose_from_menu ($logformats, 'logformat', $logformat, false);
     echo '<input type="submit" value="'.get_string('gettheselogs').'" />';
+    echo '</fieldset>';
     echo "</form>";
-    echo "</center>";
 }
 
 function print_log_selector_form($course, $selecteduser=0, $selecteddate='today',