Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/20251020_132353_faraz.maqsood.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- [Bugfix] Don't show navigation menu and change scorm content width from 70% to 100% when navigation menu is disabled in new pop-up window. (by @Faraz32123)
1 change: 1 addition & 0 deletions openedxscorm/scormxblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ def popup_window(self, request, _suffix):
"navigation_menu_width": self.navigation_menu_width,
"enable_navigation_menu": self.enable_navigation_menu,
"enable_fullscreen_button": self.enable_fullscreen_button,
"popup_on_launch": self.popup_on_launch,
},
)
return Response(body=rendered)
Expand Down
9 changes: 7 additions & 2 deletions openedxscorm/static/html/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,23 @@
width: 70%;
height: 700px;
}
.navigation-disabled {
width: 100%;
}
}
</style>
</head>
<body>
<div class="scorm-xblock">
<div class="navigational-panel" style="width: {% if scorm_xblock.navigation_menu_width %}{{scorm_xblock.navigation_menu_width}}px{% else %}30%{% endif %};">
{% if enable_navigation_menu and popup_on_launch %}
<div class="navigational-panel" style="width: {% if navigation_menu_width %}{{navigation_menu_width}}px{% else %}30%{% endif %};">
<h4>Table of contents</h4>
<ul>
{{navigation_menu|safe }}
</ul>
</div>
<iframe class="scorm-embedded" src="{{ index_page_url }}" width="{{ width }}" height="{{ height }}"></iframe>
{% endif %}
<iframe class="scorm-embedded {% if not enable_navigation_menu %}navigation-disabled{% endif %}" src="{{ index_page_url }}" width="{{ width }}" height="{{ height }}"></iframe>
<script>
window.resizeTo({{ width }} + 20, {{ height }} + 20);
window.onload = function () {
Expand Down