<tr>
<td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="5">
<tr>
- <td width="150" align="right"><p><b><?php echo get_string("concept","glossary") ?>:</b></p></td>
- <td><input type="text" name="concept" size="30" value="<?php p(clean_text($newentry->concept)) ?>" /></td>
+ <td width="150" align="right"><b><?php echo get_string("concept","glossary") ?>:</b></td>
+ <td><input type="text" name="concept" size="30" value="<?php p(clean_text($newentry->concept)) ?>" alt="<?php print_string("concept","glossary") ?>" /></td>
</tr>
<tr>
- <td align="right"><p><b><?php echo get_string("categories","glossary") ?>:</b></p></td>
+ <td align="right"><b><?php echo get_string("categories","glossary") ?>:</b></td>
<td valign="top">
<?php
$categories = get_records("glossary_categories","glossaryid",$glossary->id,'name ASC');
- echo "<select size=\"5\" name=\"categories[]\" multiple=\"yes\" />";
+ echo "<select size=\"5\" name=\"categories[]\" multiple=\"multiple\" >";
echo "<option value=\"0\">" . get_string("notcategorised","glossary") . "</option>";
if ( $categories ) {
</table></td>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
- <td valign="top" align="right"><p><b>
+ <td valign="top" align="right"><b>
<?php
echo get_string("aliases","glossary");
echo ':<br />';
helpbutton("aliases", strip_tags(get_string("aliases", "glossary")), "glossary");
- ?></b></p>
+ ?></b>
</td>
<td valign="top">
<textarea rows="2" name="aliases" cols="20"><?php p(clean_text($newentry->aliases)) ?></textarea>
} else {
$selected = "";
}
- echo '<input type="checkbox" name="usedynalink" value="1" ' . $selected . ' onclick="return lockoptions(\'form\',\'usedynalink\', items)" /> ';
+ echo '<input type="checkbox" name="usedynalink" value="1" alt="' . get_string("entryusedynalink","glossary") . '" ' . $selected . ' onclick="return lockoptions(\'form\',\'usedynalink\', items)" /> ';
echo '<font size="-1">';
print_string("entryusedynalink","glossary");
echo '</font>';
} else {
$selected = "";
}
- echo '<input type="checkbox" name="casesensitive" value="1" ' . $selected . ' /> ';
+ echo '<input type="checkbox" name="casesensitive" value="1" alt="' . get_string("casesensitive","glossary") . '" ' . $selected . ' /> ';
echo '<font size="-1">';
print_string("casesensitive","glossary");
echo '</font>';
} else {
$selected = "";
}
- echo '<input type="checkbox" name="fullmatch" value="1" ' . $selected . ' /> ';
+ echo '<input type="checkbox" name="fullmatch" value="1" alt="' . get_string("fullmatch","glossary") . '" ' . $selected . ' /> ';
echo '<font size="-1">';
print_string("fullmatch","glossary");
echo '</font>';
</td>
</tr>
<tr valign="top">
- <td align="right"><p><b>
+ <td align="right"><b>
<?php print_string("definition", "glossary"); ?>:
- </b></p></td>
+ </b></td>
<td align="left" rowspan="2">
<?php print_textarea($usehtmleditor, 25, 65, 630, 400, "text", $newentry->definition); ?>
</td>
</td>
</tr>
<tr valign="top">
- <td align="right"><p><b><?php print_string("formattexttype"); ?>:</b></p></td>
+ <td align="right"><b><?php print_string("formattexttype"); ?>:</b></td>
<td>
<?php
if ($usehtmleditor) { /// Trying this out for a while
</tr>
<tr valign="top">
- <td align="right"><p><b><?php print_string("attachment", "glossary") ?>:<br />(<?php print_string("optional") ?>) </b></p></td>
+ <td align="right"><b><?php print_string("attachment", "glossary") ?>:<br />(<?php print_string("optional") ?>) </b></td>
<td>
<?php
require_once($CFG->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)));
?>
</td>
<input type="hidden" name="id" value="<?php p($cm->id) ?>" />
<input type="hidden" name="mode" value="<?php p($mode) ?>" />
<input type="hidden" name="hook" value="<?php p($hook) ?>" />
- <input type="hidden" name="confirm" value="1">
+ <input type="hidden" name="confirm" value="1" />
<input type="submit" value="<?php print_string("savechanges") ?>" />
<input type="reset" value="<?php print_string("revert") ?>" />
/// Info box
if ( $glossary->intro ) {
- print_simple_box_start('center','70%');
+ echo '<table align="center" width="70%" border="0">';
+ echo '<tr><td align="center" class="glossaryintrobox">';
echo format_text($glossary->intro);
print_simple_box_end();
}
+ echo '<br />';
+
/// Tabbed browsing sections
$tab = GLOSSARY_ADDENTRY_VIEW;
include("tabs.html");
/// Info box
if ( $glossary->intro ) {
- print_simple_box_start('center','70%');
+ echo '<table align="center" width="70%" border="0">';
+ echo '<tr><td align="center" class="glossaryintrobox">';
echo format_text($glossary->intro);
print_simple_box_end();
+
+ echo '<br />';
}
/// Tabbed browsing sections
} else {
$ffurl = "../../file.php?file=$ffurl";
}
- echo '<p><center><a href="' . $ffurl . '" target="_blank">' . get_string("exportedfile","glossary") . '</a></center><p>'
+ echo '<p align="center"><a href="' . $ffurl . '" target="_blank">' . get_string("exportedfile","glossary") . '</a></p>';
+
+ echo '</center>';
+ glossary_print_tabbed_table_end();
+ print_footer();
?>
$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 ) {
}
}
}
+ /// <nolink> tags removed for XHTML compatibility
+ $text = str_replace('<nolink>', '', $text);
+ $text = str_replace('</nolink>', '', $text);
+
return $text;
}
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)) ) {
$colour = $THEME->cellheading2;
- echo "\n<table border=\"0\" width=\"95%\" cellspacing=\"0\" valign=\"top\" cellpadding=\"0\" align=\"center\">\n";
- echo "<tr>\n";
+ echo "\n<table border=\"0\" width=\"95%\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\n";
+ echo "<tr valign=\"top\">\n";
echo "<td width=\"100%\" valign=\"top\"\n";
glossary_print_entry_approval($cm, $entry, $mode);
glossary_print_entry_attachment($entry,"html","right");
$colour = $THEME->cellheading2;
- echo "\n<table border=\"0\" width=\"95%\" cellspacing=\"0\" valign=\"top\" cellpadding=\"3\" class=\"forumpost\" align=\"center\">\n";
- echo "<tr>\n";
+ echo "\n<table border=\"0\" width=\"95%\" cellspacing=\"0\" cellpadding=\"3\" class=\"forumpost\" align=\"center\">\n";
+ echo "<tr valign=\"top\">\n";
echo "<td width=\"100%\" valign=\"top\" bgcolor=\"#FFFFFF\">\n";
glossary_print_entry_approval($cm, $entry, $mode);
glossary_print_entry_attachment($entry,"html","right");
$user = get_record("user", "id", $entry->userid);
$strby = get_string("writtenby", "glossary");
- echo "\n<br /><table border=\"0\" width=\"95%\" cellspacing=\"0\" valign=\"top\" cellpadding=\"3\" class=\"forumpost\" align=\"center\">";
+ echo "\n<br /><table border=\"0\" width=\"95%\" cellspacing=\"0\" cellpadding=\"3\" class=\"forumpost\" align=\"center\">";
- echo "\n<tr>";
+ echo "\n<tr valign=\"top\">";
echo "\n<td bgcolor=\"$colour\" width=\"35\" valign=\"top\" class=\"forumpostpicture\">";
$return = false;
if ($entry) {
$colour = "#FFFFFF";
$return = false;
- echo "\n<table border=\"0\" cellspacing=\"0\" width=\"95%\" valign=\"top\" cellpadding=\"10\">";
+ echo "\n<table border=\"0\" cellspacing=\"0\" width=\"95%\" cellpadding=\"10\">";
- echo "\n<tr>";
+ echo "\n<tr valign=\"top\">";
echo "<td width=\"100%\" bgcolor=\"$colour\">";
if ($entry) {
glossary_print_entry_approval($cm, $entry, $mode);
//Take out autolinking in definitions un print view
$entry->definition = '<nolink>'.$entry->definition.'</nolink>';
- echo "\n<table border=0 width=95% cellspacing=0 valign=top cellpadding=3 class=forumpost align=center>\n";
- echo "<tr>\n";
+ echo "\n<table border=\"0\" width=\"95%\" cellspacing=\"0\" cellpadding=\"3\" class=\"forumpost\" align=\"center\">\n";
+ echo "<tr valign=\"top\">\n";
echo "<td width=\"100%\" valign=\"top\" bgcolor=\"#FFFFFF\">\n";
echo "<b>";
glossary_print_entry_concept($entry);
if ( $entry ) {
$colour = $THEME->cellheading2;
- echo "\n<br /><table border=\"0\" width=\"95%\" cellspacing=\"0\" valign=\"top\" cellpadding=\"3\" class=\"forumpost\" align=\"center\">";
+ echo "\n<br /><table border=\"0\" width=\"95%\" cellspacing=\"0\" cellpadding=\"3\" class=\"forumpost\" align=\"center\">";
- echo '<tr>';
+ echo '<tr valign=\"top\">';
echo "<td valign=\"top\" width=\"100%\" bgcolor=\"$colour\">";
$entry->course = $course->id;
$user = get_record("user", "id", $entry->userid);
$strby = get_string("writtenby", "glossary");
- echo "\n<br /><table border=\"0\" width=\"95%\" cellspacing=\"0\" valign=\"top\" cellpadding=\"3\" class=\"forumpost\" align=\"center\">";
+ echo "\n<br /><table border=\"0\" width=\"95%\" cellspacing=\"0\" cellpadding=\"3\" class=\"forumpost\" align=\"center\">";
- echo "\n<tr>";
+ echo "\n<tr valign=\"top\">";
echo "\n<td bgcolor=\"$colour\" width=\"35\" valign=\"top\" class=\"forumpostpicture\">";
$return = false;
if ($entry) {
echo "</tr>";
- echo "\n<tr>";
+ echo "\n<tr valign=\"top\">";
echo "\n<td bgcolor=\"$colour\" width=\"35\" valign=\"top\" class=\"forumpostside\"> </td>";
echo "\n<td width=\"100%\" colspan=\"2\" bgcolor=\"$THEME->cellcontent\" class=\"forumpostmessage\">";
$colour = $THEME->cellheading2;
- echo "\n<br /><table border=\"0\" width=\"95%\" cellspacing=\"0\" valign=\"top\" cellpadding=\"3\" class=\"forumpost\" align=\"center\">";
+ echo "\n<br /><table border=\"0\" width=\"95%\" cellspacing=\"0\" cellpadding=\"3\" class=\"forumpost\" align=\"center\">";
- echo "\n<tr>";
+ echo "\n<tr valign=\"top\">";
$return = false;
if ($entry) {
echo "</tr>";
- echo "\n<tr>";
+ echo "\n<tr valign=\"top\">";
echo "\n<td width=\"100%\" colspan=\"2\" bgcolor=\"$THEME->cellcontent\" class=\"forumpostmessage\">";
glossary_print_entry_definition($entry);
-<form method="POST" action="import.php" name="form" enctype="multipart/form-data">
+<form method="post" action="import.php" name="form" enctype="multipart/form-data">
<table border="0" cellpadding="3" cellspacing="3" width="100%">
<tr>
- <td align="right" valign="top" width="30%"><p><b><?php print_string("filetoimport","glossary") ?>:</b></p></td>
+ <td align="right" valign="top" width="30%"><b><?php print_string("filetoimport","glossary") ?>:</b></td>
<td width="70%">
<?php
require_once($CFG->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()));
?>
</td>
<td align="right" colspan="2">
<table border="0" cellpadding="0" cellspacing="3" width="100%">
<tr>
- <td width="25%">
- <p align="right"><?php p(get_string("destination","glossary")) ?>:</td>
+ <td width="25%" align="right"><?php print_string("destination","glossary") ?>:</td>
<td width="25%"><select size="1" name="dest">
- <option selected="selected" value="current"><?php p(get_string("currentglossary","glossary")) ?></option>
- <option value="new"><?php p(get_string("newglossary","glossary")) ?></option>
+ <option selected="selected" value="current"><?php print_string("currentglossary","glossary") ?></option>
+ <option value="new"><?php print_string("newglossary","glossary") ?></option>
</select> <?php helpbutton("destination", get_string("destination", "glossary"), "glossary") ?></td>
- <td width="25%">
- <p align="right"><?php p(get_string("importcategories","glossary")) ?>:</td>
- <td width="25%"><input type="checkbox" name="catsincl" value="1" /> <?php helpbutton("importcategories", get_string("importcategories", "glossary"), "glossary") ?></td>
+ <td width="25%" align="right"><?php print_string("importcategories","glossary") ?>:</td>
+ <td width="25%"><input type="checkbox" name="catsincl" value="1" alt="<?php print_string("importcategories","glossary") ?>" /> <?php helpbutton("importcategories", get_string("importcategories", "glossary"), "glossary") ?></td>
</tr>
</table>
</td>
<td align="right" colspan="2">
<table border="0" cellpadding="3" cellspacing="3" width="100%">
<tr>
- <td width="50%">
- <p align="right"><input type="submit" value="<?php print_string("savechanges") ?>" /></td>
+ <td width="50%" align="right"><input type="submit" value="<?php print_string("savechanges") ?>" /></td>
<td width="50%"><input type="reset" value="<?php print_string("revert") ?>" /></td>
</tr>
</table>
/// Info box
if ( $glossary->intro ) {
- print_simple_box_start('center','70%');
+ echo '<table align="center" width="70%" border="0">';
+ echo '<tr><td align="center" class="glossaryintrobox">';
echo format_text($glossary->intro);
print_simple_box_end();
+ echo '<br />';
}
/// Tabbed browsing sections
if ( !$step ) {
include("import.html");
+ echo '</center>';
glossary_print_tabbed_table_end();
print_footer($course);
exit;
$um = new upload_manager('file',false,false,$course,false,0);
if (!$um->preprocess_files()) {
+ echo '</center>';
+ glossary_print_tabbed_table_end();
print_continue('import.php?id='.$id);
print_footer();
die();
// 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 '</center>';
glossary_print_tabbed_table_end();
print_footer($course);
exit;
}
} else {
notify("Error while trying to create the new glossary.");
+ echo '</center>';
glossary_print_tabbed_table_end();
print_footer($course);
exit;
echo '<table border="0" width="100%" align="center">';
if ( $aliases ) {
echo '<tr><td align="center" valign="top"><font size="1">' .
- get_string("aliases","glossary") . ': ' . $aliases . '</td></tr>';
+ get_string("aliases","glossary") . ': ' . $aliases . '</font></td></tr>';
}
if ($icons) {
echo '<tr><td align="right" valign="top">'. $icons . '</td></tr>';
$numrows = (int) ( $tabs / $tabsperrow ) + 1;
?>
- <center>
<table border="0" cellpadding="0" cellspacing="0" width="<?php p($tablewidth) ?>">
<tr>
<td width="100%">
}
/// printing header of the current tab
-// echo '<center>';
glossary_print_tabbed_table_start($data, $tab, $glossary_tCFG);
if (!isset($category)) {
$category = "";
}
+
switch ($tab) {
case GLOSSARY_CATEGORY_VIEW:
}
echo '</b></font></p>';
+
/// Info box
if ( $glossary->intro ) {
- echo '<table align="center" width="70%" bgcolor="#FFFFFF" class="generaltab"><tr><td>';
+ echo '<table align="center" width="70%" border="0">';
+ echo '<tr><td align="center" class="glossaryintrobox">';
echo format_text($glossary->intro);
print_simple_box_end();
}
/// Search box
- echo '<br />';
echo '<form method="post" action="view.php">';
- echo '<table align="center" width="70%" bgcolor="' . $THEME->cellheading .'" class="generalbox"><tr><td align="center">';
+ echo '<table align="center" width="70%" border="0">';
+ echo '<tr><td align="center" class="glossarysearchbox">';
- echo '<p align="center">';
echo '<input type="submit" value="'.$strsearch.'" name="searchbutton" /> ';
if ($mode == 'search') {
- echo '<input type="text" name="hook" size="20" value="'.$hook.'" /> ';
+ echo '<input type="text" name="hook" size="20" value="'.$hook.'" alt="'.$strsearch.'" /> ';
} else {
- echo '<input type="text" name="hook" size="20" value="" /> ';
+ echo '<input type="text" name="hook" size="20" value="" alt="'.$strsearch.'" /> ';
}
if ($fullsearch) {
$fullsearchchecked = 'checked="checked"';
} else {
$fullsearchchecked = '';
}
- echo '<input type="checkbox" name="fullsearch" value="1" '.$fullsearchchecked.' />';
+ echo '<input type="checkbox" name="fullsearch" value="1" '.$fullsearchchecked.' alt="'.$strsearchindefinition.'" />';
echo '<input type="hidden" name="mode" value="search" />';
echo '<input type="hidden" name="id" value="'.$cm->id.'" />';
echo $strsearchindefinition;
- echo '</p>';
print_simple_box_end();
echo '</form>';
if ( $printpivot ) {
$currentpivot = strtoupper($pivot);
- echo '<p>';
+ echo '<div>';
echo '<table width="95%" border="0" class="generaltabselected" bgcolor="' . $THEME->cellheading2 . '">';
echo '<tr>';
}
echo "<strong> $pivottoshow</strong>" ;
- echo '</td></tr></table>';
+ echo '</td></tr></table></div>';
}
}