Skip to content

Commit eef171e

Browse files
committed
[fix] Sort edit message records by teacher before writing to file, fix #5
1 parent 0baecef commit eef171e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

repobee_csvgrades/_file.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def format_grade(student, mn, grade):
4242
"@{}\n{}".format(
4343
teacher, "\n".join([format_grade(*tup) for tup in grades])
4444
)
45-
for teacher, grades in new_grades.items()
45+
for teacher, grades in new_grades
4646
]
4747
msg = "Report grades for {}\n\n{}".format(
4848
sorted_repo_names, "\n\n".join(teacher_notifications)

repobee_csvgrades/csvgrades.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def callback(args: argparse.Namespace, api: None) -> None:
6464
)
6565
if new_grades:
6666
_file.write_edit_msg(
67-
new_grades,
67+
sorted(new_grades.items()),
6868
args.master_repo_names,
6969
pathlib.Path(args.edit_msg_file),
7070
)

0 commit comments

Comments
 (0)