Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
6eec5ac4
Commit
6eec5ac4
authored
Mar 23, 2016
by
Nimisha Asthagiri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XSS Safe Default - dashboard
parent
15e5a7db
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
16 deletions
+23
-16
common/djangoapps/student/tests/tests.py
+7
-4
lms/templates/dashboard.html
+8
-7
lms/templates/dashboard/_dashboard_course_listing.html
+0
-0
lms/templates/dashboard/_dashboard_status_verification.html
+1
-0
themes/edx.org/lms/templates/dashboard.html
+7
-5
No files found.
common/djangoapps/student/tests/tests.py
View file @
6eec5ac4
...
...
@@ -249,11 +249,14 @@ class DashboardTest(ModuleStoreTestCase):
Test that the certificate verification status for courses is visible on the dashboard.
"""
self
.
client
.
login
(
username
=
"jack"
,
password
=
"test"
)
self
.
_check_verification_status_on
(
'verified'
,
'You
\'
re enrolled as a verified student'
)
self
.
_check_verification_status_on
(
'honor'
,
'You
\'
re enrolled as an honor code student'
)
self
.
_check_verification_status_on
(
'verified'
,
'You
'
re enrolled as a verified student'
)
self
.
_check_verification_status_on
(
'honor'
,
'You
'
re enrolled as an honor code student'
)
self
.
_check_verification_status_off
(
'audit'
,
''
)
self
.
_check_verification_status_on
(
'professional'
,
'You
\'
re enrolled as a professional education student'
)
self
.
_check_verification_status_on
(
'no-id-professional'
,
'You
\'
re enrolled as a professional education student'
)
self
.
_check_verification_status_on
(
'professional'
,
'You're enrolled as a professional education student'
)
self
.
_check_verification_status_on
(
'no-id-professional'
,
'You're enrolled as a professional education student'
,
)
@unittest.skipUnless
(
settings
.
ROOT_URLCONF
==
'lms.urls'
,
'Test only valid in lms'
)
def
_check_verification_status_off
(
self
,
mode
,
value
):
...
...
lms/templates/dashboard.html
View file @
6eec5ac4
<
%
page
expression_filter=
"h"
/>
<
%
inherit
file=
"main.html"
/>
<
%
namespace
name=
'static'
file=
'static_content.html'
/>
<
%!
from
django
.
core
.
urlresolvers
import
reverse
from
django
.
utils
.
translation
import
ugettext
as
_
from
django
.
template
import
RequestContext
import
third_party_auth
from
third_party_auth
import
pipeline
from
django
.
core
.
urlresolvers
import
reverse
import
json
from
openedx
.
core
.
djangolib
.
js_utils
import
dump_js_escaped_json
,
js_escaped_string
%
>
<
%
...
...
@@ -39,9 +40,9 @@ import json
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
edx
.
dashboard
.
legacy
.
init
({
dashboard
:
"${reverse('dashboard')}"
,
signInUser
:
"${reverse('signin_user')}"
,
changeEmailSettings
:
"${reverse('change_email_settings')}"
dashboard
:
"${reverse('dashboard')
| n, js_escaped_string
}"
,
signInUser
:
"${reverse('signin_user')
| n, js_escaped_string
}"
,
changeEmailSettings
:
"${reverse('change_email_settings')
| n, js_escaped_string
}"
});
});
</script>
...
...
@@ -54,7 +55,7 @@ import json
<
%
static:require_module
module_name=
"js/views/message_banner"
class_name=
"MessageBannerView"
>
var banner = new MessageBannerView({urgency: 'low', type: 'warning'});
$('#content').prepend(banner.$el);
banner.showMessage(${
json.dumps(redirect_message)
})
banner.showMessage(${
redirect_message | n, dump_js_escaped_json
})
</
%
static:require
_module
>
% endif
</
%
block>
...
...
@@ -117,7 +118,7 @@ import json
<h2>
${_("Course-loading errors")}
</h2>
% for course_dir, errors in errored_courses.items():
<h3>
${course_dir
| h
}
</h3>
<h3>
${course_dir}
</h3>
<ul>
% for (msg, err) in errors:
<li>
${msg}
...
...
lms/templates/dashboard/_dashboard_course_listing.html
View file @
6eec5ac4
This diff is collapsed.
Click to expand it.
lms/templates/dashboard/_dashboard_status_verification.html
View file @
6eec5ac4
<
%
page
expression_filter=
"h"
/>
<
%
namespace
name=
'static'
file=
'../static_content.html'
/>
<
%!
from
django
.
utils
.
translation
import
ugettext
as
_
...
...
themes/edx.org/lms/templates/dashboard.html
View file @
6eec5ac4
<
%
page
expression_filter=
"h"
/>
<
%
inherit
file=
"main.html"
/>
<
%
namespace
name=
'static'
file=
'static_content.html'
/>
<
%!
...
...
@@ -8,6 +9,7 @@ from third_party_auth import pipeline
from
microsite_configuration
import
microsite
from
django
.
core
.
urlresolvers
import
reverse
import
json
from
openedx
.
core
.
djangolib
.
js_utils
import
dump_js_escaped_json
,
js_escaped_string
%
>
<
%
...
...
@@ -40,9 +42,9 @@ import json
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
edx
.
dashboard
.
legacy
.
init
({
dashboard
:
"${reverse('dashboard')}"
,
signInUser
:
"${reverse('signin_user')}"
,
changeEmailSettings
:
"${reverse('change_email_settings')}"
dashboard
:
"${reverse('dashboard')
| n, js_escaped_string
}"
,
signInUser
:
"${reverse('signin_user')
| n, js_escaped_string
}"
,
changeEmailSettings
:
"${reverse('change_email_settings')
| n, js_escaped_string
}"
});
});
</script>
...
...
@@ -55,7 +57,7 @@ import json
<
%
static:require_module
module_name=
"js/views/message_banner"
class_name=
"MessageBannerView"
>
var banner = new MessageBannerView({urgency: 'low', type: 'warning'});
$('#content').prepend(banner.$el);
banner.showMessage(${
json.dumps(redirect_message)
})
banner.showMessage(${
redirect_message | n, dump_js_escaped_json
})
</
%
static:require
_module
>
% endif
</
%
block>
...
...
@@ -118,7 +120,7 @@ import json
<h2>
${_("Course-loading errors")}
</h2>
% for course_dir, errors in errored_courses.items():
<h3>
${course_dir
| h
}
</h3>
<h3>
${course_dir}
</h3>
<ul>
% for (msg, err) in errors:
<li>
${msg}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment