Commit fcfea117 by Jeff LaJoie

discovery commit

parent e2d642d2
......@@ -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">
......
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment