From bb99a11c37bf902b345e3addfaa960432d06d677 Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 17 Nov 2015 19:49:33 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/exercise_controller.rb | 7 +++---- app/views/exercise/_new_MC.html.erb | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/controllers/exercise_controller.rb b/app/controllers/exercise_controller.rb index 8fa5e0230..095c57850 100644 --- a/app/controllers/exercise_controller.rb +++ b/app/controllers/exercise_controller.rb @@ -2,7 +2,7 @@ class ExerciseController < ApplicationController layout "base_courses" before_filter :find_exercise_and_course, :only => [:create_exercise_question] - before_filter :find_course, :only => [:index,:new,:create,:student_exercise_list,:edit] + before_filter :find_course, :only => [:index,:new,:student_exercise_list,:edit] def index @is_teacher = User.current.allowed_to?(:as_teacher,@course) @@ -46,7 +46,7 @@ class ExerciseController < ApplicationController :time => Time.now, :end_time => Time.now, :publish_time => Time.now, - :polls_description => "" + :exercise_description => "" } @exercise = Exercise.create option if @exercise @@ -76,7 +76,6 @@ class ExerciseController < ApplicationController end def edit - @exercise = Exercise.find params[:id] respond_to do |format| format.html{render :layout => 'base_courses'} end @@ -113,7 +112,7 @@ class ExerciseController < ApplicationController # 添加题目 # question_type 1:单选 2:多选 3:填空题 def create_exercise_question - question_title = params[:exercise_questions_title].nil? || params[:poll_questions_title].empty? ? l(:label_enter_single_title) : params[:poll_questions_title] + question_title = params[:question_title].nil? || params[:question_title].empty? ? l(:label_enter_single_title) : params[:question_title] option = { :question_title => question_title, :question_type => params[:question_type] || 1, diff --git a/app/views/exercise/_new_MC.html.erb b/app/views/exercise/_new_MC.html.erb index 87cd22d81..de7e9ba31 100644 --- a/app/views/exercise/_new_MC.html.erb +++ b/app/views/exercise/_new_MC.html.erb @@ -9,7 +9,7 @@
- +