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
d95e87cf
Commit
d95e87cf
authored
May 11, 2013
by
Chris Dodge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
insert the textbook XML element when writing definition to xml
parent
1db66957
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
common/lib/xmodule/xmodule/course_module.py
+13
-0
No files found.
common/lib/xmodule/xmodule/course_module.py
View file @
d95e87cf
...
...
@@ -382,6 +382,19 @@ class CourseDescriptor(CourseFields, SequenceDescriptor):
return
definition
,
children
def
definition_to_xml
(
self
,
resource_fs
):
xml_object
=
super
(
CourseDescriptor
,
self
)
.
definition_to_xml
(
resource_fs
)
if
len
(
self
.
textbooks
)
>
0
:
textbook_xml_object
=
etree
.
Element
(
'textbook'
)
for
textbook
in
self
.
textbooks
:
textbook_xml_object
.
set
(
'title'
,
textbook
.
title
)
textbook_xml_object
.
set
(
'book_url'
,
textbook
.
book_url
)
xml_object
.
append
(
textbook_xml_object
)
return
xml_object
def
has_ended
(
self
):
"""
Returns True if the current time is after the specified course end date.
...
...
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