def get(cls, unit_id, reviewee_key, instance_id=None):
     submission_key = cls.get_key(
         unit_id, reviewee_key, instance_id=instance_id)
     submission = entities.get(submission_key)
     # For backward compatibility, if no entry is found with the instance_id
     # in the key, also look for an entry with no instance_id used.
     if submission is None and instance_id:
         submission = entities.get(cls.get_key(unit_id, reviewee_key))
     return submission
 def get(cls, unit_id, reviewee_key, instance_id=None):
     submission_key = cls.get_key(unit_id,
                                  reviewee_key,
                                  instance_id=instance_id)
     submission = entities.get(submission_key)
     # For backward compatibility, if no entry is found with the instance_id
     # in the key, also look for an entry with no instance_id used.
     if submission is None and instance_id:
         submission = entities.get(cls.get_key(unit_id, reviewee_key))
     return submission
 def get_contents_by_key(cls, submission_key):
     """Returns the contents of a submission, given a db.Key."""
     submission = entities.get(submission_key)
     return transforms.loads(submission.contents) if submission else None
 def does_submission_exist(self, unit_id, reviewee_key):
     submission_key = student_work.Submission.get_key(unit_id, reviewee_key)
     return bool(entities.get(submission_key))
 def get_contents_by_key(cls, submission_key):
     """Returns the contents of a submission, given a db.Key."""
     submission = entities.get(submission_key)
     return transforms.loads(submission.contents) if submission else None
 def get(cls, unit_id, reviewee_key):
     submission_key = cls.get_key(unit_id, reviewee_key)
     return entities.get(submission_key)
 def does_submission_exist(self, unit_id, reviewee_key):
     submission_key = student_work.Submission.get_key(unit_id, reviewee_key)
     return bool(entities.get(submission_key))
Beispiel #8
0
 def get(cls, unit_id, reviewee_key):
     submission_key = cls.get_key(unit_id, reviewee_key)
     return entities.get(submission_key)