Python content type
I might create a new content type that would help people teaching python.
Be warned, there is a high probability that I will never do it. It's just something that I need, that I started to think about it, but I am not sure I will find time to do it and if I will success.
The idea is to allow the teacher to create an activity, the student must then write some python code that will be evaluated automatically and give him points if it's the good solution.
The author UI will contain :
- A textarea (with syntax highlighting) that would allow to set the default code.
- A textarea to add instruction ? Not sure about it as you can put instruction outside of the h5p activity.
- a textarea with the solution
- a number input field that would allow to set the max score
When the student submit it code, it is executed with the skulpt library. If the output match the solution output, then the max score is awarded.
If there is error in code, the error message is displayed.
There would also be an advanced checkbox. Checking that will display more option :
- a textarea containing code to execute before the student code
→ a function to get the ouput (as a unique string or as an array of string)
→ a function to display a feedback message
→ a function to set score to the user
If you have any though to share, feel free to do it.