From f7fccc0362eb6d1d1946198902edbb812af073b0 Mon Sep 17 00:00:00 2001 From: gustav_delius Date: Tue, 18 Apr 2006 22:53:38 +0000 Subject: [PATCH] Make sure category from correct course is shown. --- question/showbank.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/question/showbank.php b/question/showbank.php index 3ffcafdc61..318ea7b9a4 100644 --- a/question/showbank.php +++ b/question/showbank.php @@ -139,7 +139,7 @@ /// all commands have been dealt with, now print the page - if (empty($SESSION->questioncat) or !record_exists('question_categories', 'id', $SESSION->questioncat)) { +if (empty($SESSION->questioncat) or !count_records_select("question_categories", "id = '{$SESSION->questioncat}' AND (course = '{$course->id}' OR publish = '1')")) { $category = get_default_question_category($course->id); $SESSION->questioncat = $category->id; } -- 2.39.5