Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
code.vt.edu will be down for maintenance from 0530-0630 EDT Wednesday, March 26th
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
4af929fb
Commit
4af929fb
authored
6 years ago
by
Jillian Vogel
Browse files
Options
Downloads
Patches
Plain Diff
Fixes test failures
parent
761acdfc
Branches
Branches containing commit
Tags
release-2019-06-19-11.15
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
common/djangoapps/student/tests/test_activate_account.py
+14
-17
14 additions, 17 deletions
common/djangoapps/student/tests/test_activate_account.py
common/djangoapps/student/views/dashboard.py
+11
-11
11 additions, 11 deletions
common/djangoapps/student/views/dashboard.py
with
25 additions
and
28 deletions
common/djangoapps/student/tests/test_activate_account.py
+
14
−
17
View file @
4af929fb
...
...
@@ -121,32 +121,29 @@ class TestActivateAccount(TestCase):
"""
# Log in with test user.
self
.
login
()
expected_message
=
render_to_string
(
'
registration/account_activation_sidebar_notice.html
'
,
{
'
email
'
:
self
.
user
.
email
,
'
platform_name
'
:
self
.
platform_name
,
'
activation_email_support_link
'
:
self
.
activation_email_support_link
}
expected_message
=
(
u
"
Check your {email_start}{email}{email_end} inbox for an account activation link from
"
u
"
{platform_name}. If you need help, contact {link_start}{platform_name} Support{link_end}.
"
).
format
(
platform_name
=
self
.
platform_name
,
email_start
=
"
<strong>
"
,
email_end
=
"
</strong>
"
,
email
=
self
.
user
.
email
,
link_start
=
"
<a target=
'
_blank
'
href=
'
{activation_email_support_link}
'
>
"
.
format
(
activation_email_support_link
=
self
.
activation_email_support_link
,
),
link_end
=
"
</a>
"
,
)
response
=
self
.
client
.
get
(
reverse
(
'
dashboard
'
))
self
.
assertContains
(
response
,
expected_message
,
html
=
True
)
self
.
assertContains
(
response
,
expected_message
)
# Now make sure account activation message goes away when user activated the account
self
.
user
.
is_active
=
True
self
.
user
.
save
()
self
.
login
()
expected_message
=
render_to_string
(
'
registration/account_activation_sidebar_notice.html
'
,
{
'
email
'
:
self
.
user
.
email
,
'
platform_name
'
:
self
.
platform_name
,
'
activation_email_support_link
'
:
self
.
activation_email_support_link
}
)
response
=
self
.
client
.
get
(
reverse
(
'
dashboard
'
))
self
.
assertNotContains
(
response
,
expected_message
,
html
=
True
)
self
.
assertNotContains
(
response
,
expected_message
)
def
test_account_activation_notification_on_logistration
(
self
):
"""
...
...
This diff is collapsed.
Click to expand it.
common/djangoapps/student/views/dashboard.py
+
11
−
11
View file @
4af929fb
...
...
@@ -611,17 +611,17 @@ def student_dashboard(request):
activate_account_message
=
''
if
not
user
.
is_active
:
activate_account_message
=
Text
(
_
(
"
Check your {email_start}{email}{email_end} inbox for an account activation link from {platform_name}.
"
"
If you need help, contact {link_start}{platform_name} Support{link_end}.
"
"
Check your {email_start}{email}{email_end} inbox for an account activation link from {platform_name}.
"
"
If you need help, contact {link_start}{platform_name} Support{link_end}.
"
)).
format
(
platform_name
=
platform_name
,
email_start
=
HTML
(
"
<strong>
"
),
email_end
=
HTML
(
"
</strong>
"
),
email
=
user
.
email
,
link_start
=
HTML
(
"
<a target=
'
_blank
'
href=
'
{activation_email_support_link}
'
>
"
).
format
(
activation_email_support_link
=
activation_email_support_link
,
),
link_end
=
HTML
(
"
</a>
"
),
platform_name
=
platform_name
,
email_start
=
HTML
(
"
<strong>
"
),
email_end
=
HTML
(
"
</strong>
"
),
email
=
user
.
email
,
link_start
=
HTML
(
"
<a target=
'
_blank
'
href=
'
{activation_email_support_link}
'
>
"
).
format
(
activation_email_support_link
=
activation_email_support_link
,
),
link_end
=
HTML
(
"
</a>
"
),
)
enterprise_message
=
get_dashboard_consent_notification
(
request
,
user
,
course_enrollments
)
...
...
@@ -819,7 +819,7 @@ def student_dashboard(request):
'
disable_courseware_js
'
:
True
,
'
display_course_modes_on_dashboard
'
:
enable_verified_certificates
and
display_course_modes_on_dashboard
,
'
display_sidebar_on_dashboard
'
:
display_sidebar_on_dashboard
,
'
display_sidebar_account_activation_message
'
:
(
not
user
.
is_active
and
not
hide_dashboard_courses_until_activated
),
'
display_sidebar_account_activation_message
'
:
not
(
user
.
is_active
or
hide_dashboard_courses_until_activated
),
'
display_dashboard_courses
'
:
(
user
.
is_active
or
not
hide_dashboard_courses_until_activated
),
'
empty_dashboard_message
'
:
empty_dashboard_message
,
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment