Skip to content

Commit

Permalink
MDL-39888 mnet: Added a notification that logs may not be displayed i…
Browse files Browse the repository at this point in the history
…n the log report.

In Moodle 2.7+ we are using the new logging system and if legacy logs are not enabled
(on the client system) then no logs will be displayed.
  • Loading branch information
abgreeve committed Aug 23, 2014
1 parent b010921 commit ae18cf2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions report/log/index.php
Expand Up @@ -42,6 +42,7 @@
$logformat = optional_param('download', '', PARAM_ALPHA);
$logreader = optional_param('logreader', '', PARAM_COMPONENT); // Reader which will be used for displaying logs.
$edulevel = optional_param('edulevel', -1, PARAM_INT); // Educational level.
$hostcourse = optional_param('host_course', null, PARAM_INT); // MNet Course ID.

$params = array();
if ($id !== 0) {
Expand Down Expand Up @@ -160,6 +161,10 @@
$userinfo = get_string('allparticipants');
$dateinfo = get_string('alldays');

if ($hostcourse) {
echo $OUTPUT->notification(get_string('mnetlogwarning', 'report_log'));
}

if ($user) {
$u = $DB->get_record('user', array('id' => $user, 'deleted' => 0), '*', MUST_EXIST);
$userinfo = fullname($u, has_capability('moodle/site:viewfullnames', $context));
Expand All @@ -179,6 +184,9 @@
} else {
echo $output->header();
echo $output->heading(get_string('chooselogs') .':');
if ($hostcourse) {
echo $OUTPUT->notification(get_string('mnetlogwarning', 'report_log'));
}
echo $output->render($reportlog);
}
}
Expand Down
1 change: 1 addition & 0 deletions report/log/lang/en/report_log.php
Expand Up @@ -35,6 +35,7 @@
$string['log:viewtoday'] = 'View today\'s logs';
$string['page'] = 'Page {$a}';
$string['logsformat'] = 'Logs format';
$string['mnetlogwarning'] = 'If your MNet clients are running Moodle 2.7 or higher, then you may not receive any logs.';
$string['nologreaderenabled'] = 'No log reader enabled';
$string['page-report-log-x'] = 'Any log report';
$string['page-report-log-index'] = 'Course log report';
Expand Down

0 comments on commit ae18cf2

Please sign in to comment.