ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules 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()

sortResults (   $a,
  $b 
)

Definition at line 1051 of file class.ilTestServiceGUI.php.

References $_GET.

1052 {
1053  $sort = ($_GET["sort"]) ? ($_GET["sort"]) : "nr";
1054  $sortorder = ($_GET["sortorder"]) ? ($_GET["sortorder"]) : "asc";
1055  if (strcmp($sortorder, "asc"))
1056  {
1057  $smaller = 1;
1058  $greater = -1;
1059  }
1060  else
1061  {
1062  $smaller = -1;
1063  $greater = 1;
1064  }
1065  if ($a[$sort] == $b[$sort]) return 0;
1066  return ($a[$sort] < $b[$sort]) ? $smaller : $greater;
1067 }
$_GET["client_id"]