Minor - format code

remotes/angel/1.11.x
jmontoyaa 8 years ago
parent 41f82cbcda
commit 54815998df
  1. 9
      main/exercise/TestCategory.php
  2. 2
      main/exercise/exercise.class.php
  3. 16
      main/exercise/exercise_history.php
  4. 3
      main/exercise/exercise_show.php
  5. 157
      main/exercise/fill_blanks.class.php
  6. 29
      main/inc/lib/events.lib.php
  7. 59
      main/inc/lib/exercise.lib.php
  8. 11
      main/inc/lib/tracking.lib.php

@ -667,7 +667,7 @@ class TestCategory
*/ */
public static function getCatScoreForExeidForUserid($in_cat_id, $in_exe_id, $in_user_id) public static function getCatScoreForExeidForUserid($in_cat_id, $in_exe_id, $in_user_id)
{ {
$tbl_track_attempt = Database::get_statistic_table(TABLE_STATISTIC_TRACK_E_ATTEMPT); $tbl_track_attempt = Database::get_main_table(TABLE_STATISTIC_TRACK_E_ATTEMPT);
$tbl_question_rel_category = Database::get_course_table(TABLE_QUIZ_QUESTION_REL_CATEGORY); $tbl_question_rel_category = Database::get_course_table(TABLE_QUIZ_QUESTION_REL_CATEGORY);
$in_cat_id = intval($in_cat_id); $in_cat_id = intval($in_cat_id);
$in_exe_id = intval($in_exe_id); $in_exe_id = intval($in_exe_id);
@ -681,11 +681,12 @@ class TestCategory
qrc.category_id=$in_cat_id AND qrc.category_id=$in_cat_id AND
exe_id=$in_exe_id AND user_id=$in_user_id"; exe_id=$in_exe_id AND user_id=$in_user_id";
$res = Database::query($query); $res = Database::query($query);
$totalcatscore = ""; $score = '';
while ($data = Database::fetch_array($res)) { while ($data = Database::fetch_array($res)) {
$totalcatscore += $data['marks']; $score += $data['marks'];
} }
return $totalcatscore;
return $score;
} }
/** /**

@ -2658,7 +2658,7 @@ class Exercise
public function clean_results($cleanLpTests = false, $cleanResultBeforeDate = null) public function clean_results($cleanLpTests = false, $cleanResultBeforeDate = null)
{ {
$table_track_e_exercises = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES); $table_track_e_exercises = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
$table_track_e_attempt = Database::get_main_table(TABLE_STATISTIC_TRACK_E_ATTEMPT); $table_track_e_attempt = Database::get_main_table(TABLE_STATISTIC_TRACK_E_ATTEMPT);
$sql_where = ' AND $sql_where = ' AND
orig_lp_id = 0 AND orig_lp_id = 0 AND

@ -29,9 +29,9 @@ $interbreadcrumb[]= array ('url' => 'exercise_report.php?'.api_get_cidreq(),'nam
$interbreadcrumb[]= array ('url' => 'exercise_report.php?filter=2&'.api_get_cidreq(),'name' => get_lang('StudentScore')); $interbreadcrumb[]= array ('url' => 'exercise_report.php?filter=2&'.api_get_cidreq(),'name' => get_lang('StudentScore'));
$interbreadcrumb[]= array ('url' => 'exercise_history.php?exe_id='.intval($_GET['exe_id']).'&'.api_get_cidreq(), 'name' => get_lang('Details')); $interbreadcrumb[]= array ('url' => 'exercise_history.php?exe_id='.intval($_GET['exe_id']).'&'.api_get_cidreq(), 'name' => get_lang('Details'));
$TBL_USER = Database::get_main_table(TABLE_MAIN_USER); $TBL_USER = Database::get_main_table(TABLE_MAIN_USER);
$TBL_EXERCISES = Database::get_course_table(TABLE_QUIZ_TEST); $TBL_EXERCISES = Database::get_course_table(TABLE_QUIZ_TEST);
$TBL_EXERCISES_QUESTION = Database::get_course_table(TABLE_QUIZ_QUESTION); $TBL_EXERCISES_QUESTION = Database::get_course_table(TABLE_QUIZ_QUESTION);
$TBL_TRACK_ATTEMPT_RECORDING= Database::get_main_table(TABLE_STATISTIC_TRACK_E_ATTEMPT_RECORDING); $TBL_TRACK_ATTEMPT_RECORDING= Database::get_main_table(TABLE_STATISTIC_TRACK_E_ATTEMPT_RECORDING);
Display::display_header($nameTools,get_lang('Exercise')); Display::display_header($nameTools,get_lang('Exercise'));
@ -59,8 +59,14 @@ echo '</div>';
</tr> </tr>
<?php <?php
$sql = "SELECT *, quiz_question.question, firstname, lastname FROM $TBL_TRACK_ATTEMPT_RECORDING t, $TBL_USER,$TBL_EXERCISES_QUESTION quiz_question $sql = "SELECT *, quiz_question.question, firstname, lastname
WHERE quiz_question.id = question_id AND user_id = author AND exe_id = '".(int)$_GET['exe_id']."' ORDER BY position"; FROM $TBL_TRACK_ATTEMPT_RECORDING t, $TBL_USER,
$TBL_EXERCISES_QUESTION quiz_question
WHERE
quiz_question.id = question_id AND
user_id = author AND
exe_id = '".(int)$_GET['exe_id']."'
ORDER BY position";
$query = Database::query($sql); $query = Database::query($sql);
while($row = Database::fetch_array($query)){ while($row = Database::fetch_array($query)){
echo '<tr'; echo '<tr';

@ -580,7 +580,8 @@ foreach ($questionList as $questionId) {
} }
//showing the score //showing the score
$queryfree = "select marks from " . $TBL_TRACK_ATTEMPT . " WHERE exe_id = " . intval($id) . " and question_id= " . intval($questionId) . ""; $queryfree = "SELECT marks from " . $TBL_TRACK_ATTEMPT . "
WHERE exe_id = " . intval($id) . " AND question_id= " . intval($questionId) . "";
$resfree = Database::query($queryfree); $resfree = Database::query($queryfree);
$questionScore = Database::result($resfree, 0, "marks"); $questionScore = Database::result($resfree, 0, "marks");
$totalScore += $questionScore; $totalScore += $questionScore;

@ -759,74 +759,76 @@ class FillBlanks extends Question
$endDate, $endDate,
$useLastAnswerredAttempt = true $useLastAnswerredAttempt = true
) { ) {
$tblTrackEAttempt = Database::get_main_table(TABLE_STATISTIC_TRACK_E_ATTEMPT); $tblTrackEAttempt = Database::get_main_table(TABLE_STATISTIC_TRACK_E_ATTEMPT);
$tblTrackEExercise = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES); $tblTrackEExercise = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
$courseId = api_get_course_int_id(); $courseId = api_get_course_int_id();
// request to have all the answers of student for this question // request to have all the answers of student for this question
// student may have doing it several time // student may have doing it several time
// student may have not answered the bracket id, in this case, is result of the answer is empty // student may have not answered the bracket id, in this case, is result of the answer is empty
// we got the less recent attempt first
// we got the less recent attempt first $sql = 'SELECT * FROM '.$tblTrackEAttempt.' tea
$sql = ' LEFT JOIN '.$tblTrackEExercise.' tee
SELECT * FROM '.$tblTrackEAttempt.' tea ON tee.exe_id = tea.exe_id
LEFT JOIN '.$tblTrackEExercise.' tee AND tea.c_id = '.$courseId.'
ON tee.exe_id = tea.exe_id AND exe_exo_id = '.$testId.'
AND tea.c_id = '.$courseId.'
AND exe_exo_id = '.$testId.' WHERE
tee.c_id = '.$courseId.' AND
WHERE tee.c_id = '.$courseId.' question_id = '.$questionId.' AND
AND question_id = '.$questionId.' tea.user_id IN ('.implode(',', $studentsIdList).') AND
AND tea.user_id IN ('.implode(',', $studentsIdList).') tea.tms >= "'.$startDate.'" AND
AND tea.tms >= "'.$startDate.'" tea.tms <= "'.$endDate.'"
AND tea.tms <= "'.$endDate.'" ORDER BY user_id, tea.exe_id;
ORDER BY user_id, tea.exe_id; ';
';
$res = Database::query($sql);
$res = Database::query($sql); $tabUserResult = array();
$tabUserResult = array(); $bracketNumber = 0;
$bracketNumber = 0; // foreach attempts for all students starting with his older attempt
// foreach attempts for all students starting with his older attempt while ($data = Database::fetch_array($res)) {
while ($data = Database::fetch_array($res)) { $tabAnswer = FillBlanks::getAnswerInfo($data['answer'], true);
$tabAnswer = FillBlanks::getAnswerInfo($data['answer'], true);
// for each bracket to find in this question
// for each bracket to find in this question foreach ($tabAnswer['studentanswer'] as $bracketNumber => $studentAnswer) {
foreach ($tabAnswer['studentanswer'] as $bracketNumber => $studentAnswer) { if ($tabAnswer['studentanswer'][$bracketNumber] != '') {
// student has answered this bracket, cool
if ($tabAnswer['studentanswer'][$bracketNumber] != '') { switch (FillBlanks::getFillTheBlankAnswerType($tabAnswer['tabwords'][$bracketNumber])) {
// student has answered this bracket, cool case self::FILL_THE_BLANK_MENU:
switch (FillBlanks::getFillTheBlankAnswerType($tabAnswer['tabwords'][$bracketNumber])) { // get the indice of the choosen answer in the menu
case self::FILL_THE_BLANK_MENU : // we know that the right answer is the first entry of the menu, ie 0
// get the indice of the choosen answer in the menu // (remember, menu entries are shuffled when taking the test)
// we know that the right answer is the first entry of the menu, ie 0 $tabUserResult[$data['user_id']][$bracketNumber] = FillBlanks::getFillTheBlankMenuAnswerNum(
// (remember, menu entries are shuffled when taking the test) $tabAnswer['tabwords'][$bracketNumber],
$tabUserResult[$data['user_id']][$bracketNumber] = FillBlanks::getFillTheBlankMenuAnswerNum( $tabAnswer['studentanswer'][$bracketNumber]
$tabAnswer['tabwords'][$bracketNumber], );
$tabAnswer['studentanswer'][$bracketNumber] break;
); default:
break; if (FillBlanks::isGoodStudentAnswer(
default : $tabAnswer['studentanswer'][$bracketNumber],
if (FillBlanks::isGoodStudentAnswer($tabAnswer['studentanswer'][$bracketNumber], $tabAnswer['tabwords'][$bracketNumber])) { $tabAnswer['tabwords'][$bracketNumber]
$tabUserResult[$data['user_id']][$bracketNumber] = 0; // right answer )
} else { ) {
$tabUserResult[$data['user_id']][$bracketNumber] = -1; // wrong answer $tabUserResult[$data['user_id']][$bracketNumber] = 0; // right answer
} } else {
} $tabUserResult[$data['user_id']][$bracketNumber] = -1; // wrong answer
} else { }
// student didn't answer this bracket }
if ($useLastAnswerredAttempt) { } else {
// if we take into account the last answered attempt // student didn't answer this bracket
if (!isset($tabUserResult[$data['user_id']][$bracketNumber])) { if ($useLastAnswerredAttempt) {
$tabUserResult[$data['user_id']][$bracketNumber] = -2; // not answered // if we take into account the last answered attempt
} if (!isset($tabUserResult[$data['user_id']][$bracketNumber])) {
} else { $tabUserResult[$data['user_id']][$bracketNumber] = -2; // not answered
// we take the last attempt, even if the student answer the question before }
$tabUserResult[$data['user_id']][$bracketNumber] = -2; // not answered } else {
} // we take the last attempt, even if the student answer the question before
} $tabUserResult[$data['user_id']][$bracketNumber] = -2; // not answered
} }
} }
}
return $tabUserResult; }
return $tabUserResult;
} }
/** /**
@ -838,16 +840,17 @@ class FillBlanks extends Question
{ {
$outRes = 0; $outRes = 0;
// for each student in group // for each student in group
foreach($resultList as $userId => $tabValue) { foreach ($resultList as $userId => $tabValue) {
$trouve = false; $found = false;
// for each bracket, if student has at leat one answer ( choice > -2) then he pass the question // for each bracket, if student has at least one answer ( choice > -2) then he pass the question
foreach($tabValue as $i => $choice) { foreach ($tabValue as $i => $choice) {
if ($choice > -2 && !$trouve) { if ($choice > -2 && !$found) {
$outRes++; $outRes++;
$trouve = true; $found = true;
} }
} }
} }
return $outRes; return $outRes;
} }
@ -1044,8 +1047,11 @@ class FillBlanks extends Question
* *
* @return string * @return string
*/ */
public static function getHtmlDisplayForAnswer($answer, $resultsDisabled = false, $showTotalScoreAndUserChoices = false) public static function getHtmlDisplayForAnswer(
{ $answer,
$resultsDisabled = false,
$showTotalScoreAndUserChoices = false
) {
$result = ''; $result = '';
$listStudentAnswerInfo = self::getAnswerInfo($answer, true); $listStudentAnswerInfo = self::getAnswerInfo($answer, true);
@ -1075,7 +1081,6 @@ class FillBlanks extends Question
} }
} }
// rebuild the sentence with student answer inserted // rebuild the sentence with student answer inserted
for ($i=0; $i < count($listStudentAnswerInfo['commonwords']); $i++) { for ($i=0; $i < count($listStudentAnswerInfo['commonwords']); $i++) {
$result .= isset($listStudentAnswerInfo['commonwords'][$i]) ? $listStudentAnswerInfo['commonwords'][$i] : ''; $result .= isset($listStudentAnswerInfo['commonwords'][$i]) ? $listStudentAnswerInfo['commonwords'][$i] : '';

@ -1203,7 +1203,8 @@ class Event
$list = array(); $list = array();
while ($row = Database::fetch_array($res, 'ASSOC')) { while ($row = Database::fetch_array($res, 'ASSOC')) {
$list[$row['exe_id']] = $row; $list[$row['exe_id']] = $row;
$sql = "SELECT * FROM $table_track_attempt WHERE exe_id = {$row['exe_id']}"; $sql = "SELECT * FROM $table_track_attempt
WHERE exe_id = {$row['exe_id']}";
$res_question = Database::query($sql); $res_question = Database::query($sql);
while ($row_q = Database::fetch_array($res_question, 'ASSOC')) { while ($row_q = Database::fetch_array($res_question, 'ASSOC')) {
$list[$row['exe_id']]['question_list'][$row_q['question_id']] = $row_q; $list[$row['exe_id']]['question_list'][$row_q['question_id']] = $row_q;
@ -1243,7 +1244,8 @@ class Event
$list = array(); $list = array();
while ($row = Database::fetch_array($res, 'ASSOC')) { while ($row = Database::fetch_array($res, 'ASSOC')) {
$list[$row['exe_id']] = $row; $list[$row['exe_id']] = $row;
$sql = "SELECT * FROM $table_track_attempt WHERE exe_id = {$row['exe_id']}"; $sql = "SELECT * FROM $table_track_attempt
WHERE exe_id = {$row['exe_id']}";
$res_question = Database::query($sql); $res_question = Database::query($sql);
while ($row_q = Database::fetch_array($res_question, 'ASSOC')) { while ($row_q = Database::fetch_array($res_question, 'ASSOC')) {
$list[$row['exe_id']]['question_list'][$row_q['question_id']] = $row_q; $list[$row['exe_id']]['question_list'][$row_q['question_id']] = $row_q;
@ -1279,7 +1281,8 @@ class Event
//Checking if this attempt was revised by a teacher //Checking if this attempt was revised by a teacher
$sql_revised = 'SELECT exe_id FROM '.$table_track_attempt_recording.' $sql_revised = 'SELECT exe_id FROM '.$table_track_attempt_recording.'
WHERE author != "" AND exe_id = '.$exe_id.' LIMIT 1'; WHERE author != "" AND exe_id = '.$exe_id.'
LIMIT 1';
$res_revised = Database::query($sql_revised); $res_revised = Database::query($sql_revised);
$row['attempt_revised'] = 0; $row['attempt_revised'] = 0;
if (Database::num_rows($res_revised) > 0) { if (Database::num_rows($res_revised) > 0) {
@ -1287,7 +1290,8 @@ class Event
} }
$list[$exe_id] = $row; $list[$exe_id] = $row;
$sql = "SELECT * FROM $table_track_attempt $sql = "SELECT * FROM $table_track_attempt
WHERE exe_id = $exe_id ORDER BY tms ASC"; WHERE exe_id = $exe_id
ORDER BY tms ASC";
$res_question = Database::query($sql); $res_question = Database::query($sql);
while ($row_q = Database::fetch_array($res_question, 'ASSOC')) { while ($row_q = Database::fetch_array($res_question, 'ASSOC')) {
$list[$exe_id]['question_list'][$row_q['question_id']] = $row_q; $list[$exe_id]['question_list'][$row_q['question_id']] = $row_q;
@ -1346,7 +1350,7 @@ class Event
$res = Database::query($sql); $res = Database::query($sql);
$list = array(); $list = array();
while ($row = Database::fetch_array($res, 'ASSOC')) { while ($row = Database::fetch_array($res, 'ASSOC')) {
//Checking if this attempt was revised by a teacher // Checking if this attempt was revised by a teacher
$sql = 'SELECT exe_id FROM '.$table_track_attempt_recording.' $sql = 'SELECT exe_id FROM '.$table_track_attempt_recording.'
WHERE author != "" AND exe_id = '.$row['exe_id'].' WHERE author != "" AND exe_id = '.$row['exe_id'].'
LIMIT 1'; LIMIT 1';
@ -1432,7 +1436,8 @@ class Event
$list = array(); $list = array();
while ($row = Database::fetch_array($res, 'ASSOC')) { while ($row = Database::fetch_array($res, 'ASSOC')) {
$list[$row['exe_id']] = $row; $list[$row['exe_id']] = $row;
$sql = "SELECT * FROM $table_track_attempt WHERE exe_id = {$row['exe_id']}"; $sql = "SELECT * FROM $table_track_attempt
WHERE exe_id = {$row['exe_id']}";
$res_question = Database::query($sql); $res_question = Database::query($sql);
while ($row_q = Database::fetch_array($res_question, 'ASSOC')) { while ($row_q = Database::fetch_array($res_question, 'ASSOC')) {
$list[$row['exe_id']]['question_list'][$row_q['question_id']] = $row_q; $list[$row['exe_id']]['question_list'][$row_q['question_id']] = $row_q;
@ -1597,7 +1602,8 @@ class Event
$list = array(); $list = array();
while ($row = Database::fetch_array($res, 'ASSOC')) { while ($row = Database::fetch_array($res, 'ASSOC')) {
$list[$row['exe_id']] = $row; $list[$row['exe_id']] = $row;
$sql = "SELECT * FROM $table_track_attempt WHERE exe_id = {$row['exe_id']}"; $sql = "SELECT * FROM $table_track_attempt
WHERE exe_id = {$row['exe_id']}";
$res_question = Database::query($sql); $res_question = Database::query($sql);
while ($row_q = Database::fetch_array($res_question, 'ASSOC')) { while ($row_q = Database::fetch_array($res_question, 'ASSOC')) {
$list[$row['exe_id']]['question_list'][$row_q['question_id']] = $row_q; $list[$row['exe_id']]['question_list'][$row_q['question_id']] = $row_q;
@ -1737,10 +1743,11 @@ class Event
} }
$sql = "DELETE FROM $table_track_attempt $sql = "DELETE FROM $table_track_attempt
WHERE hotspot_exe_id = $exe_id AND WHERE
hotspot_user_id = $user_id AND hotspot_exe_id = $exe_id AND
c_id = $courseId AND hotspot_user_id = $user_id AND
hotspot_question_id = $question_id "; c_id = $courseId AND
hotspot_question_id = $question_id ";
Database::query($sql); Database::query($sql);
Event::addEvent( Event::addEvent(
LOG_QUESTION_RESULT_DELETE, LOG_QUESTION_RESULT_DELETE,

@ -2865,14 +2865,9 @@ HOTSPOT;
$exercise_id, $exercise_id,
$course_code, $course_code,
$session_id $session_id
) ) {
{ $track_exercises = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
$track_exercises = Database::get_main_table( $track_attempt = Database::get_main_table(TABLE_STATISTIC_TRACK_E_ATTEMPT);
TABLE_STATISTIC_TRACK_E_EXERCISES
);
$track_attempt = Database::get_main_table(
TABLE_STATISTIC_TRACK_E_ATTEMPT
);
$question_id = intval($question_id); $question_id = intval($question_id);
$exercise_id = intval($exercise_id); $exercise_id = intval($exercise_id);
@ -2966,14 +2961,9 @@ HOTSPOT;
$course_code, $course_code,
$session_id, $session_id,
$questionType = '' $questionType = ''
) ) {
{ $track_exercises = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
$track_exercises = Database::get_main_table( $track_attempt = Database::get_main_table(TABLE_STATISTIC_TRACK_E_ATTEMPT);
TABLE_STATISTIC_TRACK_E_EXERCISES
);
$track_attempt = Database::get_main_table(
TABLE_STATISTIC_TRACK_E_ATTEMPT
);
$courseUser = Database::get_main_table(TABLE_MAIN_COURSE_USER); $courseUser = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$courseTable = Database::get_main_table(TABLE_MAIN_COURSE); $courseTable = Database::get_main_table(TABLE_MAIN_COURSE);
$courseUserSession = Database::get_main_table( $courseUserSession = Database::get_main_table(
@ -3140,14 +3130,9 @@ HOTSPOT;
$question_type = null, $question_type = null,
$correct_answer = null, $correct_answer = null,
$current_answer = null $current_answer = null
) ) {
{ $track_exercises = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
$track_exercises = Database::get_main_table( $track_attempt = Database::get_main_table(TABLE_STATISTIC_TRACK_E_ATTEMPT);
TABLE_STATISTIC_TRACK_E_EXERCISES
);
$track_attempt = Database::get_main_table(
TABLE_STATISTIC_TRACK_E_ATTEMPT
);
$courseTable = Database::get_main_table(TABLE_MAIN_COURSE); $courseTable = Database::get_main_table(TABLE_MAIN_COURSE);
$courseUser = Database::get_main_table(TABLE_MAIN_COURSE_USER); $courseUser = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$courseUserSession = Database::get_main_table( $courseUserSession = Database::get_main_table(
@ -3380,27 +3365,23 @@ HOTSPOT;
$exercise_id, $exercise_id,
$course_code, $course_code,
$session_id $session_id
) ) {
{ $track_exercises = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
$track_exercises = Database::get_main_table( $track_attempt = Database::get_main_table(TABLE_STATISTIC_TRACK_E_ATTEMPT);
TABLE_STATISTIC_TRACK_E_EXERCISES
);
$track_attempt = Database::get_main_table(
TABLE_STATISTIC_TRACK_E_ATTEMPT
);
$exercise_id = intval($exercise_id); $exercise_id = intval($exercise_id);
$course_code = Database::escape_string($course_code); $course_code = Database::escape_string($course_code);
$session_id = intval($session_id); $session_id = intval($session_id);
$sql = "SELECT DISTINCT exe_user_id $sql = "SELECT DISTINCT exe_user_id
FROM $track_exercises e FROM $track_exercises e
INNER JOIN $track_attempt a ON (a.exe_id = e.exe_id) INNER JOIN $track_attempt a
WHERE ON (a.exe_id = e.exe_id)
exe_exo_id = $exercise_id AND WHERE
course_code = '$course_code' AND exe_exo_id = $exercise_id AND
e.session_id = $session_id AND course_code = '$course_code' AND
status = ''"; e.session_id = $session_id AND
status = ''";
$result = Database::query($sql); $result = Database::query($sql);
$return = 0; $return = 0;
if ($result) { if ($result) {

@ -5654,7 +5654,7 @@ class Tracking
$tquiz_question = Database::get_course_table(TABLE_QUIZ_QUESTION); $tquiz_question = Database::get_course_table(TABLE_QUIZ_QUESTION);
$tquiz_rel_question = Database::get_course_table(TABLE_QUIZ_TEST_QUESTION); $tquiz_rel_question = Database::get_course_table(TABLE_QUIZ_TEST_QUESTION);
$ttrack_exercises = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES); $ttrack_exercises = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
$ttrack_attempt = Database::get_main_table(TABLE_STATISTIC_TRACK_E_ATTEMPT); $ttrack_attempt = Database::get_main_table(TABLE_STATISTIC_TRACK_E_ATTEMPT);
$sessions = array(); $sessions = array();
$courses = array(); $courses = array();
@ -5756,9 +5756,12 @@ class Tracking
q.title as quiz_title, q.title as quiz_title,
qq.description as description qq.description as description
FROM $ttrack_exercises te FROM $ttrack_exercises te
INNER JOIN $ttrack_attempt ta ON ta.exe_id = te.exe_id INNER JOIN $ttrack_attempt ta
INNER JOIN $tquiz q ON q.id = te.exe_exo_id ON ta.exe_id = te.exe_id
INNER JOIN $tquiz_rel_question rq ON rq.exercice_id = q.id AND rq.c_id = q.c_id INNER JOIN $tquiz q
ON q.id = te.exe_exo_id
INNER JOIN $tquiz_rel_question rq
ON rq.exercice_id = q.id AND rq.c_id = q.c_id
INNER JOIN $tquiz_question qq INNER JOIN $tquiz_question qq
ON ON
qq.id = rq.question_id AND qq.id = rq.question_id AND

Loading…
Cancel
Save