Originally posted this in the Book forum but now I realize that it belongs here.
I prefer working with html in an external fully fledged wysiwyg editor and
importing the files to Moodle.
All html code regarding refs to other files are rewritten with absolute
references. So developing and the uploading to a prod-server is not
Also found that the original css formatting from an external css-file does not show on the pages. I get tiny little letters and that style does not has it´s origin in my style.css-file
Any clues on this?
Furthermore I found that after editing the external file with my preferred editor,
that there is no way up updating a content in a external html file.
This is what I had to do in the Book Module.
Delete the chapter, create a new chapter and re-import the edited html-file.
Have I missed something, or is it this way it works in the Book?
And finally, why does not my swf-files show up when importing a html-file?
Would really like some input to this.
you have many question but I try to answer some of them...
I believe most things you are trying to do are possible but you may need to use some tricks in some cases. If you add resources (external files or links) moodle should not filter tags from any external files or change absolute links from them. What kind of path names and file names have you used (spaces and characters like å,ä,ö in names may cause trouble)? If you paste html from external html files to editor moodle uses css from theme css files that can override many styles from pasted html and filters can cut some tags. Using iframes or object / embed tags is possible in most activities and if you enable swf filter from Administration -> Modules -> Filters -> Multimedia Plugins -> Enable .swf filter moodle will replace any normal links to swf files with embedding code (works in book too). The bad thing is that you can't add normal links to flash files that way because they will all be changed to embedded flash sitewide.
You should be able to edit uploaded html files from course menu - Files - ... and near the file you should see Edit link
TinyMCE has a media plugin for adding Flash directly but that's another story.
I can check your site (some test course with student access) if you wish. From source code it is always easier to read why some things don't work like you want them to work and plugins like Web Developer (Firefox) can help in checking exact css tags.
Rewriting the links, I´m refering to the fact that the html editor rewrites my relative links to absolute paths, not me using spaces or Swedish letters or using absolute paths. My questions may seem a bit stupid but I´ve been around since Netscape 0.93 Beta and Flash 1.0.
Original code in html-file:
<img src="Illustrations/linjal_nedre.gif" width="461" height="320">
Code in editor:
<img height="320" width="461" src="http://127.0.0.1/file.php/2/moddata/ECG_in_detail/ECG_curve/Illustrations/linjal_nedre.gif" />
WHY does the editor rewrites the fully functional relative paths to absolute paths and then rewrites the whole image tag in it´s own fashion?
Furthermore I understand I can edit the html file in the editor.
But I do not want to do that - the editor is really really bad. You cant even mark something in the wsiswyg mode and switch to code-mode and have it marked there. And the code mode is just a load of unstructured scripts, tags and text, trying to dive into that on a fairly large file is unthinkable.
Regarding css, I have my own css file. I don´t want the theme or anything in Moodle to override that, who ever came up with that idea? Excuse me, but how can things work like this in Moodle?
Beginning to loose my faith in Moodle from my point of view trying to deliver already designed and illustrated/animated structured content into the platform.
What if want to incorporate a fully functional education built in html, php and Flash in Moodle. How do I do that? Is that possible without spending hours and hours trying to trick Moodle to display what´s already designed and ready, the way it´s supposed to be displayed, with a Book-like navigation created in Moodle.
These are good questions. One reason for that behaviour is that moodledata is usually not accessable directly from web and file.php is showing the file from moodledata sub folders and takes the path from config.php. If I'm not wrong those paths are in fact relative in database so that backup and restore process can create correct paths even if you move files from course to another course. In emails from forums addresses should be absolute again and so on...
Usually people create an index page for cases like this - some sort of "frame page" that can be used for navigation (with drop down menus, buttons etc and you can upload the whole package to moodledata folder. If you create a link to this index page as a new resource http://docs.moodle.org/en/File_or_website_link moodle does not change any relative paths to absolute paths and all files should work.
I did test a pure flash book - "flipbook" - last year and still have a demo in http://korpelainen.net/m183/mod/flipbook/view.php?id=7 but part of the code is under commercial license ( I don't own it ). It's still based on normal book module and you can add as many images or swf files as pages as you like to the book. I still hope I have time to finish this some day as open source version - maybe next year when moodle 2.0 stable is out. Normal book is made for a certain purpose for all users and all modules can be modified for different needs but really takes hours and hours to test and rewrite the code.
About css I can only say that editor of moodle was probably written for modifying content of forums and other activities and themes were written to make content stable and constant. One custom script or wrong css tag can sometimes break whole html of site. Personally I would like more a system where all css could be modified to be able to create really different environments for all users - still you can do that if you don't use standard theme stylesheets and styles.php files (custom theme config.php can have those variables - check standard theme config.php for possible configuration options).
You restored my faith in Moodle, at least temporary
I will dive into this on Monday and see if I can accomplish what I want.