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
bacd728e
Commit
bacd728e
authored
Oct 24, 2012
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Squelch some (but not all, yet) errors during template loading
parent
f970da6d
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
4 deletions
+10
-4
common/lib/xmodule/xmodule/abtest_module.py
+1
-1
common/lib/xmodule/xmodule/template_module.py
+1
-0
common/lib/xmodule/xmodule/templates.py
+7
-3
common/lib/xmodule/xmodule/templates/course/empty.yaml
+1
-0
No files found.
common/lib/xmodule/xmodule/abtest_module.py
View file @
bacd728e
...
...
@@ -66,7 +66,7 @@ class ABTestModule(XModule):
class
ABTestDescriptor
(
RawDescriptor
,
XmlDescriptor
):
module_class
=
ABTestModule
#
template_dir_name = "abtest"
template_dir_name
=
"abtest"
def
__init__
(
self
,
system
,
definition
=
None
,
**
kwargs
):
"""
...
...
common/lib/xmodule/xmodule/template_module.py
View file @
bacd728e
...
...
@@ -38,6 +38,7 @@ class CustomTagModule(XModule):
class
CustomTagDescriptor
(
RawDescriptor
):
""" Descriptor for custom tags. Loads the template when created."""
module_class
=
CustomTagModule
template_dir_name
=
'customtag'
@staticmethod
def
render_template
(
system
,
xml_data
):
...
...
common/lib/xmodule/xmodule/templates.py
View file @
bacd728e
...
...
@@ -31,8 +31,6 @@ def all_templates():
templates
=
defaultdict
(
list
)
for
category
,
descriptor
in
XModuleDescriptor
.
load_classes
():
if
category
==
'course'
:
logging
.
debug
(
descriptor
.
templates
())
templates
[
category
]
=
descriptor
.
templates
()
return
templates
...
...
@@ -67,7 +65,13 @@ def update_templates():
template_location
=
Location
(
'i4x'
,
'edx'
,
'templates'
,
category
,
Location
.
clean_for_url_name
(
template
.
metadata
[
'display_name'
]))
try
:
json_data
=
{
'definition'
:
{
'data'
:
template
.
data
,
'children'
:
template
.
children
}}
json_data
=
{
'definition'
:
{
'data'
:
template
.
data
,
'children'
:
template
.
children
},
'metadata'
:
template
.
metadata
}
json_data
[
'location'
]
=
template_location
.
dict
()
XModuleDescriptor
.
load_from_json
(
json_data
,
TemplateTestSystem
())
...
...
common/lib/xmodule/xmodule/templates/course/empty.yaml
View file @
bacd728e
---
metadata
:
display_name
:
Empty
start
:
2020-10-10T10:00
data
:
{
'
textbooks'
:
[
],
'
wiki_slug'
:
null
}
children
:
[]
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