This function eases the configuration of the learnr document to get user and database info, record events, use grade this and parameterize learnr.
learnitdownLearnrSetup(
config,
sign_in,
time.limit = 60,
cap = "R Code",
echo = FALSE,
comment = NA,
use.gradethis = TRUE,
event.recorder = learnitdown::record_learnr,
debug = Sys.getenv("LEARNITDOWN_DEBUG", 0) != 0
)
learnitdownLearnrBanner(
title,
text,
image,
align = "left",
msg.nologin = "Anonymous user, no record!",
msg.login = "Recording activated for ",
msg.error = "Error recording activity! "
)
learnitdownLearnrServer(input, output, session)
The config()
command to use to get database info.
The sign_in()
command to use to get user info.
The maximum time allowed to evaluate R code.
The caption for R code widgets.
Do we echo commands in R chunks?
The prefix added before each line of R chunk output.
Do we use gradethis?
The function to use as event recorder. you should probably not change the default value here.
Do we issue additions debugging informations?
The Title for the banner.
Text to print beneath the title.
URL to an image to display in the banner.
How is the image aligned: "left" (default), "right", "middle", "top" or "bottom".
The message to display if no user is logged in.
The message to display if a user is logged in (will be followed by the login).
The message when an error during recording of activity in the database occurs.
The Shiny input.
The Shiny output.
The Shiny session.
Nothing. The function is used to setup the learnr environment.