Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from cms.djangoapps.contentstore.tests.utils import CourseTestCase
from openedx.core import toggles as core_toggles
from openedx.core.djangoapps.course_apps.toggles import EXAMS_IDA
from xmodule.course_metadata_utils import DEFAULT_START_DATE
from xmodule.modulestore.django import (
modulestore,
) # lint-amnesty, pylint: disable=wrong-import-order
Expand Down Expand Up @@ -61,7 +62,7 @@ def get_expected_response_data(
"proctoring_escalation_email": course.proctoring_escalation_email,
"create_zendesk_tickets": course.create_zendesk_tickets,
},
"course_start_date": "2030-01-01T00:00:00Z",
"course_start_date": DEFAULT_START_DATE.strftime('%Y-%m-%dT%H:%M:%SZ'),
"available_proctoring_providers": ["null"],
"requires_escalation_email_providers": [],
}
Expand Down Expand Up @@ -100,7 +101,7 @@ def test_providers_with_disabled_lti(self):
"proctoring_escalation_email": self.course.proctoring_escalation_email,
"create_zendesk_tickets": self.course.create_zendesk_tickets,
},
"course_start_date": "2030-01-01T00:00:00Z",
"course_start_date": DEFAULT_START_DATE.strftime('%Y-%m-%dT%H:%M:%SZ'),
"available_proctoring_providers": ["null"],
"requires_escalation_email_providers": [],
}
Expand All @@ -123,7 +124,7 @@ def test_providers_with_enabled_lti(self):
"proctoring_escalation_email": self.course.proctoring_escalation_email,
"create_zendesk_tickets": self.course.create_zendesk_tickets,
},
"course_start_date": "2030-01-01T00:00:00Z",
"course_start_date": DEFAULT_START_DATE.strftime('%Y-%m-%dT%H:%M:%SZ'),
"available_proctoring_providers": ["lti_external", "null"],
"requires_escalation_email_providers": ["lti_external"],
}
Expand Down
3 changes: 2 additions & 1 deletion cms/djangoapps/contentstore/signals/tests/test_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from xmodule.modulestore.edit_info import EditInfoMixin
from xmodule.modulestore.django import SignalHandler
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
from xmodule.course_metadata_utils import DEFAULT_START_DATE
from xmodule.modulestore.tests.factories import SampleCourseFactory


Expand All @@ -34,7 +35,7 @@ def setUp(self):
course_key=CourseLocator(org='TestU', course='sig101', run='Summer2022', branch=None, version_guid=None),
name='Signals 101',
schedule_data=CourseScheduleData(
start=datetime.fromisoformat('2030-01-01T00:00+00:00'),
start=DEFAULT_START_DATE,
pacing='instructor',
end=None,
enrollment_start=None,
Expand Down
6 changes: 3 additions & 3 deletions cms/djangoapps/contentstore/views/tests/test_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -606,11 +606,11 @@ def test_create_block_negative(self):
self.assertEqual(resp.status_code, 200)

def test_create_with_future_date(self):
self.assertEqual(self.course.start, datetime(2030, 1, 1, tzinfo=UTC))
self.assertEqual(self.course.start, DEFAULT_START_DATE)
resp = self.create_xblock(category="chapter")
usage_key = self.response_usage_key(resp)
obj = self.get_item_from_modulestore(usage_key)
self.assertEqual(obj.start, datetime(2030, 1, 1, tzinfo=UTC))
self.assertEqual(obj.start, DEFAULT_START_DATE)

def test_static_tabs_initialization(self):
"""
Expand Down Expand Up @@ -3408,7 +3408,7 @@ def validate_chapter_xblock_info(self, xblock_info, has_child_info=True):
xblock_info["course_graders"],
["Homework", "Lab", "Midterm Exam", "Final Exam"],
)
self.assertEqual(xblock_info["start"], "2030-01-01T00:00:00Z")
self.assertEqual(xblock_info["start"], DEFAULT_START_DATE.strftime('%Y-%m-%dT%H:%M:%SZ'))
self.assertEqual(xblock_info["graded"], False)
self.assertEqual(xblock_info["due"], None)
self.assertEqual(xblock_info["format"], None)
Expand Down
2 changes: 1 addition & 1 deletion xmodule/course_metadata_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from zoneinfo import ZoneInfo


DEFAULT_START_DATE = datetime(2030, 1, 1, tzinfo=ZoneInfo("UTC"))
DEFAULT_START_DATE = datetime(2040, 1, 1, tzinfo=ZoneInfo("UTC"))

"""
Default grading policy for a course run.
Expand Down
Loading