upgrade backbone-associations, fix tests

Merge pull request #17559 from edx/ri/EDUCATOR-2231-remove-enrollment-dates-references

EDUCATOR-2231 remove course run enrollment dates references from studio

add NoTextbooks component

make backbone-associations work

webpackify context course

test fixup
This commit is contained in:
Rabia Iftikhar
2018-03-05 17:20:44 +05:00
committed by Ari Rizzitano
10 changed files with 176 additions and 78 deletions

View File

@@ -123,19 +123,29 @@ from openedx.core.djangolib.markup import HTML
<%block name="jsextra"></%block>
<%block name="page_bundle">
<script type="text/javascript">
if (typeof window.pageFactoryArguments == "undefined") {
window.pageFactoryArguments = {};
}
% if context_course:
window.pageFactoryArguments['ContextCourse'] = {
id: "${context_course.id | n, js_escaped_string}",
name: "${context_course.display_name_with_default | n, js_escaped_string}",
url_name: "${context_course.location.block_id | n, js_escaped_string}",
org: "${context_course.location.org | n, js_escaped_string}",
num: "${context_course.location.course | n, js_escaped_string}",
display_course_number: "${context_course.display_coursenumber | n, js_escaped_string}",
revision: "${context_course.location.branch | n, js_escaped_string}",
self_paced: ${ context_course.self_paced | n, dump_js_escaped_json }
}
% endif
require(['js/factories/base'], function () {
require(['js/models/course'], function(Course) {
% if context_course:
window.course = new Course({
id: "${context_course.id | n, js_escaped_string}",
name: "${context_course.display_name_with_default | n, js_escaped_string}",
url_name: "${context_course.location.block_id | n, js_escaped_string}",
org: "${context_course.location.org | n, js_escaped_string}",
num: "${context_course.location.course | n, js_escaped_string}",
display_course_number: "${context_course.display_coursenumber | n, js_escaped_string}",
revision: "${context_course.location.branch | n, js_escaped_string}",
self_paced: ${context_course.self_paced | n, dump_js_escaped_json}
});
window.course = new Course(
window.pageFactoryArguments['ContextCourse']
);
% endif
% if user.is_authenticated():
require(['js/sock']);
@@ -145,6 +155,7 @@ from openedx.core.djangolib.markup import HTML
});
</script>
</%block>
<%block name="page_bundle_extra"></%block>
<%include file="widgets/segment-io-footer.html" />
<div class="modal-cover"></div>
</body>