Skip to content

Commit

Permalink
fix an issue in release_feedback where groupshared user could not re-…
Browse files Browse the repository at this point in the history
…release feedback (#1667)

Co-authored-by: Frans Welin <frans.welin@aalto.fi>
  • Loading branch information
franswel and Frans Welin authored Oct 4, 2024
1 parent b786ea6 commit be97e17
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nbgrader/exchange/default/release_feedback.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,12 @@ def copy_files(self):
submission_secret = fh.read()

checksum = notebook_hash(secret=submission_secret, notebook_id=notebook_id)
dest = os.path.join(self.dest_path, "{}.html".format(checksum))
dest = os.path.join(self.dest_path, "{}-tmp.html".format(checksum))

self.log.info("Releasing feedback for student '{}' on assignment '{}/{}/{}' ({})".format(
student_id, self.coursedir.course_id, self.coursedir.assignment_id, notebook_id, timestamp))
shutil.copy(html_file, dest)
# Copy to temporary location and mv to update atomically.
updated_feedback = os.path.join(self.dest_path, "{}.html". format(checksum))
shutil.move(dest, updated_feedback)
self.log.info("Feedback released to: {}".format(dest))

0 comments on commit be97e17

Please sign in to comment.