Reset State and Try Another Version

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.)

1 Like

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.

1 Like

Link to discussion on pretext-dev: https://groups.google.com/g/pretext-dev/c/eihSTgp_rOU

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.

A Reset State button could be an option though.

This is coming up again among different authors at the workshop. They envision limiting attempts and then giving students another fresh version of the problem if they didn’t get it right within that limit. Anurag does this using beta.doenet.org functionality, but we would need it within DoenetML to use within PreTeXt.

A Reset button would be great! Reloading a page can be tricky when the Doenet is embedded into a larger thing, like a PreTeXt book, and It would be great to be able to just scrap the changes a student makes to a single Doenet.

I’d also love a “get a new version” button for a randomized problem, if the versions are already generated and there.

1 Like

I could see a Reset State button being a reasonable features for DoenetML. I added an issue to request this feature.

I’m having trouble envisioning how a “give me a new variant” button works with the current architecture of DoenetML. The variant is designed to be specified by the parent app. If the Doenet is invoked with variant=47 by the parent app, it seems like it is violating the contract with the parent to then allow the student to change to variant 82.

One could imagine allowing the parent to tell Doenet “you take over control of variants”, and then Doenet switches to a mode where it exposes the “New version” button. Maybe that’s a framework that could work…

The way it works with WebWorK in PreTeXt is that everyone sees the same seed in static (which is what would appear in print). Once a problem is activated by a reader, a random seed is used to give the reader a variant. The reader can hit “randomize” to get a new variant, and if the reader answers that correctly, the score is stored and counts. But if the reader navigates away and comes back and hits activate again, the original random seed is used again, even though the last saved answer (which might have been to a different variant) is the one that is restored.

The result is that someone could have a 100%, but when they hit activate, all their answers are wrong. This could be confusing, but I’ve never had a student question it. Maybe they don’t actually use the randomize button much?

My students asked for the ability to go back and try problems again before a test, which is currently difficult because their old answers are restored in Runestone, so a reset button would seem to be enough for me.

Because Steve’s stuff deals with binary where there are only 2 options for each answer box, he was wanting to limit to 2 attempts and then provide a new variant to try again, so the WeBWorK model wouldn’t work for that use case. I guess he could manually have like 15 variants, each one conditional on the previous variant running out of attempts?

I added another issue about creating a mechanism to allow Doenet to manage variants and show a “New version” button.

I’m pretty sure that, when saved state is sent back to Doenet, it includes the variant used. This should not allow a mismatch between the saved students values and the numbers used in the that displayed variant.

1 Like

At the community workshop I made an activity that allowed students to control their “seed” on a problem by typing in a group number. I wanted all students in Group 1 to have the same problem as each other, but different problems from other groups. They could get a new problem by typing a different group number at the start of the problem.

My activity technically only has one variant, but I generate a list of different constants that will be referenced by the group number. Perhaps someone could turn this idea into a “Show me another” button? Clicking the button would select from sequence, which would then generate a new version.

I am not sure how you would control whether a student receives credit or not because I have no idea how that part is handled.

Here is my activity: Group Variants Example

1 Like