Skip to content

Commit

Permalink
Changing the category on the import or export page also changes it on…
Browse files Browse the repository at this point in the history
… the question edit page, closing bug 5348 again
  • Loading branch information
gustav_delius committed May 1, 2006
1 parent aaeaa4b commit 0c1e3a1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions question/export.php
Expand Up @@ -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;
Expand Down
4 changes: 3 additions & 1 deletion question/import.php
Expand Up @@ -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;
Expand Down

0 comments on commit 0c1e3a1

Please sign in to comment.