fix errors from test/functional/grade_entry_forms_controller_test.rb
fix error from app/controllers/groups_controller.rb
fix TypeError: can't cast Array to text from test/functional/notes_controller_test.rb
fix test/functional/main_controller_test.rb, rescue_action has been removed from rails4
fix error from test/functional/role_switching_test.rb
fix error from test/functional/groups_controller_csv_upload_test.rb
fix deprecation warning from app/controllers/submissions_controller.rb
fix errors from test/functional/results_controller_test.rb
fix houndci warnings
fix houndci warning
rewrite query
fix houndci warning
fix houndci warning
fix houndci warning
fix houndci warning
fix houndci warning
fix houndci warning
Merge pull request #1870 from YusiFan/rails4_new

Fix errors