diff --git a/app/controllers/bids_controller.rb b/app/controllers/bids_controller.rb index 87879f242..a90ca1d12 100644 --- a/app/controllers/bids_controller.rb +++ b/app/controllers/bids_controller.rb @@ -805,6 +805,7 @@ class BidsController < ApplicationController @homework = @bid @course = Course.find_by_id(params[:course_id]) @course_id = @course.id + render file: 'courses/new_homework', layout: 'base_courses' end end diff --git a/app/models/attachment.rb b/app/models/attachment.rb index fe3ff841c..94f8f7c95 100644 --- a/app/models/attachment.rb +++ b/app/models/attachment.rb @@ -129,7 +129,7 @@ class Attachment < ActiveRecord::Base nil end - def filename=(arg) + def filename=(arg) write_attribute :filename, sanitize_filename(arg.to_s) filename end diff --git a/app/views/courses/new_homework.html.erb b/app/views/courses/new_homework.html.erb index e1fd553b0..ec25cef0f 100644 --- a/app/views/courses/new_homework.html.erb +++ b/app/views/courses/new_homework.html.erb @@ -1,6 +1,6 @@