resources :academic_sessions, only: [:index, :show], path: 'academicSessions'
resources :assignments, only: [:index, :show], path: 'lineItems'
resources :categories, except: [:create]
resources :enrollments, only: [:index, :show]
resources :grading_periods, only: [:index, :show], path: 'gradingPeriods'

resources :classes, only: [:index, :show] do
  scope module: :classes do
    resources :assignments, only: [:index, :show], path: 'lineItems'
    resources :students, only: :index
    resources :teachers, only: :index
  end
end

resources :courses, only: [:index, :show] do
  scope module: :courses do
    resources :classes
  end
end

resources :students, only: [:index, :show] do
  scope module: :students do
    resources :classes, only: :index
  end
end

resources :teachers, only: [:index, :show] do
  scope module: :teachers do
    resources :classes, only: :index
  end
end

resources :terms, only: [:index, :show] do
  resources :grading_periods, only: :index, path: 'gradingPeriods'

  scope module: :terms do
    resources :classes, only: :index
  end
end

resources :users, only: [:index, :show] do
  scope module: :users do
    resources :classes, only: :index
  end
end

resources :orgs, only: [:index, :show], controller: :schools
resources :users, only: [:index, :show]

resources :schools, only: [:index, :show] do
  resources :courses, only: :index
  resources :terms, only: :index
  resources :enrollments, only: [:index, :show]
  resources :students, only: [:index, :show]
  resources :teachers, only: [:index, :show]

  resources :classes, only: :index do
    scope module: :classes do
      resources :students, only: :index
      resources :teachers, only: :index
      resources :enrollments, only: :index
    end
  end
end
