From 0e4cb4e613650de4d9b766afee7624265b04fa0a Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 28 Jul 2017 19:14:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E5=8D=95=E9=80=89=E5=A4=9A?= =?UTF-8?q?=E9=80=89=E9=A2=98=E7=BC=BA=E9=99=B7=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/challenges/_skill_form.html.erb | 6 +++++- app/views/games/_choice_question.html.erb | 2 +- app/views/games/_code_actions.html.erb | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/views/challenges/_skill_form.html.erb b/app/views/challenges/_skill_form.html.erb index b77e62c77..f8d53061e 100644 --- a/app/views/challenges/_skill_form.html.erb +++ b/app/views/challenges/_skill_form.html.erb @@ -21,7 +21,11 @@

    -
  1. 学员为参考答案通过了本阶段的评测时将获得技能,否则不能获得技能
  2. + <% if @st == 0 %> +
  3. 学员为参考答案通过了本阶段的评测时将获得技能,否则不能获得技能
  4. + <% else %> +
  5. 学员答题正确将获得技能,否则不能获得技能
  6. + <% end %>
diff --git a/app/views/games/_choice_question.html.erb b/app/views/games/_choice_question.html.erb index 000f4eeea..fcba26c7d 100644 --- a/app/views/games/_choice_question.html.erb +++ b/app/views/games/_choice_question.html.erb @@ -1,7 +1,7 @@
diff --git a/app/views/games/_code_actions.html.erb b/app/views/games/_code_actions.html.erb index ece5c0a42..207228119 100644 --- a/app/views/games/_code_actions.html.erb +++ b/app/views/games/_code_actions.html.erb @@ -79,6 +79,10 @@ for(var i = 0; i < choice.length; i++){ answer += $(choice[i]).val(); } + if(answer == ""){ + notice_sure_box("答案不能为空!"); + return; + } $("#code_test").html("评测中.."); $.ajax({ type: "post",