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
da26ae25
Commit
da26ae25
authored
Oct 31, 2013
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove lms/lib from sys.path in favore of using it as the module lms.lib
parent
bd5abc89
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
34 additions
and
25 deletions
+34
-25
cms/djangoapps/contentstore/views/preview.py
+1
-1
cms/envs/common.py
+1
-1
common/djangoapps/student/management/commands/sync_user_info.py
+1
-1
common/djangoapps/student/models.py
+1
-1
common/lib/logsettings.py
+1
-1
lms/djangoapps/courseware/module_render.py
+1
-1
lms/djangoapps/courseware/tests/__init__.py
+1
-1
lms/djangoapps/courseware/tests/tests.py
+1
-1
lms/djangoapps/django_comment_client/base/tests.py
+1
-1
lms/djangoapps/django_comment_client/base/views.py
+2
-2
lms/djangoapps/django_comment_client/forum/views.py
+1
-1
lms/djangoapps/django_comment_client/management/commands/reload_forum_users.py
+1
-1
lms/djangoapps/django_comment_client/middleware.py
+1
-1
lms/djangoapps/django_comment_client/tests/__init__.py
+0
-0
lms/djangoapps/django_comment_client/tests/test_middleware.py
+4
-4
lms/djangoapps/django_comment_client/tests/test_utils.py
+1
-1
lms/envs/common.py
+3
-3
lms/lib/__init__.py
+0
-0
lms/lib/xblock/__init__.py
+0
-0
lms/lib/xblock/field_data.py
+1
-1
lms/lib/xblock/mixin.py
+0
-0
lms/urls.py
+1
-1
rakelib/quality.rake
+6
-1
setup.cfg
+4
-0
No files found.
cms/djangoapps/contentstore/views/preview.py
View file @
da26ae25
...
...
@@ -16,7 +16,7 @@ from xmodule.modulestore.django import modulestore
from
xmodule.x_module
import
ModuleSystem
from
xblock.runtime
import
DbModel
from
lms.xblock.field_data
import
LmsFieldData
from
lms.
lib.
xblock.field_data
import
LmsFieldData
from
util.sandboxing
import
can_execute_unsafe_code
...
...
cms/envs/common.py
View file @
da26ae25
...
...
@@ -28,7 +28,7 @@ import lms.envs.common
from
lms.envs.common
import
USE_TZ
,
TECH_SUPPORT_EMAIL
,
PLATFORM_NAME
,
BUGS_EMAIL
from
path
import
path
from
lms.xblock.mixin
import
LmsBlockMixin
from
lms.
lib.
xblock.mixin
import
LmsBlockMixin
from
cms.xmodule_namespace
import
CmsBlockMixin
from
xmodule.modulestore.inheritance
import
InheritanceMixin
from
xmodule.x_module
import
XModuleMixin
...
...
common/djangoapps/student/management/commands/sync_user_info.py
View file @
da26ae25
...
...
@@ -4,7 +4,7 @@
from
django.core.management.base
import
BaseCommand
from
django.contrib.auth.models
import
User
import
comment_client
as
cc
import
lms.lib.
comment_client
as
cc
class
Command
(
BaseCommand
):
...
...
common/djangoapps/student/models.py
View file @
da26ae25
...
...
@@ -27,7 +27,7 @@ import django.dispatch
from
django.forms
import
ModelForm
,
forms
from
course_modes.models
import
CourseMode
import
comment_client
as
cc
import
lms.lib.
comment_client
as
cc
from
pytz
import
UTC
import
crum
...
...
common/lib/logsettings.py
View file @
da26ae25
...
...
@@ -82,7 +82,7 @@ def get_logger_config(log_dir,
},
'newrelic'
:
{
'level'
:
'ERROR'
,
'class'
:
'newrelic_logging.NewRelicHandler'
,
'class'
:
'
lms.lib.
newrelic_logging.NewRelicHandler'
,
'formatter'
:
'raw'
,
}
},
...
...
lms/djangoapps/courseware/module_render.py
View file @
da26ae25
...
...
@@ -20,7 +20,7 @@ from capa.xqueue_interface import XQueueInterface
from
courseware.access
import
has_access
from
courseware.masquerade
import
setup_masquerade
from
courseware.model_data
import
FieldDataCache
,
DjangoKeyValueStore
from
lms.xblock.field_data
import
LmsFieldData
from
lms.
lib.
xblock.field_data
import
LmsFieldData
from
mitxmako.shortcuts
import
render_to_string
from
psychometrics.psychoanalyze
import
make_psychometrics_data_update_handler
from
student.models
import
unique_id_for_user
...
...
lms/djangoapps/courseware/tests/__init__.py
View file @
da26ae25
...
...
@@ -21,7 +21,7 @@ from xmodule.modulestore import Location
from
xmodule.modulestore.django
import
modulestore
from
xmodule.modulestore.tests.factories
import
CourseFactory
,
ItemFactory
from
xmodule.modulestore.tests.django_utils
import
ModuleStoreTestCase
from
lms.xblock.field_data
import
LmsFieldData
from
lms.
lib.
xblock.field_data
import
LmsFieldData
@override_settings
(
MODULESTORE
=
TEST_DATA_MIXED_MODULESTORE
)
...
...
lms/djangoapps/courseware/tests/tests.py
View file @
da26ae25
...
...
@@ -20,7 +20,7 @@ from courseware.tests.modulestore_config import TEST_DATA_DIR, \
TEST_DATA_MONGO_MODULESTORE
,
\
TEST_DATA_DRAFT_MONGO_MODULESTORE
,
\
TEST_DATA_MIXED_MODULESTORE
from
lms.xblock.field_data
import
LmsFieldData
from
lms.
lib.
xblock.field_data
import
LmsFieldData
class
ActivateLoginTest
(
LoginEnrollmentTestCase
):
...
...
lms/djangoapps/django_comment_client/base/tests.py
View file @
da26ae25
...
...
@@ -18,7 +18,7 @@ log = logging.getLogger(__name__)
@override_settings
(
MODULESTORE
=
TEST_DATA_MIXED_MODULESTORE
)
@patch
(
'comment_client.utils.requests.request'
)
@patch
(
'
lms.lib.
comment_client.utils.requests.request'
)
class
ViewsTestCase
(
UrlResetMixin
,
ModuleStoreTestCase
):
@patch.dict
(
"django.conf.settings.MITX_FEATURES"
,
{
"ENABLE_DISCUSSION_SERVICE"
:
True
})
...
...
lms/djangoapps/django_comment_client/base/views.py
View file @
da26ae25
...
...
@@ -6,7 +6,7 @@ import logging
import
urlparse
import
functools
import
comment_client
as
cc
import
lms.lib.
comment_client
as
cc
import
django_comment_client.utils
as
utils
import
django_comment_client.settings
as
cc_settings
...
...
@@ -72,7 +72,7 @@ def create_thread(request, course_id, commentable_id):
"""
Given a course and commentble ID, create the thread
"""
log
.
debug
(
"Creating new thread in
%
r, id
%
r"
,
course_id
,
commentable_id
)
course
=
get_course_with_access
(
request
.
user
,
course_id
,
'load'
)
post
=
request
.
POST
...
...
lms/djangoapps/django_comment_client/forum/views.py
View file @
da26ae25
...
...
@@ -17,7 +17,7 @@ from courseware.access import has_access
from
django_comment_client.permissions
import
cached_has_permission
from
django_comment_client.utils
import
(
merge_dict
,
extract
,
strip_none
,
add_courseware_context
)
import
django_comment_client.utils
as
utils
import
comment_client
as
cc
import
lms.lib.
comment_client
as
cc
THREADS_PER_PAGE
=
20
INLINE_THREADS_PER_PAGE
=
20
...
...
lms/djangoapps/django_comment_client/management/commands/reload_forum_users.py
View file @
da26ae25
...
...
@@ -4,7 +4,7 @@ Reload forum (comment client) users from existing users.
from
django.core.management.base
import
BaseCommand
from
django.contrib.auth.models
import
User
import
comment_client
as
cc
import
lms.lib.
comment_client
as
cc
class
Command
(
BaseCommand
):
...
...
lms/djangoapps/django_comment_client/middleware.py
View file @
da26ae25
from
comment_client
import
CommentClientRequestError
from
lms.lib.
comment_client
import
CommentClientRequestError
from
django_comment_client.utils
import
JsonError
import
json
import
logging
...
...
lms/
xblock
/__init__.py
→
lms/
djangoapps/django_comment_client/tests
/__init__.py
View file @
da26ae25
File moved
lms/djangoapps/django_comment_client/tests/test_middleware.py
View file @
da26ae25
...
...
@@ -2,7 +2,7 @@ import django.http
from
django.test
import
TestCase
import
json
import
comment_client
import
lms.lib.
comment_client
import
django_comment_client.middleware
as
middleware
...
...
@@ -11,9 +11,9 @@ class AjaxExceptionTestCase(TestCase):
self
.
a
=
middleware
.
AjaxExceptionMiddleware
()
self
.
request1
=
django
.
http
.
HttpRequest
()
self
.
request0
=
django
.
http
.
HttpRequest
()
self
.
exception1
=
comment_client
.
CommentClientRequestError
(
'{}'
,
401
)
self
.
exception2
=
comment_client
.
CommentClientRequestError
(
'Foo!'
,
404
)
self
.
exception0
=
comment_client
.
CommentClient500Error
(
"Holy crap the server broke!"
)
self
.
exception1
=
lms
.
lib
.
comment_client
.
CommentClientRequestError
(
'{}'
,
401
)
self
.
exception2
=
lms
.
lib
.
comment_client
.
CommentClientRequestError
(
'Foo!'
,
404
)
self
.
exception0
=
lms
.
lib
.
comment_client
.
CommentClient500Error
(
"Holy crap the server broke!"
)
self
.
request1
.
META
[
'HTTP_X_REQUESTED_WITH'
]
=
"XMLHttpRequest"
self
.
request0
.
META
[
'HTTP_X_REQUESTED_WITH'
]
=
"SHADOWFAX"
...
...
lms/djangoapps/django_comment_client/tests/test_utils.py
View file @
da26ae25
...
...
@@ -4,7 +4,7 @@ from django.test import TestCase
from
django.test.utils
import
override_settings
from
student.tests.factories
import
UserFactory
,
CourseEnrollmentFactory
from
django_comment_common.models
import
Role
,
Permission
from
factories
import
RoleFactory
from
django_comment_client.tests.
factories
import
RoleFactory
import
django_comment_client.utils
as
utils
from
xmodule.modulestore.tests.factories
import
CourseFactory
,
ItemFactory
from
xmodule.modulestore.tests.django_utils
import
ModuleStoreTestCase
...
...
lms/envs/common.py
View file @
da26ae25
...
...
@@ -30,7 +30,7 @@ from path import path
from
.discussionsettings
import
*
from
lms.xblock.mixin
import
LmsBlockMixin
from
lms.
lib.
xblock.mixin
import
LmsBlockMixin
from
xmodule.modulestore.inheritance
import
InheritanceMixin
from
xmodule.x_module
import
XModuleMixin
...
...
@@ -213,9 +213,9 @@ COURSES_ROOT = ENV_ROOT / "data"
DATA_DIR
=
COURSES_ROOT
# TODO: Remove the rest of the sys.path modification here and in cms/envs/common.py
sys
.
path
.
append
(
REPO_ROOT
)
sys
.
path
.
append
(
PROJECT_ROOT
/
'djangoapps'
)
sys
.
path
.
append
(
PROJECT_ROOT
/
'lib'
)
sys
.
path
.
append
(
COMMON_ROOT
/
'djangoapps'
)
sys
.
path
.
append
(
COMMON_ROOT
/
'lib'
)
...
...
@@ -917,7 +917,7 @@ INSTALLED_APPS = (
# Our courseware
'circuit'
,
'courseware'
,
'perfstats'
,
'
lms.lib.
perfstats'
,
'student'
,
'static_template_view'
,
'staticbook'
,
...
...
lms/lib/__init__.py
0 → 100644
View file @
da26ae25
lms/lib/xblock/__init__.py
0 → 100644
View file @
da26ae25
lms/xblock/field_data.py
→
lms/
lib/
xblock/field_data.py
View file @
da26ae25
...
...
@@ -16,7 +16,7 @@ class LmsFieldData(SplitFieldData):
def
__init__
(
self
,
authored_data
,
student_data
):
# Make sure that we don't repeatedly nest LmsFieldData instances
if
isinstance
(
authored_data
,
LmsFieldData
):
authored_data
=
authored_data
.
_authored_data
authored_data
=
authored_data
.
_authored_data
# pylint: disable=protected-member
else
:
authored_data
=
ReadOnlyFieldData
(
authored_data
)
...
...
lms/xblock/mixin.py
→
lms/
lib/
xblock/mixin.py
View file @
da26ae25
File moved
lms/urls.py
View file @
da26ae25
...
...
@@ -144,7 +144,7 @@ for key, value in settings.MKTG_URL_LINK_MAP.items():
if
settings
.
PERFSTATS
:
urlpatterns
+=
(
url
(
r'^reprofile$'
,
'perfstats.views.end_profile'
),)
urlpatterns
+=
(
url
(
r'^reprofile$'
,
'
lms.lib.
perfstats.views.end_profile'
),)
# Multicourse wiki (Note: wiki urls must be above the courseware ones because of
# the custom tab catch-all)
...
...
rakelib/quality.rake
View file @
da26ae25
def
run_pylint
(
system
,
report_dir
,
flags
=
''
)
apps
=
Dir
[
"
#{
system
}
"
,
"
#{
system
}
/djangoapps/*"
,
"
#{
system
}
/lib/*"
].
map
do
|
app
|
apps
=
Dir
[
"
#{
system
}
"
,
"
#{
system
}
/djangoapps/*"
]
if
system
!=
'lms'
apps
+=
Dir
[
"
#{
system
}
/lib/*"
]
end
apps
.
map
do
|
app
|
File
.
basename
(
app
)
end
.
select
do
|
app
|
app
!=~
/.pyc$/
...
...
setup.cfg
View file @
da26ae25
...
...
@@ -7,6 +7,10 @@ with-id=1
exclude-dir=lms/envs
cms/envs
# Without this flag, nose adds /lib directories to the path,
# which shadows the xblock library (among other things)
no-path-adjustment=1
# Uncomment the following lines to open pdb when a test fails
#nocapture=1
#pdb=1
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