© 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 - Summer 24 - Changes for third party APIs for Attendance

Last Updated - 5 Apr 24

This is very much an early sight of work in progress, it may well change but it should help TIs to get a broad idea of the scope of work needed to implement the changes.

Background

This is very much work in progress but we thought that it might help to show how we will retire the APIs, which APIs are retired, which APIs replace them and which remain the same.

Those remaining the same will be checked again to make sure that they are genuinely 'unchanged'.

Retirement method

// Retired APIs will be changed to do the following.
using SIMS.Processes;

public string FunctionName(Parameters)
{     
    throw new NotImplementedException("Please change the code to use public <> V3");
}

 

Retired APIs which will throw exceptions from Summer 24 SIMS if called

public string GetXmlStudentsAttendancePercentages(int BaseGroupID, int StudentID, DateTime EffectiveDate)
public string GetXmlStudentsAttendanceCounts(int BaseGroupID, int StudentID, DateTime EffectiveDate)
public string GetXmlSessionAttendances(int PersonID, int BaseGroupID, DateTime StartDate, DateTime EndDate)
public string GetXmlSessionAttendancesExtended(int PersonID, int BaseGroupID, DateTime StartDate, DateTime EndDate)
public string GetXmlChangedSessionAttendancesInRange(DateTime StartDate, DateTime EndDate)
public string GetXmlLessonAttendances(int PersonID, int BaseGroupID, DateTime StartDate, DateTime EndDate)
public string GetXmlLessonAttendancesExtended(int PersonID, int BaseGroupID, DateTime StartDate, DateTime EndDate)
public XmlDocument GetXmlLessonAttendancesExtendedMultipleTeachers(int PersonID, int BaseGroupID, DateTime StartDate, DateTime EndDate)
public string GetXmlChangedLessonAttendancesInRange(DateTime StartDate, DateTime EndDate)
public string GetXmlAttendanceCodes() 
public string GetXmlAbsentStudents(int baseGroupID, DateTime effectiveDate)     
// TP Attendance Write
public bool WriteSessionAttendances(string xmlString)
public bool WriteLessonAttendances(string xmlString) // Not replaced.
public bool WriteLessonAttendances2(string xmlString)
// On review
public string GetXmlAbsentStudents(int personID, int roleTypeID, DateTime effectiveDate)

 

New APIs to replace the above.

The following alternative APIs should be used.

Not all APIs will be replaced.

public string GetXmlStudentsAttendancePercentagesV3(int BaseGroupID, int StudentID, DateTime EffectiveDate) {...}
public string GetXmlStudentsAttendanceCountsV3(int BaseGroupID, int StudentID, DateTime EffectiveDate) {...}
public string GetXmlSessionAttendancesV3(int PersonID, int BaseGroupID, DateTime StartDate, DateTime EndDate) {...}
public string GetXmlSessionAttendancesExtendedV3(int PersonID, int BaseGroupID, DateTime StartDate, DateTime EndDate) {...}
public string GetXmlChangedSessionAttendancesInRangeV3(DateTime StartDate, DateTime EndDate) {...}
public string GetXmlLessonAttendancesV3(int PersonID, int BaseGroupID, DateTime StartDate, DateTime EndDate) {...}
public string GetXmlLessonAttendancesExtendedV3(int PersonID, int BaseGroupID, DateTime StartDate, DateTime EndDate) {...}
public XmlDocument GetXmlLessonAttendancesExtendedMultipleTeachersV3(int PersonID, int BaseGroupID, DateTime StartDate, DateTime EndDate) {...}
public string GetXmlChangedLessonAttendancesInRangeV3(DateTime StartDate, DateTime EndDate) {...}
public string GetXmlAttendanceCodesV3() {...}
public string GetXmlAbsentStudentsV3(int baseGroupID, DateTime effectiveDate)
// TP Attendance Write
public bool WriteSessionAttendancesV3(string xmlString)
public bool WriteLessonAttendancesV3(string xmlString)
// On review
public string GetXmlAbsentStudentsV3(int personID, int roleTypeID, DateTime effectiveDate)  

 

Unchanged APIs in the attendance area

 

public string GetXmlAbsentStudentsForRegGroups(int regGroupID, DateTime effectiveDate)  // Internal fix required to accomodate wider attendance codes but this won't impact on the response.
public string GetXmlMissingRegisters(int PersonID)  // returns a set of classes and periods and has no link to attendance marks other than looking for a '-'

public string GetXMLSessions(DateTime start, DateTime end) // returns a set of session events and so has no link to attendance marks.
public string GetXMLLessons(DateTime start, DateTime end) // returns a set of lessons and so has no link to attendance marks

 

First Testing

Calling retired versions of the APIs.


public static void Test()
        {
            SIMS.Processes.TPAttendanceRead TPAR = new SIMS.Processes.TPAttendanceRead();
            SIMS.Processes.TPAttendanceWrite TPAW = new SIMS.Processes.TPAttendanceWrite();
            int BaseGroupID = 100;
            int PersonID = 4353;
            int StudentID = 4345;
            DateTime EffectiveDate = DateTime.Now;
            DateTime StartDate = DateTime.Now.AddDays(-7);
            DateTime EndDate = DateTime.Now;
            string xmlString = "<Root></Root>";

            try
            {
                TPAR.GetXmlStudentsAttendancePercentages(BaseGroupID, StudentID, EffectiveDate);
                Console.WriteLine("Should not get here post Summer 24");
            }
            catch (System.NotImplementedException ex)
            {
                Console.WriteLine("Correct Behaviour post Summer 24");

            }
            catch (System.Exception e)
            {
                Console.WriteLine("Error condition post Summer 24");
            }
            try
            {
                TPAR.GetXmlStudentsAttendanceCounts(BaseGroupID, StudentID, EffectiveDate);
                Console.WriteLine("Should not get here post Summer 24");
            }
            catch (System.NotImplementedException ex)
            {
                Console.WriteLine("Correct Behaviour post Summer 24");

            }
            catch (System.Exception e)
            {
                Console.WriteLine("Error condition post Summer 24");
            }
            try
            {
                TPAR.GetXmlSessionAttendances(PersonID, BaseGroupID, StartDate, EndDate);
                Console.WriteLine("Should not get here post Summer 24");
            }
            catch (System.NotImplementedException ex)
            {
                Console.WriteLine("Correct Behaviour post Summer 24");

            }
            catch (System.Exception e)
            {
                Console.WriteLine("Error condition post Summer 24");
            }
            try
            {
                TPAR.GetXmlSessionAttendancesExtended(PersonID, BaseGroupID, StartDate, EndDate);
                Console.WriteLine("Should not get here post Summer 24");
            }
            catch (System.NotImplementedException ex)
            {
                Console.WriteLine("Correct Behaviour post Summer 24");

            }
            catch (System.Exception e)
            {
                Console.WriteLine("Error condition post Summer 24");
            }
            try
            {
                TPAR.GetXmlChangedSessionAttendancesInRange(StartDate, EndDate);
                Console.WriteLine("Should not get here post Summer 24");
            }
            catch (System.NotImplementedException ex)
            {
                Console.WriteLine("Correct Behaviour post Summer 24");

            }
            catch (System.Exception e)
            {
                Console.WriteLine("Error condition post Summer 24");
            }
            try
            {
                TPAR.GetXmlLessonAttendances(PersonID, BaseGroupID, StartDate, EndDate);
                Console.WriteLine("Should not get here post Summer 24");
            }
            catch (System.NotImplementedException ex)
            {
                Console.WriteLine("Correct Behaviour post Summer 24");

            }
            catch (System.Exception e)
            {
                Console.WriteLine("Error condition post Summer 24");
            }
            try
            {
                TPAR.GetXmlLessonAttendancesExtended(PersonID, BaseGroupID, StartDate, EndDate);
                Console.WriteLine("Should not get here post Summer 24");
            }
            catch (System.NotImplementedException ex)
            {
                Console.WriteLine("Correct Behaviour post Summer 24");

            }
            catch (System.Exception e)
            {
                Console.WriteLine("Error condition post Summer 24");
            }
            try
            {
                TPAR.GetXmlLessonAttendancesExtendedMultipleTeachers(PersonID, BaseGroupID, StartDate, EndDate);

                Console.WriteLine("Should not get here post Summer 24");
            }
            catch (System.NotImplementedException ex)
            {
                Console.WriteLine("Correct Behaviour post Summer 24");

            }
            catch (System.Exception e)
            {
                Console.WriteLine("Error condition post Summer 24");
            }
            try
            {
                TPAR.GetXmlChangedLessonAttendancesInRange(StartDate, EndDate);
                Console.WriteLine("Should not get here post Summer 24");
            }
            catch (System.NotImplementedException ex)
            {
                Console.WriteLine("Correct Behaviour post Summer 24");

            }
            catch (System.Exception e)
            {
                Console.WriteLine("Error condition post Summer 24");
            }
            try
            {
                TPAR.GetXmlAttendanceCodes();
                Console.WriteLine("Should not get here post Summer 24");
            }
            catch (System.NotImplementedException ex)
            {
                Console.WriteLine("Correct Behaviour post Summer 24");

            }
            catch (System.Exception e)
            {
                Console.WriteLine("Error condition post Summer 24");
            }
            try
            {
                TPAR.GetXmlAbsentStudents(BaseGroupID, EffectiveDate);
                Console.WriteLine("Should not get here post Summer 24");
            }
            catch (System.NotImplementedException ex)
            {
                Console.WriteLine("Correct Behaviour post Summer 24");

            }
            catch (System.Exception e)
            {
                Console.WriteLine("Error condition post Summer 24");
            }
            try
            {
                TPAW.WriteSessionAttendances(xmlString);
                Console.WriteLine("Should not get here post Summer 24");
            }
            catch (System.NotImplementedException ex)
            {
                Console.WriteLine("Correct Behaviour post Summer 24");

            }
            catch (System.Exception e)
            {
                Console.WriteLine("Error condition post Summer 24");
            }
            try
            {
                TPAW.WriteLessonAttendances(xmlString);// Not replaced.
                Console.WriteLine("Should not get here post Summer 24");
            }
            catch (System.NotImplementedException ex)
            {
                Console.WriteLine("Correct Behaviour post Summer 24");

            }
            catch (System.Exception e)
            {
                Console.WriteLine("Error condition post Summer 24");
            }
            try
            {
                TPAW.WriteLessonAttendances2(xmlString);
                Console.WriteLine("Should not get here post Summer 24");
            }
            catch (System.NotImplementedException ex)
            {
                Console.WriteLine("Correct Behaviour post Summer 24");

            }
            catch (System.Exception e)
            {
                Console.WriteLine("Error condition post Summer 24");
            }
            try
            {
                int roleTypeID = 16;
                TPAR.GetXmlAbsentStudents(PersonID, roleTypeID, EffectiveDate);
                Console.WriteLine("Should not get here post Summer 24");
            }
            catch (System.NotImplementedException ex)
            {
                Console.WriteLine("Correct Behaviour post Summer 24");

            }
            catch (System.Exception e)
            {
                Console.WriteLine("Error condition post Summer 24");
            }
            // TP Attendance Write

            // On review

            Console.ReadLine();
        }
        

Output

Correct Behaviour post Summer 24
Correct Behaviour post Summer 24
Correct Behaviour post Summer 24
Correct Behaviour post Summer 24
Correct Behaviour post Summer 24
Correct Behaviour post Summer 24
Correct Behaviour post Summer 24
Correct Behaviour post Summer 24
Correct Behaviour post Summer 24
Correct Behaviour post Summer 24
Correct Behaviour post Summer 24
Correct Behaviour post Summer 24
Correct Behaviour post Summer 24
Correct Behaviour post Summer 24
Correct Behaviour post Summer 24