#' @include simple_question.R
NULL
#' @export
ShortanswerQuestion <- R6::R6Class(
"Shortanswer",
inherit = SimpleQuestion,
public = list(
type = "shortanswer",
dist = 0,
initialize = function(text,
data = quote({}),
hidden_data = quote({}),
seed = NULL,
hidden_seed = NULL,
feedback = NULL,
answer = NULL,
dist = 0,
tags = NULL) {
super$initialize(text,
data = data,
hidden_data = hidden_data,
seed = seed,
hidden_seed = hidden_seed,
feedback = feedback,
answer = answer,
tags = tags)
self$dist <- dist
},
get_inst_cookie = function(opts, info) {
answer <- get_evaluated_answer2(opts, info)
sprintf("{%s:NM:=%s}", 1, answer)
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.