Пример #1
0
            }
            exit;
        case 'downloadasexcel':
            if (!print_log_xls($course, $user, $date, 'l.time DESC', $modname, $modid, $modaction, $group)) {
                notify("No logs found!");
                print_footer($course);
            }
            exit;
    }
} else {
    if ($hostid != $CFG->mnet_localhost_id || $hostid == $CFG->mnet_localhost_id && $course->id == SITEID) {
        $adminroot = admin_get_root();
        admin_externalpage_setup('reportlog', $adminroot);
        admin_externalpage_print_header($adminroot);
    } else {
        print_header($course->shortname . ': ' . $strlogs, $course->fullname, "<a href=\"{$CFG->wwwroot}/course/view.php?id={$course->id}\">{$course->shortname}</a> -> \n                      <a href=\"{$CFG->wwwroot}/course/report.php?id={$course->id}\">{$strreports}</a> ->\n                      {$strlogs}", '');
    }
    print_heading(get_string('chooselogs') . ':');
    print_log_selector_form($course, $user, $date, $modname, $modid, $modaction, $group, $showcourses, $showusers, $logformat);
    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>';
}
if ($hostid != $CFG->mnet_localhost_id || $course->id == SITEID) {
    admin_externalpage_print_footer($adminroot);
} else {
    print_footer($course);
}
exit;
Пример #2
0
<?php

// $Id$
if (!defined('MOODLE_INTERNAL')) {
    die('Direct access to this script is forbidden.');
    ///  It must be included from a Moodle page
}
require_once $CFG->dirroot . '/course/lib.php';
require_once $CFG->dirroot . '/course/report/log/lib.php';
if (has_capability('coursereport/log:view', $context)) {
    echo $OUTPUT->heading(get_string('chooselogs') . ':');
    print_log_selector_form($course);
}
if (has_capability('coursereport/log:viewlive', $context)) {
    echo $OUTPUT->heading(get_string('chooselivelogs') . ':');
    echo '<p>';
    $link = html_link::make('/course/report/log/live.php?id=' . $course->id, get_string('livelogs'));
    $link->add_action(new popup_action('click', $link->url, 'livelog', array('height' => 500, 'width' => 800)));
    echo $OUTPUT->link($link);
    echo '</p>';
}