optional_variable($lastinitial, ""); // only show students with this last initial
optional_variable($firstinitial, ""); // only show students with this first initial
optional_variable($perpage, "20"); // how many per page
- optional_variable($_GET['format'], ''); // 'brief' for less details, '' for more
-
- $compactmode = ($_GET['format'] == 'brief');
+ $format = optional_param('format', ''); // 'brief' for less details, '' for more
+ $compactmode = ($format == 'brief');
if (! $course = get_record("course", "id", $id)) {
error("Course ID is incorrect");
'brief' => get_string('detailedless'),
);
// [pj] Oh, the things I do to put it in one line... :P
- echo str_replace('<form', '<form style="display: inline;"', popup_form ("index.php?id=$id&format=", $formatmenu, 'formatmenu', $_GET['format'], '', '', '', true));
+ echo str_replace('<form', '<form style="display: inline;"', popup_form ("index.php?id=$id&format=", $formatmenu, 'formatmenu', $format, '', '', '', true));
echo '</div>';
$exceptions = ''; // This will be a list of userids that are shown as teachers and thus
function print_user_table($users, $isteacher) {
// Print one big table with abbreviated info
- global $sort, $course, $dir, $CFG;
+ global $format, $sort, $course, $dir, $CFG;
$columns = array("firstname", "lastname", "city", "country", "lastaccess");
}
$columnicon = " <img src=\"$CFG->pixpath/t/$columnicon.gif\" alt=\"\"/>";
}
- $$column = "<a href=\"index.php?id=$course->id&sort=$column&dir=$columndir\">".$colname["$column"]."</a>$columnicon";
+ $$column = "<a href=\"index.php?id=$course->id&sort=$column&dir=$columndir&format=$format\">".$colname["$column"]."</a>$columnicon";
}
foreach ($users as $key => $user) {