From 6f4b6a6b67aa397877c9fe86229fe6752e729f67 Mon Sep 17 00:00:00 2001 From: cxt Date: Thu, 26 Nov 2015 10:03:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A1=AB=E7=A9=BA=E9=A2=98=E7=9A=84=E5=80=99?= =?UTF-8?q?=E9=80=89=E7=AD=94=E6=A1=88=E4=B8=8D=E8=83=BD=E4=B8=BA=E7=A9=BA?= =?UTF-8?q?=EF=BC=8C=E9=80=89=E6=8B=A9=E9=A2=98=E5=92=8C=E5=A1=AB=E7=A9=BA?= =?UTF-8?q?=E9=A2=98=E8=87=B3=E5=B0=91=E5=BE=97=E6=9C=89=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E9=80=89=E9=A1=B9=E6=88=96=E4=B8=80=E4=B8=AA=E5=80=99=E9=80=89?= =?UTF-8?q?=E7=AD=94=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/exercise/_edit_single.html.erb | 6 +-- app/views/exercise/_exercise_form.html.erb | 20 +++++++- app/views/exercise/_new_MC.html.erb | 56 +++++++++++----------- app/views/exercise/_new_MCQ.html.erb | 56 +++++++++++----------- app/views/exercise/_new_single.html.erb | 44 +++++++++-------- app/views/exercise/_show_MC.html.erb | 4 +- app/views/exercise/_show_MCQ.html.erb | 4 +- app/views/exercise/_show_single.html.erb | 12 ++--- 8 files changed, 113 insertions(+), 89 deletions(-) diff --git a/app/views/exercise/_edit_single.html.erb b/app/views/exercise/_edit_single.html.erb index d2e4a6f2c..0ce2f0943 100644 --- a/app/views/exercise/_edit_single.html.erb +++ b/app/views/exercise/_edit_single.html.erb @@ -8,7 +8,7 @@ $("#poll_answers_<%=exercise_question.id%>").html("<% exercise_question.exercise_standard_answers.reorder("created_at").each_with_index do |exercise_choice,index| %>" + "
  • " + "" + - "" + + "" + "" + "" + @@ -24,7 +24,7 @@ -
    +
    • @@ -35,7 +35,7 @@ <% exercise_question.exercise_standard_answers.reorder("created_at").each_with_index do |exercise_choice,index| %>
    • - +
    • diff --git a/app/views/exercise/_exercise_form.html.erb b/app/views/exercise/_exercise_form.html.erb index 66558936a..f73c15eca 100644 --- a/app/views/exercise/_exercise_form.html.erb +++ b/app/views/exercise/_exercise_form.html.erb @@ -106,6 +106,24 @@ alert("分数必须是非零开头的数字"); }else if(quest_type !=3 && standard_ans.length == 0) { alert("标准答案不能为空"); + }else if(quest_type ==3) { + var div = $("#poll_answers_" + id); + var candiate_answer = $(".candiate_answer",div); + if(candiate_answer.length > 0) { + for(i=0;i
      -
    • - - - - -
    • -
      -
    • - - - - -
    • -
      -
    • - - - - -
    • -
      -
    • - - - - -
    • +
      +
    • + + + + +
    • +
      +
    • + + + + +
    • +
      +
    • + + + + +
    • +
      +
    • + + + + +
    • +
    • diff --git a/app/views/exercise/_new_MCQ.html.erb b/app/views/exercise/_new_MCQ.html.erb index 0555b997c..c5ae81fd6 100644 --- a/app/views/exercise/_new_MCQ.html.erb +++ b/app/views/exercise/_new_MCQ.html.erb @@ -16,33 +16,35 @@
    • -
    • - - - - -
    • -
      -
    • - - - - -
    • -
      -
    • - - - - -
    • -
      -
    • - - - - -
    • +
      +
    • + + + + +
    • +
      +
    • + + + + +
    • +
      +
    • + + + + +
    • +
      +
    • + + + + +
    • +
    • diff --git a/app/views/exercise/_new_single.html.erb b/app/views/exercise/_new_single.html.erb index 08b31087a..061b053fd 100644 --- a/app/views/exercise/_new_single.html.erb +++ b/app/views/exercise/_new_single.html.erb @@ -8,7 +8,7 @@
    -
    +
    • <% score = exercise.exercise_questions.where("question_type=3").last.nil? ? "": exercise.exercise_questions.where("question_type=3").last.question_score %> @@ -16,26 +16,28 @@
    • -
    • - - - - -
    • -
      -
    • - - - - -
    • -
      -
    • - - - - -
    • +
      +
    • + + + + +
    • +
      +
    • + + + + +
    • +
      +
    • + + + + +
    • +
    diff --git a/app/views/exercise/_show_MC.html.erb b/app/views/exercise/_show_MC.html.erb index f6ee29266..28015a15c 100644 --- a/app/views/exercise/_show_MC.html.erb +++ b/app/views/exercise/_show_MC.html.erb @@ -53,7 +53,7 @@ '
  • '+ ''+ '分'+ - '
  • '+ + '
    '+ '
  • '+ ''+ ''+ @@ -80,7 +80,7 @@ ''+ ''+ ''+ - '
  • '+ + '
    '+ '
    '+ '
  • '+ ''+ diff --git a/app/views/exercise/_show_MCQ.html.erb b/app/views/exercise/_show_MCQ.html.erb index d7a7c2b6d..8135abc51 100644 --- a/app/views/exercise/_show_MCQ.html.erb +++ b/app/views/exercise/_show_MCQ.html.erb @@ -52,7 +52,7 @@ '
  • '+ ''+ '分'+ - '
  • '+ + '
    '+ '
  • '+ ''+ ''+ @@ -79,7 +79,7 @@ ''+ ''+ ''+ - '
  • '+ + '
    '+ '
    '+ '
  • '+ ''+ diff --git a/app/views/exercise/_show_single.html.erb b/app/views/exercise/_show_single.html.erb index a6bb5afe9..d12af23ec 100644 --- a/app/views/exercise/_show_single.html.erb +++ b/app/views/exercise/_show_single.html.erb @@ -35,32 +35,32 @@ ''+ ''+ ''+ - '
    '+ + '
    '+ '
      '+ '
    • '+ ''+ '分'+ - '
    • '+ + '
      '+ '
    • '+ ''+ - ''+ + ''+ ''+ ''+ '
    • '+ '
      '+ '
    • '+ ''+ - ''+ + ''+ ''+ ''+ '
    • '+ '
      '+ '
    • '+ ''+ - ''+ + ''+ ''+ ''+ - '
    • '+ + '
      '+ '
      '+ '
    '+ '
    '+