question bank: MDL-14434 Cannot edit the only question category in a context.

This commit is contained in:
tjhunt
2008-11-27 11:50:29 +00:00
parent 004ff192d4
commit df4e224454
5 changed files with 30 additions and 27 deletions
+3 -2
View File
@@ -155,8 +155,9 @@
}
//adjust sortorder before we make the cat a peer of it's new peers
$peers = $DB->get_records_select_menu('question_categories', "contextid = ? AND parent = ?", array($toparent->contextid, $toparent->id),
"sortorder ASC", "id, id");
$peers = $DB->get_records_select_menu('question_categories',
'contextid = ? AND parent = ?', array($toparent->contextid, $toparent->id),
'sortorder ASC', 'id, 1');
$peers = array_keys($peers);
if ($totop){
array_unshift($peers, $cattomove->id);