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
aa378198
Commit
aa378198
authored
Apr 05, 2017
by
Andy Armstrong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add bulk operations around CourseTabView rendering
parent
e2c81835
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
lms/djangoapps/courseware/views/views.py
+6
-5
No files found.
lms/djangoapps/courseware/views/views.py
View file @
aa378198
...
@@ -495,11 +495,12 @@ class CourseTabView(EdxFragmentView):
...
@@ -495,11 +495,12 @@ class CourseTabView(EdxFragmentView):
Displays a course tab page that contains a web fragment.
Displays a course tab page that contains a web fragment.
"""
"""
course_key
=
CourseKey
.
from_string
(
course_id
)
course_key
=
CourseKey
.
from_string
(
course_id
)
course
=
get_course_with_access
(
request
.
user
,
'load'
,
course_key
)
with
modulestore
()
.
bulk_operations
(
course_key
):
tab
=
CourseTabList
.
get_tab_by_type
(
course
.
tabs
,
tab_type
)
course
=
get_course_with_access
(
request
.
user
,
'load'
,
course_key
)
page_context
=
self
.
create_page_context
(
request
,
course
=
course
,
tab
=
tab
,
**
kwargs
)
tab
=
CourseTabList
.
get_tab_by_type
(
course
.
tabs
,
tab_type
)
set_custom_metrics_for_course_key
(
course_key
)
page_context
=
self
.
create_page_context
(
request
,
course
=
course
,
tab
=
tab
,
**
kwargs
)
return
super
(
CourseTabView
,
self
)
.
get
(
request
,
course
=
course
,
page_context
=
page_context
,
**
kwargs
)
set_custom_metrics_for_course_key
(
course_key
)
return
super
(
CourseTabView
,
self
)
.
get
(
request
,
course
=
course
,
page_context
=
page_context
,
**
kwargs
)
def
create_page_context
(
self
,
request
,
course
=
None
,
tab
=
None
,
**
kwargs
):
def
create_page_context
(
self
,
request
,
course
=
None
,
tab
=
None
,
**
kwargs
):
"""
"""
...
...
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