mirror of
https://github.com/moodle/moodle.git
synced 2025-01-30 03:58:34 +01:00
MDL-66796 question bank: 0 is a valid question category idnumber
This commit is contained in:
parent
8111abc331
commit
9c4f0fa746
@ -469,9 +469,7 @@ class question_category_object {
|
||||
$cat->infoformat = $newinfoformat;
|
||||
$cat->sortorder = 999;
|
||||
$cat->stamp = make_unique_id_code();
|
||||
if ($idnumber) {
|
||||
$cat->idnumber = $idnumber;
|
||||
}
|
||||
$cat->idnumber = $idnumber;
|
||||
$categoryid = $DB->insert_record("question_categories", $cat);
|
||||
|
||||
// Log the creation of this category.
|
||||
@ -552,9 +550,7 @@ class question_category_object {
|
||||
$cat->infoformat = $newinfoformat;
|
||||
$cat->parent = $parentid;
|
||||
$cat->contextid = $tocontextid;
|
||||
if ($idnumber) {
|
||||
$cat->idnumber = $idnumber;
|
||||
}
|
||||
$cat->idnumber = $idnumber;
|
||||
if ($newstamprequired) {
|
||||
$cat->stamp = make_unique_id_code();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user