ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilTestServiceGUI.php File Reference

Go to the source code of this file.

Data Structures

class  ilTestServiceGUI
 Service GUI class for tests. More...

Functions

 sortResults ($a, $b)

Function Documentation

sortResults (   $a,
  $b 
)

Definition at line 1029 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;
}