© 2018 Capita Business Services Ltd. All rights reserved.

Capita Education Software Solutions is a trading name of Capita Business Services Ltd. Our Registered office is 30 Berners Street, London, W1T 3LR and our registered number is 02299747. Further information about Capita plc can be found in our legal statement.

SIMS 7 - New Lesson Attendance API

New Lesson Attendance API

We are pleased to announce the inclusion of the following API in the Summer 2018 release of SIMS.  Partners processing Lesson Attendance need to be aware that:

    • Lessons may have:
      • Multiple Rooms
      • Multiple Teachers
    • The existing APIs return the ‘first’ record for a period.
    • It is therefore possible to update a mark for a subsequent record and get what may be perceived to be the wrong mark back.

The new API below returns the complete set of records for each period.

The consequences of this may be significant to the UI of a partner application because it may need to either select the correct one or show many records where previously only one appeared to exist.

As such, this would have been a breaking change to the previous version(s) and caused us to provide the change in the new interface below.

New API

TPAttendanceRead.GetXmlLessonAttendancesExtendedMultipleTeacher(int PersonId, int BaseGroupId, DateTime StartDate, DateTime EndDate)

This method is used to return student Lesson Attendance data where classes have multiple teachers or rooms timetabled for the same class period.

Sample Call

A simple code sample looks like this;

SIMS.Processes.TPAttendanceRead attendanceRead = new TPAttendanceRead();            
System.Xml.XmlDocument getXmlLessonAttExtMultipleTeachers_ByStud = new XmlDocument();            System.Xml.XmlDocument getXmlLessonAttExtMultipleTeachers_ByGrp = new XmlDocument();            // passing in the PersonId only            
getXmlLessonAttExtMultipleTeachers_ByStud = attendanceRead.GetXmlLessonAttendancesExtendedMultipleTeachers(12105, 0, DateTime.Parse("2018-05-10 00:00"), DateTime.Parse("2018-05-11 23:59"));                        // passing in the BaseGroupId only            
getXmlLessonAttExtMultipleTeachers_ByGrp = attendanceRead.GetXmlLessonAttendancesExtendedMultipleTeachers(0, 11425, DateTime.Parse("2018-05-09 00:00"), DateTime.Parse("2018-05-13 23:59"));

 

Sample Response

A sample of the output for the PersonId input parameter is shown below:
 <LessonAttendance>
  <person_id>12105</person_id> 
  <base_group_id>11427</base_group_id> 
  <teacher_person_id>87</teacher_person_id> 
  <room_id>24</room_id> 
  <attendance_date>2018-05-11T09:15:00</attendance_date> 
  <period_name>Fri:1</period_name> 
  <event_instance_id>48876</event_instance_id> 
  <mark /> 
  <minutes_late>0</minutes_late> 
  </LessonAttendance>
- <LessonAttendance>
  <person_id>12105</person_id> 
  <base_group_id>11425</base_group_id> 
  <teacher_person_id>92</teacher_person_id> 
  <room_id>33</room_id> 
  <attendance_date>2018-05-11T10:15:00</attendance_date> 
  <period_name>Fri:2</period_name> 
  <event_instance_id>48877</event_instance_id> 
  <mark /> 
  <minutes_late>0</minutes_late> 
  </LessonAttendance>
- <LessonAttendance>
  <person_id>12105</person_id> 
  <base_group_id>11425</base_group_id> 
  <teacher_person_id>1</teacher_person_id> 
  <room_id>33</room_id> 
  <attendance_date>2018-05-11T10:15:00</attendance_date> 
  <period_name>Fri:2</period_name> 
  <event_instance_id>48877</event_instance_id> 
  <mark>/</mark> 
  <minutes_late>0</minutes_late> 
  </LessonAttendance>
- <LessonAttendance>
  <person_id>12105</person_id> 
  <base_group_id>11454</base_group_id> 
  <teacher_person_id>84</teacher_person_id> 
  <room_id>8</room_id> 
  <attendance_date>2018-05-11T11:35:00</attendance_date> 
  <period_name>Fri:3</period_name> 
  <event_instance_id>48878</event_instance_id> 
  <mark /> 
  <minutes_late>0</minutes_late> 
  </LessonAttendance>

 

 

A sample of the output for the BaseGroupId input parameter is shown below:
<LessonAttendance>
  <person_id>12105</person_id> 
  <base_group_id>11425</base_group_id> 
  <teacher_person_id>92</teacher_person_id> 
  <room_id>33</room_id> 
  <attendance_date>2018-05-11T10:15:00</attendance_date> 
  <period_name>Fri:2</period_name> 
  <event_instance_id>48877</event_instance_id> 
  <mark /> 
  <minutes_late>0</minutes_late> 
  </LessonAttendance>
- <LessonAttendance>
  <person_id>12105</person_id> 
  <base_group_id>11425</base_group_id> 
  <teacher_person_id>1</teacher_person_id> 
  <room_id>33</room_id> 
  <attendance_date>2018-05-11T10:15:00</attendance_date> 
  <period_name>Fri:2</period_name> 
  <event_instance_id>48877</event_instance_id> 
  <mark>/</mark> 
  <minutes_late>0</minutes_late> 
  </LessonAttendance>
- <LessonAttendance>
  <person_id>12131</person_id> 
  <base_group_id>11425</base_group_id> 
  <teacher_person_id>92</teacher_person_id> 
  <room_id>33</room_id> 
  <attendance_date>2018-05-11T10:15:00</attendance_date> 
  <period_name>Fri:2</period_name> 
  <event_instance_id>48877</event_instance_id> 
  <mark /> 
  <minutes_late>0</minutes_late> 
  </LessonAttendance>
- <LessonAttendance>
  <person_id>12131</person_id> 
  <base_group_id>11425</base_group_id> 
  <teacher_person_id>1</teacher_person_id> 
  <room_id>33</room_id> 
  <attendance_date>2018-05-11T10:15:00</attendance_date> 
  <period_name>Fri:2</period_name> 
  <event_instance_id>48877</event_instance_id> 
  <mark>N</mark> 
  <minutes_late>0</minutes_late> 
  </LessonAttendance>