From: moodler Date: Fri, 21 Jan 2005 04:23:38 +0000 (+0000) Subject: Changes for XHTML and accessibility compatibility. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=b1b1705aa4a6595036213ad49585764e0abf8ab2;p=moodle.git Changes for XHTML and accessibility compatibility. General code cleanup. --- diff --git a/mod/forum/mod.html b/mod/forum/mod.html index 92c6ef0cda..0e251c53c9 100644 --- a/mod/forum/mod.html +++ b/mod/forum/mod.html @@ -1,12 +1,12 @@ name)) { - $form->name = ""; + $form->name = ''; } if (!isset($form->type)) { - $form->type = ""; + $form->type = ''; } if (!isset($form->intro)) { - $form->intro = ""; + $form->intro = ''; } if (!isset($form->open)) { $form->open = 2; @@ -42,73 +42,71 @@
- + - + - - + - + @@ -127,123 +125,139 @@ enablerssfeeds && $CFG->forum_enablerssfeeds) { - echo ""; - echo ""; - echo "'; + echo ''; + echo '"; - echo ""; + $choices[0] = get_string('none'); + $choices[1] = get_string('discussions', 'forum'); + $choices[2] = get_string('posts', 'forum'); + choose_from_menu ($choices, 'rsstype', $form->rsstype, ''); + helpbutton('rsstype', get_string('rsstype'), 'forum'); + echo ''; + echo ''; - echo ""; - echo ""; - echo "'; + echo ''; + echo '"; - echo ""; + $choices[0] = '0'; + $choices[1] = '1'; + $choices[2] = '2'; + $choices[3] = '3'; + $choices[4] = '4'; + $choices[5] = '5'; + $choices[10] = '10'; + $choices[15] = '15'; + $choices[20] = '20'; + $choices[25] = '25'; + $choices[30] = '30'; + $choices[40] = '40'; + $choices[50] = '50'; + choose_from_menu ($choices, 'rssarticles', $form->rssarticles, ''); + helpbutton('rssarticles', get_string('rssarticles'), 'forum'); + echo ''; + echo ''; } ?>
:: - +
:: student); require("$CFG->dirroot/mod/forum/lib.php"); asort($FORUM_TYPES); if (! $form->type) { - $form->type = "general"; + $form->type = 'general'; } - if ($form->type == "news") { - print_string("namenews", "forum"); - echo ""; - } else if ($form->type == "social") { - print_string("namesocial", "forum"); - echo ""; + if ($form->type == 'news') { + print_string('namenews', 'forum'); + echo ''; + } else if ($form->type == 'social') { + print_string('namesocial', 'forum'); + echo ''; } else { - choose_from_menu($FORUM_TYPES, "type", $form->type, ""); - helpbutton("forumtype", get_string("forumtype", "forum"), "forum"); + choose_from_menu($FORUM_TYPES, 'type', $form->type, ''); + helpbutton('forumtype', get_string('forumtype', 'forum'), 'forum'); } ?>
:
- +
:
"; - helpbutton("questions", get_string("helpquestions"), "moodle", true, true); - echo "
"; - emoticonhelpbutton("form", "intro"); - echo "
"; + helpbutton('writing', get_string('helpwriting'), 'moodle', true, true); + echo '
'; + helpbutton('questions', get_string('helpquestions'), 'moodle', true, true); + echo '
'; + emoticonhelpbutton('form', 'intro'); + echo '
'; ?> -
- intro); ?> + intro); ?>
student")) ?>:student")) ?>: open, ""); - helpbutton("allowdiscussions", get_string("allowdiscussions", - "forum", moodle_strtolower("$course->student")), "forum"); + choose_from_menu($FORUM_OPEN_MODES, 'open', $form->open, ''); + helpbutton('allowdiscussions', get_string('allowdiscussions', + 'forum', moodle_strtolower("$course->student")), 'forum'); ?>
:: forcesubscribe, ""); - helpbutton("subscription2", get_string("forcesubscribeq", "forum"), "forum"); + choose_from_menu($options, 'forcesubscribe', $form->forcesubscribe, ''); + helpbutton('subscription2', get_string('forcesubscribeq', 'forum'), 'forum'); ?>
".get_string("rsstype").":"; + echo '
'.get_string('rsstype').':'; unset($choices); - $choices[0] = get_string("none"); - $choices[1] = get_string("discussions", "forum"); - $choices[2] = get_string("posts", "forum"); - choose_from_menu ($choices, "rsstype", $form->rsstype, ""); - helpbutton("rsstype", get_string("rsstype"), "forum"); - echo "
".get_string("rssarticles").":"; + echo '
'.get_string('rssarticles').':'; unset($choices); - $choices[0] = "0"; - $choices[1] = "1"; - $choices[2] = "2"; - $choices[3] = "3"; - $choices[4] = "4"; - $choices[5] = "5"; - $choices[10] = "10"; - $choices[15] = "15"; - $choices[20] = "20"; - $choices[25] = "25"; - $choices[30] = "30"; - $choices[40] = "40"; - $choices[50] = "50"; - choose_from_menu ($choices, "rssarticles", $form->rssarticles, ""); - helpbutton("rssarticles", get_string("rssarticles"), "forum"); - echo "
: + + + '; + echo ''; + echo ''; - echo get_string("grade").":"; - print_grade_menu($course->id, "scale", $form->scale, false); - echo "
"; + echo ''; - echo "'; + echo ' diff --git a/mod/forum/post.html b/mod/forum/post.html index 2bf1444c5b..e128ea240d 100644 --- a/mod/forum/post.html +++ b/mod/forum/post.html @@ -17,7 +17,6 @@
"; + echo '"; + echo ''; - echo "assessed) { - echo " checked "; + echo ' checked="checked" '; } - echo " />"; - echo get_string("ratingsuse", "forum").":"; - echo "
"; + echo ' />'; + echo ' '.get_string('ratingsuse', 'forum').':'; + echo '
'; // The odd order below was to maintain backward compatibility unset($options); - $options[2] = get_string("ratingonlyteachers", "forum", moodle_strtolower($course->teachers)); - $options[1] = get_string("ratingeveryone", "forum"); - echo get_string("users").":"; - choose_from_menu($options, "assessed", $form->assessed, ""); - echo "
"; + $options[2] = get_string('ratingonlyteachers', 'forum', moodle_strtolower($course->teachers)); + $options[1] = get_string('ratingeveryone', 'forum'); + echo get_string('users').': '; + echo '
'; + choose_from_menu($options, 'assessed', $form->assessed, ''); + echo '
'; unset($options); - $options[0] = get_string("ratingpublicnot", "forum", $course->students); - $options[1] = get_string("ratingpublic", "forum", $course->students); - echo get_string("view").":"; - choose_from_menu($options, "assesspublic", $form->assesspublic, ""); - echo "
"; + $options[0] = get_string('ratingpublicnot', 'forum', $course->students); + $options[1] = get_string('ratingpublic', 'forum', $course->students); + echo get_string('view').': '; + echo '
'; + choose_from_menu($options, 'assesspublic', $form->assesspublic, ''); + echo '
'; + echo get_string('grade').': '; + echo ''; + print_grade_menu($course->id, 'scale', $form->scale, false); + echo '
'; + echo 'assesstimestart and $form->assesstimefinish and $form->assessed) { $form->ratingtime = 1; - echo " checked "; + echo ' checked="checked" '; } - echo " />"; + echo ' /> '; + print_string('ratingtime', 'forum'); - print_string("ratingtime", "forum"); - echo "
"; - echo get_string("from").":"; - print_date_selector("startday", "startmonth", "startyear", $form->assesstimestart); - print_time_selector("starthour", "startminute", $form->assesstimestart); - echo "
"; - echo get_string("to").":"; - print_date_selector("finishday", "finishmonth", "finishyear", $form->assesstimefinish); - print_time_selector("finishhour", "finishminute", $form->assesstimefinish); - echo "
"; - echo "
"; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; + echo '
 '; + + echo '
'; + echo get_string('from').': '; + print_date_selector('startday', 'startmonth', 'startyear', $form->assesstimestart); + print_time_selector('starthour', 'startminute', $form->assesstimestart); + echo '
'; + echo get_string('to').': '; + print_date_selector('finishday', 'finishmonth', 'finishyear', $form->assesstimefinish); + print_time_selector('finishhour', 'finishminute', $form->assesstimefinish); + echo '
'; + echo '
'; - echo ""; + echo ''; if (empty($form->ratingtime)) { - echo ""; + echo ''; } ?>
- "; @@ -32,7 +31,6 @@ } ?>
-