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
39048048
Commit
39048048
authored
Jun 13, 2017
by
Calen Pennington
Committed by
Nimisha Asthagiri
Jun 13, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add comments around In-course verification prompt throwaway code
parent
3fbe60ef
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
0 deletions
+16
-0
lms/djangoapps/courseware/views/index.py
+2
-0
lms/djangoapps/courseware/views/views.py
+8
-0
lms/djangoapps/discussion/views.py
+2
-0
lms/templates/courseware/upgrade.html
+2
-0
openedx/features/course_experience/views/course_outline.py
+2
-0
No files found.
lms/djangoapps/courseware/views/index.py
View file @
39048048
...
...
@@ -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
,
...
...
lms/djangoapps/courseware/views/views.py
View file @
39048048
...
...
@@ -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
():
...
...
lms/djangoapps/discussion/views.py
View file @
39048048
...
...
@@ -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
...
...
lms/templates/courseware/upgrade.html
View file @
39048048
## 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
openedx/features/course_experience/views/course_outline.py
View file @
39048048
...
...
@@ -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
)
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