I'm considering IPython notebook for educational purposes. The idea is to provide the students with webbased demos that illustrate some topics of the lecture. I'd like the students to be able to change the parameters of the code so that they can study their impact or even create their own examples.
I've learned that it is possible to setup a public Ipython notebook server. As I understand it, it provides the full functionality of notebooks (not just displaying them) but exposed to the public. Is that right?
Bonus question: how can I prevent users from persistently changing the notebooks but provide the with a "session copy"?
Sharing LocallyYou can export to a variety of formats from within the notebook by navigating to File -> Download As. You'll want to export your notebook as a Jupyter Interactive Notebook ( . ipynb file format) if you'd like the person you're sharing it with to interact with the notebook.
Run the jupyter notebook on server you can go to chrome and type, http://{your ip address}:8888 to access the same jupyter notebook. Congratulations!
As for the second point, I have a working setup on my local machine. I haven't tested it on a server, so your mileage may vary. Simple solution: I made the *.ipynb file read-only. A quick test showed me that I can access it through the online notebook, make modifications, run the code, try to save ("notebook save failed"), download the modified file as a *.ipynb file since saving didn't work, and carry on from another local notebook. I hope this matches your use-case.
Edit: I feel I should clarify the behaviour a bit. Basically, each user has their temporary session which persists pretty much until they navigate away from the page. If this is in a university lecture-hall, I'm sure you'll hear the occasional "Oh &%$#!" when someone closes their browser by mistake, but the notebook does prompt before allowing you to navigate away, so I feel that this should be fairly rare. Once they navigate away from the page, all their work is gone. I think this fulfills the criteria for a non-persistant session copy.
Yes, that's right. A public iPython notebook server provides the full funcionality to everyone who connects to it via a browser. So everyone who has the server's password can edit/create/delete notebooks on this server.
As far as I know, there's no possibility to prevent users from persistently changing the notebooks on the server. A dirty workaround would be: Every student copies your central notebook (File --> Make a copy) and works in the copied notebook only. This, however, doesn't prevent abuse/unintentional changes by the students in the central notebook.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With