Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-38431 comment: Pass formated comment created time to JS and print…

…_comment
  • Loading branch information...
commit 5288af68fc6fa47bde557b18213725c04484846e 1 parent 8673a98
@rajeshtaneja rajeshtaneja authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  comment/lib.php
View
3  comment/lib.php
@@ -530,6 +530,7 @@ public function get_comments($page = '') {
$url = new moodle_url('/user/view.php', array('id'=>$u->id, 'course'=>$this->courseid));
$c->profileurl = $url->out(false);
$c->fullname = fullname($u);
+ $c->time = userdate($c->timecreated, $c->strftimeformat);
$c->content = format_text($c->content, $c->format, $formatoptions);
$c->avatar = $OUTPUT->user_picture($u, array('size'=>18));
@@ -808,7 +809,7 @@ public function print_comment($cmt, $nonjs = true) {
$replacements[] = $cmt->avatar;
$replacements[] = html_writer::link($cmt->profileurl, $cmt->fullname);
$replacements[] = $cmt->content;
- $replacements[] = userdate($cmt->timecreated, $cmt->strftimeformat);
+ $replacements[] = $cmt->time;
// use html template to format a single comment.
return str_replace($patterns, $replacements, $this->template);
Please sign in to comment.
Something went wrong with that request. Please try again.