I Created a new discussion topic by copying three topics from: Syntax Highlighting filter-discussion
by Süreç Özcan - Tuesday, 12 February 2008, 03:08 PM:
What I want to do is expanding Moodle by allowing to create a question type called "source code" adding java code instead of a normal description with syntax highlighting. Other features of my new question type shall be:
1. Several editors: Each editor should include one java-class. If more classes shall be added to the "source code"-question type then this should be enabled through an "add new class"-button which displays a new editor.
(Note: using the html-editor needs some time for uploading - therefore it might not be smart using it?)
2. Source code editor arrangement: There shall be a select-option to display one or two source codes per row. This way longer source codes get a readable display on the monitor. (so far I had used the table option in the html-editor which didn't work all the times - I don't know why.)
(Note: I don't know if this is possible to realise in Moodle at all though.)
3. Next to it I would like to enable for each displayed source-code-editor uploading a .java-file from e.g. the users desktop into the questions (html-?)editor, downloading the current code into a .java-file on e.g. the users desktop and deleting the editor in case it won't be used anymore.
4. Requirement: It would be nice to be able to fill up an editor by whether:
* uploading a .java-file or
* through own input while creating this question type or
* through a copy and paste from another file into the editor.
So what interests me is if someone could tell if I should use the HTML-editor or if I should use another syntax-highlighting supporting editor-plugin which is not as complicate as the html-editor? I have no clue of how complicate it would be to enable such a feature in moodle. Therefore my first idea was to use the html-editor instead (only if I first get the syntax-highlighting set though

by Paul Preney - Tuesday, 12 February 2008, 04:24 PM:
I like your idea of a specific editor configured for programming code. That might be the easiest way to make code work. However, it would require some modules to allow "multiple" information types --like the question module. So, for general use across modules more thought is required. Your idea ought to work very well for a programming question type, however.
Currently, Moodle supports only one editor AFAIK, however, from looking at code in v1.9 it looks like it is being expanded to support more than one. The last I checked (early Jan.) the documentation on this new ability is very poor. Hopefully, it has improved, but, I don't know how flexible it is. Ideally, I'd like to see what you suggest (i.e., a programming-specific editor) and the ability for the HTML-type editor to support inline code with it easy to specify which one to use.
by Süreç Özcan - Wednesday, 13 February 2008, 02:54 PM: (only a part of the post which fits here better)
So do I get you right that you suggest me using another editor and not the HTML-editor for my purposes?
This is how it looks like right now just to get an idea - the functionality is not implemented yet (the question text-part will be deleted and instead the source code part will be usable):