You can configure ordo to have a system wide default feedback messages.
Just set the ordo_default_success or ordo_default_failure configuration options in your ~/.jupyter/nbconfig/<section>.json
"ordo_default_success": "You've done well to get the correct answer",
"ordo_default_failure": "That answer is not correct, please try again"
The ordo grading tool allows authors to provide in line feedback to users of their notebook. The examples below illustrate key features of the notebook.
- Enter Feedback Mode to run the cells and evauluate your input - Enter Edit Mode to create/edit your feedback messages
- Show solution for the current cell
- Add new solution - Add success message for feedback - Add failure message for feedback - Make what's in this cell the current solution - Set the currently executed cells output to it's solution
Once installed, the extension runs in any language within any Jupyter notebook. Beware, it will only grade returned values. print
values in Python, for example, return None
and are ignored.
5+4.0
'Hello, World! This is an Ordo Test'
Only cells which have solution in the cell metadata are evaluated for grading.
# this cell has no associated solution
def addOne(n):
return n + 1
# this cell is configured with a solution of 7
addOne(6)
When an answer is incorrect, student's will receive a different response.
# this cell is configured with a solution of 7
addOne(10)
Notebook authors can either use the default ordo messages above or, they can define specific ones they would like within the cell metadata with either the ordo_success or ordo_failure
MIME types.
# this cell is configured with a solution of 7
addOne(6)
# this cell is configured with a solution of 7
addOne(20)
An example of a cell with a pandas dataframe as a solution
import pandas as pd
d = [{'b' : 1, 'a' : 0, 'c' : 2}]
pd.DataFrame(d)