Skip to content

Commit

Permalink
feat: remove GUA, Chatbot, Jira
Browse files Browse the repository at this point in the history
  • Loading branch information
igobranco authored and sandroscosta committed Apr 8, 2024
1 parent 95b75eb commit 954d0f6
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 174 deletions.
56 changes: 0 additions & 56 deletions edx-platform/nau-basic/cms/templates/widgets/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,59 +96,3 @@
</footer>
</div>


## Jira Service Desk Widget
<%
jira_service_desk = static.get_value('NAU_STUDIO_JIRA_SERVICE_DESK_KEY', getattr(settings, 'NAU_STUDIO_JIRA_SERVICE_DESK_KEY', None))
%>
% if jira_service_desk:
<script data-jsd-embedded data-key="${jira_service_desk}" data-base-url="https://jsd-widget.atlassian.com" src="https://jsd-widget.atlassian.com/assets/embed.js"></script>
% endif


## Chatbot
<%
chatbox_startup_js_url = static.get_value('NAU_S_CHATBOT_JS_URL', getattr(settings, 'NAU_STUDIO_CHATBOT_JS_URL', None))
%>
% if chatbox_startup_js_url:
<%
chatbot_ignore_paths = static.get_value('NAU_STUDIO_CHATBOT_IGNORE_PATHS', getattr(settings, 'NAU_STUDIO_CHATBOT_IGNORE_PATHS', []))
# chatbot_ignore_paths = ['/register', '/login']
%>
% if request.path not in chatbot_ignore_paths:
<%
chatbot_user_email = ""
if user.is_authenticated:
chatbot_user_email = user.email
endif
chatbot_user_course = ""
if course:
chatbot_user_course = course.display_name_with_default + "-" + course.display_org_with_default + "-" + course.display_number_with_default
endif
%>
<script>
function loadScript(src, callback) {
var s,
r,
t;
r = false;
s = document.createElement('script');
s.type = 'text/javascript';
s.src = src;
s.id = 'botscriptpass';
s.setAttribute("param_curso", "${chatbot_user_course}");
s.setAttribute("param_email", "${chatbot_user_email}");
s.onload = s.onreadystatechange = function () {
if (!r && (!this.readyState || this.readyState == 'complete')) {
r = true;
callback();
}
};
t = document.getElementsByTagName('script')[0];
t.parentNode.insertBefore(s, t);
}
loadScript("${chatbox_startup_js_url}", function () {
});
</script>
% endif
% endif
31 changes: 0 additions & 31 deletions edx-platform/nau-basic/cms/templates/widgets/segment-io.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,37 +41,6 @@
<%!
from lms.djangoapps.ccx.overrides import get_current_ccx
%>
<% nau_ga_acct = static.get_value("NAU_GOOGLE_ANALYTICS_ACCOUNT", getattr(settings, 'NAU_GOOGLE_ANALYTICS_ACCOUNT', False)) %>
% if nau_ga_acct:
<!-- NAU theme Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', '${nau_ga_acct | n, js_escaped_string}', 'auto');
% if context_course:
<% google_universal_analytics_course_id_array = str(context_course.id).split(':')[1].split('+') %>
ga('set', {
'dimension1': '${google_universal_analytics_course_id_array[0]}',
'dimension2': '${google_universal_analytics_course_id_array[1]}',
'dimension3': '${google_universal_analytics_course_id_array[2]}',
'dimension4': '${context_course.id}',
<%
display_name = context_course.display_name_with_default
if settings.FEATURES.get('CUSTOM_COURSES_EDX', False):
ccx = get_current_ccx(context_course.id)
if ccx:
display_name = ccx.display_name
%>
'dimension5': '${display_name}',
});
% endif
ga('send', 'pageview');
</script>
<!-- End NAU theme Google Analytics -->
% endif

<% nau_gtm_tracking_id = static.get_value('NAU_GOOGLE_TAG_MANAGER_ID', getattr(settings, 'NAU_GOOGLE_TAG_MANAGER_ID', None)) %>
% if nau_gtm_tracking_id:
Expand Down
56 changes: 0 additions & 56 deletions edx-platform/nau-basic/lms/templates/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,59 +106,3 @@

<%include file="modal-update-terms-of-service.html" />


## Jira Service Desk Widget
<%
jira_service_desk = static.get_value('NAU_LMS_JIRA_SERVICE_DESK_KEY', getattr(settings, 'NAU_LMS_JIRA_SERVICE_DESK_KEY', None))
%>
% if jira_service_desk:
<script data-jsd-embedded data-key="${jira_service_desk}" data-base-url="https://jsd-widget.atlassian.com" src="https://jsd-widget.atlassian.com/assets/embed.js"></script>
% endif

## Chatbot
<%
chatbox_startup_js_url = static.get_value('NAU_LMS_CHATBOT_JS_URL', getattr(settings, 'NAU_LMS_CHATBOT_JS_URL', None))
%>
% if chatbox_startup_js_url:
<%
chatbot_ignore_paths = static.get_value('NAU_LMS_CHATBOT_IGNORE_PATHS', getattr(settings, 'NAU_LMS_CHATBOT_IGNORE_PATHS', []))
# chatbot_ignore_paths = ['/register', '/login']
%>
% if request.path not in chatbot_ignore_paths:
<%
chatbot_user_email = ""
if user.is_authenticated:
chatbot_user_email = user.email
endif
chatbot_user_course = ""
if course:
chatbot_user_course = course.display_name_with_default + "-" + course.display_org_with_default + "-" + course.display_number_with_default
endif
%>
<script defer>
function loadScript(src, callback) {
var s,
r,
t;
r = false;
s = document.createElement('script');
s.type = 'text/javascript';
s.src = src;
s.id = 'botscriptpass';
s.setAttribute("param_curso", "${chatbot_user_course}");
s.setAttribute("param_email", "${chatbot_user_email}");
s.onload = s.onreadystatechange = function () {
if (!r && (!this.readyState || this.readyState == 'complete')) {
r = true;
callback();
}
};
s.defer = true;
t = document.getElementsByTagName('script')[0];
t.parentNode.insertBefore(s, t);
}
loadScript("${chatbox_startup_js_url}", function () {
});
</script>
% endif
% endif
31 changes: 0 additions & 31 deletions edx-platform/nau-basic/lms/templates/head-extra.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,6 @@
from openedx.core.djangolib.js_utils import js_escaped_string
from lms.djangoapps.ccx.overrides import get_current_ccx
%>
<% nau_ga_acct = static.get_value("NAU_GOOGLE_ANALYTICS_ACCOUNT", getattr(settings, 'NAU_GOOGLE_ANALYTICS_ACCOUNT', False)) %>
% if nau_ga_acct:
<!-- NAU theme Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', '${nau_ga_acct | n, js_escaped_string}', 'auto');
% if course:
<% google_universal_analytics_course_id_array = str(course.id).split(':')[1].split('+') %>
ga('set', {
'dimension1': '${google_universal_analytics_course_id_array[0]}',
'dimension2': '${google_universal_analytics_course_id_array[1]}',
'dimension3': '${google_universal_analytics_course_id_array[2]}',
'dimension4': '${course.id}',
<%
display_name = course.display_name_with_default
if settings.FEATURES.get('CUSTOM_COURSES_EDX', False):
ccx = get_current_ccx(course.id)
if ccx:
display_name = ccx.display_name
%>
'dimension5': '${display_name}',
});
% endif
ga('send', 'pageview');
</script>
<!-- End NAU theme Google Analytics -->
% endif

<% nau_gtm_tracking_id = static.get_value('NAU_GOOGLE_TAG_MANAGER_ID', getattr(settings, 'NAU_GOOGLE_TAG_MANAGER_ID', None)) %>
% if nau_gtm_tracking_id:
Expand Down

0 comments on commit 954d0f6

Please sign in to comment.