Files
edx-platform/common/templates/edxnotes_wrapper.html
2023-08-16 17:07:23 +05:00

24 lines
937 B
HTML

<%namespace name='static' file='/static_content.html'/>
<%page expression_filter="h"/>
<%!
import json
from django.utils.translation import gettext as _
from common.djangoapps.student.models import anonymous_id_for_user
from openedx.core.djangolib.js_utils import js_escaped_string, dump_js_escaped_json
%>
<%
if user:
params.update({'user': anonymous_id_for_user(user, None)})
%>
<div id="edx-notes-wrapper-${uid}" class="edx-notes-wrapper">
<div class="edx-notes-wrapper-content">${content | n, decode.utf8 }</div>
</div>
<%static:require_module_async module_name="js/edxnotes/views/notes_visibility_factory" class_name="NotesVisibilityFactory">
var element = document.getElementById('edx-notes-wrapper-${uid | n, js_escaped_string}');
NotesVisibilityFactory.VisibilityDecorator.factory(element, ${params | n, dump_js_escaped_json}, ${edxnotes_visibility | n, decode.utf8});
</%static:require_module_async>