2020-09-20 06:24:31 +00:00
|
|
|
Rails.application.routes.draw do
|
|
|
|
locales = Site.find_by(site_active: true).in_use_locales rescue I18n.available_locales
|
|
|
|
scope "(:locale)", locale: Regexp.new(locales.join("|")) do
|
|
|
|
namespace :admin do
|
|
|
|
get 'selected_course_setting' => "selected_courses#setting"
|
|
|
|
resources :selected_courses do
|
|
|
|
collection do
|
|
|
|
get 'toggle_hide' => 'selected_courses#toggle_hide'
|
|
|
|
get 'analysis'
|
|
|
|
get 'analysis_report'
|
|
|
|
get "download_excel"
|
2020-09-20 06:37:35 +00:00
|
|
|
scope ':member_profile_name-:member_profile_uid' do
|
|
|
|
get 'show_assignments'
|
|
|
|
end
|
|
|
|
#delete 'destroy_assignment'
|
|
|
|
post 'create_assignment'
|
|
|
|
scope '(:name-:uid)' do
|
|
|
|
scope ':member_profile_name-:member_profile_uid' do
|
|
|
|
get 'new_assignment'
|
|
|
|
get 'edit_assignment'
|
|
|
|
patch 'update_assignment'
|
|
|
|
put 'update_assignment'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2020-09-20 06:24:31 +00:00
|
|
|
|
|
|
|
resources :members do
|
|
|
|
collection do
|
|
|
|
scope '(:name-:uid)' do
|
|
|
|
resources :selected_courses do
|
|
|
|
collection do
|
|
|
|
get 'frontend_setting' => 'selected_courses#frontend_setting'
|
|
|
|
post 'update_frontend_setting' => 'selected_courses#update_frontend_setting'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
resources :selected_course_semesters
|
|
|
|
resources :selected_course_categories
|
|
|
|
post "selected_course_categories/update_order" => "selected_course_categories#update_order"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|