© 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 - TPAttendanceRead

TPAttendanceRead.GetXmlAttendanceCodes()

This method returns all attendance codes from SIMS. Sample output from this interface is shown below

Output

<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<AttendanceCodes>
  <AttendanceCode>
    <AttendanceCodeID>27</AttendanceCodeID>
    <Code>-</Code>
    <Description>All should attend / No mark recorded</Description>
    <PhysicalMappingID>5</PhysicalMappingID>
    <PhysicalMappingDescription>No mark for session</PhysicalMappingDescription>
    <StatisticalMappingID>6</StatisticalMappingID>
    <StatisticalMappingDescription>No mark</StatisticalMappingDescription>
  </AttendanceCode>
  <AttendanceCode>
    <AttendanceCodeID>24</AttendanceCodeID>
    <Code>X</Code>
    <Description>DfES X: Non-compulsory school age absence</Description>
    <PhysicalMappingID>3</PhysicalMappingID>
    <PhysicalMappingDescription>Out for whole session</PhysicalMappingDescription>
    <StatisticalMappingID>5</StatisticalMappingID>
    <StatisticalMappingDescription>Attendance not required</StatisticalMappingDescription>
  </AttendanceCode>
</AttendanceCodes>

TPAttendanceRead.GetXmlSessionAttendances(int personId,int baseGroupId,DateTime startDate,DateTime endDate)

The method has personId and baseGroupId as optional parameters. The various combinations of the parameters for the meth

Only PersonId is being passed

The method returns Session Start, Session End times for a particular person supplied as input for the supplied date range. The baseGroupId will be returned as ‘0’ when only personId is being supplied.  

Sample code when only personId is being supplied and BaseGroup is being passed as ‘0’ for the supplied date range and output is shown below are described below

Example

TPAttendanceRead attendanceRead = new TPAttendanceRead();
string data = attendanceRead.GetXmlSessionAttendances(6420,0,DateTime.Parse("04/01/2010 00:00"), DateTime.Parse("04/01/2010 23:59"));

Output

<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<SessionAttendances>
  <SessionAttendance>
    <PersonID>6420</PersonID>
    <BaseGroupID>0</BaseGroupID>
    <AttendanceDate>2010-01-04T09:00:00</AttendanceDate>
    <SessionName>AM</SessionName>
  </SessionAttendance>
  <SessionAttendance>
    <PersonID>6420</PersonID>
    <BaseGroupID>0</BaseGroupID>
    <AttendanceDate>2010-01-04T13:00:00</AttendanceDate>
    <SessionName>PM</SessionName>
  </SessionAttendance>
</SessionAttendances>

Only baseGroupId is being passed

The method returns the Session Start and Session End Times for all the students present in the BaseGroup supplied.

In the sample output the session start and end dates along with the personId of the students for the students present in ‘9F’ [Green Abbey DateSet] is being returned.

TPAttendanceRead attendanceRead = new TPAttendanceRead();
string data = attendanceRead.GetXmlSessionAttendances(0, 451, DateTime.Parse("04/01/2010 00:00"), DateTime.Parse("04/01/2010 23:59"));

Both personId and baseGroupId is being passed

Nothing will be returned in case the StudentId [personId] being supplied does not belong to the baseGroupId being supplied. Sample code [The data is being used from Green Abbey Dataset] and output is being shown below

The Session Start and End Time will be retuned as in [a] above in case the personId being passed matches with the baseGroupId being sent via the API.

 

TPAttendanceRead.GetXmlSessionAttendancesExtended(int personId,int baseGroupId,DateTime startDate,DateTime endDate)

This method is same as TPAttendanceRead.GetXmlSessionAttendances. It will return additional fields [AttendanceMark, Minute].

TPAttendanceRead.GetXmlLessonAttendancesExtended(int personId,int baseGroupId,DateTime startDate,DateTime endDate)

This method is same as TPAttendanceRead.GetXmlLessonAttendances. It will return additional fields [AttendanceMark, Minute]

TPAttendanceRead.GetXmlLessonAttendances(int personId,int baseGroupId,DateTime startDate,DateTime endDate)

This method is used to return the lessons [EventInstanceId, Name of the period, Date of the lesson] for the supplied personId or baseGroupId or both for the supplied date range. The parameters personId and baseGroupId are optional. The use of the method with various combinations of the parameters along with the sample output is shown below

If only baseGroupId passed - Returns all the lessons [EventInstanceId, StartTime, Name of the lesson] for the students [personId] who are members of the supplied baseGroupId. The baseGroupId passed can only be of type ‘Class’.

If both personId and baseGroupId passed and the personId being passed [studentId] is a member of baseGroupId [This can only be of type ‘Class’] being passed as parameter – Returns all the lessons [EventIntanceId, startTime, Name of the lesson] for the personId belonging to the baseGroupId passed as parameter.

If both personId and baseGroupId passed and the personId being passed [studentId] is not a member of baseGroupId being passed as parameter then nothing will be returned in the XML

 

Example

TPAttendanceRead attendanceRead = new TPAttendanceRead();
string data = attendanceRead.GetXmlLessonAttendances(6420, 0, DateTime.Parse("04/01/2010 00:00"), DateTime.Parse("04/01/2010 23:59"));

Output

<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<LessonAttendances>
  <LessonAttendance>
    <PersonID>6420</PersonID>
    <BaseGroupID>5222</BaseGroupID>
    <AttendanceDate>2010-01-04T09:15:00</AttendanceDate>
    <AttendancePeriod>Mon:1</AttendancePeriod>
    <EventInstanceID>25717</EventInstanceID>
  </LessonAttendance>
  <LessonAttendance>
    <PersonID>6420</PersonID>
    <BaseGroupID>5224</BaseGroupID>
    <AttendanceDate>2010-01-04T10:15:00</AttendanceDate>
    <AttendancePeriod>Mon:2</AttendancePeriod>
    <EventInstanceID>25718</EventInstanceID>
  </LessonAttendance>
  <LessonAttendance>
    <PersonID>6420</PersonID>
    <BaseGroupID>5227</BaseGroupID>
    <AttendanceDate>2010-01-04T11:35:00</AttendanceDate>
    <AttendancePeriod>Mon:3</AttendancePeriod>
    <EventInstanceID>25719</EventInstanceID>
  </LessonAttendance>
  <LessonAttendance>
    <PersonID>6420</PersonID>
    <BaseGroupID>5208</BaseGroupID>
    <AttendanceDate>2010-01-04T12:35:00</AttendanceDate>
    <AttendancePeriod>Mon:4</AttendancePeriod>
    <EventInstanceID>25720</EventInstanceID>
  </LessonAttendance>
  <LessonAttendance>
    <PersonID>6420</PersonID>
    <BaseGroupID>5220</BaseGroupID>
    <AttendanceDate>2010-01-04T14:30:00</AttendanceDate>
    <AttendancePeriod>Mon:5</AttendancePeriod>
    <EventInstanceID>25721</EventInstanceID>
  </LessonAttendance>
</LessonAttendances>

TPAttendanceRead.GetXmlAttendanceCodes()

This method returns all attendance codes from SIMS. Sample output from this interface is shown below


<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<AttendanceCodes>
  <AttendanceCode>
    <AttendanceCodeID>27</AttendanceCodeID>
    <Code>-</Code>
    <Description>All should attend</Description>
  <Attendance Code>
<AttendanceCodes>




TPAttendanceRead.GetXmlSessions(System.DateTime start, System.DateTime end)

This method will return the possible session events for the given date range

<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?> 
 <Sessions>
 <Session>
  <att_session_id>12251</att_session_id> 
  <event_instance_id>25090</event_instance_id> 
  <session_number>3</session_number> 
  <session>AM</session> 
  <event_start>2011-05-24T09:00:00</event_start> 
  <statutory>S</statutory> 
  <basemark>-</basemark> 
  </Session>
 <Session>
  <att_session_id>12252</att_session_id> 
  <event_instance_id>25091</event_instance_id> 
  <session_number>4</session_number> 
  <session>PM</session> 
  <event_start>2011-05-24T13:00:00</event_start> 
  <statutory>S</statutory> 
  <basemark>-</basemark> 
  </Session>
  </Sessions>

TPAttendanceRead.GetXmlLessons(System.DateTime start, System.DateTime end)

This method will return the possible lesson (class period)  events for the given date range SIMS. Sample output from this interface is shown below

<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?> 
 <Lessons>
 <Lesson>
  <TeacherID /> 
  <TeacherSurname /> 
  <TeacherForename /> 
  <RoomID /> 
  <RoomCode /> 
  <RoomName /> 
  <ClassGroupID>5899</ClassGroupID> 
  <ClassCode>13A/Ch1</ClassCode> 
  <ClassName>13A/Ch1</ClassName> 
  <PeriodName>Tue:1</PeriodName> 
  <PeriodEventID>196</PeriodEventID> 
  <PeriodEventInstanceID>27500</PeriodEventInstanceID> 
  <PeriodStart>2011-03-01T09:15:00</PeriodStart> 
  <PeriodEnd>2011-03-01T10:15:00</PeriodEnd> 
  <ClassPeriodID>8794</ClassPeriodID> 
  <SubjectTitle>Chemistry</SubjectTitle> 
  <ClassStartDate>2010-09-02T00:00:00</ClassStartDate> 
  <ClassEndDate>2011-03-24T23:59:00</ClassEndDate> 
  </Lesson>
  <Lesson>
  <TeacherID /> 
  <TeacherSurname /> 
  <TeacherForename /> 
  <RoomID>53</RoomID> 
  <RoomCode>S2</RoomCode> 
  <RoomName>Science Lab 2</RoomName> 
  <ClassGroupID>5724</ClassGroupID> 
  <ClassCode>9y/Sc2</ClassCode> 
  <ClassName>9y/Sc2</ClassName> 
  <PeriodName>Tue:1</PeriodName> 
  <PeriodEventID>196</PeriodEventID> 
  <PeriodEventInstanceID>27500</PeriodEventInstanceID> 
  <PeriodStart>2011-03-01T09:15:00</PeriodStart> 
  <PeriodEnd>2011-03-01T10:15:00</PeriodEnd> 
  <ClassPeriodID>8829</ClassPeriodID> 
  <SubjectTitle>Science</SubjectTitle> 
  <ClassStartDate>2010-09-02T00:00:00</ClassStartDate> 
  <ClassEndDate>2011-03-24T23:59:00</ClassEndDate> 
  </Lesson>
 <Lesson>
  <TeacherID>2</TeacherID> 
  <TeacherSurname>Konchalski</TeacherSurname> 
  <TeacherForename>Milan</TeacherForename> 
  <RoomID>40</RoomID> 
  <RoomCode>L3</RoomCode> 
  <RoomName>Language Room 3</RoomName> 
  <ClassGroupID>5834</ClassGroupID> 
  <ClassCode>11A/Fr1</ClassCode> 
  <ClassName>11A/Fr1</ClassName> 
  <PeriodName>Tue:1</PeriodName> 
  <PeriodEventID>196</PeriodEventID> 
  <PeriodEventInstanceID>27500</PeriodEventInstanceID> 
  <PeriodStart>2011-03-01T09:15:00</PeriodStart> 
  <PeriodEnd>2011-03-01T10:15:00</PeriodEnd> 
  <ClassPeriodID>8818</ClassPeriodID> 
  <SubjectTitle>French</SubjectTitle> 
  <ClassStartDate>2010-09-02T00:00:00</ClassStartDate> 
  <ClassEndDate>2011-03-24T23:59:00</ClassEndDate> 
  </Lesson>

 

TPAttendanceRead.GetXmlStudentsPercentages (int baseGroupId, int studentId, DateTime effectiveDate)

This interface will get the Attendance Summary in percentages for all the students in the baseGroupId when baseGroupId is supplied and studentId is passed as ‘0’. It will get the Attendance Summary in percentages for the passed studentId and baseGroupId passed is ‘0’. It will get the Attendance Summary in percentages of the studentId only is it is valid for the baseGroupId when both studentId and baseGroupId is passed.

Sample code and output for this interface is shown below:

TPAttendanceRead attRead = new TPAttendanceRead();
string testdata = attRead.GetXmlStudentsAttendancePercentages(5253, 0, DateTime.Parse("01/09/2009"));

 

<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<StudentAttendanceSummarys>
  <StudentAttendanceSummary>
    <StudentID>5253</StudentID>
    <FirstName>Benjamin</FirstName>
    <LastName>Abbot</LastName>
    <TutorGroupName>N</TutorGroupName>
    <Present>67</Present>
    <Late>0</Late>
    <AuthorisedAbsent>22</AuthorisedAbsent>
    <UnauthorisedAbsent>2</UnauthorisedAbsent>
    <EducationalActivity>0</EducationalActivity>
  </StudentAttendanceSummary>
</StudentAttendanceSummarys>

It will always get the Percentages in rounded values and the attendance summary will be returned till the  current date even if the date passed is in past as EffectiveDate passed as parameter is used for checking the Student Membership.

TPAttendanceRead.GetXmlStudentsAttendanceCounts(int baseGroupId, int studentId, DateTime effectiveDate)

This interface will return the counts of Attendance Summary for all the students in the baseGroupId when baseGroupId is supplied and studentId is passed as ‘0’. It will get the counts of Attendance Summary for the passed studentId and baseGroupId passed is ‘0’. It will get the counts of Attendance Summary of the studentId only is it is valid for the baseGroupId when both studentId and baseGroupId is passed.

Sample code and output for this interface is shown below:

TPAttendanceRead attRead = new TPAttendanceRead();
string testdata = attRead.GetXmlStudentsAttendanceCounts(5253, 0, DateTime.Parse("01/09/2009"));
<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<StudentAttendanceSummarys>
  <StudentAttendanceSummary>
    <StudentID>5253</StudentID>
    <FirstName>Benjamin</FirstName>
    <LastName>Abbot</LastName>
    <TutorGroupName>N</TutorGroupName>
    <Present>104</Present>
    <Late>0</Late>
    <AuthorisedAbsent>34</AuthorisedAbsent>
    <UnauthorisedAbsent>4</UnauthorisedAbsent>
    <EducationalActivity>0</EducationalActivity>
  </StudentAttendanceSummary>
</StudentAttendanceSummarys>

The attendance summary will be returned till the current date even if the date passed is in past as EffectiveDate passed as parameter is used for checking the Student Membership.

TPAttendanceRead.GetXmlMissingRegisters (int personId)

This interface will get the information of all the registration groups and lessons for the supplied personId where the session/lesson mark has not been recorded from the Academic Year till Current Date. The register will be reported as missing even if only one student in the lesson is not being marked. The register will not be considered as missing if all the students have one or the other mark. Even if all the students are marked with ‘N’, it will not be considered as a missing register.

Sample code and output for this interface is shown below:

TPAttendanceRead attRead = new TPAttendanceRead();
string testdata = attRead.GetXmlMissingRegisters(26);
<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?> 
 <MissingRegisters>
 <MissingRegister>
  <BaseGroupID>445</BaseGroupID> 
  <GroupName>11D</GroupName> 
  <DateTime>2009-09-02T09:00:00</DateTime> 
  <PeriodName>AM</PeriodName> 
  </MissingRegister>
 <MissingRegister>
  <BaseGroupID>5042</BaseGroupID> 
  <GroupName>7D/Sc</GroupName> 
  <DateTime>2009-10-14T11:35:00</DateTime> 
  <PeriodName>Wed:3</PeriodName> 
  </MissingRegister>
 <MissingRegister>
  <BaseGroupID>5042</BaseGroupID> 
  <GroupName>7D/Sc</GroupName> 
  <DateTime>2009-10-14T12:35:00</DateTime> 
  <PeriodName>Wed:4</PeriodName> 
  </MissingRegister>
  </MissingRegisters>

TPAttendanceRead.GetXmlAbsentStudents (int baseGroupId, DateTime effectiveDate)

This interface gets all the students absent in the basegroupid [which will have to be for a lesson] for the supplied date.

Sample code and output for this interface is shown below:

TPAttendanceRead attRead = new TPAttendanceRead();
string testdata = attRead. GetXmlAbsentStudents(5225, DateTime.Parse("04/01/2010"));

 

TPAttendanceRead.GetXmlAbsentStudents (int personId, int roleTypeId,DateTime effectiveDate)

This interface gets all the students absent in for the supplied personId and roleTypeId for the supplied date.

Sample code and output for this interface is shown below:

TPAttendanceRead attRead = new TPAttendanceRead();
string testdata = attRead. GetXmlAbsentStudents(20,2 DateTime.Parse("04/01/2010"));

 

<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<AbsentStudents>
  <AbsentStudent>
    <StudentID>6453</StudentID>
    <FirstName>Rachael</FirstName>
    <LastName>Cardy</LastName>
    <BaseGroupID>5225</BaseGroupID>
    <GroupName>9y/Ma2</GroupName>
    <PeriodName>Mon:2</PeriodName>
    <PeriodNumber>3</PeriodNumber>
    <AttendanceMark>O</AttendanceMark>
  </AbsentStudent>
  <AbsentStudent>
    <StudentID>6457</StudentID>
    <FirstName>Rebecca</FirstName>
    <LastName>Cardy</LastName>
    <BaseGroupID>5225</BaseGroupID>
    <GroupName>9y/Ma2</GroupName>
    <PeriodName>Mon:2</PeriodName>
    <PeriodNumber>3</PeriodNumber>
    <AttendanceMark>N</AttendanceMark>
  </AbsentStudent>
</AbsentStudents>

 

 

SIMS 7 RESOURCES

Related resources for SIMS 7