MDL-69542 core_lib: make lti tool generator default to legacy version
This means existing tests won't need to change.
This commit is contained in:
@@ -1097,10 +1097,15 @@ EOD;
|
||||
$data->status = ENROL_INSTANCE_ENABLED;
|
||||
}
|
||||
|
||||
// Default to legacy lti version.
|
||||
if (empty($data->ltiversion) || !in_array($data->ltiversion, ['LTI-1p0/LTI-2p0', 'LTI-1p3'])) {
|
||||
$data->ltiversion = 'LTI-1p0/LTI-2p0';
|
||||
}
|
||||
|
||||
// Add some extra necessary fields to the data.
|
||||
$data->name = 'Test LTI';
|
||||
$data->roleinstructor = $studentrole->id;
|
||||
$data->rolelearner = $teacherrole->id;
|
||||
$data->name = $data->name ?? 'Test LTI';
|
||||
$data->roleinstructor = $teacherrole->id;
|
||||
$data->rolelearner = $studentrole->id;
|
||||
|
||||
// Get the enrol LTI plugin.
|
||||
$enrolplugin = enrol_get_plugin('lti');
|
||||
|
||||
Reference in New Issue
Block a user