Update.Course.Element.CustomActivity.Assessment
This method will update assessment records of a custom assessment element.
Action
This type of message will update assessments of a custom activity in a course. Each custom activity is identified using course id or synchronization key (sync key) and element id or sync key associated with it during creation. Each person in result array should be identified by itslearning id or synchronization key. The Status parameter sets the task status for each participant. The Status is used to indicate the state of the participant’s task: Not started, Completed. This is used throughout itslearning in e.g. the task list and progress report. The Evaluator is defining the user who made the evaluation. It is possible to remove the current assessment or comment, by specifying xsi:nil="true" attribute.
Scenario
In order to update assessments for a custom activity: Add a message with the type corresponding to Update.Course.Element.CustomActivity.Assessment. The result of that message processing can be acquired using GetMessageResult method with message identifier as an input parameter.
Input
Name | Description | Remarks | Type | M/O | Nullable (nillable="true" in schema) |
Message Type | Type of Message. | UpdateCourseElementCustomActivityAssessment | M | ||
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 updated. | You are not allowed to enter both CourseId and CourseSyncKey. | Integer | O/M | |
CourseSyncKey | SyncKey of the course where the element is to be updated. | Text | O/M | ||
ElementId | ID of the custom activity's element to update. Used interchangeably with ElementSyncKey. | You are not allowed to enter both ElementId and ElementSyncKey. | Integer | O/M | |
ElementSyncKey | SyncKey of the custom activity's element to updated. Used interchangeably with ElementId. | Text | O/M | ||
EvaluatorPersonId | Evaluator's itslearning person identifier. | You are not allowed to enter both EvaluatorPersonId and EvaluatorPersonSyncKey. | Integer | O/M | |
EvaluatorPersonSyncKey | Evaluator's person synchronization key | Text | O/M | ||
Results | Array of result elements. | Object | M | ||
Result | Result element | Object | M | ||
ParticipantPersonId | Participant's itslearning person identifier | You are not allowed to enter both PersonId and PersonSyncKey. | Integer | O/M | |
ParticipantPersonSyncKey | Participant's person synchronization key | Text | O/M | ||
AssessmentItemId | If assessment scale is used for element, it is required to use assessment item id to specified results | The request should contain at least one of the following: Comment, Score, Status, AssessmentItemId, Score. AssessmentItemId can't be used with combination of Score. The values can be set to 'nil' to clear the existing information. | Integer | O/M | Y |
Score | If score is used for element, it is required to use it for specifying results | Double | O/M | Y | |
Status | The status of the result. When it's not set, but AssessmentItemId / Score is specified then it is set to completed. | Enumeration: NotStarted, Completed | O/M | Y | |
Comment | Optional text comment field (HTML formatted). The field is whitelist filtered. | Text | O/M | Y |
Output
Finished Status:
If custom activity's assessment was updated successfully, the API returns 'Result updated successfully' information message and optionally - warnings, for each result updated.
Warning Status:
User with specified ParticipantPersonId/ParticipantPersonSyncKey is not valid.
User with specified ParticipantPersonId/ParticipantPersonSyncKey is deleted.
- Participant specified is not a participant for this activity.
- Assessment item id is not valid for assessment used.
- Assessment is using score, please use score field instead of assessment item id.
- Assessment is using assessment scale, please use assessment item id instead of score.
- Assessment is not being used, assessment will be ignored.
Errors Status:
Some error messages only return error codes. In this case, refer to the codes next to the messages e.g. [Error Code: ...], to get a more detailed message.
Invalid format / parameters (different to specified schema).
Course does not exist.
Course is deleted.
Course is archived.
Element is not within the course specified.
Element is deleted.
Your security settings doesn't allow you to perform that operation. Please contact administration to grant you an access to {HieararchyName} organisation.
- Participant is not a course member.
- Evaluator is not a course member.
- Evaluator does not have evaluator privilege to this activity.
User with specified EvaluatorPersonId/EvaluatorPersonSyncKey is not valid.
- User with specified EvaluatorPersonId/EvaluatorPersonSyncKey is deleted.
- User with specified EvaluatorPersonId/EvaluatorPersonSyncKey is external.
Schema
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
xs
:schema
xmlns:xs
=
"http://www.w3.org/2001/XMLSchema"
xmlns
=
"urn:message-schema"
elementFormDefault
=
"qualified"
targetNamespace
=
"urn:message-schema"
>
<
xs
:element
name
=
"Message"
type
=
"MessageType"
/>
<
xs
:complexType
name
=
"MessageType"
>
<
xs
:sequence>
<
xs
:element
name
=
"UpdateCourseElementCustomActivityAssessment"
type
=
"UpdateCourseElementCustomActivityType"
/>
</
xs
:sequence>
</
xs
:complexType>
<
xs
:complexType
name
=
"UpdateCourseElementCustomActivityType"
>
<
xs
:sequence>
<
xs
:choice
id
=
"Course"
>
<
xs
:element
name
=
"CourseId"
type
=
"xs:integer"
/>
<
xs
:element
name
=
"CourseSyncKey"
type
=
"xs:string"
/>
</
xs
:choice>
<
xs
:choice
id
=
"Element"
>
<
xs
:element
name
=
"ElementId"
type
=
"xs:integer"
/>
<
xs
:element
name
=
"ElementSyncKey"
type
=
"xs:string"
/>
</
xs
:choice>
<
xs
:choice
id
=
"Evaluator"
>
<
xs
:element
name
=
"EvaluatorPersonId"
type
=
"xs:integer"
/>
<
xs
:element
name
=
"EvaluatorPersonSyncKey"
type
=
"xs:string"
/>
</
xs
:choice>
<
xs
:element
name
=
"Results"
minOccurs
=
"0"
maxOccurs
=
"1"
>
<
xs
:complexType>
<
xs
:sequence>
<
xs
:element
name
=
"Result"
maxOccurs
=
"unbounded"
>
<
xs
:complexType>
<
xs
:sequence>
<
xs
:choice
id
=
"Participant"
>
<
xs
:element
name
=
"ParticipantPersonId"
type
=
"xs:integer"
/>
<
xs
:element
name
=
"ParticipantPersonSyncKey"
type
=
"xs:string"
/>
</
xs
:choice>
<
xs
:choice>
<
xs
:sequence>
<
xs
:choice
id
=
"Assesment"
>
<
xs
:element
name
=
"AssessmentItemId"
type
=
"xs:integer"
nillable
=
"true"
/>
<
xs
:element
name
=
"Score"
type
=
"xs:double"
nillable
=
"true"
/>
</
xs
:choice>
<
xs
:choice
minOccurs
=
"0"
>
<
xs
:sequence>
<
xs
:element
name
=
"Status"
type
=
"StatusType"
/>
<
xs
:element
name
=
"Comment"
type
=
"xs:string"
minOccurs
=
"0"
nillable
=
"true"
/>
</
xs
:sequence>
<
xs
:element
name
=
"Comment"
type
=
"xs:string"
nillable
=
"true"
/>
</
xs
:choice>
</
xs
:sequence>
<
xs
:choice>
<
xs
:sequence>
<
xs
:element
name
=
"Status"
type
=
"StatusType"
/>
<
xs
:element
name
=
"Comment"
type
=
"xs:string"
minOccurs
=
"0"
nillable
=
"true"
/>
</
xs
:sequence>
<
xs
:element
name
=
"Comment"
type
=
"xs:string"
nillable
=
"true"
/>
</
xs
:choice>
</
xs
:choice>
</
xs
:sequence>
</
xs
:complexType>
</
xs
:element>
</
xs
:sequence>
</
xs
:complexType>
</
xs
:element>
</
xs
:sequence>
</
xs
:complexType>
<
xs
:simpleType
name
=
"StatusType"
>
<
xs
:restriction
base
=
"xs:string"
>
<
xs
:enumeration
value
=
"NotStarted"
/>
<
xs
:enumeration
value
=
"Ongoing"
/>
<
xs
:enumeration
value
=
"Completed"
/>
</
xs
:restriction>
</
xs
:simpleType>
</
xs
:schema>
Examples
Message content example
<
Message
xmlns
=
"urn:message-schema"
xmlns:i
=
"http://www.w3.org/2001/XMLSchema-instance"
>
<
UpdateCourseElementCustomActivityAssessment
>
<
CourseId
>1055</
CourseId
>
<
ElementId
>11939</
ElementId
>
<
EvaluatorPersonId
>1</
EvaluatorPersonId
>
<
Results
>
<
Result
>
<
ParticipantPersonId
>107893</
ParticipantPersonId
>
<
AssessmentItemId
>6</
AssessmentItemId
>
<
Comment
i:nil
=
"true"
/>
</
Result
>
<
Result
>
<
ParticipantPersonId
>1111</
ParticipantPersonId
>
<
Comment
i:nil
=
"true"
/>
</
Result
>
<
Result
>
<
ParticipantPersonSyncKey
>10</
ParticipantPersonSyncKey
>
<
AssessmentItemId
>3</
AssessmentItemId
>
</
Result
>
<
Result
>
<
ParticipantPersonId
>4</
ParticipantPersonId
>
<
AssessmentItemId
>6</
AssessmentItemId
>
</
Result
>
<
Result
>
<
ParticipantPersonId
>9</
ParticipantPersonId
>
<
AssessmentItemId
>4</
AssessmentItemId
>
<
Comment
>Well done</
Comment
>
</
Result
>
</
Results
>
</
UpdateCourseElementCustomActivityAssessment
>
</
Message
>
Output examples
<
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>2013-05-24T10:35:34.882Z</
u
:Created>
<
u
:Expires>2013-05-24T10:40:34.882Z</
u
:Expires>
</
u
:Timestamp>
</
o
:Security>
</
s
:Header>
<
s
:Body>
<
AddMessageResponse
xmlns
=
"http://tempuri.org/"
>
<
AddMessageResult
xmlns:a
=
"http://schemas.datacontract.org/2004/07/Itslearning.Integration.ContentImport.Services.Entities"
xmlns:i
=
"http://www.w3.org/2001/XMLSchema-instance"
>
<
a
:MessageId>357</
a
:MessageId>
<
a
:Status>Errors</
a
:Status>
<
a
:StatusDetails>
<
a
:DataMessageStatusDetail>
<
a
:Entity>107893</
a
:Entity>
<
a
:Message>Result updated successfully.</
a
:Message>
<
a
:SyncKey/>
<
a
:Type>Info</
a
:Type>
</
a
:DataMessageStatusDetail>
<
a
:DataMessageStatusDetail>
<
a
:Entity>1111</
a
:Entity>
<
a
:Message>Participant is deleted.</
a
:Message>
<
a
:SyncKey/>
<
a
:Type>Warning</
a
:Type>
</
a
:DataMessageStatusDetail>
<
a
:DataMessageStatusDetail>
<
a
:Entity/>
<
a
:Message>Participant does not exist.</
a
:Message>
<
a
:SyncKey>10</
a
:SyncKey>
<
a
:Type>Warning</
a
:Type>
</
a
:DataMessageStatusDetail>
<
a
:DataMessageStatusDetail>
<
a
:Entity>4</
a
:Entity>
<
a
:Message>Participant is not a course member.</
a
:Message>
<
a
:SyncKey/>
<
a
:Type>Error</
a
:Type>
</
a
:DataMessageStatusDetail>
<
a
:DataMessageStatusDetail>
<
a
:Entity>9</
a
:Entity>
<
a
:Message>Participant is deleted.</
a
:Message>
<
a
:SyncKey/>
<
a
:Type>Warning</
a
:Type>
</
a
:DataMessageStatusDetail>
</
a
:StatusDetails>
</
AddMessageResult
>
</
AddMessageResponse
>
</
s
:Body>
</
s
:Envelope>