From e3c5db27c6c39601f77fd9a8b3468293ff535b36 Mon Sep 17 00:00:00 2001 From: jack_rabbit <376168706@qq.com> Date: Fri, 13 Dec 2019 17:23:22 +0800 Subject: [PATCH] 1.放开题型选择 --- WebRoot/WEB-INF/jsp/sunvote/teacher/creat_question.jsp | 10 +++++----- WebRoot/static/js/control-604.js | 39 ++++++++++++++++++++------------------- 2 files changed, 25 insertions(+), 24 deletions(-) diff --git a/WebRoot/WEB-INF/jsp/sunvote/teacher/creat_question.jsp b/WebRoot/WEB-INF/jsp/sunvote/teacher/creat_question.jsp index 4138149..34e56bd 100644 --- a/WebRoot/WEB-INF/jsp/sunvote/teacher/creat_question.jsp +++ b/WebRoot/WEB-INF/jsp/sunvote/teacher/creat_question.jsp @@ -102,7 +102,7 @@
- +
-->
@@ -202,7 +202,7 @@ $("title").html(title); } $(document).ready(function(){ - var _height = $(".page-header").height(); + var _height = $(".header_box").outerHeight()+80; $(".content").css("padding-top",_height); }); diff --git a/WebRoot/static/js/control-604.js b/WebRoot/static/js/control-604.js index d0adcd4..048dba3 100644 --- a/WebRoot/static/js/control-604.js +++ b/WebRoot/static/js/control-604.js @@ -177,20 +177,16 @@ $(function() { } } break; - /* - * case 5: //多选题 $(".content").append('

'+question_num+'、多选题

- *
'); - * for(var i=index_s_2;i<=index_e_2;i++){ - * $(".section-"+answer_index_b+" .question_list").append('
'+i+'、
'); - * for(var j=0;j'+option+''); } } - */ - case 5: // 多选题 + + case 5: //多选题 + $(".content").append('

'+question_num + +'、多选题

'); + for(var i=index_s_2;i<=index_e_2;i++){ + $(".section-"+answer_index_b+" .question_list").append('
'+i+'、
    '); + for(var j=0;j'+option+''); } } + + /*case 5: // 多选题 // $(".content").html(""); $(".content") .append( @@ -224,7 +220,7 @@ $(function() { } } total_score += ((index_e_2 - index_s_2 + 1) * fraction2); - $("#score_all").text(total_score); + $("#score_all").text(total_score);*/ break; } // $(".section-"+answer_index_b).attr("data-score",$(".section-"+answer_index_b).find(".question").length*fraction2); @@ -262,10 +258,15 @@ $(function() { /* 添加试题的确定按钮 */ $("#addQuestion_submit").click(function() { // $("#fast").attr("disabled","disabled"); - var type_2 = 5;// parseInt($("#type").val()) - var index_s_2 = 1;// parseInt($("#index_s_2").val()) - var index_e_2 = parseInt($("#index_s_2").val()); + //var type_2 = 5;// parseInt($("#type").val()) + //var index_s_2 = 1;// parseInt($("#index_s_2").val()) + //var index_e_2 = parseInt($("#index_s_2").val()); // var answer_2=$("#answer_2").val(); + + $("#fast").attr("disabled","disabled"); + var type_2 = parseInt($("#type").val()); + var index_s_2 = 1; + var index_e_2 = parseInt($("#index_s_2").val()); var num_ans_2 = $("#num_ans_2").val(); var fraction2 = parseFloat($("#fraction2").val()); if (isNaN(index_s_2)) { @@ -407,7 +408,7 @@ $(function() { "json" : data }; console.log(data); - ajax_submit(url, dataJson); + //ajax_submit(url, dataJson); } else alert("请添加试题"); }); -- libgit2 0.21.4