Create.Course.Folder
This method creates a single folder in the Course files area ("imported resource files").
It is very similar to Create.MyFiles.Folder's private files. The only difference is lack of "Visibility" parameter and presence of course identifiers. The course identifiers are validated in the same way as for Create.Course.File.Element. For more detailed information, please refer to Create.MyFiles.Folder documentation.
Input
Name | Description | Type | M/O |
Message Type | ID of the course where the element is to be created. | Text. "CreateCourseFolder" | M |
SyncKey | External SyncKey for the created content. | Text | M |
SiteId | Site where action will be executed | Integer | O |
VendorId | VendorId which will be associated with created content | Text | O |
UserID | UserID of the creator. | Integer | O/M |
UserSyncKey | User SyncKeyID of the creator. | Text | O/M |
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 folder into which the folder is to be created. Default is the root. | Integer | O |
ParentSyncKey | SyncKey of the folder into which the folder is to be created. Default is the root. | Text | O |
Name | Name of the folder. | Text. Must not be blank. Follow same rules as the UI. | 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.
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.
XML
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
=
"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
=
"SiteId"
minOccurs
=
"0"
maxOccurs
=
"1"
type
=
"xs:int"
/>
<
xs
:element
name
=
"VendorId"
minOccurs
=
"0"
maxOccurs
=
"1"
>
<
xs
:simpleType>
<
xs
:restriction
base
=
"xs:string"
>
<
xs
:minLength
value
=
"1"
/>
<
xs
:maxLength
value
=
"36"
/>
</
xs
:restriction>
</
xs
:simpleType>
</
xs
:element>
<
xs
:element
name
=
"CreateCourseFolder"
minOccurs
=
"1"
maxOccurs
=
"1"
>
<
xs
:complexType>
<
xs
:sequence>
<
xs
:choice
minOccurs
=
"1"
maxOccurs
=
"1"
>
<
xs
:element
name
=
"UserId"
type
=
"xs:integer"
/>
<
xs
:element
name
=
"UserSyncKey"
type
=
"xs:string"
/>
</
xs
:choice>
<
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
=
"Name"
minOccurs
=
"1"
maxOccurs
=
"1"
type
=
"xs:string"
/>
</
xs
:sequence>
</
xs
:complexType>
</
xs
:element>
</
xs
:sequence>
</
xs
:complexType>
</
xs
:schema>
Sample request
<
Message
xmlns
=
"urn:message-schema"
>
<
CreateCourseFolder
>
<
UserId
>1</
UserId
>
<
CourseId
>6</
CourseId
>
<
ParentSyncKey
>3d63eb7e-d5c4-49c0-ae3e-365fe5da559c</
ParentSyncKey
>
<
Name
>p6[][]()()</
Name
>
</
CreateCourseFolder
>
</
Message
>