-
Notifications
You must be signed in to change notification settings - Fork 4
The query string
This content is relevant to flexTeaching version 0.2+.
When accessing a flexTeaching
shiny app, there are a number of settings you can pass via the query string (the part after the ?
in a url). If these variables are set via the query string, they will be automatically filled in the relevant input element.
For example, the url:
https://myshinyserver.com/appName/app.Rmd?assignment=summaries&id=3948223&id_disable
has three query string variables: assignment
, id
, and id_disable
. The flexTeaching app will open with the student ID set to "3948223", and the ID element will be disabled so that the student cannot change it. Additionally, the flexTeaching app will open the "summaries" assignment.
A disabled element is faded to indicate that the value cannot be changed. Disabling elements can help signal to the student that they should not change something.
The following tables list all the available query string variables and what they do.
Variable name | Content | Description |
---|---|---|
solve |
N/A | Start in practice mode (otherwise defaults to assignment mode) |
entry_disable |
N/A | Disable switch to change from assignment to practice mode and back |
format |
String | The default file format for data downloads |
format_disable |
N/A | If this variable is in the query string, then the format dropdown box is disabled. |
assignment |
String | The shortname of an assignment to display |
assignment_disable |
N/A | If this variable is in the query string, then the assignment dropdown box is disabled. |
cache_mode |
N/A | Start in cache mode. In this mode, currently unavailable documents are still generated and cached. |
id |
String | The student ID |
id_disable |
N/A | If this variable is in the query string, then the student ID text box is disabled. |
category |
String | A POSIX regular expression; only assignments matching the category regular expression will be shown. (Make sure you URL encode the regular expression, in case it contains special characters like "&" ) |
seed |
String | The seed used for the assignment (under "Show admin") |
seed_disable |
N/A | If this variable is in the query string, then the Seed text box is disabled. |
masterseed |
String | The master seed used for generating the assignment seed |
masterseed_disable |
N/A | If this variable is in the query string, then the Master seed text box is disabled. |
solutions |
N/A | If this variable is in the query string, then the solutions checkbox is checked by default. |
solutions_disable |
N/A | If this variable is in the query string, then the Solutions checkbox is disabled. |