diff --git a/lms/djangoapps/django_comment_client/forum/views.py b/lms/djangoapps/django_comment_client/forum/views.py index 312041d6ba..164ab77d1d 100644 --- a/lms/djangoapps/django_comment_client/forum/views.py +++ b/lms/djangoapps/django_comment_client/forum/views.py @@ -77,8 +77,8 @@ def get_threads(request, course_id, discussion_id): query_params = { 'page': request.GET.get('page', 1), 'per_page': THREADS_PER_PAGE, #TODO maybe change this later - 'sort_key': request.GET.get('sort_key', ''), - 'sort_order': request.GET.get('sort_order', ''), + 'sort_key': request.GET.get('sort_key', 'date'), + 'sort_order': request.GET.get('sort_order', 'desc'), 'text': request.GET.get('text', ''), 'tags': request.GET.get('tags', ''), } diff --git a/lms/static/coffee/src/customwmd.coffee b/lms/static/coffee/src/customwmd.coffee index c1ea7b867e..524fdf32cb 100644 --- a/lms/static/coffee/src/customwmd.coffee +++ b/lms/static/coffee/src/customwmd.coffee @@ -102,6 +102,7 @@ $ -> replaceMath: (text) -> text = text.replace /@@(\d+)@@/g, ($0, $1) => @math[$1] @math = null + console.log text text @replaceMathWrapper: (_this) -> @@ -110,11 +111,11 @@ $ -> if Markdown? Markdown.getMathCompatibleConverter = -> - converter = Markdown.getSanitizingConverter() - processor = new MathJaxProcessor() - converter.hooks.chain "preConversion", MathJaxProcessor.removeMathWrapper(processor)#processor.removeMath - converter.hooks.chain "postConversion", MathJaxProcessor.replaceMathWrapper(processor)#.replaceMath - converter + converter = Markdown.getSanitizingConverter() + processor = new MathJaxProcessor() + converter.hooks.chain "preConversion", MathJaxProcessor.removeMathWrapper(processor) + converter.hooks.chain "postConversion", MathJaxProcessor.replaceMathWrapper(processor) + converter Markdown.makeWmdEditor = (elem, appended_id, imageUploadUrl) -> $elem = $(elem) diff --git a/lms/static/coffee/src/discussion/content.coffee b/lms/static/coffee/src/discussion/content.coffee index a0f49cd356..b98c5eb7f0 100644 --- a/lms/static/coffee/src/discussion/content.coffee +++ b/lms/static/coffee/src/discussion/content.coffee @@ -87,8 +87,6 @@ initializeFollowThread = (thread) -> $discussionContent.attr("status", "normal") ) - handleUnvote = (elem) -> - handleVote = (elem, value) -> contentType = if $content.hasClass("thread") then "thread" else "comment" url = Discussion.urlFor("#{value}vote_#{contentType}", id) diff --git a/lms/templates/discussion/_js_dependencies.html b/lms/templates/discussion/_js_dependencies.html index fdc05dcf2d..0e5e6aa19f 100644 --- a/lms/templates/discussion/_js_dependencies.html +++ b/lms/templates/discussion/_js_dependencies.html @@ -7,10 +7,10 @@ MathJax.Hub.Config({ tex2jax: { inlineMath: [ - ["$","$"], + ["\\(","\\)"], ], displayMath: [ - ["$$","$$"], + ["\\[","\\]"], ] } }); @@ -19,6 +19,7 @@ ## This must appear after all mathjax-config blocks, so it is after the imports from the other templates. ## It can't be run through static.url because MathJax uses crazy url introspection to do lazy loading of MathJax extension libraries +