Commit 59be445c authored by Damyon Wiese's avatar Damyon Wiese

Merge branch 'MDL-58058-master' of git://github.com/lameze/moodle

parents 302104af f9bb74c0
......@@ -165,7 +165,7 @@ class api {
require_capability('moodle/competency:competencymanage', $competency->get_context());
// Reset the sortorder, use reorder instead.
$competency->set('sortorder', null);
$competency->set('sortorder', 0);
$competency->create();
\core\event\competency_created::create_from_competency($competency)->trigger();
......
......@@ -76,7 +76,7 @@ class competency extends persistent {
'default' => FORMAT_HTML
),
'sortorder' => array(
'default' => null,
'default' => 0,
'type' => PARAM_INT
),
'parentid' => array(
......
......@@ -53,7 +53,7 @@ class template_competency extends persistent {
),
'sortorder' => array(
'type' => PARAM_INT,
'default' => null,
'default' => 0,
),
);
}
......
......@@ -66,7 +66,7 @@ class user_competency_plan extends persistent {
),
'sortorder' => array(
'type' => PARAM_INT,
'default' => null,
'default' => 0,
),
);
}
......
......@@ -281,8 +281,7 @@ class core_competency_external_testcase extends externallib_advanced_testcase {
'idnumber' => 'idnumber' . $number,
'description' => 'description' . $number,
'descriptionformat' => FORMAT_HTML,
'competencyframeworkid' => $frameworkid,
'sortorder' => 0
'competencyframeworkid' => $frameworkid
);
$result = external::create_competency($competency);
return (object) external_api::clean_returnvalue(external::create_competency_returns(), $result);
......@@ -294,8 +293,7 @@ class core_competency_external_testcase extends externallib_advanced_testcase {
'shortname' => 'shortname' . $number,
'idnumber' => 'idnumber' . $number,
'description' => 'description' . $number,
'descriptionformat' => FORMAT_HTML,
'sortorder' => 0
'descriptionformat' => FORMAT_HTML
);
$result = external::update_competency($competency);
return external_api::clean_returnvalue(external::update_competency_returns(), $result);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment