mirror of
https://github.com/moodle/moodle.git
synced 2025-02-20 08:05:49 +01:00
Merge branch 'MDL-76258-master' of https://github.com/sh-csg/moodle
This commit is contained in:
commit
392a0030a3
@ -48,6 +48,7 @@
|
|||||||
|
|
||||||
defined('MOODLE_INTERNAL') || die;
|
defined('MOODLE_INTERNAL') || die;
|
||||||
|
|
||||||
|
use mod_lti\local\ltiopenid\registration_helper;
|
||||||
/**
|
/**
|
||||||
* Structure step to restore one lti activity
|
* 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;
|
$this->newltitype = false;
|
||||||
if (!$ltitypeid && $data->course == $courseid) {
|
if (!$ltitypeid && $data->course == $courseid) {
|
||||||
unset($data->toolproxyid); // Course tools can not use LTI2.
|
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);
|
$ltitypeid = $DB->insert_record('lti_types', $data);
|
||||||
$this->newltitype = true;
|
$this->newltitype = true;
|
||||||
$this->set_mapping('ltitype', $oldid, $ltitypeid);
|
$this->set_mapping('ltitype', $oldid, $ltitypeid);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user