Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixes #426. Changes all uploads to post instead of get.

  • Loading branch information...
commit 7c97ebac62e8a4ad3ea07ed34450b064742d097b 1 parent f586e2a
@Nifter authored
View
2  app/controllers/annotation_categories_controller.rb
@@ -105,7 +105,7 @@ def csv_upload
annotation_category_number = 0
annotation_line = 0
if !annotation_category_list.nil?
- FasterCSV.parse(annotation_category_list) do |row|
+ FasterCSV.parse(annotation_category_list.read) do |row|
next if FasterCSV.generate_line(row).strip.empty?
annotation_line += 1
result = AnnotationCategory.add_by_row(row, @assignment)
View
2  app/models/user.rb
@@ -144,7 +144,7 @@ def self.upload_user_list(user_class, user_list)
# read each line of the file and update classlist
User.transaction do
processed_users = []
- FasterCSV.parse(user_list, :skip_blanks => true, :row_sep => :auto) do |row|
+ FasterCSV.parse(user_list.read, :skip_blanks => true, :row_sep => :auto) do |row|
# don't know how to fetch line so we concat given array
next if FasterCSV.generate_line(row).strip.empty?
if processed_users.include?(row[0])
View
22 config/routes.rb
@@ -48,8 +48,8 @@
collection do
get 'update_positions'
- get 'csv_upload'
- get 'yml_upload'
+ post 'csv_upload'
+ post 'yml_upload'
get 'download_csv'
get 'download_yml'
end
@@ -57,7 +57,7 @@
resources :flexible_criteria do
collection do
- get 'upload'
+ post 'upload'
get 'update_positions'
get 'move_criterion'
get 'download'
@@ -69,7 +69,7 @@
get 'manage'
post 'update_positions'
get 'update_positions'
- get 'upload'
+ post 'upload'
get 'download'
get 'move_criterion'
end
@@ -82,7 +82,7 @@
get 'add_group'
get 'use_another_assignment_groups'
get 'manage'
- get 'csv_upload'
+ post 'csv_upload'
get 'add_csv_group'
get 'download_grouplist'
get 'create_groups_when_students_work_alone'
@@ -158,7 +158,7 @@
resources :graders do
collection do
get 'add_grader_to_grouping'
- get 'csv_upload_grader_groups_mapping'
+ post 'csv_upload_grader_groups_mapping'
post 'csv_upload_grader_criteria_mapping'
get 'download_dialog'
get 'download_grouplist'
@@ -185,10 +185,10 @@
collection do
get 'add_annotation_category'
get 'add_annotation_text'
- get 'csv_upload'
+ post 'csv_upload'
get 'delete_annotation_category'
get 'download'
- get 'yml_upload'
+ post 'yml_upload'
post 'delete_annotation_text'
post 'update_annotation_category'
post 'update_annotation'
@@ -205,7 +205,7 @@
get 'grades'
get 'g_table_paginate'
get 'csv_download'
- get 'csv_upload'
+ post 'csv_upload'
post 'update_grade'
post 'student_interface'
post 'update_grade_entry_students'
@@ -242,14 +242,14 @@
post 'populate'
get 'manage'
get 'download_student_list'
- get 'upload_student_list'
+ post 'upload_student_list'
end
end
resources :tas do
collection do
post 'populate'
- get 'upload_ta_list'
+ post 'upload_ta_list'
get 'download_ta_list'
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.