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
0edc40de
Commit
0edc40de
authored
Jul 31, 2012
by
Victor Shnayder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address minor comments in #313
parent
0ae434cc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
13 deletions
+9
-13
common/lib/xmodule/xmodule/modulestore/mongo.py
+1
-1
common/lib/xmodule/xmodule/x_module.py
+0
-3
lms/djangoapps/courseware/management/commands/clean_xml.py
+0
-3
lms/djangoapps/courseware/tests/tests.py
+8
-6
No files found.
common/lib/xmodule/xmodule/modulestore/mongo.py
View file @
0edc40de
...
...
@@ -293,7 +293,7 @@ class MongoModuleStore(ModuleStore):
# Check that it's actually in this modulestore.
item
=
self
.
_find_one
(
location
)
# now get the parents
items
=
self
.
collection
.
find
({
'definition.children'
:
str
(
location
)},
items
=
self
.
collection
.
find
({
'definition.children'
:
location
.
url
(
)},
{
'_id'
:
True
})
return
[
i
[
'_id'
]
for
i
in
items
]
common/lib/xmodule/xmodule/x_module.py
View file @
0edc40de
...
...
@@ -194,9 +194,6 @@ class XModule(HTMLSnippet):
self
.
metadata
=
kwargs
.
get
(
'metadata'
,
{})
self
.
_loaded_children
=
None
def
get_name
(
self
):
return
self
.
name
def
get_children
(
self
):
'''
Return module instances for all the children of this module.
...
...
lms/djangoapps/courseware/management/commands/clean_xml.py
View file @
0edc40de
...
...
@@ -17,9 +17,6 @@ def traverse_tree(course):
queue
=
[
course
]
while
len
(
queue
)
>
0
:
node
=
queue
.
pop
()
# print '{0}:'.format(node.location)
# if 'data' in node.definition:
# print '{0}'.format(node.definition['data'])
queue
.
extend
(
node
.
get_children
())
return
True
...
...
lms/djangoapps/courseware/tests/tests.py
View file @
0edc40de
import
copy
import
json
from
path
import
path
import
os
from
pprint
import
pprint
from
nose
import
SkipTest
from
django.test
import
TestCase
from
django.test.client
import
Client
from
mock
import
patch
,
Mock
from
override_settings
import
override_settings
from
django.conf
import
settings
from
django.core.urlresolvers
import
reverse
from
path
import
path
from
mock
import
patch
,
Mock
from
override_settings
import
override_settings
from
student.models
import
Registration
from
django.contrib.auth.models
import
User
from
student.models
import
Registration
from
xmodule.modulestore.django
import
modulestore
import
xmodule.modulestore.django
...
...
@@ -189,11 +190,12 @@ class RealCoursesLoadTestCase(PageLoader):
xmodule
.
modulestore
.
django
.
_MODULESTORES
=
{}
xmodule
.
modulestore
.
django
.
modulestore
()
.
collection
.
drop
()
# TODO: Disabled test for now.. Fix once things are cleaned up.
def
Xtest_real_courses_loads
(
self
):
def
test_real_courses_loads
(
self
):
'''See if any real courses are available at the REAL_DATA_DIR.
If they are, check them.'''
# TODO: Disabled test for now.. Fix once things are cleaned up.
raise
SkipTest
# TODO: adjust staticfiles_dirs
if
not
os
.
path
.
isdir
(
REAL_DATA_DIR
):
# No data present. Just pass.
...
...
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