Skip to content

Commit 89b7947

Browse files
author
Tamara Gunkel
committed
replace own lti settings with tool lti settings
1 parent f217a59 commit 89b7947

File tree

8 files changed

+12
-58
lines changed

8 files changed

+12
-58
lines changed

engageredirect.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@
5555

5656
$url = $endpoint . '/play/' . $identifier;
5757

58-
if (empty(get_config('block_opencast', 'engagelticonsumerkey_' . $ocinstanceid))) {
58+
if (empty(get_config('tool_opencast', 'lticonsumerkey_' . $ocinstanceid))) {
5959
redirect($url);
6060
}
6161

6262
$ltiendpoint = rtrim($endpoint, '/') . '/lti';
6363

6464
// Create parameters.
65-
$consumerkey = get_config('block_opencast', 'engagelticonsumerkey_' . $ocinstanceid);
66-
$consumersecret = get_config('block_opencast', 'engagelticonsumersecret_' . $ocinstanceid);
65+
$consumerkey = get_config('tool_opencast', 'lticonsumerkey_' . $ocinstanceid);
66+
$consumersecret = get_config('tool_opencast', 'lticonsumersecret_' . $ocinstanceid);
6767
$params = \block_opencast\local\lti_helper::create_lti_parameters($consumerkey, $consumersecret, $ltiendpoint, $url);
6868

6969
$renderer = $PAGE->get_renderer('block_opencast');

index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@
231231
}
232232

233233
// If LTI credentials are given, use LTI. If not, directly forward to Opencast studio.
234-
if (empty(get_config('block_opencast', 'lticonsumerkey_' . $ocinstanceid))) {
234+
if (empty(get_config('tool_opencast', 'lticonsumerkey_' . $ocinstanceid))) {
235235
if (empty(get_config('block_opencast', 'opencast_studio_baseurl_' . $ocinstanceid))) {
236236
$endpoint = \tool_opencast\local\settings_api::get_apiurl($ocinstanceid);
237237
} else {

lang/en/block_opencast.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -270,10 +270,6 @@
270270
$string['engageredirect'] = 'Redirect to engage player';
271271
$string['engageurl'] = 'URL of the Opencast Engage server';
272272
$string['engageurl_desc'] = 'If empty, the video titles in the overview are not linked to the engage player.';
273-
$string['engagelticonsumerkey'] = 'LTI Consumer key to access video';
274-
$string['engagelticonsumerkey_desc'] = 'LTI Consumer key to access videos in the engage player.';
275-
$string['engagelticonsumersecret'] = 'LTI Consumer secret to access video';
276-
$string['engagelticonsumersecret_desc'] = 'LTI Consumer secret to access videos in the engage player.';
277273
$string['expirydate'] = 'Expiry Date';
278274
$string['exists_catalogname'] = 'The field is already existed';
279275
$string['enablechunkupload'] = 'Enable Chunkupload';
@@ -452,10 +448,6 @@
452448
$string['linkedinblock'] = 'Linked in block';
453449
$string['loading'] = 'Loading...';
454450
$string['ltimodule_settings'] = 'LTI module features';
455-
$string['lticonsumerkey'] = 'Consumer key';
456-
$string['lticonsumerkey_desc'] = 'LTI Consumer key for the opencast studio integration. If the integration is enabled but no key is set, the link without LTI authentication will be shown.';
457-
$string['lticonsumersecret'] = 'Consumer secret';
458-
$string['lticonsumersecret_desc'] = 'LTI Consumer secret for the opencast studio integration.';
459451
$string['license'] = 'License';
460452
$string['location'] = 'Location';
461453

@@ -706,10 +698,6 @@
706698
$string['editorbaseurl_desc'] = 'The base URL to be used to call the Opencast Editor, the base url of the opencast instance is used if empty.';
707699
$string['editorendpointurl'] = 'Opencast Editor Endpoint';
708700
$string['editorendpointurl_desc'] = 'The editor endpoint to access the editor. The mediapackage ID will be added at the end of the url.';
709-
$string['editorlticonsumerkey'] = 'Opencast Editor Consumer key';
710-
$string['editorlticonsumerkey_desc'] = 'LTI Consumer key for the opencast editor integration.';
711-
$string['editorlticonsumersecret'] = 'Opencast Editor Consumer secret';
712-
$string['editorlticonsumersecret_desc'] = 'LTI Consumer secret for the opencast editor integration.';
713701

714702
// Strings fot new opencast studio settings.
715703
$string['opencaststudionewtab'] = 'Redirect to Studio in a new tab';

recordvideo.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@
118118
$customtool = '/studio?' . implode('&', $customtoolparams);
119119
// Create parameters.
120120

121-
$consumerkey = get_config('block_opencast', 'lticonsumerkey_' . $ocinstanceid);
122-
$consumersecret = get_config('block_opencast', 'lticonsumersecret_' . $ocinstanceid);
121+
$consumerkey = get_config('tool_opencast', 'lticonsumerkey_' . $ocinstanceid);
122+
$consumersecret = get_config('tool_opencast', 'lticonsumersecret_' . $ocinstanceid);
123123
$params = \block_opencast\local\lti_helper::create_lti_parameters($consumerkey, $consumersecret, $ltiendpoint, $customtool);
124124

125125
$renderer = $PAGE->get_renderer('block_opencast');

renderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ public function render_block_content($courseid, $videodata, $ocinstance, $render
452452
$target = '_blank';
453453
}
454454
// If LTI credentials are given, use LTI. If not, directly forward to Opencast studio.
455-
if (empty(get_config('block_opencast', 'lticonsumerkey_' . $ocinstance->id))) {
455+
if (empty(get_config('tool_opencast', 'lticonsumerkey_' . $ocinstance->id))) {
456456
if (empty(get_config('block_opencast', 'opencast_studio_baseurl_' . $ocinstance->id))) {
457457
$endpoint = \tool_opencast\local\settings_api::get_apiurl($ocinstance->id);
458458
} else {

settings.php

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -446,16 +446,6 @@
446446
get_string('opencaststudiobaseurl', 'block_opencast'),
447447
get_string('opencaststudiobaseurl_desc', 'block_opencast'), ''));
448448

449-
$additionalsettings->add(
450-
new admin_setting_configtext('block_opencast/lticonsumerkey_' . $instance->id,
451-
get_string('lticonsumerkey', 'block_opencast'),
452-
get_string('lticonsumerkey_desc', 'block_opencast'), ""));
453-
454-
$additionalsettings->add(
455-
new admin_setting_configpasswordunmask('block_opencast/lticonsumersecret_' . $instance->id,
456-
get_string('lticonsumersecret', 'block_opencast'),
457-
get_string('lticonsumersecret_desc', 'block_opencast'), ""));
458-
459449
// Studio redirect button settings.
460450
$additionalsettings->add(
461451
new admin_setting_configcheckbox('block_opencast/show_opencast_studio_return_btn_' . $instance->id,
@@ -498,18 +488,6 @@
498488
get_string('editorendpointurl', 'block_opencast'),
499489
get_string('editorendpointurl_desc', 'block_opencast'), "/editor-ui/index.html?mediaPackageId="));
500490

501-
// LTI Consumer Key for the editor alone.
502-
$additionalsettings->add(
503-
new admin_setting_configtext('block_opencast/editorlticonsumerkey_' . $instance->id,
504-
get_string('editorlticonsumerkey', 'block_opencast'),
505-
get_string('editorlticonsumerkey_desc', 'block_opencast'), ""));
506-
507-
// LTI Consumer Secret for the editor alone.
508-
$additionalsettings->add(
509-
new admin_setting_configpasswordunmask('block_opencast/editorlticonsumersecret_' . $instance->id,
510-
get_string('editorlticonsumersecret', 'block_opencast'),
511-
get_string('editorlticonsumersecret_desc', 'block_opencast'), ""));
512-
513491
// Opencast Video Player in additional feature settings.
514492
$additionalsettings->add(
515493
new admin_setting_heading('block_opencast/opencast_access_video_' . $instance->id,
@@ -522,18 +500,6 @@
522500
get_string('engageurl', 'block_opencast'),
523501
get_string('engageurl_desc', 'block_opencast'), ""));
524502

525-
// LTI Consumer Key for the video player.
526-
$additionalsettings->add(
527-
new admin_setting_configtext('block_opencast/engagelticonsumerkey_' . $instance->id,
528-
get_string('engagelticonsumerkey', 'block_opencast'),
529-
get_string('engagelticonsumerkey_desc', 'block_opencast'), ""));
530-
531-
// LTI Consumer Secret for the video player.
532-
$additionalsettings->add(
533-
new admin_setting_configpasswordunmask('block_opencast/engagelticonsumersecret_' . $instance->id,
534-
get_string('engagelticonsumersecret', 'block_opencast'),
535-
get_string('engagelticonsumersecret_desc', 'block_opencast'), ""));
536-
537503
// Notifications in additional features settings.
538504
$additionalsettings->add(
539505
new admin_setting_heading('block_opencast/notifications_' . $instance->id,

version.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
*/
2424
defined('MOODLE_INTERNAL') || die();
2525

26-
$plugin->version = 2022022201;
26+
$plugin->version = 2022030800;
2727
$plugin->requires = 2017111300;
2828
$plugin->maturity = MATURITY_STABLE;
2929
$plugin->release = 'v3.11-r7';
3030
$plugin->component = 'block_opencast';
31-
$plugin->dependencies = array('tool_opencast' => 2021120100);
31+
$plugin->dependencies = array('tool_opencast' => 2022021000);

videoeditor.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
$editorbaseurl = 'http://' . $editorbaseurl;
6868
}
6969

70-
if (empty(get_config('block_opencast', 'editorlticonsumerkey_' . $ocinstanceid))) {
70+
if (empty(get_config('tool_opencast', 'lticonsumerkey_' . $ocinstanceid))) {
7171
redirect($editorbaseurl . $editorendpoint);
7272
}
7373

@@ -83,8 +83,8 @@
8383
}
8484

8585
// Create parameters.
86-
$consumerkey = get_config('block_opencast', 'editorlticonsumerkey_' . $ocinstanceid);
87-
$consumersecret = get_config('block_opencast', 'editorlticonsumersecret_' . $ocinstanceid);
86+
$consumerkey = get_config('tool_opencast', 'lticonsumerkey_' . $ocinstanceid);
87+
$consumersecret = get_config('tool_opencast', 'lticonsumersecret_' . $ocinstanceid);
8888
$params = \block_opencast\local\lti_helper::create_lti_parameters($consumerkey, $consumersecret, $ltiendpoint, $editorendpoint);
8989

9090
$renderer = $PAGE->get_renderer('block_opencast');

0 commit comments

Comments
 (0)