autograder.cli.courses.assignments.submissions.proxy.regrade

Proxy regrade an assignment for all target users using their most recent submission.

usage: python3 -m autograder.cli.courses.assignments.submissions.proxy.regrade
       [-h] [--version] [--server SERVER] [--user USER] [--pass PASS]
       [--course COURSE] [--assignment ASSIGNMENT]
       [--target-users TARGET_USERS] [--regrade-cutoff REGRADE_CUTOFF]
       [--dry-run] [--overwrite-records] [--wait-for-completion]
       [--testing-mode]

Proxy regrade an assignment for all target users using their most recent submission.

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-users TARGET_USERS
                        A list of course user references. Course user
                        references may be specified in four ways: 1) Email
                        address of the requested user, 2) "*" to request all
                        users in the course, 3) "" (e.g.,
                        student, grader) to request all course users with that
                        role, and 4) any of the previous options preceded by a
                        minus sign (e.g., "-alice@test.edulinq.org",
                        "-student") to exclude that user or role from the
                        request. Default: All users in the course.
    --regrade-cutoff REGRADE_CUTOFF
                        All submissions occurring before the cutoff time will
                        be regraded. By default, the current time will be
                        used. Time is milliseconds from the UNIX epoch
                        (https://en.wikipedia.org/wiki/Unix_time). (default:
                        None)
    --dry-run           Do not commit/finalize the operation, just do all the
                        steps and state what the result would look like.
    --overwrite-records
                        Replace any existing records that match the current
                        operation (e.g. re-do existing results).
    --wait-for-completion
                        Wait for the full job to complete before returning.

testing options:
    --testing-mode      Run as if a test is being run (default: False).
 1"""
 2Proxy regrade an assignment for all target users using their most recent submission.
 3"""
 4
 5import argparse
 6import sys
 7
 8import edq.util.json
 9
10import autograder.api.courses.assignments.submissions.proxy.regrade
11import autograder.cli.parser
12
13def run_cli(args: argparse.Namespace) -> int:
14    """ Run the CLI. """
15
16    config = args._config_info.application_config
17
18    result = autograder.api.courses.assignments.submissions.proxy.regrade.send(config, exit_on_error = True)
19    print(edq.util.json.dumps(result, indent = 4))
20
21    return 0
22
23def main() -> int:
24    """ Get a parser, parse the args, and call run. """
25
26    return run_cli(_get_parser().parse_args())
27
28def _get_parser() -> argparse.ArgumentParser:
29    """ Get a parser for this operation. """
30
31    parser = autograder.cli.parser.get_parser(
32        __doc__.strip(),
33        autograder.api.courses.assignments.submissions.proxy.regrade.API_PARAMS)
34
35    return parser
36
37if (__name__ == '__main__'):
38    sys.exit(main())
def run_cli(args: argparse.Namespace) -> int:
14def run_cli(args: argparse.Namespace) -> int:
15    """ Run the CLI. """
16
17    config = args._config_info.application_config
18
19    result = autograder.api.courses.assignments.submissions.proxy.regrade.send(config, exit_on_error = True)
20    print(edq.util.json.dumps(result, indent = 4))
21
22    return 0

Run the CLI.

def main() -> int:
24def main() -> int:
25    """ Get a parser, parse the args, and call run. """
26
27    return run_cli(_get_parser().parse_args())

Get a parser, parse the args, and call run.