ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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 1265 of file class.ilTestServiceGUI.php.

References $_GET, Vendor\Package\$a, and Vendor\Package\$b.

1266 {
1267  $sort = ($_GET["sort"]) ? ($_GET["sort"]) : "nr";
1268  $sortorder = ($_GET["sortorder"]) ? ($_GET["sortorder"]) : "asc";
1269  if (strcmp($sortorder, "asc")) {
1270  $smaller = 1;
1271  $greater = -1;
1272  } else {
1273  $smaller = -1;
1274  $greater = 1;
1275  }
1276  if ($a[$sort] == $b[$sort]) {
1277  return 0;
1278  }
1279  return ($a[$sort] < $b[$sort]) ? $smaller : $greater;
1280 }
$_GET["client_id"]
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples