Add self_paced field to course module.

This commit is contained in:
Peter Fogg
2015-10-01 11:36:07 -04:00
parent eaf6be2a54
commit dc7f09fc0e
3 changed files with 23 additions and 0 deletions

View File

@@ -50,6 +50,7 @@ class CourseMetadata(object):
'is_proctored_enabled',
'is_time_limited',
'is_practice_exam',
'self_paced'
]
@classmethod

View File

@@ -928,6 +928,17 @@ class CourseFields(object):
scope=Scope.settings,
)
self_paced = Boolean(
display_name=_("Self Paced"),
help=_(
"Set this to \"true\" to mark this course as self-paced. Self-paced courses do not have "
"due dates for assignments, and students can progress through the course at any rate before "
"the course ends."
),
default=False,
scope=Scope.settings
)
class CourseModule(CourseFields, SequenceModule): # pylint: disable=abstract-method
"""

View File

@@ -354,6 +354,17 @@ class TeamsConfigurationTestCase(unittest.TestCase):
self.assertEqual(self.course.teams_topics, topics)
class SelfPacedTestCase(unittest.TestCase):
"""Tests for self-paced courses."""
def setUp(self):
super(SelfPacedTestCase, self).setUp()
self.course = get_dummy_course('2012-12-02T12:00')
def test_default(self):
self.assertFalse(self.course.self_paced)
class CourseDescriptorTestCase(unittest.TestCase):
"""
Tests for a select few functions from CourseDescriptor.