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

Added function to add feedback to solution

parent 26f773a7
No related branches found
No related tags found
1 merge request!17Add pregrading
Pipeline #17804 passed with warnings
from zesje.images import guess_dpi
import zesje.database
# 3 - resolution / dpi to convert points to inches to pixels
# 4 - get corner marker keypoints per page
# 5 - optional? determine blank pdf corner markers vs submission corner markers
......@@ -14,10 +9,11 @@ import zesje.database
# coupled feedback cannot be deleted
from zesje.database import Exam
from zesje.database import db, Exam, FeedbackOption
from zesje.images import guess_dpi
def pregrade(exam_token, image):
# get image
image = None
......@@ -32,5 +28,19 @@ def pregrade(exam_token, image):
pass
def add_feedback_to_solution(solution):
problem = solution.problem
for mc_option in problem.mc_options:
box = (mc_option.x, mc_option.y)
# check width and so forth
# if box is filled
if True:
solution.feedback = mc_option.feedback
db.session.commit()
def _locate_checkbox():
pass
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