As I’m starting to use Doenet within PreTeXt within Runestone, I think it would be really nice to add a couple of buttons to allow students to reset the state, and also to try another version of the problem if one exists.
Both because I think students would benefit from the ability to practice problems more than once, and for another practical reason: it has already happened that students found graph elements that were draggable when they shouldn’t be, and I edited and rebuilt to fix it for everyone else who might not have noticed yet. However, if they had left a line segment dragged to a different location to demonstrate the problem, now it can’t be dragged anymore and is in the wrong spot because of the restored state. It would be nice if a student could just reset the problem if desired.
I think that if you change the document source, then it should not load in state that was saved with the previous source. It should instead just reinitialize the document. Loading state from a different source could lead to unpredictable results, such as objects in the wrong spot that can’t be moved.
Previously, we protected against loading in state from the wrong document, but it appears that protection has been lost with the new mechanism for saving/loading state.
I’m pretty sure one next step is to ignore loaded state that was saved with a different document source. Not sure how hard that will be implement. (We’ll see if that can be done in a backwards-compatible manner.)
I’ll need to involve the PreTeXt and Runestone folks to discuss adding a Reset state button or try new version button, as I think that would require changes on their part.
The PreTeXt folks don’t want to add a facility for a New Version button while Doenet is still just an “interactive”, as opposed to graduating to be an “exercise”. That decision makes a lot of sense to me.
I’m not sure what to do in the mean time. (We are talking months before we could get to the point of being an “exercise”, as we haven’t yet turned our attention to that.) Plus, they haven’t expressed a willingness to add such a button for an “exercise”, just that they don’t want to add it for an “interactive.”
I’m reluctant add the complexity for Doenet itself to provide the New Version button, as it goes against how I envision the design.