The following functions are modified from Colin Rundel's learnrhash, available at https://github.com/rundel/learnrhash, which enable the encoding, downloading and decoding of hashed answers.
Note that when including these functions in a learnrhash Rmd document,
it is necessary that the server function submit_hash_server()
be
included in an R chunk where context="server"
as they interact with
the underlying Shiny functionality. Conversely, the ui function
submit_hash_ui()
must not be included in an R chunk with a
context="server"
.
submission_server
submission_ui
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.