Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A fix in Moodle 3.9 in order to comply to LTI standar makes this lib not work anymore for basicoutcomes #30

Closed
igorbga opened this issue Apr 4, 2022 · 3 comments

Comments

@igorbga
Copy link

igorbga commented Apr 4, 2022

I'm using this library succesfully to integrate with Moodle.

With version 3.9.1 of Moodle the basicoutcome service did work right in order to send scorings but it is broken in the actual 3.9.13+
In fact I think it was broken in 3.9.3.

The breakage is ought to those changes in Moodle:

https://tracker.moodle.org/browse/MDL-68384

By just changing src/Util.php to redefine the "lis_outcome_service_url" and "lis_result_sourcedid" so that it matches the ones that moodle uses the problem seems to go away.

So I guess the questions are:

  • Are they right at moodle? Is this library using a non standard claim URI?

If so we should probably fix this library in order to also use the correct claim mappings.

@igorbga igorbga changed the title A fix in Moodle 3.9 in order to compy to standars makes this lib not work anymore for basicoutcomes A fix in Moodle 3.9 in order to comply to LTI standar makes this lib not work anymore for basicoutcomes Apr 4, 2022
@spvickers
Copy link
Contributor

Can you describe the issue you are encountering more specifically to your case. Is is merely that the library is using a scope of https://purl.imsglobal.org/spec/lti-bo/claim/basicoutcome whereas older versions of Moodle are expecting this to be https://purl.imsglobal.org/spec/lti-bos/claim/basicoutcomesservice? (The latter was introduced into Moodle before IMS had declared one, hence the inconsistency. But all versions of Moodle should be using the new name.) Thanks.

@igorbga
Copy link
Author

igorbga commented Apr 5, 2022

Sorry spvickers if I'm not being clear enough, i probably miss much background about LTI.

Not sure if this is also a scope issue, I've just adjusted JWT_CLAIM_MAPPING constant and now it dose work.

'lis_outcome_service_url' => array('suffix' => 'bos', 'group' => 'basicoutcomesservice', 'claim' => 'lis_outcome_service_url'),

'lis_result_sourcedid' => array('suffix' => 'bos', 'group' => 'basicoutcomesservice', 'claim' => 'lis_result_sourcedid'),

Moodle does already send those claims with the new suffix "bo" and group "basicoutcome" in the JWT token, but this library still tries to map them with suffix "bos" and group "basicoutcomesservice".

Take a look at the last 2 changes of this diff in Moodle:

https://github.com/cengage/moodle/compare/MOODLE_39_STABLE...cengage:MDL-68384-fix-spec-violations-39?expand=1#diff-7b59d663ed31af97e11d8554cce4eeaf2afdc0bb9ac01c3a455338fa708f4990L995

@spvickers
Copy link
Contributor

Thanks for the clarification; I understand now and will commit a fix for this shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants