mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +02:00
Merge branch '23STABLE-wip-MDL-35694' of git://github.com/jennymgray/moodle into MOODLE_23_STABLE
This commit is contained in:
commit
c116bd70a0
1 changed files with 7 additions and 3 deletions
|
@ -531,7 +531,7 @@ function print_mnet_log($hostid, $course, $user=0, $date=0, $order="l.time ASC",
|
||||||
|
|
||||||
function print_log_csv($course, $user, $date, $order='l.time DESC', $modname,
|
function print_log_csv($course, $user, $date, $order='l.time DESC', $modname,
|
||||||
$modid, $modaction, $groupid) {
|
$modid, $modaction, $groupid) {
|
||||||
global $DB;
|
global $DB, $CFG;
|
||||||
|
|
||||||
$text = get_string('course')."\t".get_string('time')."\t".get_string('ip_address')."\t".
|
$text = get_string('course')."\t".get_string('time')."\t".get_string('ip_address')."\t".
|
||||||
get_string('fullnameuser')."\t".get_string('action')."\t".get_string('info');
|
get_string('fullnameuser')."\t".get_string('action')."\t".get_string('info');
|
||||||
|
@ -600,6 +600,8 @@ function print_log_csv($course, $user, $date, $order='l.time DESC', $modname,
|
||||||
$firstField = format_string($courses[$log->course], true, array('context' => $coursecontext));
|
$firstField = format_string($courses[$log->course], true, array('context' => $coursecontext));
|
||||||
$fullname = fullname($log, has_capability('moodle/site:viewfullnames', $coursecontext));
|
$fullname = fullname($log, has_capability('moodle/site:viewfullnames', $coursecontext));
|
||||||
$row = array($firstField, userdate($log->time, $strftimedatetime), $log->ip, $fullname, $log->module.' '.$log->action, $log->info);
|
$row = array($firstField, userdate($log->time, $strftimedatetime), $log->ip, $fullname, $log->module.' '.$log->action, $log->info);
|
||||||
|
$actionurl = $CFG->wwwroot. make_log_url($log->module,$log->url);
|
||||||
|
$row = array($firstField, userdate($log->time, $strftimedatetime), $log->ip, $fullname, $log->module.' '.$log->action.' ('.$actionurl.')', $log->info);
|
||||||
$text = implode("\t", $row);
|
$text = implode("\t", $row);
|
||||||
echo $text." \n";
|
echo $text." \n";
|
||||||
}
|
}
|
||||||
|
@ -710,7 +712,8 @@ function print_log_xls($course, $user, $date, $order='l.time DESC', $modname,
|
||||||
$myxls->write($row, 2, $log->ip, '');
|
$myxls->write($row, 2, $log->ip, '');
|
||||||
$fullname = fullname($log, has_capability('moodle/site:viewfullnames', $coursecontext));
|
$fullname = fullname($log, has_capability('moodle/site:viewfullnames', $coursecontext));
|
||||||
$myxls->write($row, 3, $fullname, '');
|
$myxls->write($row, 3, $fullname, '');
|
||||||
$myxls->write($row, 4, $log->module.' '.$log->action, '');
|
$actionurl = $CFG->wwwroot. make_log_url($log->module,$log->url);
|
||||||
|
$myxls->write($row, 4, $log->module.' '.$log->action.' ('.$actionurl.')', '');
|
||||||
$myxls->write($row, 5, $log->info, '');
|
$myxls->write($row, 5, $log->info, '');
|
||||||
|
|
||||||
$row++;
|
$row++;
|
||||||
|
@ -823,7 +826,8 @@ function print_log_ods($course, $user, $date, $order='l.time DESC', $modname,
|
||||||
$myxls->write_string($row, 2, $log->ip);
|
$myxls->write_string($row, 2, $log->ip);
|
||||||
$fullname = fullname($log, has_capability('moodle/site:viewfullnames', $coursecontext));
|
$fullname = fullname($log, has_capability('moodle/site:viewfullnames', $coursecontext));
|
||||||
$myxls->write_string($row, 3, $fullname);
|
$myxls->write_string($row, 3, $fullname);
|
||||||
$myxls->write_string($row, 4, $log->module.' '.$log->action);
|
$actionurl = $CFG->wwwroot. make_log_url($log->module,$log->url);
|
||||||
|
$myxls->write_string($row, 4, $log->module.' '.$log->action.' ('.$actionurl.')');
|
||||||
$myxls->write_string($row, 5, $log->info);
|
$myxls->write_string($row, 5, $log->info);
|
||||||
|
|
||||||
$row++;
|
$row++;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue