I'll look into the error message, it seems to be trying to update the "read" state with an invalid id...
The short answer is that you can't, without re-writing the SQL statement for "deleting" documents, which should be in the Document.class.php file
"Non-deletion" of especially documents is an explicit design decision that we made with SIMPLE as one of the more frequent queries that we get from students is "I've deleted a file I didn't mean to delete, can you get it back?". So SIMPLE doesn't delete files, it merely hides them (from students).
The flip side is that every user that has the "UseStaffTools" permission within a simulation can see both the normal AND "deleted" files (hence the 'striked-out' formatting), and can un-delete them.
Deleted files are *never* sent to the "student" ui (i.e. it's not just hidden in the html, it is never written in to the HTML stream).
This is a design decision that I don't expect that we'll change (for a start the overheads are fairly minimal, and cos its database-backed we don't have to worry about file-name collisions), so if you do change the deletion SQL, *you'll* have to make sure that future versions don't undo those changes.
It may be worth considering implementing a user-preference that would allow each user to choose whether they want "deleted" items appearing (or not) if they have the "UseStaffTools" permission in a simulation, although it's not on *our* current list of features.