From 39952eee064c6820bf14b830c8a756e9deae1b41 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Sun, 19 Jun 2005 15:23:54 +0000 Subject: [PATCH] Now the name of the authors is a link to the user page. To be a bit more like forum posts Bug 2809. (http://moodle.org/bugs/bug.php?op=show&bugid=2809) --- mod/glossary/formats/TEMPLATE/TEMPLATE_format.php | 5 ++++- .../formats/encyclopedia/encyclopedia_format.php | 9 ++++++--- .../formats/fullwithauthor/fullwithauthor_format.php | 8 +++++--- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/mod/glossary/formats/TEMPLATE/TEMPLATE_format.php b/mod/glossary/formats/TEMPLATE/TEMPLATE_format.php index 1346b875b2b..edc5e6c16b3 100755 --- a/mod/glossary/formats/TEMPLATE/TEMPLATE_format.php +++ b/mod/glossary/formats/TEMPLATE/TEMPLATE_format.php @@ -23,7 +23,10 @@ function glossary_show_entry_TEMPLATE($course, $cm, $glossary, $entry, $mode='', //Use this code to show author's name //Comments: Configuration not supported - echo ''.$strby.' '.fullname($user, isteacher($course->id)) . '
'; + $fullname = fullname($user, isteacher($course->id)); + $by->name = ''.$fullname.''; + $by->date = userdate($entry->timemodified); + echo ''.get_string('bynameondate', 'forum', $by).'' . '
'; //Use this code to show modification date //Comments: Configuration not supported diff --git a/mod/glossary/formats/encyclopedia/encyclopedia_format.php b/mod/glossary/formats/encyclopedia/encyclopedia_format.php index 7720e1bf8bc..00438384daa 100644 --- a/mod/glossary/formats/encyclopedia/encyclopedia_format.php +++ b/mod/glossary/formats/encyclopedia/encyclopedia_format.php @@ -20,9 +20,12 @@ function glossary_show_entry_encyclopedia($course, $cm, $glossary, $entry, $mode echo ''; glossary_print_entry_concept($entry); echo '
'; - echo ''.$strby.' '.fullname($user, isteacher($course->id)).''; - echo '  ('.get_string('lastedited').': '. - userdate($entry->timemodified).')'; + + $fullname = fullname($user, isteacher($course->id)); + $by->name = ''.$fullname.''; + $by->date = userdate($entry->timemodified); + echo ''.get_string('bynameondate', 'forum', $by).''; + echo ''; echo ''; diff --git a/mod/glossary/formats/fullwithauthor/fullwithauthor_format.php b/mod/glossary/formats/fullwithauthor/fullwithauthor_format.php index c226a96d08e..c9050f305c5 100644 --- a/mod/glossary/formats/fullwithauthor/fullwithauthor_format.php +++ b/mod/glossary/formats/fullwithauthor/fullwithauthor_format.php @@ -22,9 +22,11 @@ function glossary_show_entry_fullwithauthor($course, $cm, $glossary, $entry, $mo glossary_print_entry_concept($entry); echo '

'; - echo ''.$strby.' '.fullname($user, isteacher($course->id)); - echo '  ('.get_string('lastedited').': '. - userdate($entry->timemodified).')'; + $fullname = fullname($user, isteacher($course->id)); + $by->name = ''.$fullname.''; + $by->date = userdate($entry->timemodified); + echo ''.get_string('bynameondate', 'forum', $by).''; + echo ''; echo '';