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:
tjhunt 2006-10-01 20:32:12 +00:00
parent bee8703ea5
commit cc08091300

View File

@ -258,13 +258,7 @@
$gradeoptions = $creategrades->gradeoptions;
$gradeoptionsfull = $creategrades->gradeoptionsfull;
if (!$categories = question_category_menu($course->id, false)) {
error("No categories!");
}
// Print the question editing form
// Initialise defaults if necessary.
if (empty($question->id)) {
$question->id = "";
}
@ -287,7 +281,7 @@
$question->generalfeedback = "";
}
// Set up some Richtext editing if necessary
// Set up some richtext editing if necessary
if ($usehtmleditor = can_use_richtext_editor()) {
$defaultformat = FORMAT_HTML;
} else {
@ -298,6 +292,7 @@
$err = $question->errors;
}
// Print the question editing form
echo '<br />';
print_simple_box_start('center');
require_once('type/'.$qtype.'/editquestion.php');