mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 17:02:03 +02:00
Make sure category from correct course is shown.
This commit is contained in:
parent
15db443c87
commit
f7fccc0362
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user