Skip to content

Commit

Permalink
Make shiny modules for quiz questions (instead of htmlwidgets) (rstud…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
schloerke authored Apr 9, 2019
1 parent ab5e427 commit e21e2cd
Show file tree
Hide file tree
Showing 3 changed files with 273 additions and 182 deletions.
124 changes: 0 additions & 124 deletions hello/hello.html

This file was deleted.

Loading

0 comments on commit e21e2cd

Please sign in to comment.