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
cb1058ac
Commit
cb1058ac
authored
Dec 15, 2014
by
chrisndodge
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6142 from edx/muhhshoaib/WL-106-MIT-Course-Information-Page-side-bar
MIT: Course Information Page side bar
parents
70c2adb9
914ecac9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
0 deletions
+21
-0
lms/djangoapps/courseware/tests/test_about.py
+12
-0
lms/djangoapps/courseware/views.py
+1
-0
lms/templates/courseware/course_about.html
+8
-0
No files found.
lms/djangoapps/courseware/tests/test_about.py
View file @
cb1058ac
...
...
@@ -322,6 +322,14 @@ class AboutWithClosedEnrollment(ModuleStoreTestCase):
# Check that registration button is not present
self
.
assertNotIn
(
REG_STR
,
resp
.
content
)
def
test_course_price_is_not_visble_in_sidebar
(
self
):
url
=
reverse
(
'about_course'
,
args
=
[
self
.
course
.
id
.
to_deprecated_string
()])
resp
=
self
.
client
.
get
(
url
)
self
.
assertEqual
(
resp
.
status_code
,
200
)
# course price is not visible ihe course_about page when the course
# mode is not set to honor
self
.
assertNotIn
(
'<span class="important-dates-item-text">$10</span>'
,
resp
.
content
)
@override_settings
(
MODULESTORE
=
TEST_DATA_MOCK_MODULESTORE
)
@patch.dict
(
settings
.
FEATURES
,
{
'ENABLE_SHOPPING_CART'
:
True
})
...
...
@@ -421,6 +429,10 @@ class AboutPurchaseCourseTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase):
self
.
assertIn
(
"Enrollment is Closed"
,
resp
.
content
)
self
.
assertNotIn
(
"Add buyme to Cart ($10)"
,
resp
.
content
)
# course price is visible ihe course_about page when the course
# mode is set to honor and it's price is set
self
.
assertIn
(
'<span class="important-dates-item-text">$10</span>'
,
resp
.
content
)
def
test_invitation_only
(
self
):
"""
This makes sure that the invitation only restirction takes prescendence over
...
...
lms/djangoapps/courseware/views.py
View file @
cb1058ac
...
...
@@ -793,6 +793,7 @@ def course_about(request, course_id):
'registered'
:
registered
,
'course_target'
:
course_target
,
'registration_price'
:
registration_price
,
'currency_symbol'
:
settings
.
PAID_COURSE_REGISTRATION_CURRENCY
[
1
],
'in_cart'
:
in_cart
,
'reg_then_add_to_cart_link'
:
reg_then_add_to_cart_link
,
'show_courseware_link'
:
show_courseware_link
,
...
...
lms/templates/courseware/course_about.html
View file @
cb1058ac
...
...
@@ -311,6 +311,14 @@
##
<li
class=
"important-dates-item"
><i
class=
"icon icon-time"
></i><p
class=
"important-dates-item-title"
>
${_('Course Length')}
</p><span
class=
"important-dates-item-text course-length"
>
${_('{number} weeks').format(number=15)}
</span></li>
%if is_shopping_cart_enabled and registration_price:
<li
class=
"important-dates-item"
>
<i
class=
"icon icon-money"
></i>
<p
class=
"important-dates-item-title"
>
${_("Price")}
</p>
<span
class=
"important-dates-item-text"
>
${_("{currency_symbol}{cost}").format(currency_symbol=currency_symbol, cost=registration_price)}
</span>
</li>
% endif
% if get_course_about_section(course, "prerequisites"):
<li
class=
"important-dates-item"
><i
class=
"icon icon-book"
></i><p
class=
"important-dates-item-title"
>
${_("Prerequisites")}
</p><span
class=
"important-dates-item-text prerequisites"
>
${get_course_about_section(course, "prerequisites")}
</span></li>
% endif
...
...
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