User Name in LearnR

I am trying to write quizzes for my students and need them to enter their user name in an input control field (only the user name; no authentication needed). This user name should be available in the setup-chunk and therefore in all other chunks. My problem is that I am not able to read the user name form the input control field when the app is deployed on the server. Are there any ways to accomplish this either though an input control or a url parameter. I got both to work on the local but not on the shiny server.

Below is a simplified example. The user enters a numerical user name and the chunk calculates the square root of the user name. How can I this get to work on the server.
Many thanks in advance, I tried a lot of things but they did not work.

Carsten

Click here for a code example (RMD file).

1 Like