There can be cases where the functions
testwhat features are not sufficient to robustly check a student submission while providing good feedback at the same time. In addition, there might be courses in which you find yourself using the same SCT pattern over and over.
teswhat.ext is a public R package on GitHub that can feature both custom functionality as well ‘meta SCTs’ to employ in multiple exercises.
To get started with using
requirements.r file of the course in which you want to use your custom functionality, add the following line:
"v1.2.3"points to the new release of
sct block of your exercise, use
library(testwhat.ext). You can now use your custom built SCT function as if it was a function exported by
A word of warning. Before you embark onto the wild adventure of writing your own SCT functions, be aware that there is a lot that students can do wrong with their submission, and it is your job to catch every edge case that can potentially break the code. Therefore, it is advised to combine already existing
testwhat functions in your extension function, rather than building
check_ functions from scratch.