I have a book on my site. Some of my chapters (example here) contain flash movies. Before, I could edit these already existing chapters containing the flash movies and the flash movies remained intact. Now if I open them up to edit them, the flash movies and their surrounding tags are stripped out completely, as if they were never there to begin with. I upgraded to version 2005010100 of the book module recently. Before this upgrade this wasn't happening.
Did you update your Moodle at the same time?
Could you please test it with the html editor turned off?
Could you please test it with the html editor turned off?
You may need to enable this parameter on the Admin >> Configure >> Variables page:
allowobjectembed
allowobjectembed
Flash must work in books, resoruces, lessons (and other content created only by teachers) without this allowobjectembed=true...
Anyway I am going to review the flash/java embedding throughout all modules and Moodle core now.
Anyway I am going to review the flash/java embedding throughout all modules and Moodle core now.
Here is the patch, the problem was that the text was always "cleaned" before loading it into editor. Only text from students must be cleaned before displaying.
I am going to commit it tonight if there are no objections..
I am going to commit it tonight if there are no objections..
Index: weblib.php =================================================================== RCS file: /cvsroot/moodle/moodle/lib/weblib.php,v retrieving revision 1.469.2.9 diff -u -r1.469.2.9 weblib.php --- weblib.php 1 Jul 2005 03:52:59 -0000 1.469.2.9 +++ weblib.php 4 Jul 2005 17:38:02 -0000 @@ -2973,9 +2973,6 @@ if ($usehtmleditor) { - // cleanup bad html that may have made it to the db - $value = clean_text($value); - if (!empty($courseid) and isteacher($courseid)) { echo ($scriptcount < 1) ? '<script type="text/javascript" src="'. $CFG->wwwroot .'/lib/editor/htmlarea.php?id='. $courseid .'"></script>'."\n" : ''; } else {
I changed the setting as Martin suggested (although I don't think that was a problem as I was able to restore the flash by simply copying the source code and pasting it back in after it was removed), and added your hack, but it doesn't solve the problem. I'm the admin, in addition to being the teacher. I don't know if that has any effect?
I am 100% sure it was the cause of problem. The patch is correct.