fix: handle missing COMPLETION_AGGREGATOR_URL setting (#30331)
This commit is contained in:
@@ -22,7 +22,7 @@ from openedx.features.course_experience import course_home_page_title, DISABLE_C
|
||||
(course.enable_proctored_exams or course.enable_timed_exams)
|
||||
)
|
||||
|
||||
completion_aggregator_url = settings.COMPLETION_AGGREGATOR_URL if settings.FEATURES.get("SHOW_PROGRESS_BAR", False) else ""
|
||||
completion_aggregator_url = getattr(settings, "COMPLETION_AGGREGATOR_URL", "")
|
||||
%>
|
||||
|
||||
<%def name="course_name()">
|
||||
@@ -238,7 +238,7 @@ ${HTML(fragment.foot_html())}
|
||||
<span class="nav-item nav-item-sequence">${sequence_title}</span>
|
||||
% endif
|
||||
</div>
|
||||
% if settings.FEATURES.get("SHOW_PROGRESS_BAR", False):
|
||||
% if settings.FEATURES.get("SHOW_PROGRESS_BAR", False) and completion_aggregator_url:
|
||||
<div class="container">
|
||||
<iframe style="border: none; height: 50px; position: relative; top: 10px; width: -webkit-fill-available" src="${completion_aggregator_url}/${course.id}/">
|
||||
</iframe>
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
${gated_sequence_paywall | n, decode.utf8}
|
||||
% else:
|
||||
<div class="sr-is-focusable" tabindex="-1"></div>
|
||||
% if settings.FEATURES.get("SHOW_PROGRESS_BAR", False):
|
||||
% if settings.FEATURES.get("SHOW_PROGRESS_BAR", False) and getattr(settings, 'COMPLETION_AGGREGATOR_URL', ''):
|
||||
<div class="progress-container">
|
||||
<iframe id="progress-frame" style="border: none; width: 100%; height: 70px;" src="${chapter_completion_aggregator_url}"></iframe>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user