learnitdownShiny: Create and manage learnitdown Shiny applications

View source: R/learnitdown_shiny.R

learnitdownShinyR Documentation

Create and manage learnitdown Shiny applications

Description

A learnitdown Shiny application is an application whose events (start, stop, inputs, outputs, errors, result, quit) are recorded. It also provides a 'Submit Answer' and a 'Quit' buttons that manage to check the answer provided by the user and to close the application cleanly.

Usage

learnitdownShiny(title, windowTitle = title)

learnitdownShinyVersion(version)

submitAnswerButton(
  inputId = "learnitdown_submit_",
  label = "Submit",
  class = "btn-primary",
  ...
)

quitButton(
  inputId = "learnitdown_quit_",
  label = "Quit",
  class = "btn-secondary",
  ...
)

submitQuitButtons()

Arguments

title

The title of the Shiny application

windowTitle

The title of the window that holds the Shiny application, by default, it is the same as title. If title = NULL, no title is added.

version

The version number (in a string character format) of the Shiny application to use in the events logger.

inputId

The identifier of the button ("learnitdown_submit_" or "learnitdown_quit_").

label

The button text ("Submit" or "Quit").

class

The bootstrap class of the button.

...

Further arguments passed to shiny::actionButton().

Value

The code to be inserted at the beginning of the Shiny application UI for learnitdownShiny() or where the buttons should be located for the other function.

See Also

trackEvents(), record_shiny()

Examples

learnitdownShiny("My title")

SciViews/learndown documentation built on Sept. 17, 2024, 8:06 a.m.