class LUSI::API::Person::StudentRecord
Attributes
@!attribute [rw] attendance_status
@return [String, nil] the current status of the registration
@!attribute [rw] category
@return [String, nil] the category (type) of registration
@!attribute [rw] college
@return [String, nil] the associated college name
@!attribute [rw] department
@return [LUSI::API::Organisation::Unit, nil] the organisation Unit representing the associated department
@!attribute [rw] entry_date
@return [DateTime, nil] the start date of the scheme of study
@!attribute [rw] expected_completion_date
@return [DateTime, nil] the expected date of completion
@!attribute [rw] external_institution_identity
@return [String, nil] the external institutional identity code for the student registration
@!attribute [rw] full_name_on_certificate
@return [String, nil] the full name to be used on the certificate
@!attribute [rw] identity
@return [String, nil] the institutional identity code for the student registration
@!attribute [rw] leave_details
@return [LUSI::API::Person::LeaveDetails, nil] the student's leaving details, nil if still a current student
@!attribute [rw] modules
@return [Array<LUSI::API::Course::ModuleEnrolment>, nil] an array of associated module enrolments
@!attribute [rw] scheme_of_study
@return [LUSI::API::Course::SchemeOfStudy, nil] the student's scheme (or programme) of study
@!attribute [rw] relationships
@return [Array<LUSI::API::Person::Relationship>, nil] an array of relationships for the student
@!attribute [rw] research_student
@return [Boolean, nil] true if the registration is for a research course, otherwise false
@!attribute [rw] scheme_of_study
@return [LUSI::API::Course::SchemeOfStudy, nil] the student's scheme (or programme) of study
@!attribute [rw] user_account
@return [Array<LUSI::API::Person::UserAccount>, nil] an array of the student's network accounts
@!attribute [rw] year_of_scheme_of_study
@return [Integer, nil] the nominal year of the student's scheme of study
@!attribute [rw] year_of_study
@return [Integer, nil] the current year of study (1 = first year, 2 = second year etc.)
Public Class Methods
Initialises a new StudentRecord
instance @param xml [Nokogiri::XML::Document, Nokogiri::XML::Node] the parsed XML root of the student record @param lookup [LUSI::API::Core::Lookup::LookupService, nil] the lookup service for object resolution @param identity [String, nil] the default institutional registration identity code @param external_institution_identity
[String, nil] the default external institution registration identity code @param category [String, nil] the default registration category (type) @param college [String, nil] the default associated college name @param department [LUSI::API::Organisation::Unit, nil] the default associated department @param attendance_status
[String, nil] the default registration status @param research_student
[Boolean, nil] the default value of the research student indicator flag @param scheme_of_study
[LUSI::API::Course::SchemeOfStudyEnrolment, nil] the default scheme of study enrolment @param programme_of_study
[LUSI::API::Course::SchemeOfStudyEnrolment, nil] synonym for scheme_of_study
@param entry_date
[DateTime, nil] the default start date of the scheme of study @param expected_completion_date
[DateTime, nil] the default expected completion date @param year_of_study
[Integer, nil] the default year of study @param year_of_scheme_of_study
[Integer, nil] the default year of the scheme of study @param modules [Array<LUSI::API::Course::ModuleEnrolment>, nil] the default list of associated modules @param relationships [Array<LUSI::API::Person::Relationship>, nil] the default list of staff relationships @param full_name_on_certificate
[String, nil] the default full certificate name @param leave_details
[LUSI::API::Person::LeaveDetails] the default leaving details @param user_account
[Array<LUSI::API::Person::UserAccount>, nil] the default list of user accounts @return [void]
# File lib/lusi_api/person/student.rb, line 353 def initialize(xml = nil, lookup = nil, identity: nil, external_institution_identity: nil, category: nil, college: nil, department: nil, attendance_status: nil, research_student: nil, programme_of_study: nil, scheme_of_study: nil, entry_date: nil, expected_completion_date: nil, year_of_study: nil, year_of_scheme_of_study: nil, modules: nil, relationships: nil, full_name_on_certificate: nil, leave_details: nil, user_account: nil) scheme_of_study ||= programme_of_study @identity = LUSI::API::Core::XML.xml_content_at(xml, 'xmlns:Identity', identity) @external_institution_identity = LUSI::API::Core::XML.xml_content_at(xml, 'xmlns:ExternalInstitutionIdentity', external_institution_identity) @category = LUSI::API::Core::XML.xml_content_at(xml, 'xmlns:Category', category) @college = LUSI::API::Core::XML.xml_content_at(xml, 'xmlns:College', college) @department = LUSI::API::Core::XML.lookup(xml, lookup, :department, 'xmlns:Department', department) @attendance_status = LUSI::API::Core::XML.xml_content_at(xml, 'xmlns:AttendanceStatus', attendance_status) @research_student = LUSI::API::Core::XML.xml_boolean_at(xml, 'xmlns:ResearchStudent', research_student) @scheme_of_study = LUSI::API::Course::SchemeOfStudyEnrolment.new( LUSI::API::Core::XML.xml_at(xml, 'xmlns:ProgrammeOfStudy', scheme_of_study), lookup) @entry_date = LUSI::API::Core::XML.xml_datetime_at(xml, 'xmlns:EntryDate', entry_date) @expected_completion_date = LUSI::API::Core::XML.xml_datetime_at(xml, 'xmlns:ExpectedCompletionDate', expected_completion_date) @year_of_study = LUSI::API::Core::XML.xml_int_at(xml, 'xmlns:YearOfStudy', year_of_study) @year_of_scheme_of_study = LUSI::API::Core::XML.xml_int_at(xml, 'xmlns:YearOfSchemeOfStudy', year_of_scheme_of_study) @modules = LUSI::API::Core::XML.xml(xml, 'xmlns:Modules/xmlns:Module') { |m| LUSI::API::Course::ModuleEnrolment.new(m, lookup) } @relationships = LUSI::API::Core::XML.xml(xml, 'xmlns:Relationships/xmlns:Relationship', relationships) { |r| Relationship.new(r, lookup) } @full_name_on_certificate = LUSI::API::Core::XML.xml_content_at(xml, 'xmlns:FullNameOnCertificate', full_name_on_certificate) @leave_details = LeaveDetails.new(LUSI::API::Core::XML.xml_at(xml, 'xmlns:LeaveDetails', leave_details), lookup) @user_account = LUSI::API::Core::XML.xml(xml, 'xmlns:UserAccounts/xmlns:UserAccount', user_account) { |a| UserAccount.new(a, lookup) } end
Public Instance Methods
Returns a string representation of the StudentRecord
instance @return [String] the string representation of the instance
# File lib/lusi_api/person/student.rb, line 389 def to_s @identity end