Make it possible to define xqueue url from env var

This commit is contained in:
Régis Behmo 2020-05-13 11:21:37 +02:00
parent 2fab9f3c3a
commit 141fc8bdf1
3 changed files with 6 additions and 3 deletions

View File

@ -53,7 +53,9 @@ Count the number of submissions that need to be graded::
} }
.. note:: .. note::
By default, ``tutor xqueue submissions`` will hit the Xqueue API running at http(s)://xqueue.LMS_HOST. When running locally, you will want to interact with http://xqueue.localhost. To do so, you should pass the ``--url=http://xqueue.localhost`` option to the CLI. By default, ``tutor xqueue submissions`` will hit the Xqueue API running at http(s)://xqueue.LMS_HOST. When running locally, you will want to interact with http://xqueue.localhost. To do so, you should pass the ``--url=http://xqueue.localhost`` option to the CLI. Alternatively, and to avoid passing this option every time, you can define the following environment variable::
export TUTOR_XQUEUE_URL=http://xqueue.localhost
Show the first submission that should be graded:: Show the first submission that should be graded::

View File

@ -1 +1 @@
__version__ = "0.2.1" __version__ = "0.2.2"

View File

@ -59,7 +59,8 @@ def command():
@click.option( @click.option(
"-u", "-u",
"--url", "--url",
help="Xqueue server base url. By default, this value will be defined from the plugin configuration.", envvar="TUTOR_XQUEUE_URL",
help="Xqueue server base url. By default, this value will be defined from the plugin configuration. Alternatively, this value can be defined from the TUTOR_XQUEUE_URL environment variable.",
) )
def submissions(context, queue, url): def submissions(context, queue, url):
context.queue = queue context.queue = queue