|
|
|
|
@ -1261,9 +1261,9 @@ abstract class Question |
|
|
|
|
// checks if the exercise ID is not in the list |
|
|
|
|
if (!in_array($exerciseId, $this->exerciseList)) { |
|
|
|
|
$this->exerciseList[] = $exerciseId; |
|
|
|
|
$new_exercise = new Exercise(); |
|
|
|
|
$new_exercise->read($exerciseId); |
|
|
|
|
$count = $new_exercise->selectNbrQuestions(); |
|
|
|
|
$newExercise = new Exercise(); |
|
|
|
|
$newExercise->read($exerciseId, false); |
|
|
|
|
$count = $newExercise->getQuestionCount(); |
|
|
|
|
$count++; |
|
|
|
|
$sql = "INSERT INTO $exerciseRelQuestionTable (c_id, question_id, exercice_id, question_order) |
|
|
|
|
VALUES ({$this->course['real_id']}, ".intval($id).", ".intval($exerciseId).", '$count')"; |
|
|
|
|
|