From f06a1b5df6e6753960dbb4dd09e559abf00469b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 28 May 2019 17:32:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E9=A2=98=20=E5=89=8D?= =?UTF-8?q?=E7=AB=AF=E5=A2=9E=E5=8A=A0=E9=A2=98=E7=9B=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/exercise/_edit_shixun.html.erb | 5 ++++- app/views/exercise/_exercise_form.html.erb | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/views/exercise/_edit_shixun.html.erb b/app/views/exercise/_edit_shixun.html.erb index b7caa087..9c0f130b 100644 --- a/app/views/exercise/_edit_shixun.html.erb +++ b/app/views/exercise/_edit_shixun.html.erb @@ -1,7 +1,10 @@ <%= form_for("",:url => update_exercise_question_exercise_index_path(:exercise_question => exercise_question.id),:html => {:id => "update_exercise_question_#{exercise_question.id}"}) do |f|%>

实训题

-

<%= exercise_question.shixun.name %>

+

+ + +

  • diff --git a/app/views/exercise/_exercise_form.html.erb b/app/views/exercise/_exercise_form.html.erb index 677e7014..ca3080e4 100644 --- a/app/views/exercise/_exercise_form.html.erb +++ b/app/views/exercise/_exercise_form.html.erb @@ -106,11 +106,15 @@ //修改标题时确定按钮 function edit_poll_question(doc,id,quest_type) { + var name = $.trim($("#poll_questions_name_" + id).val()); var title = $.trim($("#poll_questions_title_" + id).val()); var score = $.trim($("#poll_question_score_"+ id).val()); var standard_ans = $.trim($("#exercise_choice_" + id).val()); + if(name===""){ + notice_box("题目标题"); + } if(title.length == 0 || score.length == 0){ - notice_box("题目标题/分数不能为空"); + notice_box("要求/分数不能为空"); }else if(!/^[1-9][0-9]*$/.test(score)) { notice_box("分数必须是非零开头的数字"); }else if(quest_type !=3 && quest_type !=4 && standard_ans.length == 0) {