- When creating the problem set, we can now already knit for each chunk the sample solution.
- A preknitted shiny based problem set can be shown with the parameter
noeval=TRUE
. Then user code is then only parsed but not evaluated. Tests and hints only compare the parsed expression with the parsed sample solution. The noeval mode can be useful for hosting problem sets on an own webserver, where evaluation of user code is a high security risk or the user shall have no direct access to the data. The cost is less flexibility in testing the user code, e.g. in noeval mode,x=1+2
will not be seen as correct if the sample solution isx=2+1
.
- In the shiny interface of RTutor data.frames are now printed by
default as HTML tables (and only a maximum number of rows are shown).
The printing behavior can be modified on a global level in the call
to show.ps or on the chunk level. See
DataFramesExample_sol.Rmd
for examples.
- You can now add a hint block at the beginning of a chunk, before any other command. While other hints are linked to the previous expression that will be tested, the initial hint works for the whole chunk. It will be shown in addition to any expression specific hint. It will also be shown if the code cannot be evaluated or in a chunk that has no expression to be tested.
- Allow chunks that output htmlwidgets. You need to set the chunk option
output="htmlwidget"
, and specify the widget type in the chunk optionwidget
, e.g.widget="leaflet"
. An example is given inLeafletExample_sol.Rmd
in the./inst/examples
folder.
- Added quiz blocks. You need to provide the argument
addons="quiz"
in create.ps, and add#< quiz quiz_name ... #>
blocks. For an example, seeQuizExample_sol.Rmd
in the./inst/examples
folder.
- Added the argument
use.memoise
in create.ps. If set toTRUE
, the functions listed in the argumentmemoise.funs
will be memoised when running and showing a problem set. By default memoisation is done for a set of functions that read data from files. This saves time and memory if the same data set is repeatedly loaded in different exercises.
- awards can now be used and will be correctly displayed also in web-based problem sets
-
Add chunk option
optional=TRUE
. Optional chunks don't need to be solved in an exercise and their computations will not be available in subsequent chunks. -
We can now put RTutor chunks and texts in notes using the lines
#! start_note "Note Title"
...
#! end_note
Unlike info blocks the chunks inside a note can be solved. Chunks inside a note should have the chunk option optional=TRUE
.