public void testSubjectAreaSIF15r1()
        {
            Adk.SifVersion = SifVersion.SIF15r1;
            SchoolCourseInfo sci = new SchoolCourseInfo();
            SubjectAreaList lst = new SubjectAreaList();
            sci.SubjectAreaList = lst;

            SubjectArea sa = new SubjectArea( "13" );
            sa.TextValue = "Graphic Arts"; // for SIF 1.x ???
            OtherCodeList ocl = new OtherCodeList();
            ocl.Add( new OtherCode( Codeset.TEXT, "Graphic Arts" ) );
            sa.OtherCodeList = ocl;
            lst.Add( sa );

            StringWriter sw = new StringWriter();
            SifWriter sifw = new SifWriter( sw );
            sifw.Write( sci );
            sifw.Flush();
            sifw.Close();

            String xml = sw.ToString();
            Console.WriteLine( xml );

            int found = xml.IndexOf( ">Graphic Arts</SubjectArea>" );
            Assertion.Assert( found > -1 );
        }
예제 #2
0
 /// <summary>
 /// Constructor that accepts values for all mandatory fields
 /// </summary>
 ///<param name="yearCreated">This represents the year that this specific learning standard was created.  This is important to indicate as standards are updated to reflect the appropriate year it was created. This would be assigned and unique to the standard setting body.</param>
 ///<param name="subjectArea">This represents the subject or content area this learning standard addresses. This would be assigned and unique to the standard setting body.\</param>
 ///<param name="standardNumber">This is the specific number of the standard.  For example, if the subject is mathematics and this standard is Patterns, Functions and Algebra, this would be StandardNumber 1. This would be assigned and unique to the standard setting body.</param>
 ///<param name="gradeLevels">This represents the grade level(s) this specific learning standard will address. This may be addressed in different ways.  Some states have a grade level that covers several grades and others have just one grade. This would be assigned and unique to the standard setting body.</param>
 ///<param name="organization">Name of organization represented by the document, i.e., "National Council of Teachers of Mathematics (NCTM)," "Washington," "Seattle School District." This is the name of the organization that has this AlternateIdentificationCode. This should be a text field.</param>
 ///
 public StandardIdentifier( int? yearCreated, SubjectArea subjectArea, string standardNumber, GradeLevels gradeLevels, string organization )
     : base(InstrDTD.STANDARDIDENTIFIER)
 {
     this.YearCreated = yearCreated;
     this.SubjectArea = subjectArea;
     this.StandardNumber = standardNumber;
     this.GradeLevels = gradeLevels;
     this.Organization = organization;
 }
 ///<summary>Sets the value of the <c>&lt;StandardIdentifier&gt;</c> element.</summary>
 /// <param name="YearCreated">This represents the year that this specific learning standard was created.  This is important to indicate as standards are updated to reflect the appropriate year it was created. This would be assigned and unique to the standard setting body.</param>
 /// <param name="SubjectArea">This represents the subject or content area this learning standard addresses. This would be assigned and unique to the standard setting body.\</param>
 /// <param name="StandardNumber">This is the specific number of the standard.  For example, if the subject is mathematics and this standard is Patterns, Functions and Algebra, this would be StandardNumber 1. This would be assigned and unique to the standard setting body.</param>
 /// <param name="GradeLevels">This represents the grade level(s) this specific learning standard will address. This may be addressed in different ways.  Some states have a grade level that covers several grades and others have just one grade. This would be assigned and unique to the standard setting body.</param>
 /// <param name="Organization">Name of organization represented by the document, i.e., "National Council of Teachers of Mathematics (NCTM)," "Washington," "Seattle School District." This is the name of the organization that has this AlternateIdentificationCode. This should be a text field.</param>
 ///<remarks>
 /// <para>This form of <c>setStandardIdentifier</c> is provided as a convenience method
 /// that is functionally equivalent to the <c>StandardIdentifier</c></para>
 /// <para>Version: 2.6</para>
 /// <para>Since: 2.2</para>
 /// </remarks>
 public void SetStandardIdentifier( int? YearCreated, SubjectArea SubjectArea, string StandardNumber, GradeLevels GradeLevels, string Organization )
 {
     RemoveChild( InstrDTD.LEARNINGSTANDARDITEM_STANDARDIDENTIFIER);
     AddChild( InstrDTD.LEARNINGSTANDARDITEM_STANDARDIDENTIFIER, new StandardIdentifier( YearCreated, SubjectArea, StandardNumber, GradeLevels, Organization ) );
 }