def info_file(self, delete=True):
        '''
            Prepares an open temporary file with information about the submission.
            Closing it will delete it, which must be considered by the caller.
            This file is not readable, since the tempfile library wants either readable or writable files.
        '''
        info = tempfile.NamedTemporaryFile(
            mode='wt', encoding='utf-8', delete=delete)
        info.write("Submission ID:\t%u\n" % self.pk)
        info.write("Submitter:\t%s (%u)\n" %
                   (self.submitter.get_full_name(), self.submitter.pk))
        info.write("Authors:\n")
        for auth in self.authors.all():
            info.write("\t%s (%u)\n" % (auth.get_full_name(), auth.pk))
        info.write("\n")
        info.write("Creation:\t%s\n" % str(self.created))
        info.write("Last modification:\t%s\n" % str(self.modified))
        info.write("Status:\t%s\n" % self.state_for_students())
        if self.grading:
            info.write("Grading:\t%s\n" % str(self.grading))
        if self.notes:
            notes = self.notes
            info.write("Author notes:\n-------------\n%s\n\n" % notes)
        if self.grading_notes:
            notes = self.grading_notes
            info.write("Grading notes:\n--------------\n%s\n\n" % notes)
        info.flush()    # no closing here, because it disappears then
        return info
Prepares an open temporary file with information about the submission.
            Closing it will delete it, which must be considered by the caller.
            This file is not readable, since the tempfile library wants either readable or writable files.