Commit 6710d90f by 陈超

A

parent a3251f92
<include file="__THEME__/public_header_w3g"/> <include file="__THEME__/public_header_w3g" />
<link rel="stylesheet" type="text/css" href="__APP__/css/public.css"> <style type="text/css">
<link rel="stylesheet" type="text/css" href="__APP__/icon/iconfont.css"> /*比较多用到的*/
<link rel="stylesheet" type="text/css" href="__APP__/css/public_header_footer_media.css"> .box {
<link rel="stylesheet" type="text/css" href="__APP__/css/exam_2.0.css"> display: flex;
<div class="cover"></div> display: -webkit-flex;
<div class="min-height-wrap"> align-items: center;
<div class="exam-header"> }
<div class="back-date">
<i class="icon icon-fanhui1" style="display: none;"></i> .boxCn {
<small> display: flex !important;
<php>if($paper['reply_time']){</php> display: -webkit-flex;
<span id="time_hh">-</span>:<span id="time_mm">-</span>:<span id="time_ss">-</span> align-items: center;
<php>}else{</php> justify-content: center !important;
<span>不限时</span> }
<php>}</php>
</small> .flex1 {
</div> flex: 1;
<div class="view-stop"> }
<neq name="Think.get.joinType" value="2"><i class="icon icon-zanting"></i></neq>
<a href="javascript:;" id="show-answer-card"><i class="icon icon-datiqia"></i></a> /*遮罩层*/
</div> .mask {
<neq name="Think.get.joinType" value="2"> position: fixed !important;
<ul class="the-stop"> top: 0;
<li>继续</li> left: 0;
<if condition="$paper['assembly_type'] neq 1"><li id="progressExams">下次再做</li></if> right: 0;
</ul> bottom: 0;
</neq> background: rgba(0, 0, 0, 0.5);
</div> transition: all .3s ease-in-out;
<div class="answer-card"> z-index: 8;
<php>$question_num = 1;</php> }
<volist name="paper_options.options_type" id="options_type">
<php> .popUp {
if(!$paper_options['options_questions_data'][$options_type['question_type']]){ background-color: #FFFFFF;
break; z-index: 10;
} width: 16.875rem;
</php> border-radius: 0.5rem;
<dl> overflow: hidden;
<dt><h6>{$options_type.type_info.question_type_title}</h6></dt> position: fixed;
<dd> top: 50%;
<volist name="paper_options['options_questions_data'][$options_type['question_type']]" id="question"> left: 50%;
<a id="card{$question_num}" <php>if(isset($tempData['content'][$question['exams_question_id']])){ echo "class='on go_question'";}</php> href="javascript:;" data-question_num="{$question_num}" class="go_question">{$question_num}</a> -webkit-transform: translate(-50%, -50%);
<php>$question_num++;</php> -moz-transform: translate(-50%, -50%);
</volist> transform: translate(-50%, -50%);
</dd> }
</dl>
</volist> .popUp_title {
font-family: PingFangSC-Semibold, PingFang SC;
<div class="btns-complete"> font-weight: 600;
<a href="javascript:void(0)" style="color:#fff;" class="assignment">交卷</a> font-size: 1.125rem;
</div> height: 1.5625rem;
</div> line-height: 1.5625rem;
<input type="hidden" name="reply_time" value="{$paper.reply_time|default='0'}" /> margin-top: 0.9375rem;
<form name="answers" method="POST" action="{:U('exams/Index/doHaddleExams')}"> padding: 0 1rem;
<input type="hidden" name="anser_time" id="anser_time" value="{$tempData.anser_time|default='0'}"> box-sizing: border-box;
<input type="hidden" name="exams_mode" value="{$Think.get.joinType|default=1}"> text-align: center;
<input type="hidden" name="paper_id" value="{$paper.exams_paper_id}"> }
<input type="hidden" name="ch_id" value="{$_GET['s_id']}">
<input type="hidden" name="view_url" value="{$_GET['view']}"> .popUp_content {
<input type="hidden" name="is_timeout" value="0"> padding: 1rem 1rem;
<php>if($tempData){</php> box-sizing: border-box;
<input type="hidden" name="exams_users_id" value="{$tempData.exams_users_id}"> text-align: center;
<php>}</php> font-size: 0.875rem;
<input type="hidden" name="paper_options_id" value="{$paper_options.exams_paper_options_id}"> color: #333333;
<div class="static-exam"> }
<php>$question_num = 1;</php>
<volist name="paper_options.options_type" id="options_type"> .popUp_btns {
<switch name="options_type.question_type_key"> border-top: 1px solid #eeeeee;
<case value="radio|judge|multiselect"> }
<!-- 单选题 -->
<volist name="paper_options['options_questions_data'][$options_type['question_type']]" id="question"> .popUp_btn {
<dl id="ex{$question_num}" data-type="{$options_type.question_type_key}" data-question_num="{$question_num}"> flex: 1;
<dt> text-align: center;
<h5><small>{$question_num}</small>/{$paper_options.questions_count}<strong>{$options_type.type_info.question_type_title}</strong></h5> line-height: 3.125rem;
<h3>{$question.content}</h3> height: 3.125rem;
</dt> font-family: PingFangSC-Semibold, PingFang SC;
<dd> font-weight: 600;
<php> font-size: 1rem;
if($tempData){ box-sizing: border-box;
$content = isset($tempData['content'][$question['exams_question_id']]) ? $tempData['content'][$question['exams_question_id']] : []; background-color: #FFFFFF;
}else{ }
$content = [];
} .popUp_btn0 {
</php> color: #999999;
<volist name="question.answer_options" id="answer"> border-right: 1px solid #eeeeee;
<div class="answer_box"> }
<p class="answer_p<php>if(in_array($key,$content)){</php> on<php>}</php>" data-answer="{$key}"><em>{$key}</em>{$answer}</p>
</div> .popUp_btn1 {
</volist> color: #65C000;
<div class="user_answer_hidden"> }
<input type="hidden" name="user_answer[{$question.exams_question_id}]" value="{:implode(',',$content)}">
</div> /*jixu*/
</dd> .stopBox {
<a href="javascript:;" data-question_num="{$question_num}" class="next next_question">下一题</a> width: 100%;
<div class="operation"> position: fixed;
<div class="operation-tit"> top: 50%;
<eq name="isPractice" value="1"><strong><small>查看解析</small><i class="icon icon-arrowDown"></i></strong></eq> left: 50%;
<php>if($question['is_collect'] == 1){</php> z-index: 10;
<b data-question_id="{$question.exams_question_id}" data-action="0"> -webkit-transform: translate(-50%, -50%);
<i class="icon icon-shoucang2" style="color:#F7B659;"></i><small>已收藏</small> -moz-transform: translate(-50%, -50%);
</b> transform: translate(-50%, -50%);
<php>}else{</php> }
<b data-question_id="{$question.exams_question_id}" data-action="1">
<i class="icon icon-area1"></i><span>考点:{$question.exams_point_title}</span> .stopBtn {
<i class="icon icon-shoucang2"></i><small>收藏习题</small> width: 10rem;
</b> height: 3rem;
<php>}</php> line-height: 3rem;
</div> display: block;
<eq name="isPractice" value="1"> margin: 2rem auto;
<!--答案解析--> color: #FFFFFF;
<div class="analysis"> font-size: 1rem;
<div class="analysis-pic"> font-family: PingFangSC-Semibold, PingFang SC;
<h6>正确答案</h6><abbr><volist name="question.answer_true_option" id="answer_true">{$answer_true}</volist></abbr> font-weight: 600;
</div> box-sizing: border-box;
<div class="analysis-txt"> text-align: center;
<h6>解析</h6> border-radius: 1.5rem;
<p>{$question.analyze}</p> }
</div>
</div> .stopBtn_on {
</eq> background-color: #A3E460;
</div> }
</dl>
<php>$question_num++;</php> .stopBtn_out {
</volist> border: 1px solid rgba(204, 204, 204, 1);
</case> }
<case value="completion">
<!-- 填空题 -->
<volist name="paper_options['options_questions_data'][$options_type['question_type']]" id="question">
<dl id="ex{$question_num}" data-type="{$options_type.question_type_key}" data-question_num="{$question_num}">
<dt>
<h5><small>{$question_num}</small>/{$paper_options.questions_count}<strong>{$options_type.type_info.question_type_title}</strong></h5> body {
<h3>{$question.content}</h3> background-color: #fff;
</dt> }
<dd>
<php> .testPaperTop {
if($tempData){ height: 2.25rem;
$content = isset($tempData['content'][$question['exams_question_id']]) ? $tempData['content'][$question['exams_question_id']] : []; padding: 0 0.75rem;
}else{ box-sizing: border-box;
$content = []; border-bottom: 1px solid #F5F5F5;
} width: 100%;
</php> position: fixed;
<volist name="question.answer_true_option" id="answer"> top: 0;
<label>{$i}、<input type="text" class="anserItem" <php>if($content){</php>value="{$content[$i-1]}"<php>}</php> name="user_answer[{$question.exams_question_id}][]"></label> left: 0;
</volist> z-index: 1;
</dd> background-color: #FFFFFF;
<a href="javascript:;" data-question_num="{$question_num}" class="next next_question">下一题</a> }
<div class="operation">
<div class="operation-tit"> .testPaperTop_time {
<eq name="isPractice" value="1"><strong><small>查看解析</small><i class="icon icon-arrowDown"></i></strong></eq> font-size: 0.75rem
<php>if($question['is_collect'] == 1){</php> }
<b data-question_id="{$question.exams_question_id}" data-action="0"><i class="icon icon-shoucang2" style="color:#F7B659;"></i><small>已收藏</small></b>
<php>}else{</php> .testPaperTop_da {
<b data-question_id="{$question.exams_question_id}" data-action="1"> font-size: 0.75rem;
<i class="icon icon-area1"></i><span>考点:{$question.exams_point_title}</span> color: #999999;
<i class="icon icon-shoucang2"></i><small>收藏习题</small> }
</b>
<php>}</php> .testPaperTop_pau {
</div> margin-left: 1.875rem;
<eq name="isPractice" value="1"> width: 0.75rem;
<!--答案解析--> height: 0.75rem;
<div class="analysis"> }
<div class="analysis-pic">
<h5>正确答案</h5> .testPaperBotm {
<ul> padding: 0.75rem 0.75rem 0.75rem;
<volist name="question.answer_true_option" id="answer_true"> box-sizing: border-box;
<li>{$i}、{$answer_true}</li> margin-top: 2.25rem;
</volist> }
</ul>
.testPaperNum {
</div> margin-right: 0.75rem;
<div class="analysis-txt"> color: #999999;
<h6>解析</h6> font-size: 0.75rem;
<p>{$question.analyze}</p> }
</div>
</div> .testPaperLei {
</eq> font-size: 0.75rem;
</div> color: #333333;
</dl> }
<php>$question_num++;</php>
</volist> .testPaperColl {
</case> width: 1rem;
<case value="essays"> height: 1rem;
<!-- 简述题--> }
<volist name="paper_options['options_questions_data'][$options_type['question_type']]" id="question">
<dl id="ex{$question_num}" data-type="{$options_type.question_type_key}" data-question_num="{$question_num}"> .testPaperInfo {
<dt> margin-top: 0.5rem;
<h5><small>{$question_num}</small>/{$paper_options.questions_count}<strong>{$options_type.type_info.question_type_title}</strong></h5> font-size: 1rem;
<h3>{$question.content}</h3> line-height: 1.875rem;
</dt> color: #333333;
<dd> }
<php>
if($tempData){ .testPaperAnswer {
$content = isset($tempData['content'][$question['exams_question_id']]) ? $tempData['content'][$question['exams_question_id']] : []; margin-top: 1rem;
}else{ align-items: flex-start;
$content = []; }
}
</php> .testPaperAnswer_num {
<textarea class="anserItem" name="user_answer[{$question.exams_question_id}]">{$content[0]|default=''}</textarea> display: inline-block;
</dd> width: 2.25rem;
<a href="javascript:;" data-question_num="{$question_num}" class="next next_question">下一题</a> height: 2.25rem;
<div class="operation"> border-radius: 100%;
<div class="operation-tit"> border: 1px solid rgba(163, 228, 96, 1);
<eq name="isPractice" value="1"><strong><small>查看解析</small><i class="icon icon-arrowDown"></i></strong></eq> text-align: center;
<php>if($question['is_collect'] == 1){</php> line-height: 2.25rem;
<b data-question_id="{$question.exams_question_id}" data-action="0"><i class="icon icon-shoucang2" style="color:#F7B659;"></i><small>已收藏</small></b> color: #65C000;
<php>}else{</php> font-family: PingFangSC-Semibold, PingFang SC;
<b data-question_id="{$question.exams_question_id}" data-action="1"> font-weight: 600;
<i class="icon icon-area1"></i><span>考点:{$question.exams_point_title}</span> font-size: 0.875rem;
<i class="icon icon-shoucang2"></i><small>收藏习题</small> margin-right: 0.75rem;
</b> }
<php>}</php>
</div> .testPaperAnswer_numAt {
<eq name="isPractice" value="1"> background-color: #A3E460;
<!--答案解析--> color: #FFFFFF;
<div class="analysis"> }
<div class="analysis-txt">
<h6>解析</h6> .testPaperAnswer_desc {
<p>{$question.analyze}</p> line-height: 1.25rem;
</div> margin: 0;
</div> }
</eq>
</div> .testPaperBtns {
</dl> justify-content: space-between;
<php>$question_num++;</php> padding: 3rem 0.75rem 1rem;
</volist> box-sizing: border-box;
</case> width: 100%;
</switch>
</volist> }
</div>
</form> .testPaperBtn {
</div> width: 10rem;
<include file="__THEME__/public_footer_w3g"/> height: 3rem;
<script src="__APP__/js/public_header_footer_media.js"></script> line-height: 3rem;
<script src="__APP__/js/public_exam_3g.js"></script> text-align: center;
<script type="text/javascript"> border: 1px solid rgba(163, 228, 96, 1);
if("{$_GET['examsresult']}"){ border-radius: 1.5rem;
var re = "{:jiemi($_GET['examsresult'])}", box-sizing: border-box;
ve = "{:jiemi($_GET['view'])}"; font-size: 1rem;
layer.open({ font-family: PingFangSC-Semibold, PingFang SC;
content:'课时考试', font-weight: 600;
btn: ['查看结果', '返回课程'], color: #65C000;
yes:function(){ }
window.location.href = re;
}, .testPaperBtn1 {
no:function(){ color: #FFFFFF;
window.location.href = ve; background: rgba(163, 228, 96, 1);
} }
});
.testPaperJiedaPage {
padding: 0 0.75rem;
box-sizing: border-box;
}
.testPaperJiedaBox {
padding: 1rem 0;
}
.testPaperJiedaBtn {
color: #65C000;
font-size: 0.875rem;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
}
.testPaperJiedaBtn_icon {
margin-left: 0.5rem;
width: 0.75rem;
height: 0.75rem;
}
.testPaperAnswers {
padding: 0.5rem 0 0.25rem;
}
.testPaperAnswer {
padding: 0.5rem 0;
color: #333333;
font-size: 1rem;
margin: 0;
}
.testPaperAnswer_n {
color: #65C000;
} }
.testPaperAnswer_e {
color: red;
}
.testPaperAnswer_infoBox {
padding: 0.1875rem 0.75rem 0.75rem;
box-sizing: border-box;
border-top: 1px solid #f5f5f5;
}
.testPaperAnswer_infoTitle {
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #333333;
font-size: 1rem;
padding: 0.75rem 0 0.75rem 0.75rem;
box-sizing: border-box;
position: relative;
margin: 0;
}
.testPaperAnswer_infoTitle::before {
content: "";
position: absolute;
left: 0;
top: 50%;
width: 4px;
height: 4px;
border-radius: 100%;
background-color: #A3E460;
margin-top: -2px;
}
.testPaperAnswer_info {
color: #333333;
font-size: 1rem;
line-height: 1.875rem;
}
</style>
<div id="app">
<div class="testPaperTop box">
<p class="testPaperTop_time flex1">{{countDown}}</p>
<span class="testPaperTop_da">答题卡</span>
<img @click="onCounting" class="testPaperTop_pau" :src="counting ? '__THEME__/img/pau.png' : '__THEME__/img/right_arrow.png'">
</div>
<div class="testPaperBotm">
<div class="box">
<span class="testPaperNum">{{current}}/{{totalQuestion}}</span>
<p class="testPaperLei flex1">({{currentQuestionTypeName}})</p>
<img v-if="currentQuestion.is_collect == 0" @click="onCollect(1)" class="testPaperColl" src="__THEME__/img/share_unstar.png">
<img v-if="currentQuestion.is_collect == 1" @click="onCollect(0)" class="testPaperColl" src="__THEME__/img/share_star.png">
</div>
<template v-if="showChoiceQuestion">
<div v-html="currentQuestion.content" class="testPaperInfo"></div>
<ul>
<li v-for="(opt, index) in currentOptions" :key="index" class="testPaperAnswer box">
<span @click="onChoose(opt)" class="testPaperAnswer_num" :class="opt.selected ? 'testPaperAnswer_numAt' : ''">{{opt.key}}</span>
<div v-html="opt.value" class="testPaperAnswer_desc flex1" style="margin-top: 0.625rem;"></div>
</li>
</ul>
</template>
</div>
<div v-if="current == 1" class="testPaperBtns boxCn">
<p @click="onNextQuestion" class="testPaperBtn testPaperBtn1" style="width: 15rem;">下一题</p>
</div>
<div v-if="current > 1" class="testPaperBtns box">
<p @click="onPreviousQuestion" class="testPaperBtn">上一题</p>
<p @click="onNextQuestion" class="testPaperBtn testPaperBtn1">下一题 / 交卷</p>
</div>
<!-- 解析 -->
<div class="testPaperJiedaPage">
<div class="box testPaperJiedaBox">
<span @click="expand = !expand" class="testPaperJiedaBtn box">{{expand ? '收起解析' : '查看解析'}}<img class="testPaperJiedaBtn_icon" src="__THEME__/img/openBtn.png"></span>
</div>
<ul v-if="expand" class="testPaperAnswers">
<li class="testPaperAnswer">正确答案:<span v-for="(answer, index) in currentRightOptions" :key="index" class="testPaperAnswer_n">{{answer}}</span></li>
<li class="testPaperAnswer">我的答案:<span v-for="(answer, index) in currentMyOptions" :key="index" :class="answer.right ? 'testPaperAnswer_n' : 'testPaperAnswer_e'">{{answer.key}}</span></li>
</ul>
<div v-if="expand" class="testPaperAnswer_infoBox">
<p class="testPaperAnswer_infoTitle">解析</p>
<div v-html="currentAnalyze" class="testPaperAnswer_info">
</div>
</div>
</div>
<!-- 交卷 -->
<div class="mask" v-if="showFinish">
<div class="popUp">
<p class="popUp_title">提示</p>
<div class="popUp_content">是否交卷并退出考试?</div>
<div class="popUp_btns box">
<span @click="onCancel" class="popUp_btn popUp_btn0 flex1">取消</span>
<span @click="onSure" class="popUp_btn popUp_btn1 flex1">确定</span>
</div>
</div>
</div>
<!-- 暂停 -->
<div class="mask" v-if="showPause">
<div class="stopBox">
<span @click="onContinue" class="stopBtn stopBtn_on">继续</span>
<span @click="onQuit" class="stopBtn stopBtn_out">退出</span>
</div>
</div>
</div>
<include file="__THEME__/public_footer_w3g" />
<script type="text/javascript">
new Vue({
el: "#app",
data: function() {
return {
info: {},
temp: {},
current: 1,
paperOptions: {},
counting: true,
countDown: "00:00:00",
timeConsumed: 0,
expand: false,
showPause: false,
showFinish: false,
//选项
currentOptions: [],
finished: []
}
},
computed: {
totalQuestion: function() {
let count = 0
let data = this.paperOptions.options_questions_data
this.paperOptions.options_type.forEach( r => {
count += data[r.question_type].length
})
return count
},
currentTypeIndex: function() {
let count = 0
let data = this.paperOptions.options_questions_data
let current = this.current
for(let i = 0; i < this.paperOptions.options_type.length; i++) {
let r = this.paperOptions.options_type[i]
let next = count + data[r.question_type].length
if(current > count && current <= next) {
return i
} else {
count = next
}
}
},
currentQuestions: function() {
let optionType = this.currentQuestionType
let questionType = optionType.question_type
let questionData = this.paperOptions.options_questions_data
let questions = questionData[questionType]
return questions
},
currentQuestionType: function() {
return this.paperOptions.options_type[this.currentTypeIndex]
},
currentQuestionTypeName: function() {
return this.currentQuestionType.type_info.question_type_title
},
currentQuestionTypeKey: function() {
return this.currentQuestionType.question_type_key
},
currentQuestion: function() {
let count = 0
let data = this.paperOptions.options_questions_data
let current = this.current
for(let i = 0; i < this.paperOptions.options_type.length; i++) {
let r = this.paperOptions.options_type[i]
let next = count + data[r.question_type].length
if(current > count && current <= next) {
return data[r.question_type][current - count - 1]
} else {
count = next
}
}
},
//选择题答案
currentRightOptions: function() {
return this.currentQuestion.answer_true_option
},
//我的答案
currentMyOptions: function() {
let cur = this.currentRightOptions
return this.currentOptions.filter( r => { return r.selected }).map( r => {
return {
right: cur.hx_indexOf( k => { return k == r.key }) != -1,
key: r.key
}
})
},
//解析
currentAnalyze: function() {
return this.currentQuestion.analyze
},
//Helper
showChoiceQuestion: function() {
let key = this.currentQuestionTypeKey
return key == 'radio' || key == 'multiselect' || key == 'judge'
}
},
created: function() {
this.info = {:json_encode($paper)};
this.temp = {:json_encode($tempData)};
this.paperOptions = {:json_encode($paper_options)};
this.initAnswerMode()
this.doCountDown()
this.saveProgress()
console.log(this.info)
console.log(this.temp)
console.log(this.paperOptions)
},
watch: {
current: function(o, n) {
this.initAnswerMode()
}
},
methods: {
initAnswerMode: function() {
let q = this.currentQuestionTypeKey
switch(q) {
case "radio":
this.currentOptions = []
let Q = this.currentQuestion
let old = this.finished.hx_firstOf( r => { return r.qId == Q.exams_question_id })
for(let k in Q.answer_options) {
let value = Q.answer_options[k]
let select = old ? old.option == k : false
this.currentOptions.push({
key: k,
value: value,
selected: select
})
}
break
}
},
recordData: function() {
return {
paperId: this.info.exams_paper_id,
timeConsumed: this.timeConsumed,
questionIndex: this.current,
finished: this.finished
}
},
doCountDown: function() {
if(!this.counting) {
return
}
if(this.info.reply_time) {
let time = this.info.reply_time * 60 - this.timeConsumed
if(time <= 0) {
this.showFinish = true
} else {
let hours = Math.floor(time / 3600)
let minutes = Math.floor((time % 3600) / 60)
let seconds = Math.round(time % 60)
this.countDown = (hours < 10 ? '0' + hours : hours) + ":" + (minutes < 10 ? '0' + minutes : minutes) + ":" + (seconds < 10 ? '0' + seconds : seconds)
setTimeout(this.doCountDown, 1000)
this.timeConsumed += 1
}
} else {
this.countDown = "不限时"
}
},
onCollect: function(collect) {
let that = this
$.post(U('exams/Index/collect'), {
action: collect,
source_id: that.currentQuestion.exams_question_id
}, function(res) {
let r = JSON.parse(res)
if(r.status == 1) {
that.currentQuestion.is_collect = collect
}
})
},
onChoose: function(opt) {
if(this.currentQuestionTypeKey == 'radio') {
this.currentOptions.forEach( r => {
r.selected = opt.key == r.key
})
}
},
onCounting: function() {
if(this.counting) {
this.counting = false
this.showPause = true
} else {
this.counting = true
this.doCountDown()
}
},
onContinue: function() {
this.showPause = false
this.onCounting()
},
onQuit: function() {
this.showPause = false
this.saveProgress()
},
onCancel: function() {
this.showFinish = false
window.history.back()
},
onSure: function() {
this.showFinish = false
this.submitPaper()
},
onNextQuestion: function() {
if(this.current < this.totalQuestion) {
this.cacheQuestion()
this.current += 1
} else {
let that = this
ui.confirm("已经是最后一题了,是否交卷?", { // 是否返回第一题
yes: function() {
that.submitPaper()
}
})
}
},
onPreviousQuestion: function() {
if(this.current > 1) {
this.current -= 1
}
},
cacheQuestion: function() {
let q = this.currentQuestion
let mode = this.finished.hx_firstOf( r => { return r.qId == q.exams_question_id })
if(mode) {
switch(this.currentQuestionTypeKey) {
case "radio":
let my = this.currentMyOptions
if(my.length > 0) {
mode.option = my[0].key
}
break
}
} else {
switch(this.currentQuestionTypeKey) {
case "radio":
let my = this.currentMyOptions
if(my.length > 0) {
this.finished.push({
qId: q.exams_question_id,
option: my[0].key
})
}
break
}
}
},
//Request
saveProgress: function() {
let that = this
let time = this.info.reply_time * 60 - this.timeConsumed
let param = {
anser_time: this.timeConsumed
exams_mode: 1
paper_id: this.info.paper_id
ch_id: "{$_GET['s_id']}",
view_url: "{$_GET['view']}",
is_timeout: time <= 0 ? 1 : 0,
paper_options_id: this.info.paper_options_id,
user_answer[15]: 'A',
user_answer[14]: 'B',
user_answer[13]: 'B',
user_answer[12]: 'C',
user_answer[11]: 'C',
}
console.log(param)
},
submitPaper: function() {
}
}
})
</script> </script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment