delete(); } // destruction of the Question object unset($objQuestionTmp); } // gets an existing question and copies it into a new exercise elseif($recup && $fromExercise) { // if the question exists if($objQuestionTmp = Question :: read($recup)) { // adds the exercise ID represented by $fromExercise into the list of exercises for the current question $objQuestionTmp->addToList($fromExercise); } // destruction of the Question object unset($objQuestionTmp); // adds the question ID represented by $recup into the list of questions for the current exercise $objExercise->addToList($recup); api_session_register('objExercise'); header("Location: admin.php?exerciseId=$fromExercise"); exit(); } } $nameTools=get_lang('QuestionPool'); $interbreadcrumb[]=array("url" => "exercice.php","name" => get_lang('Exercices')); // if admin of course if($is_allowedToEdit) { Display::display_header($nameTools,"Exercise"); ?>

0) { $sql="SELECT id,question,type FROM $TBL_EXERCICE_QUESTION,$TBL_QUESTIONS WHERE question_id=id AND exercice_id='$exerciseId' ORDER BY position"; } // if we have selected the option 'Orphan questions' in the list-box 'Filter' elseif($exerciseId == -1) { $sql='SELECT id, question, type, exercice_id FROM '.$TBL_QUESTIONS.' as questions LEFT JOIN '.$TBL_EXERCICE_QUESTION.' as quizz_questions ON questions.id=quizz_questions.question_id AND exercice_id IS NULL'; } // if we have not selected any option in the list-box 'Filter' else { $sql="SELECT id,question,type FROM $TBL_QUESTIONS"; // forces the value to 0 $exerciseId=0; } $result=api_sql_query($sql,__FILE__,__LINE__); $nbrQuestions=mysql_num_rows($result); ?> isInList($row[id])) { ?> >
:
<< << | $limitQuestPage) { ?> << | $limitQuestPage) { ?> >> >>
<?php echo get_lang('Modify'); ?> <?php echo get_lang('Reuse'); ?> <?php echo get_lang('Delete'); ?>