Skip to content

Commit 0d3320d

Browse files
committed
trigger opencast: not only preconfigured lti tools to choose from / part 3
1 parent 79fa438 commit 0d3320d

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

trigger/opencast/lib.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function get_course_recordset_where($triggerid) {
9494
}
9595
} else {
9696
$sql = "c.id $not IN (SELECT DISTINCT(l.course) FROM {lti} l where
97-
l.typeid IN $insql)";
97+
l.typeid $insql)";
9898
}
9999
}
100100

@@ -132,20 +132,15 @@ public function instance_settings() {
132132
* @throws \dml_exception
133133
*/
134134
public function extend_add_instance_form_definition($mform) {
135-
global $DB;
136135

137136
$mform->addElement('advcheckbox', 'activity',
138137
get_string('activity', 'lifecycletrigger_opencast'));
139138
$mform->setType('activity', PARAM_BOOL);
140139
$mform->addHelpButton('activity', 'activity', 'lifecycletrigger_opencast');
141140

142-
$ltitypes = lti_filter_get_types(get_site()->id);
143-
$typesused = $DB->get_fieldset_sql('SELECT DISTINCT(typeid) FROM {lti}');
141+
$ltitypes = lti_filter_get_types(false);
144142
$ltis = [];
145143
foreach ($ltitypes as $key => $type) {
146-
if (!array_key_exists($key, $typesused)) {
147-
continue;
148-
}
149144
$ltis[$key] = $type->name." (".$type->baseurl.")";
150145
}
151146
if ($ltis) {

0 commit comments

Comments
 (0)