Skip to content

Commit

Permalink
Merge pull request #146 from rstudio/fix136
Browse files Browse the repository at this point in the history
Display full HTML messages if provided by the `incorrect` or the `correct` args to `question() `
  • Loading branch information
Barbara Borges Ribeiro authored Mar 9, 2018
2 parents 346a5ee + 68fe595 commit 838cd71
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
learnr 0.9.2
===========

* Improved documentation for deploying `learnr` tutorials in Shiny Server. ([142](https://github.com/rstudio/learnr/issues/142))
* Fixed [#136](https://github.com/rstudio/learnr/issues/136) by displaying full HTML messages (rather than just the text) if provided by the `incorrect` or the `correct` args to `question()`. ([#146](https://github.com/rstudio/learnr/pull/146))

* Improved documentation for deploying `learnr` tutorials in Shiny Server. ([#142](https://github.com/rstudio/learnr/issues/142))

* Fixed a highlight.js issue from rmarkdown 1.8. ([#133](https://github.com/rstudio/learnr/issues/133))

Expand Down
2 changes: 1 addition & 1 deletion inst/htmlwidgets/quiz.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ HTMLWidgets.widget({

// look for custom messages
var msg_class = correct ? '.correct' : '.incorrect';
var message = $(el).find('.responses').children(msg_class).children('div').text();
var message = $(el).find('.responses').children(msg_class).children('div').html();
var messages = $(el).find('.answers').children(msg_class + '[data-message]');
messages.each(function() {
if ($(this).children('input').is(':checked')) {
Expand Down

0 comments on commit 838cd71

Please sign in to comment.