Class: LMSGraphQL::Resolvers::Canvas::ListActiveCoursesInAccount

Inherits:
CanvasBaseResolver
  • Object
show all
Defined in:
lib/lms_graphql/resolvers/canvas/list_active_courses_in_account.rb

Instance Method Summary collapse

Instance Method Details

#resolve(account_id:, with_enrollments: nil, enrollment_type: nil, published: nil, completed: nil, blueprint: nil, blueprint_associated: nil, by_teachers: nil, by_subaccounts: nil, hide_enrollmentless_courses: nil, state: nil, enrollment_term_id: nil, search_term: nil, include: nil, sort: nil, order: nil, search_by: nil, starts_before: nil, ends_after: nil, homeroom: nil, get_all: false) ⇒ Object



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/lms_graphql/resolvers/canvas/list_active_courses_in_account.rb', line 29

def resolve(account_id:, with_enrollments: nil, enrollment_type: nil, published: nil, completed: nil, blueprint: nil, blueprint_associated: nil, by_teachers: nil, by_subaccounts: nil, hide_enrollmentless_courses: nil, state: nil, enrollment_term_id: nil, search_term: nil, include: nil, sort: nil, order: nil, search_by: nil, starts_before: nil, ends_after: nil, homeroom: nil, get_all: false)
  result = context[:canvas_api].call("LIST_ACTIVE_COURSES_IN_ACCOUNT").proxy(
    "LIST_ACTIVE_COURSES_IN_ACCOUNT",
    {
      "account_id": ,
      "with_enrollments": with_enrollments,
      "enrollment_type": enrollment_type,
      "published": published,
      "completed": completed,
      "blueprint": blueprint,
      "blueprint_associated": blueprint_associated,
      "by_teachers": by_teachers,
      "by_subaccounts": by_subaccounts,
      "hide_enrollmentless_courses": hide_enrollmentless_courses,
      "state": state,
      "enrollment_term_id": enrollment_term_id,
      "search_term": search_term,
      "include": include,
      "sort": sort,
      "order": order,
      "search_by": search_by,
      "starts_before": starts_before,
      "ends_after": ends_after,
      "homeroom": homeroom            },
    nil,
    get_all,
  )
  get_all ? result : result.parsed_response
end