autograder .cli .courses .assignments .submissions .proxy .resubmit
Proxy resubmit an assignment submission to the autograder.
usage: python3 -m autograder.cli.courses.assignments.submissions.proxy.resubmit
[-h] [--version] [--server SERVER] [--user USER] [--pass PASS]
[--course COURSE] [--assignment ASSIGNMENT]
[--target-submission TARGET_SUBMISSION] --proxy-email PROXY_EMAIL
[--proxy-time PROXY_TIME] [--testing-mode]
Proxy resubmit an assignment submission to the autograder.
options:
-h, --help show this help message and exit
--version show program's version number and exit
command-specific options:
--server SERVER The URL of the autograder server to communicate with.
--user USER The email of the user making this request.
--pass PASS The password of the user making this request.
--course COURSE The ID of the course to make this request to.
--assignment ASSIGNMENT
The ID of the assignment to make this request to.
--target-submission TARGET_SUBMISSION
The ID of the submission (default to the most recent
submission). (default: None)
--proxy-email PROXY_EMAIL
The email of the user the request is pretending to be
made under (the submission will be made on behalf of
this user).
--proxy-time PROXY_TIME
The proxy timestamp that will be applied to the
request. By default, the earlier time between now and
one minute before the due date will be used. Use this
option to manually set the proxy time. Timestamps are
milliseconds from the UNIX epoch
(https://en.wikipedia.org/wiki/Unix_time). (default:
None)
testing options:
--testing-mode Run as if a test is being run (default: False).
1""" 2Proxy resubmit an assignment submission to the autograder. 3""" 4 5import argparse 6import sys 7 8import autograder.cli.courses.assignments.submissions.common 9import autograder.api.courses.assignments.submissions.proxy.resubmit 10import autograder.cli.parser 11 12def run_cli(args: argparse.Namespace) -> int: 13 """ Run the CLI. """ 14 15 config = args._config_info.application_config 16 17 api_response, grading_result = autograder.api.courses.assignments.submissions.proxy.resubmit.send(config, exit_on_error = True) 18 return autograder.cli.courses.assignments.submissions.common.display_grading_result(api_response, grading_result, 19 include_found_user = True, 20 include_found_submission = True) 21 22def main() -> int: 23 """ Get a parser, parse the args, and call run. """ 24 25 return run_cli(_get_parser().parse_args()) 26 27def _get_parser() -> argparse.ArgumentParser: 28 """ Get a parser for this operation. """ 29 30 parser = autograder.cli.parser.get_parser( 31 __doc__.strip(), 32 autograder.api.courses.assignments.submissions.proxy.resubmit.API_PARAMS) 33 34 return parser 35 36if (__name__ == '__main__'): 37 sys.exit(main())
def
run_cli(args: argparse.Namespace) -> int:
13def run_cli(args: argparse.Namespace) -> int: 14 """ Run the CLI. """ 15 16 config = args._config_info.application_config 17 18 api_response, grading_result = autograder.api.courses.assignments.submissions.proxy.resubmit.send(config, exit_on_error = True) 19 return autograder.cli.courses.assignments.submissions.common.display_grading_result(api_response, grading_result, 20 include_found_user = True, 21 include_found_submission = True)
Run the CLI.
def
main() -> int:
23def main() -> int: 24 """ Get a parser, parse the args, and call run. """ 25 26 return run_cli(_get_parser().parse_args())
Get a parser, parse the args, and call run.