diff --git a/lms/djangoapps/django_comment_client/utils.py b/lms/djangoapps/django_comment_client/utils.py index dc4a4e21e1..89d3cd99ba 100644 --- a/lms/djangoapps/django_comment_client/utils.py +++ b/lms/djangoapps/django_comment_client/utils.py @@ -222,6 +222,7 @@ def extend_content(content): 'raw_tags': ','.join(content.get('tags', [])), 'permalink': permalink(content), 'roles': roles, + 'updated': content['created_at']!=content['updated_at'], } return merge_dict(content, content_info) diff --git a/lms/static/coffee/src/discussion/content.coffee b/lms/static/coffee/src/discussion/content.coffee index 73c3688c2a..9f95c201f4 100644 --- a/lms/static/coffee/src/discussion/content.coffee +++ b/lms/static/coffee/src/discussion/content.coffee @@ -374,6 +374,9 @@ if Backbone? MathJax.Hub.Queue ["Typeset", MathJax.Hub, $contentBody.attr("id")] initTimeago: -> + @$("span.timeago").each (index, element) -> + elem = $(element) + elem.html("posted on #{$.timeago.parse(elem.html()).toLocaleString()}") @$("span.timeago").timeago() renderPartial: -> diff --git a/lms/templates/discussion/mustache/_content.mustache b/lms/templates/discussion/mustache/_content.mustache index f6b375dc88..264115919b 100644 --- a/lms/templates/discussion/mustache/_content.mustache +++ b/lms/templates/discussion/mustache/_content.mustache @@ -29,7 +29,10 @@ {{/thread}}
- sometime by + {{#content.updated}} + updated + {{/content.updated}} + {{content.created_at}} by {{#content.anonymous}} anonymous {{/content.anonymous}}