diff --git a/app/controllers/homework_common_controller.rb b/app/controllers/homework_common_controller.rb index 474fc31fd..091e2b86b 100644 --- a/app/controllers/homework_common_controller.rb +++ b/app/controllers/homework_common_controller.rb @@ -51,8 +51,14 @@ class HomeworkCommonController < ApplicationController @user = User.current @is_in_course = params[:is_in_course].to_i @course_activity = params[:course_activity].to_i - respond_to do |format| - format.html{render :layout => 'new_base_user'} + if @is_in_course == 1 || @course_activity == 1 + respond_to do |format| + format.html{render :layout => 'base_courses'} + end + else + respond_to do |format| + format.html{render :layout => 'new_base_user'} + end end end diff --git a/app/views/homework_common/edit.html.erb b/app/views/homework_common/edit.html.erb index f95739f26..0c120b7c2 100644 --- a/app/views/homework_common/edit.html.erb +++ b/app/views/homework_common/edit.html.erb @@ -1,4 +1,10 @@ -
+
编辑作业
diff --git a/app/views/users/_user_homework_form.html.erb b/app/views/users/_user_homework_form.html.erb index f23d01d3c..54fe4396b 100644 --- a/app/views/users/_user_homework_form.html.erb +++ b/app/views/users/_user_homework_form.html.erb @@ -194,9 +194,10 @@
-
- <%= select_tag :course_id, options_for_select(get_as_teacher_courses(User.current), homework.course_id), {:class => "InputBox w709",:value => "请选择发布作业的课程"} %> -
+ + <%= hidden_field_tag :course_id, params[:course_id], :value =>homework.course_id %>