loading...

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.

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.

Examples

learnitdownShiny("My title")
#> <h4>My title</h4>
#> <div data-display-if="false" data-ns-prefix="">
#>   <div class="form-group shiny-input-container">
#>     <label class="control-label" id="learnitdown_result_-label" for="learnitdown_result_"></label>
#>     <input id="learnitdown_result_" type="text" class="form-control" value=""/>
#>   </div>
#> </div>