Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grade_this({fail()}) does not respect fail.hint option #323

Open
rossellhayes opened this issue Sep 30, 2022 · 0 comments
Open

grade_this({fail()}) does not respect fail.hint option #323

rossellhayes opened this issue Sep 30, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@rossellhayes
Copy link
Contributor

library(gradethis)
ex <- mock_this_exercise(.user_code = "sqrt(log(2))", .solution_code = "sqrt(log(1))")

gradethis_setup(fail.hint = FALSE)
grade_this({fail()})(ex)
#> <gradethis_graded: [Incorrect]
#>   Incorrect. In `log(2)`, I expected `1` where you wrote `2`. That's
#>   okay: you learn more from mistakes than successes. Let's do it one
#>   more time.
#> >

gradethis_setup(fail.hint = TRUE)
grade_this({fail()})(ex)
#> <gradethis_graded: [Incorrect]
#>   Incorrect. In `log(2)`, I expected `1` where you wrote `2`. That's
#>   okay: you learn more from mistakes than successes. Let's do it one
#>   more time.
#> >

Created on 2022-09-30 with reprex v2.0.2

@rossellhayes rossellhayes added the bug Something isn't working label Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant