|
|
@@ -1,5 +1,5 @@
|
|
|
//播放音频图片地址
|
|
|
-var PicInfo1 = {
|
|
|
+var PicInfo = {
|
|
|
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 PicInfo1 = {
|
|
|
}
|
|
|
|
|
|
//本地调用用的资源
|
|
|
-var PicInfo = {
|
|
|
+var PicInfo1 = {
|
|
|
answerPointImgUrl: "../Images/update-answer.png",
|
|
|
yaoshiShowImgUrl: "../Images/yaoshi-show.png",
|
|
|
yaoshiHideImgUrl: "../Images/yaoshi-hide.png",
|
|
|
@@ -1384,6 +1384,64 @@ function getAllAnswer() {
|
|
|
return backupAllAnswer(JSON.stringify(TAnswerList), 1);
|
|
|
}
|
|
|
|
|
|
+//接收学生的作答
|
|
|
+function reviewAnswer(answerJson) {
|
|
|
+ if (answerJson != "" && answerJson) {
|
|
|
+ var answerObj = JSON.parse(answerJson);
|
|
|
+ var selectElement = $(".answer-body[answer-id='" + answerObj.Id + "']");
|
|
|
+ var audioElement = $(selectElement).children(".answer-audio-range").children("img").eq(0);
|
|
|
+ answerObj.IsKY = $(selectElement).attr("answer-isky");//是否是口语试题,0-不是口语题,1-是口语题
|
|
|
+ // 多选
|
|
|
+ if (answerObj.IsKY == "2" && answerObj.Text == "√") {
|
|
|
+ $(".cBoxCls[answer-id='" + answerObj.Id + "']").attr("data-status", "1");
|
|
|
+ }
|
|
|
+ //是否为音频作答(Type:1,文本作答,2-图片,3-语音,4-音频导入)
|
|
|
+ if ((answerObj.Type == 3 || answerObj.Type == 4) && answerObj.AudioUrl != "") {
|
|
|
+ $(selectElement).children(".answer-point-range").hide();
|
|
|
+ $(selectElement).children(".answer-audio-range").css("display", "inline-block");
|
|
|
+ $(selectElement).children(".answer-audio-range").eq(0).children("span").text("作答音频(" + answerObj.AudioLength + "s)");
|
|
|
+ //填充作答内容
|
|
|
+ $(selectElement).attr("answer-text", answerObj.Text);
|
|
|
+ $(".yaoshi[answer-id='" + answerObj.Id + "']").attr("answer-text", answerObj.Text);
|
|
|
+ if (answerObj.Text != "") {
|
|
|
+ answerObj.Text = "(" + answerObj.Text + ")";
|
|
|
+ $(selectElement).children(".answer-text").show();
|
|
|
+ $(selectElement).children(".answer-text").text(answerObj.Text);
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ $(selectElement).children(".answer-text").text("");
|
|
|
+ }
|
|
|
+ //是否之前存在作答音频
|
|
|
+ //$(selectElement).attr("answer-url", answerObj.AudioUrl);
|
|
|
+ $(selectElement).children(".answer-audio-range").attr("answer-url", answerObj.AudioUrl);
|
|
|
+ $(audioElement).attr("src", PicInfo.recordPlayImgUrl);
|
|
|
+ $(selectElement).children(".answer-audio-range").attr("play-status", "0");
|
|
|
+ //独立绑定事件
|
|
|
+ $(audioElement).on("click", function () {
|
|
|
+ recordAudioClick(this, answerObj.Id, answerObj.AudioUrl);
|
|
|
+ });
|
|
|
+ $(selectElement).attr("answer-showanswer", "1").attr("data-astatus", "3");
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ $(selectElement).attr("answer-text", answerObj.Text);//填充作答内容
|
|
|
+ $(".yaoshi[answer-id='" + answerObj.Id + "']").attr("answer-text", answerObj.Text);
|
|
|
+ $(selectElement).children(".answer-audio-range").hide();
|
|
|
+ if (answerObj.Text != "") {
|
|
|
+ $(selectElement).children(".answer-text").show();
|
|
|
+ $(selectElement).children(".answer-point-range").hide();
|
|
|
+ $(selectElement).children(".answer-text").text(answerObj.Text);
|
|
|
+ $(selectElement).attr("answer-showanswer", "1").attr("data-astatus", "3");
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ $(selectElement).children(".answer-text").hide();
|
|
|
+ $(selectElement).children(".answer-text").text("");
|
|
|
+ $(selectElement).children(".answer-point-range").show();
|
|
|
+ $(selectElement).attr("answer-showanswer", "0").attr("data-astatus", "0");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
//回填所有答案,answerJson:所有作答及参考答案List,statusType:0-可作答,1-已提交,2-查看评阅
|
|
|
function backupAllAnswer(answerJson, statusType) {
|
|
|
if (statusType == 0) {
|
|
|
@@ -1414,6 +1472,11 @@ function backupAllAnswer(answerJson, statusType) {
|
|
|
}
|
|
|
//提交直接还原作答现场
|
|
|
var mytext = answerList[index].Text;//我的答案
|
|
|
+ var CheckFlag = (mytext == "√") ? true : false;
|
|
|
+ // 恢复多选处理
|
|
|
+ if (CheckFlag) {
|
|
|
+ $(".cBoxCls[answer-id='" + answerid + "']").attr("data-status", "1");
|
|
|
+ }
|
|
|
$(".yaoshi[answer-id='" + answerid + "']").attr("answer-score", answerList[index].Score); //作答评分
|
|
|
$(".yaoshi[answer-id='" + answerid + "']").attr("answer-text", mytext); // 作答内容
|
|
|
$(".yaoshi[answer-id='" + answerid + "']").attr("answer-comment", "");//评语
|
|
|
@@ -1512,6 +1575,7 @@ function backupAllAnswer(answerJson, statusType) {
|
|
|
}
|
|
|
//提交直接还原作答现场
|
|
|
var mytext = answerList[index].Text;//我的答案
|
|
|
+ var CheckFlag = (mytext == "√") ? true : false;
|
|
|
$(item).attr("answer-score", answerList[index].Score); //作答评分
|
|
|
$(item).attr("answer-text", mytext); // 作答内容
|
|
|
$(item).attr("answer-comment", ""); // 作答内容
|
|
|
@@ -1586,6 +1650,10 @@ function backupAllAnswer(answerJson, statusType) {
|
|
|
$(".underlineContent[yaoshi-flag='" + answerid + "']").html(mytext);
|
|
|
}
|
|
|
}
|
|
|
+ // 恢复多选处理
|
|
|
+ if (CheckFlag) {
|
|
|
+ $(".cBoxCls[answer-id='" + answerid + "']").attr("data-status", "1");
|
|
|
+ }
|
|
|
$(".underlineContent[yaoshi-flag='" + answerid + "']").attr("data-errstatus", "0");
|
|
|
}
|
|
|
}
|
|
|
@@ -2172,6 +2240,14 @@ function recordAudioClick(myobj, id, url) {
|
|
|
$(".ULCBGUse").attr("data-select", "0");
|
|
|
$(myobj).parent(".underlineContent").parent(".ULCBGUse").attr("data-select", "1");
|
|
|
$(myobj).parent().parent("answer-body").addClass("select-answer");
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ var TStr = $("#STIDStr").text() + "=>" + $(myobj).attr("play-status");
|
|
|
+ $("#STIDStr").text(TStr);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
//处理当前按钮的状态
|
|
|
if ($(myobj).attr("play-status") == "0") {
|
|
|
//停止其他作答音频播放
|