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
090f4e41
Commit
090f4e41
authored
Mar 03, 2017
by
Ahsan Ulhaq
Committed by
GitHub
Mar 03, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14600 from edx/ahsan/ECOM-6977-ensure-hidden-html-content-not-render
Hidden html content on the dashboard are rendered
parents
b2385424
2d1bb9bf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
37 deletions
+45
-37
common/djangoapps/student/views.py
+4
-0
lms/templates/dashboard.html
+22
-20
themes/edx.org/lms/templates/dashboard.html
+19
-17
No files found.
common/djangoapps/student/views.py
View file @
090f4e41
...
@@ -800,6 +800,9 @@ def dashboard(request):
...
@@ -800,6 +800,9 @@ def dashboard(request):
else
:
else
:
redirect_message
=
''
redirect_message
=
''
valid_verification_statuses
=
[
'approved'
,
'must_reverify'
,
'pending'
,
'expired'
]
display_sidebar_on_dashboard
=
len
(
order_history_list
)
or
verification_status
in
valid_verification_statuses
context
=
{
context
=
{
'enrollment_message'
:
enrollment_message
,
'enrollment_message'
:
enrollment_message
,
'redirect_message'
:
redirect_message
,
'redirect_message'
:
redirect_message
,
...
@@ -833,6 +836,7 @@ def dashboard(request):
...
@@ -833,6 +836,7 @@ def dashboard(request):
'show_program_listing'
:
ProgramsApiConfig
.
current
()
.
show_program_listing
,
'show_program_listing'
:
ProgramsApiConfig
.
current
()
.
show_program_listing
,
'disable_courseware_js'
:
True
,
'disable_courseware_js'
:
True
,
'display_course_modes_on_dashboard'
:
enable_verified_certificates
and
display_course_modes_on_dashboard
,
'display_course_modes_on_dashboard'
:
enable_verified_certificates
and
display_course_modes_on_dashboard
,
'display_sidebar_on_dashboard'
:
display_sidebar_on_dashboard
,
}
}
ecommerce_service
=
EcommerceService
()
ecommerce_service
=
EcommerceService
()
...
...
lms/templates/dashboard.html
View file @
090f4e41
...
@@ -155,27 +155,29 @@ from openedx.core.djangolib.markup import HTML, Text
...
@@ -155,27 +155,29 @@ from openedx.core.djangolib.markup import HTML, Text
<div
id=
"dashboard-search-results"
class=
"search-results dashboard-search-results"
></div>
<div
id=
"dashboard-search-results"
class=
"search-results dashboard-search-results"
></div>
% endif
% endif
<div
class=
"profile-sidebar"
id=
"profile-sidebar"
role=
"region"
aria-label=
"Account Status Info"
>
% if display_sidebar_on_dashboard:
<header
class=
"profile"
>
<div
class=
"profile-sidebar"
id=
"profile-sidebar"
role=
"region"
aria-label=
"Account Status Info"
>
<h2
class=
"account-status-title sr"
>
${_("Account Status Info")}:
</h2>
<header
class=
"profile"
>
</header>
<h2
class=
"account-status-title sr"
>
${_("Account Status Info")}:
</h2>
<div
class=
"user-info"
>
</header>
<ul>
<div
class=
"user-info"
>
<ul>
% if len(order_history_list):
<li
class=
"order-history"
>
% if len(order_history_list):
<span
class=
"title"
>
${_("Order History")}
</span>
<li
class=
"order-history"
>
% for order_history_item in order_history_list:
<span
class=
"title"
>
${_("Order History")}
</span>
<span><a
href=
"${order_history_item['receipt_url']}"
target=
"_blank"
class=
"edit-name"
>
${order_history_item['order_date']}
</a></span>
% for order_history_item in order_history_list:
% endfor
<span><a
href=
"${order_history_item['receipt_url']}"
target=
"_blank"
class=
"edit-name"
>
${order_history_item['order_date']}
</a></span>
</li>
% endfor
% endif
</li>
% endif
<
%
include
file=
"${static.get_template_path('dashboard/_dashboard_status_verification.html')}"
/>
<
%
include
file=
"${static.get_template_path('dashboard/_dashboard_status_verification.html')}"
/>
</ul>
</div>
</ul>
</div>
</div>
</div>
% endif
</div>
</div>
</main>
</main>
...
...
themes/edx.org/lms/templates/dashboard.html
View file @
090f4e41
...
@@ -173,27 +173,29 @@ from openedx.core.djangoapps.theming import helpers as theming_helpers
...
@@ -173,27 +173,29 @@ from openedx.core.djangoapps.theming import helpers as theming_helpers
</div>
</div>
% endif
% endif
<section
class=
"profile-sidebar"
id=
"profile-sidebar"
role=
"region"
aria-label=
"Account Status Info"
>
% if display_sidebar_on_dashboard:
<header
class=
"profile"
>
<section
class=
"profile-sidebar"
id=
"profile-sidebar"
role=
"region"
aria-label=
"Account Status Info"
>
<h2
class=
"account-status-title sr"
>
${_("Account Status Info")}:
</h2>
<header
class=
"profile"
>
</header>
<h2
class=
"account-status-title sr"
>
${_("Account Status Info")}:
</h2>
<section
class=
"user-info"
>
</header>
<ul>
<section
class=
"user-info"
>
<ul>
% if len(order_history_list):
% if len(order_history_list):
<li
class=
"order-history"
>
<li
class=
"order-history"
>
<span
class=
"title"
>
${_("Order History")}
</span>
<span
class=
"title"
>
${_("Order History")}
</span>
% for order_history_item in order_history_list:
% for order_history_item in order_history_list:
<span><a
href=
"${order_history_item['receipt_url']}"
target=
"_blank"
class=
"edit-name"
>
${order_history_item['order_date']}
</a></span>
<span><a
href=
"${order_history_item['receipt_url']}"
target=
"_blank"
class=
"edit-name"
>
${order_history_item['order_date']}
</a></span>
% endfor
% endfor
</li>
</li>
% endif
% endif
<
%
include
file=
"${theming_helpers.get_template_path('dashboard/_dashboard_status_verification.html')}"
/>
<
%
include
file=
"${theming_helpers.get_template_path('dashboard/_dashboard_status_verification.html')}"
/>
</ul>
</ul>
</section>
</section>
</section>
</section>
% endif
</section>
</section>
<section
id=
"email-settings-modal"
class=
"modal"
aria-hidden=
"true"
>
<section
id=
"email-settings-modal"
class=
"modal"
aria-hidden=
"true"
>
...
...
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