Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
code.vt.edu will be down for maintenance from 0530-0630 EDT Wednesday, April 9th
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
06d680cd
Commit
06d680cd
authored
10 years ago
by
Calen Pennington
Browse files
Options
Downloads
Patches
Plain Diff
Don't use Empty directly, let the manager handle it
parent
9dc48c00
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/djangoapps/student/roles.py
+1
-4
1 addition, 4 deletions
common/djangoapps/student/roles.py
with
1 addition
and
4 deletions
common/djangoapps/student/roles.py
+
1
−
4
View file @
06d680cd
...
...
@@ -72,7 +72,7 @@ class RoleBase(AccessRole):
"""
Roles by type (e.g., instructor, beta_user) and optionally org, course_key
"""
def
__init__
(
self
,
role_name
,
org
=
''
,
course_key
=
CourseKeyField
.
Empty
):
def
__init__
(
self
,
role_name
,
org
=
''
,
course_key
=
None
):
"""
Create role from required role_name w/ optional org and course_key. You may just provide a role
name if it
'
s a global role (not constrained to an org or course). Provide org if constrained to
...
...
@@ -81,9 +81,6 @@ class RoleBase(AccessRole):
"""
super
(
RoleBase
,
self
).
__init__
()
if
course_key
is
None
:
raise
TypeError
(
'
course_key must be CourseKeyField.Empty or a valid CourseKey
'
)
self
.
org
=
org
self
.
course_key
=
course_key
self
.
_role_name
=
role_name
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment