Issue Details (XML | Word | Printable)

Key: MDL-13233
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Dongsheng Cai
Reporter: Dan Poltawski
Votes: 0
Watchers: 3
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Emoticons Documentation should be dynamic with the new configuration settings

Created: 30/Jan/08 12:17 AM   Updated: 25/Sep/08 03:14 PM
Return to search
Component/s: Documentation
Affects Version/s: 1.9
Fix Version/s: 2.0

File Attachments: 1. Text File emoticons-2.patch (11 kB)
2. Text File emoticons.patch (18 kB)

Issue Links:
Relates

Participants: Dan Poltawski, Dongsheng Cai, Eloy Lafuente (stronk7), Martin Dougiamas and Nicolas Martignoni
Security Level: None
QA Assignee: Eloy Lafuente (stronk7)
Resolved date: 07/May/08
Affected Branches: MOODLE_19_STABLE
Fixed Branches: MOODLE_20_STABLE


 Description  « Hide
Since its now possible to customise emoticons, the help menu should really be dynamic generated for the configuration settings.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Eloy Lafuente (stronk7) added a comment - 21/Apr/08 11:45 PM
Uhm.. this could be problematic (because of the nature html of help files).

What if we try to address this as follows:

1) Create one function, call it: get_emoticons_html() responsible to look for current emotions defined and generate the proper HTML (the "table" of emoticons).
2) In the emoticons help page (and others where present), delete the "table" of emoticons and insert something like:

#emoticons_html#

3) that "tag" will be parsed by help.php replacing the tag with the calculated table.

Both the parsing and get_emoticons_html() function must be within help.php.

Assigning to Dongsheng... discuss and confirm with MD before, please.

Any idea will be welcome, of course! Ciao


Eloy Lafuente (stronk7) made changes - 21/Apr/08 11:45 PM
Field Original Value New Value
Assignee Helen Foster [ tsala ] Dongsheng Cai [ dongsheng ]
Eloy Lafuente (stronk7) made changes - 21/Apr/08 11:45 PM
Fix Version/s 1.9.1 [ 10240 ]
Martin Dougiamas added a comment - 22/Apr/08 09:49 AM
Sounds perfect, Eloy!

Dongsheng Cai added a comment - 22/Apr/08 11:56 AM
Eloy, I made a patch here, please review, if it is good, I will commit to CVS, thanks.

Dongsheng Cai made changes - 22/Apr/08 11:56 AM
Attachment emotions.patch [ 13747 ]
Dongsheng Cai added a comment - 22/Apr/08 01:37 PM
This patch is against HEAD.

Dongsheng Cai added a comment - 22/Apr/08 01:57 PM
Please ignore my previous patch, try this latest one.

Dongsheng Cai made changes - 22/Apr/08 01:57 PM
Attachment emotions.fix.patch [ 13749 ]
Dongsheng Cai made changes - 22/Apr/08 01:58 PM
Attachment emotions.patch [ 13747 ]
Eloy Lafuente (stronk7) added a comment - 23/Apr/08 07:15 AM
Hi Dongsheg some comments about your patch:

1) Icons aren't displayed properly. It seems that the extension is missing in the icons.
2) Those styles within the body... they break XHTML I guess you'll need to add them to the standard theme, just add them in the section: Help files (/lang/-/help) and prefix all them with #help" to be applied only in those pages.
3) The same content must be replaced in other help files apart from emoticons.html. Take a look to richtext.html and text.html.
4) It's "emoticons" not "emotions"

Plz, send a patch fixing all these. TIA!

Backporting to 19_STABLE will require to backport also MDL-14286. I'd suggest you to request MD for confirmation. If answer is no, we can leave this for 2.0 only.

Ciao


Dongsheng Cai made changes - 24/Apr/08 04:09 PM
Link This issue has a non-specific relationship to MDL-14286 [ MDL-14286 ]
Dongsheng Cai added a comment - 24/Apr/08 04:12 PM
Eloy,I attached another patch which fixed 2), 3), 4)
What do you mean extension is missing, I got the emoticons from $CFG->emoticons, is this wrong?

Dongsheng Cai made changes - 24/Apr/08 04:12 PM
Attachment emoticons.patch [ 13772 ]
Dongsheng Cai made changes - 24/Apr/08 04:12 PM
Attachment emotions.fix.patch [ 13749 ]
Dongsheng Cai made changes - 29/Apr/08 10:34 AM
Attachment emoticons.patch [ 13772 ]
Dongsheng Cai added a comment - 29/Apr/08 10:35 AM
The new patch, fix all known problems

Dongsheng Cai made changes - 29/Apr/08 10:35 AM
Attachment emoticons.patch [ 13798 ]
Martin Dougiamas added a comment - 30/Apr/08 10:40 AM
Thanks Dongsheng, can you put this in HEAD? I think it's OK for 1.9 too but I'd like to test it a little first.

Dongsheng Cai committed 4 files to 'Moodle CVS' - 30/Apr/08 11:49 AM
"MDL-13233, make emoticons documentation should be dynamic"
MODIFY lang/en_utf8/help/richtext.html   Rev. 1.7    (+2 -116 lines)
MODIFY lang/en_utf8/help/emoticons.html   Rev. 1.7    (+3 -115 lines)
MODIFY help.php   Rev. 1.47    (+26 -2 lines)
MODIFY lang/en_utf8/help/text.html   Rev. 1.7    (+2 -116 lines)
Dongsheng Cai added a comment - 30/Apr/08 11:50 AM
Committed to HEAD only, please review, feel free to reopen if you find any problem or this change need to backport to moodle 1.9.

Dongsheng Cai made changes - 30/Apr/08 11:50 AM
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 2.0 [ 10122 ]
Resolution Fixed [ 1 ]
Fix Version/s 1.9.1 [ 10240 ]
Dongsheng Cai committed 1 file to 'Moodle CVS' - 30/Apr/08 12:07 PM
"MDL-13233, emoticons documentation should be dynamic"
MODIFY theme/standard/styles_layout.css   Rev. 1.576    (+13 -0 lines)
Eloy Lafuente (stronk7) added a comment - 01/May/08 07:17 AM
reopening this a bit...

1) <li> elements aren't closed.
2) help/emoticons.html seems to have <html><body> tags. Shouldn't have them

Both 1 & 2 causes XHTML breakage. Can you fix them, plz.

TIA and ciao

P.S: Trick: it's highly recommended to have FF with some nice extensions installed (Web Developer Extension, HTML Validator...). And highly recommended to check that pages we are committing are, always, valid XHTML.


Eloy Lafuente (stronk7) made changes - 01/May/08 07:17 AM
Resolution Fixed [ 1 ]
Status Resolved [ 5 ] Reopened [ 4 ]
Dongsheng Cai added a comment - 01/May/08 01:14 PM
Fixed, tested, Thanks, Eloy.
Feel free to reopen..

Dongsheng Cai made changes - 01/May/08 01:14 PM
Status Reopened [ 4 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Eloy Lafuente (stronk7) added a comment - 02/May/08 05:57 AM
Feeling happy to close! :-P Thanks!

Eloy Lafuente (stronk7) made changes - 02/May/08 05:57 AM
Status Resolved [ 5 ] Closed [ 6 ]
QA Assignee stronk7
Nicolas Martignoni added a comment - 02/May/08 05:10 PM
The fixing of this issue modifies substantially 3 help files:
*help/emoticons.html
*help/text.html
*help/richtext.html
which breaks backward compatibility in lang packs.

Our policy would be to create new files emoticons2.html, etc. or am I wrong ?


Nicolas Martignoni made changes - 02/May/08 05:11 PM
Resolution Fixed [ 1 ]
Status Closed [ 6 ] Reopened [ 4 ]
Eloy Lafuente (stronk7) added a comment - 05/May/08 05:56 AM
Ah ,crap!

I forgot that completely! Well spotted Nicolas!

Hi Dongsheng. The cause for this is that other langs only have one version (HEAD) but English has one version per release. And if we change the en_utf8 help files in HEAD as we have done, soon other translators will change their HEAD languages too... but that will break those help files when used in older Moodle releases because old Moodle releases don't know about the #emoticons_html# thing at all.

This means that...

1) We must revert to previous versions of:

*help/emoticons.html
*help/text.html
*help/richtext.html

2) We must create new versions of them, called:

*help/emoticons2.html
*help/text2.html
*help/richtext2.html

3) We must go across all Moodle (HEAD) code and switch all the uses of old files to the new ones.

TIA & ciao


Dongsheng Cai committed 3 files to 'Moodle CVS' - 05/May/08 09:28 PM
"MDL-13233, revert to old version, see tracker"
MODIFY lang/en_utf8/help/emoticons.html   Rev. 1.9    (+118 -3 lines)
MODIFY lang/en_utf8/help/richtext.html   Rev. 1.8    (+116 -2 lines)
MODIFY lang/en_utf8/help/text.html   Rev. 1.8    (+116 -2 lines)
Dongsheng Cai committed 3 files to 'Moodle CVS' - 05/May/08 09:31 PM
"MDL-13233, create files, see tracker"
ADD lang/en_utf8/help/emoticons2.html   Rev. 1.1    (+0 -0 lines)
ADD lang/en_utf8/help/text2.html   Rev. 1.1    (+0 -0 lines)
ADD lang/en_utf8/help/richtext2.html   Rev. 1.1    (+0 -0 lines)
martignoni committed 2 files to 'Lang CVS' - 06/May/08 04:22 AM
MDL-13233, new help file added
ADD fr_utf8/help/emoticons2.html   Rev. 1.1    (+0 -0 lines)
ADD fr_utf8/help/richtext2.html   Rev. 1.1    (+0 -0 lines)
martignoni committed 2 files to 'Lang CVS' - 06/May/08 04:33 AM
MDL-13233, new help file
ADD fr_utf8/help/text2.html   Rev. 1.1    (+0 -0 lines)
MODIFY fr_utf8/help/text.html   Rev. 1.7    (+14 -12 lines)
Mitsuhiro Yoshida committed 4 files to 'Lang CVS' - 06/May/08 11:48 AM
Adding translated help files for Richtext HTML editor, emoticons and Text MDL-13233.
Brushed up a translated help file for Richtext HTML editor.
ADD ja_utf8/help/text2.html   Rev. 1.1    (+0 -0 lines)
MODIFY ja_utf8/help/richtext.html   Rev. 1.11    (+1 -2 lines)
ADD ja_utf8/help/emoticons2.html   Rev. 1.1    (+0 -0 lines)
ADD ja_utf8/help/richtext2.html   Rev. 1.1    (+0 -0 lines)
Dongsheng Cai added a comment - 06/May/08 12:02 PM
Put a patch here, all the helpbuttons are fixed(`grep "helpbutton(.*(text|richtext|emoticons)" -r /var/www/dev`)

Dongsheng Cai made changes - 06/May/08 12:02 PM
Attachment emoticons-2.patch [ 13868 ]
Dongsheng Cai committed 9 files to 'Moodle CVS' - 07/May/08 11:08 AM
"MDL-13233, replace the uses of old files to new ones, see tracker"
MODIFY lib/weblib.php   Rev. 1.1067    (+3 -3 lines)
MODIFY lang/en_utf8/help/emoticons.html   Rev. 1.10    (+1 -3 lines)
MODIFY user/message.html   Rev. 1.8    (+1 -1 lines)
MODIFY lang/en_utf8/help/emoticons2.html   Rev. 1.2    (+1 -3 lines)
MODIFY lang/en_utf8/help/index.html   Rev. 1.11    (+3 -3 lines)
MODIFY course/Attic/editsection.html   Rev. 1.16    (+2 -2 lines)
MODIFY lib/Attic/javascript.php   Rev. 1.39    (+5 -1 lines)
MODIFY lang/en_utf8/help/textformat.html   Rev. 1.5    (+2 -2 lines)
MODIFY mod/data/field/textarea/field.class.php   Rev. 1.20    (+2 -2 lines)
Dongsheng Cai added a comment - 07/May/08 11:09 AM
Fixed in HEAD, please review, feel free to reopen, thanks

Dongsheng Cai made changes - 07/May/08 11:09 AM
Status Reopened [ 4 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Mitsuhiro Yoshida committed 3 files to 'Lang CVS' - 07/May/08 12:00 PM
Updated translated help files based on lang/en_utf8 change MDL-13233.
MODIFY ja_utf8/help/index.html   Rev. 1.15    (+3 -3 lines)
MODIFY ja_utf8/help/textformat.html   Rev. 1.6    (+2 -2 lines)
MODIFY ja_utf8/help/emoticons2.html   Rev. 1.2    (+2 -4 lines)
martignoni committed 2 files to 'Lang CVS' - 08/May/08 01:13 AM
MDL-13233, more fixes
MODIFY fr_utf8/help/textformat.html   Rev. 1.7    (+5 -1 lines)
MODIFY fr_utf8/help/index.html   Rev. 1.10    (+7 -1 lines)
Eloy Lafuente (stronk7) added a comment - 12/May/08 06:22 AM
Hi Dongsheng,

I think everything is ok... B-) just found one "strange" commit:

http://cvs.moodle.org/moodle/lib/javascript.php?r1=1.38&r2=1.39

What is that intended for?

Ciao


Dongsheng Cai added a comment - 12/May/08 09:29 PM
This commit can fix a javascript error, if the parent window is not existed, it will stop here.

Eloy Lafuente (stronk7) added a comment - 14/May/08 06:56 AM
aha. Cool! Thanks!

Tim Hunt made changes - 25/Sep/08 03:14 PM
Link This issue has been marked as being related by MDL-16676 [ MDL-16676 ]