View source: R/with_exercise.R
with_exercise | R Documentation |
grade_this()
blockThis function is not intended to be used within grading code, but may be helpful for testing grading code.
with_exercise(exercise, expr)
exercise |
An exercise, as created by |
expr |
An unquoted expression |
The value of grade_this(<expr>)(exercise)
exercise <- mock_this_exercise(.user_code = "2", .solution_code = "1 + 1")
with_exercise(exercise, pass_if_equal())
with_exercise(exercise, fail_if_code_feedback())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.