Gets the list of folders and elements belonging to the specified course. Optionally a folderId can be supplied to return just the contents of that subdirectory. The course can be selected by specifying the course id or course sync key.

Input parameters

Name
Description
Type
Mandatory/Optional

SiteId

Site where action will be executed.

Integer

Optional

VendorId

VendorId. Currently not used.

Text

Optional

CourseId

Identifier of the course to get the files and folders for.

Integer

Mandatory, when CourseSyncKey is not specified

CourseSyncKey

SyncKey of the course to get the files and folders for.

String

Mandatory, when CourseId is not specified

FolderId

Identifier of a folder within the course.

Integer

Optional

Output

Output type. Can be set to 'Element' for listing files only or 'Folder'. If unspecified, all contents are listed.

Enum

Optional

IncludeContent

If set to true, the result set will contain the element's content.  If set to false, the Content output parameter will always be null.

Boolean

Optional (defaults to false)

Example request


Sample request for Read.Course.Elements
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:its="http://schemas.datacontract.org/2004/07/Itslearning.Integration.ContentImport.Model.ServiceEntities.CourseElement">
<soapenv:Header/>
<soapenv:Body>
<tem:ReadCourseElements>
<tem:request>
<its:CourseId>5</its:CourseId>
<its:FolderId>79</its:FolderId>
<its:Output>Folder</its:Output>
</tem:request>
</tem:ReadCourseElements>
</soapenv:Body>
</soapenv:Envelope>

Example request with content


Sample request for Read.Course.Elements
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:its="http://schemas.datacontract.org/2004/07/Itslearning.Integration.ContentImport.Model.ServiceEntities.CourseElement">
<soapenv:Header/>
<soapenv:Body>
<tem:ReadCourseElements>
<tem:request>
<its:CourseId>5</its:CourseId>
<its:IncludeContent>true</its:IncludeContent>
</tem:request>
</tem:ReadCourseElements>
</soapenv:Body>
</soapenv:Envelope>

Output parameters

Name
Description
Type

Element

Represents a single course element (i.e. everything that's not a folder).

Parent element

Element / ElementID

Identifier of the element.

Integer

Element / ElementNo

Order of the element within the course.

Integer

Element / Title

Title of the element.

String

Element / Type

Type of element (e.g. Note, LearningToolElement).

String

Element / ExtensionID

Extensions only - the identifier of the extension.

Integer

Element / Active From

Date from which the element became active.

Date/Time

Element / ActiveTo

Date at which the element will no longer be active.

Date/Time

Element / Content

Element content. 

Complex type

Element / LearningObjectives
List of associated learning objective or null
Array
LearningObjective
Learning objective element

Parent element

LearningObjective / LearningObjectiveId
Learning objective identifier from repository
String
LearningObjective / Title
Learning objective title
String
LearningObjective / Description
Learning objective description
String

Folder

Represents a single course folder.

Parent element

Folder / FolderID

Identifier of the folder.

Integer

Folder / Name

Name of the folder.

String




Example response


Sample response for Read.Course.Elements
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:Header>
<o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<u:Timestamp u:Id="_0">
<u:Created>2012-12-13T10:59:08.028Z</u:Created>
<u:Expires>2012-12-13T11:04:08.028Z</u:Expires>
</u:Timestamp>
</o:Security>
</s:Header>
<s:Body>
<ReadCourseElementsResponse xmlns="http://tempuri.org/">
<ReadCourseElementsResult xmlns:a="http://schemas.datacontract.org/2004/07/Itslearning.Integration.ContentImport.Model.ServiceEntities.CourseElement" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:Elements>
<a:Element>
<a:ActiveFrom>2012-01-01T23:59:59</a:ActiveFrom>
<a:ActiveTo>2013-12-31T23:59:59</a:ActiveTo>
<a:ElementId>75</a:ElementId>
<a:ElementNo>1</a:ElementNo>
<a:ElementType>Note</a:ElementType>
<a:ExtensionId i:nil="true"/>
<a:Title>Some Note</a:Title>
<a:LearningObjectives/>
</a:Element>
<a:Element>
<a:ActiveFrom>2012-01-01T23:59:59</a:ActiveFrom>
<a:ActiveTo>2013-12-31T23:59:59</a:ActiveTo>
<a:ElementId>76</a:ElementId>
<a:ElementNo>2</a:ElementNo>
<a:ElementType>LearningToolElement</a:ElementType>
<a:ElementID>5</a:ElementID>
<a:Title>Some Page</a:Title>
<a:LearningObjectives>
<a:LearningObjective>
<a:Description>Demonstrates comprehension of the variety of literary forms in the biblical text</a:Description>
<a:LearningObjectiveId>CD124102-76D8-11DC-B172</a:LearningObjectiveId>  
<a:Title>B1a</a:Title>  
</a:LearningObjective>
</a:LearningObjectives>
</a:Element>
</a:Elements>
<a:Folders>
<a:Folder>
<a:FolderId>79</a:FolderId>
<a:Name>Some Folder</a:Name>
</a:Folder>
</a:Folders>
</ReadCourseElementsResult>
</ReadCourseElementsResponse>
</s:Body>
</s:Envelope>

Example response with content


Sample response for Read.Course.Elements
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:Header>
<o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<u:Timestamp u:Id="_0">
<u:Created>2012-12-13T10:59:08.028Z</u:Created>
<u:Expires>2012-12-13T11:04:08.028Z</u:Expires>
</u:Timestamp>
</o:Security>
</s:Header>
<s:Body>
<ReadCourseElementsResponse xmlns="http://tempuri.org/">
<ReadCourseElementsResult xmlns:a="http://schemas.datacontract.org/2004/07/Itslearning.Integration.ContentImport.Model.ServiceEntities.CourseElement" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:Elements>
<a:Element>
<a:ActiveFrom>2012-01-01T23:59:59</a:ActiveFrom>
<a:ActiveTo>2013-12-31T23:59:59</a:ActiveTo>
      <a:Content i:nil="true" xmlns:b="http://schemas.datacontract.org/2004/07/Itslearning.Integration.ContentImport.Model.ServiceEntities.ContentEntities"/>
                 <a:ElementId>75</a:ElementId>
<a:ElementNo>1</a:ElementNo>
<a:ElementType>Note</a:ElementType>
<a:ExtensionId i:nil="true"/>
<a:Title>Some Note</a:Title>
<a:LearningObjectives/>
</a:Element>
<a:Element>
<a:ActiveFrom>2012-01-01T23:59:59</a:ActiveFrom>
<a:ActiveTo>2013-12-31T23:59:59</a:ActiveTo>
<a:Content i:type="c:PageContent" xmlns:b="http://schemas.datacontract.org/2004/07/Itslearning.Integration.ContentImport.Model.ServiceEntities.ContentEntities" xmlns:c="http://schemas.datacontract.org/2004/07/Itslearning.Integration.ContentImport.Model.ServiceEntities.ContentEntities.PageContent">
<c:ContentBlockSets>
<c:ContentBlockSet>
<c:ContentBlockText>
<c:Title>Page test</c:Title>
<c:Text><![CDATA[<p>Test assignment: <a href="https://site.localhost/TreeLinks?id=6660703d-9f85-4bbd-ba44-f67d2c4f5d4f&sourceElementId=300" >Assignment for page</a> </p>]]> </c:Text>
</c:ContentBlockText>
<c:FileContents/>
</c:ContentBlockSet>
</c:ContentBlockSets>
</a:Content>
                 <a:ElementId>76</a:ElementId>
<a:ElementNo>2</a:ElementNo>
<a:ElementType>LearningToolElement</a:ElementType>
<a:ElementID>5</a:ElementID>
<a:Title>Some Page</a:Title>
<a:LearningObjectives>
<a:LearningObjective>
<a:Description>Demonstrates comprehension of the variety of literary forms in the biblical text</a:Description>
<a:LearningObjectiveId>CD124102-76D8-11DC-B172</a:LearningObjectiveId>  
<a:Title>B1a</a:Title>  
</a:LearningObjective>
</a:LearningObjectives>
</a:Element>
</a:Elements>
<a:Folders>
<a:Folder>
<a:FolderId>79</a:FolderId>
<a:Name>Some Folder</a:Name>
</a:Folder>
</a:Folders>
</ReadCourseElementsResult>
</ReadCourseElementsResponse>
</s:Body>
</s:Envelope>

Error states

In the following cases the service will return an error:

  • Message must contain valid CourseId/CourseSyncKey.

  • Only one of either CourseId or CourseSyncKey parameter can be specified.

  • Course with specified CourseId/CourseSyncKey is not valid.

  • You do not have access to this course.

  • Course is deleted.

  • FolderId [id] is not an element within the course.

  • FolderId [id] is not a folder or valid parent element.

  • FolderId [id] is a deleted element.

Example error message response

Sample Read.Course.Elements error message response
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:Header>
<o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<u:Timestamp u:Id="_0">
<u:Created>2012-12-13T13:02:47.946Z</u:Created>
<u:Expires>2012-12-13T13:07:47.946Z</u:Expires>
</u:Timestamp>
</o:Security>
</s:Header>
<s:Body>
<s:Fault>
<faultcode>s:Client</faultcode>
<faultstring xml:lang="en-GB">FolderId 999 is not an element within the course.</faultstring>
</s:Fault>
</s:Body>
</s:Envelope>