forked from expertiza/expertiza
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroutes.rb
668 lines (602 loc) · 14.7 KB
/
routes.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
Expertiza::Application.routes.draw do
require 'sidekiq/web'
mount Sidekiq::Web => '/sidekiq'
resources :admin, only: [] do
collection do
get :list_super_administrators
get :list_administrators
get :list_instructors
post :create_instructor
get :remove_instructor
post :remove_instructor
get :show_instructor
get :show_administrator
get :show_super_administrator
end
end
resources :advertise_for_partner, only: %i[new create edit update] do
collection do
get :remove
post ':id', action: :update
get :update
get :edit
end
end
resources :advice, only: [] do
collection do
post :save_advice
put :edit_advice
get :edit_advice
end
end
resources :answer
resources :answer_tags, only: [:index] do
collection do
post :create_edit
end
end
resources :assessment360, only: [] do
collection do
get :course_student_grade_summary
get :all_students_all_reviews
get :assignment_grade_summary
get :insure_existence_of
end
end
resources :assignments, except: [:destroy] do
collection do
get :place_assignment_in_course
get :copy
get :toggle_access
get :delayed_mailer
get :list_submissions
get :delete_delayed_mailer
get :remove_assignment_from_course
get :instant_flash
patch :edit
post :delete
end
end
resources :assignment_questionnaire do
collection do
post :create
end
end
resources :bookmarks, except: %i[index show] do
collection do
get :list
post :save_bookmark_rating_score
end
end
resources :content_pages do
collection do
get :list
get ':page_name', action: :view
end
end
resources :controller_actions do
collection do
get :list
post ':id', action: :update
get :new_for
end
end
resources :course, controller: 'courses', only: %i[new create edit update delete] do
collection do
get :toggle_access
get :copy
get :view_teaching_assistants
post :add_ta
get :auto_complete_for_user_name
post :remove_ta
post :edit
post :set_course_fields
post :delete
end
end
resources :duties do
collection do
delete :delete
end
end
resources :eula, only: [] do
collection do
get :accept
get :decline
get :display
end
end
resources :export_file, only: [] do
collection do
get :start
get :export
post :export
post :exportdetails
post :export_advices
put :exporttags
post :exporttags
end
end
put '/tags.csv', to: 'export_file#export_tags'
resources :export_tags, only: [] do
collection do
put :exporttags
post :exporttags
end
end
resources :grades, only: %i[edit update] do
collection do
get :view
get :view_team
get :view_reviewer
get :view_my_scores
get :instructor_review
post :remove_hyperlink
post :save_grade_and_comment_for_submission
end
end
resources :impersonate, only: [] do
collection do
get :start
post :impersonate
end
end
resources :import_file, only: [] do
collection do
get :start
get :show
get :import
post :show
post :import
end
end
resources :institution, except: [:destroy] do
collection do
get :list
post ':id', action: :update
post :delete
end
end
resources :invitations, only: %i[new create] do
collection do
get :cancel
get :accept
get :decline
end
end
resources :join_team_requests do
collection do
post :decline
get :index
get :destroy
get :show
end
end
resources :late_policies
resources :markup_styles do
collection do
get :list
end
end
resources :menu_items do
collection do
get :move_down
get :move_up
get :new_for
get :link
get :list
end
end
resources :lock do
collection do
post :release_lock
end
end
resources :notifications do
collection do
get :run_get_notification
end
end
resources :participants, only: [:destroy] do
collection do
get :add
post :add
get :auto_complete_for_user_name
get :delete
get :list
get :change_handle
get :inherit
get :bequeath_all
get :inherit
get :bequeath_all
post :update_authorizations
post :change_handle
get :view_copyright_grants
end
end
resources :password_retrieval, only: [] do
collection do
get :forgotten
get :reset_password
post :send_password
post :update_password
end
end
resources :profile, only: [] do
collection do
get :edit
post :update
patch :update
end
end
resources :publishing, only: [] do
collection do
get :view
post :update_publish_permissions
post :set_publish_permission
get :grant
get :grant_with_private_key
post :grant_with_private_key
get :set_publish_permission
end
end
resources :questionnaires, only: %i[new create edit update] do
collection do
get :copy
get :select_questionnaire_type
post :select_questionnaire_type
get :toggle_access
get :view
post :add_new_questions
post :save_all_questions
get :delete
post :create_questionnaire
end
end
resources :quiz do
collection do
get :view
end
end
resources :quiz_questionnaires do
collection do
get :edit
get :edit_quiz
get :new
get :new_quiz
get :view
post :update
post :update_quiz
post :update
post :create
post :create_quiz_questionnaire
end
end
resources :author_feedback_questionnaires, controller: :questionnaires
resources :review_questionnaires, controller: :questionnaires
resources :metareview_questionnaires, controller: :questionnaires
resources :teammate_review_questionnaires, controller: :questionnaires
resources :survey_questionnaires, controller: :questionnaires
resources :assignment_survey_questionnaires, controller: :questionnaires
resources :global_survey_questionnaires, controller: :questionnaires
resources :course_survey_questionnaires, controller: :questionnaires
resources :bookmark_rating_questionnaires, controller: :questionnaires
resources :questions do
collection do
get :types
post :delete_questions
post :save_questions
end
end
resources :reports, only: [] do
collection do
post :response_report
get :response_report
end
end
resources :reputation_web_service, only: [] do
collection do
get :client
post :send_post_request
end
end
resources :response, only: %i[new create edit update] do
collection do
get :new_feedback
get :view
get :remove_hyperlink
get :save
get :redirect
get :show_calibration_results_for_student
post :custom_create
get :json
post :send_email
get :author
get :run_get_notification
post :edit
post :delete
end
end
resources :review_bids do
collection do
post :assign_bidding
post :set_priority
post :index
post :run_bidding_algorithm
get :show
end
end
resources :review_mapping, only: [] do
collection do
get :add_calibration
get :list_mappings
get :unsubmit_review
post :add_reviewer
get :select_reviewer
post :add_metareviewer
get :select_metareviewer
post :add_user_to_assignment
post :assign_metareviewer_dynamically
post :automatic_review_mapping
post :automatic_review_mapping_staggered
post :assign_reviewer_dynamically
post :assign_quiz_dynamically
post :start_self_review
post :save_grade_and_comment_for_reviewer
post :delete_reviewer
post :delete_metareview
post :delete_metareviewer
post :delete_all_metareviewers
post :delete_outstanding_reviewers
end
end
resources :roles do
collection do
get :list
post ':id', action: :update
post :update
post :destroy
end
end
resources :sample_reviews
resources :sign_up_sheet, except: %i[index show] do
collection do
get :signup
get :delete_signup
get :add_signup_topics
get :add_signup_topics_staggered
get :delete_signup
get :list
get :signup_topics
get :signup
get :sign_up
get :show_team
get :switch_original_topic_to_approved_suggested_topic
get :team_details
get :intelligent_sign_up
get :intelligent_save
get :signup_as_instructor
get :delete_signup_as_instructor
post :delete_all_topics_for_assignment
post :signup_as_instructor_action
post :set_priority
post :save_topic_deadlines
post :delete_all_selected_topics
end
end
resources :site_controllers do
collection do
get :list
get :new_called
end
end
resources :student_quizzes, only: [:index] do
collection do
post :student_quizzes
post :record_response
get :finished_quiz
get :take_quiz
get :review_questions
end
end
resources :student_review, only: [] do
collection do
get :list
end
end
resources :student_task, only: [] do
collection do
get :list
get :view
put :publishing_rights_update
get :email_reviewers
post :send_email
# added a new route for updating publishing rights
get '/*other', to: redirect('/student_task/list')
end
end
resources :student_task do
collection do
post :update
end
end
resources :course_team do
collection do
get :list
end
end
resources :student_teams, only: %i[create edit update] do
collection do
get :view
#E2351 Added a new route for mentors to view all their teams
get :mentor
get :remove_participant
get :auto_complete_for_user_name
get :edit
post :create
post :update
end
end
resources :submitted_content, only: [:edit] do
collection do
get :download
get :folder_action
get :remove_hyperlink
post :remove_hyperlink
get :submit_file
post :submit_file
post :folder_action
post :submit_hyperlink
get :submit_hyperlink
get :view
end
end
resources :submission_records, only: [:index]
resources :suggestion, only: %i[show new create] do
collection do
get :list
post :submit
post :student_submit
post :update_suggestion
get :student_edit
get :add_comment
get :student_view
end
end
resources :survey_deployment, only: %i[new create] do
collection do
get :list
get :reminder_thread
get :pending_surveys
end
end
resources :system_settings do
collection do
get :list
end
end
resources :teams, only: %i[new create edit update] do
collection do
get :list
post :create_teams
post :inherit
get :delete
get :delete_all
get :bequeath_all
end
end
resources :teams_users, only: %i[new create update] do
collection do
post :list
post :update_duties
get :delete
post :delete_selected
end
end
resources :popup do
collection do
get :reviewer_details_popup
get :team_users_popup
get :view_review_scores_popup
get :self_review_popup
get :author_feedback_popup
end
end
resources :tag_prompts, except: %i[new edit]
resources :track_notifications, only: [:index]
resources :tree_display, only: [] do
collection do
post :list
get :get_folder_contents
post :get_sub_folder_contents
get :session_last_open_tab
get :set_session_last_open_tab
get :goto_courses
get :goto_assignments
get :goto_questionnaires
get :goto_review_rubrics
get :goto_metareview_rubrics
get :goto_teammatereview_rubrics
get :goto_author_feedbacks
get :goto_global_survey
get :goto_surveys
get :goto_course_surveys
get :goto_bookmarkrating_rubrics
get :list
get :drill
get :confirm
end
end
resources :users, constraints: { id: /\d+/ } do
collection do
get :list
post :list
post ':id', action: :update
post :show_if_authorized
get :auto_complete_for_user_name
get :set_anonymized_view
get :keys
delete :destroy
get :edit
get :show
end
end
resources :account_request, constraints: { id: /\d+/ } do
collection do
get :list
post :list
post :list_pending_requested
post :list_pending_requested_finalized
post ':id', action: :update
get :auto_complete_for_user_name
get :set_anonymized_view
get :keys
post :create_requested_user_record
post :create_approved_user
end
end
resources :user_pastebins
resources :versions, only: %i[index show] do
collection do
get :search
end
end
resources :pair_programming, only: [] do
collection do
get :send_invitations
get :accept
get :decline
end
end
resources :badges do
collection do
post :create
get :redirect_to_assignment
get :new
end
end
resources :conference
root to: 'content_pages#view', page_name: 'home'
post :login, to: 'auth#login'
post :logout, to: 'auth#logout'
get 'auth/failure', to: 'content_pages#view'
get '/auth/*path', to: redirect('/')
get '/menu/*name', controller: :menu_items, action: :link
get ':page_name', controller: :content_pages, action: :view, method: :get
post 'impersonate/impersonate', to: 'impersonate#impersonate'
post '/plagiarism_checker_results/:id' => 'plagiarism_checker_comparison#save_results'
get 'instructions/home'
get 'response/', to: 'response#saving'
# get ':controller/service.wsdl', action: 'wsdl'
get 'password_edit/check_reset_url', controller: :password_retrieval, action: :check_reset_url
# get ':controller(/:action(/:id))(.:format)'
unless Rails.env.development?
match '*path' => 'content_pages#view', :via => %i[get post]
end
post '/response_toggle_permission/:id' => 'response#toggle_permission'
post '/sample_reviews/map/:id' => 'sample_reviews#map_to_assignment'
post '/sample_reviews/unmap/:id' => 'sample_reviews#unmap_from_assignment'
post 'student_task/publishing_rights_update', controller: :student_task, action: :publishing_rights_update, method: :put
get 'student_view/flip_view', controller: :student_view, action: :flip_view
# updated route and added specific controller action upon accessing this route
end