ILIAS  Release_4_4_x_branch Revision 61816
 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 1051 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;
}