bostelm/moodle-mod_scheduler — pull request #13 by michael-milette (2014-03-20 13:13:21+00:00)
Title: Scheduler - Fixes bugs, typos, language support  issues and WCAG 2.0 compliance

Note: Only WCAG 2.0 level A and AA issues related the public facing pages were evaluated and addressed. Backend pages were not evaluated.

Changes include:

1) Replaced a box_start() with a paragraph tag because:
a) The box wasn't being displayed - function needs to be echo'd.
b) Wasn't using the correct parameters for the API call.
Also moved this box below the Slots heading.

These changes were made in order to comply with WCAG 2.0 Success criteria 1.3.1 - Information and relationships.

2) Removed and tags as these are deprecated. Also added a table.generaltable class in styles.css to set the table width to 99% thereby improving readability of the table whose information no longer has to wrap unnecessarily. It also makes it easier to read on mobile devices. I could have set this in the table object but this just adds a width to the table tag which has been deprecated. This was done for WCAG 2.0 compliance of Success Criterion 4.1.1 - Parsing.

3) Fixed the call to $OUTPUT->box($noslots...). It needed to be echo'd, and a newly created CSS class was added because you can't specify a width in the parameters to this function (third parameter is an ID, not a width). Also added a new class called path-mod-70 in styles.css to achieve the intended width formatting.

4) Added a title tag to each of the radio buttons in the Slots table in order to comply with WCAG 2.0 Success criteria 1.3.1 - Information and relationships.

5) Applied the format_string() function to the location in case a multi-language markup was used to specify the location. This was done for WCAG 2.0 compliance of the principle 3.1 - Understandable/readable.

6) Fixed the CSS classes passed to $OUTPUT->box_start('error') and added a paragraph tag around the text being displayed in the box to improve formatting of the message being displayed. I believe that this achieves the authors intended presentation. The result is that it is now also WCAG 2.0 compliant with WCAG 2.0 Success criteria 1.3.1 - Information and relationships..

7) Wrapped "bold line" in the 'welcomebackstudent' definition in a set of strong tags and turned it to a link which takes the user directly to their booked appointment. This was done for WCAG 2.0 compliance of success criterion 1.3.1 - Info and Relationships.

8) Added a new string definition called 'slotdescription' which is now applied as the title tag of each radio button in the Slots table. This was done for WCAG 2.0 compliance of the following success criterion:
- 1.3.1 - Info and Relationships.
- 4.1.2 - Name, Role, Value.

9) Removed dependency on hard coded style which would not work if the background colour of the theme was also set to red. Also, the ‘red’ text on a white background does not meet WCAG 2.0 Guideline 1.4 Distinguishable with regards to the colour contrast ratio requirements. Compliance will now be determined by the theme's CSS instead.
- "" with ""

10) All instances of the tag, whose purpose has changed, have been replaced with . This was done for WCAG 2.0 compliance of success criterion 1.3.1 - Info and Relationships.

11) All instances of the tag, which is deprecated, have been replaced with . This was done for WCAG 2.0 compliance of Success Criterion 4.1.1 - Parsing.

12) Fixed some typos in English language file. This was done for WCAG 2.0 compliance of the principle 3.1 - Understandable/readable.

13) Removed all trailing spaces in lines and fixed some minor code formatting issues.

Affected files include:
- studentview.php
- studentview.controller.php
- lang/en/scheduler.php
- styles.css

Signed-off-by: Michael Milette