upload2opal {rqti} | R Documentation |
Function upload2opal()
takes full prepared zip archive of QTI-test or
QTI-task and uploads it to the OPAL. before calling upload2opal()
authentication procedure has to be performed. See auth_opal
upload2opal(
test,
display_name = NULL,
access = 4,
overwrite = TRUE,
endpoint = NULL,
open_in_browser = TRUE,
as_survey = FALSE,
api_user = NULL,
api_password = NULL
)
test |
A length one character vector of AssessmentTest, AssessmentTestOpal or AssessmentItem objects, Rmd/md or XML files; required. |
display_name |
A length one character vector to entitle file in OPAL; file name without extension by default; optional. |
access |
An integer value, optional; it is responsible for publication status, where 1 - only those responsible for this learning resource; 2 - responsible and other authors; 3 - all registered users; 4 - registered users and guests. Default is 4. |
overwrite |
A boolean value; if the value is |
endpoint |
A string of endpoint of LMS Opal; by default it is got from
environment variable |
open_in_browser |
A boolean value; optional; it controls whether to open
a URL in default browser. Default is |
as_survey |
A boolean value; optional; it controls resource type (test
r survey). Default is |
api_user |
A character value of the username in the OPAL. |
api_password |
A character value of the password in the OPAL. |
A list with the key, display name, and URL of the resource in Opal.
To use OPAL API, you need to provide your OPAL-username and password. This package uses system credential store 'keyring' to store user's name and password. After the first successful access to the OPAL API, there is no need to specify the username and password again, they will be extracted from the system credential store
file <- system.file("exercises/sc1.Rmd", package='rqti')
upload2opal(file, "task 1", open_in_browser = FALSE)