Skip to content

Commit

Permalink
MDL-64339 core_comment: Update comment display to link to profile.
Browse files Browse the repository at this point in the history
  • Loading branch information
abgreeve committed Dec 7, 2018
1 parent cb7f6a6 commit a1b0ac6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion comment/locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ public function print_comments($page = 0) {

$link = new moodle_url('/comment/index.php', array('action' => 'delete', 'sesskey' => sesskey()));
foreach ($comments as $c) {
$userdata = html_writer::link(new moodle_url('/user/profile.php', ['id' => $c->userid]), $c->fullname);
$this->setup_plugin($c);
if (!empty($this->plugintype)) {
$context_url = plugin_callback($this->plugintype, $this->pluginname, 'comment', 'url', array($c));
Expand All @@ -180,7 +181,7 @@ public function print_comments($page = 0) {
$action .= html_writer::empty_tag('br');
$action .= html_writer::link($context_url, get_string('commentincontext'), array('target'=>'_blank'));
}
$table->data[] = array($checkbox, $c->fullname, $c->content, $action);
$table->data[] = array($checkbox, $userdata, $c->content, $action);
}
echo html_writer::table($table);
echo $OUTPUT->paging_bar($count, $page, $this->perpage, $CFG->wwwroot.'/comment/index.php');
Expand Down

0 comments on commit a1b0ac6

Please sign in to comment.