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
b8ae026c
Commit
b8ae026c
authored
Aug 04, 2012
by
ichuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fail gracefully if course.xml missing metadata in course_staff_group_name
parent
d50af576
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
+4
-1
lms/djangoapps/courseware/courses.py
+4
-1
No files found.
lms/djangoapps/courseware/courses.py
View file @
b8ae026c
...
...
@@ -117,7 +117,10 @@ def get_course_info_section(course, section_key):
raise
KeyError
(
"Invalid about key "
+
str
(
section_key
))
def
course_staff_group_name
(
course
):
return
'staff_
%
s'
%
course
.
metadata
[
'course'
]
coursename
=
course
.
metadata
.
get
(
'course'
,
''
)
if
not
coursename
:
# Fall 2012: not all course.xml have metadata correct yet
coursename
=
course
.
metadata
.
get
(
'data_dir'
,
'UnknownCourseName'
)
return
'staff_
%
s'
%
coursename
def
has_staff_access_to_course
(
user
,
course
):
'''
...
...
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