Skip to contents

Lock all "submit" buttons. This is used when the user can re-try questions and will not receive feedback until they submit the entire tutorial. This will not technically "lock" the exercise submit buttons, however, it does prevent the saving of any further exercise attempts. Once the tutorial is locked a download option will appear.

It is recommended that 'lock_check_ui()' is included before the lock button so users can check if they forgot to submit any questions or exercises.

Shiny ui and server logic for the lock computation.

Note that when including these functions in a learnr Rmd document it is necessary that the server function, lock_server(), be included in an R chunk where context="server" as they interact with the underlying Shiny functionality. Conversely, the ui function, lock_button_ui(), must not be included in an R chunk with a context.

Usage

lock_button_ui(id, label = "Lock Exam")

Arguments

id

ID matching ui with server

label

Label to appear on the submit grade button