diff --git a/ratedata.dat b/ratedata.dat index af1baa98..64b66418 100644 Binary files a/ratedata.dat and b/ratedata.dat differ diff --git a/safesite/templates/edulessonaddwj.html b/safesite/templates/edulessonaddwj.html index aec9942d..90ce30a7 100644 --- a/safesite/templates/edulessonaddwj.html +++ b/safesite/templates/edulessonaddwj.html @@ -146,7 +146,7 @@

- 选择文件 + 选择文件 @@ -241,7 +241,7 @@ $("#cate").treegrid("unselect"); }; - var filetypes = [".xls",".txt",".ppt",".doc",".pdf",".dot",".rar",".zip",".docx", ".pptx", ".xlsx"]; + var filetypes = [".xls",".txt",".ppt",".doc",".pdf",".dot",".rar",".zip",".docx", ".pptx", ".xlsx", ".mp4"]; var filepath = target.value; if (filepath) { var isnext = false; diff --git a/safesite/templates/examtestadd.html b/safesite/templates/examtestadd.html index ff11fd55..deb750e8 100644 --- a/safesite/templates/examtestadd.html +++ b/safesite/templates/examtestadd.html @@ -33,7 +33,7 @@

+ data-options="label:'最迟参加',currentText:'今天',closeText:'关闭',showSeconds: false,required:true" />
+ data-options="label:'考试结束',currentText:'今天',closeText:'关闭',showSeconds: false,required:true" />
0).values('user__ubelongpart__partid','user__ubelongpart__partname').annotate(totaltest=Count('user__ubelongpart__partid'),avgscore=Avg('score'),totaluser=Count('user__userid')) + i['avgscore'] = round(i['totalscore']/i['testnum'],1) + orgsCal = allexamtestdetail.filter(score__gt=0).values('user__ubelongpart__partid','user__ubelongpart__partname').annotate(totaltest=Count('user__ubelongpart__partid'),avgscore=Avg('score')).order_by('-totaltest','-avgscore') + allattenduser = allexamtestdetail.values_list('user__userid', flat=True) + orgsCallist = list(orgsCal) + for i in orgsCallist: + users = User.objects.filter(ubelongpart__partid=i['user__ubelongpart__partid']) + usersattend = users.filter(userid__in=allattenduser) + i['totaluser'] = usersattend.count() + i['avgscore'] = round(i['avgscore'],1) with open('ratedata.dat','wb') as f: - pickle.dump({'total':total,'rows':objslist,'rows2':list(orgsCal),'updatetime':datetime.now().strftime('%Y-%m-%d %H:%M')},f) + pickle.dump({'total':total,'rows':objslist,'rows2':orgsCallist,'updatetime':datetime.now().strftime('%Y-%m-%d %H:%M')},f) return JsonResponse({"code": 1})