Skip to content

Commit

Permalink
MDL-58625 competency restore: avoid use of magic gettter
Browse files Browse the repository at this point in the history
These were deprecated when persistents moved to core.
  • Loading branch information
danpoltawski committed Apr 18, 2017
1 parent 0714bcb commit bdc70bb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions backup/moodle2/restore_stepslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -3272,14 +3272,14 @@ public function process_course_competency($data) {
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';
Expand Down Expand Up @@ -3383,13 +3383,13 @@ public function process_course_module_competency($data) {
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';
Expand Down

0 comments on commit bdc70bb

Please sign in to comment.