Create.Course.Planner

Creates a lesson planner in a specified course. User specified in a content of the message is assigned as creator and owner of all imported topics and lessons.

Action

Lesson planner can only be imported into a course, which doesn't contain lesson planner.
During the import the following objects are created:

  • Planner columns (default and custom);

  • Topics, which contain lessons;

  • Lessons (in scope of topic or without topic).

Each lesson can also have links to course elements connected with it. There elements should be imported before importing the planner itself.
All rich content is passed through white-list filter. The filtering level is taken according to "Allowed HTML Code Level" option in creator's profile/policy.

Scenario

In order to create a planner, a user needs to add a message with type corresponding to action Create.Course.Planner. Result of that message processing can be acquired using GetMessageResult method with message identifier as an input parameter.

Input parameters

Message

Name

Description

Type

M/O

Message Type

Type of Message.

Text. "CreateCoursePlanner"

M

SyncKey

External SyncKey for the created content.

Text

O

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 created.

Integer

O/M

CourseSyncKey

SyncKeyID of the course where planner is to be created.

Text

O/M

UserID

UserID of the creator.

Integer

O/M

UserSyncKey

User SyncKeyID of the creator.

Text

O/M

ColumnType

Name

Description

Type

M/O

ColumnId

Unique number for a planner column

Integer

M

Name

Name of the column

Text

Plain text.

Length is from 1 to 64 characters.

O/M (mandatory only if Type=”Custom”)

Type

Column type

Text

  • Custom

  • Topic

  • Lesson

  • LessonOutline

  • Date

  • ClassHours

  • LearningObjectives

  • Resources

  • Activities

M

ShowOnCoursePage

Should the information in the column shown on the course dashboard? (set to True if not defined by import)

Topic (if used) and Lesson column must be set to True.

Boolean: “True” / “False”

O

ShowInGrid

Should this column visible in the table view of the planner? (set to True if not defined by import)

Topic (if used) and Lesson column must be set to True.

Boolean: “True” / “False”

O

VisibleForAll

Should this column only visible for teachers or for all participants? (set to True if not defined by import)

Topic (if used) and Lesson column must be set to True.

Boolean: “True” / “False”

O

CustomColumnDataType

Name

Description

Type

M/O

ColumnId

Unique number for a planner column of “Custom” type.

Integer

M

Text

Custom column cell value. Can contain links to elements. These will be resolved if the SyncKey can be found.

Text

Can be rich text.

M

LearningObjectiveType

Name

Description

Type

M/O

ColumnId

Unique number for a planner column of “LearningObjectives” type.

Integer

M for learning objectives connected to the topic column,

O for learning objectives connected to the lesson column.

LearningObjectiveId

Learning objective unique identifier from the national repository

Text

M


TopicType

Name

Description

Type

M/O

Name

Topic name.

Text

Plain text.

Length is from 1 to 255 characters.

M

CustomColumnsData

For each additional column the relevant information.

Complex type – an array of CustomColumnDataType

O

LearningObjectives

List of associated learning objective or null

Complex type - an array of LearningObjectiveType

O

Lessons

Repeating blocks for each lesson within this unit

Complex type – an array of LessonType

O

LessonType

Name

Description

Type

M/O

Name

The name of the lesson.

Text

Plain text.

Length is from 1 to 255 characters.

M

LessonOutline

The outline of the lesson.
Can contain links to elements. These will be resolved if the SyncKey can be found.

Text

Can be rich text.

O

StartDateTime

The start time of this lesson

dateTime

O

StopDateTime

The stop time of this lesson

dateTime

O

ClassHours

The number of hours in class for this lesson.

Int

Must be 0 or positive number

O

Resources

Can contain links to elements. These will be resolved if the SyncKey can be found.

Complex type (ElementSychKeys)

O

Activities

Can contain links to elements. These will be resolved if the SyncKey can be found.

Complex type (ElementSychKeys)

O

CustomColumnsData

For each additional column the relevant information.

Complex type – an array of CustomColumnDataType

O

LearningObjectives

List of associated learning objective or null

Complex type - an array of LearningObjectiveType

O

ElementSychKeysType

Name

Description

Type

M/O

ElementSyncKey

Must be a valid SyncKey of element imported earlier.

Text

M

Notes:

  • Either CourseID or CourseSyncKey must be specified. This means specify at least one is mandatory.

  • Either CreatorUserID or CreatorSyncKey must be specified. This means specify at least one is mandatory.

  • It's not possible to import lesson planner into a course, which already contains lesson planner (e.g. there is at least one topic or one lesson created).

  • Importing learning objectives through the planner is supported (since the Release 47). Learning objectives can be connected to the topic and the lesson.

  • It is possible to create a columns for learning objectives connected to topics. These columns should have type 'LearningObjectives'. To the topic allows to add a learning objective or category.

  • It is possible to customize a name of column for learning objectives connected to a lesson.

  • Topics and lessons are assumed to be listed in the order they should appear in the planner.

  • Links to assets (i.e. an image) or elements (i.e. an assignment) will be processed in the generic way

  • If the planner was disabled for a course, it will be enabled automatically

  • If default lesson column is missing in the list of columns, visibility for it will be set to "Nobody" automatically.

Best Practice for 3rd Parties:

  • The use of topics is optional.

  • Titles (topic and lesson) can only contain plain text

  • The title for custom columns is mandatory

  • Import assets (i.e. an image) and elements (i.e. an assignment) that are used in or linked to from the planner first before importing the planner itself.

Output

Finished Status

  • The planner was created successfully. (Returns the message SyncKey).

Warning Status

  • Column name '{Column name}': Column name must be plain text. Formatting is stripped.

  • Topic '{Topic name}': Topic name must be plain text. Formatting is stripped.

  • Lesson '{Lesson name}': Lesson name must be plain text. Formatting is stripped.

  • Topic column should always be visible for everyone. Properties 'ShowInGrid' and 'VisibleForAll' are set to true.

  • Lesson column should always be visible for everyone. Properties 'ShowInGrid' and 'VisibleForAll' are set to true.

  • Lesson '{Lesson name}': Element with id '{ITSLElementSyncKey}' can not be found. Link is removed.

  • Item with UniqueId='{LearningObjectiveRepositoryUniqueId}' is not in the national learning objective repository.

  • Item with id = '{LearningObjectiveRepositoryUniqueId}' is not a learning objective or category. Only learning objectives and categories can be connected to a topic.

  • Item with id = '{LearningObjectiveRepositoryUniqueId}' is not a learning objective. Only learning objectives can be connected to a plan/an element.

Errors Status

  • Invalid format / parameters (different to specified schema).

  • Message contains duplicates for syncKeys: {0}. Make sure your syncKeys are globally unique.

  • Message must contain valid UserId/UserSyncKey.

  • User with specified UserId/UserSyncKey is not valid.

  • User with specified UserId/UserSyncKey is deleted.

  • User with specified UserId/UserSyncKey is external.

  • The use of the lesson planner is disabled on site level.

  • Message must contain valid CourseId/CourseSyncKey.

  • Course with specified CourseId/CourseSyncKey is not valid.

  • Course is deleted.

  • Course is external.

  • Course is archived.

  • The course already contains a planner.

  • User {ID} must be added to the course as a teacher or administrator.

  • Column IDs must be unique.

  • Only columns of the type 'Custom' can exist more than once for the lesson section.

  • Only columns of the type 'Custom','LearningObjectives' can exist more than once for the topic section.

  • You cannot add lesson related columns to the topic section.

  • You cannot add topic related columns to the lesson section.

  • At least 1 name of a custom column is blank.

  • Lesson '{Lesson name}': Start date is greater than stop date.

  • There is no topic column with ColumnId='{Column ID}'.

  • There is no topic custom column with ColumnId='{Column ID}'.

  • There is no lesson custom column with ColumnId='{Column ID}'.

  • Rich content badly formatted or invalid: {Rich content}

  • Your security settings doesn't allow you to perform that operation. Please contact administration to grant you an access to {HieararchyName} organisation.

  • Course has no Learning Objectives enabled.

  • No column assigned to content.

  • The column with the id ='{Column ID}' doesn’t allow learning objectives.

Schema

Planner 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" type="SyncKeysType" minOccurs="0" maxOccurs="1" />
<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="CreateCoursePlanner" minOccurs="1" maxOccurs="1" type="CreateCoursePlannerType" />
</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="CreateCoursePlannerType">
<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="1" maxOccurs="1">
<xs:element name="UserId" type="xs:integer" />
<xs:element name="UserSyncKey" type="xs:string" />
</xs:choice>
<xs:element name="Planner" minOccurs="1" maxOccurs="1" type="PlannerType" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="PlannerType">
<xs:sequence>
<xs:element name="Columns" minOccurs="0" maxOccurs="1" type="AllColumnsType" />
<xs:element name="Topics" minOccurs="0" maxOccurs="1" type="TopicsType" />
<xs:element name="Lessons" minOccurs="0" maxOccurs="1" type="LessonsType" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="AllColumnsType">
<xs:sequence>
<xs:element name="TopicColumns" minOccurs="0" maxOccurs="1" type="ColumnsType" />
<xs:element name="LessonColumns" minOccurs="0" maxOccurs="1" type="ColumnsType" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="ColumnsType">
<xs:sequence>
<xs:element name="Column" minOccurs="0" maxOccurs="unbounded" type="ColumnType" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="ColumnType">
<xs:sequence>
<xs:element name="ColumnId" type="xs:integer" minOccurs="1" maxOccurs="1" />
<xs:element name="Name" minOccurs="0" maxOccurs="1">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="64"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Type" minOccurs="1" maxOccurs="1" type="ColumnTypeValue" />
<xs:element name="ShowOnCoursePage" type="xs:boolean" default="true" minOccurs="0" maxOccurs="1" />
<xs:element name="ShowInGrid" type="xs:boolean" default="true" minOccurs="0" maxOccurs="1" />
<xs:element name="VisibleForAll" type="xs:boolean" default="true" minOccurs="0" maxOccurs="1" />
</xs:sequence>
</xs:complexType>
<xs:simpleType name="ColumnTypeValue">
<xs:restriction base="xs:string">
<xs:enumeration value="Custom" />
<xs:enumeration value="Topic" />
<xs:enumeration value="Lesson" />
<xs:enumeration value="LessonOutline" />
<xs:enumeration value="Date" />
<xs:enumeration value="ClassHours" />
<xs:enumeration value="LearningObjectives" />
<xs:enumeration value="Resources" />
<xs:enumeration value="Activities" />
</xs:restriction>
</xs:simpleType>
<xs:complexType name="CustomColumnsDataType">
<xs:sequence>
<xs:element name="CustomColumnData" minOccurs="0" maxOccurs="unbounded" type="CustomColumnDataType" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="CustomColumnDataType">
<xs:sequence>
<xs:element name="ColumnId" type="xs:integer" minOccurs="1" maxOccurs="1" />
<xs:element name="Text" type="xs:string" minOccurs="1" maxOccurs="1" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="TopicsType">
<xs:sequence>
<xs:element name="Topic" minOccurs="0" maxOccurs="unbounded" type="TopicType" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="TopicType">
<xs:sequence>
<xs:element name="Name" minOccurs="1" maxOccurs="1">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="255"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="CustomColumnsData" minOccurs="0" maxOccurs="1" type="CustomColumnsDataType" />
<xs:element name="LearningObjectives" type="LearningObjectivesType" minOccurs="0" maxOccurs="1"/>
<xs:element name="Lessons" minOccurs="0" maxOccurs="1" type="LessonsType" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="LessonsType">
<xs:sequence>
<xs:element name="Lesson" minOccurs="0" maxOccurs="unbounded" type="LessonType" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="LessonType">
<xs:sequence>
<xs:element name="Name" minOccurs="1" maxOccurs="1">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="255"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="LessonOutline" type="xs:string" minOccurs="0" maxOccurs="1" />
<xs:element name="StartDateTime" type="xs:dateTime" minOccurs="0" maxOccurs="1"/>
<xs:element name="StopDateTime" type="xs:dateTime" minOccurs="0" maxOccurs="1"/>
<xs:element name="ClassHours" minOccurs="0" maxOccurs="1">
<xs:simpleType>
<xs:restriction base="xs:int">
<xs:minInclusive value="0"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Resources" minOccurs="0" maxOccurs="1" type="ElementSyncKeys" />
<xs:element name="Activities" minOccurs="0" maxOccurs="1" type="ElementSyncKeys" />
<xs:element name="CustomColumnsData" minOccurs="0" maxOccurs="1" type="CustomColumnsDataType" />
<xs:element name="LearningObjectives" type="LearningObjectivesType" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ElementSyncKeys">
<xs:sequence>
<xs:element name="ElementSyncKey" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="LearningObjectivesType">
<xs:sequence>
<xs:element name="LearningObjective" type="LearningObjectiveType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="LearningObjectiveType">
<xs:sequence>
<xs:element name="ColumnId" type="xs:integer" minOccurs="0" maxOccurs="1" />
<xs:element name="LearningObjectiveId" type="xs:string" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:schema>

Message content example

Planner message content
<Message xmlns="urn:message-schema">
<SyncKeys>
<SyncKey>SyncKey164</SyncKey>
</SyncKeys>
<CreateCoursePlanner>
<CourseId>1</CourseId>
<UserId>2</UserId>
<Planner>
<Columns>
<TopicColumns>
<Column>
<ColumnId>-79228162514264337593543950335</ColumnId>
<Name>Topic (customized)</Name>
<Type>Topic</Type>
<ShowOnCoursePage>true</ShowOnCoursePage>
<ShowInGrid>true</ShowInGrid>
<VisibleForAll>false</VisibleForAll>
</Column>
<Column>
<ColumnId>3</ColumnId>
<Name>Topic notes</Name>
<Type>Custom</Type>
<ShowOnCoursePage>true</ShowOnCoursePage>
<ShowInGrid>true</ShowInGrid>
<VisibleForAll>true</VisibleForAll>
</Column>
<Column>
<ColumnId>4</ColumnId>
<Name>Topic teacher notes</Name>
<Type>Custom</Type>
<ShowOnCoursePage>false</ShowOnCoursePage>
<VisibleForAll>false</VisibleForAll>
</Column>
<Column>
<ColumnId>75</ColumnId>
<Name>Learning objectives for theme</Name>
<Type>LearningObjectives</Type>
<ShowOnCoursePage>false</ShowOnCoursePage>
<VisibleForAll>false</VisibleForAll>
</Column>
</TopicColumns>
<LessonColumns>
<Column>
<ColumnId>0</ColumnId>
<Name>Outline</Name>
<Type>LessonOutline</Type>
<ShowOnCoursePage>true</ShowOnCoursePage>
<ShowInGrid>false</ShowInGrid>
<VisibleForAll>false</VisibleForAll>
</Column>
<Column>
<ColumnId>2</ColumnId>
<Name>Name5</Name>
<Type>Date</Type>
<VisibleForAll>true</VisibleForAll>
</Column>
<Column>
<ColumnId>-79228162514264337593543950334</ColumnId>
<Type>Lesson</Type>
<ShowOnCoursePage>true</ShowOnCoursePage>
<ShowInGrid>true</ShowInGrid>
<VisibleForAll>false</VisibleForAll>
</Column>
<Column>
<ColumnId>5</ColumnId>
<Name>Custom lesson column 5</Name>
<Type>Custom</Type>
</Column>
<Column>
<ColumnId>6</ColumnId>
<Name>Custom lesson column 6</Name>
<Type>Custom</Type>
</Column>
<Column>
<ColumnId>7</ColumnId>
<Name>Custom lesson column 7</Name>
<Type>Custom</Type>
</Column>
<Column>
<ColumnId>58</ColumnId>
<Name>Learning objectives for lesson</Name>
<Type>LearningObjectives</Type>
<ShowOnCoursePage>true</ShowOnCoursePage>
<VisibleForAll>true</VisibleForAll>
</Column>
</LessonColumns>
</Columns>
<Topics>
<Topic>
<Name>&lt;b&gt;Bold topic One&lt;/b&gt;</Name>
<CustomColumnsData>
<CustomColumnData>
<ColumnId>3</ColumnId>
<Text>&lt;b&gt;this bold is not allowed - topic column data&lt;/b&gt;</Text>
</CustomColumnData>
<CustomColumnData>
<ColumnId>4</ColumnId>
<Text>Text2</Text>
</CustomColumnData>
</CustomColumnsData>
<LearningObjectives>
<LearningObjective>
<ColumnId>75</ColumnId>
<LearningObjectiveId>LOPublished4</LearningObjectiveId>
</LearningObjective>
<LearningObjective>
<ColumnId>75</ColumnId>
<LearningObjectiveId>LOPublished3</LearningObjectiveId>
</LearningObjective>
<LearningObjective>
<ColumnId>75</ColumnId>
<LearningObjectiveId>CategoryPublished</LearningObjectiveId>
</LearningObjective>
</LearningObjectives>
<Lessons>
<Lesson>
<Name>Lesson for topic</Name>
<LessonOutline>LessonOutline1</LessonOutline>
<StartDateTime>2012-03-11T12:05:00+11:00</StartDateTime>
<StopDateTime>2012-03-16T12:05:00+11:00</StopDateTime>
<ClassHours>0</ClassHours>
<CustomColumnsData>
<CustomColumnData>
<ColumnId>5</ColumnId>
<Text>Text4</Text>
</CustomColumnData>
<CustomColumnData>
<ColumnId>6</ColumnId>
<Text>Text5</Text>
</CustomColumnData>
<CustomColumnData>
<ColumnId>7</ColumnId>
<Text>Text6</Text>
</CustomColumnData>
</CustomColumnsData>
<LearningObjectives>
<LearningObjective>
<LearningObjectiveId>LOPublished1</LearningObjectiveId>
</LearningObjective>
<LearningObjective>
<LearningObjectiveId>LOPublished2</LearningObjectiveId>
</LearningObjective>
</LearningObjectives>
</Lesson>
<Lesson>
<Name>&lt;b&gt;bold lesson&lt;/b&gt;</Name>
<LessonOutline>&lt;b&gt;bold outline&lt;/b&gt;&lt;script&gt;javascript:alert('hello');&lt;/script&gt;</LessonOutline>
<StartDateTime>2012-03-10T12:05:01</StartDateTime>
<StopDateTime>2012-03-17T12:05:01</StopDateTime>
<ClassHours>0</ClassHours>
<Resources>
<ElementSyncKey>abcd213</ElementSyncKey>
<ElementSyncKey>non-existent-resource</ElementSyncKey>
</Resources>
<Activities>
<ElementSyncKey>abcd213</ElementSyncKey>
<ElementSyncKey>abcd214</ElementSyncKey>
<ElementSyncKey>non-existent-activity</ElementSyncKey>
</Activities>
<CustomColumnsData>
<CustomColumnData>
<ColumnId>5</ColumnId>
<Text>Text4</Text>
</CustomColumnData>
<CustomColumnData>
<ColumnId>6</ColumnId>
<Text>Text5</Text>
</CustomColumnData>
<CustomColumnData>
<ColumnId>7</ColumnId>
<Text>&lt;b&gt;this bold is allowed - lesson column data&lt;/b&gt;</Text>
</CustomColumnData>
</CustomColumnsData>
</Lesson>
</Lessons>
</Topic>
</Topics>
<Lessons>
<Lesson>
<Name>Topicless lesson</Name>
<LessonOutline>LessonOutline10</LessonOutline>
<StartDateTime>0001-03-06T00:00:00+04:00</StartDateTime>
<StopDateTime>0001-03-06T00:00:00+04:00</StopDateTime>
<ClassHours>15</ClassHours>
<CustomColumnsData>
<CustomColumnData>
<ColumnId>5</ColumnId>
<Text>Text37</Text>
</CustomColumnData>
<CustomColumnData>
<ColumnId>6</ColumnId>
<Text>Text38</Text>
</CustomColumnData>
<CustomColumnData>
<ColumnId>7</ColumnId>
<Text>Text39</Text>
</CustomColumnData>
</CustomColumnsData>
</Lesson>
</Lessons>
</Planner>
</CreateCoursePlanner>
</Message>