From 27326a28940044b83eb4c01e7a0cf57ab2a8c7e2 Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Tue, 7 Feb 2023 21:25:25 +0100 Subject: [PATCH] Exercise: Fix issue with tag attribute for modal window question - refs GH#4555 --- main/exercise/question_list_admin.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main/exercise/question_list_admin.inc.php b/main/exercise/question_list_admin.inc.php index c4d8e7ca28..997ebbe059 100755 --- a/main/exercise/question_list_admin.inc.php +++ b/main/exercise/question_list_admin.inc.php @@ -94,7 +94,7 @@ $addImageUrl = api_get_path(WEB_CODE_PATH).'inc/lib/elfinder/filemanager.php?add var targetUrl = $(this).attr("href"); var otherQuizs = $(this).data("otherquizs"); - if (otherQuizs) { + if (otherQuizs == 1) { $("#dialog-confirm p").text("") } @@ -328,13 +328,13 @@ if (!$inATest) { ); $delete_link = null; if (!$limitTeacherAccess && api_is_allowed_to_edit() && $objExercise->edit_exercise_in_lp) { - $questionInOtherQuizs = true; + $questionInOtherQuizs = 0; $results = Question::countQuizzesUsingQuestion($id); if ($results > 1) { $masterExerciseId = Question::getMasterQuizForQuestion($id); if ($masterExerciseId !== $exerciseId) { - $questionInOtherQuizs = false; + $questionInOtherQuizs = 1; } }