datacamp / testwhat

Write Submission Correctness Tests for R exercises
https://datacamp.github.io/testwhat
GNU Affero General Public License v3.0
33 stars 26 forks source link

testwhat_learnr crashes learnr tutorial if solution code is provided but no user code #234

Open astamm opened 5 years ago

astamm commented 5 years ago

It seems that the -check chunk fails to create the RootState R6 object because it cannot find the formatted_output object since the user did not yet provide code to evaluate by accidentally clicking the Submit Answer button. While it is true that submitting empty solutions should rarely happen, the current behaviour of crashing if it happens is a little bit annoying. This does not happen if the -solution chunk is left empty though, in which case a nice blue message is displayed, informing the user that no solution was provided for this exercise.