Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
course-discovery
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
course-discovery
Commits
fcfea117
Commit
fcfea117
authored
Jan 31, 2018
by
Jeff LaJoie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
discovery commit
parent
e2d642d2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
24 deletions
+42
-24
course_discovery/apps/publisher/templates/publisher/course_run_detail/_all.html
+30
-23
course_discovery/apps/publisher/wrappers.py
+12
-1
No files found.
course_discovery/apps/publisher/templates/publisher/course_run_detail/_all.html
View file @
fcfea117
...
...
@@ -29,34 +29,41 @@
<div>
{{ course_run.end }}
</div>
</div>
<div
class=
"info-item"
>
<div
class=
"heading"
>
{% trans "Enrollment Track" %}
{{ 'Here!' }}
{{ 'Course_run.is_seat_version: '}} {{ course_run.is_seat_version }}
{{ 'course_run.course.version: '}} {{ course_run.course.version }}
{{ 'Get wrapped object '}} {{ course_run.is_seat_version }}
{% if course_run.is_seat_version %}
<div
class=
"info-item"
>
<div
class=
"heading"
>
{% trans "Enrollment Track" %}
</div>
<div>
{{ course_run.course_type }}
</div>
</div>
<div>
{{ course_run.course_type }}
</div>
</div>
{% if course_run.seat_price %}
<div
class=
"info-item"
>
<div
class=
"heading"
>
{% trans "Certificate Price" %}
</div>
<div>
${{ course_run.seat_price }}
{% if course_run.seat_price %}
<div
class=
"info-item"
>
<div
class=
"heading"
>
{% trans "Certificate Price" %}
</div>
<div>
${{ course_run.seat_price }}
</div>
</div>
</div>
{% endif %}
{% endif %}
{% if course_run.credit_seat_price %}
<div
class=
"info-item"
>
<div
class=
"heading"
>
{% trans "Credit Price" %}
</div>
<div>
${{ course_run.credit_seat_price }}
{% if course_run.credit_seat_price %}
<div
class=
"info-item"
>
<div
class=
"heading"
>
{% trans "Credit Price" %}
</div>
<div>
${{ course_run.credit_seat_price }}
</div>
</div>
</div>
{% endif %}
{% endif %}
{% endif %}
<div
class=
"info-item"
>
<div
class=
"heading"
>
...
...
course_discovery/apps/publisher/wrappers.py
View file @
fcfea117
...
...
@@ -6,7 +6,7 @@ from django.utils.translation import ugettext_lazy as _
from
course_discovery.apps.course_metadata.choices
import
CourseRunPacing
from
course_discovery.apps.publisher.choices
import
PublisherUserRole
from
course_discovery.apps.publisher.models
import
Seat
from
course_discovery.apps.publisher.models
import
Course
,
Seat
from
course_discovery.apps.publisher_comments.models
import
Comments
,
CommentTypeChoices
...
...
@@ -151,6 +151,17 @@ class CourseRunWrapper(BaseWrapper):
)
@property
def
is_seat_version
(
self
):
print
(
"Wrapped obj is"
)
print
(
self
.
wrapped_obj
)
return
self
.
wrapped_obj
# return self.wrapped_obj.course.version == Course.SEAT_VERSION
@property
def
is_seat_version
(
self
):
return
self
.
wrapped_obj
.
course
.
version
==
Course
.
ENTITLEMENT_VERSION
@property
def
organization_key
(
self
):
organization
=
self
.
wrapped_obj
.
course
.
organizations
.
first
()
if
not
organization
:
...
...
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