Skip to content

Commit 85a92f4

Browse files
author
Frans Welin
committed
fix an issue in release_feedback where groupshared user could not re-release feedback
1 parent 90f749b commit 85a92f4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

nbgrader/exchange/default/release_feedback.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,11 @@ def copy_files(self):
7676

7777
self.log.debug("Unique key is: {}".format(unique_key))
7878
checksum = notebook_hash(nbfile, unique_key)
79-
dest = os.path.join(self.dest_path, "{}.html".format(checksum))
79+
dest = os.path.join(self.dest_path, "{}-tmp.html".format(checksum))
8080

8181
self.log.info("Releasing feedback for student '{}' on assignment '{}/{}/{}' ({})".format(
8282
student_id, self.coursedir.course_id, self.coursedir.assignment_id, notebook_id, timestamp))
8383
shutil.copy(html_file, dest)
84+
updated_feedback = os.path.join(self.dest_path, "{}.html". format(checksum))
85+
shutil.move(dest, updated_feedback)
8486
self.log.info("Feedback released to: {}".format(dest))

0 commit comments

Comments
 (0)