180 likes | 303 Views
Student Data System XML Business Transactions. Saskatchewan Learning Trent Reifferscheid Bonnie Stecyk. General XML Notes Avoiding validation errors. Pass application specific Id’s as the transaction RefId Eg) RefId=“{application student no}”
E N D
Student Data SystemXML Business Transactions Saskatchewan Learning Trent Reifferscheid Bonnie Stecyk
General XML NotesAvoiding validation errors • Pass application specific Id’s as the transaction RefId Eg) RefId=“{application student no}” • Include the XML header to correctly encode/decode special characters <?xml version="1.0" encoding="UTF-8"?> • Encode special characters as symbols Eg) “&” as “&”, “Qu’appelle” as “Qu' appelle” • Pass only numeric data for numeric elements: DeptAssignedPersonId, DeptAssignedCourseId, SchoolId, EducatorCertificateNumber & SchoolMark • Pass element code definitions exactly as defined in the XML specification: Eg) Use <EntryType Code=“01”/> vs <EntryType Code=“1”/> • Use Schema Validation Tools (such as XMLSpy) to validate the contents of your XML document if you are running into XML validation issues.
Enrolment Transactions Enrolment Transaction Types: • Add a new student enrolment (assign a DeptAssignedPersonId from the response). • Grade advancement for a student previously enrolled. • Student withdrawal for a student leaving the school.
Add a New Student Enrolment <!– Use this transaction to add a new individual to your school --> <SL_EventObject ObjectName="StudentSchoolEnrollment" Action="Add"> <StudentSchoolEnrollment RefId="350001378"> <StudentIdentification> <BirthDate>1989-10-31</BirthDate> </StudentIdentification> <StudentInfo> … </StudentInfo> <SchoolId>2163404</SchoolId> <SchoolEnrollmentInfo> <EntryDate>2004-08-28</EntryDate> <EntryType Code="01"/> <Grade Code="09"/> </SchoolEnrollmentInfo> <DeptAssignedProgramId>10</DeptAssignedProgramId> <ProgramEnrollmentInfo> <EntryDate>2004-08-28</EntryDate> </ProgramEnrollmentInfo> </StudentSchoolEnrollment> • Notes / Keypoints • Set Action=“Add” for a new student enrolment (No DeptAssignedPersonId). • Supply Student Demographic information in StudentInfo section. • Set EntryDate to the date the individual enrolled in the current school year. • Set the Grade to the grade as of the entry date. • Supply the DeptAssignedProgramId and ProgramEnrollmentInfo:EntryDate for the Program Enrolment. • The students assigned DeptAssignedPersonId will returned in the XML Response file.
Student Grade Advancement <!– Use this transaction to advance the grade for a student already enrolled in the school--> <SL_EventObject ObjectName="StudentSchoolEnrollment" Action=“Change"> <StudentSchoolEnrollment RefId="350001378"> <StudentIdentification> <DeptAssignedPersonId>123456789</DeptAssignedPersonId> <BirthDate>1989-10-31</BirthDate> </StudentIdentification> <StudentInfo> … </StudentInfo> <SchoolId>2163404</SchoolId> <SchoolEnrollmentInfo> <Grade Code="09"/> </SchoolEnrollmentInfo> </StudentSchoolEnrollment> • Notes / Keypoints • Set Action=“Change” as the DeptAssignedPersonId is known. • StudentInfo is only required if the individual’s personal information has changed. • Set the Grade for the individual for this school year.
Withdraw a Student from your School <!– Use this transaction to withdraw an individual from your school --> <SL_EventObject ObjectName="StudentSchoolEnrollment" Action=“Change"> <StudentSchoolEnrollment RefId="350001378"> <StudentIdentification> <DeptAssignedPersonId>123456789</DeptAssignedPersonId> <BirthDate>1989-10-31</BirthDate> </StudentIdentification> <StudentInfo/> <SchoolId>2163404</SchoolId> <SchoolEnrollmentInfo> <ExitDate>2004-06-28</ExitDate> <ExitType Code="01"/> </SchoolEnrollmentInfo> </StudentSchoolEnrollment> • Notes / Keypoints • Set Action=“Change” as the DeptAssignedPersonId is known. • StudentInfo section is not required. • Set ExitDate to the date the individual withdrew (the end of the school year). • Set the ExitType for the exit reason.
Class Registration Transactions Class Registration Transaction Types: • Create a school class • Register a student in a 100% school class (accredited teacher) • Register a student in a blended class (60% school / 40% dept mark) • Register a student in a departmental exam • Drop a student from the class • Submit school marks for a registered student • Change a school mark for a registered student
Add a New School Class <!-- Add a class for the school --> <SL_EventObject ObjectName="SchoolClass" Action="Add"> <SchoolClass RefId="1"> <ClassIdentification> <SchoolId>4154902</SchoolId> <ClassId>C10NS-12</ClassId> <StartDate>2004-09-01</StartDate> <EndDate>2005-06-28</EndDate> </ClassIdentification> <ClassInfo> <DeptAssignedCourseId>4994</DeptAssignedCourseId> <EducatorCertificateNumber>1234567</EducatorCertificateNumber> <ModeOfInstruction Code="Class"/> </ClassInfo> </SchoolClass> </SL_EventObject> • Notes / Keypoints • Set Action=“Add” for a new school class, Action=“Change” can be used to change EndDate only 2. Make ClassId/StartDate/EndDate identifier unique and unchanging, as this is required for matching during class registrations. 3. Supply an EducatorCertificateNumber as this is required for mark submissions.
Register a Student in a 100% School Class <!—Register a student in a 100% school / accredited class --> <StudentClassEnrollment RefId="FJB42"> <StudentIdentification> <DeptAssignedPersonId>123456789</DeptAssignedPersonId> <BirthDate>1989-11-03</BirthDate> </StudentIdentification> <ClassIdentification> <SchoolId>4825103</SchoolId> <ClassId>TIN 10a</ClassId> <StartDate>2004-08-26</StartDate> <EndDate>2005-06-30</EndDate> </ClassIdentification> <ClassEnrollmentInfo/> </StudentClassEnrollment> • Notes / Keypoints • Set Action=“Add” for a new registration, Action=“Change” to modify an existing registration • Supply a DeptAssignedPersonId • Supply the ClassIdentification from the SchoolClass transaction
Register a Student in a Blended Class <!-- Register a student in a blended course (60% School / 40% Deptartmental) --> <SL_EventObject ObjectName="StudentClassEnrollment" Action=“Add"> <StudentClassEnrollment RefId="BJC-51-"> <StudentIdentification> <DeptAssignedPersonId>123456789</DeptAssignedPersonId> <BirthDate>1987-04-15</BirthDate> </StudentIdentification> <ClassIdentification> <SchoolId>4825103</SchoolId> <ClassId>ANGA30a</ClassId> <StartDate>2005-01-19</StartDate> <EndDate>2005-06-28</EndDate> </ClassIdentification> <ClassEnrollmentInfo> <MarkSource Code="Blended"/> </ClassEnrollmentInfo> <ExamRegistrationInfo Type="Class"> <ExamPeriodEndDate>2005-06-28</ExamPeriodEndDate> </ExamRegistrationInfo> </StudentClassEnrollment> • Notes / Keypoints • Set Action=“Add” for a new registration, Action=“Change” to modify an existing registration. • Set MarkSource to Blended. • Include the ExamRegistrationInfo section for the departmental portion of the class, set the ExamPeriodEndDate to the published exam date.
Register a Student for a Departmental Exam <!-- Register a student for a departmental exam --> <SL_EventObject ObjectName="StudentExamRegistration" Action="Change"> <StudentExamRegistration RefId="1"> <StudentIdentification> <DeptAssignedPersonId>123456789</DeptAssignedPersonId> <BirthDate>1986-02-12</BirthDate> </StudentIdentification> <DeptAssignedCourseId>8404</DeptAssignedCourseId> <ExamRegistrationInfo Type="Class"> <ExamPeriodEndDate>2005-01-28</ExamPeriodEndDate> </ExamRegistrationInfo> <ExamLocation> <SchoolId>1234567</SchoolId> </ExamLocation> </StudentExamRegistration> • Notes / Keypoints • Set Action=“Add” for a new registration, Action=“Change” to modify an existing registration. • Set the ExamPeriodEndDate to the published exam date. • Set the SchoolId to the Writing Center #.
Drop a Student from a Class <!– Drop a student from a class --> <SL_EventObject ObjectName="StudentClassEnrollment" Action="Change"> <StudentClassEnrollment RefId="132-003700692"> <StudentIdentification> <DeptAssignedPersonId>123456789</DeptAssignedPersonId> <BirthDate>1988-11-29</BirthDate> </StudentIdentification> <ClassIdentification> <SchoolId>4155004</SchoolId> <ClassId>BA20NS-02</ClassId> <StartDate>2004-09-01</StartDate> <EndDate>2005-06-28</EndDate> </ClassIdentification> <ClassEnrollmentInfo> <Dropped Code="Yes"/> </ClassEnrollmentInfo> </StudentClassEnrollment> </SL_EventObject> • Notes / Keypoints • Set Action=“Change” to modify a existing registration. • Set the DeptAssignedPersonId. • Set the ClassIdentification. • Set the Dropped Code=“Yes” to drop the student from a class.
Submit school marks for a registered student <!– Send a school mark in for a student registered in a class --> <SL_EventObject ObjectName="StudentClassMark" Action="Add"> <StudentClassMark RefId="1"> <StudentIdentification> <DeptAssignedPersonId>123456789</DeptAssignedPersonId> <BirthDate>1987-06-16</BirthDate> </StudentIdentification> <ClassIdentification> <SchoolId>4154902</SchoolId> <ClassId>CL30-11</ClassId> <StartDate>2004-09-01</StartDate> <EndDate>2004-11-21</EndDate> </ClassIdentification> <SchoolMarkInfo> <SchoolMark>95</SchoolMark> </SchoolMarkInfo> </StudentClassMark> </SL_EventObject> • Notes / Keypoints • Set Action=“Add” for a new mark. • Set the DeptAssignedPersonId. • Set the ClassIdentification. • Set the SchoolMark for the student (number between 1 and 100).
Change a school mark for a student <!– Change a school mark for a student registered in a class --> <SL_EventObject ObjectName="StudentClassMark" Action=“Change"> <StudentClassMark RefId="1"> <StudentIdentification> <DeptAssignedPersonId>123456789</DeptAssignedPersonId> <BirthDate>1987-06-16</BirthDate> </StudentIdentification> <ClassIdentification> <SchoolId>4154902</SchoolId> <ClassId>CL30-11</ClassId> <StartDate>2004-09-01</StartDate> <EndDate>2004-11-21</EndDate> </ClassIdentification> <SchoolMarkInfo CorrectionCode=“Yes"> <SchoolMark>94</SchoolMark> </SchoolMarkInfo> </StudentClassMark> </SL_EventObject> • Notes / Keypoints • Set Action=“Change” to change a mark. • Set the DeptAssignedPersonId. • Set the ClassIdentification. • Set the CorrectionCode to Yes. • Set the SchoolMark for the student (number between 1 and 100).
Response Files Response file types: • XML Validation Errors • Your XML document does not pass validation against the XML schema definition file. • Processing Errors and Warnings • Each transaction is processed independently. • Enrolment response, returning DeptAssignedPersonId
Sample XML Reponse <SL_Response> <SL_Header> <SL_MsgId>EDTEMR.20041216.144705.0000000608</SL_MsgId> <SL_Date>2004-12-16</SL_Date> <SL_Time Zone="UTC-06:00">14:47:05</SL_Time> <SL_SourceId>8888888</SL_SourceId> </SL_Header> <SL_Ack> <SL_OriginalMsgId>.20041216.145048</SL_OriginalMsgId> <SL_OriginalSourceId>4154902</SL_OriginalSourceId> <SL_Status> <SL_StatusCode>Errors</SL_StatusCode> <SL_StatusMsg>XML processing error {Summary: Transactions:2 Successful:1 Errors:1 Warnings:0}</SL_StatusMsg> </SL_Status> <SL_Error ObjectName="StudentSchoolEnrollment" RefId=“1"> <SL_ErrorSeverity>Informational</SL_ErrorSeverity> <SL_ErrorCode>0</SL_ErrorCode> <SL_ErrorMsg>Transaction Successful</SL_ErrorMsg> </SL_Error> <SL_Error ObjectName="StudentSchoolEnrollment" RefId=“2"> <SL_ErrorSeverity>Error</SL_ErrorSeverity> <SL_ErrorCode>53908</SL_ErrorCode> <SL_ErrorMsg>Student cannot be enrolled twice in same school at same time</SL_ErrorMsg> </SL_Error> </SL_Ack>
XML Reponse Sample Page 2 <SL_ObjectData> <SL_EventObject ObjectName="StudentPersonal"> <StudentPersonal RefId=“1"> <StudentIdentification> <DeptAssignedPersonId>123456789</DeptAssignedPersonId> <BirthDate>1983-03-09</BirthDate> </StudentIdentification> <StudentInfo> <SchoolAssignedPersonId>900016</SchoolAssignedPersonId> </StudentInfo> </StudentPersonal> </SL_EventObject> </SL_Response>
Support Documentation • SDS XML web site http://www.sasked.gov.sk.ca/sds/xml/ • SDS application help. • Support email address student.records@sasked.gov.sk.ca