Publish classes
See the courses versus classes section above for an explanation of the difference between classes and courses.
Call
liss.publishClasses(auth, academicYear, classes)
Parameters
auth
: See authentication
academicYear
: a 4-digit year, e.g. 2012
. A northern hemisphere school would use e.g. 2012
to refer to the 2012/2013 year.
classes
is an array of structs defined as follows:
Field | Type | Notes | Example |
---|---|---|---|
ClassCode | string (primary key, i.e. mandatory) | The class code . Must be in the format of <courseCode> and <class identifier> separated by a space, e.g 9MAT 1 , even if both SIS and satellite system use a different form of class codes.Maximum 20 chars. | 7MAT 1 |
CourseName | string | The name of the course. Eg 9 Mathematics | 7 Mathematics |
DefaultTeacher | string | The teacher id for the default teacher. The actual teacher assigned to each lesson in the cycle is specified in the liss.publishTimetable() call. The default teacher is responsible for report cards for that class. Maximum 20 chars. (The field is not mandatory because some non-teaching activities such as Duty or StaffMeeting may not have any teacher who can be meaningfully associated with it.)Note that this field matches the TeacherId field found in other calls, and is not guarantee to match the TeacherCode field. | 762346J |
Type | string | One of the following strings:<blank> or omitted field: A normal teaching class.Duty : A yard duty or other duty.Study : A study period.RollClass : Also known as HomeGroup, RollCall, etc.RTO : Rostered Time Off.StaffMeeting : Staff meetingExtraCurricular : e.g. sportsOnCall : On-call period (the teacher is free on this period unless they take a cover, and they’re encouraged to take covers during their on-call periods) | Duty |
TtStructure | string | This string has either 1 or 2 parts. The first element is a TimetableStructure id .The next element is optional – if it exists, then a space is used to separate it from the TimetableStructure id . It is a set of terms as a comma-separated list.Maximum 20 chars. | 2012 2012Junior 2012Junior 3,4 |
StartDate | timestamp | The date the class first runs. | 20130203T0:00:00 |
EndDate | timestamp | The date the class runs on. Use time =23:59 . | 20130614T23:59:00 |
Colour | string | The colour assigned to the class by the satellite system, in hexadecimal notation: RRGGBB , like the HTML colour format but without the # prefix. | 0000FF |
Form | string | The form (aka year-level) associated with the class. Some SIS's don't associate courses or classes with year-levels, in this case ignore this field. | 6 |
Faculty | string | The faculty (aka department) associated with the class. | Science |
Rotations | integer (bit-vector) | A bit-vector representing which rotations a class runs in. A rotation is a timetabling concept, a date-range which may correspond to terms, semesters or even arbitrary date ranges. Rotation 1 is represented by bit 0 , i.e. 1<<0 , Rotation 2 is represented by bit 1 i.e. 1<<1 , and so on.To interpret rotations, you will need the liss.publishCalendar() call to provide you with a mapping from dates to rotations. | 12 |
Composite | string | When a class is linked to another class as a composite, i.e. sharing the same teacher and same room, then this will point to the other class. Typically these classes come in pairs, in which case you make one 'Composite' point to the other, but the reverse link should not appear. 'Composite' links involving 3 or more classes are allowed, provided there are no cycles | |
PriorityInClash | integer | If a student is "invited" to 2 classes at the same time, this number indicates which one they should go to. A lower number means high priority. If the numbers are equal then both classes should be displayed on the student's timetable. | 9 |
Guid | string | Class guid, also known as UUID. 32 hexadecimal characters. They might be uppercase or lowercase, but we require that they do not contain punctuation. | A2744A55... |
Returns
Nothing - an empty string ""
. If anything other than an error is returned it should be ignored. For error reporting see fault codes.
Semantics
- The SIS may choose to store class objects which do not represent classes managed by the satellite system. These objects typically represent extra-curricular activities such as “Choir”. Conversely the satellite system may store class objects which it does not publish to the SIS, e.g. “helper” classes designed to enforce the correct timetable structure. Each system must have a way to distinguish between classes which are shared versus internal class objects.
- Each call to
liss.publishClasses()
will publish the full database of shared classes at the requested date. Therefore the SIS should (a) mark as inactive or (b) terminate the date-range of, or (c) delete from its database, any class which is not found in the returned array. - There is no DefaultRoom field, because typically, rooms change from period to period.
Example
Send
{
"method": "liss.publishClasses",
"params": [
{
"School": "03014",
"UserName": "Jsmith",
"Password": "Password1",
"LissVersion": 10002,
"UserAgent": "Edval"
},
[
{
"ClassCode": "7MAT 1",
"CourseName": "7 Mathematics",
"DefaultTeacher": "762346J",
"Type": "Duty",
"TtStructure": "2012Junior",
"StartDate": "20130203T0:00:00",
"EndDate": "20130614T23:59:00",
"Colour": "0000FF",
"Form": "6",
"Faculty": "Science",
"Rotations": 12,
"PriorityInClash": 9,
"Guid": "A2744A55ED7449A98BCE80703DECC9E4"
}
],
"20201031T00:00:00"
],
"id": 0
}
Return
{
"result": "",
"id": 0
}