Merge branch 'MDL-58625-master' of git://github.com/danpoltawski/moodle

This commit is contained in:
David Monllao 2017-04-19 03:50:44 +08:00
commit 2b4bafc6c2
2 changed files with 7 additions and 7 deletions

View File

@ -175,11 +175,11 @@ class behat_tool_lp_data_generators extends behat_base {
if (isset($data['framework'])) {
$framework = competency_framework::get_record(array('idnumber' => $data['framework']));
if ($framework) {
$data['competencyframeworkid'] = $framework->get_id();
$data['competencyframeworkid'] = $framework->get('id');
} else {
$framework = competency_framework::get_record(array('id' => $data['framework']));
if ($framework) {
$data['competencyframeworkid'] = $framework->get_id();
$data['competencyframeworkid'] = $framework->get('id');
} else {
throw new Exception('Could not resolve framework with idnumber or id : "' . $data['category'] . '"');
}

View File

@ -3272,14 +3272,14 @@ class restore_course_competencies_structure_step extends restore_structure_step
return;
}
$competency = \core_competency\competency::get_record(array('idnumber' => $data->idnumber,
'competencyframeworkid' => $framework->get_id()));
'competencyframeworkid' => $framework->get('id')));
if (!$competency) {
return;
}
$this->set_mapping(\core_competency\competency::TABLE, $data->id, $competency->get_id());
$this->set_mapping(\core_competency\competency::TABLE, $data->id, $competency->get('id'));
$params = array(
'competencyid' => $competency->get_id(),
'competencyid' => $competency->get('id'),
'courseid' => $this->task->get_courseid()
);
$query = 'competencyid = :competencyid AND courseid = :courseid';
@ -3383,13 +3383,13 @@ class restore_activity_competencies_structure_step extends restore_structure_ste
return;
}
$competency = \core_competency\competency::get_record(array('idnumber' => $data->idnumber,
'competencyframeworkid' => $framework->get_id()));
'competencyframeworkid' => $framework->get('id')));
if (!$competency) {
return;
}
$params = array(
'competencyid' => $competency->get_id(),
'competencyid' => $competency->get('id'),
'cmid' => $this->task->get_moduleid()
);
$query = 'competencyid = :competencyid AND cmid = :cmid';