Skip to content

Commit

Permalink
Now the name of the authors is a link to the user page.
Browse files Browse the repository at this point in the history
To be a bit more like forum posts Bug 2809.
(http://moodle.org/bugs/bug.php?op=show&bugid=2809)

Merged from MOODLE_15_STABLE
  • Loading branch information
stronk7 committed Jun 19, 2005
1 parent fddeb22 commit ef4d6e6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
5 changes: 4 additions & 1 deletion mod/glossary/formats/TEMPLATE/TEMPLATE_format.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 '<span class="author">'.$strby.' '.fullname($user, isteacher($course->id)) . '<br />';
$fullname = fullname($user, isteacher($course->id));
$by->name = '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$user->id.'&amp;course='.$course->id.'">'.$fullname.'</a>';
$by->date = userdate($entry->timemodified);
echo '<span class="author">'.get_string('bynameondate', 'forum', $by).'</span>' . '<br />';

//Use this code to show modification date
//Comments: Configuration not supported
Expand Down
9 changes: 6 additions & 3 deletions mod/glossary/formats/encyclopedia/encyclopedia_format.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,12 @@ function glossary_show_entry_encyclopedia($course, $cm, $glossary, $entry, $mode
echo '<span class="concept">';
glossary_print_entry_concept($entry);
echo '</span><br />';
echo '<span class="author">'.$strby.' '.fullname($user, isteacher($course->id)).'</span>';
echo '&nbsp;&nbsp;<span class="time">('.get_string('lastedited').': '.
userdate($entry->timemodified).')</span>';

$fullname = fullname($user, isteacher($course->id));
$by->name = '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$user->id.'&amp;course='.$course->id.'">'.$fullname.'</a>';
$by->date = userdate($entry->timemodified);
echo '<span class="author">'.get_string('bynameondate', 'forum', $by).'</span>';

echo '</td>';

echo '<td class="entryapproval">';
Expand Down
8 changes: 5 additions & 3 deletions mod/glossary/formats/fullwithauthor/fullwithauthor_format.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ function glossary_show_entry_fullwithauthor($course, $cm, $glossary, $entry, $mo
glossary_print_entry_concept($entry);
echo '</span><br />';

echo '<span class="author">'.$strby.' '.fullname($user, isteacher($course->id));
echo '&nbsp;&nbsp;('.get_string('lastedited').': '.
userdate($entry->timemodified).')</span>';
$fullname = fullname($user, isteacher($course->id));
$by->name = '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$user->id.'&amp;course='.$course->id.'">'.$fullname.'</a>';
$by->date = userdate($entry->timemodified);
echo '<span class="author">'.get_string('bynameondate', 'forum', $by).'</span>';

echo '</td>';
echo '<td class="entryattachment">';

Expand Down

0 comments on commit ef4d6e6

Please sign in to comment.