<%namespace name="renderer" file="thread.html"/>

<section class="discussion">
  <a class="discussion-title" href="javascript:void(0)">Discussion</a>
  ${renderer.render_thread(course_id, thread, edit_thread=True, show_comments=True)}
</section>

<%!
  def escape_quotes(text):
    return text.replace('\"', '\\\"').replace("\'", "\\\'")
%>

<script type="text/javascript">
  var $$user_info = JSON.parse('${user_info | escape_quotes}');
  var $$course_id = "${course_id}";
  var $$tags = JSON.parse("${tags | escape_quotes}");
  var $$annotated_content_info = JSON.parse("${annotated_content_info | escape_quotes}");
</script>
