Question: If I'm copying an existing course with content to another course, will the child course (copied course) contain the reference of the parent course Id when passed in an LTI request or is there another way I can get the parent context_id?
Answer originally posted on 4/21/2014 in the ValenceUsers forum by Viktor Haag.
I presume that your question is about what happens to LTI Links to external learning tools when you copy the content from one course to another? I also presume that the "context" you're talking about is the LTI property "context_id"?
Note that the context_id always describes the context from which the LTI Launch happens at launch time. It is not settable at link placement time, and it contains the context for the launch, and not any historical context.
Also, you cannot, through LTI, determine the course from which the current context was copied.
If the way you're copying is from a Course Template org unit to a Course Offering org unit, and the Course Template is a parent of the Course Offering in the D2L Learning Environment org unit structure, then that structural information is available through Valence Learning Framework APIs. A calling user with sufficient privileges can use the org structure APIs (http://docs.valence. desire2learn.com/res/orgunit. html) to retrieve property details about org units, including their position in the course hierarchy. Note that, typically, the kinds of users that are initiating LTI launches (instructors and students) may not, themselves, have sufficient permissions based on their LMS role to use these APIs: they're more intended for use by administrator role users.
Also, if you're copying Course A to Course B, and you're not linking them together explicitly in the org unit structure, there's really no way to keep track of that copy operation after the fact, through the API. The "source" of an org unit's initial properties/data is not maintained as a property: only the org unit's structural relationship within the hierarchy is (which you could lean on, if the rules around when copying happens in your organization are directly tied to the org unit structure).
Q: If a course is copied over, the child course will have assignments with dead links to external content. If this external content has to be activated, a link should be established by the external content provider using the Org Unit structure (if it exists).Answer originally posted on 4/22/2014 in the ValenceUsers forum by Viktor Haag.
I'm not exactly sure what will happen to the external learning tool links during a course copy: I believe that links to external learning tools get duplicated, but the resource_link_id updated (so that on launch the new link link will have all the same characteristics as the original link: it should use the same consumer key/secret, have the same properties about what information it sends in the POST, and so on, but will appear to be a new link placement because of a new resource_link_id).
All I mean to suggest is that the context_id for the LTI Launch is set at launch time, when someone clicks a link to an external learning tool that causes the launch. Therefore, where the link is placed determines what its launchingcontext_id will be. LTI doesn't specify any way to trace the heritage of a link placement, and the D2L Learning Environment doesn't provide any custom properties to trace this through the LTI launch properties.
You can use the Valence Learning Framework API to examine the LMS' org unit structure (with a calling user having sufficient role permissions), but this information only tells you about the current state of the structure: no historical information is available. Additionally, no historical information about the copying of courses is visible through the API. You could infer such a relationship if, for example, you know that the only time a course copy happens is when you create a new Course Offering from a Course Template (you can then use the LF API to see which org units are parents of a Course Offering), but this would only be an inference, and not direct evidence.
Question: Will the topic_id be generated new for the created assignments or will it be same across all the copied courses? I was wondering whether this could be used to identify the copied course.
Originally posted on 5/2/2014 in the ValenceUsers forum by Viktor Haag.
I believe the modules and topics in the new course will all have new IDs created for them, and no record of the previous ID is kept around in association, so, no, that's not a path to keeping track of content's "lineage" either.