Go to the source code of this file.
Data Structures | |
| class | ilTestServiceGUI |
| Service GUI class for tests. More... | |
Functions | |
| sortResults ($a, $b) | |
| sortResults | ( | $ | a, | |
| $ | b | |||
| ) |
Definition at line 870 of file class.ilTestServiceGUI.php.
References $_GET.
{
$sort = ($_GET["sort"]) ? ($_GET["sort"]) : "nr";
$sortorder = ($_GET["sortorder"]) ? ($_GET["sortorder"]) : "asc";
if (strcmp($sortorder, "asc"))
{
$smaller = 1;
$greater = -1;
}
else
{
$smaller = -1;
$greater = 1;
}
if ($a[$sort] == $b[$sort]) return 0;
return ($a[$sort] < $b[$sort]) ? $smaller : $greater;
}
1.7.1