MDL-7861, xhtml strict related changes for glossary

This commit is contained in:
toyomoyo 2007-01-12 06:57:33 +00:00
parent f6830d4cb1
commit 36a2b6bdc3
12 changed files with 40 additions and 38 deletions

View File

@ -49,9 +49,9 @@
/// original glossary entry
echo "<center>";
echo "<div class=\"boxaligncenter\">";
glossary_print_entry($course, $cm, $glossary, $entry, "", "", false);
echo "</center>";
echo "</div>";
/// comments

View File

@ -2,8 +2,9 @@
global $CFG;
require_once("../../config.php");
?>
<center>
<div class="boxaligncenter">
<form id="form" method="post" action="editcategories.php">
<div>
<table class="generalbox" cellpadding="5">
<tr valign="top">
<td align="right"><b><?php echo get_string("name") ?>:</b></td>
@ -42,5 +43,6 @@
</td>
</tr>
</table>
</div>
</form>
</center>
</div>

View File

@ -85,7 +85,7 @@
delete_records("glossary_categories","id", $hook);
print_simple_box_start("center","40%", "#FFBBBB");
echo "<center>" . get_string("categorydeleted","glossary") ."</center>";
echo "<div style=\"text-align:center\">" . get_string("categorydeleted","glossary") ."</div>";
echo "</center>";
print_simple_box_end();
print_footer($course);
@ -97,7 +97,7 @@
echo "<p align=\"center\">" . get_string("delete"). " " . get_string("category","glossary") . "<font size=\"3\">";
print_simple_box_start("center","40%", "#FFBBBB");
echo "<center><b>".format_text($category->name)."</b><br/>";
echo "<div class=\"boxaligncenter\"><b>".format_text($category->name)."</b><br/>";
$num_entries = count_records("glossary_entries_categories","categoryid",$category->id);
if ( $num_entries ) {
@ -123,7 +123,7 @@
$options = array ("id" => $id);
print_single_button("editcategories.php", $options, get_string("no") );
echo "</td></tr></table>";
echo "</center>";
echo "</div>";
print_simple_box_end();
}
}
@ -136,7 +136,7 @@
echo "<p align=\"center\">" . get_string("add"). " " . get_string("category","glossary") . "<font size=\"3\">";
print_simple_box_start("center","40%", "#FFBBBB");
echo "<center>" . get_string("duplicatedcategory","glossary") ."</center>";
echo "<div style=\"text-align:center\">" . get_string("duplicatedcategory","glossary") ."</div>";
echo "</center>";
print_simple_box_end();

View File

@ -47,12 +47,12 @@
$entry = get_record('glossary_entries', 'id', $entry);
if ( !$confirm ) {
echo '<center>';
echo '<div class="boxaligncenter">';
$areyousure = get_string('areyousureexport','glossary');
notice_yesno ('<center><h2>'.format_string($entry->concept).'</h2><p align="center">'.$areyousure.'<br /><b>'.format_string($mainglossary->name).'</b>?',
notice_yesno ('<h2>'.format_string($entry->concept).'</h2><p align="center">'.$areyousure.'<br /><b>'.format_string($mainglossary->name).'</b>?',
'exportentry.php?id='.$id.'&amp;mode='.$mode.'&amp;hook='.$hook.'&amp;entry='.$entry->id.'&amp;confirm=1',
'view.php?id='.$cm->id.'&amp;mode='.$mode.'&amp;hook='.$hook);
echo '</div>';
} else {
if ( ! $mainglossary->allowduplicatedentries ) {
$dupentry = get_record('glossary_entries','glossaryid', $mainglossary->id, 'lower(concept)',moodle_strtolower(addslashes($entry->concept)));

View File

@ -98,9 +98,9 @@ function glossary_show_entry_TEMPLATE($course, $cm, $glossary, $entry, $mode='',
echo '</tr>';
echo "</table>\n";
} else {
echo '<center>';
echo '<div style="text-align:center">';
print_string('noentry', 'glossary');
echo '</center>';
echo '</div>';
}
return $return;

View File

@ -61,9 +61,9 @@ function glossary_show_entry_encyclopedia($course, $cm, $glossary, $entry, $mode
echo "</table>\n";
} else {
echo '<center>';
echo '<div style="text-align:center">';
print_string('noentry', 'glossary');
echo '</center>';
echo '</div>';
}
return $return;

View File

@ -26,9 +26,9 @@ function glossary_show_entry_entrylist($course, $cm, $glossary, $entry, $mode=''
}
echo '<br />';
} else {
echo '<center>';
echo '<div style="text-align:center">';
print_string('noentry', 'glossary');
echo '</center>';
echo '</div>';
}
echo '</td></tr>';

View File

@ -38,9 +38,9 @@ function glossary_show_entry_faq($course, $cm, $glossary, $entry, $mode="", $hoo
echo '</td></tr></table>';
} else {
echo '<center>';
echo '<div style="text-align:center">';
print_string('noentry', 'glossary');
echo '</center>';
echo '</div>';
}
return $return;
}

View File

@ -52,9 +52,9 @@ function glossary_show_entry_fullwithauthor($course, $cm, $glossary, $entry, $mo
echo '</td></tr>';
echo "</table>\n";
} else {
echo '<center>';
echo '<div style="text-align:center">';
print_string('noentry', 'glossary');
echo '</center>';
echo '</div>';
}
return $return;
}

View File

@ -358,10 +358,10 @@
// rejected entries
if ($rejections) {
echo '<center><table border="0" width="70%">';
echo '<div class="boxaligncenter"><table border="0" width="70%">';
echo '<tr><td align="center" colspan="2" width="100%"><strong>' . get_string("rejectionrpt","glossary") . '</strong></tr>';
echo $rejections;
echo '</table></center><p><hr width="75%">';
echo '</div></center><p><hr width="75%">';
}
} else {
notify("Error while trying to read the file.");

View File

@ -1264,7 +1264,7 @@ function glossary_print_tabbed_table_end() {
function glossary_print_approval_menu($cm, $glossary,$mode, $hook, $sortkey = '', $sortorder = '') {
if ($glossary->showalphabet) {
echo '<center>' . get_string("explainalphabet","glossary") . '</center><br />';
echo '<div style="text-align:center">' . get_string("explainalphabet","glossary") . '</div><br />';
}
glossary_print_special_links($cm, $glossary, $mode, $hook);
@ -1276,21 +1276,21 @@ function glossary_print_approval_menu($cm, $glossary,$mode, $hook, $sortkey = ''
}
function glossary_print_addentry_menu($cm, $glossary, $mode, $hook, $sortkey='', $sortorder = '') {
echo '<center>' . get_string("explainaddentry","glossary") . '</center><br />';
echo '<div style="text-align:center">' . get_string("explainaddentry","glossary") . '</div><br />';
}
function glossary_print_import_menu($cm, $glossary, $mode, $hook, $sortkey='', $sortorder = '') {
echo '<center>' . get_string("explainimport","glossary") . '</center><br />';
echo '<div style="text-align:center">' . get_string("explainimport","glossary") . '</div><br />';
}
function glossary_print_export_menu($cm, $glossary, $mode, $hook, $sortkey='', $sortorder = '') {
echo '<center>' . get_string("explainexport","glossary") . '</center><br />';
echo '<div style="text-align:center">' . get_string("explainexport","glossary") . '</div><br />';
}
function glossary_print_alphabet_menu($cm, $glossary, $mode, $hook, $sortkey='', $sortorder = '') {
if ( $mode != 'date' ) {
if ($glossary->showalphabet) {
echo '<center>' . get_string("explainalphabet","glossary") . '</center><br />';
echo '<div style="text-align:center">' . get_string("explainalphabet","glossary") . '</div><br />';
}
glossary_print_special_links($cm, $glossary, $mode, $hook);
@ -1305,7 +1305,7 @@ function glossary_print_alphabet_menu($cm, $glossary, $mode, $hook, $sortkey='',
function glossary_print_author_menu($cm, $glossary,$mode, $hook, $sortkey = '', $sortorder = '') {
if ($glossary->showalphabet) {
echo '<center>' . get_string("explainalphabet","glossary") . '</center><br />';
echo '<div style="text-align:center">' . get_string("explainalphabet","glossary") . '</div><br />';
}
glossary_print_sorting_links($cm, $mode, $sortkey,$sortorder);
@ -1530,7 +1530,7 @@ function glossary_print_comment($course, $cm, $glossary, $entry, $comment) {
$strby = get_string('writtenby','glossary');
$fullname = fullname($user, has_capability('moodle/site:viewfullnames', get_context_instance(CONTEXT_COURSE, $course->id)));
echo '<center>';
echo '<div class="boxaligncenter">';
echo '<table class="glossarycomment" cellspacing="0">';
echo '<tr valign="top">';
echo '<tr><td class="left picture">';
@ -1566,7 +1566,7 @@ function glossary_print_comment($course, $cm, $glossary, $entry, $comment) {
}
echo '</div></td></tr>';
echo '</table></center>';
echo '</table></div>';
}
@ -1610,7 +1610,7 @@ function glossary_print_entry_ratings($course, $entry, $ratings = NULL) {
function glossary_print_dynaentry($courseid, $entries, $displayformat = -1) {
global $USER,$CFG;
echo '<center>';
echo '<div class="boxaligncenter">';
echo '<table class="glossarypopup" cellspacing="0"><tr>';
echo '<td>';
if ( $entries ) {
@ -1653,7 +1653,7 @@ function glossary_print_dynaentry($courseid, $entries, $displayformat = -1) {
}
}
echo '</td>';
echo '</tr></table></center>';
echo '</tr></table></div>';
}
function glossary_generate_export_file($glossary, $hook = "", $hook = 0) {
@ -2002,7 +2002,7 @@ function glossary_get_paging_bar($totalcount, $page, $perpage, $baseurl, $maxpag
//If there are results (more than 1 page)
if ($totalcount > $perpage) {
$code .= "<center>";
$code .= "<div style=\"text-align:center\">";
$code .= "<p>".get_string("page").":";
$maxpage = (int)(($totalcount-1)/$perpage);
@ -2097,7 +2097,7 @@ function glossary_get_paging_bar($totalcount, $page, $perpage, $baseurl, $maxpag
//End html
$code .= "</p>";
$code .= "</center>";
$code .= "</div>";
}
return $code;

View File

@ -404,18 +404,18 @@
}
}
if ( !$entriesshown ) {
print_simple_box('<center>' . get_string("noentries","glossary") . '</center>',"center","95%");
print_simple_box('<div style="text-align:center">' . get_string("noentries","glossary") . '</div>',"center","95%");
}
if ($ratingsmenuused) {
echo "<center><input type=\"submit\" value=\"".get_string("sendinratings", "glossary")."\" />";
echo "<div class=\"boxaligncenter\"><input type=\"submit\" value=\"".get_string("sendinratings", "glossary")."\" />";
if ($glossary->scale < 0) {
if ($scale = get_record("scale", "id", abs($glossary->scale))) {
print_scale_menu_helpbutton($course->id, $scale );
}
}
echo "</center>";
echo "</div>";
echo "</form>";
}