Skip to content

Commit b146c99

Browse files
committed
Save form code column between name and questions
Resolves #25
1 parent 8e5ac36 commit b146c99

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

code/data_exporting.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
Field.LAST_NAME: "Last Name",
1515
Field.FIRST_NAME: "First Name",
1616
Field.MIDDLE_NAME: "Middle Name",
17+
Field.TEST_FORM_CODE: "Test Form Code",
1718
Field.STUDENT_ID: "Student ID",
1819
Field.COURSE_ID: "Course ID",
19-
Field.TEST_FORM_CODE: "Test Form Code",
2020
VirtualField.SCORE: "Total Score (%)",
2121
VirtualField.POINTS: "Total Points"
2222
}

code/grid_info.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ class Field(enum.Enum):
1515
LAST_NAME = enum.auto()
1616
FIRST_NAME = enum.auto()
1717
MIDDLE_NAME = enum.auto()
18+
TEST_FORM_CODE = enum.auto()
1819
STUDENT_ID = enum.auto()
1920
COURSE_ID = enum.auto()
20-
TEST_FORM_CODE = enum.auto()
2121

2222

2323
class VirtualField(enum.Enum):

code/main.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@
6363
# Dilates the image - removes black pixels from edges, which preserves
6464
# solid shapes while destroying nonsolid ones. By doing this after noise
6565
# removal and thresholding, it eliminates irregular things like W and M
66-
morphed_image = image_utils.dilate(prepared_image, save_path=debug_path)
66+
morphed_image = image_utils.dilate(prepared_image,
67+
save_path=debug_path)
6768

6869
# Establish a grid
6970
grid = grid_r.Grid(corners,
@@ -102,7 +103,8 @@
102103
answers_results.add(field_data, answers)
103104
progress.step_progress()
104105

105-
answers_results.clean_up("G" if empty_answers_as_g else "")
106+
answers_results.clean_up(
107+
replace_empty_with="G" if empty_answers_as_g else "")
106108
answers_results.save(output_folder,
107109
"results",
108110
sort_results,

0 commit comments

Comments
 (0)