Skip to main content

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:

FieldTypeNotesExample
ClassCodestring (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
CourseNamestringThe name of the course. Eg 9 Mathematics7 Mathematics
DefaultTeacherstringThe 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
TypestringOne 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 meeting
ExtraCurricular : e.g. sports
OnCall : 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
TtStructurestringThis 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
StartDatetimestampThe date the class first runs.20130203T0:00:00
EndDatetimestampThe date the class runs on. Use time=23:59.20130614T23:59:00
ColourstringThe colour assigned to the class by the satellite system, in hexadecimal notation: RRGGBB, like the HTML colour format but without the # prefix.0000FF
FormstringThe 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
FacultystringThe faculty (aka department) associated with the class.Science
Rotationsinteger (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
CompositestringWhen 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
PriorityInClashintegerIf 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
GuidstringClass 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
}