utoronto-2i2c / jupyterhub-deploy

Demo JupyterHub deployment for University of Toronto
BSD 3-Clause "New" or "Revised" License
3 stars 4 forks source link

learnr recorder functions #70

Open ntaback opened 3 years ago

ntaback commented 3 years ago

@yuvipanda this learnr tutorial https://github.com/ntaback/learnr_test2/blob/main/tutorial1.Rmd has a recorder function that captures user responses in a file resp.csv.

When the tutorial is run on the Jupyterhub
https://jupyter.utoronto.ca/hub/user-redirect/git-pull?repo=https%3A%2F%2Fgithub.com%2Fntaback%2Flearnr_test2&urlpath=shiny%2Flearnr_test2%2F&branch=main

the log file resp.csv records user_id as jovyan.

user_id,tutorial_id,event,label,answer,correct,
jovyan,my-first-tutorial,question_submission,quiz-1,tools,FALSE,
jovyan,my-first-tutorial,question_submission,quiz-2,stats,FALSE,
jovyan,my-first-tutorial,question_submission,quiz-2,tools,FALSE,
jovyan,my-first-tutorial,question_submission,quiz-2,lattice,TRUE,

I also notice that

jovyan@jupyter-3720d7b9-2dc092-2d4703-2da24b-2dd028696474a0:~$ whoami
jovyan

Is it possible to record user_id as utorid/UofT email that was used to login?