Issue Details (XML | Word | Printable)

Key: MDL-9890
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Nick Freear
Reporter: Nick Freear
Votes: 0
Watchers: 2
Operations

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

Help should be well-formed, XHTML Strict and semantic

Created: 22/May/07 06:12 PM   Updated: 11/Apr/08 06:05 AM
Return to search
Component/s: Accessibility
Affects Version/s: 1.8, 1.8.1, 1.9
Fix Version/s: 1.8.4, 1.9

File Attachments: 1. File patch-MDL-9890-help_access_partb.diff (12 kB)
2. File patch-MDL-9890-help_access_partc22.diff (86 kB)
3. File patch-MDL-9890-help_access_v2.diff (56 kB)
4. File patch-MDL-9890-help_access_v31.diff (131 kB)

Environment:
Issue Links:
Blockers
 
Relates

URL: http://moodle.org/help.php?file=index.html
Participants: Nick Freear and Nicolas Martignoni
Security Level: None
QA Assignee: Nicolas Martignoni
Resolved date: 10/Jan/08
Affected Branches: MOODLE_18_STABLE, MOODLE_19_STABLE
Fixed Branches: MOODLE_18_STABLE, MOODLE_19_STABLE


 Description  « Hide
Following on from bug MDL-7861 "Strict XHTML 1.0", I am building up a patch to fix stray ampersands, poor semantics, etc. in help HTML files (lang/en_utf8/help/*). This is what I'm tackling:

1 Well-formed XML
    - Stray ampersands, regular expression /&[^a^l^g^q^n^#]/ (Not perfect, but a start). Specific searches &file, &bug, &mod.

2 Semantics
    - Each */index.html should start with a <h2> </h2>, except help/index.html which should start <h1> </h1>
    - Other headings, regular expression /<p><b>(.*?)</b></p>/, should be replaced variously with <h2>$1</h2>, <h3>$1</h3> as appropriate - a headache!

NOTES,
 - I want to be pragmatic. - should we aim for Strict DTD for help? Would Transitional be sufficient?
 - I'm ONLY fixing English language, en_utf8 - how can we systematically fix other languages.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Nick Freear added a comment - 22/May/07 06:22 PM
As well as help files, I fixed some stray ampersands in string files, en_utf8/enrol_authorize.php, en_utf8/moodle.php

I'm attaching version 2 of the patch (v1 was 4 April) - anyone want to review? There are still "Other headings" to fix (x100!), but I may just commit what I've done.


Nick Freear added a comment - 23/May/07 06:30 PM
Added URLs.

Nicolas Martignoni added a comment - 23/May/07 10:24 PM
Nick, could you post here your grep's or your script, as I would like to fix the french language.

Thanks in advance.


Nick Freear added a comment - 23/May/07 11:16 PM
I committed 2 patches: 'v31' and 'partb' (both attached) to HEAD and 1.8 branch. Patch 'partb' re-applies fixes by Nicolas Connault in help/install.html - sorry! The patch affects 70 files, most in lang/en_utf8/help/ directory EXCEPT:
-help.php
-theme/standard/styles_color.css
-lang/en_utf8/moodle.php
-lang/en_utf8/enrol_authorize.php


Hi Nicolas Martigoni
Thanks for your enquiry - I used the search and replace in Eclipse. These are the patterns with notes - hope they help! Nick

-lang/en_utf8/help/*/index.html
<p>(.*?)</p> – <h2>$1</h2> --1st line only.

-lang/en_utf8/.
&[^a^l^g^q^n^#] – &

&([file|mod|bug]) – &$1 --Untested!

<hr size.*?/> – <hr /> --See theme/standard/styles_color.css

<td align="right"><p><b>(.*?)</b></p></td> – <th align="right" scope="col">$1</th> --TODO: remove align right.

<p><b>(.*?)</b></p> – <h2>$1</h2> --Careful, with exceptions!

target=".*?" – '' --Empty string, not used yet!


Nicolas Martignoni added a comment - 24/May/07 03:01 AM
Thanks Nick !

Done for french language (fr_utf8) ! have to commit it now, but can't access the CVS


Nicolas Martignoni added a comment - 24/May/07 04:57 AM
fr_utf8 committed.

Nick Freear added a comment - 16/Aug/07 07:09 PM
After a long delay I'm completing the fix for this bug. The attached "Part C version 2.2" patch:
  • replaces misused <blockquote> (including nested in install.html) and <ul> WITH <div class="indent">,
  • replaces <p align="right"> WITH <p class="moreinfo">,
  • adds child <p> to correctly used <blockquote>, eg. in /lang/en_utf8/help/lesson/import.html,
  • fixes lists incorrectly nested in paragraphs, eg. <p>text\n <ul> ...</ul> </p> TO <p>text</p>\n <ul> ... </ul>
  • fixes a few other validation/semantic errors.
  • the patch is committed on HEAD (before the 1.9 branch) and 1.8 branches,
  • styles are now in /theme/standard/styles_layout.css (including some colour, but it's not worthwhile to split them),
  • "completing" because of the 'law of diminishing returns',
  • again only committed for 'en_utf8' language - any help with other languages appreciated!

Yours, Nick


Nicolas Martignoni added a comment - 17/Aug/07 04:47 AM
fr_utf8 committed (again). Thanks for the hints given.

Nick Freear added a comment - 10/Jan/08 06:38 AM
Specific bug is fixed for English language pack for 1.9 - see MDL-12902 for the generic multi-language issue with help files.

Nicolas Martignoni added a comment - 11/Jan/08 04:27 AM
Closing, as verified for en_utf8 pack. Thanks.