From: moodler Date: Thu, 13 Jan 2005 10:08:23 +0000 (+0000) Subject: Changes for XHTML compatibility and other HTML code cleanup X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=d3709d95c425cec33c45b9e53052491d21b7c55c;p=moodle.git Changes for XHTML compatibility and other HTML code cleanup --- diff --git a/mod/glossary/edit.html b/mod/glossary/edit.html index b0bfe62134..f5ede3a965 100644 --- a/mod/glossary/edit.html +++ b/mod/glossary/edit.html @@ -16,15 +16,15 @@ if (isset($errors)) { - - + + - +

:

:" />

:

: id,'name ASC'); - echo ""; echo ""; if ( $categories ) { @@ -45,12 +45,12 @@ if (isset($errors)) {
- - + @@ -138,7 +138,7 @@ if (isset($errors)) { - + - + @@ -181,7 +182,7 @@ if (isset($errors)) { - + " /> " /> diff --git a/mod/glossary/edit.php b/mod/glossary/edit.php index 56dbbe7acc..8dd69c7971 100644 --- a/mod/glossary/edit.php +++ b/mod/glossary/edit.php @@ -303,11 +303,14 @@ if ( (!$ineditperiod || $USER->id != $newentry->userid) and !isteacher($course- /// Info box if ( $glossary->intro ) { - print_simple_box_start('center','70%'); + echo '

+

'; helpbutton("aliases", strip_tags(get_string("aliases", "glossary")), "glossary"); - ?>

+ ?>
@@ -71,7 +71,7 @@ if (isset($errors)) { } else { $selected = ""; } - echo ' '; + echo ' '; echo ''; print_string("entryusedynalink","glossary"); echo ''; @@ -83,7 +83,7 @@ if (isset($errors)) { } else { $selected = ""; } - echo ' '; + echo ' '; echo ''; print_string("casesensitive","glossary"); echo ''; @@ -96,7 +96,7 @@ if (isset($errors)) { } else { $selected = ""; } - echo ' '; + echo ' '; echo ''; print_string("fullmatch","glossary"); echo ''; @@ -112,9 +112,9 @@ if (isset($errors)) {

+

: -

definition); ?>

:

:

:
(

:
(
dirroot.'/lib/uploadlib.php'); upload_print_form_fragment(1,array('attachment'),null,false,null,$course->maxbytes,0,false); helpbutton("attachment", get_string("attachment", "glossary"), "glossary"); + echo ' '; print_string("maxsize", "", display_size(get_max_upload_file_size($CFG->maxbytes, $course->maxbytes))); ?>
'; + echo '
'; echo format_text($glossary->intro); print_simple_box_end(); } + echo '
'; + /// Tabbed browsing sections $tab = GLOSSARY_ADDENTRY_VIEW; include("tabs.html"); diff --git a/mod/glossary/export.php b/mod/glossary/export.php index 6eb7895be5..6b904e0e98 100644 --- a/mod/glossary/export.php +++ b/mod/glossary/export.php @@ -52,9 +52,12 @@ /// Info box if ( $glossary->intro ) { - print_simple_box_start('center','70%'); + echo ''; + echo '
'; echo format_text($glossary->intro); print_simple_box_end(); + + echo '
'; } /// Tabbed browsing sections @@ -72,5 +75,9 @@ } else { $ffurl = "../../file.php?file=$ffurl"; } - echo '

' . get_string("exportedfile","glossary") . '

' + echo '

' . get_string("exportedfile","glossary") . '

'; + + echo ''; + glossary_print_tabbed_table_end(); + print_footer(); ?> diff --git a/mod/glossary/filter.php b/mod/glossary/filter.php index 77882c8e0b..e6b961ff61 100644 --- a/mod/glossary/filter.php +++ b/mod/glossary/filter.php @@ -43,7 +43,7 @@ $categories = get_records_select("glossary_categories", "glossaryid IN ($glossaries) AND usedynalink != 0", "$cbylenght glossaryid","id,glossaryid, name $as concept, 1 $as casesensitive,$GLOSSARY_CONCEPT_IS_CATEGORY $as category, 1 $as fullmatch"); if ( $entries and $categories ) { $concepts = array_merge($entries, $categories); - usort($concepts,'glossary_sort_entries_by_lenght'); + usort($concepts,'glossary_sort_entries_by_length'); } elseif ( $categories ) { $concepts = $categories; } elseif ( $entries ) { @@ -108,6 +108,10 @@ } } } + /// tags removed for XHTML compatibility + $text = str_replace('', '', $text); + $text = str_replace('', '', $text); + return $text; } @@ -197,7 +201,7 @@ return $text; } - function glossary_sort_entries_by_lenght ( $entry0, $entry1 ) { + function glossary_sort_entries_by_length ( $entry0, $entry1 ) { if ( strlen(trim($entry0->concept)) < strlen(trim($entry1->concept)) ) { return 1; } elseif ( strlen(trim($entry0->concept)) > strlen(trim($entry1->concept)) ) { diff --git a/mod/glossary/formats/continuous/continuous_format.php b/mod/glossary/formats/continuous/continuous_format.php index 403b3ae4a7..72a53cefbb 100644 --- a/mod/glossary/formats/continuous/continuous_format.php +++ b/mod/glossary/formats/continuous/continuous_format.php @@ -6,8 +6,8 @@ function glossary_show_entry_continuous($course, $cm, $glossary, $entry, $mode=" $colour = $THEME->cellheading2; - echo "\n\n"; - echo "\n"; + echo "\n
\n"; + echo "\n"; echo "\n"; + echo "\n
\n"; - echo "
\n"; + echo "\n"; echo "
\n"; glossary_print_entry_approval($cm, $entry, $mode); glossary_print_entry_attachment($entry,"html","right"); diff --git a/mod/glossary/formats/encyclopedia/encyclopedia_format.php b/mod/glossary/formats/encyclopedia/encyclopedia_format.php index 68e464e311..ec59171608 100644 --- a/mod/glossary/formats/encyclopedia/encyclopedia_format.php +++ b/mod/glossary/formats/encyclopedia/encyclopedia_format.php @@ -8,9 +8,9 @@ function glossary_show_entry_encyclopedia($course, $cm, $glossary, $entry, $mode $user = get_record("user", "id", $entry->userid); $strby = get_string("writtenby", "glossary"); - echo "\n
"; + echo "\n
"; - echo "\n"; + echo "\n"; echo "\n
"; $return = false; if ($entry) { diff --git a/mod/glossary/formats/entrylist/entrylist_format.php b/mod/glossary/formats/entrylist/entrylist_format.php index 40a3e640f3..7317f49ae1 100644 --- a/mod/glossary/formats/entrylist/entrylist_format.php +++ b/mod/glossary/formats/entrylist/entrylist_format.php @@ -6,9 +6,9 @@ function glossary_show_entry_entrylist($course, $cm, $glossary, $entry, $mode="" $colour = "#FFFFFF"; $return = false; - echo "\n"; + echo "\n
"; - echo "\n"; + echo "\n"; echo "
"; if ($entry) { glossary_print_entry_approval($cm, $entry, $mode); @@ -42,8 +42,8 @@ function glossary_print_entry_entrylist($course, $cm, $glossary, $entry, $mode=" //Take out autolinking in definitions un print view $entry->definition = ''.$entry->definition.''; - echo "\n\n"; - echo "\n"; + echo "\n
\n"; + echo "\n"; echo "
\n"; echo ""; glossary_print_entry_concept($entry); diff --git a/mod/glossary/formats/faq/faq_format.php b/mod/glossary/formats/faq/faq_format.php index 2f1332cea0..4e0fc5d36b 100644 --- a/mod/glossary/formats/faq/faq_format.php +++ b/mod/glossary/formats/faq/faq_format.php @@ -6,9 +6,9 @@ function glossary_show_entry_faq($course, $cm, $glossary, $entry, $mode="", $hoo if ( $entry ) { $colour = $THEME->cellheading2; - echo "\n
"; + echo "\n
"; - echo ''; + echo ''; echo "
"; $entry->course = $course->id; diff --git a/mod/glossary/formats/fullwithauthor/fullwithauthor_format.php b/mod/glossary/formats/fullwithauthor/fullwithauthor_format.php index a1e25ad868..e49276c745 100644 --- a/mod/glossary/formats/fullwithauthor/fullwithauthor_format.php +++ b/mod/glossary/formats/fullwithauthor/fullwithauthor_format.php @@ -8,9 +8,9 @@ function glossary_show_entry_fullwithauthor($course, $cm, $glossary, $entry, $mo $user = get_record("user", "id", $entry->userid); $strby = get_string("writtenby", "glossary"); - echo "\n
"; + echo "\n
"; - echo "\n"; + echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n
"; $return = false; if ($entry) { @@ -35,7 +35,7 @@ function glossary_show_entry_fullwithauthor($course, $cm, $glossary, $entry, $mo echo "
 cellcontent\" class=\"forumpostmessage\">"; diff --git a/mod/glossary/formats/fullwithoutauthor/fullwithoutauthor_format.php b/mod/glossary/formats/fullwithoutauthor/fullwithoutauthor_format.php index c8efaa7a5f..043e8ed177 100644 --- a/mod/glossary/formats/fullwithoutauthor/fullwithoutauthor_format.php +++ b/mod/glossary/formats/fullwithoutauthor/fullwithoutauthor_format.php @@ -5,9 +5,9 @@ function glossary_show_entry_fullwithoutauthor($course, $cm, $glossary, $entry, $colour = $THEME->cellheading2; - echo "\n
"; + echo "\n
"; - echo "\n"; + echo "\n"; $return = false; if ($entry) { @@ -28,7 +28,7 @@ function glossary_show_entry_fullwithoutauthor($course, $cm, $glossary, $entry, echo ""; - echo "\n"; + echo "\n"; echo "\n
cellcontent\" class=\"forumpostmessage\">"; glossary_print_entry_definition($entry); diff --git a/mod/glossary/import.html b/mod/glossary/import.html index d1b90e4086..8c9204f9e3 100644 --- a/mod/glossary/import.html +++ b/mod/glossary/import.html @@ -1,12 +1,13 @@ -
+ - + @@ -15,15 +16,13 @@ @@ -32,8 +31,7 @@

:

: dirroot.'/lib/uploadlib.php'); upload_print_form_fragment(1,array('file'),null,false,null,0,0); helpbutton("filetoimport", get_string("filetoimport", "glossary"), "glossary"); + echo ' '; print_string("maxsize", "", display_size(get_max_upload_file_size())); ?> - + - - + +
-

:

: -

:

:" />
- +
-

" />

" /> " />
diff --git a/mod/glossary/import.php b/mod/glossary/import.php index 8f8a42753a..261eceafe2 100644 --- a/mod/glossary/import.php +++ b/mod/glossary/import.php @@ -55,9 +55,11 @@ /// Info box if ( $glossary->intro ) { - print_simple_box_start('center','70%'); + echo ''; + echo '
'; echo format_text($glossary->intro); print_simple_box_end(); + echo '
'; } /// Tabbed browsing sections @@ -67,6 +69,7 @@ if ( !$step ) { include("import.html"); + echo ''; glossary_print_tabbed_table_end(); print_footer($course); exit; @@ -79,6 +82,8 @@ $um = new upload_manager('file',false,false,$course,false,0); if (!$um->preprocess_files()) { + echo ''; + glossary_print_tabbed_table_end(); print_continue('import.php?id='.$id); print_footer(); die(); @@ -146,6 +151,7 @@ // Include new glossary and return the new ID if ( !$glossary->id = glossary_add_instance($glossary) ) { notify("Error while trying to create the new glossary."); + echo ''; glossary_print_tabbed_table_end(); print_footer($course); exit; @@ -196,6 +202,7 @@ } } else { notify("Error while trying to create the new glossary."); + echo ''; glossary_print_tabbed_table_end(); print_footer($course); exit; diff --git a/mod/glossary/lib.php b/mod/glossary/lib.php index 63ee834cdc..6ee7ab232d 100644 --- a/mod/glossary/lib.php +++ b/mod/glossary/lib.php @@ -799,7 +799,7 @@ function glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $m echo ''; if ( $aliases ) { echo ''; + get_string("aliases","glossary") . ': ' . $aliases . ''; } if ($icons) { echo ''; @@ -1175,7 +1175,6 @@ $currentrow = ( $currenttab - ( $currenttab % $tabsperrow) ) / $tabspe $numrows = (int) ( $tabs / $tabsperrow ) + 1; ?> -
' . - get_string("aliases","glossary") . ': ' . $aliases . '
'. $icons . '
diff --git a/mod/glossary/tabs.html b/mod/glossary/tabs.html index d16fd524de..fe02bec494 100644 --- a/mod/glossary/tabs.html +++ b/mod/glossary/tabs.html @@ -63,12 +63,12 @@ } /// printing header of the current tab -// echo '
'; glossary_print_tabbed_table_start($data, $tab, $glossary_tCFG); if (!isset($category)) { $category = ""; } + switch ($tab) { case GLOSSARY_CATEGORY_VIEW: diff --git a/mod/glossary/view.php b/mod/glossary/view.php index 1ab77b0b32..4b3c2e3071 100644 --- a/mod/glossary/view.php +++ b/mod/glossary/view.php @@ -245,37 +245,37 @@ } echo '

'; + /// Info box if ( $glossary->intro ) { - echo '
'; + echo ''; + echo '
'; echo format_text($glossary->intro); print_simple_box_end(); } /// Search box - echo '
'; echo ''; - echo '
'; + echo ''; + echo '
'; - echo '

'; echo ' '; if ($mode == 'search') { - echo ' '; + echo ' '; } else { - echo ' '; + echo ' '; } if ($fullsearch) { $fullsearchchecked = 'checked="checked"'; } else { $fullsearchchecked = ''; } - echo ''; + echo ''; echo ''; echo ''; echo $strsearchindefinition; - echo '

'; print_simple_box_end(); echo ''; @@ -331,7 +331,7 @@ if ( $printpivot ) { $currentpivot = strtoupper($pivot); - echo '

'; + echo '

'; echo ''; echo ''; @@ -348,7 +348,7 @@ } echo " $pivottoshow" ; - echo '
'; + echo '
'; } }