Skip to content

Commit

Permalink
Merge branch 'MDL-66796_36' of git://github.com/timhunt/moodle into M…
Browse files Browse the repository at this point in the history
…OODLE_36_STABLE
  • Loading branch information
snake committed Oct 13, 2019
2 parents d12b2d9 + eaca013 commit 77ccb0f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions question/category_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -436,9 +436,7 @@ public function add_category($newparent, $newcategory, $newinfo, $return = false
$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.
Expand Down Expand Up @@ -511,9 +509,7 @@ public function update_category($updateid, $newparent, $newname, $newinfo, $newi
$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();
}
Expand Down

0 comments on commit 77ccb0f

Please sign in to comment.