class AbsorbApi::Course

Attributes

access_date[RW]
active_status[RW]
allow_course_evaluation[RW]
audience[RW]
category_id[RW]
certificate_url[RW]
company_cost[RW]
company_time[RW]
competency_definition_ids[RW]
description[RW]
editor_ids[RW]
expire_duration[RW]
expire_type[RW]
expiry_date[RW]
external_id[RW]
goals[RW]
id[RW]
learner_cost[RW]
learner_time[RW]
name[RW]
notes[RW]
post_enrollment_course_ids[RW]
prerequisite_course_ids[RW]
prices[RW]
resource_ids[RW]
tag_ids[RW]
vendor[RW]

Public Class Methods

enrollments_from_collection(courses, **filters) click to toggle source

gets all associated enrollments given a collection of courses all calls are called in parallel

# File lib/absorb_api/course.rb, line 13
def self.enrollments_from_collection(courses, **filters)
  enrollments = []
  api.in_parallel do
    courses.reject { |course| AbsorbApi.configuration.ignored_course_ids.include? course.id }.each do |course|
      enrollments << api.get("courses/#{course.id}/enrollments", filters)
    end
  end
  enrollments.map { |response| response.body.map { |attrs| CourseEnrollment.new(attrs) } }.flatten
end