Ejemplo n.º 1
0
 static function pset_list($contact, $reverse)
 {
     global $Conf;
     $psets = array();
     $istf = $contact && ($contact === true || $contact->isPC);
     $ischair = $contact instanceof Contact && $contact->privChair;
     foreach ($Conf->psets() as $pset) {
         if (Contact::student_can_see_pset($pset) || !$pset->disabled && $pset->gitless && $istf || !$pset->ui_disabled && $ischair) {
             $psets[$pset->id] = $pset;
         }
     }
     self::$_reverse_pset_compare = !!$reverse;
     uasort($psets, "ContactView::pset_compare");
     return $psets;
 }