You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just got around to using learnr + gradethis for a randomization experiment.
If i'm reading this correctly,
It seems this PR will fix the issue I'm having with my local .Rmd document (not as a package) and on shinyapps.io where my previous attempts are being cached, and I either need to manually "Start Over" or run things in a private/incognito window. 👍
Will this let me also put in the yaml header so that it never caches the previous attempts? Something like:
@chendaniely the feature in #601 adds a clean argument to the run_tutorial() function, which controls whether the tutorial is pre-rendered with each run. When clean = TRUE in run_tutorial() (when that feature lands), all of the "static" R code in the tutorial Rmd is re-run to build and launch the tutorial app.
But this is different from individual sessions, i.e. individual times you or others access the running tutorial. While you're interacting with the tutorial, learns uses a couple strategies to store your previous answers so that they can restored when you return to a tutorial. learnr calls this Tutorial Storage and the default behavior is to use the storage mechanisms provided by browsers to have the user's browser keep track of the code or questions that were last entered.
The learnr documentation describes this in the Tutorial Storage page. There you can also find the code required to set up a no-op storage system. I've copied and pasted it below (on 2021-11-04). You can put the code below in the setup chunk of your tutorial and every time you re-load the tutorial it should re-start without restoring any previous answers.
options(tutorial.storage=list(
# save an arbitrary R object "data" to storagesave_object=function(tutorial_id, tutorial_version, user_id, object_id, data) {
},
# retreive a single R object from storageget_object=function(tutorial_id, tutorial_version, user_id, object_id) {
NULL
},
# retreive a list of all R objects storedget_objects=function(tutorial_id, tutorial_version, user_id) {
list()
},
# remove all stored R objectsremove_all_objects=function(tutorial_id, tutorial_version, user_id) {
}
)
Just got around to using
learnr
+gradethis
for a randomization experiment.If i'm reading this correctly,
It seems this PR will fix the issue I'm having with my local
.Rmd
document (not as a package) and on shinyapps.io where my previous attempts are being cached, and I either need to manually "Start Over" or run things in a private/incognito window. 👍Will this let me also put in the yaml header so that it never caches the previous attempts? Something like:
Originally posted by @chendaniely in #601 (comment)
The text was updated successfully, but these errors were encountered: