render_qtijs {rqti}R Documentation

Render an RMD/xml file or rqti-object as qti xml with QTIJS

Description

Generates the qti xml file via rmd2xml. The xml is copied into the QTIJS folder of the package which transforms the xml into HTML. Finally, the HTML is displayed and the user can have a preview of the exercise or exam.

Usage

render_qtijs(input, preview_feedback = FALSE, ...)

Arguments

input

(the path to the input Rmd/md/xml document or AssessmentItem, AssessmentTest, AssessmentTestOpal, AssessmentSection object)

preview_feedback

A boolean value; optional. Set TRUE value to always display a model feedback (for example, as a model answer). Default is FALSE.

...

required for passing arguments when knitting

Details

Requires a running QTIJS server, which can be started with start_server(). When loading the package rqti, a server is started automatically.

The preview is automatically loaded into the RStudio viewer. Alternatively you can just open the browser in the corresponding local server which is displayed when rendering. Since the function is supposed to be called via the Knit-Button in RStudio, it defaults to the RStudio viewer pane.

Customize knit function in the Rmd file using the following YAML setting after the word knit knit: rqti::render_qtijs.

Value

An URL of the corresponding local server to display the rendering result.

Examples


file <- system.file("exercises/sc1.Rmd", package='rqti')
render_qtijs(file)


[Package rqti version 0.3.0 Index]