Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix performance problem with lots of categories. http://moodle.org/mo…

  • Loading branch information...
commit dfa4dd740afcb487c3f70beb35552f5b5820d51e 1 parent 164c865
tjhunt authored
Showing with 3 additions and 8 deletions.
  1. +3 −8 question/question.php
View
11 question/question.php
@@ -261,11 +261,6 @@
$gradeoptions = $creategrades->gradeoptions;
$gradeoptionsfull = $creategrades->gradeoptionsfull;
- if (!$categories = question_category_menu($course->id, false)) {
- error("No categories!");
- }
-
-
make_upload_directory("$course->id"); // Just in case
$coursefiles = get_directory_list("$CFG->dataroot/$course->id", $CFG->moddata);
foreach ($coursefiles as $filename) {
@@ -274,8 +269,7 @@
}
}
- // Print the question editing form
-
+ // Initialise defaults if necessary.
if (empty($question->id)) {
$question->id = "";
}
@@ -295,7 +289,7 @@
$question->defaultgrade = 1;
}
- // Set up some Richtext editing if necessary
+ // Set up some richtext editing if necessary
if ($usehtmleditor = can_use_richtext_editor()) {
$defaultformat = FORMAT_HTML;
} else {
@@ -306,6 +300,7 @@
$err = $question->errors;
}
+ // Print the question editing form
echo '<br />';
print_simple_box_start('center');
require_once('type/'.$qtype.'/editquestion.php');
Please sign in to comment.
Something went wrong with that request. Please try again.