Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
zesje
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Works on my machine
zesje
Commits
26f773a7
Commit
26f773a7
authored
5 years ago
by
Ruben Young On
Browse files
Options
Downloads
Patches
Plain Diff
Added start of pre grading
parent
eacebbcc
No related branches found
Branches containing commit
No related tags found
1 merge request
!17
Add pregrading
Pipeline
#17802
passed with warnings
5 years ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
zesje/pregrader.py
+13
-4
13 additions, 4 deletions
zesje/pregrader.py
with
13 additions
and
4 deletions
zesje/pregrader.py
+
13
−
4
View file @
26f773a7
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment