def qs_tobegraded(qs):
        '''
            A filtering of the given Submission queryset for all submissions that are gradeable. This includes the following cases:

            - The submission was submitted and there are no tests.
            - The submission was successfully validity-tested, regardless of the full test status (not existent / failed / success).
            - The grading was already started, but not finished.

            The idea is to get a list of work to be done for the correctors.
        '''
        return qs.filter(state__in=[Submission.SUBMITTED, Submission.SUBMITTED_TESTED, Submission.TEST_FULL_FAILED, Submission.GRADING_IN_PROGRESS])
def qs_tobegraded ( qs ) : return qs . filter ( state__in = [ Submission . SUBMITTED , Submission . SUBMITTED_TESTED , Submission . TEST_FULL_FAILED , Submission . GRADING_IN_PROGRESS ] )
A filtering of the given Submission queryset for all submissions that are gradeable. This includes the following cases:

            - The submission was submitted and there are no tests.
            - The submission was successfully validity-tested, regardless of the full test status (not existent / failed / success).
            - The grading was already started, but not finished.

            The idea is to get a list of work to be done for the correctors.