Make sure category from correct course is shown.

This commit is contained in:
gustav_delius 2006-04-18 22:53:38 +00:00
parent 15db443c87
commit f7fccc0362

View File

@ -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;
}