From 87d32352a901eeb7764fdc65797cd0ad3ad0a38d Mon Sep 17 00:00:00 2001 From: moodler Date: Thu, 23 Sep 2004 12:09:19 +0000 Subject: [PATCH] Some changes for XHTML and accessibility compliance --- blocks/online_users/block_online_users.php | 4 +-- course/lib.php | 30 ++++++++++++---------- lib/weblib.php | 8 +++--- 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/blocks/online_users/block_online_users.php b/blocks/online_users/block_online_users.php index 75540933cb..a24a1ea75c 100644 --- a/blocks/online_users/block_online_users.php +++ b/blocks/online_users/block_online_users.php @@ -112,7 +112,7 @@ class CourseBlock_online_users extends MoodleBlock { //Calculate minutes $minutes = floor($timetoshowusers/60); - $this->content->text = "
(".get_string("periodnminutes","block_online_users",$minutes).")
"; + $this->content->text = "
(".get_string("periodnminutes","block_online_users",$minutes).")
"; //Now, we have in users, the list of users to show //Because they are online @@ -145,7 +145,7 @@ class CourseBlock_online_users extends MoodleBlock { ob_end_clean(); */ } else { - $this->content->text .= "

".get_string("none")."

"; + $this->content->text .= "
".get_string("none")."
"; } return $this->content; diff --git a/course/lib.php b/course/lib.php index faf19a642b..38e5ba8656 100644 --- a/course/lib.php +++ b/course/lib.php @@ -960,6 +960,8 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false, echo ""; } } + } else { + echo ""; // needed for XHTML compatibility } if ($ismoving) { echo ''; + echo "\n\n".''; if ($CFG->frontpage == FRONTPAGECOURSELIST) { $courses = get_courses($category->id); @@ -1333,24 +1335,24 @@ function print_course_search($value="", $return=false, $format="plain") { $strsearchcourses= get_string("searchcourses"); if ($format == 'plain') { - $output = '

'; - $output .= '
'; - $output .= ''; + $output = ''; + $output .= '

'; + $output .= ''; $output .= ''; - $output .= '

'; + $output .= '

'; } else if ($format == 'short') { - $output = '

'; - $output .= '
'; - $output .= ''; + $output = ''; + $output .= '

'; + $output .= ''; $output .= ''; - $output .= '

'; + $output .= '

'; } else if ($format == 'navbar') { - $output = '
'; - $output .= '
'; - $output .= ''; + $output = ''; + $output .= '
'; + $output .= ''; $output .= ''; - $output .= ''; $output .= '
'; + $output .= ''; } if ($return) { @@ -1760,4 +1762,4 @@ function make_editing_buttons($mod, $absolute=false, $moveselect=true, $indent=- " alt=\"$str->delete\" />$hideshow$groupmode"; } -?> \ No newline at end of file +?> diff --git a/lib/weblib.php b/lib/weblib.php index 2fb908523d..e7ef7d4a31 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -1506,8 +1506,8 @@ function print_footer ($course=NULL, $usercourse=NULL) { /// Course links if ($course) { if ($course == 'home') { // special case for site home page - please do not remove - $homelink = '

'; - $homelink .= '

'; + $homelink = ''; + $homelink .= '
moodlelogo
'; $course = get_site(); $homepage = true; } else { @@ -2950,9 +2950,9 @@ function obfuscate_text($plaintext) { $c = ord($plaintext{$i}); $numerical = ($c >= ord('0')) && ($c <= ord('9')); if ($prev_obfuscated and $numerical ) { - $obfuscated.='&#'.ord($plaintext{$i}); + $obfuscated.='&#'.ord($plaintext{$i}).';'; } else if (rand(0,2)) { - $obfuscated.='&#'.ord($plaintext{$i}); + $obfuscated.='&#'.ord($plaintext{$i}).';'; $prev_obfuscated = true; } else { $obfuscated.=$plaintext{$i}; -- 2.39.5