BUG修正

This commit is contained in:
nwb 2014-06-27 15:26:42 +08:00
parent 1a4ee62853
commit 99c9f81aea
3 changed files with 3 additions and 2 deletions

View File

@ -805,6 +805,7 @@ class BidsController < ApplicationController
@homework = @bid @homework = @bid
@course = Course.find_by_id(params[:course_id]) @course = Course.find_by_id(params[:course_id])
@course_id = @course.id @course_id = @course.id
render file: 'courses/new_homework', layout: 'base_courses' render file: 'courses/new_homework', layout: 'base_courses'
end end
end end

View File

@ -1,6 +1,6 @@
<h3><%=l(:label_course_new_homework)%></h3> <h3><%=l(:label_course_new_homework)%></h3>
<%= labelled_form_for @homework, :url => {:controller => 'bids', :action => 'create_homework'} do |f| %> <%= labelled_form_for @homework, :url => {:controller => 'bids', :action => 'create_homework',:course_id=>@course.id} do |f| %>
<div class="box tabular"> <div class="box tabular">
<%= render :partial => 'homework_form', :locals => { :f => f } %> <%= render :partial => 'homework_form', :locals => { :f => f } %>
<%= submit_tag l(:button_create), :class => "enterprise" %> <%= submit_tag l(:button_create), :class => "enterprise" %>