From: stronk7 Date: Mon, 29 Sep 2003 21:37:54 +0000 (+0000) Subject: Included new format for glossary display "Encyclopedia" X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=d8cb66a8461b7b9229bd44b82d6d60edc7e6efe9;p=moodle.git Included new format for glossary display "Encyclopedia" --- diff --git a/lang/en/glossary.php b/lang/en/glossary.php index 567c79edd1..79d4841b26 100644 --- a/lang/en/glossary.php +++ b/lang/en/glossary.php @@ -23,6 +23,7 @@ $string['displayformat'] = "Display format"; $string['displayformatdefault'] = "Simple, dictionary style"; $string['displayformat1'] = "Full without author."; $string['displayformat2'] = "Full with author."; +$string['displayformat3'] = "Encyclopedia."; $string['editentry'] = "Edit entry"; $string['editcategories'] = "Edit categories"; $string['entries'] = "Entries"; diff --git a/mod/glossary/formats/3.php b/mod/glossary/formats/3.php new file mode 100644 index 0000000000..ea58b9609f --- /dev/null +++ b/mod/glossary/formats/3.php @@ -0,0 +1,62 @@ +timemarked < $entry->modified) { + $colour = $THEME->cellheading2; +// } else { +// $colour = $THEME->cellheading; +// } + + $user = get_record("user", "id", $entry->userid); + $strby = get_string("writtenby","glossary"); + + echo "
"; + + echo "\n"; + + echo "\n"; + echo "\n"; + echo ""; + + echo "\n"; + + echo "
"; + if ($entry) { + print_user_picture($user->id, $course->id, $user->picture); + } + echo "cellheading\">"; + if ($entry) { + echo "$entry->concept
$strby $user->firstname $user->lastname"; + echo "  (".get_string("lastedited").": ".userdate($entry->timemodified).")"; + } + echo "
cellcontent\">"; + if ($entry) { + if ($entry->attachment) { + $entry->course = $course->id; + if (strlen($entry->definition)%2) { + $align = "right"; + } else { + $align = "left"; + } + echo "
"; + echo glossary_print_attachments($entry); + echo "
"; + } + echo format_text($entry->definition, $entry->format); + + glossary_print_entry_icons($course, $cm, $glossary, $entry,$currentview,$cat); + + } else { + echo "
"; + print_string("noentry", "glossary"); + echo "
"; + } + echo "
\n"; + + echo "
"; +} + +?>