Changing the category on the import or export page also changes it on the question edit page, closing bug 5348 again

This commit is contained in:
gustav_delius 2006-05-01 22:26:06 +00:00
parent aaeaa4b007
commit 0c1e3a145f
2 changed files with 7 additions and 3 deletions

View file

@ -21,7 +21,9 @@
error("Course does not exist!"); 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 $showcatmenu = true; // will ensure that user can choose category
if (isset($SESSION->questioncat)) { if (isset($SESSION->questioncat)) {
$categoryid = $SESSION->questioncat; $categoryid = $SESSION->questioncat;

View file

@ -51,7 +51,9 @@
$matchgrades['error'] = $txt->matchgradeserror; $matchgrades['error'] = $txt->matchgradeserror;
$matchgrades['nearest'] = $txt->matchgradesnearest; $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 $showcatmenu = true; // will ensure that user can choose category
if (isset($SESSION->questioncat)) { if (isset($SESSION->questioncat)) {
$categoryid = $SESSION->questioncat; $categoryid = $SESSION->questioncat;