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

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

View file

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