Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Olivier
Peer-graded student exercises
Commits
2e29a0c1
Commit
2e29a0c1
authored
Jul 25, 2019
by
Olivier
Browse files
M6: minor cleanup
parent
eaa55eed
Changes
1
Hide whitespace changes
Inline
Side-by-side
M6_match_peers/match_peers.py
View file @
2e29a0c1
...
...
@@ -7,10 +7,9 @@ Script: Match Peers
"""-------------------------Hard coded input--------------------------------"""
# Input files paths
students_info_path
=
'script_input/output_assignments.csv'
submission_pdfs_path
=
'script_input/pdf/'
#
input pdf path
submission_pdfs_path
=
'script_input/pdf
s
/'
#
path to folder containing input PDFs
# Output files paths
peers_csv_path
=
'script_output/peers.csv'
rename_assignment_to
=
""
#Rename assignments ID_A.pdf to ...
"""-------------------------------------------------------------------------"""
# Import modules
...
...
@@ -120,10 +119,10 @@ with open (peers_csv_path,'w',newline='') as f:
custom_ID_G
[
i
],
str
(
did_their_homework
[
i
]),
ID_G_peer1
[
i
],
ID_G_peer2
[
i
]])
# Copy and rename the submission PDF files (custom_ID_A -> custom_ID_G)
# Copy and rename the submission PDF files
# (custom_ID_A -> customID_G)
for
i
in
range
(
0
,
len
(
custom_ID_A
)):
if
did_their_homework
[
i
]
==
True
:
copyfile
(
submission_pdfs_path
+
custom_ID_A
[
i
]
+
".pdf"
,
"script_output/pdfs/"
+
rename_assignment_to
+
custom_ID_G
[
i
]
+
".pdf"
)
"script_output/pdfs/"
+
custom_ID_G
[
i
]
+
".pdf"
)
# End of script
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment