Skip to content

Commit

Permalink
feat: added beamer to edx-platform (#33701)
Browse files Browse the repository at this point in the history
  • Loading branch information
AhtishamShahid authored Nov 16, 2023
1 parent 1806b29 commit c6b36a8
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions cms/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -2859,3 +2859,4 @@ def _should_send_xblock_events(settings):
'course-authoring-xblock-lifecycle', 'enabled')
derived_collection_entry('EVENT_BUS_PRODUCER_CONFIG', 'org.openedx.content_authoring.xblock.deleted.v1',
'course-authoring-xblock-lifecycle', 'enabled')
BEAMER_PRODUCT_ID = ""
1 change: 1 addition & 0 deletions cms/envs/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,3 +678,4 @@ def get_env_setting(setting):
############## Event bus producer ##############
EVENT_BUS_PRODUCER_CONFIG = merge_producer_configs(EVENT_BUS_PRODUCER_CONFIG,
ENV_TOKENS.get('EVENT_BUS_PRODUCER_CONFIG', {}))
BEAMER_PRODUCT_ID = ENV_TOKENS.get('BEAMER_PRODUCT_ID', BEAMER_PRODUCT_ID)
6 changes: 6 additions & 0 deletions cms/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -188,4 +188,10 @@
<%include file="widgets/segment-io-footer.html" />
<div class="modal-cover"></div>
</body>
<script>
var beamer_config = {
product_id : "${settings.BEAMER_PRODUCT_ID | n, js_escaped_string}"
};
</script>
<script type="text/javascript" src="https://app.getbeamer.com/js/beamer-embed.js" defer="defer"></script>
</html>
1 change: 1 addition & 0 deletions lms/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -5421,3 +5421,4 @@ def _should_send_certificate_events(settings):
'learning-certificate-lifecycle', 'enabled')
derived_collection_entry('EVENT_BUS_PRODUCER_CONFIG', 'org.openedx.learning.certificate.revoked.v1',
'learning-certificate-lifecycle', 'enabled')
BEAMER_PRODUCT_ID = ""
1 change: 1 addition & 0 deletions lms/envs/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -1142,3 +1142,4 @@ def get_env_setting(setting):
############## Event bus producer ##############
EVENT_BUS_PRODUCER_CONFIG = merge_producer_configs(EVENT_BUS_PRODUCER_CONFIG,
ENV_TOKENS.get('EVENT_BUS_PRODUCER_CONFIG', {}))
BEAMER_PRODUCT_ID = ENV_TOKENS.get('BEAMER_PRODUCT_ID', BEAMER_PRODUCT_ID)
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
from django.utils.translation import gettext as _
from django.urls import reverse
from openedx.core.djangolib.markup import HTML
from django.conf import settings
from openedx.core.djangolib.js_utils import (
js_escaped_string
)
%>
<%block name="bodyclass">view-in-course view-instructordash</%block>

Expand Down Expand Up @@ -77,6 +81,13 @@
${HTML(section_data['fragment'].foot_html())}
% endif
% endfor

<script>
var beamer_config = {
product_id : "${settings.BEAMER_PRODUCT_ID | n, js_escaped_string}",
};
</script>
<script type="text/javascript" src="https://app.getbeamer.com/js/beamer-embed.js" defer="defer"></script>
</%block>

## Include Underscore templates
Expand Down Expand Up @@ -137,6 +148,7 @@ <h3 class="hd hd-3" id="header-${ section_data['section_key'] }">${ section_data
</section>
</main>
</div>

</div>

<%static:require_module_async module_name="js/dateutil_factory" class_name="DateUtilFactory">
Expand Down

0 comments on commit c6b36a8

Please sign in to comment.