kfl / staffeli_nt

Staffeli NT Technology
MIT License
8 stars 7 forks source link

Upload.py sometimes prints "Comment with: 0 attachments" for seemingly no reason #29

Closed Cavtheman closed 2 years ago

Cavtheman commented 2 years ago

Very minor issue as it seems like it does upload the feedback properly despite the message.

This usually happens for at least one handin per assignment. It does not happen to the same groups/people every time, so it is probably not kuids or special characters in names. It also does not seem to be the contents of the feedback causing the issue, since it also happens with empty feedback. When running the script several times, it is always the same people/groups with the message.

madsobitsoe commented 2 years ago

I am pretty sure (like 60+ %) that this happens when the submission has a submission comment with no attachments, i.e. that the student has written a comment on absalon. When we upload feedback, we do it as a comment with an attachment. There is a sanity-check in upload.py to avoid uploading feedback multiple times. It looks for submission comments with attachments; If one exists, it would probably be our already uploaded feedback.

I agree that the message could be clearer or removed.

Cavtheman commented 2 years ago

I can confirm that the one group that submitted a comment with their assignment was the group for which it gave the message. So you're probably right on that one.

kfl commented 2 years ago

After reviewing the responsible code in upload.py I realise that it's borked. And what is worse is that it seems that I'm the one who borked it.