From: stronk7 Date: Tue, 11 May 2004 22:38:45 +0000 (+0000) Subject: Solved bug 1086. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=3eb2f7ecf8630cd8c130ca6842edb262ae080c7a;p=moodle.git 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!! --- diff --git a/mod/glossary/formats/2.php b/mod/glossary/formats/2.php index 9fe1394314..8eb95e9343 100644 --- a/mod/glossary/formats/2.php +++ b/mod/glossary/formats/2.php @@ -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"; + echo "\n
"; echo "\n"; echo "\n"; - echo "
"; @@ -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 "cellheading\" class=\"forumpostheader\">"; + echo "cellheading\" class=\"forumpostheader\">"; glossary_print_entry_approval($cm, $entry, $mode); glossary_print_entry_attachment($entry,"html","right"); diff --git a/mod/glossary/formats/3.php b/mod/glossary/formats/3.php index ab1920adcb..9df16b24b2 100644 --- a/mod/glossary/formats/3.php +++ b/mod/glossary/formats/3.php @@ -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"; + echo "\n
"; echo "\n"; echo "\n"; - echo "
"; @@ -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 "cellheading\" class=\"forumpostheader\">"; + echo "cellheading\" class=\"forumpostheader\">"; glossary_print_entry_approval($cm, $entry, $mode); echo ""; glossary_print_entry_concept($entry); diff --git a/mod/glossary/formats/4.php b/mod/glossary/formats/4.php index 0b00e13d0b..87bc412a9c 100644 --- a/mod/glossary/formats/4.php +++ b/mod/glossary/formats/4.php @@ -6,7 +6,7 @@ function glossary_print_entry_by_format($course, $cm, $glossary, $entry, $mode=" if ( $entry ) { $colour = $THEME->cellheading2; - echo ''; + echo '
'; echo ''; echo "
"; diff --git a/mod/glossary/formats/5.php b/mod/glossary/formats/5.php index 13be389e88..9bf3cb880a 100644 --- a/mod/glossary/formats/5.php +++ b/mod/glossary/formats/5.php @@ -6,17 +6,17 @@ function glossary_print_entry_by_format($course, $cm, $glossary, $entry, $mode=" $colour = $THEME->cellheading2; $return = false; - echo "\n"; + echo "\n
"; echo "\n"; - echo ""; echo "\n
"; + echo "cellheading\">"; glossary_print_entry_approval($cm, $entry, $mode); if ($entry) { glossary_print_entry_attachment($entry,"html","right"); echo ""; glossary_print_entry_concept($entry); echo "
"; - echo "  ".get_string("lastedited").": ".userdate($entry->timemodified).""; + echo "".get_string("lastedited").": ".userdate($entry->timemodified).""; echo "
cellcontent\">"; diff --git a/mod/glossary/lib.php b/mod/glossary/lib.php index 2f9dab2420..80b71d7f5b 100644 --- a/mod/glossary/lib.php +++ b/mod/glossary/lib.php @@ -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 '
'; + echo '"; - echo "
'; } 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
"; + echo ""; glossary_print_entry_approval($cm, $entry, $mode); glossary_print_entry_attachment($entry,"html","right"); echo ""; @@ -1111,6 +1112,10 @@ for ($row = 0; $row < $numrows; $row++) { $currentcolor = $tabcolor; $currentstyle = 'generaltab'; } + + if (!isset($data[$tabproccessed]->link)) { + $data[$tabproccessed]->link = NULL; + } echo ""; if ($tabproccessed != $currenttab and $data[$tabproccessed]->link) { echo "link . "\">"; diff --git a/mod/glossary/view.php b/mod/glossary/view.php index eb660f087b..d3f7f50549 100644 --- a/mod/glossary/view.php +++ b/mod/glossary/view.php @@ -439,7 +439,6 @@ if ( glossary_print_entry($course, $cm, $glossary, $entry, $mode, $hook,1,$displayformat,$ratings) ) { $ratingsmenuused = true; } - echo "
"; $entriesshown++; }