1
0
mirror of https://github.com/moodle/moodle.git synced 2025-02-17 14:25:37 +01:00

Merge branch 'MDL-76258-master' of https://github.com/sh-csg/moodle

This commit is contained in:
Andrew Nicols 2022-11-29 12:27:53 +08:00
commit 392a0030a3

@ -48,6 +48,7 @@
defined('MOODLE_INTERNAL') || die;
use mod_lti\local\ltiopenid\registration_helper;
/**
* Structure step to restore one lti activity
*/
@ -134,6 +135,9 @@ class restore_lti_activity_structure_step extends restore_activity_structure_ste
$this->newltitype = false;
if (!$ltitypeid && $data->course == $courseid) {
unset($data->toolproxyid); // Course tools can not use LTI2.
if (!empty($data->clientid)) {
$data->clientid = registration_helper::get()->new_clientid(); // Need to rebuild clientid to ensure uniqueness.
}
$ltitypeid = $DB->insert_record('lti_types', $data);
$this->newltitype = true;
$this->set_mapping('ltitype', $oldid, $ltitypeid);