예제 #1
0
     require_once FS_PHP . '/footer-external.php';
 } else {
     $general = $model->listGeneralQuestionnaire();
     $particular = $model->listParticularQuestionnaire($student['0']['survey_sent_on_service_id']);
     if (!isset($_GET['page'])) {
         if ($student['0']['completed']) {
             header("Location: questionnaire.php?page=complete&user={$user}");
             exit;
         } else {
             require_once 'l10n/questionnaire.php';
             require_once FS_PHP . '/header-external.php';
             require_once 'views/questionnaire.php';
             require_once FS_PHP . '/footer-external.php';
         }
     } elseif ($_GET['page'] === "add") {
         $questionAnswer_id = $model->addQuestionAnswer($_POST);
         $model->addStudentQuestionAnswer($questionAnswer_id, $student['0']['list_id']);
         $model->updateStudentList($student['0']['list_id']);
         echo $_GET['user'];
     } elseif ($_GET['page'] === "complete") {
         if ($student['0']['completed']) {
             if ($model->checkOtherSurvey($_GET['user'])) {
                 $newQues = $model->fetchOtherSurvey($_GET['user']);
             }
             $l10n->addResource(__DIR__ . '/l10n/questionnaire_next.json');
             $l10n->localizeArray($session, 'transcription_session');
             $l10n->localizeArray($student[0], 'transcription_service');
             $l10n->localizeArray($newQues[0], 'transcription_service');
             require_once FS_PHP . '/header-external.php';
             require_once 'views/questionnaire_next.php';
             require_once FS_PHP . '/footer-external.php';