diff --git a/app/controllers/bids_controller.rb b/app/controllers/bids_controller.rb index a22012390..ff9b018df 100644 --- a/app/controllers/bids_controller.rb +++ b/app/controllers/bids_controller.rb @@ -230,7 +230,7 @@ class BidsController < ApplicationController case @bid.reward_type when 3 html_title(l(:label_question_student)) - layout_file = 'base_homework' + layout_file = 'base_courses' when 1 layout_file = 'base_bids' else @@ -307,7 +307,7 @@ class BidsController < ApplicationController respond_to do |format| if @bid.reward_type == 3 format.html { - render :layout => 'base_homework' + render :layout => 'base_courses' } elsif @bid.reward_type == 1 format.html { @@ -333,7 +333,7 @@ class BidsController < ApplicationController respond_to do |format| if @bid.reward_type == 3 format.html { - render :layout => 'base_homework' + render :layout => 'base_courses' } elsif @bid.reward_type == 1 format.html { @@ -361,7 +361,7 @@ class BidsController < ApplicationController respond_to do |format| if @bid.reward_type == 3 format.html { - render :layout => 'base_homework' + render :layout => 'base_courses' } elsif @bid.reward_type == 1 format.html { @@ -439,7 +439,7 @@ class BidsController < ApplicationController respond_to do |format| if @bid.reward_type == 3 format.html { - render :layout => 'base_homework' + render :layout => 'base_courses' } elsif @bid.reward_type == 1 format.html { @@ -533,7 +533,7 @@ class BidsController < ApplicationController if @bid.reward_type == 3 format.html { html_title(l(:label_homework_info)) - render :layout => 'base_homework' + render :layout => 'base_courses' } elsif @bid.reward_type == 1 format.html { @@ -565,7 +565,7 @@ class BidsController < ApplicationController respond_to do |format| if @bid.reward_type == 3 format.html { - render :layout => 'base_homework' + render :layout => 'base_courses' } elsif @bid.reward_type == 1 format.html { @@ -879,7 +879,7 @@ class BidsController < ApplicationController #render html to prepare create submit homework find_bid find_bid - render :layout => 'base_homework' + render :layout => 'base_courses' end def add_homework @@ -942,12 +942,12 @@ class BidsController < ApplicationController @homework_type = false end @user = @bid.author - render :layout => 'base_homework' + render :layout => 'base_courses' end def homework_respond @user = @bid.author - render :layout => 'base_homework' + render :layout => 'base_courses' end def more @@ -1070,6 +1070,7 @@ class BidsController < ApplicationController if params[:id] @bid = Bid.find(params[:id], :include => [{:homeworks => :user}]) @user = @bid.author + @course = @bid.courses.first end rescue render_404 diff --git a/app/controllers/homework_attach_controller.rb b/app/controllers/homework_attach_controller.rb index ba7e92467..e563d997d 100644 --- a/app/controllers/homework_attach_controller.rb +++ b/app/controllers/homework_attach_controller.rb @@ -1,5 +1,5 @@ class HomeworkAttachController < ApplicationController - layout "course_base" + layout "base_courses" include CoursesHelper include HomeworkAttachHelper helper :words diff --git a/app/views/bids/_new_homework_form.html.erb b/app/views/bids/_new_homework_form.html.erb index b9aaf7184..eeaaa602e 100644 --- a/app/views/bids/_new_homework_form.html.erb +++ b/app/views/bids/_new_homework_form.html.erb @@ -8,33 +8,33 @@