2

We have set up "master" templates for each of our courses. These templates contain both structure and content of each course.

I want automate the creating of the courses at the commencement of each semester, based on our timetable information.

I have got Valance to the point of creating a course from a template. From what I can see in the documentation it looks like I will have to parse the content of the template and copy individual items across to the unique courses.

Is this correct, or is there a simple way to copy the entire content from the template across to the actual course instance?

Iain Carlin
  • 550
  • 7
  • 21

2 Answers2

1

Content assigned to a course template does not get copied into a newly created course offering that lists the template as its CourseTemplate. If you want to store content in a course template and then copy it into a new course associated with that template, you can use the course content APIs to inquire about the template's content structure, and replicate it in the newly created course: the Content.ContentObjectData JSON blocks you use to create new content structure are a superset of the Content.ContentObject JSON blocks you see when you ask about the content structure.

Unfortunately, because of the rules around an org unit's file content store, we really don't recommend that you put actual file data into a course template's content store, because there's no easy way to refer to them from child course offerings, or copy them remotely into the child course offering's content space.

If you do store file data in the template's content space and want to put it into child course offerings, you need to fetch it from the LMS to the client and re-upload it into the new course offering.

You may get more leverage out of storing common course data objects in Desire2Learn's Learning Object Repository where what you put into the course template/offering's content structure are links, not files.

Viktor Haag
  • 3,363
  • 1
  • 18
  • 21
  • This doesn't actually answer my question i.e. Using the API, is there a simple way to copy the entire content from the template across to the actual course instance? Using the LMS, it is possible to copy all content from the Parent Template of the course offering into the actual course. What I want to know is if this is possible from the API in one call. – Iain Carlin Dec 07 '12 at 01:13
  • No, it is not possible in the API in one call, as far as I know. – Viktor Haag Jan 05 '13 at 00:37
0

The answer seems to be that there is no simple way of bulk copying all the content from a template to a course offering using the Valence API.

I had a go at doing it by traversing the content structure by accessing the TOC object from the template then copying each individual module and topic in the structure.

Unfortunately this is made all the more difficult by the fact that the API doesn't return the id of the module or topic created. So, when it comes to adding the nested content objects, you have to requery the current course modules to find the object you just added.

At that point it has become all too hard and we're going to automate the creation of course offerings from the template, but advise teachers to use the built in Import/Export/Copy Components feature to copy the content from the template into the course offering.

Iain Carlin
  • 550
  • 7
  • 21
  • The API not returning the ID of the module/topic created is a known issue that I _believe_ will be released in the upcoming spring-time release of the LMS. – Viktor Haag Jan 05 '13 at 00:43