Skip to content

Commit

Permalink
Add label to exercise_hint event (rstudio#377)
Browse files Browse the repository at this point in the history
  • Loading branch information
trestletech committed May 27, 2020
1 parent 8c431a4 commit c8fde49
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: learnr
Type: Package
Title: Interactive Tutorials for R
Version: 0.10.1.9003
Version: 0.10.1.9004
Authors@R: c(
person("Barret", "Schloerke", role = c("aut", "cre"), email = "barret@rstudio.com",
comment = c(ORCID = "0000-0001-9986-114X")),
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ learnr (development version)

* Added an `exercise_submitted` event which is fired before evaluating an exercise. This event can be associated with an `exercise_result` event using the randomly generated `id` included in the data of both events. ([#337](https://github.com/rstudio/learnr/pull/337))
* Added a `restore` flag on `exercise_submitted` events which is `TRUE` if the exercise is being restored from a previous execution, or `FALSE` if the exercise is being run interactively.
* Add `label` field to the `exercise_hint` event to identify for which exercise the user requested a hint. ([#377](https://github.com/rstudio/learnr/pull/377))

## Bug fixes

Expand Down
3 changes: 3 additions & 0 deletions R/http-handlers.R
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ register_http_handlers <- function(session, metadata) {

# event recording
session$registerDataObj("record_event", NULL, rpc_handler(function(input) {
# Augment the data with the label
input$data$label <- input$label

record_event(session = session,
event = input$event,
data = input$data)
Expand Down

0 comments on commit c8fde49

Please sign in to comment.