Electives
Electives is a simple gem that allows you to customise success and failures.
- fail(state, msg='fail')
Always fails the SCT, with an optional msg.
- success_msg(state, msg)
Changes the success message to display if submission passes.
- Args:
state: State instance describing student and solution code. Can be omitted if used with Ex(). msg : feedback message if student and solution ASTs don’t match
- Example:
The following SCT changes the success message:
Ex().success_msg("You did it!")