diff --git a/course/lib.php b/course/lib.php index 2908d2d70a1..15b4a6710d3 100644 --- a/course/lib.php +++ b/course/lib.php @@ -582,15 +582,30 @@ function print_log($course, $user=0, $date=0, $order="l.time ASC", $page=0, $per print_string("displayingrecords", "", $totalcount); echo "

"; + print_paging_bar($totalcount, $page, $perpage, "$url&perpage=$perpage&"); - echo ''; + echo '
'; + echo ''; + if ($course->id == SITEID) { + echo ''; + } + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + + $row = 1; foreach ($logs as $log) { + $row = ($row + 1) % 2; + if (isset($ldcache[$log->module][$log->action])) { $ld = $ldcache[$log->module][$log->action]; } else { - $ld = get_record('log_display', 'module', $log->module, "action", $log->action); + $ld = get_record('log_display', 'module', $log->module, 'action', $log->action); $ldcache[$log->module][$log->action] = $ld; } if ($ld && !empty($log->info)) { @@ -609,21 +624,21 @@ function print_log($course, $user=0, $date=0, $order="l.time ASC", $page=0, $per $log->info = strip_tags(urldecode($log->info)); // Some XSS protection $log->url = str_replace('&', '&', $log->url); /// XHTML compatibility - echo ''; - if (! $course->category) { - echo ''; + echo ''; + if ($course->id == SITEID) { + echo ''; } - echo ''; - echo ''; - echo ''; + echo ''; + echo ''; $fullname = fullname($log, $isteacher); - echo ''; - echo ''; + echo ''; - echo ''; + echo ''; + echo ''; echo ''; } echo '
'.get_string('course').''.get_string('time').''.get_string('ip_address').''.get_string('fullname').''.get_string('action').''.get_string('info').'
'.$courses[$log->course].'
'.$courses[$log->course].''.userdate($log->time, '%a').''.userdate($log->time, $strftimedatetime).''; + echo ''.userdate($log->time, '%a'). + ' '.userdate($log->time, $strftimedatetime).''; link_to_popup_window("/lib/ipatlas/plot.php?address=$log->ip&user=$log->userid", 'ipatlas',$log->ip, 400, 700); - echo 'userid&course=$log->course".'">'.$fullname.''; + echo 'userid&course=$log->course".'">'.$fullname.''; link_to_popup_window( make_log_url($log->module,$log->url), 'fromloglive',"$log->module $log->action", 400, 600); - echo ''.$log->info.''.$log->info.'
'; diff --git a/theme/standard/styles_color.css b/theme/standard/styles_color.css index 7c9fafd9a30..51cb66e8b4d 100644 --- a/theme/standard/styles_color.css +++ b/theme/standard/styles_color.css @@ -453,6 +453,14 @@ table.message_search_results td { .message .content { } +/*** + *** Logs + ***/ + +.logtable .r1 { + background-color:#EEEEEE; +} + /*** *** Tabs diff --git a/theme/standard/styles_fonts.css b/theme/standard/styles_fonts.css index a2319c062b4..7a8c52d2f49 100644 --- a/theme/standard/styles_fonts.css +++ b/theme/standard/styles_fonts.css @@ -348,6 +348,18 @@ body#doc-contents ul { } +/*** + *** Logs + ***/ + +.logtable td { + font-size: 0.8em; +} +.logtable th { + font-size: 0.9em; +} + + /*** *** Message ***/ diff --git a/theme/standard/styles_layout.css b/theme/standard/styles_layout.css index eada59743fd..389b275bd6a 100644 --- a/theme/standard/styles_layout.css +++ b/theme/standard/styles_layout.css @@ -807,6 +807,20 @@ body#message-messages { } +/*** + *** Logs + ***/ + +.logtable td, +.logtable th { + padding-left: 10px; + padding-right: 10px; +} + +.logtable th { + text-align:left; +} + /*** *** Tabs ***/