From 0c1e3a145fe774f5b836b6e26df55fb5696293e8 Mon Sep 17 00:00:00 2001 From: gustav_delius Date: Mon, 1 May 2006 22:26:06 +0000 Subject: [PATCH] Changing the category on the import or export page also changes it on the question edit page, closing bug 5348 again --- question/export.php | 6 ++++-- question/import.php | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/question/export.php b/question/export.php index 0a61c5027b..7f67488d42 100644 --- a/question/export.php +++ b/question/export.php @@ -20,8 +20,10 @@ if (! $course = get_record("course", "id", $courseid)) { error("Course does not exist!"); } - - if (!$categoryid) { // need to get category from modform + + if ($categoryid) { // update category in session variable + $SESSION->questioncat = $categoryid; + } else { // try to get category from modform $showcatmenu = true; // will ensure that user can choose category if (isset($SESSION->questioncat)) { $categoryid = $SESSION->questioncat; diff --git a/question/import.php b/question/import.php index aa3cec8c35..f6f6f13126 100644 --- a/question/import.php +++ b/question/import.php @@ -51,7 +51,9 @@ $matchgrades['error'] = $txt->matchgradeserror; $matchgrades['nearest'] = $txt->matchgradesnearest; - if (!$categoryid) { // try to get category from modform + if ($categoryid) { // update category in session variable + $SESSION->questioncat = $categoryid; + } else { // try to get category from modform $showcatmenu = true; // will ensure that user can choose category if (isset($SESSION->questioncat)) { $categoryid = $SESSION->questioncat; -- 2.39.5