コード例 #1
0
 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
コード例 #2
0
 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
コード例 #3
0
 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
コード例 #4
0
 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))
コード例 #5
0
 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
コード例 #6
0
 def get(cls, unit_id, reviewee_key):
     submission_key = cls.get_key(unit_id, reviewee_key)
     return entities.get(submission_key)
コード例 #7
0
 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))
コード例 #8
0
 def get(cls, unit_id, reviewee_key):
     submission_key = cls.get_key(unit_id, reviewee_key)
     return entities.get(submission_key)