The editor supports some basic templates, but it would be nice if the *user* can add templates to this list. This could be done by:

1) Adding a new field to the general Closed Question edit form (so: outside of the editor): 'Use this question as template in the editor'.
2) When the editor's code is being forged server-side, the XML of all questions having 'Use this question as template' = true is added to the list of templates.
3) In the editor's template tab, templates are ordered by question type, for example:

  • General templates
    • Hotspot
    • ...etc
  • User-defined templates
    • Multiple answer
      • Which cities are in The Netherlands? Use this template / View question
      • What do you need to make Tea? Use this template / View question
    • Select & Order
      • Design an experimental procedure... Use this template / View question
      • Select and order the needed... Use this template / View question
    • ...etc

Comments

HylkeVDS’s picture

It's an interesting feature, but not quite as simple as that.

Adding a field to a questions either means adding a dependency on cck, or adding a table for each question.
The list of template questions can then be created using a view and turned into a json object.
This can then be loaded by the editor using an ajaj call and added to the template list.

Sorting the questions by type is quite something else, as the only way to get the question type is to interpret the complete XML, and that is not something you want to do for a lot of questions every time the editor loads.

I'm not sure I'll have time for this soon, but if anyone wants to make a patch... :)

jvdkolk’s picture

Title: Editor: Let users use current CQ-nodes as template » Editor: Let users clone questions, using current CQ-nodes as template

Ok.

The Node clone module (http://drupal.org/project/node_clone) also seems to do the job pretty well.

jvdkolk’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)