Update.Course.Element
This method will provide possibility to update common properties of a single element.
Action
Updates specified element belonging to the course. The course can be selected using sync key or id. The element can be selected specifying element sync key or element id. Standard organisation level security applies to the method – home organisation should be identified by course organisation element belongs to.
Standard organisation level security was implemented for this method.
Input
Name | Description | Type | M/O | |
SiteId | Site where action will be executed | Int | O | |
VendorId | VendorId which will be associated with created content | Text | O | |
ElementId | Element identifier | Int | M/O | |
ElementSyncKey | Element sync key | Text | M/O | |
CourseId | Course identifier | Int | M/O | |
CourseSyncKey | Course sync key | Text | M/O | |
PersonId | itslearning person identifier. | Int | M/O | |
PersonSyncKey | itslearning person synchronization key. | Text | M/O | |
ElementNo | Order of element within the course | Int | O | |
ActiveFrom | UTC date from which the element became active | Date | O | |
ActiveTo | UTC date when element will no longer be active | Date | O | |
LearningObjectives | List of associated learning objective or null | Object | O | |
LearningObjective | Learning objective element | Object | O | |
LearningObjectiveId | Learning objective identifier from repository | Text | M |
Sample request messages
To set fields and to add learning objective.
In case if there is no this learning objective in course, the learning objective will be imported from LOR.
Sample:
<
Message
xmlns
=
"urn:message-schema"
xmlns:i
=
"http://www.w3.org/2001/XMLSchema-instance"
>
<
UpdateCourseElement
>
<
CourseId
>1055</
CourseId
>
<
ElementId
>11939</
ElementId
>
<
PersonId
>1488</
PersonId
>
<
ElementNo
>3</
ElementNo
>
<
ActiveFrom
>2013-06-06T01:01:01+00:00</
ActiveFrom
>
<
LearningObjectives
>
<
LearningObjective
>
<
LearningObjectiveId
>CD124102-76D8-11DC-B172</
a
:LearningObjectiveId>
</
LearningObjective
>
</
LearningObjectives
>
</
UpdateCourseElement
>
</
Message
>
To remove learning objectives from element set empty LearningObjectives tag.
Sample:
<
Message
xmlns
=
"urn:message-schema"
xmlns:i
=
"http://www.w3.org/2001/XMLSchema-instance"
>
<
UpdateCourseElement
>
<
CourseId
>1055</
CourseId
>
<
ElementId
>11939</
ElementId
>
<
PersonId
>1488</
PersonId
>
<
ElementNo
>3</
ElementNo
>
<
LearningObjectives
>
</
LearningObjectives
>
</
UpdateCourseElement
>
</
Message
>
Error states
- Message must contain valid ElementId/ElementSyncKey.
- Only one of either ElementId or ElementSyncKey parameter can be specified.
- Course does not exist.
- Message must contain valid CourseId/CourseSyncKey.
- Only one of either CourseId or CourseSyncKey parameter can be specified.
- Course is deleted.
- Element is not within the course specified.
- Element is deleted.
- Course has no Learning Objectives enabled.
- Element with type Folder/Lesson/Extension doesn't support learning objectives.
- Learning objective is not a leaf. Only most granular learning objective can be assigned to elements.
- Learning objectives cannot be changed if they have already been assessed.
- Your security settings doesn't allow you to perform that operation. Please contact administration to grant you an access to {HieararchyName} organisation.
- Learning objective with UniqueId='{LearningObjectiveId}' is not in the learning objective repository.
- 'FROM' date can not be more recent than 'TO' date.
- Element doesn't support activation period.
- User with specified PersonId/PersonSyncKey is not valid.
- User with specified PersonId/PersonSyncKey is deleted.
- User with specified PersonId/PersonSyncKey is external.
- Message must contain valid PersonId/PersonSyncKey.