$strparticipation = get_string('participationreport');
$strviews = get_string('views');
$strposts = get_string('posts');
$strreports = get_string('reports');
$actionoptions = report_participation_get_action_options();
if (!array_key_exists($action, $actionoptions)) {
    $action = '';
}
$PAGE->set_title($course->shortname . ': ' . $strparticipation);
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();
$uselegacyreader = false;
// Use legacy reader with sql_internal_reader to aggregate records.
$onlyuselegacyreader = false;
// Use only legacy log table to aggregate records.
$logtable = report_participation_get_log_table_name();
// Log table to use for fetaching records.
// If no log table, then use legacy records.
if (empty($logtable)) {
    $onlyuselegacyreader = true;
}
// If no legacy and no logtable then don't proceed.
if (!$onlyuselegacyreader && empty($logtable)) {
    echo $OUTPUT->box_start('generalbox', 'notice');
    echo get_string('nologreaderenabled', 'report_participation');
    echo $OUTPUT->box_end();
    echo $OUTPUT->footer();
    die;
}
$modinfo = get_fast_modinfo($course);
$minloginternalreader = 0;
Beispiel #2
0
$strposts         = get_string('posts');
$strreports       = get_string('reports');

$actionoptions = report_participation_get_action_options();
if (!array_key_exists($action, $actionoptions)) {
    $action = '';
}

$PAGE->set_title($course->shortname .': '. $strparticipation);
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();

$uselegacyreader = false; // Use legacy reader with sql_internal_reader to aggregate records.
$onlyuselegacyreader = false; // Use only legacy log table to aggregate records.

$logtable = report_participation_get_log_table_name(); // Log table to use for fetaching records.

// If no log table, then use legacy records.
if (empty($logtable)) {
    $onlyuselegacyreader = true;
}

// If no legacy and no logtable then don't proceed.
if (!$onlyuselegacyreader && empty($logtable)) {
    echo $OUTPUT->box_start('generalbox', 'notice');
    echo get_string('nologreaderenabled', 'report_participation');
    echo $OUTPUT->box_end();
    echo $OUTPUT->footer();
    die();
}