From 7c6c30ed2bd29de1bb5878223c461ff02d92f448 Mon Sep 17 00:00:00 2001
From: moodler
Date: Thu, 11 Nov 2004 12:07:08 +0000
Subject: [PATCH] Changes for XHTML and accessibility compliance
---
mod/quiz/attempt.php | 6 +-
mod/quiz/category.php | 2 +-
mod/quiz/lib.php | 11 ++--
mod/quiz/mod.html | 36 +++++------
.../questiontypes/calculated/calculated.html | 61 ++++++++++---------
.../datasetdependent/datasetitems.php | 6 +-
.../description/description.html | 14 ++---
mod/quiz/questiontypes/match/match.html | 22 +++----
.../multianswer/multianswer.html | 10 +--
.../multichoice/multichoice.html | 28 ++++-----
.../multichoice/questiontype.php | 8 ++-
.../questiontypes/numerical/numerical.html | 59 +++++++++---------
mod/quiz/questiontypes/random/random.html | 6 +-
.../shortanswer/shortanswer.html | 30 ++++-----
.../questiontypes/truefalse/truefalse.html | 22 +++----
mod/quiz/report/fullstat/report.php | 16 ++---
mod/quiz/report/overview/report.php | 8 +--
mod/quiz/view.php | 5 +-
18 files changed, 180 insertions(+), 170 deletions(-)
diff --git a/mod/quiz/attempt.php b/mod/quiz/attempt.php
index 13b98ac362..700e4dbeb7 100644
--- a/mod/quiz/attempt.php
+++ b/mod/quiz/attempt.php
@@ -82,7 +82,7 @@
print_heading($quiz->name);
print_heading(get_string("attempt", "quiz", $attemptnumber));
if (trim(strip_tags($quiz->intro))) {
- print_simple_box(format_text($quiz->intro), "CENTER");
+ print_simple_box(format_text($quiz->intro), "center");
}
echo "
\n";
@@ -92,7 +92,7 @@
echo "\n";
print_string("requirepasswordmessage", "quiz");
echo "
\n";
- echo " ";
+ echo " ";
echo " \n";
echo "
\n";
@@ -247,7 +247,7 @@
print_heading(get_string("attempt", "quiz", $attemptnumber));
if (trim(strip_tags($quiz->intro))) {
- print_simple_box(format_text($quiz->intro), "CENTER");
+ print_simple_box(format_text($quiz->intro), "center");
}
diff --git a/mod/quiz/category.php b/mod/quiz/category.php
index c9267bb9a2..c7c2f058f0 100644
--- a/mod/quiz/category.php
+++ b/mod/quiz/category.php
@@ -146,7 +146,7 @@
/// Print the table of all categories
$table->head = array ($strcategory, $strcategoryinfo, $strpublish, $strquestions, $straction);
- $table->align = array ("LEFT", "LEFT", "CENTER", "CENTER", "CENTER");
+ $table->align = array ("left", "left", "center", "center", "center");
$table->size = array ("80", "80", "40", "40", "50");
$table->width = 200;
$table->nowrap = true;
diff --git a/mod/quiz/lib.php b/mod/quiz/lib.php
index 11de7b15d7..654b0b7529 100644
--- a/mod/quiz/lib.php
+++ b/mod/quiz/lib.php
@@ -208,14 +208,15 @@ class quiz_default_questiontype {
/// Print question number and grade:
- echo '' . $number . '
';
+ echo '' . $number . '';
if (false !== $grade) {
$strmarks = get_string("marks", "quiz");
- echo '';
+ //echo '';
+ echo '
';
if (false !== $actualgrade) {
- echo "$strmarks: $actualgrade/$grade
";
+ echo "$strmarks: $actualgrade/$grade";
} else {
- echo "$grade $strmarks";
+ echo "$grade $strmarks";
}
}
print_spacer(1,100);
@@ -1172,7 +1173,7 @@ function quiz_category_select_menu($courseid,$published=false,$only_editable=fal
$cname = quiz_get_category_coursename( $category );
$seltxt = "";
if ($cid==$selected) {
- $seltxt = "selected=\"true\"";
+ $seltxt = "selected=\"selected\"";
}
if ((!$only_editable) || isteacheredit($category->course)) {
echo " \n";
diff --git a/mod/quiz/mod.html b/mod/quiz/mod.html
index 07c6f08662..330f05f589 100644
--- a/mod/quiz/mod.html
+++ b/mod/quiz/mod.html
@@ -63,15 +63,15 @@
- : |
+ : |
|
- :
+ | :
-
+
-
+
|
|
- : |
+ : |
timeopen and $course->format == "weeks") {
@@ -105,7 +105,7 @@
|
- : |
+ : |
timeclose and $course->format == "weeks") {
@@ -119,7 +119,7 @@
|
- : |
+ : |
timelimit, get_string("minutes","quiz"));
@@ -129,7 +129,7 @@
|
- : |
+ : |
|
- : |
+ : |
|
- : |
+ : |
|
- : |
+ : |
|
- : |
+ : |
|
- : |
+ : |
|
- : |
+ : |
|
- : |
+ : |
|
- : |
+ : |
=1; $i--) {
@@ -247,14 +247,14 @@
|
- : |
+ : |
|
- : |
+ : |
diff --git a/mod/quiz/questiontypes/calculated/calculated.html b/mod/quiz/questiontypes/calculated/calculated.html
index e1c7c26dea..4a2a264fb2 100644
--- a/mod/quiz/questiontypes/calculated/calculated.html
+++ b/mod/quiz/questiontypes/calculated/calculated.html
@@ -4,24 +4,24 @@
");} ?>
- : |
+ : |
id, true, true, $question->category); ?>
|
- : |
+ : |
-
+ " />
|
- :
+ | :
-
+
-
+
|
';
} else {
- echo "";
+ echo ' ';
print_string("formattexttype");
echo ": ";
if (!isset($question->questiontextformat)) {
@@ -56,7 +56,7 @@
|
- : |
+ : |
|
-: |
+: |
-
+ " />
|
- : |
+ : |
- ±
+ " />±
|
-: |
+: |
tolerance_types(),
'tolerancetype[]', $answers[0]->tolerancetype, false); ?>
|
-: |
+: |
'1', '2' => '2', '3' => '3',
'4' => '4', '5' => '5', '6' => '6',
@@ -99,23 +99,24 @@
|
- : |
+ : |
-
+
|
-: |
+: |
-
-
- ()
+
+ " />
+ ()
|
|
-: |
+: |
|
|
- :
+ :
" size="10"
- align="RIGHT" name="multiplier[]"
- value="multiplier) ?>" />
+ align="right" name="multiplier[]"
+ value="multiplier) ?>"
+ alt="" />
:
- "
+ "
name="unit[]"
- size="5" value="unit) ?>" />
+ size="5" value="unit) ?>"
+ alt="" />
|
id) ?>" />
-" />
+" />
- |