Class: AbsorbApi::Course
- Includes:
- Relations
- Defined in:
- lib/absorb_api/course.rb
Instance Attribute Summary collapse
-
#access_date ⇒ Object
Returns the value of attribute access_date.
-
#active_status ⇒ Object
Returns the value of attribute active_status.
-
#allow_course_evaluation ⇒ Object
Returns the value of attribute allow_course_evaluation.
-
#audience ⇒ Object
Returns the value of attribute audience.
-
#category_id ⇒ Object
Returns the value of attribute category_id.
-
#certificate_url ⇒ Object
Returns the value of attribute certificate_url.
-
#company_cost ⇒ Object
Returns the value of attribute company_cost.
-
#company_time ⇒ Object
Returns the value of attribute company_time.
-
#competency_definition_ids ⇒ Object
Returns the value of attribute competency_definition_ids.
-
#description ⇒ Object
Returns the value of attribute description.
-
#editor_ids ⇒ Object
Returns the value of attribute editor_ids.
-
#expire_duration ⇒ Object
Returns the value of attribute expire_duration.
-
#expire_type ⇒ Object
Returns the value of attribute expire_type.
-
#expiry_date ⇒ Object
Returns the value of attribute expiry_date.
-
#external_id ⇒ Object
Returns the value of attribute external_id.
-
#goals ⇒ Object
Returns the value of attribute goals.
-
#id ⇒ Object
Returns the value of attribute id.
-
#learner_cost ⇒ Object
Returns the value of attribute learner_cost.
-
#learner_time ⇒ Object
Returns the value of attribute learner_time.
-
#name ⇒ Object
Returns the value of attribute name.
-
#notes ⇒ Object
Returns the value of attribute notes.
-
#post_enrollment_course_ids ⇒ Object
Returns the value of attribute post_enrollment_course_ids.
-
#prerequisite_course_ids ⇒ Object
Returns the value of attribute prerequisite_course_ids.
-
#prices ⇒ Object
Returns the value of attribute prices.
-
#resource_ids ⇒ Object
Returns the value of attribute resource_ids.
-
#tag_ids ⇒ Object
Returns the value of attribute tag_ids.
-
#vendor ⇒ Object
Returns the value of attribute vendor.
Class Method Summary collapse
-
.enrollments_from_collection(courses, **conditions) ⇒ Object
gets all associated enrollments given a collection of courses all calls are called in parallel.
Methods inherited from Base
Constructor Details
This class inherits a constructor from AbsorbApi::Base
Instance Attribute Details
#access_date ⇒ Object
Returns the value of attribute access_date.
5 6 7 |
# File 'lib/absorb_api/course.rb', line 5 def access_date @access_date end |
#active_status ⇒ Object
Returns the value of attribute active_status.
5 6 7 |
# File 'lib/absorb_api/course.rb', line 5 def active_status @active_status end |
#allow_course_evaluation ⇒ Object
Returns the value of attribute allow_course_evaluation.
5 6 7 |
# File 'lib/absorb_api/course.rb', line 5 def allow_course_evaluation @allow_course_evaluation end |
#audience ⇒ Object
Returns the value of attribute audience.
5 6 7 |
# File 'lib/absorb_api/course.rb', line 5 def audience @audience end |
#category_id ⇒ Object
Returns the value of attribute category_id.
5 6 7 |
# File 'lib/absorb_api/course.rb', line 5 def category_id @category_id end |
#certificate_url ⇒ Object
Returns the value of attribute certificate_url.
5 6 7 |
# File 'lib/absorb_api/course.rb', line 5 def certificate_url @certificate_url end |
#company_cost ⇒ Object
Returns the value of attribute company_cost.
5 6 7 |
# File 'lib/absorb_api/course.rb', line 5 def company_cost @company_cost end |
#company_time ⇒ Object
Returns the value of attribute company_time.
5 6 7 |
# File 'lib/absorb_api/course.rb', line 5 def company_time @company_time end |
#competency_definition_ids ⇒ Object
Returns the value of attribute competency_definition_ids.
5 6 7 |
# File 'lib/absorb_api/course.rb', line 5 def competency_definition_ids @competency_definition_ids end |
#description ⇒ Object
Returns the value of attribute description.
5 6 7 |
# File 'lib/absorb_api/course.rb', line 5 def description @description end |
#editor_ids ⇒ Object
Returns the value of attribute editor_ids.
5 6 7 |
# File 'lib/absorb_api/course.rb', line 5 def editor_ids @editor_ids end |
#expire_duration ⇒ Object
Returns the value of attribute expire_duration.
5 6 7 |
# File 'lib/absorb_api/course.rb', line 5 def expire_duration @expire_duration end |
#expire_type ⇒ Object
Returns the value of attribute expire_type.
5 6 7 |
# File 'lib/absorb_api/course.rb', line 5 def expire_type @expire_type end |
#expiry_date ⇒ Object
Returns the value of attribute expiry_date.
5 6 7 |
# File 'lib/absorb_api/course.rb', line 5 def expiry_date @expiry_date end |
#external_id ⇒ Object
Returns the value of attribute external_id.
5 6 7 |
# File 'lib/absorb_api/course.rb', line 5 def external_id @external_id end |
#goals ⇒ Object
Returns the value of attribute goals.
5 6 7 |
# File 'lib/absorb_api/course.rb', line 5 def goals @goals end |
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/absorb_api/course.rb', line 5 def id @id end |
#learner_cost ⇒ Object
Returns the value of attribute learner_cost.
5 6 7 |
# File 'lib/absorb_api/course.rb', line 5 def learner_cost @learner_cost end |
#learner_time ⇒ Object
Returns the value of attribute learner_time.
5 6 7 |
# File 'lib/absorb_api/course.rb', line 5 def learner_time @learner_time end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/absorb_api/course.rb', line 5 def name @name end |
#notes ⇒ Object
Returns the value of attribute notes.
5 6 7 |
# File 'lib/absorb_api/course.rb', line 5 def notes @notes end |
#post_enrollment_course_ids ⇒ Object
Returns the value of attribute post_enrollment_course_ids.
5 6 7 |
# File 'lib/absorb_api/course.rb', line 5 def post_enrollment_course_ids @post_enrollment_course_ids end |
#prerequisite_course_ids ⇒ Object
Returns the value of attribute prerequisite_course_ids.
5 6 7 |
# File 'lib/absorb_api/course.rb', line 5 def prerequisite_course_ids @prerequisite_course_ids end |
#prices ⇒ Object
Returns the value of attribute prices.
5 6 7 |
# File 'lib/absorb_api/course.rb', line 5 def prices @prices end |
#resource_ids ⇒ Object
Returns the value of attribute resource_ids.
5 6 7 |
# File 'lib/absorb_api/course.rb', line 5 def resource_ids @resource_ids end |
#tag_ids ⇒ Object
Returns the value of attribute tag_ids.
5 6 7 |
# File 'lib/absorb_api/course.rb', line 5 def tag_ids @tag_ids end |
#vendor ⇒ Object
Returns the value of attribute vendor.
5 6 7 |
# File 'lib/absorb_api/course.rb', line 5 def vendor @vendor end |
Class Method Details
.enrollments_from_collection(courses, **conditions) ⇒ Object
gets all associated enrollments given a collection of courses all calls are called in parallel
16 17 18 19 20 21 22 23 24 |
# File 'lib/absorb_api/course.rb', line 16 def self.enrollments_from_collection(courses, **conditions) enrollments = [] AbsorbApi.api.in_parallel do courses.reject { |course| AbsorbApi.configuration.ignored_course_ids.include? course.id }.each do |course| enrollments << AbsorbApi.api.get("courses/#{course.id}/enrollments", conditions) end end enrollments.map { |response| response.body.map { |attrs| CourseEnrollment.new(attrs) } }.flatten end |