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
OpenEdx
edx-platform
Commits
9ce9b6f9
Commit
9ce9b6f9
authored
Sep 29, 2017
by
Bill Filler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix issue with dynamic tabs, get rid of hijack of Discussions Tab
parent
95635749
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
10 deletions
+7
-10
lms/djangoapps/courseware/tabs.py
+2
-6
lms/djangoapps/courseware/views/views.py
+3
-1
lms/djangoapps/discussion/plugins.py
+2
-3
No files found.
lms/djangoapps/courseware/tabs.py
View file @
9ce9b6f9
...
...
@@ -101,12 +101,10 @@ class DigitalLockerTab(TabFragmentViewMixin, EnrolledTab):
# view_name = 'openedx.course_experience.digital_locker_fragment'
fragment_view_name
=
'openedx.features.course_experience.views.digital_locker_fragment.DigitalLockerFragmentView'
allow_multiple
=
False
#is_dynamic = True
is_default
=
False
is_dynamic
=
True
@classmethod
def
is_enabled
(
cls
,
course
,
user
=
None
):
return
Fals
e
return
Tru
e
class
ProgressTab
(
EnrolledTab
):
"""
...
...
@@ -346,8 +344,6 @@ def get_course_tab_list(request, course):
if
tab
.
type
==
'static_tab'
and
tab
.
course_staff_only
and
\
not
bool
(
user
and
has_access
(
user
,
'staff'
,
course
,
course
.
id
)):
continue
if
tab
.
type
==
'discussion'
:
tab
.
name
=
'Digital Locker'
course_tab_list
.
append
(
tab
)
# Add in any dynamic tabs, i.e. those that are not persisted
...
...
lms/djangoapps/courseware/views/views.py
View file @
9ce9b6f9
...
...
@@ -61,6 +61,7 @@ from eventtracking import tracker
from
ipware.ip
import
get_ip
from
lms.djangoapps.ccx.custom_exception
import
CCXLocatorValidationException
from
lms.djangoapps.courseware.exceptions
import
CourseAccessRedirect
,
Redirect
from
lms.djangoapps.courseware.tabs
import
get_course_tab_list
from
lms.djangoapps.experiments.utils
import
get_experiment_user_metadata_context
from
lms.djangoapps.grades.course_grade_factory
import
CourseGradeFactory
from
lms.djangoapps.instructor.enrollment
import
uses_shib
...
...
@@ -464,7 +465,8 @@ class CourseTabView(EdxFragmentView):
course
=
get_course_with_access
(
request
.
user
,
'load'
,
course_key
)
try
:
# Render the page
tab
=
CourseTabList
.
get_tab_by_type
(
course
.
tabs
,
tab_type
)
course_tabs
=
get_course_tab_list
(
request
,
course
)
tab
=
CourseTabList
.
get_tab_by_type
(
course_tabs
,
tab_type
)
page_context
=
self
.
create_page_context
(
request
,
course
=
course
,
tab
=
tab
,
**
kwargs
)
# Show warnings if the user has limited access
...
...
lms/djangoapps/discussion/plugins.py
View file @
9ce9b6f9
...
...
@@ -16,11 +16,10 @@ class DiscussionTab(TabFragmentViewMixin, EnrolledTab):
"""
type
=
'discussion'
title
=
'Di
gital Locker
'
title
=
'Di
scussion
'
priority
=
None
view_name
=
'discussion.views.forum_form_discussion'
# fragment_view_name = 'discussion.views.DiscussionBoardFragmentView'
fragment_view_name
=
'openedx.features.course_experience.views.digital_locker_fragment.DigitalLockerFragmentView'
fragment_view_name
=
'discussion.views.DiscussionBoardFragmentView'
is_hideable
=
settings
.
FEATURES
.
get
(
'ALLOW_HIDING_DISCUSSION_TAB'
,
False
)
is_default
=
False
body_class
=
'discussion'
...
...
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