考试结束时间修改
This commit is contained in:
parent
cf22ffdd1d
commit
684a7250a2
|
@ -6140,7 +6140,9 @@ def apiexamtest(req):
|
|||
a = ExamTest.objects.filter(id=id).values('id', 'num', 'name', 'starttime', 'endtime', 'duration', 'totalscore',
|
||||
'passscore', 'exampaper__total', 'createtime', 'state', 'exampaper__name', 'createuser__name', 'type', 'qrcode')[0]
|
||||
a['notinTime'] = 0
|
||||
if a['starttime'] > datetime.now() or a['endtime'] < datetime.now():
|
||||
if a['starttime'] > datetime.now():
|
||||
a['notinTime'] = 1
|
||||
if 'endtime' in a and a['endtime'] < datetime.now():
|
||||
a['notinTime'] = 1
|
||||
objs = ExamTestDetail.objects.filter(examtest__id=id).order_by('-score').values(
|
||||
'id', 'user__name', 'user__ubelongpart__partname', 'took', 'score', 'ison', 'passcode','starttime')
|
||||
|
|
Loading…
Reference in New Issue