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
8be8ac8f
Commit
8be8ac8f
authored
9 years ago
by
Amir Qayyum Khan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactored ccx coach tab plugin
parent
e1035c7b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
lms/djangoapps/ccx/plugins.py
+3
-2
No files found.
lms/djangoapps/ccx/plugins.py
View file @
8be8ac8f
...
...
@@ -25,11 +25,12 @@ class CcxCourseTab(CourseTab):
"""
Returns true if CCX has been enabled and the specified user is a coach
"""
if
not
user
:
return
True
if
not
settings
.
FEATURES
.
get
(
'CUSTOM_COURSES_EDX'
,
False
)
or
not
course
.
enable_ccx
:
# If ccx is not enable do not show ccx coach tab.
return
False
if
has_access
(
user
,
'staff'
,
course
)
or
has_access
(
user
,
'instructor'
,
course
):
# if user is staff or instructor then he can always see ccx coach tab.
return
True
# check if user has coach access.
role
=
CourseCcxCoachRole
(
course
.
id
)
return
role
.
has_user
(
user
)
This diff is collapsed.
Click to expand it.
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