Change default start date for About pages

So that About pages will display in the LMS if the user is not logged in
This commit is contained in:
David Baumgold
2014-01-15 14:02:08 -05:00
committed by Don Mitchell
parent 7ff137866b
commit c24820ae87

View File

@@ -3,11 +3,14 @@ from fs.errors import ResourceNotFoundError
import logging
import os
import sys
from datetime import datetime
from lxml import etree
from path import path
from pytz import UTC
from pkg_resources import resource_string
from xblock.fields import Scope, String, Boolean
from xmodule.fields import Date
from xmodule.editing_module import EditingDescriptor
from xmodule.html_checker import check_html
from xmodule.stringify import stringify_children
@@ -227,6 +230,12 @@ class AboutFields(object):
default="",
scope=Scope.content
)
# this exists purely to override the default start date
start = Date(
help="placeholder to make sure that About is always active",
default=datetime.fromtimestamp(0, UTC),
scope=Scope.settings,
)
class AboutModule(AboutFields, HtmlModule):