numbas / numbas-lti-provider

An LTI tool provider to run Numbas exams
https://docs.numbas.org.uk/lti/en/latest/
Other
11 stars 12 forks source link

Numbas LTI items break on course copy #128

Open peterlcsteele opened 3 years ago

peterlcsteele commented 3 years ago

When copying/duplicating a Blackboard Learn 9.1 course the deployed Numbas items deployed via the LTI Provider no longer function and require redeploying individually. This results in a bunch of manual work each time a course is copied.

Consider adding LTI 1.2 support and history lookup and auto-relink support using the $Context.id.history and/or $ResourceLink.id.history custom params to ensure LTI items remain functional in any copied courses. See https://www.imsglobal.org/lti-course-copy-road-nowhere

christianp commented 3 years ago

Thanks, I didn't know there was a recommended solution for this! I thought it was a surprising omission from the LTI spec.

I've looked at supporting more recent versions of LTI, but got lost in the different branches around LTI 2.0 and LTI Advantage.

Have I understood right that if a resource link is copied, then we should copy the exam package and the settings from the corresponding Numbas LTI resource, but not attempt data? Are there any similar LTI parameters to denote a moved link?

jhoobergs commented 2 years ago

Another solution is https://github.com/numbas/numbas-lti-provider/pull/219 but the settings will not be kept in that case.

jhoobergs commented 2 years ago

I worked out different situations based on the information above and the idea in https://github.com/numbas/numbas-lti-provider/pull/219.

LTI support

I looked into this a bit deeper and this is what I found:

https://www.imsglobal.org/lti-course-copy-road-nowhere has the following information

The values of these variables provide a list of the resource link IDs and context IDs with which the current link has previously been associated. The first ID in each list will be for the course from which the current course was copied; the second will be from the course from which the previous course was copied, etc. Thus, when Atomic Learning receives a launch with a resource link ID which it does not recognise, it can check the resource link ID history to see if any of these are known to them. If they are, a copy of the playlist associated with that resource link ID can be made so the connection can be re-established for the teacher and their students. The history of IDs are provided in reverse chronological order, so that the first match found (most recent) is the one to use.

They talk about custom fields $ResourceLink.id.history and $Context.id.history but seem to only use the history of the resource links. So only $ResourceLink.id.history is really important for their solution.

I also seems that these fields (the Resourcelink history in particulair) are NOT necessarily widely supported:

$ResourceLink.id.history $Context.id.history
Blackboard 9.1 Blackboard 9.1
Brightspace* Brightspace*
Moodle?** Moodle
Canvas***

* https://community.brightspace.com/s/article/LTI-Copy-Course-Updates

** https://youtu.be/c7vt7ClGTRM?t=138 shows resourceLink.id.history, but does it work?

*** https://community.canvaslms.com/t5/Canvas-Developers-Group/Need-Previous-Resource-Link-Id/m-p/388131/highlight/true#M6336 and https://github.com/instructure/canvas-lms/blob/master/lib/lti/variable_expander.rb#L441

Support to specify a custom launch url on assignment creation

LMS $ResourceLink.id.history $Context.id.history Custom launch url
Blackboard 9.1 x x x
Brightspace x x x
Moodle ? x x
Canvas ? x ?

Situations

Situation A: Support for ResourceLink.id.history

Situation B: Support for Context.id.history but not for ResourceLink.id.history AND support for custom lti launch url's for each assignment

Situation C: No support for histories, but support for custom lti launch url's for each assignment

Situation D: No support for histories and no support for custom lti launch url's

christianp commented 2 years ago

Thanks for this, it's really helpful.

So Canvas can't do ResourceLink.id.history, but it also can't do custom launch URLs (at least, it's turned off at Newcastle), so your situations B and C don't feel too appealing to me.

jhoobergs commented 2 years ago

I forgot to ask, how do you go about copying courses at Newcastle?

christianp commented 2 years ago

We don't! The central IT team copy Canvas courses over each year, and they haven't reached the level of sophistication where they've thought about copying LTI links properly.