MDL-76602 mod_lti: array syntax/whitespace cleanup.
This commit is contained in:
@@ -343,7 +343,7 @@ abstract class service_base {
|
||||
* @return array Key/value pairs of params to claim mapping.
|
||||
*/
|
||||
public function get_jwt_claim_mappings(): array {
|
||||
return array();
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -130,7 +130,7 @@ function lti_get_jwt_claim_mapping() {
|
||||
foreach ($services as $service) {
|
||||
$mapping = array_merge($mapping, $service->get_jwt_claim_mappings());
|
||||
}
|
||||
$mapping = array_merge($mapping, array(
|
||||
$mapping = array_merge($mapping, [
|
||||
'accept_copy_advice' => [
|
||||
'suffix' => 'dl',
|
||||
'group' => 'deep_linking_settings',
|
||||
@@ -442,7 +442,7 @@ function lti_get_jwt_claim_mapping() {
|
||||
'claim' => 'url',
|
||||
'isarray' => false
|
||||
]
|
||||
));
|
||||
]);
|
||||
return $mapping;
|
||||
}
|
||||
|
||||
|
||||
@@ -97,7 +97,8 @@ class basicoutcomes extends \mod_lti\local\ltiservice\service_base {
|
||||
* @return array Key/value pairs of params to claim mapping.
|
||||
*/
|
||||
public function get_jwt_claim_mappings(): array {
|
||||
return array('lis_outcome_service_url' => [
|
||||
return [
|
||||
'lis_outcome_service_url' => [
|
||||
'suffix' => 'bo',
|
||||
'group' => 'basicoutcome',
|
||||
'claim' => 'lis_outcome_service_url',
|
||||
@@ -108,7 +109,8 @@ class basicoutcomes extends \mod_lti\local\ltiservice\service_base {
|
||||
'group' => 'basicoutcome',
|
||||
'claim' => 'lis_result_sourcedid',
|
||||
'isarray' => false
|
||||
]);
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -150,48 +150,50 @@ class gradebookservices extends service_base {
|
||||
* @return array Key/value pairs of params to claim mapping.
|
||||
*/
|
||||
public function get_jwt_claim_mappings(): array {
|
||||
return array('custom_gradebookservices_scope' => [
|
||||
'suffix' => 'ags',
|
||||
'group' => 'endpoint',
|
||||
'claim' => 'scope',
|
||||
'isarray' => true
|
||||
],
|
||||
'custom_lineitems_url' => [
|
||||
'suffix' => 'ags',
|
||||
'group' => 'endpoint',
|
||||
'claim' => 'lineitems',
|
||||
'isarray' => false
|
||||
],
|
||||
'custom_lineitem_url' => [
|
||||
'suffix' => 'ags',
|
||||
'group' => 'endpoint',
|
||||
'claim' => 'lineitem',
|
||||
'isarray' => false
|
||||
],
|
||||
'custom_results_url' => [
|
||||
'suffix' => 'ags',
|
||||
'group' => 'endpoint',
|
||||
'claim' => 'results',
|
||||
'isarray' => false
|
||||
],
|
||||
'custom_result_url' => [
|
||||
'suffix' => 'ags',
|
||||
'group' => 'endpoint',
|
||||
'claim' => 'result',
|
||||
'isarray' => false
|
||||
],
|
||||
'custom_scores_url' => [
|
||||
'suffix' => 'ags',
|
||||
'group' => 'endpoint',
|
||||
'claim' => 'scores',
|
||||
'isarray' => false
|
||||
],
|
||||
'custom_score_url' => [
|
||||
'suffix' => 'ags',
|
||||
'group' => 'endpoint',
|
||||
'claim' => 'score',
|
||||
'isarray' => false
|
||||
]);
|
||||
return [
|
||||
'custom_gradebookservices_scope' => [
|
||||
'suffix' => 'ags',
|
||||
'group' => 'endpoint',
|
||||
'claim' => 'scope',
|
||||
'isarray' => true
|
||||
],
|
||||
'custom_lineitems_url' => [
|
||||
'suffix' => 'ags',
|
||||
'group' => 'endpoint',
|
||||
'claim' => 'lineitems',
|
||||
'isarray' => false
|
||||
],
|
||||
'custom_lineitem_url' => [
|
||||
'suffix' => 'ags',
|
||||
'group' => 'endpoint',
|
||||
'claim' => 'lineitem',
|
||||
'isarray' => false
|
||||
],
|
||||
'custom_results_url' => [
|
||||
'suffix' => 'ags',
|
||||
'group' => 'endpoint',
|
||||
'claim' => 'results',
|
||||
'isarray' => false
|
||||
],
|
||||
'custom_result_url' => [
|
||||
'suffix' => 'ags',
|
||||
'group' => 'endpoint',
|
||||
'claim' => 'result',
|
||||
'isarray' => false
|
||||
],
|
||||
'custom_scores_url' => [
|
||||
'suffix' => 'ags',
|
||||
'group' => 'endpoint',
|
||||
'claim' => 'scores',
|
||||
'isarray' => false
|
||||
],
|
||||
'custom_score_url' => [
|
||||
'suffix' => 'ags',
|
||||
'group' => 'endpoint',
|
||||
'claim' => 'score',
|
||||
'isarray' => false
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -561,17 +561,19 @@ class memberships extends \mod_lti\local\ltiservice\service_base {
|
||||
* @return array Key/value pairs of params to claim mapping.
|
||||
*/
|
||||
public function get_jwt_claim_mappings(): array {
|
||||
return array('custom_context_memberships_v2_url' => [
|
||||
'suffix' => 'nrps',
|
||||
'group' => 'namesroleservice',
|
||||
'claim' => 'context_memberships_url',
|
||||
'isarray' => false
|
||||
return [
|
||||
'custom_context_memberships_v2_url' => [
|
||||
'suffix' => 'nrps',
|
||||
'group' => 'namesroleservice',
|
||||
'claim' => 'context_memberships_url',
|
||||
'isarray' => false
|
||||
],
|
||||
'custom_context_memberships_versions' => [
|
||||
'suffix' => 'nrps',
|
||||
'group' => 'namesroleservice',
|
||||
'claim' => 'service_versions',
|
||||
'isarray' => true
|
||||
]);
|
||||
]
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user