Module: Instance::CourseComponentsConcern

Extended by:
ActiveSupport::Concern
Includes:
CourseComponentQueryConcern
Included in:
Instance
Defined in:
app/models/concerns/instance/course_components_concern.rb

Instance Method Summary collapse

Methods included from CourseComponentQueryConcern

#enabled_components, #enabled_components_keys=, #set_component_enabled_boolean, #set_component_enabled_boolean!, #undisableable_components, #user_enabled_components

Instance Method Details

#available_componentsObject


6
7
8
# File 'app/models/concerns/instance/course_components_concern.rb', line 6

def available_components
  @available_components ||= Course::ControllerComponentHost.components
end

#disableable_componentsObject

All components can be disabled at the instance level. If there is a need, can_be_disabled_for_instance? can be implemented for components to prevent some components from ever being disabled.


13
14
15
# File 'app/models/concerns/instance/course_components_concern.rb', line 13

def disableable_components
  available_components
end