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
b87ab764
Commit
b87ab764
authored
Oct 18, 2017
by
David Ormsbee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Separate SectionDescriptor and add highlights field.
parent
e28932c7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
2 deletions
+19
-2
common/lib/xmodule/setup.py
+1
-1
common/lib/xmodule/xmodule/seq_module.py
+18
-1
No files found.
common/lib/xmodule/setup.py
View file @
b87ab764
...
...
@@ -2,7 +2,7 @@ from setuptools import find_packages, setup
XMODULES
=
[
"book = xmodule.backcompat_module:TranslateCustomTagDescriptor"
,
"chapter = xmodule.seq_module:Se
quence
Descriptor"
,
"chapter = xmodule.seq_module:Se
ction
Descriptor"
,
"conditional = xmodule.conditional_module:ConditionalDescriptor"
,
"course = xmodule.course_module:CourseDescriptor"
,
"customtag = xmodule.template_module:CustomTagDescriptor"
,
...
...
common/lib/xmodule/xmodule/seq_module.py
View file @
b87ab764
...
...
@@ -12,7 +12,7 @@ from pytz import UTC
from
lxml
import
etree
from
xblock.core
import
XBlock
from
xblock.fields
import
Integer
,
Scope
,
Boolean
,
String
from
xblock.fields
import
Integer
,
Scope
,
Boolean
,
String
,
List
from
xblock.fragment
import
Fragment
from
.exceptions
import
NotFoundError
...
...
@@ -583,3 +583,20 @@ class SequenceDescriptor(SequenceFields, ProctoringFields, MakoModuleDescriptor,
xblock_body
[
"content_type"
]
=
"Sequence"
return
xblock_body
class
HighlightsFields
(
object
):
"""Only Sections have summaries now, but we may expand that later."""
highlights
=
List
(
help
=
_
(
"A list summarizing what students should look forward to in this section."
),
scope
=
Scope
.
settings
)
class
SectionModule
(
HighlightsFields
,
SequenceModule
):
"""Module for a Section/Chapter."""
class
SectionDescriptor
(
HighlightsFields
,
SequenceDescriptor
):
"""Descriptor for a Section/Chapter."""
module_class
=
SectionModule
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