添加教师端控制评价标准的功能

This commit is contained in:
2024-05-14 13:45:41 +08:00
parent 463d216962
commit 88d0f1d4b6
7 changed files with 58 additions and 71 deletions
+8 -1
View File
@@ -162,8 +162,15 @@ def post_kecheng(request):
tercher_name = request.POST.get("tercher_name")
class_info = request.POST.get("class_info")
class_status = request.POST.get("class_status")
comment_type = request.POST.get("comment_type")
print("===============================")
print(comment_type)
evaluations = comment_type.split(',')
print(evaluations)
default = json.dumps({'type': evaluations})
rengwu = StudentandTercher(add_time=add_time, class_id=class_id, class_name=class_name,
tercher_name=tercher_name, class_info=class_info, class_status=class_status)
tercher_name=tercher_name, class_info=class_info, class_status=class_status, comment_type=default)
rengwu.save()
return http.JsonResponse({'code': CODE_SUCCESS, 'msg': '发布成功'})
else: