-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make shiny modules for quiz questions (instead of htmlwidgets) #194
Conversation
…nges going further
* upstream/master: Highlight code and exercise area (rstudio#185) save metadata information using dput vs deparse (rstudio#190)
* master: Aggressive Prerender checks within rmarkdown (rstudio#179)
…down::shiny_prerendered_chunk`
… mechanisms use s3 methods for * question_initialize_input * question_completed_input * question_is_valid * question_is_correct * question_disable_selector (will probably remove)
|
To (partially) answer my own question, the |
I can't get this to work in RStudio. It seems to me like the S3 methods are not registered properly. This is what I'm testing with:
Instead of the report launching, I get each individual answer launching in a new window. If I use Update: Oh, interesting. I had some local changes to htmltools that caused this. Seems to almost be working now, other than the missing import declarations I mentioned below. |
Also there seem to be a lot of missing import declarations, R CMD check will point them out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll try again after you get the right imports in place so it works in RStudio.
I'll have some feedback about question_module_server
as well, we can discuss that after I am actually able to run tutorials.
…dd submitted answer
…function better on JS side
… events and add a corresponding not completed event
Do not broadcast to client that quiz questions are correct
* master: Bump rmarkdown version to >= v1.12.0 (rstudio#220) Explaining that the example is just an example (rstudio#203) Adding missing word 'in' to sentence. (rstudio#200) Converting _it's_ (it is) to _its_ (possessive). (rstudio#201)
…io#194) * First pass at making a radio shiny app. Commenting for now to see changes going further * encode quiz question / answer text to be UTF-8 * first pass at abstract radio shiny app * add checkbox to shiny app questions * always display the default incorrect / correct message in addition to extra messages * first pass at a text input question * add the option back to the answer object for legacy * ignore atom config folder for local settings * failed attempt to use raw shiny module. moving towards using a `rmarkdown::shiny_prerendered_chunk` * use dput_to_string instead of list_to_string * checkbox is working with simpler s3 method calls and leveraging shiny mechanisms use s3 methods for * question_initialize_input * question_completed_input * question_is_valid * question_is_correct * question_disable_selector (will probably remove) * checkbox and text questions work (without disable) * questions do not depend upon shinyjs to disable elements * move slickquiz / slickquiz tutorial css to rstudio-theme * comments for mutate_tags * do not double encode quiz_text content * use knit_print.question and not question_to_shiny * add more TODOs * submit question submission event * more todos * make sure answers submitted are not generated with random ids * get a prior submission for a given question * rewrite question reactivity to depend only on submitted answer * set up userData$learnr_state This allows for waiting for a round trip from the browser to make sure information is initialized. Once initialized, prior question submissions can be retrieved. Without this, questions will try to retrieve information too early. Questions should not be displayed until prior submission is retrieved. Do not want to display a blip of temp state. * allow for local development to work as localhost * default the ui to display "loading..." - Seems better than a pure vertial jump when loaded * add temp sleep command to visually see "loading..." * remove %>% usage * importFrom utils getFromNamespace * make quizes work with shiny based questions * enforce question_is_correct_value return objects * return only the single question restore value when restoring a question * Join similar message types line break space out with to <br/> tags * move finished todos with comments away from other todos * first pass at passing r cmd check * first pass at removing slickQuiz * update todos and fix s3 class value in question_stop * document * add comment about localhost and devtools::load_all() * remove more of slickquiz and the question_submission http-handler * reduce the set of ids supplied in a question * wrap a question answer container in a div to allow for styles to be applied * ignore tmp tutorials * update js queries * do not double record event * remove question_submission init progress event and restore submission * broadcast question event submission to client * match js css classes * tell the client when the app has loaded about the restoring answer * do not notify the client about quiz questions being correct. but do add submitted answer * save question reset on server side * make the question's shiny ui have a wrapping div for each question * barret validate that chunk lables do not have unwanted characters to function better on JS side * have NS id be the chunk label * more answers -> answer storage names * fix str_trim to trim all white space on right side * display a loading item until the question loads * when a question is reset with try_again, remove all matching progress events and add a corresponding not completed event * if knitr is not in progress, no need to verify the chunk name * pass R cmd check * update notes * move answer -> answer officially. add comment for docs * export methods to be found at execution time. ignore all tutorial .html files.
Fixes #192
Fixes #173
Fixes #109
Fixes #217
Will make a separate PR for text box input-based questions(included)