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
d387843c
Commit
d387843c
authored
May 17, 2012
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing up check_course to pull in modules correctly
parent
1652ec38
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
djangoapps/courseware/management/commands/check_course.py
+10
-10
No files found.
djangoapps/courseware/management/commands/check_course.py
View file @
d387843c
...
...
@@ -6,9 +6,9 @@ from django.core.management.base import BaseCommand
from
django.conf
import
settings
from
django.contrib.auth.models
import
User
from
mitx.
courseware.content_parser
import
course_file
import
mitx.
courseware.module_render
import
mitx.
courseware.modules
from
courseware.content_parser
import
course_file
import
courseware.module_render
import
courseware.modules
class
Command
(
BaseCommand
):
help
=
"Does basic validity tests on course.xml."
...
...
@@ -25,15 +25,15 @@ class Command(BaseCommand):
check
=
False
print
"Confirming all modules render. Nothing should print during this step. "
for
module
in
course
.
xpath
(
'//problem|//html|//video|//vertical|//sequential|/tab'
):
module_class
=
mitx
.
courseware
.
modules
.
modx_modules
[
module
.
tag
]
module_class
=
courseware
.
modules
.
modx_modules
[
module
.
tag
]
# TODO: Abstract this out in render_module.py
try
:
instance
=
module_class
(
etree
.
tostring
(
module
),
module
.
get
(
'id'
),
ajax_url
=
''
,
state
=
None
,
track_function
=
lambda
x
,
y
,
z
:
None
,
render_function
=
lambda
x
:
{
'content'
:
''
,
'destroy_js'
:
''
,
'init_js'
:
''
,
'type'
:
'video'
})
module_class
(
etree
.
tostring
(
module
),
module
.
get
(
'id'
),
ajax_url
=
''
,
state
=
None
,
track_function
=
lambda
x
,
y
,
z
:
None
,
render_function
=
lambda
x
:
{
'content'
:
''
,
'destroy_js'
:
''
,
'init_js'
:
''
,
'type'
:
'video'
})
except
:
print
"==============> Error in "
,
etree
.
tostring
(
module
)
check
=
False
...
...
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