Create.Course.Element.IMSPackage

This method creates an IMS package in a course. It supports IMS Content Packages and SCORM packages.
The content packages must be in ZIP format and the content package must be uploaded to ISTL before calling this method.
Some packages contain multiple items (paragraphs). While calling this method it can be marked that these items will be created as separate items in the itslearning tree menu.

Action

This type of message will create one or more weblinks in a course. The weblink elements can be added to the course root folder or another folder within a course.
If there are created multiple items they will be placed in a folder with the same name as the contentpackage.
A UserId or UserSyncKey needs to be specified which identifies the user who created the content package links.

Screenshots

Here are some screenshots that explain how the import process is going when importing an IMS Package from the itslearning User Interface:

(If the package contains multiple items) After uploading the package the question is asked if the user wants the separate items to appear as separate links in the treemenu or only one item in the menu:

images/download/attachments/11174046/single_multiple.png

If the user chooses "import as single resource", the ims package will appear as a weblink with the same name as the package.

images/download/attachments/11174046/treemenu_single.png

If the user chooses "import as multiple resources", the IMS Package will be displayed as a collection of weblinks in a folder with the same name as the IMS Package.

images/download/attachments/11174046/treemenu_multiple.png

Best Practice for 3rd Parties

  • The IMS Global Learning Consortium develops and promotes the adoption of open technical specifications for interoperable learning technology. Several IMS specifications have become worldwide standards for delivering learning products and services. Itslearning follows the IMS Content Package, IMS QTI and IMS Enterprise.

  • The content packages must be in ZIP format. The content packages must already have been uploaded to ISTL.

Parameters

Name

Description

Type

M/O

Message Type

Type of Message.

Text. ?CreateCourseElementTest?

M

SyncKey

External SyncKey for the created content.

Text

O

SiteId

Site where action will be executed

Int

O

VendorId

VendorId which will be associated with created content

Text

O

CourseID

ID of the course where the element is to be created.

Integer

O/M

CourseSyncKey

SyncKeyID of the course where the element is to be created.

Text

O/M

ParentSyncKey

SyncKey of the (previously created) folder where the element is to be created. If not specified then create in root. Must be a SyncKey.

Text

O

UserID

UserID of the creator.

Integer

O/M

UserSyncKey

User SyncKeyID of the creator.

Text

O/M

ExtractTo

How packages are opened. Either "Extract as single resource" or "Extract as multiple resources". This matches the options in the UI.

Text ("Single" or "Multiple") Default is "Single"

O

File

File ID of the file already uploaded to ITSL.

Text

M

Errors Status:

  1. Invalid format / parameters (different to specified schema).

  2. Message contains duplicates for syncKeys: {0}. Make sure your syncKeys are globally unique.

  3. User with specified UserId/UserSyncKey is not valid.

  4. User with specified UserId/UserSyncKey is deleted.

  5. User with specified UserId/UserSyncKey is external.

  6. Course does not exist.

  7. Course is external.

  8. Course is be deleted.

  9. Course is archived.

  10. ParentSyncKey is not an element within the course.

  11. ParentSyncKey is not a folder or valid parent element.

  12. ParentSyncKey is deleted.

  13. Invalid or unknown ParentSyncKey.

  14. Unknown File (asset) ID. Check the asset has not expired.

  15. Invalid file type. Only .zips can be imported.

  16. An error occurred when trying to import the package testimages.zip. Possible causes could be that the zip format is not valid, or the file imsmanifest.xml is missing inside the package.

  17. Your security settings doesn't allow you to perform that operation. Please contact administration to grant you an access to {HieararchyName} organisation.

Schema

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="urn:message-schema"
elementFormDefault="qualified"
targetNamespace="urn:message-schema">
<xs:element name="Message">
<xs:complexType>
<xs:sequence>
<xs:element name="SyncKeys" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="SyncKey" minOccurs="0" maxOccurs="1" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="CreateCourseElementIMSPackage" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:choice minOccurs="1" maxOccurs="1">
<xs:element name="CourseId" type="xs:integer" />
<xs:element name="CourseSyncKey" type="xs:string" />
</xs:choice>
<xs:element name="ParentSyncKey" minOccurs="0" maxOccurs="1" type="xs:string" />
<xs:choice minOccurs="1" maxOccurs="1">
<xs:element name="UserId" type="xs:integer" />
<xs:element name="UserSyncKey" type="xs:string" />
</xs:choice>
<xs:element name="File" minOccurs="1" maxOccurs="1" type="xs:string" />
<xs:element name="ExtractTo" minOccurs="0" maxOccurs="1" type="ExtractToValue" default="Single" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:simpleType name="ExtractToValue">
<xs:restriction base="xs:string">
<xs:enumeration value="Single"/>
<xs:enumeration value="Multiple"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>

Message content example

<?xml version="1.0" encoding="utf-8"?>
<Message xmlns="urn:message-schema">
<SyncKeys>
<SyncKey>SyncKey1</SyncKey>
</SyncKeys>
<CreateCourseElementIMSPackage>
<CourseId>1</CourseId>
<ParentSyncKey>ParentSyncKey1</ParentSyncKey>
<UserId>1</UserId>
<File>312a10a2-a79c-4d9e-ba11-697b85eea65f</File>
<ExtractTo>Single</ExtractTo>
</CreateCourseElementIMSPackage>
</Message>