Autograding in pluto notebooks #1296
-
We began discussing this on the Julia slack channel. But @fonsp thought it would be a good idea to move to here! Original Question:
Others replied. But I'm not comfortable copy and pasting their responses to a public forum from a semi-private forum. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 7 replies
-
I worked on this for the computational thinking course, implemented inside pluto notebooks. The code is outdated, and will not run with latest Pluto, but you can still read it to get an idea of what I was going for: https://github.com/fonsp/disorganised-mess/tree/main/autograding The idea is to run all notebooks and run test statements inside them that either return true/false (correct/incorrect) or a value (extract student.name). Results are stored in a DataFrame, and you can view student notebooks in a little window inside the grader notebook to review them. |
Beta Was this translation helpful? Give feedback.
-
For completeness, I will also mention the idea of live checking student code. We used this for almost every exercise in https://computationalthinking.mit.edu/Spring21/homework/, and it gives a fantastic experience for students. The idea is that every exercise is structured like: md"""
# Exercise 1.1
👉 Implement `hello` that returns two times the argument `x`.
""" function hello(x::Number)
return missing
end hello(4) let
result = hello(7)
if !(result isa Number)
md"Make sure that you return a number!"
elseif result == 14
md"Well done!"
else
md"Keep working on it!"
end
end and the last cell would be folded. Because of reactivity, the last two cells re-run whenever the student updates their function, giving them immediate feedback. I discuss this in more length here: https://www.youtube.com/watch?v=QBkXmTen6P4 and the upcoming JuliaCon 2021 talk about https://computationalthinking.mit.edu/ |
Beta Was this translation helpful? Give feedback.
-
Given that a pluto notebook is basically a julia file, isn't running tests good enough to solve the problem? Say the requirement is to define a function |
Beta Was this translation helpful? Give feedback.
-
For those wondering here. I've taken what @fonsp has done and updated it a bit. I've put up A1_grader here https://github.com/mkschleg/PlutoGrader, if anyone wants to use it as a template. It is self contained because ofPluto v0.15.x. I can send a version of the assignment if you want, I just want to keep it off git because it will be for a course that will be taught this fall. |
Beta Was this translation helpful? Give feedback.
-
Here's what I've come up with so far: https://github.com/ctessum/Grader.jl It currently integrates with https://www.prairielearn.org/ but with a different output format could work with any other system. |
Beta Was this translation helpful? Give feedback.
I worked on this for the computational thinking course, implemented inside pluto notebooks. The code is outdated, and will not run with latest Pluto, but you can still read it to get an idea of what I was going for:
https://github.com/fonsp/disorganised-mess/tree/main/autograding
The idea is to run all notebooks and run test statements inside them that either return true/false (correct/incorrect) or a value (extract student.name). Results are stored in a DataFrame, and you can view student notebooks in a little window inside the grader notebook to review them.