diff --git a/README.rst b/README.rst index 751f817..cbebc44 100644 --- a/README.rst +++ b/README.rst @@ -53,7 +53,9 @@ Count the number of submissions that need to be graded:: } .. 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:: diff --git a/tutorxqueue/__about__.py b/tutorxqueue/__about__.py index 3ced358..b5fdc75 100644 --- a/tutorxqueue/__about__.py +++ b/tutorxqueue/__about__.py @@ -1 +1 @@ -__version__ = "0.2.1" +__version__ = "0.2.2" diff --git a/tutorxqueue/plugin.py b/tutorxqueue/plugin.py index e9935ea..03d779e 100644 --- a/tutorxqueue/plugin.py +++ b/tutorxqueue/plugin.py @@ -59,7 +59,8 @@ def command(): @click.option( "-u", "--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): context.queue = queue