<!--
		SIF Implementation Specification (New Zealand) 3.1
		(8 December, 2020
)
		
		Infrastructure Version: v3.1
	-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.sifassociation.org/datamodel/nz/3.1" targetNamespace="http://www.sifassociation.org/datamodel/nz/3.1" elementFormDefault="qualified" version="3.1 (rc 5)">
  <xs:complexType name="StudentAssessmentTaskRegistrationType">
    <xs:annotation>
      <xs:appinfo>
        <sifChar />
        <privacyRating>Low</privacyRating>
      </xs:appinfo>
      <xs:documentation>The student's registration for an assessment task they are intending to participate in. </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="StudentAssessmentTaskRegistrationRefId" minOccurs="0" nillable="true" type="RefIdType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The universally unique identifier for the data object record that is used across systems.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="StudentAssessmentTaskRegistrationLocalId" minOccurs="0" nillable="true" type="LocalIdType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The Id of the data object record that was provided by the system that the information 
			was originally sourced from.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="AssessmentRegistrationStatus" minOccurs="0" nillable="true" type="NZCodeSetsAssessmentRegistrationStatusType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The status of the student's registration for an assessment task, e.g. applied, 
      approved, withdrawn.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ProviderInvolvedList" type="ProviderInvolvedListType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>A list of the providers involved and their role, e.g. assessment provider, registering provider.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Student" type="StudentObjectReferenceType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Generic object reference to the student held in the StudentPersonal data object
         whose intention to participate in an assessment task is being registered.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="StaffMember" minOccurs="0" nillable="true" type="ObjectReferenceType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Generic object reference to the StaffPersonal data object representing the teacher who 
        registered the student's intention to participate in the assessment task.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="AssessmentTask" type="ObjectReferenceType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Generic object reference to the AssessmentTask data object that the registration is for.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="NZQA" minOccurs="0" nillable="true" type="NZQAAssessmentRegistrationType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Extra details to support NZQA assessment registration process</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SpecialAssessmentConditionList" minOccurs="0" nillable="true" type="SpecialAssessmentConditionListType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>A list of references identifying any Special Assessment Conditions that the student
         is entitled to for the assessment task they are registering for.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ProviderCourse" minOccurs="0" nillable="true" type="ObjectReferenceType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Generic object reference to the ProviderCourse that the assessment task is being set as part of.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="LearningStandard" minOccurs="0" nillable="true" type="LearningStandardObjectReferenceType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Generic object reference to the LearningStandard the student is registering for.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SubjectArea" minOccurs="0" nillable="true" type="NZCodeSetsSubjectAreaType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Code denoting the Learning or Subject Area the assessment task registration is for.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="YearLevel" minOccurs="0" nillable="true">
        <xs:simpleType>
          <xs:restriction base="xs:int">
            <xs:annotation>
              <xs:appinfo>
                <sifChar>O</sifChar>
                <privacyRating>Low</privacyRating>
              </xs:appinfo>
              <xs:documentation>The Year Level of the assessment task the registration is for. May only contain the values 1 through to 13 inclusive.</xs:documentation>
            </xs:annotation>
            <xs:minInclusive value="1" xmlns:xs="http://www.w3.org/2001/XMLSchema" />
            <xs:maxInclusive value="13" xmlns:xs="http://www.w3.org/2001/XMLSchema" />
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="DateRegistered" type="xs:date">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The date the student's intent to participate in the assessment task was registered.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="AssessmentYear" type="xs:gYear">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The assessment year the student's intent to participate in the assessment task was registered for.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="RecordAudit" minOccurs="0" nillable="true" type="RecordAuditType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The audit details for a record, e.g. Created/Last Updated DateTime and Created/Last Updated By.</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:element name="StudentAssessmentTaskRegistration" type="StudentAssessmentTaskRegistrationType">
    <xs:key name="StudentAssessmentTaskRegistrationKey1">
      <xs:selector xpath="." />
      <xs:field xpath="./StudentAssessmentTaskRegistrationRefId" />
    </xs:key>
  </xs:element>

  <xs:complexType name="StudentAssessmentTaskRegistrationCollectionType">
    <xs:sequence>
      <xs:element name="StudentAssessmentTaskRegistration" type="StudentAssessmentTaskRegistrationType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="StudentAssessmentTaskRegistrations" type="StudentAssessmentTaskRegistrationCollectionType" />

</xs:schema>