class LUSI::API::Person::StudentRecord

Represents a student record in the LUSI API

Attributes

attendance_status[RW]

@!attribute [rw] attendance_status

@return [String, nil] the current status of the registration
category[RW]

@!attribute [rw] category

@return [String, nil] the category (type) of registration
college[RW]

@!attribute [rw] college

@return [String, nil] the associated college name
department[RW]

@!attribute [rw] department

@return [LUSI::API::Organisation::Unit, nil] the organisation Unit representing the associated department
entry_date[RW]

@!attribute [rw] entry_date

@return [DateTime, nil] the start date of the scheme of study
expected_completion_date[RW]

@!attribute [rw] expected_completion_date

@return [DateTime, nil] the expected date of completion
external_institution_identity[RW]

@!attribute [rw] external_institution_identity

@return [String, nil] the external institutional identity code for the student registration
full_name_on_certificate[RW]

@!attribute [rw] full_name_on_certificate

@return [String, nil] the full name to be used on the certificate
identity[RW]

@!attribute [rw] identity

@return [String, nil] the institutional identity code for the student registration
leave_details[RW]

@!attribute [rw] leave_details

@return [LUSI::API::Person::LeaveDetails, nil] the student's leaving details, nil if still a current student
modules[RW]

@!attribute [rw] modules

@return [Array<LUSI::API::Course::ModuleEnrolment>, nil] an array of associated module enrolments
programme_of_study[RW]

@!attribute [rw] scheme_of_study

@return [LUSI::API::Course::SchemeOfStudy, nil] the student's scheme (or programme) of study
relationships[RW]

@!attribute [rw] relationships

@return [Array<LUSI::API::Person::Relationship>, nil] an array of relationships for the student
research_student[RW]

@!attribute [rw] research_student

@return [Boolean, nil] true if the registration is for a research course, otherwise false
scheme_of_study[RW]

@!attribute [rw] scheme_of_study

@return [LUSI::API::Course::SchemeOfStudy, nil] the student's scheme (or programme) of study
user_account[RW]

@!attribute [rw] user_account

@return [Array<LUSI::API::Person::UserAccount>, nil] an array of the student's network accounts
year_of_scheme_of_study[RW]

@!attribute [rw] year_of_scheme_of_study

@return [Integer, nil] the nominal year of the student's scheme of study
year_of_study[RW]

@!attribute [rw] year_of_study

@return [Integer, nil] the current year of study (1 = first year, 2 = second year etc.)

Public Class Methods

new(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) click to toggle source

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

to_s() click to toggle source

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