Strategy for editing STACK questions

Strategy for editing STACK questions

by Martin Kraska -
Number of replies: 6

After repeatedly having spoiled a question by accidentally opening and saving it with a non raw text editor (Atto) I wonder how I could streamline my workflow and avoid such accidents.

I find myself constantly switching between unformatted editor and Atto or TinyMCE (don't know the implications of choosing one or the other). This always takes a series of mouseclicks, just for changing a setting in the question like type checking.

It seems there isn't an undo option for such accidents, is it?

I see these options:

- Stick with the unformatted editor and use an external html editor for visual editing (copy from Moodle, do the edit, copy back) to avoid editing raw html and enable insert of images

- keep separate files with the contents of the cas regions in stack questions and paste them into moodle in case of an accident or when I create the content.  In fact that is what I do with JSXGraph content outside STACK in order to have syntax highlighting when doing edits.

- make backups (export) of questions and re-import them in case of accidents. Yet I didn't find a way to export individual questions.

Any of these ways generates significant amount of extra work load. Is that the way it has to go or do I miss something?

Martin

Average of ratings: -
In reply to Martin Kraska

Re: Strategy for editing STACK questions

by Christopher Sangwin -
Picture of Particularly helpful Moodlers Picture of Plugin developers

This might not be the answer you want, but my plans are to create a YAML format in parallel with the Moodle forms. This will be a single text file for each question.  That way you can edit, and have complete transparency over the format.  Hidden span tags are evil, and we need a way to sort this out.  This can be frustrating, but my workflow is to use a raw textarea, with no editor to avoid them.

Chris

Average of ratings: Useful (1)
In reply to Christopher Sangwin

Re: Strategy for editing STACK questions

by Martin Kraska -
Chris,

thanks for clarifying this. I understand that I have to use raw text areas in STACK. Yet, with my weak html knowledge and resistance to the double amount of typing I can't use raw text for general moodle content. So my remaining questions are
- Is there a way for backup and restore for individual questions? Would the above mentioned YAML format enable this?
- Is there a recommended external editor for creating rich text and transfer by clipboard to moodle raw text regions including images, links and the like? This would allow me to stick with raw text areas.
- Is there some shortcut/hotkey for change of editor?

Martin
In reply to Martin Kraska

Re: Strategy for editing STACK questions

by Martin Kraska -
One of my questions was how to export an individual STACK question.

I found out this myself. You can do that in the preview window. (Export as Moodle XML)
In reply to Martin Kraska

Re: Strategy for editing STACK questions

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Create another user and set it's editor preference to unformatted, then login as that new user when working on quiz questions. I do this and only use Chrome when logged in as that user. My normal user I log in only from Firefox. I often have them both logged in at the same time and just switch browsers as needed. Helps to run dual monitors too, or a single 4k or larger one.
Average of ratings: Useful (1)
In reply to AL Rachels

Re: Strategy for editing STACK questions

by Martin Kraska -
That is really a consequent solution. Need to ask my admin for a secondary login. BTW, I see that there are slight differences:
- Atto spoils math and JSX.
- TinyMCE is ok as long as you don't have JSX content. Thus, this can be used for everything without dynamic images.
In reply to AL Rachels

Re: Strategy for editing STACK questions

by Martin Kraska -
How about an option to tag text regions as protected or raw, either by some option button or by some text tag in the beginning? Has such a feature request been considered?