fix:exam 修改考试试题
This commit is contained in:
parent
f11c87af64
commit
36c3aa845f
|
@ -36,8 +36,8 @@
|
|||
<el-button slot="reference">Excel导入</el-button>
|
||||
</el-popover>
|
||||
<el-button type="primary" icon="el-icon-download" @click="exportQuestions">导出Excel</el-button>
|
||||
<el-button type="primary" v-if="checkPermission(['question_import'])" icon="el-icon-download" @click="handleImport">导入word</el-button>
|
||||
<el-dialog
|
||||
<!-- <el-button type="primary" v-if="checkPermission(['question_import'])" icon="el-icon-download" @click="handleImport">导入word</el-button> -->
|
||||
<!-- <el-dialog
|
||||
:visible.sync="impDialogVisible"
|
||||
title="上传试题"
|
||||
:left="'200px'"
|
||||
|
@ -71,7 +71,7 @@
|
|||
<el-button type="danger" @click="impDialogVisible=false">取消</el-button>
|
||||
<el-button type="primary" @click="impDialogVisible=false">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</el-dialog> -->
|
||||
<el-button type="danger" v-if="checkPermission(['question_batch_delete'])" :disabled="this.selects.length==0" @click="batchDelete()">批量删除</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -527,7 +527,7 @@ class ExamViewSet(CreateUpdateCustomMixin, ModelViewSet):
|
|||
tests = ExamRecord.objects.filter(
|
||||
exam=exam, create_by=request.user)
|
||||
chance_used = tests.count()
|
||||
if chance_used > exam.chance:
|
||||
if chance_used >= exam.chance:
|
||||
raise ParseError('考试机会已用完')
|
||||
if exam.paper:
|
||||
details = []
|
||||
|
|
Loading…
Reference in New Issue