Class: LUSI::API::Course::ModuleEnrolment

Inherits:
CourseEnrolment show all
Defined in:
lib/lusi_api/course.rb

Overview

Represents a module enrolment in the LUSI API

Direct Known Subclasses

StaffModuleEnrolment, StudentModuleEnrolment

Instance Attribute Summary collapse

Attributes inherited from Enrolment::EnrolmentBase

#enrolment_role, #identity, #is_current_enrolment, #is_current_identity, #username

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from CourseEnrolment

lookup_index, #lookup_indices, #lookup_key

Methods inherited from Enrolment::EnrolmentBase

get_instance, #lookup_indices, #lookup_key, lusi_ws_path

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, module_identity: nil, **kwargs) ⇒ ModuleEnrolment

Returns a new instance of ModuleEnrolment.

Parameters:

See Also:

  • LUSI::API::Course::ModuleEnrolment.(LUSI(LUSI::API(LUSI::API::Enrolment(LUSI::API::Enrolment::EnrolmentBase(LUSI::API::Enrolment::EnrolmentBase#initialize)


803
804
805
806
807
# File 'lib/lusi_api/course.rb', line 803

def initialize(xml = nil, lookup = nil, module_identity: nil, **kwargs)
  super(xml, lookup, **kwargs)
  @module_identity = EnrolmentIdentity.new(LUSI::API::Core::XML.xml_at(xml, 'xmlns:ModuleIdentity',
                                                                       module_identity), lookup)
end

Instance Attribute Details

#module_identityLUSI::API::Course::EnrolmentIdentity Also known as: course_identity

Returns the enrolment’s module identity.

Returns:



788
789
790
# File 'lib/lusi_api/course.rb', line 788

def module_identity
  @module_identity
end

Class Method Details

.lusi_ws_methodObject

See Also:

  • (LUSI(LUSI::API(LUSI::API::Core(LUSI::API::Core::Endpoint(LUSI::API::Core::Endpoint#lusi_ws_method)


792
793
794
# File 'lib/lusi_api/course.rb', line 792

def self.lusi_ws_method
  'BulkGetModuleEnrolments'
end

.lusi_ws_xml_rootObject

See Also:

  • (LUSI(LUSI::API(LUSI::API::Core(LUSI::API::Core::Endpoint(LUSI::API::Core::Endpoint#lusi_ws_xml_root)


797
798
799
# File 'lib/lusi_api/course.rb', line 797

def self.lusi_ws_xml_root
  'BulkModuleEnrolment'
end