|
|
|
@ -133,7 +133,7 @@ class TeacherUpdateProgress(APIView): |
|
|
|
res = {"current": ProgressLessonSerializer(pv).data} |
|
|
|
res = {"current": ProgressLessonSerializer(pv).data} |
|
|
|
if pv.status == ProgressLesson.STATUSES.done: |
|
|
|
if pv.status == ProgressLesson.STATUSES.done: |
|
|
|
# TODO: Ассинхроннаязадача для celery |
|
|
|
# TODO: Ассинхроннаязадача для celery |
|
|
|
res['next'] = add_next_lesson(p) |
|
|
|
res['next'] = ProgressLessonSerializer(add_next_lesson(p)).data |
|
|
|
|
|
|
|
|
|
|
|
return Response(res, status=200) |
|
|
|
return Response(res, status=200) |
|
|
|
|
|
|
|
|
|
|
|
@ -163,8 +163,8 @@ class StudentUpdateProgress(APIView): |
|
|
|
lesson_token=lesson_token, |
|
|
|
lesson_token=lesson_token, |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
if not pv.status == ProgressLesson.STATUSES.wait \ |
|
|
|
|
|
|
|
and not pv.status == ProgressLesson.STATUSES.done: |
|
|
|
if not pv.status == ProgressLesson.STATUSES.wait: |
|
|
|
|
|
|
|
|
|
|
|
if pv.checker == p.teacher: |
|
|
|
if pv.checker == p.teacher: |
|
|
|
pv.status = ProgressLesson.STATUSES.wait |
|
|
|
pv.status = ProgressLesson.STATUSES.wait |
|
|
|
|