class LUSI::API::Course::SchemeOfStudy
Attributes
@!attribute [rw] awarding_institution
@return [LUSI::API::Organisation::Unit, nil] the awarding institution for the scheme of study
@!attribute [rw] credit_points
@return [LUSI::API::Course::CreditPoints, nil] the required credit points for the scheme of study
@!attribute [rw] length
@return [LUSI::API::Course::Length, nil] the length of the scheme of study
@!attribute [rw] mode_of_study
@return [LUSI::API::Core::Code, nil] the scheme's mode of study
@!attribute [rw] qualification
@return [String, nil] the qualification awarded by the scheme of study
@!attribute [rw] ucas_course_code
@return [String, nil] the UCAS course code for the scheme of study
Public Class Methods
Initialises a new SchemeOfStudy
instance @param (see LUSI::API::Course::ModuleBase#initialize) @param awarding_institution
[LUSI::API::Organisation::Unit, nil] the default awarding institution @param credit_points
[LUSI::API::Course::CreditPoints, nil] the default credit points @param director_of_studies [Array<LUSI::API::Person::StaffMember>, nil] the default director-of-studies list @param length [LUSI::API::Course::Length] the default scheme of study length @param mode_of_study
[LUSI::API::Core::Code] the default mode of study @param qualification [String, nil] the default qualification @param ucas_course_code
[String, nil] the default UCAS course code @return [void]
LUSI::API::Course::ModuleBase::new
# File lib/lusi_api/course.rb, line 1245 def initialize(xml = nil, lookup = nil, awarding_institution: nil, credit_points: nil, director_of_studies: nil, length: nil, mode_of_study: nil, qualification: nil, ucas_course_code: nil, **kwargs) super(xml, lookup, **kwargs) @awarding_institution = LUSI::API::Core::XML.lookup(xml, lookup, :organisation, 'xmlns:AwardingInstitution/xmlns:Identity', awarding_institution) @credit_points = CreditPoints.new(LUSI::API::Core::XML.xml_at(xml, 'xmlns:CreditPoints', credit_points), lookup) @director_of_studies = LUSI::API::Core::XML.xml(xml, 'xmlns:DirectorOfStudies/xmlns:StaffMember', director_of_studies) { |s| LUSI::API::Person::StaffMember.new(s, lookup) } @length = Length.new(LUSI::API::Core::XML.xml_at(xml, 'xmlns:Length', length), lookup) @mode_of_study = LUSI::API::Core::Code.new(LUSI::API::Core::XML::xml_at(xml, 'xmlns:ModeOfStudy', mode_of_study), lookup) @qualification = LUSI::API::Core::XML.xml_content_at(xml, 'xmlns:Qualification', qualification) @ucas_course_code = LUSI::API::Core::XML.xml_content_at(xml, 'xmlns:UCASCourseCode', ucas_course_code) end
Protected Class Methods
Returns a hash of parameters for the LUSI
API
call @param (see LUSI::API::Course::ModuleBase#get_instance_params) @param awarding_institution_id [String, nil] the awarding institution identity code
LUSI::API::Course::ModuleBase::get_instance_params
# File lib/lusi_api/course.rb, line 1271 def self.get_instance_params(awarding_institution_id: nil, **kwargs) params = super(**kwargs) params[:AwardingInstitutionId] = kwargs.fetch(:awarding_institution_id, '') params end
Public Instance Methods
@see (LUSI::API::Course::ModuleBase#enrolment_lookup_indices
)
# File lib/lusi_api/course.rb, line 1262 def enrolment_lookup_indices [:scheme_staff, :scheme_student] end