ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilTestServiceGUI.php File Reference

Go to the source code of this file.

Data Structures

class  ilTestServiceGUI
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...
 

Functions

 sortResults ($a, $b)
 

Function Documentation

◆ sortResults()

sortResults (   $a,
  $b 
)

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

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

1299 {
1300  $sort = ($_GET["sort"]) ? ($_GET["sort"]) : "nr";
1301  $sortorder = ($_GET["sortorder"]) ? ($_GET["sortorder"]) : "asc";
1302  if (strcmp($sortorder, "asc")) {
1303  $smaller = 1;
1304  $greater = -1;
1305  } else {
1306  $smaller = -1;
1307  $greater = 1;
1308  }
1309  if ($a[$sort] == $b[$sort]) {
1310  return 0;
1311  }
1312  return ($a[$sort] < $b[$sort]) ? $smaller : $greater;
1313 }
$_GET["client_id"]
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples