autograder.api.courses.assignments.submissions.fetch.user.attempts
Get all submission attempts made by a user along with all grading information.
1""" 2Get all submission attempts made by a user 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/attempts' 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 24 autograder.api.config.PARAM_OUT_DIR, 25] 26 27def send(config: autograder.model.config.Config, **kwargs: typing.Any) -> typing.Tuple[bool, typing.List[typing.Dict[str, typing.Any]]]: 28 """ 29 Send a request to the autograder. 30 Returns: (found user, attempts). 31 """ 32 33 response = autograder.api.common.make_api_request(API_ENDPOINT, config, API_PARAMS, write = API_WRITE, **kwargs) 34 35 if (not response['found-user']): 36 return False, [] 37 38 return True, response['grading-results']
API_ENDPOINT: str =
'courses/assignments/submissions/fetch/user/attempts'
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>]
def
send( config: autograder.model.config.Config, **kwargs: Any) -> Tuple[bool, List[Dict[str, Any]]]:
28def send(config: autograder.model.config.Config, **kwargs: typing.Any) -> typing.Tuple[bool, typing.List[typing.Dict[str, typing.Any]]]: 29 """ 30 Send a request to the autograder. 31 Returns: (found user, attempts). 32 """ 33 34 response = autograder.api.common.make_api_request(API_ENDPOINT, config, API_PARAMS, write = API_WRITE, **kwargs) 35 36 if (not response['found-user']): 37 return False, [] 38 39 return True, response['grading-results']
Send a request to the autograder. Returns: (found user, attempts).