Skip to content
Snippets Groups Projects
Commit 68d5fe89 authored by David Ormsbee's avatar David Ormsbee Committed by GitHub
Browse files

Merge pull request #16264 from edx/ormsbee/section_summaries2

Separate SectionDescriptor and add summary field.
parents b5ddcb39 b87ab764
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@ from setuptools import find_packages, setup
XMODULES = [
"book = xmodule.backcompat_module:TranslateCustomTagDescriptor",
"chapter = xmodule.seq_module:SequenceDescriptor",
"chapter = xmodule.seq_module:SectionDescriptor",
"conditional = xmodule.conditional_module:ConditionalDescriptor",
"course = xmodule.course_module:CourseDescriptor",
"customtag = xmodule.template_module:CustomTagDescriptor",
......
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment