mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 12:40:01 +01:00
Fix performance problem with lots of categories. http://moodle.org/mod/forum/discuss.php?d=54945#252145. Merged from MOODLE_16_STABLE.
This commit is contained in:
parent
bee8703ea5
commit
cc08091300
@ -258,13 +258,7 @@
|
|||||||
$gradeoptions = $creategrades->gradeoptions;
|
$gradeoptions = $creategrades->gradeoptions;
|
||||||
$gradeoptionsfull = $creategrades->gradeoptionsfull;
|
$gradeoptionsfull = $creategrades->gradeoptionsfull;
|
||||||
|
|
||||||
if (!$categories = question_category_menu($course->id, false)) {
|
// Initialise defaults if necessary.
|
||||||
error("No categories!");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Print the question editing form
|
|
||||||
|
|
||||||
if (empty($question->id)) {
|
if (empty($question->id)) {
|
||||||
$question->id = "";
|
$question->id = "";
|
||||||
}
|
}
|
||||||
@ -287,7 +281,7 @@
|
|||||||
$question->generalfeedback = "";
|
$question->generalfeedback = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set up some Richtext editing if necessary
|
// Set up some richtext editing if necessary
|
||||||
if ($usehtmleditor = can_use_richtext_editor()) {
|
if ($usehtmleditor = can_use_richtext_editor()) {
|
||||||
$defaultformat = FORMAT_HTML;
|
$defaultformat = FORMAT_HTML;
|
||||||
} else {
|
} else {
|
||||||
@ -298,6 +292,7 @@
|
|||||||
$err = $question->errors;
|
$err = $question->errors;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Print the question editing form
|
||||||
echo '<br />';
|
echo '<br />';
|
||||||
print_simple_box_start('center');
|
print_simple_box_start('center');
|
||||||
require_once('type/'.$qtype.'/editquestion.php');
|
require_once('type/'.$qtype.'/editquestion.php');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user