|
|
@@ -1,5 +1,5 @@
|
|
|
//播放音频图片地址
|
|
|
-var PicInfo = {
|
|
|
+var PicInfo1 = {
|
|
|
answerPointImgUrl: "file:///android_asset/js/update-answer.png",
|
|
|
yaoshiShowImgUrl: "file:///android_asset/js/yaoshi-show.png",
|
|
|
yaoshiHideImgUrl: "file:///android_asset/js/yaoshi-hide.png",
|
|
|
@@ -11,7 +11,7 @@ var PicInfo = {
|
|
|
}
|
|
|
|
|
|
//本地调用用的资源
|
|
|
-var PicInfo1 = {
|
|
|
+var PicInfo = {
|
|
|
answerPointImgUrl: "../Images/update-answer.png",
|
|
|
yaoshiShowImgUrl: "../Images/yaoshi-show.png",
|
|
|
yaoshiHideImgUrl: "../Images/yaoshi-hide.png",
|
|
|
@@ -1118,7 +1118,7 @@ function bindEventYS(sWidthVal, isAStatus, isMAStatus) {
|
|
|
AnswerText += $(this).text();
|
|
|
// 补充嵌套,data-select表示选择状态0表示未选择,1表示已作答选择,2表示未做答选择
|
|
|
if ($(this).parent().children().length > 1) {
|
|
|
- $(this).prop("outerHTML", '<span class="ULCBGUse" data-select="0" style="color: rgb(146, 208, 80);" onselectstart="return true">' + $(this).html() + '</span>');
|
|
|
+ $(this).prop("outerHTML", '<span class="ULCBGUse" data-select="0" onselectstart="return true">' + $(this).html() + '</span>');
|
|
|
}
|
|
|
else {
|
|
|
$(this).parent().addClass("ULCBGUse").attr("data-select", "0");
|
|
|
@@ -1165,7 +1165,7 @@ function bindEventYS(sWidthVal, isAStatus, isMAStatus) {
|
|
|
if ($(item).hasClass('boxQue')) {
|
|
|
$(item).find('.yaoshi').attr('answer-isky', "2");
|
|
|
if ($(item).find(".underlineContent").length == 0) {
|
|
|
- var AddHtmlStr = '<span class="ULCBGUse" data-select="0" style="color: rgb(146, 208, 80);" onselectstart="return true"><u class="underlineContent" yaoshi-flag="' + checkId + '" parent-anid="' + headid + '" data-errstatus="0" showflag="1" style="border-bottom: 1px solid rgb(151, 151, 151); text-decoration: none; white-space: pre-wrap;"> </u></span>';
|
|
|
+ var AddHtmlStr = '<span class="ULCBGUse" data-select="0" onselectstart="return true"><u class="underlineContent" yaoshi-flag="' + checkId + '" parent-anid="' + headid + '" data-errstatus="0" showflag="1" style="border-bottom: 1px solid rgb(151, 151, 151); text-decoration: none; white-space: pre-wrap;"> </u></span>';
|
|
|
$(item).find('.yaoshi').after(AddHtmlStr);
|
|
|
}
|
|
|
}
|
|
|
@@ -1205,7 +1205,7 @@ function bindEventTeaOrignalYS(sWidthVal, isAStatus, isMAStatus) {
|
|
|
AnswerText += $(this).text();
|
|
|
// 补充嵌套
|
|
|
if ($(this).parent().children().length > 1) {
|
|
|
- $(this).prop("outerHTML", '<span class="ULCBGUse" data-select="0" style="color: rgb(146, 208, 80);" onselectstart="return true">' + $(item).html() + '</span>');
|
|
|
+ $(this).prop("outerHTML", '<span class="ULCBGUse" data-select="0" onselectstart="return true">' + $(item).html() + '</span>');
|
|
|
}
|
|
|
else {
|
|
|
$(this).parent().addClass("ULCBGUse").attr("data-select", "0");
|
|
|
@@ -1246,7 +1246,7 @@ function bindEventTeaOrignalYS(sWidthVal, isAStatus, isMAStatus) {
|
|
|
if ($(item).hasClass('boxQue')) {
|
|
|
$(item).find('.yaoshi').attr('answer-isky', "2");
|
|
|
if ($(item).find(".underlineContent").length == 0) {
|
|
|
- var AddHtmlStr = '<span class="ULCBGUse" data-select="0" style="color: rgb(146, 208, 80);" onselectstart="return true"><u class="underlineContent" yaoshi-flag="' + checkId + '" parent-anid="' + headid + '" data-errstatus="0" showflag="1" style="border-bottom: 1px solid rgb(151, 151, 151); text-decoration: none; white-space: pre-wrap;"> </u></span>';
|
|
|
+ var AddHtmlStr = '<span class="ULCBGUse" data-select="0" onselectstart="return true"><u class="underlineContent" yaoshi-flag="' + checkId + '" parent-anid="' + headid + '" data-errstatus="0" showflag="1" style="border-bottom: 1px solid rgb(151, 151, 151); text-decoration: none; white-space: pre-wrap;"> </u></span>';
|
|
|
$(item).find('.yaoshi').after(AddHtmlStr);
|
|
|
}
|
|
|
}
|
|
|
@@ -1288,13 +1288,13 @@ function handleAnswerRange() {
|
|
|
$(item).after("<div class='cBoxCls cBoxCls_" + AnswerID + "' answer-id='" + AnswerID + "' parent-anid='" + AnswerPID + "' data-status='0' onclick='clickCheckBox(" + AnswerID + ")' answer-anstext='" + TAnsText + "'></div>");
|
|
|
}
|
|
|
else {
|
|
|
- // data-astatus控制作答样式(0表示未提交,1表示提交,2表示回显);data-errstatus判断是否作答
|
|
|
+ // data-astatus控制作答样式(0表示未提交,1表示提交,2表示回显);data-errstatus判断是否作答(1表示未做答)
|
|
|
$(item).after("<div class='answer-body' answer-id='" + AnswerID + "' parent-anid='" + AnswerPID + "' answer-isky='" + AnswerIsky + "' answer-showanswer='0' data-astatus='0' data-errstatus='0' mobile-type='" + cTTypeFunc + "' onclick='ClickRecFunc(" + AnswerPID + ")' answer-anstext='" + TAnsText + "'><div class='answer-audio-range'><img class='nextpic' src='" + PicInfo.recordPlayImgUrl + "'/><span class='answer-audio-text'>作答音频</span></div><div class='answer-point-range' mobile-type='" + cTTypeFunc + "'><div class='answer-point-range-div' mobile-type='" + cTTypeFunc + "'><img class='nextpic' src='" + PicInfo.answerPointImgUrl + "'/><span class='answer-point-text'>答题点</span></div></div><buttom class='answer-text' data-astatus='0'></buttom></div>");
|
|
|
}
|
|
|
var info = new Object();
|
|
|
- info.Id = (index).toString();
|
|
|
- info.pId = info.Id;
|
|
|
- info.AnsText = TAnsText;
|
|
|
+ info.Id = AnswerID;
|
|
|
+ info.pId = AnswerPID;
|
|
|
+ info.AnsText = TAnsText; // 标准答案
|
|
|
answerData.push(info);
|
|
|
// 隐藏对应的钥匙和答案
|
|
|
$(item).attr("showflag", "0").css("display", "none").attr("data-status", "0").attr("src", PicInfo.yaoshiHideImgUrl); // 隐藏钥匙
|
|
|
@@ -1447,7 +1447,7 @@ function backupAllAnswer(answerJson, statusType) {
|
|
|
else {
|
|
|
$(".answer-body").remove(); // 删除原有答题点
|
|
|
$(".cBoxCls").remove(); // 删除原有答题点
|
|
|
- $(".underlineContent").attr("data-errstatus", "0");
|
|
|
+ $(".underlineContent").attr("data-errstatus", "1"); // 标记为未做答
|
|
|
ControlFlag = false; // 多选框不可以作答
|
|
|
if (answerJson != "" && answerJson) {
|
|
|
var answerList = JSON.parse(answerJson);
|
|
|
@@ -1500,6 +1500,7 @@ function backupAllAnswer(answerJson, statusType) {
|
|
|
else {
|
|
|
$(".underlineContent[yaoshi-flag='" + answerid + "']").html(mytext);
|
|
|
}
|
|
|
+ $(".underlineContent[yaoshi-flag='" + answerid + "']").attr("data-errstatus", "0"); // 已作答
|
|
|
}
|
|
|
else {
|
|
|
if ($(".underlineContent[yaoshi-flag='" + answerid + "']").find(".answer-audio-range-child").length > 0) {
|
|
|
@@ -1518,6 +1519,7 @@ function backupAllAnswer(answerJson, statusType) {
|
|
|
else {
|
|
|
$(".underlineContent[yaoshi-flag='" + answerid + "']").html(mytext);
|
|
|
}
|
|
|
+ $(".underlineContent[yaoshi-flag='" + answerid + "']").attr("data-errstatus", "0"); // 已作答
|
|
|
}
|
|
|
else {
|
|
|
var AllAnswer = []; // 记录所有标准答案
|
|
|
@@ -1548,7 +1550,6 @@ function backupAllAnswer(answerJson, statusType) {
|
|
|
$(".underlineContent[yaoshi-flag='" + answerid + "']").html(mytext);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
$(".underlineContent[yaoshi-flag='" + answerid + "']").attr("data-errstatus", "0");
|
|
|
}
|
|
|
}
|
|
|
@@ -1565,6 +1566,7 @@ function backupAllAnswer(answerJson, statusType) {
|
|
|
else {
|
|
|
$(".underlineContent[yaoshi-flag='" + answerid + "']").eq(0).html(mytext);
|
|
|
}
|
|
|
+ $(".underlineContent[yaoshi-flag='" + answerid + "']").attr("data-errstatus", "0"); // 已作答
|
|
|
}
|
|
|
else {
|
|
|
if ($(".underlineContent[yaoshi-flag='" + answerid + "']").find(".answer-audio-range-child").length > 0) {
|
|
|
@@ -1584,6 +1586,7 @@ function backupAllAnswer(answerJson, statusType) {
|
|
|
else {
|
|
|
$(".underlineContent[yaoshi-flag='" + answerid + "']").eq(0).html(mytext);
|
|
|
}
|
|
|
+ $(".underlineContent[yaoshi-flag='" + answerid + "']").attr("data-errstatus", "0"); // 已作答
|
|
|
}
|
|
|
else {
|
|
|
var AllAnswer = []; // 记录所有标准答案
|
|
|
@@ -1602,8 +1605,8 @@ function backupAllAnswer(answerJson, statusType) {
|
|
|
else {
|
|
|
$(".underlineContent[yaoshi-flag='" + answerid + "']").eq(i).html(ReArr[i]);
|
|
|
}
|
|
|
- $(".underlineContent[yaoshi-flag='" + answerid + "']").eq(i).attr("data-errstatus", "0");
|
|
|
}
|
|
|
+ $(".underlineContent[yaoshi-flag='" + answerid + "']").attr("data-errstatus", "0"); // 已作答
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
@@ -1814,142 +1817,6 @@ function AddClickEvent() {
|
|
|
var curAlt = $(this).attr("alt");//播放视频地址
|
|
|
playVisiableAudioCallBack(2, $(this).attr("alt"));
|
|
|
});
|
|
|
- //// 绑定答题点
|
|
|
- //$(".answer-body").unbind("click").on("click", function () {
|
|
|
- // var curObj = new Object();
|
|
|
- // curObj.Id = $(this).attr("answer-id");//答题点ID
|
|
|
- // curObj.pId = $(this).attr("parent-anid");//答题点ID
|
|
|
- // curObj.IsKY = $(this).attr("answer-isky");//是否是口语试题,0-不是口语题,1-是口语题
|
|
|
- // curObj.Text = $(this).attr("answer-text");//用户作答内容
|
|
|
- // curObj.Score = $(this).attr("answer-score");//作答评分
|
|
|
- // curObj.AnsText = $(this).attr("answer-anstext");//参考答案
|
|
|
- // curObj.Comment = $(this).attr("answer-comment");//评语
|
|
|
- // // 选中样式渲染
|
|
|
- // $(".checkbox").removeClass("select-answer");
|
|
|
- // $(".answer-body").removeClass("select-answer");
|
|
|
- // if (curObj.pId == undefined || curObj.pId == null || curObj.pId == '' || curObj.pId == 'undefined') {
|
|
|
- // $(".answer-body[answer-id=" + curObj.Id + "]").addClass("select-answer");
|
|
|
- // }
|
|
|
- // else {
|
|
|
- // $(".answer-body[parent-anid=" + curObj.pId + "]").addClass("select-answer");
|
|
|
- // }
|
|
|
- // //已作答,弹出作答答案
|
|
|
- // if ($(this).data("ans-status") == "1") {
|
|
|
- // //移动端添加外部处理
|
|
|
- // onClickAnswerPoint(JSON.stringify(curObj));
|
|
|
- // }
|
|
|
- // else {
|
|
|
- // //移动端添加外部处理,弹出作答操作
|
|
|
- // onClickAnswerPoint(JSON.stringify(curObj));
|
|
|
- // }
|
|
|
- //});
|
|
|
- //// 点击答案切换答案
|
|
|
- //$(".underlineContent").unbind("click").on("click", function () {
|
|
|
- // var showFlag = $(this).attr("showflag");
|
|
|
- // if (showFlag != "1") {
|
|
|
- // return;
|
|
|
- // }
|
|
|
- // var answerID = $(this).attr("yaoshi-flag");
|
|
|
- // var parentID = $(".yaoshi[answer-id='" + answerID + "']").attr("parent-anid");
|
|
|
- // if (parentID == undefined || parentID == null || parentID == "undefined") {
|
|
|
- // parentID = '';
|
|
|
- // }
|
|
|
- // var answerIsky = $(".yaoshi[answer-id='" + answerID + "']").attr("answer-isky");
|
|
|
- // var answerText = $(".yaoshi[answer-id='" + answerID + "']").attr("answer-text");
|
|
|
- // var answerScore = $(".yaoshi[answer-id='" + answerID + "']").attr("answer-score");
|
|
|
- // var answerAnstext = $(".yaoshi[answer-id='" + answerID + "']").attr("answer-anstext");
|
|
|
- // var answerComment = $(".yaoshi[answer-id='" + answerID + "']").attr("answer-comment");
|
|
|
- // var curObj = new Object();
|
|
|
- // curObj.Id = answerID;//答题点ID
|
|
|
- // curObj.pId = parentID;//答题点ID
|
|
|
- // curObj.IsKY = answerIsky;//是否是口语试题,0-不是口语题,1-是口语题
|
|
|
- // curObj.Text = answerText;//用户作答内容
|
|
|
- // curObj.Score = answerScore;//作答评分
|
|
|
- // curObj.AnsText = answerAnstext;//参考答案
|
|
|
- // curObj.Comment = answerComment;//评语
|
|
|
- // // 选中样式渲染
|
|
|
- // var WType = "0";
|
|
|
- // if (answerText == "未做答" || answerText.length==0){
|
|
|
- // WType = "2";
|
|
|
- // }
|
|
|
- // else {
|
|
|
- // WType = "1";
|
|
|
- // }
|
|
|
- // $(".checkbox").removeClass("select-answer");
|
|
|
- // $(".answer-body").removeClass("select-answer");
|
|
|
- // $(".ULCBGUse").attr("data-select", "0");
|
|
|
- // if (curObj.pId == undefined || curObj.pId == null || curObj.pId == '' || curObj.pId == 'undefined') {
|
|
|
- // $(".underlineContent[yaoshi-flag=" + curObj.Id + "]").parent(".ULCBGUse").attr("data-select", WType);
|
|
|
- // }
|
|
|
- // else {
|
|
|
- // $(".underlineContent[parent-anid=" + curObj.pId + "]").parent(".ULCBGUse").attr("data-select", WType);
|
|
|
- // }
|
|
|
- // //已作答,弹出作答答案
|
|
|
- // if ($(this).data("ans-status") == "1") {
|
|
|
- // //移动端添加外部处理
|
|
|
- // onClickAnswerPoint(JSON.stringify(curObj));
|
|
|
- // }
|
|
|
- // else {
|
|
|
- // //移动端添加外部处理,弹出作答操作
|
|
|
- // onClickAnswerPoint(JSON.stringify(curObj));
|
|
|
- // }
|
|
|
- //});
|
|
|
- //// 绑定显示或隐藏答案
|
|
|
- //$(".yaoshi").unbind("click").on("click", function () {
|
|
|
- // var answerid = $(this).attr("answer-id");
|
|
|
- // var datastatus = $(this).attr("data-status");
|
|
|
- // if (datastatus == "0") {
|
|
|
- // // 隐藏->显示
|
|
|
- // $(this).attr("data-status", "1");
|
|
|
- // $(this).attr("src", PicInfo.yaoshiShowImgUrl);
|
|
|
- // $(".underlineContent[yaoshi-flag='" + answerid + "']").attr("showflag", "1");
|
|
|
- // DealCssShowFunc();
|
|
|
- // }
|
|
|
- // else if (datastatus == "1") {
|
|
|
- // // 显示->隐藏
|
|
|
- // $(this).attr("data-status", "0");
|
|
|
- // $(this).attr("src", PicInfo.yaoshiHideImgUrl);
|
|
|
- // $(".underlineContent[yaoshi-flag='" + answerid + "']").attr("showflag", "0");
|
|
|
- // DealCssHiddenFunc();
|
|
|
- // }
|
|
|
- //});
|
|
|
- //// 绑定高亮
|
|
|
- //$(".wordStyle").unbind("click").on("click", function () {
|
|
|
- // var datalstatus = $(this).attr("data-lstatus");
|
|
|
- // if (datalstatus != "1") {
|
|
|
- // return; // 不能点击
|
|
|
- // }
|
|
|
- // //var ThitCode = $(this).attr("hitCode");
|
|
|
- // hitCodeFunc($(this).attr("hitCode"));
|
|
|
- //});
|
|
|
- //$(".phraseStyle").unbind("click").on("click", function () {
|
|
|
- // var datalstatus = $(this).attr("data-lstatus");
|
|
|
- // if (datalstatus != "2") {
|
|
|
- // return; // 不能点击
|
|
|
- // }
|
|
|
- // //var ThitCode = $(this).attr("hitCode");
|
|
|
- // hitCodeFunc($(this).attr("hitCode"));
|
|
|
- //});
|
|
|
- //$(".sentenceStyle").unbind("click").on("click", function () {
|
|
|
- // var datalstatus = $(this).attr("data-lstatus");
|
|
|
- // if (datalstatus != "3") {
|
|
|
- // return; // 不能点击
|
|
|
- // }
|
|
|
- // //var ThitCode = $(this).attr("hitCode");
|
|
|
- // hitCodeFunc($(this).attr("hitCode"));
|
|
|
- //});
|
|
|
- //// 绑定播放作答音频
|
|
|
- //$(".audioImg").unbind("click").on("click", function () {
|
|
|
- // audioPlayClick(this);
|
|
|
- //});
|
|
|
- ////点击播放事件,视频播放
|
|
|
- //$(".videoImg").unbind("click").on("click", function () {
|
|
|
- // $(".select-answer").removeClass("select-answer");
|
|
|
- // $(this).attr("audiourl", "");
|
|
|
- // var curHtml = $(this).parent().find(".videoUrl").html();
|
|
|
- // var curAlt = $(this).attr("alt");//播放视频地址
|
|
|
- // playVisiableAudioCallBack(2, $(this).attr("alt"));
|
|
|
- //});
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -1960,11 +1827,19 @@ function AddClickEvent() {
|
|
|
// sWidthVal:屏幕宽度,isAStatus是否含有作答0表示没有,isMAStatus判断是否是主体课文1表示是
|
|
|
// data高亮知识点
|
|
|
function stuEntryFunc(sWidthVal, isAStatus, isMAStatus, data) {
|
|
|
- //$("#STIDStr").remove();
|
|
|
- ////$(this).after('<div id="STIDStr" style="position:fixed;top:100px;left:10px;width:200px;height:20px;background-color:yellow;color:#000;">display:' + $(this).css("display") + "=>showflag:" + $(this).attr("showflag") + '</div>');
|
|
|
- //$(".yaoshi").eq(0).after('<div id="STIDStr" style="position:fixed;top:100px;left:10px;width:200px;height:auto;background-color:yellow;color:#000;"></div>');
|
|
|
- //var TStr = $("#STIDStr").text() + "=>stuEntryFunc";
|
|
|
- //$("#STIDStr").text(TStr);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ $("#STIDStr").remove();
|
|
|
+ //$(this).after('<div id="STIDStr" style="position:fixed;top:100px;left:10px;width:200px;height:20px;background-color:yellow;color:#000;">display:' + $(this).css("display") + "=>showflag:" + $(this).attr("showflag") + '</div>');
|
|
|
+ $(".yaoshi").eq(0).after('<div id="STIDStr" style="position:fixed;top:100px;left:10px;width:350px;height:auto;background-color:yellow;color:#000;"></div>');
|
|
|
+ var TStr = $("#STIDStr").text() + "=>stuEntryFunc";
|
|
|
+ $("#STIDStr").text(TStr);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
bindEventYS(sWidthVal, isAStatus, isMAStatus);
|
|
|
if (cTTypeFunc == 2) {
|
|
|
TFillData = JSON.parse(data);
|