mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
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:
parent
aaeaa4b007
commit
0c1e3a145f
2 changed files with 7 additions and 3 deletions
|
@ -20,8 +20,10 @@
|
||||||
if (! $course = get_record("course", "id", $courseid)) {
|
if (! $course = get_record("course", "id", $courseid)) {
|
||||||
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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue