diff --git a/WebRoot/WEB-INF/jsp/sunvote/paper/paper_list2.jsp b/WebRoot/WEB-INF/jsp/sunvote/paper/paper_list2.jsp index 0642cbe..cccefb4 100644 --- a/WebRoot/WEB-INF/jsp/sunvote/paper/paper_list2.jsp +++ b/WebRoot/WEB-INF/jsp/sunvote/paper/paper_list2.jsp @@ -146,7 +146,7 @@ //var remove = new remove(); window.top.remove.init({"title":"删除","func":function(success){ if(success){ - var url = "<%=basePath%>paper/delete.do?PAPER_ID="+Id+"&tm="+new Date().getTime(); + var url = "<%=basePath%>paper/delete.do?PAPER_ID="+Id+"&qingsongkao=true&tm="+new Date().getTime(); window.top.loading.show(); $.get(url,function(data){ tosearch(); diff --git a/WebRoot/WEB-INF/jsp/sunvote/teacher/creat_question.jsp b/WebRoot/WEB-INF/jsp/sunvote/teacher/creat_question.jsp index 3c29b93..d6ec68a 100644 --- a/WebRoot/WEB-INF/jsp/sunvote/teacher/creat_question.jsp +++ b/WebRoot/WEB-INF/jsp/sunvote/teacher/creat_question.jsp @@ -26,6 +26,7 @@

测验时长:45分钟

+

总分:0

diff --git a/WebRoot/static/js/control-604.js b/WebRoot/static/js/control-604.js index 4197b68..d666644 100644 --- a/WebRoot/static/js/control-604.js +++ b/WebRoot/static/js/control-604.js @@ -16,7 +16,7 @@ } } q_num=str.length; - $(".content").append('

第' +answer_index_b +'大题总分: ' + (q_num * fraction)+'分

'); + $(".content").append('

第' +answer_index_b +'大题总分: ' + (q_num * fraction)+'分

'); for(var i=0;i

第' +answer_index_b +'大题总分: ' + ((index_e_2- index_s_2 + 1 )* fraction2)+'分

'); + $(".content").append('

第' +answer_index_b +'大题总分: ' + ((index_e_2- index_s_2 + 1 )* fraction2)+'分

'); for(var i=index_s_2;i<=index_e_2;i++){ questionNUm++; $(".section-" + answer_index_b +" .question_list").append('
'+questionNUm+'、
'); @@ -221,9 +221,7 @@ /*提交保存数据*/ $("#save").click(function(){ var url=URL; - for(i=0;i<$(".section").length;i++){ - score+=parseFloat($(".section").eq(i).attr("data-score")); - } + var data={ title: $(".header_box h1").text(), exam_time: parseInt($("#time").text()), @@ -231,32 +229,32 @@ subject_id: testData.subject_id, grade_id: testData.grade_id, user_id: testData.user_id, - score:score, + score:total_score, questions:[] } if($(".section").length>0){ var rank=0 for(i=0;i<$(".section").length;i++){ - /*rank++; + //rank++; data.questions[i]={ chapter_id: "0", problem_type_id: "0", knowledge_id: "0", - content: $(".section").eq(i).find(".que_name").text(), + // content: $(".section").eq(i).find(".que_name").text(), option_num: "", option_content: "", answer: "", difficulty: "", analysis: "", question_from: "", - score:parseInt($(".section").eq(i).attr("data-fraction")), + score:parseFloat($(".section").eq(i).attr("data-score")), part_score: "", remark: "", rank: rank, no_name: $(".section").eq(i).find(".que_num").text(), questions:[] - }*/ + } for(j=0;j<$(".section").eq(i).find(".question_list").children(".question").length;j++){ rank++; var on_num=$(".section").eq(i).find(".question").eq(j).find(".on").length; @@ -269,7 +267,7 @@ alert("还有试题未编辑答案。"); return; } - data.questions[rank-1]={ + data.questions[i].questions[j]={ chapter_id: "0", problem_type_id: "0", knowledge_id: "0", @@ -370,6 +368,7 @@ function creatHtml(data){ console.log(data); $(".header_box h1").html(data.title); $("#time").html(data.exam_time); + $("#score_all").html(data.score); if(data.questions.length>0){ $(".time").removeAttr("data-target"); @@ -379,7 +378,7 @@ function creatHtml(data){ for(var i=0;i

'+data.questions[i].no_name+''+''+data.questions[i].content+'

'); + $(".content").append('

'+'第'+ (i+1) + '大题总分:'+ data.questions[i].sug_score +''+''+data.questions[i].content+'

'); }else{ if(i == 0){ $(".content").append('
'); diff --git a/resources/dbconfig.properties b/resources/dbconfig.properties index a46dbe0..773eb26 100644 --- a/resources/dbconfig.properties +++ b/resources/dbconfig.properties @@ -1,5 +1,5 @@ #数据源 1 -url:jdbc:mysql://120.78.57.84:3306/education?autoReconnect=true&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8 +url:jdbc:mysql://120.78.57.84:3306/education?autoReconnect=true&failOverReadOnly=false&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8 #url:jdbc:mysql://192.168.0.3:3306/education?autoReconnect=true&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8 driverClassName:com.mysql.jdbc.Driver username:root diff --git a/resources/mybatis1/sunvote/PaperQuestionMapper.xml b/resources/mybatis1/sunvote/PaperQuestionMapper.xml index 783fcd8..654ab64 100644 --- a/resources/mybatis1/sunvote/PaperQuestionMapper.xml +++ b/resources/mybatis1/sunvote/PaperQuestionMapper.xml @@ -102,6 +102,10 @@ from + where 1=1 + + and PAPER_ID = #{PAPER_ID} + @@ -115,6 +119,8 @@ + + delete from diff --git a/resources/mybatis1/sunvote/StudentMapper.xml b/resources/mybatis1/sunvote/StudentMapper.xml index 1505afb..d3b3526 100644 --- a/resources/mybatis1/sunvote/StudentMapper.xml +++ b/resources/mybatis1/sunvote/StudentMapper.xml @@ -84,6 +84,16 @@ ID = #{ID} + + +