|
@ -34,7 +34,9 @@ $download = optional_param('download', '', PARAM_ALPHA); |
|
|
$sort = optional_param('tsort', '', PARAM_ALPHA); |
|
|
$sort = optional_param('tsort', '', PARAM_ALPHA); |
|
|
$fromcourse = optional_param('fromcourse', 0, PARAM_INT); |
|
|
$fromcourse = optional_param('fromcourse', 0, PARAM_INT); |
|
|
|
|
|
|
|
|
|
|
|
$admin = false; |
|
|
if (empty($fromcourse)) { |
|
|
if (empty($fromcourse)) { |
|
|
|
|
|
$admin = true; |
|
|
admin_externalpage_setup('managemodules'); |
|
|
admin_externalpage_setup('managemodules'); |
|
|
} else { |
|
|
} else { |
|
|
require_login($fromcourse); |
|
|
require_login($fromcourse); |
|
@ -67,11 +69,18 @@ if (!$table->is_downloading($download, $exportfilename)) { |
|
|
$heading .= " (".$coursecat->name.")"; |
|
|
$heading .= " (".$coursecat->name.")"; |
|
|
} |
|
|
} |
|
|
echo $OUTPUT->heading($heading); |
|
|
echo $OUTPUT->heading($heading); |
|
|
if (empty($category)) { |
|
|
if ($admin) { |
|
|
// Only show tabs if displaying via the admin page. |
|
|
// Only show tabs if displaying via the admin page. |
|
|
$tabmenu = attendance_print_settings_tabs('coursesummary'); |
|
|
$tabmenu = attendance_print_settings_tabs('coursesummary'); |
|
|
echo $tabmenu; |
|
|
echo $tabmenu; |
|
|
} |
|
|
} |
|
|
|
|
|
$url = new moodle_url('/mod/attendance/coursesummary.php', array('category' => $category, 'fromcourse' => $fromcourse)); |
|
|
|
|
|
|
|
|
|
|
|
if ($admin) { |
|
|
|
|
|
$options = coursecat::make_categories_list('mod/attendance:viewsummaryreports'); |
|
|
|
|
|
echo $OUTPUT->single_select($url, 'category', $options, $category); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
$table->define_columns(array('course', 'percentage')); |
|
|
$table->define_columns(array('course', 'percentage')); |
|
|