From 3981ecbeaf3fa65b0a880ebda27707811276081f Mon Sep 17 00:00:00 2001 From: moodler Date: Fri, 15 Oct 2004 12:23:43 +0000 Subject: [PATCH] More XHTML fixes --- mod/resource/index.php | 6 ++--- mod/resource/type/common.html | 2 +- .../type/directory/resource.class.php | 2 +- mod/resource/type/html/html.html | 20 ++++++++++------- mod/resource/type/html/resource.class.php | 9 ++++---- mod/resource/type/text/resource.class.php | 9 ++++---- mod/resource/type/text/text.html | 22 ++++++++++++------- 7 files changed, 41 insertions(+), 29 deletions(-) diff --git a/mod/resource/index.php b/mod/resource/index.php index 0dc4f68403..dfe27f4b46 100644 --- a/mod/resource/index.php +++ b/mod/resource/index.php @@ -39,13 +39,13 @@ if ($course->format == "weeks") { $table->head = array ($strweek, $strname, $strsummary); - $table->align = array ("CENTER", "LEFT", "LEFT"); + $table->align = array ("center", "left", "left"); } else if ($course->format == "topics") { $table->head = array ($strtopic, $strname, $strsummary); - $table->align = array ("CENTER", "LEFT", "LEFT"); + $table->align = array ("center", "left", "left"); } else { $table->head = array ($strlastmodified, $strname, $strsummary); - $table->align = array ("LEFT", "LEFT", "LEFT"); + $table->align = array ("left", "left", "left"); } $currentsection = ""; diff --git a/mod/resource/type/common.html b/mod/resource/type/common.html index b9d849812e..980e016c8b 100644 --- a/mod/resource/type/common.html +++ b/mod/resource/type/common.html @@ -13,7 +13,7 @@

:

- + " /> diff --git a/mod/resource/type/directory/resource.class.php b/mod/resource/type/directory/resource.class.php index f17c47b1c0..09273b22e6 100644 --- a/mod/resource/type/directory/resource.class.php +++ b/mod/resource/type/directory/resource.class.php @@ -119,7 +119,7 @@ function display() { echo ''; echo ''; - echo "pixpath/f/$icon\" width=\"16\" height=\"16\" />"; + echo "pixpath/f/$icon\" width=\"16\" height=\"16\" alt=\"\"/>"; echo ''; echo '

'; if ($icon == 'folder.gif') { diff --git a/mod/resource/type/html/html.html b/mod/resource/type/html/html.html index 77c1b8cb0e..445c2bee59 100644 --- a/mod/resource/type/html/html.html +++ b/mod/resource/type/html/html.html @@ -1,4 +1,9 @@ - - -

:



@@ -77,7 +80,7 @@ onclick=" return lockoptions('form', 'windowpopup[1]', popupitems);" /> - + @@ -112,10 +115,11 @@ - - - + + + diff --git a/mod/resource/type/html/resource.class.php b/mod/resource/type/html/resource.class.php index 9034ecf7c3..38acb2d14e 100644 --- a/mod/resource/type/html/resource.class.php +++ b/mod/resource/type/html/resource.class.php @@ -110,9 +110,9 @@ function display() { "", "", true, update_module_button($this->cm->id, $course->id, $strresource), navmenu($course, $this->cm)); - echo "\n'; @@ -132,6 +132,7 @@ function display() { print_footer($course); } } else { /// not a popup at all + die; add_to_log($course->id, "resource", "view", "view.php?id={$this->cm->id}", $resource->id, $this->cm->id); print_header($pagetitle, $course->fullname, "$navigation {$resource->name}", @@ -140,7 +141,7 @@ function display() { print_simple_box(format_text($resource->alltext, FORMAT_HTML, $formatoptions, $course->id), "center", "", "$THEME->cellcontent", "20"); - echo "

$strlastmodified: ".userdate($resource->timemodified)."

"; + echo "

$strlastmodified: ".userdate($resource->timemodified)."

"; print_footer($course); } @@ -190,7 +191,7 @@ function setup($form) { if ($optionname == "height" or $optionname == "width") { $window->$optionname = $optionvalue; } else if ($optionvalue) { - $window->$optionname = "checked"; + $window->$optionname = "checked=\"checked\""; } } } diff --git a/mod/resource/type/text/resource.class.php b/mod/resource/type/text/resource.class.php index 9e6eec54fc..8c0c2c09ae 100644 --- a/mod/resource/type/text/resource.class.php +++ b/mod/resource/type/text/resource.class.php @@ -102,15 +102,16 @@ function display() { print_header(); print_simple_box(format_text($resource->alltext, $resource->options, $formatoptions, $course->id), "center", "", "$THEME->cellcontent", "20"); + print_footer($course); } else { /// Make a page and a pop-up window print_header($pagetitle, $course->fullname, "$navigation {$resource->name}", "", "", true, update_module_button($this->cm->id, $course->id, $strresource), navmenu($course, $this->cm)); - echo "\n'; @@ -139,7 +140,7 @@ function display() { print_simple_box(format_text($resource->alltext, $resource->options, $formatoptions, $course->id), "center", "", "$THEME->cellcontent", "20"); - echo "

$strlastmodified: ".userdate($resource->timemodified)."

"; + echo "

$strlastmodified: ".userdate($resource->timemodified)."

"; print_footer($course); } @@ -191,7 +192,7 @@ function setup($form) { if ($optionname == "height" or $optionname == "width") { $window->$optionname = $optionvalue; } else if ($optionvalue) { - $window->$optionname = "checked"; + $window->$optionname = "checked=\"checked\""; } } } diff --git a/mod/resource/type/text/text.html b/mod/resource/type/text/text.html index 235f2688d2..ce7eb587c8 100644 --- a/mod/resource/type/text/text.html +++ b/mod/resource/type/text/text.html @@ -1,4 +1,9 @@ -"; } ?> - + @@ -126,10 +129,13 @@ - - - + + + + + -- 2.39.5