Commit fe884029 by Andy Armstrong

Merge branch 'master' into alasdair/fedx-118-pattern-library-styles-with-current-partials

parents c42b36cc 56d003e4
...@@ -485,7 +485,6 @@ STATIC_ROOT = ENV_ROOT / "staticfiles" / EDX_PLATFORM_REVISION ...@@ -485,7 +485,6 @@ STATIC_ROOT = ENV_ROOT / "staticfiles" / EDX_PLATFORM_REVISION
STATICFILES_DIRS = [ STATICFILES_DIRS = [
COMMON_ROOT / "static", COMMON_ROOT / "static",
PROJECT_ROOT / "static", PROJECT_ROOT / "static",
LMS_ROOT / "static",
# This is how you would use the textbook images locally # This is how you would use the textbook images locally
# ("book", ENV_ROOT / "book_images"), # ("book", ENV_ROOT / "book_images"),
......
...@@ -54,7 +54,7 @@ from openedx.core.djangolib.js_utils import ( ...@@ -54,7 +54,7 @@ from openedx.core.djangolib.js_utils import (
<body class="${static.dir_rtl()} <%block name='bodyclass'></%block> lang_${LANGUAGE_CODE}"> <body class="${static.dir_rtl()} <%block name='bodyclass'></%block> lang_${LANGUAGE_CODE}">
<%block name="view_notes"></%block> <%block name="view_notes"></%block>
<a class="nav-skip" href="#content">${_("Skip to main content")}</a> <a class="nav-skip" href="#main">${_("Skip to main content")}</a>
<script type="text/javascript"> <script type="text/javascript">
window.baseUrl = "${settings.STATIC_URL | n, js_escaped_string}"; window.baseUrl = "${settings.STATIC_URL | n, js_escaped_string}";
...@@ -72,9 +72,11 @@ from openedx.core.djangolib.js_utils import ( ...@@ -72,9 +72,11 @@ from openedx.core.djangolib.js_utils import (
<%block name="page_alert"></%block> <%block name="page_alert"></%block>
</div> </div>
<div id="content" tabindex="-1"> <main id="main" aria-label="Content" tabindex="-1">
<div id="content">
<%block name="content"></%block> <%block name="content"></%block>
</div> </div>
</main>
% if user.is_authenticated(): % if user.is_authenticated():
<%include file="widgets/sock.html" args="online_help_token=online_help_token" /> <%include file="widgets/sock.html" args="online_help_token=online_help_token" />
......
...@@ -22,7 +22,7 @@ from openedx.core.djangolib.js_utils import js_escaped_string ...@@ -22,7 +22,7 @@ from openedx.core.djangolib.js_utils import js_escaped_string
</%block> </%block>
<%block name="content"> <%block name="content">
<div id="content" tabindex="-1"> <div id="content">
<div class="wrapper-mast wrapper"> <div class="wrapper-mast wrapper">
<header class="mast mast-wizard has-actions"> <header class="mast mast-wizard has-actions">
<h1 class="page-header"> <h1 class="page-header">
......
...@@ -374,6 +374,8 @@ class VideoEventTransformer(EventTransformer): ...@@ -374,6 +374,8 @@ class VideoEventTransformer(EventTransformer):
u'edx.video.seeked': u'seek_video', u'edx.video.seeked': u'seek_video',
u'edx.video.transcript.shown': u'show_transcript', u'edx.video.transcript.shown': u'show_transcript',
u'edx.video.transcript.hidden': u'hide_transcript', u'edx.video.transcript.hidden': u'hide_transcript',
u'edx.video.language_menu.shown': u'video_show_cc_menu',
u'edx.video.language_menu.hidden': u'video_hide_cc_menu',
} }
is_legacy_event = True is_legacy_event = True
......
...@@ -117,17 +117,17 @@ ...@@ -117,17 +117,17 @@
}); });
}); });
it('can emit "video_show_cc_menu" event', function () { it('can emit "edx.video.language_menu.shown" event', function () {
state.el.trigger('language_menu:show'); state.el.trigger('language_menu:show');
expect(Logger.log).toHaveBeenCalledWith('video_show_cc_menu', { expect(Logger.log).toHaveBeenCalledWith('edx.video.language_menu.shown', {
id: 'id', id: 'id',
code: 'html5' code: 'html5'
}); });
}); });
it('can emit "video_hide_cc_menu" event', function () { it('can emit "edx.video.language_menu.hidden" event', function () {
state.el.trigger('language_menu:hide'); state.el.trigger('language_menu:hide');
expect(Logger.log).toHaveBeenCalledWith('video_hide_cc_menu', { expect(Logger.log).toHaveBeenCalledWith('edx.video.language_menu.hidden', {
id: 'id', id: 'id',
code: 'html5', code: 'html5',
language: 'en' language: 'en'
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
}); });
it('can emit "show_transcript" event', function () { it('can emit "show_transcript" event', function () {
state.el.trigger('captions:show'); state.el.trigger('transcript:show');
expect(Logger.log).toHaveBeenCalledWith('show_transcript', { expect(Logger.log).toHaveBeenCalledWith('show_transcript', {
id: 'id', id: 'id',
code: 'html5', code: 'html5',
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
}); });
it('can emit "hide_transcript" event', function () { it('can emit "hide_transcript" event', function () {
state.el.trigger('captions:hide'); state.el.trigger('transcript:hide');
expect(Logger.log).toHaveBeenCalledWith('hide_transcript', { expect(Logger.log).toHaveBeenCalledWith('hide_transcript', {
id: 'id', id: 'id',
code: 'html5', code: 'html5',
...@@ -152,6 +152,24 @@ ...@@ -152,6 +152,24 @@
}); });
}); });
it('can emit "edx.video.closed_captions.shown" event', function () {
state.el.trigger('captions:show');
expect(Logger.log).toHaveBeenCalledWith('edx.video.closed_captions.shown', {
id: 'id',
code: 'html5',
current_time: 10
});
});
it('can emit "edx.video.closed_captions.hidden" event', function () {
state.el.trigger('captions:hide');
expect(Logger.log).toHaveBeenCalledWith('edx.video.closed_captions.hidden', {
id: 'id',
code: 'html5',
current_time: 10
});
});
it('can destroy itself', function () { it('can destroy itself', function () {
var plugin = state.videoEventsPlugin; var plugin = state.videoEventsPlugin;
spyOn($.fn, 'off').and.callThrough(); spyOn($.fn, 'off').and.callThrough();
...@@ -167,6 +185,8 @@ ...@@ -167,6 +185,8 @@
'speedchange': plugin.onSpeedChange, 'speedchange': plugin.onSpeedChange,
'language_menu:show': plugin.onShowLanguageMenu, 'language_menu:show': plugin.onShowLanguageMenu,
'language_menu:hide': plugin.onHideLanguageMenu, 'language_menu:hide': plugin.onHideLanguageMenu,
'transcript:show': plugin.onShowTranscript,
'transcript:hide': plugin.onHideTranscript,
'captions:show': plugin.onShowCaptions, 'captions:show': plugin.onShowCaptions,
'captions:hide': plugin.onHideCaptions, 'captions:hide': plugin.onHideCaptions,
'destroy': plugin.destroy 'destroy': plugin.destroy
......
...@@ -17,7 +17,9 @@ define('video/09_events_plugin.js', [], function() { ...@@ -17,7 +17,9 @@ define('video/09_events_plugin.js', [], function() {
_.bindAll(this, 'onReady', 'onPlay', 'onPause', 'onEnded', 'onSeek', _.bindAll(this, 'onReady', 'onPlay', 'onPause', 'onEnded', 'onSeek',
'onSpeedChange', 'onShowLanguageMenu', 'onHideLanguageMenu', 'onSkip', 'onSpeedChange', 'onShowLanguageMenu', 'onHideLanguageMenu', 'onSkip',
'onShowCaptions', 'onHideCaptions', 'destroy'); 'onShowTranscript', 'onHideTranscript', 'onShowCaptions', 'onHideCaptions',
'destroy');
this.state = state; this.state = state;
this.options = _.extend({}, options); this.options = _.extend({}, options);
this.state.videoEventsPlugin = this; this.state.videoEventsPlugin = this;
...@@ -45,6 +47,8 @@ define('video/09_events_plugin.js', [], function() { ...@@ -45,6 +47,8 @@ define('video/09_events_plugin.js', [], function() {
'speedchange': this.onSpeedChange, 'speedchange': this.onSpeedChange,
'language_menu:show': this.onShowLanguageMenu, 'language_menu:show': this.onShowLanguageMenu,
'language_menu:hide': this.onHideLanguageMenu, 'language_menu:hide': this.onHideLanguageMenu,
'transcript:show': this.onShowTranscript,
'transcript:hide': this.onHideTranscript,
'captions:show': this.onShowCaptions, 'captions:show': this.onShowCaptions,
'captions:hide': this.onHideCaptions, 'captions:hide': this.onHideCaptions,
'destroy': this.destroy 'destroy': this.destroy
...@@ -101,21 +105,29 @@ define('video/09_events_plugin.js', [], function() { ...@@ -101,21 +105,29 @@ define('video/09_events_plugin.js', [], function() {
}, },
onShowLanguageMenu: function () { onShowLanguageMenu: function () {
this.log('video_show_cc_menu'); this.log('edx.video.language_menu.shown');
}, },
onHideLanguageMenu: function () { onHideLanguageMenu: function () {
this.log('video_hide_cc_menu', { language: this.getCurrentLanguage() }); this.log('edx.video.language_menu.hidden', { language: this.getCurrentLanguage() });
}, },
onShowCaptions: function () { onShowTranscript: function () {
this.log('show_transcript', {current_time: this.getCurrentTime()}); this.log('show_transcript', {current_time: this.getCurrentTime()});
}, },
onHideCaptions: function () { onHideTranscript: function () {
this.log('hide_transcript', {current_time: this.getCurrentTime()}); this.log('hide_transcript', {current_time: this.getCurrentTime()});
}, },
onShowCaptions: function () {
this.log('edx.video.closed_captions.shown', {current_time: this.getCurrentTime()});
},
onHideCaptions: function () {
this.log('edx.video.closed_captions.hidden', {current_time: this.getCurrentTime()});
},
getCurrentTime: function () { getCurrentTime: function () {
var player = this.state.videoPlayer; var player = this.state.videoPlayer;
return player ? player.currentTime : 0; return player ? player.currentTime : 0;
......
...@@ -398,7 +398,7 @@ ...@@ -398,7 +398,7 @@
// present instead of on the container hover, since it wraps // present instead of on the container hover, since it wraps
// the "CC" and "Transcript" buttons as well. // the "CC" and "Transcript" buttons as well.
if ($(event.currentTarget).find('.lang').length) { if ($(event.currentTarget).find('.lang').length) {
this.state.el.trigger('language_menu:show'); this.state.el.trigger('language_menu:hide');
} }
}, },
...@@ -1131,6 +1131,8 @@ ...@@ -1131,6 +1131,8 @@
this.captionDisplayEl this.captionDisplayEl
.text(gettext('(Caption will be displayed when you start playing the video.)')); .text(gettext('(Caption will be displayed when you start playing the video.)'));
} }
this.state.el.trigger('captions:show');
}, },
hideClosedCaptions: function() { hideClosedCaptions: function() {
...@@ -1144,6 +1146,8 @@ ...@@ -1144,6 +1146,8 @@
.removeClass('is-active') .removeClass('is-active')
.find('.control-text') .find('.control-text')
.text(gettext('Turn on closed captioning')); .text(gettext('Turn on closed captioning'));
this.state.el.trigger('captions:hide');
}, },
updateCaptioningCookie: function(method) { updateCaptioningCookie: function(method) {
...@@ -1191,7 +1195,7 @@ ...@@ -1191,7 +1195,7 @@
state.el.addClass('closed'); state.el.addClass('closed');
text = gettext('Turn on transcripts'); text = gettext('Turn on transcripts');
if (trigger_event) { if (trigger_event) {
this.state.el.trigger('captions:hide'); this.state.el.trigger('transcript:hide');
} }
transcriptControlEl transcriptControlEl
...@@ -1204,7 +1208,7 @@ ...@@ -1204,7 +1208,7 @@
this.scrollCaption(); this.scrollCaption();
text = gettext('Turn off transcripts'); text = gettext('Turn off transcripts');
if (trigger_event) { if (trigger_event) {
this.state.el.trigger('captions:show'); this.state.el.trigger('transcript:show');
} }
transcriptControlEl transcriptControlEl
......
...@@ -3,6 +3,7 @@ Acceptance tests for Studio. ...@@ -3,6 +3,7 @@ Acceptance tests for Studio.
""" """
from bok_choy.web_app_test import WebAppTest from bok_choy.web_app_test import WebAppTest
from flaky import flaky
from ...pages.studio.asset_index import AssetIndexPage from ...pages.studio.asset_index import AssetIndexPage
from ...pages.studio.auto_auth import AutoAuthPage from ...pages.studio.auto_auth import AutoAuthPage
...@@ -94,6 +95,7 @@ class CoursePagesTest(StudioCourseTest): ...@@ -94,6 +95,7 @@ class CoursePagesTest(StudioCourseTest):
self.dashboard_page.visit() self.dashboard_page.visit()
self.assertEqual(self.browser.current_url.strip('/').rsplit('/')[-1], 'home') self.assertEqual(self.browser.current_url.strip('/').rsplit('/')[-1], 'home')
@flaky # TODO: FEDX-88
def test_page_existence(self): def test_page_existence(self):
""" """
Make sure that all these pages are accessible once you have a course. Make sure that all these pages are accessible once you have a course.
......
<section class="container"> <section class="container">
<div class="wrapper-student-notes"> <div class="wrapper-student-notes">
<div class="student-notes"> <div class="student-notes">
<main id="main" aria-label="Content" tabindex="-1">
<div class="title-search-container"> <div class="title-search-container">
<div class="wrapper-title"> <div class="wrapper-title">
<h1 class="page-title"> <h1 class="page-title">
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<span class="copy">Loading</span> <span class="copy">Loading</span>
</div> </div>
</section> </section>
</main>
</div> </div>
</div> </div>
</section> </section>
...@@ -26,13 +26,21 @@ ...@@ -26,13 +26,21 @@
&.request-pending { &.request-pending {
border-top: 2px solid $orange; border-top: 2px solid $orange;
} }
&.request-denied {
border-top: 2px solid $red;
}
&.request-approved {
border-top: 2px solid $green;
}
} }
#api-access-status { #api-access-status {
@extend %t-copy-base; @extend %t-copy-base;
} }
#api-access-request { .api-management-form {
padding: 0 $baseline $baseline $baseline; padding: 0 $baseline $baseline $baseline;
...@@ -91,4 +99,17 @@ ...@@ -91,4 +99,17 @@
text-transform: none; text-transform: none;
} }
} }
.application-info {
margin: $baseline 0;
p {
@extend %t-copy-base;
margin: $baseline/2 0;
.application-label {
@extend %t-weight4;
}
}
}
} }
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
${_("{platform_name} API Access Request").format(platform_name=settings.PLATFORM_NAME)} ${_("{platform_name} API Access Request").format(platform_name=settings.PLATFORM_NAME)}
</h1> </h1>
<form action="" method="post" id="api-access-request"> <form action="" method="post" class="api-management-form">
<input type="hidden" id="csrf_token" name="csrfmiddlewaretoken" value="${csrf_token}"> <input type="hidden" id="csrf_token" name="csrfmiddlewaretoken" value="${csrf_token}">
${form.as_p() | n} ${form.as_p() | n}
<input id="api-access-submit" type="submit" value="${_('Request API Access')}"/> <input id="api-access-submit" type="submit" value="${_('Request API Access')}"/>
......
...@@ -11,17 +11,52 @@ from openedx.core.djangolib.markup import Text, HTML ...@@ -11,17 +11,52 @@ from openedx.core.djangolib.markup import Text, HTML
<div id="api-access-wrapper"> <div id="api-access-wrapper">
<h1 id="api-access-request-header">${_("{platform_name} API Access Request").format(platform_name=settings.PLATFORM_NAME)}</h1> <h1 id="api-access-request-header">${_("{platform_name} API Access Request").format(platform_name=settings.PLATFORM_NAME)}</h1>
<div class="request-status request-${status}"> <div class="request-status request-${status}">
<p id="api-access-status">
% if status == ApiAccessRequest.PENDING: % if status == ApiAccessRequest.PENDING:
## Translators: "platform_name" is the name of this Open edX installation.
${Text(_('Your request to access the {platform_name} Course Catalog API is being processed. You will receive a message at the email address in your profile when processing is complete. You can also return to this page to see the status of your API access request.')).format(
platform_name=Text(settings.PLATFORM_NAME)
)}
% elif status == ApiAccessRequest.DENIED:
## Translators: "platform_name" is the name of this Open edX installation. "api_support_email_link" is HTML for a link to email the API support staff.
${Text(_('Your request to access the {platform_name} Course Catalog API has been denied. If you think this is an error, or for other questions about using this API, contact {api_support_email_link}.')).format(
platform_name=Text(settings.PLATFORM_NAME),
api_support_email_link=HTML('<a href="mailto:{email}">{email}</a>').format(email=Text(api_support_email))
)}
% elif status == ApiAccessRequest.APPROVED:
${Text(_('Your request to access the {platform_name} Course Catalog API has been approved.')).format(
platform_name=Text(settings.PLATFORM_NAME)
)}
% if application:
<div class="application-info">
<p><span class="application-label">${_("Application Name") + ":"}</span> ${application.name}</p>
<p><span class="application-label">${_("API Client ID") + ":"}</span> ${application.client_id}</p>
<p><span class="application-label">${_("API Client Secret") + ":"}</span> ${application.client_secret}</p>
<p><span class="application-label">${_("Redirect URLs") + ":"}</span> ${application.redirect_uris}</p>
</div>
<p>${_('If you would like to regenerate your API client information, please use the form below.')}</p>
% endif
<form id="api-form-fields" method="post" class="api-management-form">
<input type="hidden" id="csrf_token" name="csrfmiddlewaretoken" value="${csrf_token}">
${form.as_p() | n}
<input id="api-access-submit" type="submit" value="${_('Generate API client credentials')}"/>
</form>
% endif
</p>
<p>
## Translators: "platform_name" is the name of this Open edX installation. "link_start" and "link_end" are the HTML for a link to the API documentation. "api_support_email_link" is HTML for a link to email the API support staff. ## Translators: "platform_name" is the name of this Open edX installation. "link_start" and "link_end" are the HTML for a link to the API documentation. "api_support_email_link" is HTML for a link to email the API support staff.
<p id="api-access-status">${Text(_('Your request to access the {platform_name} Course Catalog API is being processed. You will receive a message at the email address in your profile when processing is complete. You can also return to this page to see the status of your API access request. To learn more about the {platform_name} Course Catalog API, visit {link_start}our API documentation page{link_end}. For questions about using this API, visit our FAQ page or contact {api_support_email_link}.')).format( ${Text(_('To learn more about the {platform_name} Course Catalog API, visit {link_start}our API documentation page{link_end}. For questions about using this API, contact {api_support_email_link}.')).format(
platform_name=Text(settings.PLATFORM_NAME), platform_name=Text(settings.PLATFORM_NAME),
link_start=HTML('<a href="{}">').format(Text(api_support_link)), link_start=HTML('<a href="{}">').format(Text(api_support_link)),
link_end=HTML('</a>'), link_end=HTML('</a>'),
api_support_email_link=HTML('<a href="mailto:{email}">{email}</a>').format(email=Text(api_support_email)) api_support_email_link=HTML('<a href="mailto:{email}">{email}</a>').format(email=Text(api_support_email))
)}</p> )}
% endif </p>
## TODO (ECOM-3946): Add status text for 'active' and 'denied', as well as API client creation.
</div> </div>
</div> </div>
...@@ -10,7 +10,6 @@ from openedx.core.djangolib.js_utils import ( ...@@ -10,7 +10,6 @@ from openedx.core.djangolib.js_utils import (
%> %>
<%block name="pagetitle">${_("CCX Coach Dashboard")}</%block> <%block name="pagetitle">${_("CCX Coach Dashboard")}</%block>
<%block name="nav_skip">#ccx-coach-dashboard-content</%block>
<%block name="headextra"> <%block name="headextra">
<%static:css group='style-course-vendor'/> <%static:css group='style-course-vendor'/>
...@@ -23,6 +22,7 @@ from openedx.core.djangolib.js_utils import ( ...@@ -23,6 +22,7 @@ from openedx.core.djangolib.js_utils import (
<section class="container"> <section class="container">
<div class="instructor-dashboard-wrapper-2"> <div class="instructor-dashboard-wrapper-2">
<main id="main" aria-label="Content" tabindex="-1">
<section class="instructor-dashboard-content-2" id="ccx-coach-dashboard-content"> <section class="instructor-dashboard-content-2" id="ccx-coach-dashboard-content">
<h1>${_("CCX Coach Dashboard")}</h1> <h1>${_("CCX Coach Dashboard")}</h1>
...@@ -83,6 +83,7 @@ from openedx.core.djangolib.js_utils import ( ...@@ -83,6 +83,7 @@ from openedx.core.djangolib.js_utils import (
%endif %endif
</section> </section>
</main>
</div> </div>
</section> </section>
......
...@@ -28,7 +28,8 @@ ...@@ -28,7 +28,8 @@
<%block name="pagetitle">${_("Courses")}</%block> <%block name="pagetitle">${_("Courses")}</%block>
<section class="find-courses"> <main id="main" aria-label="Content" tabindex="-1">
<section class="find-courses">
<section class="courses-container"> <section class="courses-container">
% if course_discovery_enabled: % if course_discovery_enabled:
<div id="discovery-form" role="search" aria-label="course" class="wrapper-search-context"> <div id="discovery-form" role="search" aria-label="course" class="wrapper-search-context">
...@@ -72,4 +73,5 @@ ...@@ -72,4 +73,5 @@
% endif % endif
</section> </section>
</section> </section>
</main>
...@@ -37,8 +37,6 @@ ${static.get_page_title_breadcrumbs(course_name())} ...@@ -37,8 +37,6 @@ ${static.get_page_title_breadcrumbs(course_name())}
<%static:css group='style-student-notes'/> <%static:css group='style-student-notes'/>
% endif % endif
<%block name="nav_skip">${"#content" if section_title else "#content"}</%block>
<%include file="../discussion/_js_head_dependencies.html" /> <%include file="../discussion/_js_head_dependencies.html" />
${fragment.head_html()} ${fragment.head_html()}
</%block> </%block>
......
...@@ -57,8 +57,6 @@ ${static.get_page_title_breadcrumbs(course_name())} ...@@ -57,8 +57,6 @@ ${static.get_page_title_breadcrumbs(course_name())}
<%static:css group='style-student-notes'/> <%static:css group='style-student-notes'/>
% endif % endif
<%block name="nav_skip">${"#content" if section_title else "#content"}</%block>
<%include file="../discussion/_js_head_dependencies.html" /> <%include file="../discussion/_js_head_dependencies.html" />
${fragment.head_html()} ${fragment.head_html()}
</%block> </%block>
...@@ -170,7 +168,8 @@ ${fragment.foot_html()} ...@@ -170,7 +168,8 @@ ${fragment.foot_html()}
</div> </div>
% endif % endif
<section class="course-content" id="course-content" role="main" aria-label="Content"> <section class="course-content" id="course-content">
<main id="main" aria-label="Content" tabindex="-1">
% if getattr(course, 'entrance_exam_enabled') and \ % if getattr(course, 'entrance_exam_enabled') and \
getattr(course, 'entrance_exam_minimum_score_pct') and \ getattr(course, 'entrance_exam_minimum_score_pct') and \
entrance_exam_current_score is not UNDEFINED: entrance_exam_current_score is not UNDEFINED:
...@@ -202,6 +201,7 @@ ${fragment.foot_html()} ...@@ -202,6 +201,7 @@ ${fragment.foot_html()}
% endif % endif
${fragment.body_html()} ${fragment.body_html()}
</main>
</section> </section>
<section class="courseware-results-wrapper"> <section class="courseware-results-wrapper">
......
...@@ -52,7 +52,9 @@ from openedx.core.djangolib.markup import Text, HTML ...@@ -52,7 +52,9 @@ from openedx.core.djangolib.markup import Text, HTML
</%block> </%block>
<%block name="bodyclass">view-in-course view-course-info ${course.css_class or ''}</%block> <%block name="bodyclass">view-in-course view-course-info ${course.css_class or ''}</%block>
<section class="container">
<main id="main" aria-label="Content" tabindex="-1">
<section class="container">
<div class="home"> <div class="home">
<div class="page-header-main"> <div class="page-header-main">
<h1 class="page-title">${_("Welcome to {org}'s {course_name}!").format(org=course.display_org_with_default, course_name=course.display_number_with_default)}</h1> <h1 class="page-title">${_("Welcome to {org}'s {course_name}!").format(org=course.display_org_with_default, course_name=course.display_number_with_default)}</h1>
...@@ -105,4 +107,5 @@ from openedx.core.djangolib.markup import Text, HTML ...@@ -105,4 +107,5 @@ from openedx.core.djangolib.markup import Text, HTML
</section> </section>
% endif % endif
</div> </div>
</section> </section>
</main>
...@@ -18,7 +18,6 @@ from django.utils.http import urlquote_plus ...@@ -18,7 +18,6 @@ from django.utils.http import urlquote_plus
<%namespace name="progress_graph" file="/courseware/progress_graph.js"/> <%namespace name="progress_graph" file="/courseware/progress_graph.js"/>
<%block name="pagetitle">${_("{course_number} Progress").format(course_number=course.display_number_with_default) | h}</%block> <%block name="pagetitle">${_("{course_number} Progress").format(course_number=course.display_number_with_default) | h}</%block>
<%block name="nav_skip">#content</%block>
<%block name="js_extra"> <%block name="js_extra">
<script type="text/javascript" src="${static.url('js/vendor/flot/jquery.flot.js') | h}"></script> <script type="text/javascript" src="${static.url('js/vendor/flot/jquery.flot.js') | h}"></script>
...@@ -37,6 +36,7 @@ from django.utils.http import urlquote_plus ...@@ -37,6 +36,7 @@ from django.utils.http import urlquote_plus
<div class="container"> <div class="container">
<div class="profile-wrapper"> <div class="profile-wrapper">
<main id="main" aria-label="Content" tabindex="-1">
<div class="course-info" id="course-info-progress" aria-label="${_('Course Progress')}"> <div class="course-info" id="course-info-progress" aria-label="${_('Course Progress')}">
% if staff_access and studio_url is not None: % if staff_access and studio_url is not None:
<div class="wrap-instructor-info"> <div class="wrap-instructor-info">
...@@ -219,6 +219,6 @@ from django.utils.http import urlquote_plus ...@@ -219,6 +219,6 @@ from django.utils.http import urlquote_plus
</div> <!--End chapters--> </div> <!--End chapters-->
</div> </div>
</main>
</div> </div>
</div> </div>
...@@ -16,8 +16,10 @@ ...@@ -16,8 +16,10 @@
<%include file="/courseware/course_navigation.html" args="active_page='static_tab_{0}'.format(tab['url_slug'])" /> <%include file="/courseware/course_navigation.html" args="active_page='static_tab_{0}'.format(tab['url_slug'])" />
<section class="container"> <main id="main" aria-label="Content" tabindex="-1">
<section class="container">
<div class="static_tab_wrapper"> <div class="static_tab_wrapper">
${tab_contents} ${tab_contents}
</div> </div>
</section> </section>
</main>
...@@ -19,7 +19,6 @@ from openedx.core.djangolib.markup import Text, HTML ...@@ -19,7 +19,6 @@ from openedx.core.djangolib.markup import Text, HTML
<%block name="pagetitle">${_("Dashboard")}</%block> <%block name="pagetitle">${_("Dashboard")}</%block>
<%block name="bodyclass">view-dashboard is-authenticated</%block> <%block name="bodyclass">view-dashboard is-authenticated</%block>
<%block name="nav_skip">#my-courses</%block>
<%block name="header_extras"> <%block name="header_extras">
% for template_name in ["donation"]: % for template_name in ["donation"]:
...@@ -75,8 +74,9 @@ from openedx.core.djangolib.markup import Text, HTML ...@@ -75,8 +74,9 @@ from openedx.core.djangolib.markup import Text, HTML
%endif %endif
</div> </div>
<section class="container dashboard" id="dashboard-main"> <main id="main" aria-label="Content" tabindex="-1">
<section class="my-courses" id="my-courses" role="main" tabindex="-1"> <section class="container dashboard" id="dashboard-main">
<section class="my-courses" id="my-courses">
<header class="wrapper-header-courses"> <header class="wrapper-header-courses">
<h2 class="header-courses">${_("My Courses")}</h2> <h2 class="header-courses">${_("My Courses")}</h2>
</header> </header>
...@@ -188,7 +188,8 @@ from openedx.core.djangolib.markup import Text, HTML ...@@ -188,7 +188,8 @@ from openedx.core.djangolib.markup import Text, HTML
</ul> </ul>
</div> </div>
% endif % endif
</section> </section>
</main>
<section id="email-settings-modal" class="modal" aria-hidden="true"> <section id="email-settings-modal" class="modal" aria-hidden="true">
<div class="inner-wrapper" role="dialog" aria-labelledby="email-settings-title"> <div class="inner-wrapper" role="dialog" aria-labelledby="email-settings-title">
......
...@@ -8,7 +8,6 @@ from django.core.urlresolvers import reverse ...@@ -8,7 +8,6 @@ from django.core.urlresolvers import reverse
<%block name="bodyclass">discussion</%block> <%block name="bodyclass">discussion</%block>
<%block name="pagetitle">${_("Discussion - {course_number}").format(course_number=course.display_number_with_default) | h}</%block> <%block name="pagetitle">${_("Discussion - {course_number}").format(course_number=course.display_number_with_default) | h}</%block>
<%block name="nav_skip">#discussion-container</%block>
<%block name="headextra"> <%block name="headextra">
<%static:css group='style-course-vendor'/> <%static:css group='style-course-vendor'/>
...@@ -39,13 +38,14 @@ from django.core.urlresolvers import reverse ...@@ -39,13 +38,14 @@ from django.core.urlresolvers import reverse
data-sort-preference="${sort_preference | h}" data-sort-preference="${sort_preference | h}"
data-flag-moderator="${flag_moderator | h}" data-flag-moderator="${flag_moderator | h}"
data-user-cohort-id="${user_cohort | h}" data-user-cohort-id="${user_cohort | h}"
data-course-settings="${course_settings | h}" data-course-settings="${course_settings | h}">
tabindex="-1">
<div class="discussion-body"> <div class="discussion-body">
<div class="forum-nav" role="complementary" aria-label="${_("Discussion thread list")}"></div> <div class="forum-nav" role="complementary" aria-label="${_("Discussion thread list")}"></div>
<div class="discussion-column" role="main" aria-label="Discussion" id="discussion-column"> <div class="discussion-column" id="discussion-column">
<main id="main" aria-label="Content" tabindex="-1">
<article class="new-post-article" style="display: none" tabindex="-1" aria-label="${_("New topic form")}"></article> <article class="new-post-article" style="display: none" tabindex="-1" aria-label="${_("New topic form")}"></article>
<div class="forum-content"></div> <div class="forum-content"></div>
</main>
</div> </div>
</div> </div>
</section> </section>
......
...@@ -20,7 +20,7 @@ from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_str ...@@ -20,7 +20,7 @@ from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_str
<section class="container"> <section class="container">
<div class="wrapper-student-notes"> <div class="wrapper-student-notes">
<div class="student-notes"> <div class="student-notes">
<main id="main" aria-label="Content" tabindex="-1">
<div class="title-search-container"> <div class="title-search-container">
<div class="wrapper-title"> <div class="wrapper-title">
<h1 class="page-title"> <h1 class="page-title">
...@@ -93,7 +93,7 @@ from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_str ...@@ -93,7 +93,7 @@ from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_str
</section> </section>
% endif % endif
</section> </section>
</main>
</div> </div>
</div> </div>
</section> </section>
......
...@@ -5,7 +5,8 @@ from django.utils.translation import ugettext as _ ...@@ -5,7 +5,8 @@ from django.utils.translation import ugettext as _
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
%> %>
<section class="home"> <main id="main" aria-label="Content" tabindex="-1">
<section class="home">
<header> <header>
<div class="outer-wrapper"> <div class="outer-wrapper">
<div class="title"> <div class="title">
...@@ -46,7 +47,8 @@ from django.core.urlresolvers import reverse ...@@ -46,7 +47,8 @@ from django.core.urlresolvers import reverse
</header> </header>
<%include file="${courses_list}" /> <%include file="${courses_list}" />
</section> </section>
</main>
% if show_homepage_promo_video: % if show_homepage_promo_video:
<section id="video-modal" class="modal home-page-video-modal video-modal"> <section id="video-modal" class="modal home-page-video-modal video-modal">
......
...@@ -20,7 +20,6 @@ from django.core.urlresolvers import reverse ...@@ -20,7 +20,6 @@ from django.core.urlresolvers import reverse
## 6. And tests go in lms/djangoapps/instructor/tests/ ## 6. And tests go in lms/djangoapps/instructor/tests/
<%block name="pagetitle">${_("Instructor Dashboard")}</%block> <%block name="pagetitle">${_("Instructor Dashboard")}</%block>
<%block name="nav_skip">#content</%block>
<%block name="headextra"> <%block name="headextra">
<%static:css group='style-course-vendor'/> <%static:css group='style-course-vendor'/>
...@@ -86,6 +85,7 @@ from django.core.urlresolvers import reverse ...@@ -86,6 +85,7 @@ from django.core.urlresolvers import reverse
<section class="container"> <section class="container">
<div class="instructor-dashboard-wrapper-2"> <div class="instructor-dashboard-wrapper-2">
<main id="main" aria-label="Content" tabindex="-1">
<section class="instructor-dashboard-content-2" id="instructor-dashboard-content"> <section class="instructor-dashboard-content-2" id="instructor-dashboard-content">
<div class="wrap-instructor-info studio-view"> <div class="wrap-instructor-info studio-view">
%if studio_url: %if studio_url:
...@@ -121,6 +121,6 @@ from django.core.urlresolvers import reverse ...@@ -121,6 +121,6 @@ from django.core.urlresolvers import reverse
</section> </section>
% endfor % endfor
</section> </section>
</main>
</div> </div>
</section> </section>
...@@ -20,8 +20,9 @@ ProgramListFactory({ ...@@ -20,8 +20,9 @@ ProgramListFactory({
</%block> </%block>
<%block name="pagetitle">${_("Programs")}</%block> <%block name="pagetitle">${_("Programs")}</%block>
<main id="main" aria-label="Content" tabindex="-1">
<div class="program-list-wrapper"> <div class="program-list-wrapper">
<div class="program-cards-container"></div> <div class="program-cards-container"></div>
<div class="sidebar"></div> <div class="sidebar"></div>
</div> </div>
</main>
...@@ -127,13 +127,13 @@ from pipeline_mako import render_require_js_path_overrides ...@@ -127,13 +127,13 @@ from pipeline_mako import render_require_js_path_overrides
% if not disable_window_wrap: % if not disable_window_wrap:
<div class="window-wrap" dir="${static.dir_rtl()}"> <div class="window-wrap" dir="${static.dir_rtl()}">
% endif % endif
<a class="nav-skip" href="<%block name="nav_skip">#content</%block>">${_("Skip to main content")}</a> <a class="nav-skip" href="#main">${_("Skip to main content")}</a>
% if not disable_header: % if not disable_header:
<%include file="${static.get_template_path('header.html')}" /> <%include file="${static.get_template_path('header.html')}" />
% endif % endif
<div role="main" class="content-wrapper" id="content" tabindex="-1"> <div class="content-wrapper" id="content">
${self.body()} ${self.body()}
<%block name="bodyextra"/> <%block name="bodyextra"/>
</div> </div>
......
...@@ -24,11 +24,11 @@ ...@@ -24,11 +24,11 @@
<body class="{% block bodyclass %}{% endblock %} lang_{{LANGUAGE_CODE}}"> <body class="{% block bodyclass %}{% endblock %} lang_{{LANGUAGE_CODE}}">
<div class="window-wrap" dir="${static.dir_rtl()}"> <div class="window-wrap" dir="${static.dir_rtl()}">
<a class="nav-skip" href="{% block nav_skip %}#content{% endblock %}">{% trans "Skip to main content" %}</a> <a class="nav-skip" href="#main">{% trans "Skip to main content" %}</a>
{% with course=request.course %} {% with course=request.course %}
{% include "header.html"|microsite_template_path %} {% include "header.html"|microsite_template_path %}
{% endwith %} {% endwith %}
<div role="main" class="content-wrapper" id="content" tabindex="-1"> <div class="content-wrapper" id="content">
{% block body %}{% endblock %} {% block body %}{% endblock %}
{% block bodyextra %}{% endblock %} {% block bodyextra %}{% endblock %}
</div> </div>
......
...@@ -8,11 +8,13 @@ from openedx.core.djangolib.markup import Text, HTML ...@@ -8,11 +8,13 @@ from openedx.core.djangolib.markup import Text, HTML
<%block name="pagetitle">${_("Page Not Found")}</%block> <%block name="pagetitle">${_("Page Not Found")}</%block>
<section class="outside-app"> <main id="main" aria-label="Content" tabindex="-1">
<h1>${_("Page not found")}</h1> <section class="outside-app">
<p>${Text(_('The page that you were looking for was not found. Go back to the {link_start}homepage{link_end} or let us know about any pages that may have been moved at {email}.')).format( <h1>${_("Page not found")}</h1>
<p>${Text(_('The page that you were looking for was not found. Go back to the {link_start}homepage{link_end} or let us know about any pages that may have been moved at {email}.')).format(
link_start=HTML('<a href="/">'), link_start=HTML('<a href="/">'),
link_end=HTML('</a>'), link_end=HTML('</a>'),
email=HTML('<a href="mailto:{email}">{email}</a>').format(email=Text(static.get_tech_support_email_address())) email=HTML('<a href="mailto:{email}">{email}</a>').format(email=Text(static.get_tech_support_email_address()))
)}</p> )}</p>
</section> </section>
</main>
...@@ -4,7 +4,9 @@ ...@@ -4,7 +4,9 @@
<%block name="pagetitle">${_("About")}</%block> <%block name="pagetitle">${_("About")}</%block>
<section class="container about"> <main id="main" aria-label="Content" tabindex="-1">
<h1>${_("About")}</h1> <section class="container about">
<p>${_("This page left intentionally blank. It is not used by edx.org but is left here for possible use by installations of Open edX.")}</p> <h1>${_("About")}</h1>
</section> <p>${_("This page left intentionally blank. It is not used by edx.org but is left here for possible use by installations of Open edX.")}</p>
</section>
</main>
...@@ -4,7 +4,9 @@ ...@@ -4,7 +4,9 @@
<%block name="pagetitle">${_("Blog")}</%block> <%block name="pagetitle">${_("Blog")}</%block>
<section class="container about"> <main id="main" aria-label="Content" tabindex="-1">
<section class="container about">
<h1>${_("Blog")}</h1> <h1>${_("Blog")}</h1>
<p>${_("This page left intentionally blank. It is not used by edx.org but is left here for possible use by installations of Open edX.")}</p> <p>${_("This page left intentionally blank. It is not used by edx.org but is left here for possible use by installations of Open edX.")}</p>
</section> </section>
</main>
...@@ -4,7 +4,9 @@ ...@@ -4,7 +4,9 @@
<%block name="pagetitle">${_("Contact")}</%block> <%block name="pagetitle">${_("Contact")}</%block>
<section class="container about"> <main id="main" aria-label="Content" tabindex="-1">
<h1>${_("Contact")}</h1> <section class="container about">
<p>${_("This page left intentionally blank. It is not used by edx.org but is left here for possible use by installations of Open edX.")}</p> <h1>${_("Contact")}</h1>
</section> <p>${_("This page left intentionally blank. It is not used by edx.org but is left here for possible use by installations of Open edX.")}</p>
</section>
</main>
...@@ -4,7 +4,9 @@ ...@@ -4,7 +4,9 @@
<%block name="pagetitle">${_("Donate")}</%block> <%block name="pagetitle">${_("Donate")}</%block>
<section class="container about"> <main id="main" aria-label="Content" tabindex="-1">
<section class="container about">
<h1>${_("Donate")}</h1> <h1>${_("Donate")}</h1>
<p>${_("This page left intentionally blank. It is not used by edx.org but is left here for possible use by installations of Open edX.")}</p> <p>${_("This page left intentionally blank. It is not used by edx.org but is left here for possible use by installations of Open edX.")}</p>
</section> </section>
</main>
...@@ -7,14 +7,16 @@ from openedx.core.djangolib.markup import Text, HTML ...@@ -7,14 +7,16 @@ from openedx.core.djangolib.markup import Text, HTML
<%block name="pagetitle">${_("This Course Unavailable In Your Country")}</%block> <%block name="pagetitle">${_("This Course Unavailable In Your Country")}</%block>
<section class="outside-app"> <main id="main" aria-label="Content" tabindex="-1">
<p> <section class="outside-app">
${Text(_("Our system indicates that you are trying to access this {platform_name} " <p>
${Text(_("Our system indicates that you are trying to access this {platform_name} "
"course from a country or region currently subject to U.S. economic and trade " "course from a country or region currently subject to U.S. economic and trade "
"sanctions. Unfortunately, at this time {platform_name} must comply with " "sanctions. Unfortunately, at this time {platform_name} must comply with "
"export controls, and we cannot allow you to access this course." "export controls, and we cannot allow you to access this course."
)).format( )).format(
platform_name=Text(settings.PLATFORM_NAME), platform_name=Text(settings.PLATFORM_NAME),
)} )}
</p> </p>
</section> </section>
</main>
...@@ -4,7 +4,9 @@ ...@@ -4,7 +4,9 @@
<%block name="pagetitle">${_("FAQ")}</%block> <%block name="pagetitle">${_("FAQ")}</%block>
<section class="container about"> <main id="main" aria-label="Content" tabindex="-1">
<h1>${_("FAQ")}</h1> <section class="container about">
<p>${_("This page left intentionally blank. It is not used by edx.org but is left here for possible use by installations of Open edX.")}</p> <h1>${_("FAQ")}</h1>
</section> <p>${_("This page left intentionally blank. It is not used by edx.org but is left here for possible use by installations of Open edX.")}</p>
</section>
</main>
...@@ -4,7 +4,9 @@ ...@@ -4,7 +4,9 @@
<%block name="pagetitle">${_("Help")}</%block> <%block name="pagetitle">${_("Help")}</%block>
<section class="container about"> <main id="main" aria-label="Content" tabindex="-1">
<h1>${_("Help")}</h1> <section class="container about">
<p>${_("This page left intentionally blank. It is not used by edx.org but is left here for possible use by installations of Open edX.")}</p> <h1>${_("Help")}</h1>
</section> <p>${_("This page left intentionally blank. It is not used by edx.org but is left here for possible use by installations of Open edX.")}</p>
</section>
</main>
...@@ -4,7 +4,9 @@ ...@@ -4,7 +4,9 @@
<%block name="pagetitle">${_("Honor Code")}</%block> <%block name="pagetitle">${_("Honor Code")}</%block>
<section class="container about"> <main id="main" aria-label="Content" tabindex="-1">
<h1>${_("Honor Code")}</h1> <section class="container about">
<p>${_("This page left intentionally blank. It is not used by edx.org but is left here for possible use by installations of Open edX.")}</p> <h1>${_("Honor Code")}</h1>
</section> <p>${_("This page left intentionally blank. It is not used by edx.org but is left here for possible use by installations of Open edX.")}</p>
</section>
</main>
...@@ -4,7 +4,9 @@ ...@@ -4,7 +4,9 @@
<%block name="pagetitle">${_("Jobs")}</%block> <%block name="pagetitle">${_("Jobs")}</%block>
<section class="container about"> <main id="main" aria-label="Content" tabindex="-1">
<h1>${_("Jobs")}</h1> <section class="container about">
<p>${_("This page left intentionally blank. It is not used by edx.org but is left here for possible use by installations of Open edX.")}</p> <h1>${_("Jobs")}</h1>
</section> <p>${_("This page left intentionally blank. It is not used by edx.org but is left here for possible use by installations of Open edX.")}</p>
</section>
</main>
...@@ -4,7 +4,9 @@ ...@@ -4,7 +4,9 @@
<%block name="pagetitle">${_("Media Kit")}</%block> <%block name="pagetitle">${_("Media Kit")}</%block>
<section class="container about"> <main id="main" aria-label="Cntent" tabindex="-1">
<h1>${_("Media Kit")}</h1> <section class="container about">
<p>${_("This page left intentionally blank. It is not used by edx.org but is left here for possible use by installations of Open edX.")}</p> <h1>${_("Media Kit")}</h1>
</section> <p>${_("This page left intentionally blank. It is not used by edx.org but is left here for possible use by installations of Open edX.")}</p>
</section>
</main>
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
<%block name="pagetitle">${_("In the Press")}</%block> <%block name="pagetitle">${_("In the Press")}</%block>
<section class="container about"> <main id="main" aria-label="Content" tabindex="-1">
<h1>${_("In the Press")}</h1> <section class="container about">
<p>${_("This page left intentionally blank. It is not used by edx.org but is left here for possible use by installations of Open edX.")}</p> <h1>${_("In the Press")}</h1>
</section> <p>${_("This page left intentionally blank. It is not used by edx.org but is left here for possible use by installations of Open edX.")}</p>
</section>
</main>
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
<%block name="pagetitle">${_("In the Press")}</%block> <%block name="pagetitle">${_("In the Press")}</%block>
<section class="container about"> <main id="main" aria-label="Content" tabindex="-1">
<h1>${_("In the Press")}</h1> <section class="container about">
<p>${_("This page left intentionally blank. It is not used by edx.org but is left here for possible use by installations of Open edX.")}</p> <h1>${_("In the Press")}</h1>
</section> <p>${_("This page left intentionally blank. It is not used by edx.org but is left here for possible use by installations of Open edX.")}</p>
</section>
</main>
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
<%block name="pagetitle">${_("Privacy Policy")}</%block> <%block name="pagetitle">${_("Privacy Policy")}</%block>
<section class="container about"> <main id="main" aria-label="Content" tabindex="-1">
<h1>${_("Privacy Policy")}</h1> <section class="container about">
<p>${_("This page left intentionally blank. It is not used by edx.org but is left here for possible use by installations of Open edX.")}</p> <h1>${_("Privacy Policy")}</h1>
</section> <p>${_("This page left intentionally blank. It is not used by edx.org but is left here for possible use by installations of Open edX.")}</p>
</section>
</main>
...@@ -5,7 +5,8 @@ from openedx.core.djangolib.markup import Text, HTML ...@@ -5,7 +5,8 @@ from openedx.core.djangolib.markup import Text, HTML
%> %>
<%inherit file="../main.html" /> <%inherit file="../main.html" />
<section class="outside-app"> <main id="main" aria-label="Content" tabindex="-1">
<section class="outside-app">
<h1> <h1>
${Text(_("Currently the {platform_name} servers are down")).format( ${Text(_("Currently the {platform_name} servers are down")).format(
platform_name=HTML(u"<em>{}</em>").format(Text(settings.PLATFORM_NAME)) platform_name=HTML(u"<em>{}</em>").format(Text(settings.PLATFORM_NAME))
...@@ -16,4 +17,5 @@ from openedx.core.djangolib.markup import Text, HTML ...@@ -16,4 +17,5 @@ from openedx.core.djangolib.markup import Text, HTML
"Please email us at {tech_support_email} to report any problems or downtime.")).format( "Please email us at {tech_support_email} to report any problems or downtime.")).format(
tech_support_email=HTML('<a href="mailto:{0}">{0}</a>').format(Text(settings.TECH_SUPPORT_EMAIL)) tech_support_email=HTML('<a href="mailto:{0}">{0}</a>').format(Text(settings.TECH_SUPPORT_EMAIL))
)}</p> )}</p>
</section> </section>
</main>
...@@ -6,7 +6,8 @@ from openedx.core.djangolib.markup import Text, HTML ...@@ -6,7 +6,8 @@ from openedx.core.djangolib.markup import Text, HTML
%> %>
<%inherit file="../main.html" /> <%inherit file="../main.html" />
<section class="outside-app"> <main id="main" aria-label="Content" tabindex="-1">
<section class="outside-app">
<h1> <h1>
${Text(_(u"There has been a 500 error on the {platform_name} servers")).format( ${Text(_(u"There has been a 500 error on the {platform_name} servers")).format(
platform_name=HTML("<em>{platform_name}</em>").format(platform_name=Text(static.get_platform_name())) platform_name=HTML("<em>{platform_name}</em>").format(platform_name=Text(static.get_platform_name()))
...@@ -19,4 +20,5 @@ from openedx.core.djangolib.markup import Text, HTML ...@@ -19,4 +20,5 @@ from openedx.core.djangolib.markup import Text, HTML
) )
)} )}
</p> </p>
</section> </section>
</main>
...@@ -5,7 +5,8 @@ from openedx.core.djangolib.markup import Text, HTML ...@@ -5,7 +5,8 @@ from openedx.core.djangolib.markup import Text, HTML
%> %>
<%inherit file="../main.html" /> <%inherit file="../main.html" />
<section class="outside-app"> <main id="main" aria-label="Content" tabindex="-1">
<section class="outside-app">
<h1> <h1>
${Text(_("Currently the {platform_name} servers are overloaded")).format( ${Text(_("Currently the {platform_name} servers are overloaded")).format(
platform_name=HTML("<em>{}</em>").format(platform_name=Text(settings.PLATFORM_NAME)) platform_name=HTML("<em>{}</em>").format(platform_name=Text(settings.PLATFORM_NAME))
...@@ -17,4 +18,5 @@ from openedx.core.djangolib.markup import Text, HTML ...@@ -17,4 +18,5 @@ from openedx.core.djangolib.markup import Text, HTML
tech_support_email=HTML('<a href="mailto:{0}">{0}</a>').format(tech_support_email=Text(settings.TECH_SUPPORT_EMAIL)) tech_support_email=HTML('<a href="mailto:{0}">{0}</a>').format(tech_support_email=Text(settings.TECH_SUPPORT_EMAIL))
)} )}
</p> </p>
</section> </section>
</main>
...@@ -4,7 +4,9 @@ ...@@ -4,7 +4,9 @@
<%block name="pagetitle">${_("Terms of Service")}</%block> <%block name="pagetitle">${_("Terms of Service")}</%block>
<section class="container about"> <main id="main" aria-label="Content" tabindex="-1">
<h1>${_("Terms of Service")}</h1> <section class="container about">
<p>${_("This page left intentionally blank. It is not used by edx.org but is left here for possible use by installations of Open edX.")}</p> <h1>${_("Terms of Service")}</h1>
</section> <p>${_("This page left intentionally blank. It is not used by edx.org but is left here for possible use by installations of Open edX.")}</p>
</section>
</main>
...@@ -16,7 +16,6 @@ from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_str ...@@ -16,7 +16,6 @@ from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_str
<%namespace name='static' file='/static_content.html'/> <%namespace name='static' file='/static_content.html'/>
<%block name="pagetitle">${_("Account Settings")}</%block> <%block name="pagetitle">${_("Account Settings")}</%block>
<%block name="nav_skip">#content</%block>
% if duplicate_provider: % if duplicate_provider:
<section> <section>
......
<main id="main" aria-label="Content" tabindex="-1">
<div class="account-settings-container"> <div class="account-settings-container">
<div class="wrapper-header"> <div class="wrapper-header">
<h2 class="header-title"><%- gettext("Account Settings") %></h2> <h2 class="header-title"><%- gettext("Account Settings") %></h2>
...@@ -22,3 +23,4 @@ ...@@ -22,3 +23,4 @@
<% }); %> <% }); %>
</div> </div>
</div> </div>
</main>
...@@ -33,5 +33,7 @@ ...@@ -33,5 +33,7 @@
</%block> </%block>
<div class="section-bkg-wrapper"> <div class="section-bkg-wrapper">
<main id="main" aria-label="Content" tabindex="-1">
<div id="login-and-registration-container" class="login-register" /> <div id="login-and-registration-container" class="login-register" />
</main>
</div> </div>
...@@ -9,16 +9,17 @@ from openedx.core.djangolib.js_utils import dump_js_escaped_json ...@@ -9,16 +9,17 @@ from openedx.core.djangolib.js_utils import dump_js_escaped_json
%> %>
<%block name="pagetitle">${_("Learner Profile")}</%block> <%block name="pagetitle">${_("Learner Profile")}</%block>
<%block name="nav_skip">#content</%block>
<%block name="bodyclass">view-profile</%block> <%block name="bodyclass">view-profile</%block>
<div class="message-banner" aria-live="polite"></div> <div class="message-banner" aria-live="polite"></div>
<div class="wrapper-profile"> <main id="main" aria-label="Content" tabindex="-1">
<div class="wrapper-profile">
<div class="ui-loading-indicator"> <div class="ui-loading-indicator">
<p><span class="spin"><i class="icon fa fa-refresh" aria-hidden="true"></i></span> <span class="copy">${_("Loading")}</span></p> <p><span class="spin"><i class="icon fa fa-refresh" aria-hidden="true"></i></span> <span class="copy">${_("Loading")}</span></p>
</div> </div>
</div> </div>
</main>
<%block name="headextra"> <%block name="headextra">
<%static:css group='style-course'/> <%static:css group='style-course'/>
</%block> </%block>
......
...@@ -7,13 +7,13 @@ ...@@ -7,13 +7,13 @@
{% block wiki_breadcrumbs %} {% block wiki_breadcrumbs %}
{% include "wiki/includes/breadcrumbs.html" %} {% include "wiki/includes/breadcrumbs.html" %}
{% endblock %} {% endblock %}
{% block nav_skip %}#main-article{% endblock %}
{% block wiki_contents %} {% block wiki_contents %}
<div class="article-wrapper"> <div class="article-wrapper">
<article class="main-article" id="main-article" tabindex="-1"> <main id="main" aria-label="Content" tabindex="-1">
<article class="main-article" id="main-article">
{% if selected_tab != "edit" %} {% if selected_tab != "edit" %}
<h1>{{ article.current_revision.title }}</h1> <h1>{{ article.current_revision.title }}</h1>
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
{% wiki_render article %} {% wiki_render article %}
{% endblock %} {% endblock %}
</article> </article>
</main>
<div class="article-functions"> <div class="article-functions">
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
......
...@@ -47,8 +47,6 @@ ...@@ -47,8 +47,6 @@
{% endblock %} {% endblock %}
{% block nav_skip %}#wiki-content{% endblock %}
{% block body %} {% block body %}
{% if request.course %} {% if request.course %}
{% with course=request.course %} {% with course=request.course %}
...@@ -56,6 +54,7 @@ ...@@ -56,6 +54,7 @@
{% endwith %} {% endwith %}
{% endif %} {% endif %}
<main id="main" aria-label="Content" tabindex="-1">
<section class="container wiki {{ selected_tab }}" id="wiki-content"> <section class="container wiki {{ selected_tab }}" id="wiki-content">
<div class="wiki-wrapper"> <div class="wiki-wrapper">
{% block wiki_body %} {% block wiki_body %}
...@@ -77,5 +76,6 @@ ...@@ -77,5 +76,6 @@
</div> </div>
</section> </section>
</main>
{% endblock %} {% endblock %}
"""Decorators for API access management.""" """Decorators for API access management."""
from functools import wraps from functools import wraps
from django.core.urlresolvers import reverse
from django.http import HttpResponseNotFound from django.http import HttpResponseNotFound
from django.shortcuts import redirect
from openedx.core.djangoapps.api_admin.models import ApiAccessConfig from openedx.core.djangoapps.api_admin.models import ApiAccessRequest, ApiAccessConfig
def api_access_enabled_or_404(view): def api_access_enabled_or_404(view_func):
"""If API access management feature is not enabled, return a 404.""" """If API access management feature is not enabled, return a 404."""
@wraps(view) @wraps(view_func)
def wrapped_view(request, *args, **kwargs): def wrapped_view(view_obj, *args, **kwargs):
"""Wrapper for the view function.""" """Wrapper for the view function."""
if ApiAccessConfig.current().enabled: if ApiAccessConfig.current().enabled:
return view(request, *args, **kwargs) return view_func(view_obj, *args, **kwargs)
return HttpResponseNotFound() return HttpResponseNotFound()
return wrapped_view return wrapped_view
def require_api_access(view_func):
"""If the requesting user does not have API access, bounce them to the request form."""
@wraps(view_func)
def wrapped_view(view_obj, *args, **kwargs):
"""Wrapper for the view function."""
if ApiAccessRequest.has_api_access(args[0].user):
return view_func(view_obj, *args, **kwargs)
return redirect(reverse('api_admin:api-request'))
return wrapped_view
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('api_admin', '0004_auto_20160412_1506'),
]
operations = [
migrations.AlterField(
model_name='apiaccessrequest',
name='user',
field=models.OneToOneField(related_name='api_access_request', to=settings.AUTH_USER_MODEL),
),
]
...@@ -32,7 +32,7 @@ class ApiAccessRequest(TimeStampedModel): ...@@ -32,7 +32,7 @@ class ApiAccessRequest(TimeStampedModel):
(DENIED, _('Denied')), (DENIED, _('Denied')),
(APPROVED, _('Approved')), (APPROVED, _('Approved')),
) )
user = models.OneToOneField(User) user = models.OneToOneField(User, related_name='api_access_request')
status = models.CharField( status = models.CharField(
max_length=255, max_length=255,
choices=STATUS_CHOICES, choices=STATUS_CHOICES,
......
"""Factories for API management.""" """Factories for API management."""
import factory import factory
from factory.django import DjangoModelFactory from factory.django import DjangoModelFactory
from oauth2_provider.models import get_application_model
from microsite_configuration.tests.factories import SiteFactory from microsite_configuration.tests.factories import SiteFactory
from openedx.core.djangoapps.api_admin.models import ApiAccessRequest from openedx.core.djangoapps.api_admin.models import ApiAccessRequest
from student.tests.factories import UserFactory from student.tests.factories import UserFactory
Application = get_application_model() # pylint: disable=invalid-name
class ApiAccessRequestFactory(DjangoModelFactory): class ApiAccessRequestFactory(DjangoModelFactory):
"""Factory for ApiAccessRequest objects.""" """Factory for ApiAccessRequest objects."""
class Meta(object): class Meta(object):
...@@ -14,3 +18,12 @@ class ApiAccessRequestFactory(DjangoModelFactory): ...@@ -14,3 +18,12 @@ class ApiAccessRequestFactory(DjangoModelFactory):
user = factory.SubFactory(UserFactory) user = factory.SubFactory(UserFactory)
site = factory.SubFactory(SiteFactory) site = factory.SubFactory(SiteFactory)
class ApplicationFactory(DjangoModelFactory):
"""Factory for OAuth Application objects."""
class Meta(object):
model = Application
authorization_grant_type = Application.GRANT_CLIENT_CREDENTIALS
client_type = Application.CLIENT_CONFIDENTIAL
#pylint: disable=missing-docstring #pylint: disable=missing-docstring
import unittest import unittest
import ddt
from django.conf import settings from django.conf import settings
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from django.test import TestCase from django.test import TestCase
from django.test.utils import override_settings
from oauth2_provider.models import get_application_model
from openedx.core.djangoapps.api_admin.models import ApiAccessRequest, ApiAccessConfig from openedx.core.djangoapps.api_admin.models import ApiAccessRequest, ApiAccessConfig
from openedx.core.djangoapps.api_admin.tests.factories import ApiAccessRequestFactory from openedx.core.djangoapps.api_admin.tests.factories import ApiAccessRequestFactory, ApplicationFactory
from openedx.core.djangoapps.api_admin.tests.utils import VALID_DATA from openedx.core.djangoapps.api_admin.tests.utils import VALID_DATA
from student.tests.factories import UserFactory from student.tests.factories import UserFactory
Application = get_application_model() # pylint: disable=invalid-name
class ApiAdminTest(TestCase): class ApiAdminTest(TestCase):
def setUp(self): def setUp(self):
...@@ -86,6 +92,8 @@ class ApiRequestViewTest(ApiAdminTest): ...@@ -86,6 +92,8 @@ class ApiRequestViewTest(ApiAdminTest):
@unittest.skipUnless(settings.ROOT_URLCONF == 'lms.urls', 'Test only valid in lms') @unittest.skipUnless(settings.ROOT_URLCONF == 'lms.urls', 'Test only valid in lms')
@override_settings(PLATFORM_NAME='edX')
@ddt.ddt
class ApiRequestStatusViewTest(ApiAdminTest): class ApiRequestStatusViewTest(ApiAdminTest):
def setUp(self): def setUp(self):
...@@ -103,14 +111,35 @@ class ApiRequestStatusViewTest(ApiAdminTest): ...@@ -103,14 +111,35 @@ class ApiRequestStatusViewTest(ApiAdminTest):
response = self.client.get(self.url) response = self.client.get(self.url)
self.assertRedirects(response, reverse('api_admin:api-request')) self.assertRedirects(response, reverse('api_admin:api-request'))
def test_get_with_request(self): @ddt.data(
(ApiAccessRequest.APPROVED, 'Your request to access the edX Course Catalog API has been approved.'),
(ApiAccessRequest.PENDING, 'Your request to access the edX Course Catalog API is being processed.'),
(ApiAccessRequest.DENIED, 'Your request to access the edX Course Catalog API has been denied.'),
)
@ddt.unpack
def test_get_with_request(self, status, expected):
""" """
Verify that users who have requested access can see a message Verify that users who have requested access can see a message
regarding their request status. regarding their request status.
""" """
ApiAccessRequestFactory(user=self.user) ApiAccessRequestFactory(user=self.user, status=status)
response = self.client.get(self.url) response = self.client.get(self.url)
self.assertEqual(response.status_code, 200) self.assertEqual(response.status_code, 200)
self.assertIn(expected, response.content)
def test_get_with_existing_application(self):
"""
Verify that if the user has created their client credentials, they
are shown on the status page.
"""
ApiAccessRequestFactory(user=self.user, status=ApiAccessRequest.APPROVED)
application = ApplicationFactory(user=self.user)
response = self.client.get(self.url)
self.assertEqual(response.status_code, 200)
unicode_content = response.content.decode('utf-8')
self.assertIn(application.client_secret, unicode_content) # pylint: disable=no-member
self.assertIn(application.client_id, unicode_content) # pylint: disable=no-member
self.assertIn(application.redirect_uris, unicode_content) # pylint: disable=no-member
def test_get_anonymous(self): def test_get_anonymous(self):
"""Verify that users must be logged in to see the page.""" """Verify that users must be logged in to see the page."""
...@@ -124,6 +153,49 @@ class ApiRequestStatusViewTest(ApiAdminTest): ...@@ -124,6 +153,49 @@ class ApiRequestStatusViewTest(ApiAdminTest):
response = self.client.get(self.url) response = self.client.get(self.url)
self.assertEqual(response.status_code, 404) self.assertEqual(response.status_code, 404)
@ddt.data(
(ApiAccessRequest.APPROVED, True, True),
(ApiAccessRequest.DENIED, True, False),
(ApiAccessRequest.PENDING, True, False),
(ApiAccessRequest.APPROVED, False, True),
(ApiAccessRequest.DENIED, False, False),
(ApiAccessRequest.PENDING, False, False),
)
@ddt.unpack
def test_post(self, status, application_exists, new_application_created):
"""
Verify that posting the form creates an application if the user is
approved, and does not otherwise. Also ensure that if the user
already has an application, it is deleted before a new
application is created.
"""
if application_exists:
old_application = ApplicationFactory(user=self.user)
ApiAccessRequestFactory(user=self.user, status=status)
self.client.post(self.url, {
'name': 'test.com',
'redirect_uris': 'http://example.com'
})
applications = Application.objects.filter(user=self.user)
if application_exists and new_application_created:
self.assertEqual(applications.count(), 1)
self.assertNotEqual(old_application, applications[0])
elif application_exists:
self.assertEqual(applications.count(), 1)
self.assertEqual(old_application, applications[0])
elif new_application_created:
self.assertEqual(applications.count(), 1)
else:
self.assertEqual(applications.count(), 0)
def test_post_with_errors(self):
ApiAccessRequestFactory(user=self.user, status=ApiAccessRequest.APPROVED)
response = self.client.post(self.url, {
'name': 'test.com',
'redirect_uris': 'not a url'
})
self.assertIn('Enter a valid URL.', response.content)
@unittest.skipUnless(settings.ROOT_URLCONF == 'lms.urls', 'Test only valid in lms') @unittest.skipUnless(settings.ROOT_URLCONF == 'lms.urls', 'Test only valid in lms')
class ApiTosViewTest(ApiAdminTest): class ApiTosViewTest(ApiAdminTest):
......
...@@ -9,13 +9,19 @@ from django.utils.translation import ugettext as _ ...@@ -9,13 +9,19 @@ from django.utils.translation import ugettext as _
from django.views.generic import View from django.views.generic import View
from django.views.generic.base import TemplateView from django.views.generic.base import TemplateView
from django.views.generic.edit import CreateView from django.views.generic.edit import CreateView
from edxmako.shortcuts import render_to_response from oauth2_provider.generators import generate_client_secret, generate_client_id
from oauth2_provider.models import get_application_model
from oauth2_provider.views import ApplicationRegistration
from edxmako.shortcuts import render_to_response
from openedx.core.djangoapps.api_admin.decorators import require_api_access
from openedx.core.djangoapps.api_admin.forms import ApiAccessRequestForm from openedx.core.djangoapps.api_admin.forms import ApiAccessRequestForm
from openedx.core.djangoapps.api_admin.models import ApiAccessRequest from openedx.core.djangoapps.api_admin.models import ApiAccessRequest
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
Application = get_application_model() # pylint: disable=invalid-name
class ApiRequestView(CreateView): class ApiRequestView(CreateView):
"""Form view for requesting API access.""" """Form view for requesting API access."""
...@@ -38,22 +44,71 @@ class ApiRequestView(CreateView): ...@@ -38,22 +44,71 @@ class ApiRequestView(CreateView):
return super(ApiRequestView, self).form_valid(form) return super(ApiRequestView, self).form_valid(form)
class ApiRequestStatusView(View): class ApiRequestStatusView(ApplicationRegistration):
"""View for confirming our receipt of an API request.""" """View for confirming our receipt of an API request."""
def get(self, request): success_url = reverse_lazy('api_admin:api-status')
def get(self, request, form=None): # pylint: disable=arguments-differ
""" """
If the user has not created an API request, redirect them to the If the user has not created an API request, redirect them to the
request form. Otherwise, display the status of their API request. request form. Otherwise, display the status of their API
request. We take `form` as an optional argument so that we can
display validation errors correctly on the page.
""" """
status = ApiAccessRequest.api_access_status(request.user) if form is None:
if status is None: form = self.get_form_class()()
user = request.user
try:
api_request = ApiAccessRequest.objects.get(user=user)
except ApiAccessRequest.DoesNotExist:
return redirect(reverse('api_admin:api-request')) return redirect(reverse('api_admin:api-request'))
try:
application = Application.objects.get(user=user)
except Application.DoesNotExist:
application = None
# We want to fill in a few fields ourselves, so remove them
# from the form so that the user doesn't see them.
for field in ('client_type', 'client_secret', 'client_id', 'authorization_grant_type'):
form.fields.pop(field)
return render_to_response('api_admin/status.html', { return render_to_response('api_admin/status.html', {
'status': status, 'status': api_request.status,
'api_support_link': _('TODO'), 'api_support_link': settings.API_DOCUMENTATION_URL,
'api_support_email': settings.API_ACCESS_MANAGER_EMAIL, 'api_support_email': settings.API_ACCESS_MANAGER_EMAIL,
'form': form,
'application': application,
})
def get_form(self, form_class=None):
form = super(ApiRequestStatusView, self).get_form(form_class)
# Copy the data, since it's an immutable QueryDict.
copied_data = form.data.copy()
# Now set the fields that were removed earlier. We give them
# confidential client credentials, and generate their client
# ID and secret.
copied_data.update({
'authorization_grant_type': Application.GRANT_CLIENT_CREDENTIALS,
'client_type': Application.CLIENT_CONFIDENTIAL,
'client_secret': generate_client_secret(),
'client_id': generate_client_id(),
}) })
form.data = copied_data
return form
def form_valid(self, form):
# Delete any existing applications if the user has decided to regenerate their credentials
Application.objects.filter(user=self.request.user).delete()
return super(ApiRequestStatusView, self).form_valid(form)
def form_invalid(self, form):
return self.get(self.request, form)
@require_api_access
def post(self, request):
return super(ApiRequestStatusView, self).post(request)
class ApiTosView(TemplateView): class ApiTosView(TemplateView):
......
...@@ -152,8 +152,8 @@ def pa11ycrawler(options): ...@@ -152,8 +152,8 @@ def pa11ycrawler(options):
opts = parse_bokchoy_opts(options) opts = parse_bokchoy_opts(options)
opts['report_dir'] = Env.PA11YCRAWLER_REPORT_DIR opts['report_dir'] = Env.PA11YCRAWLER_REPORT_DIR
opts['coveragerc'] = Env.PA11YCRAWLER_COVERAGERC opts['coveragerc'] = Env.PA11YCRAWLER_COVERAGERC
opts['should_fetch_course'] = getattr(options, 'should_fetch_course', None) opts['should_fetch_course'] = getattr(options, 'should_fetch_course', not opts['fasttest'])
opts['course_key'] = getattr(options, 'course-key', None) opts['course_key'] = getattr(options, 'course-key', "course-v1:edX+Test101+course")
test_suite = Pa11yCrawler('a11y_crawler', **opts) test_suite = Pa11yCrawler('a11y_crawler', **opts)
test_suite.run() test_suite.run()
......
...@@ -200,7 +200,7 @@ class TestPaverPa11yCrawlerCmd(unittest.TestCase): ...@@ -200,7 +200,7 @@ class TestPaverPa11yCrawlerCmd(unittest.TestCase):
'--pa11y-reporter="1.0-json" ' '--pa11y-reporter="1.0-json" '
'--depth-limit=6 ' '--depth-limit=6 '
).format( ).format(
start_urls=start_urls, start_urls=' '.join(start_urls),
report_dir=report_dir, report_dir=report_dir,
) )
return expected_statement return expected_statement
......
...@@ -268,7 +268,7 @@ class Pa11yCrawler(BokChoyTestSuite): ...@@ -268,7 +268,7 @@ class Pa11yCrawler(BokChoyTestSuite):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
super(Pa11yCrawler, self).__init__(*args, **kwargs) super(Pa11yCrawler, self).__init__(*args, **kwargs)
self.course_key = kwargs.get('course_key', "course-v1:edX+Test101+course") self.course_key = kwargs.get('course_key')
if self.imports_dir: if self.imports_dir:
# If imports_dir has been specified, assume the files are # If imports_dir has been specified, assume the files are
# already there -- no need to fetch them from github. This # already there -- no need to fetch them from github. This
...@@ -279,7 +279,7 @@ class Pa11yCrawler(BokChoyTestSuite): ...@@ -279,7 +279,7 @@ class Pa11yCrawler(BokChoyTestSuite):
# Otherwise, obey `--skip-fetch` command and use the default # Otherwise, obey `--skip-fetch` command and use the default
# test course. Note that the fetch will also be skipped when # test course. Note that the fetch will also be skipped when
# using `--fast`. # using `--fast`.
self.should_fetch_course = kwargs.get('should_fetch_course', not self.fasttest) self.should_fetch_course = kwargs.get('should_fetch_course')
self.imports_dir = path('test_root/courses/') self.imports_dir = path('test_root/courses/')
self.pa11y_report_dir = os.path.join(self.report_dir, 'pa11ycrawler_reports') self.pa11y_report_dir = os.path.join(self.report_dir, 'pa11ycrawler_reports')
...@@ -360,7 +360,7 @@ class Pa11yCrawler(BokChoyTestSuite): ...@@ -360,7 +360,7 @@ class Pa11yCrawler(BokChoyTestSuite):
'--pa11y-reporter="{reporter}" ' '--pa11y-reporter="{reporter}" '
'--depth-limit={depth} ' '--depth-limit={depth} '
).format( ).format(
start_urls=self.start_urls, start_urls=' '.join(self.start_urls),
allowed_domains='localhost', allowed_domains='localhost',
report_dir=self.pa11y_report_dir, report_dir=self.pa11y_report_dir,
reporter="1.0-json", reporter="1.0-json",
......
...@@ -20,7 +20,6 @@ from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_str ...@@ -20,7 +20,6 @@ from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_str
<%block name="pagetitle">${_("Dashboard")}</%block> <%block name="pagetitle">${_("Dashboard")}</%block>
<%block name="bodyclass">view-dashboard is-authenticated</%block> <%block name="bodyclass">view-dashboard is-authenticated</%block>
<%block name="nav_skip">#my-courses</%block>
<%block name="header_extras"> <%block name="header_extras">
% for template_name in ["donation"]: % for template_name in ["donation"]:
...@@ -77,7 +76,8 @@ from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_str ...@@ -77,7 +76,8 @@ from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_str
</div> </div>
<section class="container dashboard" id="dashboard-main"> <section class="container dashboard" id="dashboard-main">
<section class="my-courses" id="my-courses" role="main" aria-label="Content" tabindex="-1"> <main id="main" aria-label="Content" tabindex="-1">
<section class="my-courses" id="my-courses">
<header class="wrapper-header-courses"> <header class="wrapper-header-courses">
<h2 class="header-courses">${_("My Courses")}</h2> <h2 class="header-courses">${_("My Courses")}</h2>
</header> </header>
...@@ -132,6 +132,7 @@ from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_str ...@@ -132,6 +132,7 @@ from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_str
</div> </div>
% endif % endif
</section> </section>
</main>
% if settings.FEATURES.get('ENABLE_DASHBOARD_SEARCH'): % if settings.FEATURES.get('ENABLE_DASHBOARD_SEARCH'):
<div id="dashboard-search-bar" class="search-bar dashboard-search-bar" role="search" aria-label="Dashboard"> <div id="dashboard-search-bar" class="search-bar dashboard-search-bar" role="search" aria-label="Dashboard">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment