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
4af2249a
Commit
4af2249a
authored
May 21, 2014
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove dead code
parent
9dc48c00
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
52 deletions
+0
-52
common/djangoapps/django_comment_common/utils.py
+0
-19
common/lib/xmodule/xmodule/modulestore/mongo/base.py
+0
-7
lms/djangoapps/courseware/tests/test_video_xml.py
+0
-23
lms/lib/comment_client/user.py
+0
-3
No files found.
common/djangoapps/django_comment_common/utils.py
View file @
4af2249a
...
...
@@ -49,25 +49,6 @@ def seed_permissions_roles(course_key):
administrator_role
.
inherit_permissions
(
moderator_role
)
def
_remove_permission_role
(
course_id
,
name
):
try
:
role
=
Role
.
objects
.
get
(
name
=
name
,
course_id
=
course_id
)
if
role
.
course_id
==
course_id
:
role
.
delete
()
except
Role
.
DoesNotExist
:
pass
def
unseed_permissions_roles
(
course_id
):
"""
A utility method to clean up all forum related permissions and roles
"""
_remove_permission_role
(
name
=
"Administrator"
,
course_id
=
course_id
)
_remove_permission_role
(
name
=
"Moderator"
,
course_id
=
course_id
)
_remove_permission_role
(
name
=
"Community TA"
,
course_id
=
course_id
)
_remove_permission_role
(
name
=
"Student"
,
course_id
=
course_id
)
def
are_permissions_roles_seeded
(
course_id
):
"""
Returns whether the forums permissions for a course have been provisioned in
...
...
common/lib/xmodule/xmodule/modulestore/mongo/base.py
View file @
4af2249a
...
...
@@ -41,13 +41,6 @@ from xmodule.modulestore.locations import SlashSeparatedCourseKey
log
=
logging
.
getLogger
(
__name__
)
def
get_course_id_no_run
(
location
):
'''
Return the first two components of the course_id for this location (org/course)
'''
return
"/"
.
join
([
location
.
org
,
location
.
course
])
class
InvalidWriteError
(
Exception
):
"""
Raised to indicate that writing to a particular key
...
...
lms/djangoapps/courseware/tests/test_video_xml.py
View file @
4af2249a
...
...
@@ -37,29 +37,6 @@ SOURCE_XML = """
"""
class
VideoFactory
(
object
):
"""A helper class to create video modules with various parameters
for testing.
"""
# tag that uses youtube videos
sample_problem_xml_youtube
=
SOURCE_XML
@staticmethod
def
create
():
"""Method return Video Xmodule instance."""
location
=
Location
([
"i4x"
,
"edX"
,
"video"
,
"default"
,
"SampleProblem1"
])
field_data
=
{
'data'
:
VideoFactory
.
sample_problem_xml_youtube
,
'location'
:
location
}
system
=
get_test_descriptor_system
()
descriptor
=
VideoDescriptor
(
system
,
DictFieldData
(
field_data
),
ScopeIds
(
None
,
None
,
None
,
None
))
descriptor
.
xmodule_runtime
=
get_test_system
()
return
descriptor
class
VideoModuleLogicTest
(
LogicTest
):
"""Tests for logic of Video Xmodule."""
...
...
lms/lib/comment_client/user.py
View file @
4af2249a
...
...
@@ -163,7 +163,4 @@ def _url_for_user_active_threads(user_id):
def
_url_for_user_subscribed_threads
(
user_id
):
return
"{prefix}/users/{user_id}/subscribed_threads"
.
format
(
prefix
=
settings
.
PREFIX
,
user_id
=
user_id
)
def
_url_for_user_stats
(
user_id
,
course_id
):
return
"{prefix}/users/{user_id}/stats?course_id={course_id}"
.
format
(
prefix
=
settings
.
PREFIX
,
user_id
=
user_id
,
course_id
=
course_id
)
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