Solved bug 1086.

Please, verify (and close) it. Patch submitted by Petr Skoda. Thanks!
I've modified some lines in formats to avoid some Notices and make
everything display more consistent. Please, test it!!
This commit is contained in:
stronk7
2004-05-11 22:38:45 +00:00
parent 701fff2145
commit 3eb2f7ecf8
6 changed files with 16 additions and 12 deletions
+2 -2
View File
@@ -8,7 +8,7 @@ function glossary_print_entry_by_format($course, $cm, $glossary, $entry, $mode="
$user = get_record("user", "id", $entry->userid);
$strby = get_string("writtenby", "glossary");
echo "\n<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 valign=top cellpadding=3 class=forumpost align=center>";
echo "\n<tr>";
echo "\n<td bgcolor=\"$colour\" width=35 valign=top class=\"forumpostpicture\">";
@@ -17,7 +17,7 @@ function glossary_print_entry_by_format($course, $cm, $glossary, $entry, $mode="
print_user_picture($user->id, $course->id, $user->picture);
echo "</td>";
echo "<td nowrap valign=\"top\" width=100% bgcolor=\"$THEME->cellheading\" class=\"forumpostheader\">";
echo "<td valign=\"top\" width=100% bgcolor=\"$THEME->cellheading\" class=\"forumpostheader\">";
glossary_print_entry_approval($cm, $entry, $mode);
glossary_print_entry_attachment($entry,"html","right");
+2 -2
View File
@@ -8,7 +8,7 @@ function glossary_print_entry_by_format($course, $cm, $glossary, $entry, $mode="
$user = get_record("user", "id", $entry->userid);
$strby = get_string("writtenby", "glossary");
echo "\n<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 valign=top cellpadding=3 class=forumpost align=center>";
echo "\n<tr>";
echo "\n<td bgcolor=\"$colour\" width=35 valign=top class=\"forumpostpicture\">";
@@ -16,7 +16,7 @@ function glossary_print_entry_by_format($course, $cm, $glossary, $entry, $mode="
if ($entry) {
print_user_picture($user->id, $course->id, $user->picture);
echo "</td>";
echo "<td align=\"top\" nowrap width=100% bgcolor=\"$THEME->cellheading\" class=\"forumpostheader\">";
echo "<td align=\"top\" width=100% bgcolor=\"$THEME->cellheading\" class=\"forumpostheader\">";
glossary_print_entry_approval($cm, $entry, $mode);
echo "<b>";
glossary_print_entry_concept($entry);
+1 -1
View File
@@ -6,7 +6,7 @@ function glossary_print_entry_by_format($course, $cm, $glossary, $entry, $mode="
if ( $entry ) {
$colour = $THEME->cellheading2;
echo '<table border=1 cellspacing=0 width=95% valign=top cellpadding=10>';
echo '<br /><table border=0 cellspacing=0 width=95% valign=top cellpadding=10 class=forumpost>';
echo '<tr>';
echo "<td width=100% bgcolor=\"$colour\">";
+3 -3
View File
@@ -6,17 +6,17 @@ function glossary_print_entry_by_format($course, $cm, $glossary, $entry, $mode="
$colour = $THEME->cellheading2;
$return = false;
echo "\n<table border=1 cellspacing=0 width=95% valign=top cellpadding=10>";
echo "\n<br /><table border=0 width=95% cellspacing=0 valign=top cellpadding=3 class=forumpost align=center>";
echo "\n<tr>";
echo "<td width=100% bgcolor=\"$colour\">";
echo "<td width=100% bgcolor=\"$THEME->cellheading\">";
glossary_print_entry_approval($cm, $entry, $mode);
if ($entry) {
glossary_print_entry_attachment($entry,"html","right");
echo "<b>";
glossary_print_entry_concept($entry);
echo "</b><br />";
echo "&nbsp;&nbsp;<font size=1>".get_string("lastedited").": ".userdate($entry->timemodified)."</font>";
echo "<font size=1>".get_string("lastedited").": ".userdate($entry->timemodified)."</font>";
echo "</tr>";
echo "\n<tr><td width=100% bgcolor=\"$THEME->cellcontent\">";
+8 -3
View File
@@ -185,7 +185,7 @@ function glossary_user_complete($course, $user, $mod, $glossary) {
$glossary->displayformat == GLOSSARY_FORMAT_CONTINUOUS ) {
print_simple_box_start("center","70%");
} else {
echo '<table width="95%" boder="0"><tr><td>';
echo '<table width="95%" border="0"><tr><td>';
}
foreach ($entries as $entry) {
$cm = get_coursemodule_from_instance("glossary", $glossary->id, $course->id);
@@ -508,7 +508,8 @@ function glossary_print_entry_definition($entry) {
$definition = str_replace(array_keys($tags),$tags,$definition);
}
$text = format_text($definition, $entry->format);
$options->para = false;
$text = format_text($definition, $entry->format,$options);
if (!empty($entry->highlight)) {
$text = highlight($entry->highlight, $text);
}
@@ -661,7 +662,7 @@ function glossary_print_entry_by_default($course, $cm, $glossary, $entry,$mode="
$colour = $THEME->cellheading2;
echo "\n<TR>";
echo "<TD WIDTH=100% class=\"generalbox\" valign=\"top\" BGCOLOR=\"#FFFFFF\">";
echo "<TD WIDTH=100% valign=\"top\" BGCOLOR=\"#FFFFFF\">";
glossary_print_entry_approval($cm, $entry, $mode);
glossary_print_entry_attachment($entry,"html","right");
echo "<b>";
@@ -1111,6 +1112,10 @@ for ($row = 0; $row < $numrows; $row++) {
$currentcolor = $tabcolor;
$currentstyle = 'generaltab';
}
if (!isset($data[$tabproccessed]->link)) {
$data[$tabproccessed]->link = NULL;
}
echo "<td class=\"$currentstyle\" width=\"$tabwidth%\" bgcolor=\"$currentcolor\" align=\"center\"><b>";
if ($tabproccessed != $currenttab and $data[$tabproccessed]->link) {
echo "<a href=\"" . $data[$tabproccessed]->link . "\">";
-1
View File
@@ -439,7 +439,6 @@
if ( glossary_print_entry($course, $cm, $glossary, $entry, $mode, $hook,1,$displayformat,$ratings) ) {
$ratingsmenuused = true;
}
echo "<br />";
$entriesshown++;
}