Skip to content

Commit

Permalink
Quiz: Add support for different courses in multi-use table at end of …
Browse files Browse the repository at this point in the history
…question edit - refs BT#18453
  • Loading branch information
ywarnier committed May 5, 2021
1 parent 698351e commit 05c01e0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main/inc/lib/exercise.lib.php
Expand Up @@ -1714,8 +1714,10 @@ public static function showTestsWhereQuestionIsUsed(int $questionId, int $exclud
$tmp[0] = $row['course_title'];
$tmp[1] = $row['session_name'];
$tmp[2] = $row['quiz_title'];
$courseDetais = api_get_course_info_by_id($row['c_id']);
$courseCode = $courseDetails['code'];
// Send do other test with r=1 to reset current test session variables
$urlToQuiz = api_get_path(WEB_CODE_PATH).'exercise/admin.php?'.api_get_cidreq().'&exerciseId='.$row['quiz_id'].'&r=1';
$urlToQuiz = api_get_path(WEB_CODE_PATH).'exercise/admin.php?'.api_get_cidreq_params($courseCode, $row['session_id']).'&exerciseId='.$row['quiz_id'].'&r=1';
$tmp[3] = '<a href="'.$urlToQuiz.'">'.Display::return_icon('quiz.png', get_lang('Edit')).'</a>';
if ((int) $row['session_id'] == 0) {
$tmp[1] = '-';
Expand Down

0 comments on commit 05c01e0

Please sign in to comment.