Skip to content
Snippets Groups Projects
Commit b397235d authored by Ruben Young On's avatar Ruben Young On
Browse files

Added small correction

parent e78b2cbe
No related branches found
No related tags found
1 merge request!17Add pregrading
Pipeline #17841 failed
......@@ -29,6 +29,7 @@ def pregrade(exam_token, image):
def add_feedback_to_solution(page_img, barcode):
exam = Exam.query.filter(Exam.token == barcode.token).first()
sub = Submission.query.filter(Submission.copy_number == barcode.copy, Submission.exam_id == exam.id).one_or_none()
problems = exam.problems
problems_on_page = list(filter(lambda p: p.widget.page == barcode.page, problems))
......@@ -40,7 +41,7 @@ def add_feedback_to_solution(page_img, barcode):
# check width and so forth
if box_is_filled(box, page_img):
problem.solution.feedback = mc_option.feedback
sub.feedback = mc_option.feedback
db.session.commit()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment