Closed jon-betts closed 1 year ago
The basic mechanism our app uses to detect a copied course is the LTI variable "resource_link_history" which points us to the previous version of the assignment
https://github.com/hypothesis/lms/blob/main/lms/services/assignment.py#L38
As this is LTI launch based we are only aware of it when a new launch happens on the new course.
There's another parameter in the spec context_history
, that points to the original course, not the assignment. We don't have that parameter configured in the tool in all LMS's.
In practice, we care more about the assignment and we could find the copied course from the copied assignment if we needed to, so:
If we know it's happened, do we know which course we were copied from? We could based on the info from the DB
If we know it's happened, do we know which assignment we were copied from?
We know based on the LTI parameter. We now store this as Assignment.copied_from
How much sense does it think of it in an assignment context (given courses are copied, not assignments)?
Assignments are copied along with the course. This seems to be the main thing we've cared about in "course copy", it always has been "assignment copy".
Is it the same for each LMS product?
For Blackboard|D2L all of this is generalized to some extent. Each of these has its own particularities around what gets copied on course copy (files? groups?) and have many options on the actual copying inside the LMS. The general idea remains the same across all of them.
(edited, to add this canvas section)
Canvas doesn't support assignment history, nor does moodle. For moodle there's an issue tracking this:
In canvas we rely on adding parameters to the launch URL on deeplinking. We can't take that approach here because we don't know the right ID to begin with.
resource_link_id_history
isn't available in all LMS's, is it? I think I remember Canvas not supporting it? I saw that you said further down in your comment that Moodle doesn't support it.
We might be able to rely on context_history
by requiring admins to enable it in order to get the new feature. But does context_history
work in all LMS's?
In cases where both resource_link_id_history
and context_history
are missing we could show an error dialog explaining to the user what their admin needs to do to enable our copy-annotations feature. (I would recommend this error dialog + explanation approach rather than hiding the feature: we want users to know that the feature exists and to bug their admins to enable it.)
Do we need to do a breakdown of resource_link_id_history
and context_history
availability by LMS?
In practice we care more about the assignment and we could find the copied course from the copied assignment if we needed to, so:
Yes. I think it's worth clarifying this: the proposed feature is that on first launch of a copied assignment we show the instructor a UI that lets them copy the annotations from the original assignment. So the feature is about copying the annotations from one assignment to another. It doesn't have anything directly to do with courses. "Course copy" is just the mechanism by which LMS's allow users to copy assignments but I think "course copy" is more of a distraction than anything when talking about this feature. The feature is to enable copying the annotations from one assignment to another, and course-copy is only really relevant because we're proposing to automatically select the original (copied-from) assignment as the assignment to copy the annotations from.
How much sense does it think of it in an assignment context (given courses are copied, not assignments)?
Assignments are copied along with the course. This seems to be the main thing we've cared about in "course copy", it always has been "assignment copy".
Yes :+1:
I think it's reasonable to point out that an instructor might want to copy the annotations from all assignments in the parent course to all corresponding assignments in the new course and the design as currently proposed would require the teacher to launch each new assignment one-by-one to achieve this. So I can imagine extending the proposed copy-annotations dialog with an easier way to also copy the annotations for other assignments in the same course at the same time, without having to launch them all. But this seems like a later iteration of the feature and something that we could definitely leave out of the first version. And note that it may not be simple to implement: if the new (copied) assignments in the new course haven't been launched then we don't yet know that they exist and don't have any record of them in our DB. It probably wouldn't actually be very onerous for an instructor to open each assignment in order to launch the copy-annotations dialog for each, so the benefits of extending the dialog to handle multiple assignments at once might outweigh the costs.
Anyway, in order to keep this simple and ship something reasonably soon I think it's important to think of this as an assignment-based feature for the first version. The Hypothesis LMS app is very much an assignment-based app.
Do we need to do a breakdown of resource_link_id_history and context_history availability by LMS?
This seems like useful information to keep up to date. It will also vary across LTI versions not only LMS type. On top of that supporting is not enough. We have to enable it in all installs so we'd have to keep track also of what are our defaults.
That being said I don't think context_history
brings much to the table when we already built features around the assignment-based one which gives us more information (assignments belong to courses).
Then there's Moodle which doesn't support the assignment-based one but does have support for the course one. I reckon unfortunately that means that everything course copy related won't work there until that's fixed. That's the case right now for URL-based assignments. They get unconfigured on course copy.
all corresponding assignments in the new course and the design as currently proposed would require the teacher to launch each new assignment one-by-one to achieve this
I'd argue that we don't need UI for the first version of this. A sane default (ie copy all teacher annotations that are not replies) would work without teacher intervention. If this needs to be changed we could use the existing editing feature to change that (with the big caveat that we'd need to think about how to do that in Canvas).
For Canvas|Blackboard|D2L all of this is generalized to some extent.
Misremembered this:
Blackboard and D2L both expose the LTI parameter with the assignment history. Moodle doesn't support it but there's a chance it will in the future.
For Canvas to support other "course copy" features we hardcode IDs on the launch URL while deeplinking. Not likely we could use something similar for that.
Reading through this forum post doesn't offer much hope of a good solution over in canvas:
Following that post's suggestion, I quickly tried to get the original_assignment_id
from the API but it shows up as null
in the response, exactly as the person with the same issue reported.
Summarizing everything here.
We don't know
There's another limitation in canvas that is not related to course copy but it might have an impact here: while editing an assignment within Canvas (using Canvas UI) we don't know which assignment it is, it might be an existing one or a new one.
This prevents us from adding our own editing controls as editing might happen in Canvas that we are not aware of.
We could use a heuristic to know from which assignment something is copied the first time we see it (similar names? same document?). We could present a list of candidates. We wouldn't know for sure if this was a copy at all to start with.
We could start using Context.Id.History
which will tell us if something is a copy and from which course it originated. We might still need a heuristic/user input to determine the original assignment. This needs admin intervention from schools to add the new variable.
We could also start including the course id in the launch URL and when we detect a mismatch assume a copy has happened. This will have the same effect as adding Context.Id.History
but without needing admin intervention. It would only work for assignments configured after the change.
When an assignment is first launched we know if it's a copy and from which assignment it originated.
We also know this while editing and on any launch after the first one.
We can track https://tracker.moodle.org/browse/MDL-63545. Once that's released it could work as D2L and blackboard. That will only work for newer Moodle instances.
Alternatively, we could Context.Id.History
to know if something is a copy and from which course it originated (but not the exact assignment). This approach will need intervention by the admins at schools to add the new variable.
In order to work out what we can and can't do when a user has copied a course we will need to know how LMS currently behaves when this happens.
The aim here is to have enough information about how LMS behaves in different contexts to steer and validate approaches.
Some questions
Outcome of the spike
See also
https://www.notion.so/State-of-course-copy-integration-across-different-LMS-da85509e2de2445aa028f9b38e46d26c