Modifications to Learnr User-Interface #716
-
I have a few questions about the Learnr package, which I hope someone might be able to answer. Let me provide some context first. I recently have been using the Learnr package to conduct an experiment and obtain survey data. I understand that that was not the original intention of the package; however, it has really served well for this purpose. However, there are few things I would like to modify, and I could not seem to find any sources indicated if these modifications are possible. The following are the modification I would like to implement:
I really would appreciate any help. Thank you for taking the time to respond to my inquiry! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
Thanks @kgranillo10! I'll answer each one individually: Remove the Menu Bar to the left of the interfaceIf you want to hide the navigation menu but still use learnr's content paging via the Continue button, you can use a little bit of CSS: .topicsList .nav {
display: none;
} Or to completely remove the sidebar and make the content panel "full-width", use these rules: .topicsContainer {
display: none;
}
.topics {
width: 100%;
} Remove the "Run Code" button and only leave the "Submit Answer" buttonSimilarly, you can use a small CSS rule to achieve this. .btn-tutorial-run:not(:last-child) {
display: none;
} This rule will actually only hide the "Run Code" button if the "Submit Answer" button is present. So if an exercise doesn't have a solution, the "Run Code" button will still show and users will always have a way to evaluate the code. Remove the option to continue to the next page without first submitting answersYou can use ---
output:
learnr::tutorial:
progressive: true
allow_skip: false
runtime: shinyrmd
--- How to include custom CSS
|
Beta Was this translation helpful? Give feedback.
Thanks @kgranillo10! I'll answer each one individually:
Remove the Menu Bar to the left of the interface
If you want to hide the navigation menu but still use learnr's content paging via the Continue button, you can use a little bit of CSS:
Or to completely remove the sidebar and make the content panel "full-width", use these rules:
Remove the "Run Code" button and only leave the "Submit Answer" button
Similarly, you can use a small CSS rule to achieve this.
This rule will actually only hide the "Run Code" button if the "Submit Answe…