autograder.api.courses.assignments.submissions.fetch.user.attempt
Get a submission along with all grading information.
1""" 2Get a submission along with all grading information. 3""" 4 5import typing 6 7import autograder.api.common 8import autograder.api.config 9import autograder.assignment 10import autograder.model.config 11 12API_ENDPOINT: str = 'courses/assignments/submissions/fetch/user/attempt' 13API_WRITE: bool = False 14API_PARAMS: typing.List[autograder.api.config.APIParam] = [ 15 autograder.api.config.PARAM_SERVER, 16 autograder.api.config.PARAM_USER_EMAIL, 17 autograder.api.config.PARAM_USER_PASS, 18 19 autograder.api.config.PARAM_COURSE, 20 autograder.api.config.PARAM_ASSIGNMENT, 21 22 autograder.api.config.PARAM_TARGET_EMAIL_OR_SELF, 23 autograder.api.config.PARAM_TARGET_SUBMISSION_OR_RECENT, 24 25 autograder.api.config.PARAM_OUT_DIR, 26] 27 28def send(config: autograder.model.config.Config, **kwargs: typing.Any) -> typing.Tuple[ 29 bool, bool, typing.Union[typing.Dict[str, typing.Any], None]]: 30 """ 31 Send a request to the autograder. 32 Returns: (found user, found submission, attempt). 33 """ 34 35 response = autograder.api.common.make_api_request(API_ENDPOINT, config, API_PARAMS, write = API_WRITE, **kwargs) 36 37 if (not response['found-user']): 38 return False, False, None 39 40 if (not response['found-submission']): 41 return True, False, None 42 43 return True, True, response['grading-result']
API_ENDPOINT: str =
'courses/assignments/submissions/fetch/user/attempt'
API_WRITE: bool =
False
API_PARAMS: List[autograder.api.config.APIParam] =
[<autograder.api.config.APIParam object>, <autograder.api.config.APIParam object>, <autograder.api.config.APIParam object>, <autograder.api.config.APIParam object>, <autograder.api.config.APIParam object>, <autograder.api.config.APIParam object>, <autograder.api.config.APIParam object>, <autograder.api.config.APIParam object>]
def
send( config: autograder.model.config.Config, **kwargs: Any) -> Tuple[bool, bool, Optional[Dict[str, Any]]]:
29def send(config: autograder.model.config.Config, **kwargs: typing.Any) -> typing.Tuple[ 30 bool, bool, typing.Union[typing.Dict[str, typing.Any], None]]: 31 """ 32 Send a request to the autograder. 33 Returns: (found user, found submission, attempt). 34 """ 35 36 response = autograder.api.common.make_api_request(API_ENDPOINT, config, API_PARAMS, write = API_WRITE, **kwargs) 37 38 if (not response['found-user']): 39 return False, False, None 40 41 if (not response['found-submission']): 42 return True, False, None 43 44 return True, True, response['grading-result']
Send a request to the autograder. Returns: (found user, found submission, attempt).