From b99e90b08d6a3bf9122d9af0c60dcdd21d6993b4 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Mon, 2 Aug 2004 18:22:47 +0000 Subject: [PATCH] Modified pending formats to be more structured. No visual changes. --- .../encyclopedia/encyclopedia_format.php | 21 ++++++++------ mod/glossary/formats/faq/faq_format.php | 28 +++++++++++++------ .../fullwithauthor/fullwithauthor_format.php | 2 +- .../fullwithoutauthor_format.php | 5 +--- 4 files changed, 34 insertions(+), 22 deletions(-) diff --git a/mod/glossary/formats/encyclopedia/encyclopedia_format.php b/mod/glossary/formats/encyclopedia/encyclopedia_format.php index 035bc6ec07..850f385d82 100644 --- a/mod/glossary/formats/encyclopedia/encyclopedia_format.php +++ b/mod/glossary/formats/encyclopedia/encyclopedia_format.php @@ -15,20 +15,27 @@ function glossary_show_entry_encyclopedia($course, $cm, $glossary, $entry, $mode $return = false; if ($entry) { print_user_picture($user->id, $course->id, $user->picture); + echo ""; - echo "cellheading\" class=\"forumpostheader\">"; - glossary_print_entry_approval($cm, $entry, $mode); + echo "cellheading\" class=\"forumpostheader\">"; echo ""; glossary_print_entry_concept($entry); - echo "
"; + echo "
"; + echo "$strby " . fullname($user, isteacher($course->id)) . ""; echo "  (".get_string("lastedited").": ". userdate($entry->timemodified).")"; + echo ""; + echo "\ncellheading\" width=35 valign=top class=\"forumpostheader\">"; + + glossary_print_entry_approval($cm, $entry, $mode); + echo ""; + echo ""; echo "\n"; echo "\n "; - echo "\ncellcontent\" class=\"forumpostmessage\">"; + echo "\ncellcontent\" class=\"forumpostmessage\">"; if ($entry->attachment) { $entry->course = $course->id; @@ -37,14 +44,12 @@ function glossary_show_entry_encyclopedia($course, $cm, $glossary, $entry, $mode } else { $align = "left"; } - glossary_print_entry_attachment($entry,"",$align); + glossary_print_entry_attachment($entry,"",$align,false); } glossary_print_entry_definition($entry); - glossary_print_entry_lower_section($course, $cm, $glossary, $entry,$mode,$hook,$printicons); + $return = glossary_print_entry_lower_section($course, $cm, $glossary, $entry,$mode,$hook,$printicons,$ratings); echo ' '; - $return = glossary_print_entry_ratings($course, $entry, $ratings); - } else { echo "
"; print_string("noentry", "glossary"); diff --git a/mod/glossary/formats/faq/faq_format.php b/mod/glossary/formats/faq/faq_format.php index ee2c52b6ec..87ac0dd621 100644 --- a/mod/glossary/formats/faq/faq_format.php +++ b/mod/glossary/formats/faq/faq_format.php @@ -6,25 +6,35 @@ function glossary_show_entry_faq($course, $cm, $glossary, $entry, $mode="",$hook if ( $entry ) { $colour = $THEME->cellheading2; - echo '
'; + echo "\n
"; echo ''; - echo ""; + echo "\n"; - echo '' . get_string("question","glossary") . ': '; - glossary_print_entry_concept($entry) . '
'; - echo '  ' . get_string("lastedited").': '.userdate($entry->timemodified) . ''; - echo ""; + + echo "\n"; + echo "\n
"; + echo ""; $entry->course = $course->id; + + echo '' . get_string("question","glossary") . ': '; + glossary_print_entry_concept($entry); + echo '
'; + + echo "(".get_string("lastedited").": ". + userdate($entry->timemodified).")"; + echo "
"; + glossary_print_entry_approval($cm, $entry, $mode); glossary_print_entry_attachment($entry,"html","right"); + echo "
cellcontent\">"; + echo "
cellcontent\" class=\"forumpostmessage\">"; echo '' . get_string("answer","glossary") . ': '; + glossary_print_entry_definition($entry); - glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $mode, $hook,$printicons); - echo ' '; - $return = glossary_print_entry_ratings($course, $entry, $ratings); + $return = glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $mode, $hook,$printicons,$ratings); echo '
'; } else { diff --git a/mod/glossary/formats/fullwithauthor/fullwithauthor_format.php b/mod/glossary/formats/fullwithauthor/fullwithauthor_format.php index 8323a9b961..225e27dfa8 100644 --- a/mod/glossary/formats/fullwithauthor/fullwithauthor_format.php +++ b/mod/glossary/formats/fullwithauthor/fullwithauthor_format.php @@ -40,7 +40,7 @@ function glossary_show_entry_fullwithauthor($course, $cm, $glossary, $entry, $mo echo "\ncellcontent\" class=\"forumpostmessage\">"; glossary_print_entry_definition($entry); - glossary_print_entry_lower_section($course, $cm, $glossary, $entry,$mode,$hook,$printicons,$ratings); + $return = glossary_print_entry_lower_section($course, $cm, $glossary, $entry,$mode,$hook,$printicons,$ratings); echo ' '; } else { echo "
"; diff --git a/mod/glossary/formats/fullwithoutauthor/fullwithoutauthor_format.php b/mod/glossary/formats/fullwithoutauthor/fullwithoutauthor_format.php index c9f8ed7121..492e774936 100644 --- a/mod/glossary/formats/fullwithoutauthor/fullwithoutauthor_format.php +++ b/mod/glossary/formats/fullwithoutauthor/fullwithoutauthor_format.php @@ -5,9 +5,6 @@ function glossary_show_entry_fullwithoutauthor($course, $cm, $glossary, $entry, $colour = $THEME->cellheading2; - $user = get_record("user", "id", $entry->userid); - $strby = get_string("writtenby", "glossary"); - echo "\n
"; echo "\n"; @@ -35,7 +32,7 @@ function glossary_show_entry_fullwithoutauthor($course, $cm, $glossary, $entry, echo "\n
cellcontent\" class=\"forumpostmessage\">"; glossary_print_entry_definition($entry); - glossary_print_entry_lower_section($course, $cm, $glossary, $entry,$mode,$hook,$printicons,$ratings); + $return = glossary_print_entry_lower_section($course, $cm, $glossary, $entry,$mode,$hook,$printicons,$ratings); echo ' '; } else { echo "
"; -- 2.39.5