Skip to content

Commit 27326a2

Browse files
committed
Exercise: Fix issue with tag attribute for modal window question - refs GH#4555
1 parent 03c2cc0 commit 27326a2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

main/exercise/question_list_admin.inc.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ function loadEditor(button, questionId) {
9494
var targetUrl = $(this).attr("href");
9595
var otherQuizs = $(this).data("otherquizs");
9696

97-
if (otherQuizs) {
97+
if (otherQuizs == 1) {
9898
$("#dialog-confirm p").text("<?php echo get_lang('QuestionInOtherExercises'); ?>")
9999
}
100100

@@ -328,13 +328,13 @@ function loadEditor(button, questionId) {
328328
);
329329
$delete_link = null;
330330
if (!$limitTeacherAccess && api_is_allowed_to_edit() && $objExercise->edit_exercise_in_lp) {
331-
$questionInOtherQuizs = true;
331+
$questionInOtherQuizs = 0;
332332
$results = Question::countQuizzesUsingQuestion($id);
333333

334334
if ($results > 1) {
335335
$masterExerciseId = Question::getMasterQuizForQuestion($id);
336336
if ($masterExerciseId !== $exerciseId) {
337-
$questionInOtherQuizs = false;
337+
$questionInOtherQuizs = 1;
338338
}
339339
}
340340

0 commit comments

Comments
 (0)