Merge branch 'master' into edx-depr31
This commit is contained in:
@@ -296,7 +296,7 @@ class CourseExportTask(UserTask): # pylint: disable=abstract-method
|
||||
arguments_dict (dict): The arguments given to the task function
|
||||
|
||||
Returns:
|
||||
text_type: The generated name
|
||||
str: The generated name
|
||||
"""
|
||||
key = arguments_dict['course_key_string']
|
||||
return f'Export of {key}'
|
||||
@@ -431,7 +431,7 @@ class CourseImportTask(UserTask): # pylint: disable=abstract-method
|
||||
arguments_dict (dict): The arguments given to the task function
|
||||
|
||||
Returns:
|
||||
text_type: The generated name
|
||||
str: The generated name
|
||||
"""
|
||||
key = arguments_dict['course_key_string']
|
||||
filename = arguments_dict['archive_name']
|
||||
|
||||
@@ -63,7 +63,14 @@ define(
|
||||
t = -1;
|
||||
}, delay);
|
||||
}
|
||||
};
|
||||
|
||||
// this is added to compensate for custom css that accidentally hide mathjax
|
||||
$('.MathJax_SVG>svg').toArray().forEach(el => {
|
||||
if ($(el).width() === 0) {
|
||||
$(el).css('max-width', 'inherit');
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
);
|
||||
window.CodeMirror = CodeMirror;
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
"""
|
||||
Utilities for returning XModule JS (used by requirejs)
|
||||
"""
|
||||
|
||||
|
||||
from django.conf import settings
|
||||
from django.contrib.staticfiles.storage import staticfiles_storage
|
||||
|
||||
|
||||
def get_xmodule_urls():
|
||||
"""
|
||||
Returns a list of the URLs to hit to grab all the XModule JS
|
||||
"""
|
||||
pipeline_js_settings = settings.PIPELINE['JAVASCRIPT']["module-js"]
|
||||
if settings.DEBUG:
|
||||
paths = [path.replace(".coffee", ".js") for path in pipeline_js_settings["source_filenames"]]
|
||||
else:
|
||||
paths = [pipeline_js_settings["output_filename"]]
|
||||
return [staticfiles_storage.url(path) for path in paths]
|
||||
@@ -1380,15 +1380,6 @@ PIPELINE['JAVASCRIPT'] = {
|
||||
'source_filenames': base_vendor_js,
|
||||
'output_filename': 'js/cms-base-vendor.js',
|
||||
},
|
||||
'module-js': {
|
||||
'source_filenames': (
|
||||
rooted_glob(COMMON_ROOT / 'static/', 'xmodule/descriptors/js/*.js') +
|
||||
rooted_glob(COMMON_ROOT / 'static/', 'xmodule/modules/js/*.js') +
|
||||
rooted_glob(COMMON_ROOT / 'static/', 'common/js/discussion/*.js')
|
||||
),
|
||||
'output_filename': 'js/cms-modules.js',
|
||||
'test_order': 1
|
||||
},
|
||||
}
|
||||
|
||||
STATICFILES_IGNORE_PATTERNS = (
|
||||
|
||||
@@ -338,7 +338,7 @@ AWS_S3_CUSTOM_DOMAIN = AUTH_TOKENS.get('AWS_S3_CUSTOM_DOMAIN', 'edxuploads.s3.am
|
||||
if AUTH_TOKENS.get('DEFAULT_FILE_STORAGE'):
|
||||
DEFAULT_FILE_STORAGE = AUTH_TOKENS.get('DEFAULT_FILE_STORAGE')
|
||||
elif AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY:
|
||||
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
|
||||
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
|
||||
else:
|
||||
DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ from openedx.core.djangolib.markup import HTML, Text
|
||||
from openedx.core.djangolib.js_utils import (
|
||||
dump_js_escaped_json, js_escaped_string
|
||||
)
|
||||
import six
|
||||
from six.moves.urllib.parse import quote
|
||||
%>
|
||||
|
||||
@@ -104,7 +103,7 @@ CMS.User.isGlobalStaff = '${is_global_staff | n, js_escaped_string}'=='True' ? t
|
||||
<div class="bit">
|
||||
% if context_course:
|
||||
<%
|
||||
url_encoded_course_id = quote(six.text_type(context_course.id).encode('utf-8'), safe='')
|
||||
url_encoded_course_id = quote(str(context_course.id).encode('utf-8'), safe='')
|
||||
details_url = utils.reverse_course_url('settings_handler', context_course.id)
|
||||
grading_url = utils.reverse_course_url('grading_handler', context_course.id)
|
||||
course_team_url = utils.reverse_course_url('course_team_handler', context_course.id)
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
<%inherit file="base.html" />
|
||||
<%def name="online_help_token()"><% return "files" %></%def>
|
||||
<%!
|
||||
import six
|
||||
|
||||
from cms.djangoapps.contentstore import utils
|
||||
from cms.djangoapps.contentstore.config.waffle_utils import should_show_checklists_quality
|
||||
from django.urls import reverse
|
||||
@@ -40,7 +38,7 @@
|
||||
<%static:studiofrontend entry="courseHealthCheck">
|
||||
|
||||
<%
|
||||
course_key = six.text_type(context_course.id)
|
||||
course_key = str(context_course.id)
|
||||
certificates_url = ''
|
||||
if has_certificates_enabled(context_course):
|
||||
certificates_url = utils.reverse_course_url('certificates_list_handler', course_key)
|
||||
|
||||
@@ -115,6 +115,13 @@
|
||||
t = -1;
|
||||
}, delay);
|
||||
}
|
||||
|
||||
// this is added to compensate for custom css that accidentally hide mathjax
|
||||
$('.MathJax_SVG>svg').toArray().forEach(el => {
|
||||
if ($(el).width() === 0) {
|
||||
$(el).css('max-width', 'inherit');
|
||||
}
|
||||
});
|
||||
};
|
||||
</script>
|
||||
<script type="text/x-mathjax-config">
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
<%def name="online_help_token()"><% return "develop_course" %></%def>
|
||||
<%!
|
||||
import logging
|
||||
import six
|
||||
from six.moves.urllib.parse import quote
|
||||
|
||||
from cms.djangoapps.contentstore.config.waffle_utils import should_show_checklists_quality
|
||||
@@ -160,7 +159,7 @@ from django.urls import reverse
|
||||
<h2 class="title title-3">${_("This course has proctored exam settings that are incomplete or invalid.")}</h2>
|
||||
<p>
|
||||
% if mfe_proctored_exam_settings_url:
|
||||
<% url_encoded_course_id = quote(six.text_type(context_course.id).encode('utf-8'), safe='') %>
|
||||
<% url_encoded_course_id = quote(str(context_course.id).encode('utf-8'), safe='') %>
|
||||
${Text(_("To update these settings go to the {link_start}Proctored Exam Settings page{link_end}.")).format(
|
||||
link_start=HTML('<a href="${mfe_proctored_exam_settings_url}">').format(
|
||||
mfe_proctored_exam_settings_url=mfe_proctored_exam_settings_url
|
||||
@@ -263,7 +262,7 @@ from django.urls import reverse
|
||||
},
|
||||
"enable_quality": ${should_show_checklists_quality(context_course.id) | n, dump_js_escaped_json},
|
||||
"links": {
|
||||
"settings": ${reverse('settings_handler', kwargs={'course_key_string': six.text_type(course_key)})| n, dump_js_escaped_json}
|
||||
"settings": ${reverse('settings_handler', kwargs={'course_key_string': str(course_key)})| n, dump_js_escaped_json}
|
||||
}
|
||||
}
|
||||
</%static:studiofrontend>
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
<%namespace name='static' file='static_content.html'/>
|
||||
|
||||
<%!
|
||||
import six
|
||||
|
||||
from django.urls import reverse
|
||||
from django.utils.translation import gettext as _
|
||||
%>
|
||||
@@ -41,7 +39,7 @@
|
||||
% else:
|
||||
<ul class="list-actions">
|
||||
<li class="item-action">
|
||||
<a class="action action-export-git action-primary" href="${reverse('export_git', kwargs=dict(course_key_string=six.text_type(context_course.id)))}?action=push">
|
||||
<a class="action action-export-git action-primary" href="${reverse('export_git', kwargs=dict(course_key_string=str(context_course.id)))}?action=push">
|
||||
<span class="icon fa fa-arrow-circle-o-down" aria-hidden="true"></span>
|
||||
<span class="copy">${_("Export to Git")}</span>
|
||||
</a>
|
||||
|
||||
@@ -11,7 +11,6 @@ from openedx.core.djangolib.js_utils import (
|
||||
dump_js_escaped_json, js_escaped_string
|
||||
)
|
||||
from openedx.core.djangolib.markup import HTML, Text
|
||||
import six
|
||||
from six.moves.urllib.parse import quote
|
||||
%>
|
||||
|
||||
@@ -115,7 +114,7 @@ from six.moves.urllib.parse import quote
|
||||
<div class="bit">
|
||||
% if context_course:
|
||||
<%
|
||||
url_encoded_course_id = quote(six.text_type(context_course.id).encode('utf-8'), safe='')
|
||||
url_encoded_course_id = quote(str(context_course.id).encode('utf-8'), safe='')
|
||||
details_url = utils.reverse_course_url('settings_handler', context_course.id)
|
||||
grading_url = utils.reverse_course_url('grading_handler', context_course.id)
|
||||
course_team_url = utils.reverse_course_url('course_team_handler', context_course.id)
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
## xss-lint: disable=mako-missing-default
|
||||
<%inherit file="base.html" />
|
||||
<%!
|
||||
import six
|
||||
|
||||
from django.utils.translation import gettext as _
|
||||
from django.urls import reverse
|
||||
|
||||
@@ -125,7 +123,7 @@ from openedx.core.djangolib.js_utils import (
|
||||
"${context_course.display_name_with_default | h}",
|
||||
${users | n, dump_js_escaped_json},
|
||||
// xss-lint: disable=mako-invalid-js-filter
|
||||
"${reverse('course_team_handler', kwargs={'course_key_string': six.text_type(context_course.id), 'email': '@@EMAIL@@'}) | n, js_escaped_string}",
|
||||
"${reverse('course_team_handler', kwargs={'course_key_string': str(context_course.id), 'email': '@@EMAIL@@'}) | n, js_escaped_string}",
|
||||
${request.user.id | n, dump_js_escaped_json},
|
||||
${allow_actions | n, dump_js_escaped_json}
|
||||
);
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
dump_js_escaped_json, js_escaped_string
|
||||
)
|
||||
from openedx.core.djangolib.markup import HTML, Text
|
||||
import six
|
||||
from six.moves.urllib.parse import quote
|
||||
from six.moves.urllib import parse as urllib
|
||||
%>
|
||||
@@ -711,7 +710,7 @@ CMS.URL.UPLOAD_ASSET = '${upload_asset_url | n, js_escaped_string}'
|
||||
<div class="bit">
|
||||
% if context_course:
|
||||
<%
|
||||
url_encoded_course_id = quote(six.text_type(context_course.id).encode('utf-8'), safe='')
|
||||
url_encoded_course_id = quote(str(context_course.id).encode('utf-8'), safe='')
|
||||
course_team_url = utils.reverse_course_url('course_team_handler', context_course.id)
|
||||
grading_config_url = utils.reverse_course_url('grading_handler', context_course.id)
|
||||
advanced_config_url = utils.reverse_course_url('advanced_settings_handler', context_course.id)
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
<%def name="online_help_token()"><% return "advanced" %></%def>
|
||||
<%namespace name='static' file='static_content.html'/>
|
||||
<%!
|
||||
import six
|
||||
from six.moves.urllib.parse import quote
|
||||
from django.utils.translation import gettext as _
|
||||
from cms.djangoapps.contentstore import utils
|
||||
@@ -43,7 +42,7 @@
|
||||
<h2 class="title title-3">${_("This course has proctored exam settings that are incomplete or invalid.")}</h2>
|
||||
<p>
|
||||
% if mfe_proctored_exam_settings_url:
|
||||
<% url_encoded_course_id = quote(six.text_type(context_course.id).encode('utf-8'), safe='') %>
|
||||
<% url_encoded_course_id = quote(str(context_course.id).encode('utf-8'), safe='') %>
|
||||
${Text(_("You will be unable to make changes until the errors are resolved. To update these settings go to the {link_start}Proctored Exam Settings page{link_end}.")).format(
|
||||
link_start=HTML('<a href="{mfe_proctored_exam_settings_url}">').format(
|
||||
mfe_proctored_exam_settings_url=mfe_proctored_exam_settings_url
|
||||
@@ -136,7 +135,7 @@
|
||||
<div class="bit">
|
||||
% if context_course:
|
||||
<%
|
||||
url_encoded_course_id = quote(six.text_type(context_course.id).encode('utf-8'), safe='')
|
||||
url_encoded_course_id = quote(str(context_course.id).encode('utf-8'), safe='')
|
||||
details_url = utils.reverse_course_url('settings_handler', context_course.id)
|
||||
grading_url = utils.reverse_course_url('grading_handler', context_course.id)
|
||||
course_team_url = utils.reverse_course_url('course_team_handler', context_course.id)
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
<%namespace name='static' file='static_content.html'/>
|
||||
<%!
|
||||
import six
|
||||
from six.moves.urllib.parse import quote
|
||||
import json
|
||||
from cms.djangoapps.contentstore import utils
|
||||
@@ -158,7 +157,7 @@
|
||||
<div class="bit">
|
||||
% if context_course:
|
||||
<%
|
||||
url_encoded_course_id = quote(six.text_type(context_course.id).encode('utf-8'), safe='')
|
||||
url_encoded_course_id = quote(str(context_course.id).encode('utf-8'), safe='')
|
||||
detailed_settings_url = utils.reverse_course_url('settings_handler', context_course.id)
|
||||
course_team_url = utils.reverse_course_url('course_team_handler', context_course.id)
|
||||
advanced_settings_url = utils.reverse_course_url('advanced_settings_handler', context_course.id)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<%page expression_filter="h" args="online_help_token"/>
|
||||
<%namespace name='static' file='../static_content.html'/>
|
||||
<%!
|
||||
import six
|
||||
from six.moves.urllib.parse import quote
|
||||
from django.conf import settings
|
||||
from django.urls import reverse
|
||||
@@ -39,23 +38,23 @@
|
||||
% if context_course:
|
||||
<%
|
||||
course_key = context_course.id
|
||||
url_encoded_course_key = quote(six.text_type(course_key).encode('utf-8'), safe='')
|
||||
index_url = reverse('course_handler', kwargs={'course_key_string': six.text_type(course_key)})
|
||||
course_team_url = reverse('course_team_handler', kwargs={'course_key_string': six.text_type(course_key)})
|
||||
assets_url = reverse('assets_handler', kwargs={'course_key_string': six.text_type(course_key)})
|
||||
textbooks_url = reverse('textbooks_list_handler', kwargs={'course_key_string': six.text_type(course_key)})
|
||||
videos_url = reverse('videos_handler', kwargs={'course_key_string': six.text_type(course_key)})
|
||||
import_url = reverse('import_handler', kwargs={'course_key_string': six.text_type(course_key)})
|
||||
course_info_url = reverse('course_info_handler', kwargs={'course_key_string': six.text_type(course_key)})
|
||||
export_url = reverse('export_handler', kwargs={'course_key_string': six.text_type(course_key)})
|
||||
settings_url = reverse('settings_handler', kwargs={'course_key_string': six.text_type(course_key)})
|
||||
grading_url = reverse('grading_handler', kwargs={'course_key_string': six.text_type(course_key)})
|
||||
advanced_settings_url = reverse('advanced_settings_handler', kwargs={'course_key_string': six.text_type(course_key)})
|
||||
tabs_url = reverse('tabs_handler', kwargs={'course_key_string': six.text_type(course_key)})
|
||||
url_encoded_course_key = quote(str(course_key).encode('utf-8'), safe='')
|
||||
index_url = reverse('course_handler', kwargs={'course_key_string': str(course_key)})
|
||||
course_team_url = reverse('course_team_handler', kwargs={'course_key_string': str(course_key)})
|
||||
assets_url = reverse('assets_handler', kwargs={'course_key_string': str(course_key)})
|
||||
textbooks_url = reverse('textbooks_list_handler', kwargs={'course_key_string': str(course_key)})
|
||||
videos_url = reverse('videos_handler', kwargs={'course_key_string': str(course_key)})
|
||||
import_url = reverse('import_handler', kwargs={'course_key_string': str(course_key)})
|
||||
course_info_url = reverse('course_info_handler', kwargs={'course_key_string': str(course_key)})
|
||||
export_url = reverse('export_handler', kwargs={'course_key_string': str(course_key)})
|
||||
settings_url = reverse('settings_handler', kwargs={'course_key_string': str(course_key)})
|
||||
grading_url = reverse('grading_handler', kwargs={'course_key_string': str(course_key)})
|
||||
advanced_settings_url = reverse('advanced_settings_handler', kwargs={'course_key_string': str(course_key)})
|
||||
tabs_url = reverse('tabs_handler', kwargs={'course_key_string': str(course_key)})
|
||||
certificates_url = ''
|
||||
if settings.FEATURES.get("CERTIFICATES_HTML_VIEW") and context_course.cert_html_view_enabled:
|
||||
certificates_url = reverse('certificates_list_handler', kwargs={'course_key_string': six.text_type(course_key)})
|
||||
checklists_url = reverse('checklists_handler', kwargs={'course_key_string': six.text_type(course_key)})
|
||||
certificates_url = reverse('certificates_list_handler', kwargs={'course_key_string': str(course_key)})
|
||||
checklists_url = reverse('checklists_handler', kwargs={'course_key_string': str(course_key)})
|
||||
pages_and_resources_mfe_enabled = ENABLE_PAGES_AND_RESOURCES_MICROFRONTEND.is_enabled(context_course.id)
|
||||
studio_home_mfe_enabled = toggles.use_new_home_page()
|
||||
course_outline_mfe_enabled = toggles.use_new_course_outline_page(context_course.id)
|
||||
@@ -192,7 +191,7 @@
|
||||
</li>
|
||||
% endif
|
||||
<li class="nav-item nav-course-settings-group-configurations">
|
||||
<a href="${reverse('group_configurations_list_handler', kwargs={'course_key_string': six.text_type(course_key)})}">${_("Group Configurations")}</a>
|
||||
<a href="${reverse('group_configurations_list_handler', kwargs={'course_key_string': str(course_key)})}">${_("Group Configurations")}</a>
|
||||
</li>
|
||||
% if mfe_proctored_exam_settings_url:
|
||||
<li class="nav-item nav-course-settings-exams">
|
||||
@@ -251,7 +250,7 @@
|
||||
% endif
|
||||
% if toggles.EXPORT_GIT.is_enabled() and context_course.giturl:
|
||||
<li class="nav-item nav-course-tools-export-git">
|
||||
<a href="${reverse('export_git', kwargs=dict(course_key_string=six.text_type(course_key)))}">${_("Export to Git")}</a>
|
||||
<a href="${reverse('export_git', kwargs=dict(course_key_string=str(course_key)))}">${_("Export to Git")}</a>
|
||||
</li>
|
||||
% endif
|
||||
<li class="nav-item nav-course-tools-checklists">
|
||||
@@ -266,10 +265,10 @@
|
||||
% elif context_library:
|
||||
<%
|
||||
library_key = context_library.location.course_key
|
||||
index_url = reverse('library_handler', kwargs={'library_key_string': six.text_type(library_key)})
|
||||
import_url = reverse('import_handler', kwargs={'course_key_string': six.text_type(library_key)})
|
||||
lib_users_url = reverse('manage_library_users', kwargs={'library_key_string': six.text_type(library_key)})
|
||||
export_url = reverse('export_handler', kwargs={'course_key_string': six.text_type(library_key)})
|
||||
index_url = reverse('library_handler', kwargs={'library_key_string': str(library_key)})
|
||||
import_url = reverse('import_handler', kwargs={'course_key_string': str(library_key)})
|
||||
lib_users_url = reverse('manage_library_users', kwargs={'library_key_string': str(library_key)})
|
||||
export_url = reverse('export_handler', kwargs={'course_key_string': str(library_key)})
|
||||
%>
|
||||
<h2 class="info-course">
|
||||
<span class="sr">${_("Current Library:")}</span>
|
||||
|
||||
@@ -5,9 +5,8 @@
|
||||
import hashlib
|
||||
import copy
|
||||
import json
|
||||
from six import text_type
|
||||
from xmodule.modulestore import EdxJSONEncoder
|
||||
hlskey = hashlib.md5(text_type(module.location).encode('utf-8')).hexdigest()
|
||||
hlskey = hashlib.md5(str(module.location).encode('utf-8')).hexdigest()
|
||||
%>
|
||||
|
||||
## js templates
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
<%
|
||||
import hashlib
|
||||
from openedx.core.djangolib.js_utils import js_escaped_string
|
||||
from six import text_type
|
||||
hlskey = hashlib.md5(text_type(module.location).encode('utf-8')).hexdigest()
|
||||
hlskey = hashlib.md5(str(module.location).encode('utf-8')).hexdigest()
|
||||
%>
|
||||
|
||||
<section id="hls-modal-${hlskey}" class="upload-modal modal" style="overflow:scroll; background:#ddd; padding: 10px 0;box-shadow: 0 0 5px 0 #555;" >
|
||||
|
||||
Reference in New Issue
Block a user