************************************************************************************************** This file shall help you to get the syntax highlighting configured. This way the source codes will be displayed syntax highlighted when taking a quiz. ************************************************************************************************** 1. Set up "Filter: Syntax Highlighting" - Download "Filter: Syntax Highlighting" from "Modules and plugins" page: http://moodle.org/mod/data/view.php?d=13&rid=192 - copy and paste the extracted folder "geshi" into the path moodle\filter\ (Note: double clicking into the extracted "geshi" folder should list another geshi-folder and the README.txt, filter.php and styles.php) 2. Enable Geshi-filter in 1.8 from "Administration/Modules/Filters" in 1.9 from "Administration/Modules/Filters/Manage filters" 3. to use syntax-highlighting also in forums: I REPLACED the filter.php (see forum entry: http://moodle.org/mod/forum/discuss.php?d=43266#p398673) after unzipping the geshi.zip file into my */filter/ directory on my server. The reason is it uses square brackets instead of angle brackets allowing it to be used with the HTML editor --which is important for forums. (saved one folder above of this file) 4. Open http://yourmoodledomain/moodledir/filter/geshi/styles.php (e.g. http://localhost:8080/moodle/filter/geshi/styles.php) 5. Copy-and-paste the result to a file called "geshi.css" in your Moodle theme directory. (theme\standardlogohighlighting(your new theme)\geshi.css) If you don't have your own theme, then I highly recommend that you do. Simply: (copy the standardwhite theme folder and rename it to your own OR DO IT USING FOLLOWING LINES) cd moodledir/theme mkdir mytheme cd mytheme cp -rv ../standardwhite/* . (Or replace the string "standardwhite" with the theme that you are using.) Select the new created theme in the Admin view!!! 6. Edit config.php and add 'geshi' to the $THEME->sheets array and $THEME->standardsheets array. (e.g., see formal_white's config.php if you don't see an array.) to find in folder: theme\standardlogohighlighting(your new theme)\config.php e.g. -> $THEME->sheets = array('gradients','geshi'); e.g. -> $THEME->standardsheets = array('styles_layout','styles_fonts','styles_color','styles_moz','geshi'); 7. Ensure that read permissions are set for the entire theme directory. 8. Also, please note that I put the Geshi filter at the TOP of all files on the Administration|(Appearance???)|Modules|Filters page. 9. Enable tabbing: a) lib/editor/htmlarea/plugins/GetHtml/get-html.js on line 102 and in lib/editor/htmlarea/htmlarea.php on line 2775 ([0] instead of [14]) for geshi tabbing: change: > string = $3.replace(/[\n\r]/gi, " ").replace(/\s+/gi," ").replace(c[14], function(str) { into: > string = $3.replace(/[\n\r]/gi, " ").replace(c[14], function(str) { b) filter/geshi/filter.php (right now left it like it is) -> displayed correct, but reediting the source code doesn't display tabs