コード例 #1
0
ファイル: sysadmin.php プロジェクト: nubissurveying/nubis
 function showRemoveGroupRes()
 {
     /* update last page */
     $_SESSION['LASTPAGE'] = 'sysadmin.survey.section';
     $displaySysAdmin = new DisplaySysAdmin();
     $survey = new Survey($_SESSION['SUID']);
     $gid = getFromSessionParams('gid');
     if ($gid != '') {
         //edit
         $group = $survey->getGroup($gid);
         $group->remove();
         /* compile */
         $compiler = new Compiler($_SESSION['SUID'], getSurveyVersion($survey));
         $mess = $compiler->generateGroups(array($group), true);
         //$mess = $compiler->generateGetFillsGroups();
         return $displaySysAdmin->showSection($_SESSION['SEID'], $displaySysAdmin->displaySuccess(Language::messageGroupRemoved($group->getName())));
     } else {
         return $displaySysAdmin->showSection($_SESSION['SEID']);
     }
 }