Commit 39048048 by Calen Pennington Committed by Nimisha Asthagiri

Add comments around In-course verification prompt throwaway code

parent 3fbe60ef
......@@ -348,8 +348,10 @@ class CoursewareIndex(View):
'section_title': None,
'sequence_title': None,
'disable_accordion': waffle.flag_is_active(request, UNIFIED_COURSE_VIEW_FLAG),
# TODO: (Experimental Code). See https://openedx.atlassian.net/wiki/display/RET/2.+In-course+Verification+Prompts
'upgrade_link': check_and_get_upgrade_link(request, self.effective_user, self.course.id),
'upgrade_price': get_cosmetic_verified_display_price(self.course),
# ENDTODO
}
table_of_contents = toc_for_course(
self.effective_user,
......
......@@ -336,8 +336,10 @@ def course_info(request, course_id):
'show_enroll_banner': show_enroll_banner,
'dates_fragment': dates_fragment,
'url_to_enroll': url_to_enroll,
# TODO: (Experimental Code). See https://openedx.atlassian.net/wiki/display/RET/2.+In-course+Verification+Prompts
'upgrade_link': check_and_get_upgrade_link(request, user, course.id),
'upgrade_price': get_cosmetic_verified_display_price(course),
# ENDTODO
}
# Get the URL of the user's last position in order to display the 'where you were last' message
......@@ -360,6 +362,7 @@ def course_info(request, course_id):
UPGRADE_COOKIE_NAME = 'show_upgrade_notification'
# TODO: (Experimental Code). See https://openedx.atlassian.net/wiki/display/RET/2.+In-course+Verification+Prompts
def check_and_get_upgrade_link(request, user, course_id):
upgrade_link = None
......@@ -370,6 +373,7 @@ def check_and_get_upgrade_link(request, user, course_id):
request.need_to_set_upgrade_cookie = True
return upgrade_link
# ENDTODO
class StaticCourseTabView(EdxFragmentView):
......@@ -494,8 +498,10 @@ class CourseTabView(EdxFragmentView):
'supports_preview_menu': supports_preview_menu,
'uses_pattern_library': True,
'disable_courseware_js': True,
# TODO: (Experimental Code). See https://openedx.atlassian.net/wiki/display/RET/2.+In-course+Verification+Prompts
'upgrade_link': check_and_get_upgrade_link(request, request.user, course.id),
'upgrade_price': get_cosmetic_verified_display_price(course),
# ENDTODO
}
def render_to_fragment(self, request, course=None, page_context=None, **kwargs):
......@@ -901,8 +907,10 @@ def _progress(request, course_key, student_id):
'passed': is_course_passed(course, grade_summary),
'credit_course_requirements': _credit_course_requirements(course_key, student),
'certificate_data': _get_cert_data(student, course, course_key, is_active, enrollment_mode),
# TODO: (Experimental Code). See https://openedx.atlassian.net/wiki/display/RET/2.+In-course+Verification+Prompts
'upgrade_link': check_and_get_upgrade_link(request, student, course.id),
'upgrade_price': get_cosmetic_verified_display_price(course),
# ENDTODO
}
with outer_atomic():
......
......@@ -443,8 +443,10 @@ def _create_discussion_board_context(request, course_key, discussion_id=None, th
'category_map': course_settings["category_map"],
'course_settings': course_settings,
'is_commentable_divided': is_commentable_divided(course_key, discussion_id, course_discussion_settings),
# TODO: (Experimental Code). See https://openedx.atlassian.net/wiki/display/RET/2.+In-course+Verification+Prompts
'upgrade_link': check_and_get_upgrade_link(request, user, course.id),
'upgrade_price': get_cosmetic_verified_display_price(course),
# ENDTODO
})
return context
......
## TODO: (Experimental Code). See https://openedx.atlassian.net/wiki/display/RET/2.+In-course+Verification+Prompts
<%page expression_filter="h"/>
% if upgrade_link:
......@@ -7,3 +8,4 @@
data-price="${upgrade_price}">
</script>
% endif
## ENDTODO
......@@ -32,8 +32,10 @@ class CourseOutlineFragmentView(EdxFragmentView):
'csrf': csrf(request)['csrf_token'],
'course': course_overview,
'blocks': course_block_tree,
# TODO: (Experimental Code). See https://openedx.atlassian.net/wiki/display/RET/2.+In-course+Verification+Prompts
'upgrade_link': check_and_get_upgrade_link(request, request.user, course_key),
'upgrade_price': get_cosmetic_verified_display_price(course_overview),
# ENDTODO
}
html = render_to_string('course_experience/course-outline-fragment.html', context)
return Fragment(html)
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