What I am doing:
I am implementing a new question type using the "question type template" module. This sets up a standard interface - also with a general feedback html-editor option.
What I would like to do:
For the general feedback editor I would like to give the teacher the option to chose between the text- or html-editor just like it is implemented in the lesson module when adding a question page.
This means there should be a text-editor as standard for the general feedback. If the teacher wants to use the html-editor instead he/she needs to click onto the "Use editor" check-box. Since there is only one editor that should have this feature it would be nice to load the correct editor right away. If this is not possible a button "Refresh editor" may do the change.
What I have done so far:
So far I can display a separate Text-box similar to what I want using this code: (see my new question type module attached as .zip-file)
echo " [".get_string("useeditor", "qtype_so_sourcecode").": ". "<input type=\"checkbox\" name=\"useeditor\" value=\"1\" />";
helpbutton("so_generalfeedbackhint", get_string("useeditor", "qtype_so_sourcecode"), "qtype_so_sourcecode");
echo "]<br />\n";
print_textarea(false, 5, 70, 630, 300, "editor");
Asking for help:
1) How can I tell the generalfeedback-editor to display this option?
2) What do I have to implement in order to switch between both editors (with or without the "Refresh editor"-button)?
3) Will all the typed text parsed correct or do I have to take care of that? If I have to take care of that - how?
I really appreciate every feedback,

Süreç