Module: BridgeAPI::Client::Enrollment
- Defined in:
- lib/bridge_api/client/enrollment.rb
Instance Method Summary collapse
- #add_enrollment(course_template_id, params = {}) ⇒ Object
- #delete_enrollment(enrollment_id, params = {}) ⇒ Object
- #get_all_enrollments(course_template_id, params = {}) ⇒ Object
-
#get_learner_enrollments(learner_id, params = {}) ⇒ Object
Get all current enrollments for the learner.
- #reset_enrollment(enrollment_id, params = {}) ⇒ Object
- #update_enrollment(enrollment_id, params = {}) ⇒ Object
- #update_enrollment_due_date(enrollment_id, params = {}) ⇒ Object
Instance Method Details
#add_enrollment(course_template_id, params = {}) ⇒ Object
6 7 8 |
# File 'lib/bridge_api/client/enrollment.rb', line 6 def add_enrollment(course_template_id, params = {}) post("#{API_PATH}#{AUTHOR_PATH}#{COURSE_TEMPLATE_PATH}/#{course_template_id}#{ENROLLMENT_PATH}", params) end |
#delete_enrollment(enrollment_id, params = {}) ⇒ Object
10 11 12 |
# File 'lib/bridge_api/client/enrollment.rb', line 10 def delete_enrollment(enrollment_id, params = {}) delete("#{API_PATH}#{AUTHOR_PATH}#{ENROLLMENT_PATH}/#{enrollment_id}", params) end |
#get_all_enrollments(course_template_id, params = {}) ⇒ Object
18 19 20 |
# File 'lib/bridge_api/client/enrollment.rb', line 18 def get_all_enrollments(course_template_id, params = {}) get("#{API_PATH}#{AUTHOR_PATH}#{COURSE_TEMPLATE_PATH}/#{course_template_id}#{ENROLLMENT_PATH}", params) end |
#get_learner_enrollments(learner_id, params = {}) ⇒ Object
Get all current enrollments for the learner.
31 32 33 |
# File 'lib/bridge_api/client/enrollment.rb', line 31 def get_learner_enrollments(learner_id, params = {}) get("#{API_PATH}#{AUTHOR_PATH}#{LEARNERS_PATH}/#{learner_id}#{LEARNER_ENROLLMENTS}", params) end |
#reset_enrollment(enrollment_id, params = {}) ⇒ Object
26 27 28 |
# File 'lib/bridge_api/client/enrollment.rb', line 26 def reset_enrollment(enrollment_id, params = {}) post("#{API_PATH}#{ADMIN_PATH}#{ENROLLMENT_PATH}/#{enrollment_id}#{RESET_PATH}", params) end |
#update_enrollment(enrollment_id, params = {}) ⇒ Object
14 15 16 |
# File 'lib/bridge_api/client/enrollment.rb', line 14 def update_enrollment(enrollment_id, params = {}) put("#{API_PATH}#{AUTHOR_PATH}#{ENROLLMENT_PATH}/#{enrollment_id}", params) end |
#update_enrollment_due_date(enrollment_id, params = {}) ⇒ Object
22 23 24 |
# File 'lib/bridge_api/client/enrollment.rb', line 22 def update_enrollment_due_date(enrollment_id, params = {}) post("#{API_PATH}#{AUTHOR_PATH}#{ENROLLMENT_PATH}/#{enrollment_id}#{DUE_DATE_PATH}", params) end |