mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Only consider configured tools when receiving LTI web service calls
This commit is contained in:
parent
558be8fcef
commit
feb30fd891
1 changed files with 4 additions and 2 deletions
|
@ -657,10 +657,12 @@ function lti_get_shared_secrets_by_key($key){
|
||||||
SELECT t2.value
|
SELECT t2.value
|
||||||
FROM {lti_types_config} t1
|
FROM {lti_types_config} t1
|
||||||
INNER JOIN {lti_types_config} t2 ON t1.typeid = t2.typeid
|
INNER JOIN {lti_types_config} t2 ON t1.typeid = t2.typeid
|
||||||
|
INNER JOIN {lti_types} type ON t2.typeid = type.id
|
||||||
WHERE
|
WHERE
|
||||||
t1.name = 'resourcekey'
|
t1.name = 'resourcekey'
|
||||||
AND t1.value = :key1
|
AND t1.value = :key1
|
||||||
AND t2.name = 'password'
|
AND t2.name = 'password'
|
||||||
|
AND type.state = :configured
|
||||||
|
|
||||||
UNION
|
UNION
|
||||||
|
|
||||||
|
@ -669,7 +671,7 @@ function lti_get_shared_secrets_by_key($key){
|
||||||
WHERE resourcekey = :key2
|
WHERE resourcekey = :key2
|
||||||
QUERY;
|
QUERY;
|
||||||
|
|
||||||
$sharedsecrets = $DB->get_records_sql($query, array('key1' => $key, 'key2' => $key));
|
$sharedsecrets = $DB->get_records_sql($query, array('configured' => LTI_TOOL_STATE_CONFIGURED, 'key1' => $key, 'key2' => $key));
|
||||||
|
|
||||||
$values = array_map(function($item){
|
$values = array_map(function($item){
|
||||||
return $item->value;
|
return $item->value;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue