MDL-18293 $DB->somethiong is using exceptions, no need for ifs tehre, removing useless strings

This commit is contained in:
skodak
2009-06-03 20:00:08 +00:00
parent 6aa104ed96
commit bf8e93d704
14 changed files with 16 additions and 61 deletions
+1 -3
View File
@@ -2458,9 +2458,7 @@ function question_make_default_categories($contexts) {
$category->parent = 0;
$category->sortorder = 999; // By default, all categories get this number, and are sorted alphabetically.
$category->stamp = make_unique_id_code();
if (!$category->id = $DB->insert_record('question_categories', $category)) {
print_error('cannotcreatedefaultcat', '', '', print_context_name($context));
}
$category->id = $DB->insert_record('question_categories', $category);
} else {
$category = question_get_default_category($context->id);
}