From eb2498c62c6af8f3af92641d6bd5796964ec56cf Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 14 Jan 2015 14:23:41 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=A2=9E=E5=8A=A0=E6=96=B0=E5=A2=9E=E5=8D=95?= =?UTF-8?q?=E9=80=89=E9=A2=98=E3=80=81=E6=96=B0=E5=A2=9E=E9=80=89=E9=A1=B9?= =?UTF-8?q?=E3=80=81=E5=88=A0=E9=99=A4=E9=80=89=E9=A1=B9=E7=AD=89js=202.?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=97=AE=E5=8D=B7layout=E5=A2=9E=E5=8A=A0=20?= =?UTF-8?q?3.=E5=A2=9E=E5=8A=A0=E6=96=B0=E5=A2=9E=E5=8D=95=E9=80=89?= =?UTF-8?q?=E9=A2=98=E7=A1=AE=E5=AE=9A=E6=8C=89=E9=92=AE=E7=9A=84=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E4=BB=A5=E5=8F=8A=E7=9B=B8=E5=85=B3action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/poll_controller.rb | 8 ++-- app/views/poll/_edit_MC.html.erb | 55 +++++++++++------------- app/views/poll/_poll_form.html.erb | 17 ++++++++ app/views/poll/_question_answer.html.erb | 11 +++++ config/routes.rb | 2 +- 5 files changed, 58 insertions(+), 35 deletions(-) create mode 100644 app/views/poll/_question_answer.html.erb diff --git a/app/controllers/poll_controller.rb b/app/controllers/poll_controller.rb index 9177e044b..e1439b7f9 100644 --- a/app/controllers/poll_controller.rb +++ b/app/controllers/poll_controller.rb @@ -54,7 +54,9 @@ class PollController < ApplicationController end def edit - + respond_to do |format| + format.html{render :layout => 'base_courses'} + end end def update @@ -82,8 +84,8 @@ class PollController < ApplicationController end #添加单选题 - def add_mc - + def create_poll_question + a = 1 end private diff --git a/app/views/poll/_edit_MC.html.erb b/app/views/poll/_edit_MC.html.erb index 73d967ca9..492126827 100644 --- a/app/views/poll/_edit_MC.html.erb +++ b/app/views/poll/_edit_MC.html.erb @@ -1,33 +1,26 @@ -