learnr
learnr copied to clipboard
Document that setting tutorial ID is required on RStudio Cloud
From RStudio Community:
Some students are not able to install the tutorial package onto their computer, so I setup a Rstudio cloud project for them to use. However when they stop the session after they work on it for a little bit (to save computational time and stay under the free time limits), it does not save their work. Is this a bug?
The tutorial progress storage is based on the tutorial's ID. If your tutorial doesn't explicitly set the ID, then a default value is chosen based on a few things. On RStudio Cloud, the port of the application path encoded in the URL where the user accesses the running tutorial. learnr will encorporate that port in the default tutorial identifier, but unfortunately this port number changes with each run.
Adding the following to the YAML frontmatter of those tutorials this will clear up problems for your users, even on RStudio Cloud:
tutorial:
id: math350_lrt_1_introR
version: 1 # change the version when you want to invalidate past progress
Note that if you release a totally different version of the tutorial and want any one with stored progress to reset, you can change the version value (which can be an arbitrary string).
Adding the id and reinstalling the tutorial in the cloud project did not resolve the issue.
That's unfortunate. Is the package with the tutorials available online and if so can you please share the repo URL? Can you also please share the output from devtools::session_info()?
oh wait, instead of
output:
learnr::tutorial:
progressive: true
allow_skip: true
id: math350_lrt_1_introR
version: 1 # change the version when you want to invalidate past progress
please try
output:
learnr::tutorial:
progressive: true
allow_skip: true
tutorial:
id: math350_lrt_1_introR
version: 1 # change the version when you want to invalidate past progress
Getting mixed results. It crashed R on one student's cloud project the first time around, saved the results but lagged out when submitting the answer on the second attempt.
It saved my code but resulted in a use of NULL environment is defunct in the tutorial, and the following error in the Jobs window
pandoc: /tmp/RtmpHsHUsi/rmarkdown-str2da2c330f71.html: openBinaryFile: does not exist (No such file or directory)
Repo located at: https://github.com/norcalbiostat/ChicoLearnR
Cloud Session Info
> devtools::session_info()
─ Session info ────────────────────────────────────────────────
setting value
version R version 4.1.2 (2021-11-01)
os Ubuntu 20.04.3 LTS
system x86_64, linux-gnu
ui RStudio
language (EN)
collate C.UTF-8
ctype C.UTF-8
tz UTC
date 2022-02-07
rstudio 2021.09.2+382.pro1 Ghost Orchid (server)
pandoc NA
─ Packages ────────────────────────────────────────────────────
package * version date (UTC) lib source
brio 1.1.3 2021-11-30 [1] RSPM (R 4.1.0)
cachem 1.0.6 2021-08-19 [1] RSPM (R 4.1.0)
callr 3.7.0 2021-04-20 [1] RSPM (R 4.1.0)
cli 3.1.1 2022-01-20 [1] RSPM (R 4.1.0)
crayon 1.4.2 2021-10-29 [1] RSPM (R 4.1.0)
curl 4.3.2 2021-06-23 [1] RSPM (R 4.1.0)
desc 1.4.0 2021-09-28 [1] RSPM (R 4.1.0)
devtools 2.4.3 2021-11-30 [1] RSPM (R 4.1.0)
ellipsis 0.3.2 2021-04-29 [1] RSPM (R 4.1.0)
fastmap 1.1.0 2021-01-25 [1] RSPM (R 4.1.0)
fs 1.5.2 2021-12-08 [1] RSPM (R 4.1.0)
glue 1.6.1 2022-01-22 [1] RSPM (R 4.1.0)
lifecycle 1.0.1 2021-09-24 [1] RSPM (R 4.1.0)
magrittr 2.0.2 2022-01-26 [1] RSPM (R 4.1.0)
memoise 2.0.1 2021-11-26 [1] RSPM (R 4.1.0)
pkgbuild 1.3.1 2021-12-20 [1] RSPM (R 4.1.0)
pkgload 1.2.4 2021-11-30 [1] RSPM (R 4.1.0)
prettyunits 1.1.1 2020-01-24 [1] RSPM (R 4.1.0)
processx 3.5.2 2021-04-30 [1] RSPM (R 4.1.0)
ps 1.6.0 2021-02-28 [1] RSPM (R 4.1.0)
purrr 0.3.4 2020-04-17 [1] RSPM (R 4.1.0)
R6 2.5.1 2021-08-19 [1] RSPM (R 4.1.0)
remotes 2.4.2 2021-11-30 [1] RSPM (R 4.1.0)
renv 0.15.2 2022-01-24 [1] RSPM (R 4.1.0)
rlang 1.0.0 2022-01-26 [1] RSPM (R 4.1.0)
rprojroot 2.0.2 2020-11-15 [1] RSPM (R 4.1.0)
rstudioapi 0.13 2020-11-12 [1] RSPM (R 4.1.0)
sessioninfo 1.2.2 2021-12-06 [1] RSPM (R 4.1.0)
testthat 3.1.2 2022-01-20 [1] RSPM (R 4.1.0)
usethis 2.1.5 2021-12-09 [1] RSPM (R 4.1.0)
withr 2.4.3 2021-11-30 [1] RSPM (R 4.1.0)
yaml 2.2.2 2022-01-25 [1] RSPM (R 4.1.0)
[1] /cloud/lib/x86_64-pc-linux-gnu-library/4.1
[2] /opt/R/4.1.2/lib/R/library
One thing that jumps out at me immediately about the session info is that there appears to be an issue with pandoc:
rstudio 2021.09.2+382.pro1 Ghost Orchid (server)
pandoc NA
I tried installing your package in a new RStudio Cloud project and the tutorials worked as expected. I don't see any obvious differences in the environment other than the missing pandoc in your Cloud session. I'm not sure how this would happen but I've pinged the Cloud team to see if they can provide any advice.
In the case of the student's issues, one thing to try would be to reset the tutorial by clicking "Start Over" in the left navigation column when trying again. If there's any more information you could provide to help me debug, I'll be happy to take a further look.
Looking through your session info one more time, I noticed that neither learnr nor rmarkdown appear on the list of packages. I'm not sure how that happened. Can you try running sesson info to report all installed packages?
devtools::session_info("installed")
I'm having trouble with copying the results of session info "installed" into an issue as markdown code chunk
At one point her RAM bar was fully maxed, and it was frozen/spinning on the submit answer code. The start over button wouldn't even register. I think our last attempt was to have her delete and recopy the entire project. It was pretty fully borked and we're not sure why. I'll catch up with her this week and see if it's working.
> devtools::session_info("installed")
─ Session info ─────────────────────────────────────────────────────────────────────────
setting value version
R version 4.1.2 (2021-11-01)
os Ubuntu 20.04.3 LTS
system x86_64, linux-gnu
ui RStudio
language (EN)
collate C.UTF-8
ctype C.UTF-8
tz UTC
date 2022-02-14
rstudio 2021.09.2+382.pro1 Ghost Orchid (server)
pandoc NA
─ Packages ─────────────────────────────────────────────────────────────────────────────
package * version date (UTC) lib source
airports 0.1.0 2020-06-29 [1] RSPM (R 4.1.0)
askpass 1.1 2019-01-13 [1] RSPM (R 4.1.0)
backports 1.4.1 2021-12-13 [1] RSPM (R 4.1.0)
base64enc 0.1-3 2015-07-28 [1] RSPM (R 4.1.0)
bit 4.0.4 2020-08-04 [1] RSPM (R 4.1.0)
bit64 4.0.5 2020-08-30 [1] RSPM (R 4.1.0)
boot 1.3-28 2021-05-03 [2] CRAN (R 4.1.2)
brew 1.0-6 2011-04-13 [1] RSPM (R 4.1.0)
brio 1.1.3 2021-11-30 [1] RSPM (R 4.1.0)
bslib 0.3.1 2021-10-06 [1] RSPM (R 4.1.0)
cachem 1.0.6 2021-08-19 [1] RSPM (R 4.1.0)
callr 3.7.0 2021-04-20 [1] RSPM (R 4.1.0)
checkmate 2.0.0 2020-02-06 [1] RSPM (R 4.1.0)
cherryblossom 0.1.0 2020-06-25 [1] RSPM (R 4.1.0)
ChicoLearnR 0.0.0.9000 2022-02-11 [1] Github (norcalbiostat/ChicoLearnR@bb7114c)
class 7.3-19 2021-05-03 [2] CRAN (R 4.1.2)
cli 3.1.1 2022-01-20 [1] RSPM (R 4.1.0)
clipr 0.7.1 2020-10-08 [1] RSPM (R 4.1.0)
cluster 2.1.2 2021-04-17 [2] CRAN (R 4.1.2)
codetools 0.2-18 2020-11-04 [2] CRAN (R 4.1.2)
colorspace 2.0-2 2021-06-24 [1] RSPM (R 4.1.0)
commonmark 1.7 2018-12-01 [1] RSPM (R 4.1.0)
cpp11 0.4.2 2021-11-30 [1] RSPM (R 4.1.0)
crayon 1.4.2 2021-10-29 [1] RSPM (R 4.1.0)
credentials 1.3.2 2021-11-29 [1] RSPM (R 4.1.0)
curl 4.3.2 2021-06-23 [1] RSPM (R 4.1.0)
desc 1.4.0 2021-09-28 [1] RSPM (R 4.1.0)
devtools 2.4.3 2021-11-30 [1] RSPM (R 4.1.0)
diffobj 0.3.5 2021-10-05 [1] RSPM (R 4.1.0)
digest 0.6.29 2021-12-01 [1] RSPM (R 4.1.0)
dplyr 1.0.7 2021-06-18 [1] RSPM (R 4.1.0)
ellipsis 0.3.2 2021-04-29 [1] RSPM (R 4.1.0)
evaluate 0.14 2019-05-28 [1] RSPM (R 4.1.0)
fansi 1.0.2 2022-01-14 [1] RSPM (R 4.1.0)
farver 2.1.0 2021-02-28 [1] RSPM (R 4.1.0)
fastmap 1.1.0 2021-01-25 [1] RSPM (R 4.1.0)
fontawesome 0.2.2 2021-07-02 [1] RSPM (R 4.1.0)
foreign 0.8-81 2020-12-22 [2] CRAN (R 4.1.2)
fs 1.5.2 2021-12-08 [1] RSPM (R 4.1.0)
generics 0.1.1 2021-10-25 [1] RSPM (R 4.1.0)
gert 1.5.0 2022-01-03 [1] RSPM (R 4.1.0)
ggplot2 3.3.5 2021-06-25 [1] RSPM (R 4.1.0)
gh 1.3.0 2021-04-30 [1] RSPM (R 4.1.0)
gitcreds 0.1.1 2020-12-04 [1] RSPM (R 4.1.0)
glue 1.6.1 2022-01-22 [1] RSPM (R 4.1.0)
gradethis 0.2.5.9000 2022-02-11 [1] Github (rstudio/gradethis@99549b9)
gtable 0.3.0 2019-03-25 [1] RSPM (R 4.1.0)
highr 0.9 2021-04-16 [1] RSPM (R 4.1.0)
hms 1.1.1 2021-09-26 [1] RSPM (R 4.1.0)
htmltools 0.5.2 2021-08-25 [1] RSPM (R 4.1.0)
htmlwidgets 1.5.4 2021-09-08 [1] RSPM (R 4.1.0)
httpuv 1.6.5 2022-01-05 [1] RSPM (R 4.1.0)
httr 1.4.2 2020-07-20 [1] RSPM (R 4.1.0)
ini 0.3.1 2018-05-20 [1] RSPM (R 4.1.0)
isoband 0.2.5 2021-07-13 [1] RSPM (R 4.1.0)
jquerylib 0.1.4 2021-04-26 [1] RSPM (R 4.1.0)
jsonlite 1.7.3 2022-01-17 [1] RSPM (R 4.1.0)
KernSmooth 2.23-20 2021-05-03 [2] CRAN (R 4.1.2)
knitr 1.37 2021-12-16 [1] RSPM (R 4.1.0)
labeling 0.4.2 2020-10-20 [1] RSPM (R 4.1.0)
later 1.3.0 2021-08-18 [1] RSPM (R 4.1.0)
lattice 0.20-45 2021-09-22 [2] CRAN (R 4.1.2)
learnr 0.10.1.9019 2022-02-11 [1] Github (rstudio/learnr@6d808b2)
learnrhash 0.2.0 2022-02-11 [1] Github (rundel/learnrhash@4ad3729)
lifecycle 1.0.1 2021-09-24 [1] RSPM (R 4.1.0)
magrittr 2.0.2 2022-01-26 [1] RSPM (R 4.1.0)
markdown 1.1 2019-08-07 [1] RSPM (R 4.1.0)
MASS 7.3-54 2021-05-03 [2] CRAN (R 4.1.2)
Matrix 1.3-4 2021-06-01 [2] CRAN (R 4.1.2)
memoise 2.0.1 2021-11-26 [1] RSPM (R 4.1.0)
mgcv 1.8-38 2021-10-06 [2] CRAN (R 4.1.2)
mime 0.12 2021-09-28 [1] RSPM (R 4.1.0)
munsell 0.5.0 2018-06-12 [1] RSPM (R 4.1.0)
nlme 3.1-153 2021-09-07 [2] CRAN (R 4.1.2)
nnet 7.3-16 2021-05-03 [2] CRAN (R 4.1.2)
openintro 2.2.0 2021-06-22 [1] RSPM (R 4.1.0)
openssl 1.4.6 2021-12-19 [1] RSPM (R 4.1.0)
palmerpenguins 0.1.0 2020-07-23 [1] RSPM (R 4.1.0)
pillar 1.7.0 2022-02-01 [1] RSPM (R 4.1.0)
pkgbuild 1.3.1 2021-12-20 [1] RSPM (R 4.1.0)
pkgconfig 2.0.3 2019-09-22 [1] RSPM (R 4.1.0)
pkgload 1.2.4 2021-11-30 [1] RSPM (R 4.1.0)
praise 1.0.0 2015-08-11 [1] RSPM (R 4.1.0)
prettyunits 1.1.1 2020-01-24 [1] RSPM (R 4.1.0)
processx 3.5.2 2021-04-30 [1] RSPM (R 4.1.0)
progress 1.2.2 2019-05-16 [1] RSPM (R 4.1.0)
promises 1.2.0.1 2021-02-11 [1] RSPM (R 4.1.0)
ps 1.6.0 2021-02-28 [1] RSPM (R 4.1.0)
purrr 0.3.4 2020-04-17 [1] RSPM (R 4.1.0)
R6 2.5.1 2021-08-19 [1] RSPM (R 4.1.0)
rappdirs 0.3.3 2021-01-31 [1] RSPM (R 4.1.0)
rcmdcheck 1.4.0 2021-09-27 [1] RSPM (R 4.1.0)
RColorBrewer 1.1-2 2014-12-07 [1] RSPM (R 4.1.0)
Rcpp 1.0.8 2022-01-13 [1] RSPM (R 4.1.0)
readr 2.1.2 2022-01-30 [1] RSPM (R 4.1.0)
rematch2 2.1.2 2020-05-01 [1] RSPM (R 4.1.0)
remotes 2.4.2 2021-11-30 [1] RSPM (R 4.1.0)
renv 0.15.2 2022-01-24 [1] RSPM (R 4.1.0)
rlang 1.0.1 2022-02-03 [1] RSPM (R 4.1.0)
rmarkdown 2.11 2021-09-14 [1] RSPM (R 4.1.0)
roxygen2 7.1.2 2021-09-08 [1] RSPM (R 4.1.0)
rpart 4.1-15 2019-04-12 [2] CRAN (R 4.1.2)
rprojroot 2.0.2 2020-11-15 [1] RSPM (R 4.1.0)
rstudioapi 0.13 2020-11-12 [1] RSPM (R 4.1.0)
rversions 2.1.1 2021-05-31 [1] RSPM (R 4.1.0)
sass 0.4.0 2021-05-12 [1] RSPM (R 4.1.0)
scales 1.1.1 2020-05-11 [1] RSPM (R 4.1.0)
sessioninfo 1.2.2 2021-12-06 [1] RSPM (R 4.1.0)
shiny 1.7.1 2021-10-02 [1] RSPM (R 4.1.0)
sourcetools 0.1.7 2018-04-25 [1] RSPM (R 4.1.0)
spatial 7.3-14 2021-05-03 [2] CRAN (R 4.1.2)
stringi 1.7.6 2021-11-29 [1] RSPM (R 4.1.0)
stringr 1.4.0 2019-02-10 [1] RSPM (R 4.1.0)
survival 3.2-13 2021-08-24 [2] CRAN (R 4.1.2)
sys 3.4 2020-07-23 [1] RSPM (R 4.1.0)
testthat 3.1.2 2022-01-20 [1] RSPM (R 4.1.0)
tibble 3.1.6 2021-11-07 [1] RSPM (R 4.1.0)
tidyr 1.1.4 2021-09-27 [1] RSPM (R 4.1.0)
tidyselect 1.1.1 2021-04-30 [1] RSPM (R 4.1.0)
tinytex 0.36 2021-12-19 [1] RSPM (R 4.1.0)
tzdb 0.2.0 2021-10-27 [1] RSPM (R 4.1.0)
usdata 0.2.0 2021-06-21 [1] RSPM (R 4.1.0)
usethis 2.1.5 2021-12-09 [1] RSPM (R 4.1.0)
utf8 1.2.2 2021-07-24 [1] RSPM (R 4.1.0)
vctrs 0.3.8 2021-04-29 [1] RSPM (R 4.1.0)
viridisLite 0.4.0 2021-04-13 [1] RSPM (R 4.1.0)
vroom 1.5.7 2021-11-30 [1] RSPM (R 4.1.0)
waldo 0.3.1 2021-09-14 [1] RSPM (R 4.1.0)
whisker 0.4 2019-08-28 [1] RSPM (R 4.1.0)
withr 2.4.3 2021-11-30 [1] RSPM (R 4.1.0)
xfun 0.29 2021-12-14 [1] RSPM (R 4.1.0)
xml2 1.3.3 2021-11-30 [1] RSPM (R 4.1.0)
xopen 1.0.0 2018-09-17 [1] RSPM (R 4.1.0)
xtable 1.8-4 2019-04-21 [1] RSPM (R 4.1.0)
yaml 2.2.2 2022-01-25 [1] RSPM (R 4.1.0)
zip 2.2.0 2021-05-31 [1] RSPM (R 4.1.0)
[1] /cloud/lib/x86_64-pc-linux-gnu-library/4.1
[2] /opt/R/4.1.2/lib/R/library
────────────────────────────────────────────────────────────────────────────────────────