|
|
|
@ -197,12 +197,13 @@ class StudentUpdateProgress(APIView): |
|
|
|
pv.status = ProgressLesson.STATUSES.done |
|
|
|
pv.status = ProgressLesson.STATUSES.done |
|
|
|
pv.finish_date = datetime.datetime.now() |
|
|
|
pv.finish_date = datetime.datetime.now() |
|
|
|
|
|
|
|
|
|
|
|
elif not comment is None: |
|
|
|
elif not comment is None and\ |
|
|
|
|
|
|
|
not pv.progress.progresslesson_set.filter(status=ProgressLesson.STATUSES.wait).exists(): |
|
|
|
pv.status = ProgressLesson.STATUSES.wait |
|
|
|
pv.status = ProgressLesson.STATUSES.wait |
|
|
|
pv.comment_tokens.append(comment) |
|
|
|
pv.comment_tokens.append(comment) |
|
|
|
|
|
|
|
|
|
|
|
else: |
|
|
|
else: |
|
|
|
raise ValueError("Этого никогда не должно происходить, но я уверен, что произойдёт") |
|
|
|
raise ValueError("Вероятней всего тут отшили студента который пытался здать вторую домашку подряд") |
|
|
|
|
|
|
|
|
|
|
|
elif not comment is None: |
|
|
|
elif not comment is None: |
|
|
|
pv.comment_tokens.append(comment) |
|
|
|
pv.comment_tokens.append(comment) |
|
|
|
|