X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fprofile%2Fgroups.inc.php;h=2d7caaa3be9738ad0361b5cec2711ee3d039e7bd;hb=ce0d7be772306674fadaf020511871aba1683816;hp=62489ed6f537254da82b08f7ffe71ca783eab4bd;hpb=f41cf52561b924bb15a6f8e23d33e72d09dab3c8;p=platal.git diff --git a/modules/profile/groups.inc.php b/modules/profile/groups.inc.php index 62489ed..2d7caaa 100644 --- a/modules/profile/groups.inc.php +++ b/modules/profile/groups.inc.php @@ -1,6 +1,6 @@ pid()); + ($value == 0) ? null : $value, $page->pid()); + } + + public function getText($value) { + $sectionsList = DirEnum::getOptions(DirEnum::SECTIONS); + return $sectionsList[$value]; } } @@ -85,9 +90,13 @@ class ProfileSettingBinets implements ProfileSetting XDB::execute("INSERT INTO profile_binets (pid, binet_id) VALUES " . implode(',', $insert)); } + + public function getText($value) { + return implode(', ', $value); + } } -class ProfileSettingGroups extends ProfilePage +class ProfilePageGroups extends ProfilePage { protected $pg_template = 'profile/groups.tpl'; @@ -113,7 +122,7 @@ class ProfileSettingGroups extends ProfilePage WHERE a.inscriptible != 0 AND (a.cat = 'GroupesX' OR a.cat = 'Institutions') ORDER BY a.cat, a.dom, a.nom")); - $page->assign('old', (int) date('Y') >= $page->profile->grad_year); + $page->assign('old', (int) date('Y') >= $this->profile->grad_year); } }