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
127e90e3
Commit
127e90e3
authored
Aug 11, 2017
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove extraneous request argument to experiments.utils.check_and_get_upgrade_link
parent
f79e9da0
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
4 additions
and
11 deletions
+4
-11
common/djangoapps/course_modes/views.py
+0
-1
lms/djangoapps/courseware/views/index.py
+0
-1
lms/djangoapps/courseware/views/views.py
+0
-3
lms/djangoapps/discussion/views.py
+0
-1
lms/djangoapps/experiments/utils.py
+4
-5
No files found.
common/djangoapps/course_modes/views.py
View file @
127e90e3
...
...
@@ -152,7 +152,6 @@ class ChooseModeView(View):
}
context
.
update
(
get_experiment_user_metadata_context
(
request
,
course
,
request
.
user
,
)
...
...
lms/djangoapps/courseware/views/index.py
View file @
127e90e3
...
...
@@ -348,7 +348,6 @@ class CoursewareIndex(View):
}
courseware_context
.
update
(
get_experiment_user_metadata_context
(
request
,
self
.
course
,
self
.
effective_user
,
)
...
...
lms/djangoapps/courseware/views/views.py
View file @
127e90e3
...
...
@@ -329,7 +329,6 @@ def course_info(request, course_id):
}
context
.
update
(
get_experiment_user_metadata_context
(
request
,
course
,
user
,
)
...
...
@@ -533,7 +532,6 @@ class CourseTabView(EdxFragmentView):
}
context
.
update
(
get_experiment_user_metadata_context
(
request
,
course
,
request
.
user
,
)
...
...
@@ -896,7 +894,6 @@ def _progress(request, course_key, student_id):
}
context
.
update
(
get_experiment_user_metadata_context
(
request
,
course
,
student
,
)
...
...
lms/djangoapps/discussion/views.py
View file @
127e90e3
...
...
@@ -486,7 +486,6 @@ def _create_discussion_board_context(request, base_context, thread=None):
})
context
.
update
(
get_experiment_user_metadata_context
(
request
,
course
,
user
,
)
...
...
lms/djangoapps/experiments/utils.py
View file @
127e90e3
...
...
@@ -7,21 +7,20 @@ from courseware.date_summary import (
)
def
check_and_get_upgrade_link
(
request
,
user
,
course_id
):
def
check_and_get_upgrade_link
(
user
,
course_id
):
"""
For an authenticated user, return a link to allow them to upgrade
in the specified course.
"""
if
request
.
user
.
is_authenticated
():
if
user
.
is_authenticated
():
upgrade_data
=
VerifiedUpgradeDeadlineDate
(
None
,
user
,
course_id
=
course_id
)
if
upgrade_data
.
is_enabled
:
request
.
need_to_set_upgrade_cookie
=
True
return
upgrade_data
return
None
def
get_experiment_user_metadata_context
(
request
,
course
,
user
):
def
get_experiment_user_metadata_context
(
course
,
user
):
"""
Return a context dictionary with the keys used by the user_metadata.html.
"""
...
...
@@ -35,7 +34,7 @@ def get_experiment_user_metadata_context(request, course, user):
except
CourseEnrollment
.
DoesNotExist
:
pass
# Not enrolled, used the default None values
upgrade_data
=
check_and_get_upgrade_link
(
request
,
user
,
course
.
id
)
upgrade_data
=
check_and_get_upgrade_link
(
user
,
course
.
id
)
return
{
'upgrade_link'
:
upgrade_data
and
upgrade_data
.
link
,
...
...
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