|
|
|
@ -808,18 +808,18 @@ function getQuestions( |
|
|
|
$sql = "SELECT DISTINCT |
|
|
|
$sql = "SELECT DISTINCT |
|
|
|
$select |
|
|
|
$select |
|
|
|
FROM |
|
|
|
FROM |
|
|
|
$TBL_QUESTIONS as qu, |
|
|
|
$TBL_QUESTIONS as qu |
|
|
|
$TBL_EXERCISE_QUESTION as qt, |
|
|
|
INNER JOIN $TBL_EXERCISE_QUESTION as qt |
|
|
|
$TBL_EXERCISES as q |
|
|
|
ON (qu.id = qt.question_id AND qu.c_id = qt.c_id) |
|
|
|
|
|
|
|
INNER JOIN $TBL_EXERCISES as q |
|
|
|
|
|
|
|
ON (q.c_id = qu.c_id AND q.id = qt.exercice_id) |
|
|
|
{$efConditions['from']} |
|
|
|
{$efConditions['from']} |
|
|
|
$from |
|
|
|
$from |
|
|
|
WHERE |
|
|
|
WHERE |
|
|
|
qu.c_id = $selected_course AND |
|
|
|
qu.c_id = $selected_course AND |
|
|
|
qt.c_id = $selected_course AND |
|
|
|
qt.c_id = $selected_course AND |
|
|
|
q.c_id = $selected_course AND |
|
|
|
q.c_id = $selected_course |
|
|
|
qu.id = qt.question_id |
|
|
|
$sessionCondition |
|
|
|
$sessionCondition AND |
|
|
|
|
|
|
|
q.id = qt.exercice_id |
|
|
|
|
|
|
|
$filter |
|
|
|
$filter |
|
|
|
$currentExerciseCondition |
|
|
|
$currentExerciseCondition |
|
|
|
{$efConditions['where']} |
|
|
|
{$efConditions['where']} |
|
|
|
|