<!--
		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="StudentAssessmentTaskType">
    <xs:annotation>
      <xs:appinfo>
        <sifChar />
        <privacyRating>Low</privacyRating>
      </xs:appinfo>
      <xs:documentation>Record of a student's attempt at a particular assessment task.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="StudentAssessmentTaskRefId" 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="StudentAssessmentTaskLocalId" 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="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 who is being assessed against 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 student assessment is for.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="StudentAssessmentTaskRegistration" 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 registration made on behalf of the student by the school to sit this assessment.</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.
         assessing provider, assessment provider, assessment location provider.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="StaffInvolvedList" minOccurs="0" nillable="true" type="StaffInvolvedListType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>A list of the staff involved and their role in relation to the assessment task, 
        e.g. the staff members that supervise the undertaking of the assessment task by the student.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="DateTimeAssessmentScheduled" minOccurs="0" nillable="true" type="xs:dateTime">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The date and time the student is scheduled to be assessed against the assessment task.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="DateTimeAssessed" minOccurs="0" nillable="true" type="xs:dateTime">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The date and time the student was assessed against the assessment task.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Status" minOccurs="0" nillable="true" type="NZCodeSetsAssessmentStatusType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Code denoting the current status of the student assessment task</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="NCEAStatusDate" minOccurs="0" nillable="true" type="xs:date">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Date the current NCEA status was set.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="AssessmentAttempt" minOccurs="0" nillable="true" type="xs:int">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The attempt number the student is making to pass this assessment, e.g. is it their first, second attempt.</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>The list of the special assessment conditions that the student is
          entitled to have when sitting this assessment task.</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="StudentAssessmentTask" type="StudentAssessmentTaskType">
    <xs:key name="StudentAssessmentTaskKey1">
      <xs:selector xpath="." />
      <xs:field xpath="./StudentAssessmentTaskRefId" />
    </xs:key>
  </xs:element>

  <xs:complexType name="StudentAssessmentTaskCollectionType">
    <xs:sequence>
      <xs:element name="StudentAssessmentTask" type="StudentAssessmentTaskType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="StudentAssessmentTasks" type="StudentAssessmentTaskCollectionType" />

</xs:schema>