This will create an assignment element in a course. Depending on customer settings, new assignment or old assignment will be created. It will not create any results, just the assignment.
We advise to use the this method instead when creating assignments.
What is an assignment?
Assignments are specified tasks given to participants. The teacher provides the participants with an assignment and the participants submit the assignment answers in itslearning. The teacher then corrects the assignment and assesses it.
If you have files associated specifically with the assignment we recommend you associate them with the assignment.
Initial Validation Rules
- Input matches the schema below.
- SyncKey is unique.
- User must exist.
- User must not be external. Check the flag (external_user_id and external_customer_id for user created AICC).
- User must not be deleted.
- Course must exist.
- Course must not be external.
- Course must not be deleted.
- Course must not be archived.
If specified: ParentID must be an element ID within the course.
- If specified: ParentID must be a folder.
- If specified: ParentID must not be deleted.
- If specified: ParentSyncKey must be an element ID within the course.
- If specified: ParentSyncKey must be a folder.
- If specified: ParentSyncKey must not be deleted.
Input
Parameters in:
Name | Description | Type | M/O | |
Message Type | Type of Message. | Text set to message type | M | |
SyncKey | External SyncKey for the created content. | Text | O | |
SiteId | Site where action will be executed | Integer | 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 | |
ParentID | ID of the (previously created) folder where the element is to be created. If not specified then create in root. | Integer | O | |
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 | |
Active | Is the element active? By default, the element is active. | Boolean. True/False. | O | |
UserID | UserID of the creator. | Integer | O/M | |
UserSyncKey | User SyncKeyID of the creator. | Text | O/M | |
Title | Description of the assignment. | Text Must not be blank. Must follow same rules as UI. | M | |
Description | Text (rich content) description of the assignment. | Text See user story on importing rich content for description of parsing | O | |
Deadline | If Deadline is missing blank then set to “no deadline”. If a date is specified then set to the time / date even if in the past. | Text. Valid UTC date. | O | |
Mandatory | Is the assignment mandatory? If not specified then assume mandatory. | Boolean: “True” / “False” | O | |
Assessment | This is the ID of the grade, if grading is used. Assessment ID: Sets the “AssessmentID”. If the value is missing then no assessment grade is used. If value is not a valid grade ID then assume no grade used and return warning. NOTE: You are not allowed to enter both Assessment and MaxScore. | Integer | O | |
MaxScore | This is the max score value, if assignment used score as assessment type. Max score should be a valid positive number in range between 1 and 99999. If the value less than zero or greather than 99999 then no assessment is used. If the customer has setting "Use score" is off then assume "Not assessment" used and return warning. NOTE: You are not allowed to enter both Assessment and MaxScore. | Integer | O | |
UseGroups | Determines if groups are used for assignment hand-ins. If the value is not specified then assume “Do not use groups”. Otherwise map to same options as UI. | Text “Donotusegroups” “Coursegroups” “Learnerdefinedgroups” “Self-enrolment” | O | |
Plagiarism | Determines if the plagiarism option is on or off. True = “On”. False = “Off”. Defaults to “Off”. Ignore any values other than “On”. | Boolean. | O | |
UseAnonymousSubmission | Determines if the Anonymous submission option is on or off. True = “On”. False = “Off”. Defaults to “Off”. Ignore any values other than “On”. | Boolean. | O | |
Optional repeating group: File | ||||
Name | ID of the file already uploaded to ITSL. This value should exist in ContentImport.FileMap.FileId column. | String | M | |
Notes
- Either UserID or UserSyncKey must be specified. This means specify at least one is mandatory.
- Either CourseID or CourseSyncKey must be specified. This means specify at least one is mandatory.
- Both ParentID and ParentSyncKey are optional. Possible use only one of them either ParentID or ParentSyncKey.
Output
Finished Status
- Returns the ElementID and the SyncKey of the element.
Warning Status
- Unknown assessment (grade) ID – “No assessment” assumed.
- Max score should be a valid positive number in range between 1 and 99999 - "No Assessment" assumed. (new assignment)
- Max score should be a valid positive number in range between 0.01 and 99999.99 - "No Assessment" assumed. (old assignment)
- Max score should be a valid positive integer number in range between 1 and 99999. (new assignment)
- Self-enrolment groups are not available - "Do not use groups" option is assumed. (new assignment)
- Your settings don't allow you to use score as assessment alternative. Please contact your administrator. - "No Assessment" assumed.
- Unable to process file with empty/missing GUID.
- File GUID is missing - incorrect GUID, file not uploaded, or file expired - {GUID}.
- No assessment status found. Defaulting assessment status id to 1.
Errors Status
- Invalid format / parameters (different to specified schema).
- Message contains duplicates for syncKeys: {0}. Make sure your syncKeys are globally unique.
- User with specified UserId/UserSyncKey is not valid.
- User with specified UserId/UserSyncKey is deleted.
- User with specified UserId/UserSyncKey is external.
- Course does not exist.
- Course is external.
- Course is be deleted.
- Course is archived.
- ParentSyncKey/ParentId is not an element within the course.
- ParentSyncKey/ParentId is not a folder.
- Folder related to ParentSyncKey/ParentId has been deleted or removed.
- Message must contain valid ParentId.
- ParentSyncKey cannot be found in the identifier map or is invalid.
- ParentSyncKey is deleted.
- Invalid or unknown ParentSyncKey.
- Tile missing or incorrectly formatted.
- Rich content badly formatted or invalid in “Text”.
- Invalid deadline date or not in UTC format.
- Invalid group code.
- Unknown file id
- Your security settings doesn't allow you to perform that operation. Please contact administration to grant you an access to {HieararchyName} organisation.
- Please write a short description or attach a file.
XML
<?
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
=
"SyncKeys"
type
=
"SyncKeysType"
minOccurs
=
"0"
maxOccurs
=
"1"
/>
<
xs
:element
name
=
"CreateCourseElementAssignment"
type
=
"CreateAssignmentElementType"
minOccurs
=
"1"
maxOccurs
=
"1"
/>
<
xs
:element
name
=
"Files"
type
=
"FilesType"
minOccurs
=
"0"
maxOccurs
=
"1"
/>
</
xs
:sequence>
</
xs
:complexType>
<
xs
:complexType
name
=
"SyncKeysType"
>
<
xs
:sequence>
<
xs
:element
name
=
"SyncKey"
minOccurs
=
"0"
maxOccurs
=
"1"
type
=
"xs:string"
/>
</
xs
:sequence>
</
xs
:complexType>
<
xs
:complexType
name
=
"CreateAssignmentElementType"
>
<
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
:choice
minOccurs
=
"0"
maxOccurs
=
"1"
>
<
xs
:element
name
=
"ParentId"
type
=
"xs:integer"
/>
<
xs
:element
name
=
"ParentSyncKey"
type
=
"xs:string"
/>
</
xs
:choice>
<
xs
:element
name
=
"Active"
type
=
"xs:boolean"
minOccurs
=
"0"
maxOccurs
=
"1"
default
=
"true"
/>
<
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
=
"Title"
type
=
"xs:string"
minOccurs
=
"1"
maxOccurs
=
"1"
/>
<
xs
:element
name
=
"Description"
type
=
"xs:string"
minOccurs
=
"0"
maxOccurs
=
"1"
/>
<
xs
:element
name
=
"Deadline"
type
=
"xs:dateTime"
minOccurs
=
"0"
maxOccurs
=
"1"
/>
<
xs
:element
name
=
"Mandatory"
type
=
"xs:boolean"
minOccurs
=
"0"
maxOccurs
=
"1"
default
=
"true"
/>
<
xs
:choice
minOccurs
=
"0"
maxOccurs
=
"1"
>
<
xs
:element
name
=
"Assessment"
type
=
"xs:int"
default
=
"0"
/>
<
xs
:element
name
=
"MaxScore"
type
=
"xs:int"
default
=
"0"
/>
</
xs
:choice>
<
xs
:element
name
=
"UseGroups"
type
=
"UseGroupsValue"
minOccurs
=
"0"
maxOccurs
=
"1"
/>
<
xs
:element
name
=
"Plagiarism"
type
=
"xs:boolean"
minOccurs
=
"0"
maxOccurs
=
"1"
/>
<
xs
:element
name
=
"UseAnonymousSubmission"
type
=
"xs:boolean"
minOccurs
=
"0"
maxOccurs
=
"1"
/>
</
xs
:sequence>
</
xs
:complexType>
<
xs
:simpleType
name
=
"UseGroupsValue"
>
<
xs
:restriction
base
=
"xs:string"
>
<
xs
:enumeration
value
=
"Donotusegroups"
/>
<
xs
:enumeration
value
=
"Coursegroups"
/>
<
xs
:enumeration
value
=
"Learnerdefinedgroups"
/>
<
xs
:enumeration
value
=
"Self-enrolment"
/>
</
xs
:restriction>
</
xs
:simpleType>
<
xs
:complexType
name
=
"FilesType"
>
<
xs
:sequence>
<
xs
:element
name
=
"File"
minOccurs
=
"0"
maxOccurs
=
"unbounded"
type
=
"xs:string"
/>
</
xs
:sequence>
</
xs
:complexType>
</
xs
:schema>
<
Message
xmlns
=
"urn:message-schema"
>
<
SyncKeys
>
<
SyncKey
>abcd213</
SyncKey
>
</
SyncKeys
>
<
CreateCourseElementAssignment
>
<
CourseId
>1</
CourseId
>
<
ParentSyncKey
>1</
ParentSyncKey
>
<
Active
>true</
Active
>
<
UserId
>1</
UserId
>
<
Title
>My Assignment</
Title
>
<
Description
>Description1</
Description
>
<
Deadline
>2012-03-01T01:01:01+00:00</
Deadline
>
<
Mandatory
>true</
Mandatory
>
<
MaxScore
>75</
MaxScore
>
<
UseGroups
>Donotusegroups</
UseGroups
>
<
Plagiarism
>true</
Plagiarism
>
<
UseAnonymousSubmission
>true</
UseAnonymousSubmission
>
</
CreateCourseElementAssignment
>
<
Files
>
<
File
>73bba967-525a-44d8-89b3-3e8c6f137b62</
File
>
</
Files
>
</
Message
>
<
Message
xmlns
=
"urn:message-schema"
>
<
SyncKeys
>
<
SyncKey
>abcd213</
SyncKey
>
</
SyncKeys
>
<
CreateCourseElementAssignment
>
<
CourseId
>1</
CourseId
>
<
ParentSyncKey
>1</
ParentSyncKey
>
<
Active
>true</
Active
>
<
UserId
>1</
UserId
>
<
Title
>My Assignment</
Title
>
<
Description
>Description1</
Description
>
<
Deadline
>2012-03-01T01:01:01+00:00</
Deadline
>
<
Mandatory
>true</
Mandatory
>
<
Assessment
>1</
Assessment
>
<
UseGroups
>Donotusegroups</
UseGroups
>
<
Plagiarism
>true</
Plagiarism
>
<
UseAnonymousSubmission
>true</
UseAnonymousSubmission
>
</
CreateCourseElementAssignment
>
<
Files
>
<
File
>73bba967-525a-44d8-89b3-3e8c6f137b62</
File
>
</
Files
>
</
Message
>