Skip to content
Snippets Groups Projects

- major changes in feedback

Merged Hafiz Emin Kosar requested to merge development into master

feedback usage is explained in rwth-nb/docs/source/examples/RWTH\ Feedback.ipynb

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
219 else:
220 user_name = os.environ['HOSTNAME'] # take hostname as fall-back
221 self.entry['userhash'] = hashlib.sha256(str.encode(user_name)).hexdigest()
222 self.entry['answer'] = {key: w.value for key, w in self.widgets_container.items()}
223 self.entry['status'] = 'saved_locally'
224
225 # confirm submission if not happened already
226 if not self.is_send_confirmed:
227 self.btn_submit.description = self.feedback_text['confirm_send']
228 self.btn_submit.layout.width = 'auto'
229 self.is_send_confirmed = True
230 return
231
232 # dump entries into json file
233 # append only if not entry does not already exist in json file
234 # TODO - Editing locally saved submission is not possible. Change?
  • It should not be possible to change the feedback once it is submitted. No matter, if it was saved locally or sent via mail. Here comes another question into play: Is it possible to sent multiple mails at the moment?

  • Current status of feedback submission:
    Locally saved entries can be changed by editing the feedback.json manually.
    Also mail_sent attribute can manually be reset to saved_locally by anyone, allowing to resend multiple feedbacks. Further, removing the file causes the feedback to reset and everything is possible again, including resending submission.
    Without editing or removing the file neither changing locally saved submission nor sending multiple mails is possible.
    In the short run, the file can be hidden, so it would be harder for anyone to edit or remove at all.
    This would be done platform specific:
    On Windows: set file attribute to hidden.
    On MacOS/Linux: put a dot in front of the filename.
    In the long run though, knowing what can be done with JupyterHub services would be essential.

    Edited by Hafiz Emin Kosar
  • Please register or sign in to reply
  • Christian Rohlfing
    Christian Rohlfing @rohlfing started a thread on commit 70ae7055
  • 293 295
    294 296 Dumps self.entries into existing file
    295 297 """
    296 with open(self.feedback_path, mode='w', encoding='utf-8') as f:
    298 with open(self.feedback_path, mode='r+', encoding='utf-8') as f:
  • Jens Schneider mentioned in commit 2befdaad

    mentioned in commit 2befdaad

  • Please register or sign in to reply
    Loading