library(CKteachR) library(learnr) library(submitr) library(googlesheets4) library(gradethis) knitr::opts_chunk$set(echo = FALSE) learnr::tutorial_options( exercise.timelimit = 60, exercise.checker = gradethis::grade_learnr)
submitr::login_controls()
# setup google sheets # read the 'service account token setup' https://gargle.r-lib.org/articles/get-api-credentials.html#service-account-token-1 # read https://github.com/juampynr/google-spreadsheet-reader # for each new sheet remember to share with googledrive-docs@mph-teaching.iam.gserviceaccount.com options(tutorial.storage = "none") out <- setup_progress_monitoring( rstudioapi::getActiveProject(), "test", "15oXGGq0fgFL7kN3ZCcouhJhnIY_wJCDj3tPu6nyug-g", "1YLZkrgLJJ0sGVXtkie30gpHdudzth-3dRUkUR_pQH0I", "UoL.MPH.datalab@gmail.com" ) submitr::shiny_logic(input, output, session, out$vfun, out$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 )
Use the box below to calculate how many hours 2020 has.
gradethis::grade_result( fail_if( ~ .result != 8784, "Result should have been 366 * 24 = 8784"), pass_if(~ TRUE, "Well done!"), glue_correct = "{.message}" )
learnr::question("Which of these are countries? (Select ALL that apply)", answer("California", correct = FALSE), answer("France", correct = TRUE, message = "Good job Earthling!"), answer("China", correct = TRUE), random_answer_order = TRUE, allow_retry = TRUE, options = list(foobar = "Flag") )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.