Closed jdtrat closed 3 years ago
:scream: this is fabulous, thank you! I'll test it out a bit on my end to see if it works consistently
Ok, two steps forward one step back! I have figured out how to get shiny into these learnr docs (maybe you already knew how to do this! https://community.rstudio.com/t/incorporating-shiny-with-learnr-modules/79827/4) BUT now I've realized that the user_id
is informative locally, but not on my shiny server (where it is always shiny
😠) - working on another system for logging, but go ahead and proceed with creating the demographic questions using shiny inputs.
Very nice! I used this resource for creating the PR and I believe it's the same site that cpsievert suggested. The main way to track client data I believe is with session$clientData
. Here's an article describing that, though I don't know if it contains the information you would need. Here's another alternative I found.
Searching through the
learnr
code identifiers.R and events.R, they initialize theuser_id
usingSys.info()["user"]
. Adding the chunk works on my local machine. I am not 100% sure if/when theuser_id
variable gets changed, so this should be tested more explicitly. However, I think that it only gets changed if a custom identifier is defined (see here). The code would also have to be updated for persistent storage with Dropbox, which I would love to learn how to do.