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

Added start of pre grading

parent eacebbcc
No related branches found
No related tags found
1 merge request!17Add pregrading
Pipeline #17802 passed with warnings
......@@ -3,8 +3,6 @@ from zesje.images import guess_dpi
import zesje.database
# 1 - get image
# 2 - get database coordinates of all mc_options in exam
# 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
......@@ -16,9 +14,20 @@ import zesje.database
# coupled feedback cannot be deleted
from zesje.database import Exam
def pregrade(exam_id):
# Get exam pages
from zesje.images import guess_dpi
def pregrade(exam_token, image):
# get image
image = None
exam = Exam.query.get(exam_token=exam_token)
problems = exam.problems
mc_options = [problem.mc_options for problem in problems]
coords = [(cb.x, cb.y) for cb in mc_options]
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