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) {