quizcomp .cli .canvas .upload
Alias for lms.cli.courses.quizzes.upload.
usage: python3 -m quizcomp.cli.canvas.upload [-h] [--version]
[--server SERVER]
[--server-type {blackboard,canvas,moodle}]
[--auth-user AUTH_USER]
[--auth-password AUTH_PASSWORD]
[--auth-token AUTH_TOKEN]
[--course COURSE]
[--format {json,table,text}]
[--include-extra-fields]
[--pretty-headers]
[--skip-headers] [--force]
QUIZ_PATH
Upload a quiz.
positional arguments:
QUIZ_PATH Path to a Quiz Composer quiz (JSON file).
options:
-h, --help show this help message and exit
--version show program's version number and exit
--course COURSE The course to target for this operation.
--force Delete any existing quiz with a matching name
(default: False).
server options:
--server SERVER The address of the LMS server to connect to.
--server-type {blackboard,canvas,moodle}
The type of LMS being connected to (this can normally
be guessed from the server address).
authentication options:
--auth-user AUTH_USER
The user to authenticate with.
--auth-password AUTH_PASSWORD
The password to authenticate with.
--auth-token AUTH_TOKEN
The token to authenticate with.
output formatting options:
--format {json,table,text}
The format to display the output as (default: text).
--include-extra-fields
Include non-common (usually LMS-specific) fields in
results (default: False).
--pretty-headers When displaying headers, try to make them look
"pretty" (default: False).
--skip-headers Skip headers when outputting results, will not apply
to all formats (default: False).
Alias for `lms.cli.courses.quizzes.upload`.
1""" 2Alias for `lms.cli.courses.quizzes.upload`. 3""" 4 5import argparse 6import sys 7 8import lms.cli.courses.quizzes.upload as alias 9 10def main() -> int: 11 """ Get a parser, parse the args, and call run. """ 12 13 return alias.run_cli(_get_parser().parse_args()) 14 15def _get_parser() -> argparse.ArgumentParser: 16 """ Get a parser for this operation. """ 17 18 parser = alias._get_parser() 19 parser.epilog = __doc__.strip() 20 return parser 21 22if (__name__ == '__main__'): 23 sys.exit(main())
def
main() -> int:
11def main() -> int: 12 """ Get a parser, parse the args, and call run. """ 13 14 return alias.run_cli(_get_parser().parse_args())
Get a parser, parse the args, and call run.