From c24820ae8777e4f1ed48a6de6362b90cbcd29b95 Mon Sep 17 00:00:00 2001 From: David Baumgold Date: Wed, 15 Jan 2014 14:02:08 -0500 Subject: [PATCH] Change default start date for About pages So that About pages will display in the LMS if the user is not logged in --- common/lib/xmodule/xmodule/html_module.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/common/lib/xmodule/xmodule/html_module.py b/common/lib/xmodule/xmodule/html_module.py index 73b5baf2d6..2f87053abd 100644 --- a/common/lib/xmodule/xmodule/html_module.py +++ b/common/lib/xmodule/xmodule/html_module.py @@ -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):