Skip to content

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

Description

@rossellhayes
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions