|
|
@ -120,8 +120,7 @@ def studnets(request):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@csrf_exempt
|
|
|
|
@csrf_exempt
|
|
|
|
@teacher_required
|
|
|
|
@permission(allowed_roles=["admin", "teacher"])
|
|
|
|
@admin_required
|
|
|
|
|
|
|
|
def add_student(request):
|
|
|
|
def add_student(request):
|
|
|
|
if not request.method == "POST":
|
|
|
|
if not request.method == "POST":
|
|
|
|
return JsonResponse(ResponseUtil.error("request method error!"))
|
|
|
|
return JsonResponse(ResponseUtil.error("request method error!"))
|
|
|
@ -142,8 +141,7 @@ def add_student(request):
|
|
|
|
return JsonResponse(result)
|
|
|
|
return JsonResponse(result)
|
|
|
|
|
|
|
|
|
|
|
|
@csrf_exempt
|
|
|
|
@csrf_exempt
|
|
|
|
@teacher_required
|
|
|
|
@permission(allowed_roles=["admin", "teacher"])
|
|
|
|
@admin_required
|
|
|
|
|
|
|
|
def search_student(request):
|
|
|
|
def search_student(request):
|
|
|
|
currentPage = request.GET.get("currentPage")
|
|
|
|
currentPage = request.GET.get("currentPage")
|
|
|
|
pageSize = request.GET.get("pageSize")
|
|
|
|
pageSize = request.GET.get("pageSize")
|
|
|
@ -173,8 +171,7 @@ def search_student(request):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@csrf_exempt
|
|
|
|
@csrf_exempt
|
|
|
|
@teacher_required
|
|
|
|
@permission(allowed_roles=["admin", "teacher"])
|
|
|
|
@admin_required
|
|
|
|
|
|
|
|
def del_student(request):
|
|
|
|
def del_student(request):
|
|
|
|
if not request.method == "GET":
|
|
|
|
if not request.method == "GET":
|
|
|
|
return JsonResponse(ResponseUtil.error("request method error!"))
|
|
|
|
return JsonResponse(ResponseUtil.error("request method error!"))
|
|
|
@ -189,7 +186,7 @@ def del_student(request):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@csrf_exempt
|
|
|
|
@csrf_exempt
|
|
|
|
@student_required
|
|
|
|
@permission(allowed_roles=["admin", "student", "teacher"])
|
|
|
|
def select_course(request):
|
|
|
|
def select_course(request):
|
|
|
|
if not request.method == "POST":
|
|
|
|
if not request.method == "POST":
|
|
|
|
return JsonResponse(ResponseUtil.error("request method error!"))
|
|
|
|
return JsonResponse(ResponseUtil.error("request method error!"))
|
|
|
@ -212,7 +209,7 @@ def select_course(request):
|
|
|
|
return JsonResponse(ResponseUtil.error(str(E)))
|
|
|
|
return JsonResponse(ResponseUtil.error(str(E)))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@student_required
|
|
|
|
@permission(allowed_roles=["student"])
|
|
|
|
def get_grade(request):
|
|
|
|
def get_grade(request):
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
获取学生成绩
|
|
|
|
获取学生成绩
|
|
|
|