library(learnr) library(submitr) library(basket) library(etude) library(gradethis) knitr::opts_chunk$set(echo = FALSE) learnr::tutorial_options( exercise.timelimit = 60, exercise.checker = #gradethis::grade_learnr) submitr::null_code_checker)
submitr::login_controls()
options(tutorial.storage = "none") vfun <- make_basic_validator(NULL, "hello") #basket::check_valid storage_actions <- record_local("./minimal_submissions.csv") submitr::shiny_logic(input, output, session, vfun, storage_actions)
learnr::question("Which planet do we live on?", answer("Mars", correct=FALSE), answer("Earth", correct = TRUE, message = "Good job Earthling!"), answer("Saturn", correct = FALSE), allow_retry = TRUE, random_answer_order = TRUE )
etude::essay_response( prompt = "Write your thoughts here" )
gradethis::grade_result( fail_if( ~ .result != 3, "Result should have been 3."), pass_if(~ TRUE, "Good for you!"), glue_correct = "{.message}" )
learnr::question("Which of these are countries?", answer("California", correct=FALSE), answer("France", correct = TRUE, message = "Good job Earthling!"), answer("China", correct = TRUE), random_answer_order = FALSE, options = list(foobar = "Flag") )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.