Details
Description
Look at Resources list:
http://moodle.org/mod/resource/index.php?id=34
You may see that many summaries are shifted one line down vertically. That is because summary is created with WYSIWYG HTML editor (which add one new line at the beginning), but then output is performed in FORMAT_MOODLE format.
The following fix works:
RCS file: /cvsroot/moodle/moodle/mod/resource/index.php,v
retrieving revision 1.16
diff -u -u -r1.16 index.php
— index.php 16 Jun 2005 10:10:59 -0000 1.16
+++ index.php 5 Nov 2005 19:04:56 -0000
@@ -73,12 +73,12 @@
if (!$resource->visible) { // Show dimmed if the mod is hidden $table->data[] = array ($printsection, <a class=\dimmed\ $extra href=\view.php?id=$resource->coursemodule\>.format_string($resource->name,true).</a>, - format_text($resource->summary, FORMAT_MOODLE, $options) ); + format_text($resource->summary, FORMAT_HTML, $options) ); } else { //Show normal if the mod is visible $table->data[] = array ($printsection, <a $extra href=\view.php?id=$resource->coursemodule\>.format_string($resource->name,true).</a>, - format_text($resource->summary, FORMAT_MOODLE, $options) ); + format_text($resource->summary, FORMAT_HTML, $options) ); }
}
Best regards,
Grigory Rubtsov.
From Christian Lebe (christian at moodle.com) Tuesday, 8 November 2005, 11:09 AM:
fixed.
Thanks Grigory.
From Christian Lebe (christian at moodle.com) Tuesday, 8 November 2005, 12:07 PM:
Rolled back, due complexity of solution to be done.
Grigory, try to use unformatted HTML style if you want to add new resources.
From Grigory Rubtsov (grb at sentence.ru) Tuesday, 8 November 2005, 03:18 PM:
In unformatted HTML, I also have summary edited with WYSIWYG editor. Do I understand correctly, that different formatting option is for main text only?
From Martin Dougiamas (martin at moodle.com) Tuesday, 8 November 2005, 03:51 PM:
The problem is that Moodle text may be in many formats. If you turn off your editor you'll see options such as Markdown, plain text etc. It isn't just HTML.
We don't currently store the format of the resource summaries (or assignment summaries etc). We need to fix this by adding a new field to the resource table, assignment table etc.
Should be fixed in 1.6 once and for all.
From Eloy Lafuente (stronk7 at moodle.org) Saturday, 29 April 2006, 10:33 PM:
Just recalling you about the need to add the textformat field to a bunch of tables in order to keep the format well detected....before 1.6! :-/
It could be done quickly (if I'm not wrong)...backup/restore included, of course.