From ea53c3922d3ea5fd4c7267efd12bdfd16d968adf Mon Sep 17 00:00:00 2001 From: danial Date: Thu, 13 Dec 2018 17:38:51 +0500 Subject: [PATCH] Fix static urls in pdf_viewer.html to correctly display pdf viewer for course text books --- .../templates/static_content.html | 5 +---- lms/templates/pdf_viewer.html | 22 +++++++++---------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/common/djangoapps/pipeline_mako/templates/static_content.html b/common/djangoapps/pipeline_mako/templates/static_content.html index afa7fbab8e..1945206659 100644 --- a/common/djangoapps/pipeline_mako/templates/static_content.html +++ b/common/djangoapps/pipeline_mako/templates/static_content.html @@ -31,10 +31,7 @@ logger = logging.getLogger(__name__) %> <%def name='url(file, raw=False)'><% -try: - url = staticfiles_storage.url(file) -except: - url = file +url = staticfiles_storage.url(file) ## HTML-escaping must be handled by caller %>${url | n, decode.utf8}${"?raw" if raw else ""} diff --git a/lms/templates/pdf_viewer.html b/lms/templates/pdf_viewer.html index 5702e030f4..6c91bd20ef 100644 --- a/lms/templates/pdf_viewer.html +++ b/lms/templates/pdf_viewer.html @@ -32,23 +32,23 @@ http://sourceforge.net/adobe/cmap/wiki/License/ ${current_chapter['title'] if current_chapter else ''} - + - + - - - + + + - + <%static:js group='main_vendor'/> <%static:js group='application'/> @@ -417,7 +417,7 @@ http://sourceforge.net/adobe/cmap/wiki/License/ - - + +