Class: LUSI::API::Course::SchemeOfStudy
- Inherits:
-
ModuleBase
- Object
- ModuleBase
- LUSI::API::Course::SchemeOfStudy
- Defined in:
- lib/lusi_api/course.rb
Overview
Represents a scheme (or programme) of study in the LUSI API
Instance Attribute Summary collapse
-
#awarding_institution ⇒ LUSI::API::Organisation::Unit?
The awarding institution for the scheme of study.
-
#credit_points ⇒ LUSI::API::Course::CreditPoints?
The required credit points for the scheme of study.
-
#length ⇒ LUSI::API::Course::Length?
The length of the scheme of study.
-
#mode_of_study ⇒ LUSI::API::Core::Code?
The scheme’s mode of study.
-
#qualification ⇒ String?
The qualification awarded by the scheme of study.
-
#ucas_course_code ⇒ String?
The UCAS course code for the scheme of study.
Attributes inherited from ModuleBase
#category_level, #cohorts, #course_departments, #course_documents, #credit, #delivery_mode, #display_long_title, #display_short_title, #enrolled_students, #external_course_identity, #identity, #identity_class, #learning_hours, #mnemonic, #status, #syllabus_rules, #teaching_institution, #title, #year
Instance Method Summary collapse
- #enrolment_lookup_indices ⇒ Object
-
#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) ⇒ void
constructor
Initialises a new SchemeOfStudy instance.
Methods inherited from ModuleBase
#enrolment_lookup_keys, get_instance, #major_departments
Methods included from LUSI::API::Core::Endpoint
#lusi_ws_endpoint, #lusi_ws_method, #lusi_ws_path, #lusi_ws_xml_root
Constructor Details
#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) ⇒ void
Initialises a new SchemeOfStudy instance
1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 |
# 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 |
Instance Attribute Details
#awarding_institution ⇒ LUSI::API::Organisation::Unit?
Returns the awarding institution for the scheme of study.
1213 1214 1215 |
# File 'lib/lusi_api/course.rb', line 1213 def awarding_institution @awarding_institution end |
#credit_points ⇒ LUSI::API::Course::CreditPoints?
Returns the required credit points for the scheme of study.
1217 1218 1219 |
# File 'lib/lusi_api/course.rb', line 1217 def credit_points @credit_points end |
#length ⇒ LUSI::API::Course::Length?
Returns the length of the scheme of study.
1221 1222 1223 |
# File 'lib/lusi_api/course.rb', line 1221 def length @length end |
#mode_of_study ⇒ LUSI::API::Core::Code?
Returns the scheme’s mode of study.
1225 1226 1227 |
# File 'lib/lusi_api/course.rb', line 1225 def mode_of_study @mode_of_study end |
#qualification ⇒ String?
Returns the qualification awarded by the scheme of study.
1229 1230 1231 |
# File 'lib/lusi_api/course.rb', line 1229 def qualification @qualification end |
#ucas_course_code ⇒ String?
Returns the UCAS course code for the scheme of study.
1233 1234 1235 |
# File 'lib/lusi_api/course.rb', line 1233 def ucas_course_code @ucas_course_code end |
Instance Method Details
#enrolment_lookup_indices ⇒ Object
1262 1263 1264 |
# File 'lib/lusi_api/course.rb', line 1262 def enrolment_lookup_indices [:scheme_staff, :scheme_student] end |