After some substantial work, I have created the first application for this: the Journaling Assignment!
Learners can write in rich text (thanks to the summernote editor), it gets saved in the backpack, and they can submit it for a grade. The current version just checks submission length, so this is “required activity” rather than “graded essay” but we’ve already got several courses where this would be useful.
There’s one real weird thing about this: you can’t have the summernote editor in the same component as the jsinput problem. If you do, the getState and setState functions for the jsinput problem don’t fire. If you have any idea why, suggestions are definitely welcome - we’re stumped over here. Gonna try to fix this one, so if you want to hold off on implementing this I don’t blame you.
However, I also got something nice on the way to this! If you use hx-js, you can also use the editor on its own without the assignment. Just make a div with the class hx-editor
and it’ll automatically get converted into a rich text editor. The data-saveslot
attribute will tell hx-js where to store things, so you can show students their own writing again later on.