Add self_paced field to course module.
This commit is contained in:
@@ -50,6 +50,7 @@ class CourseMetadata(object):
|
||||
'is_proctored_enabled',
|
||||
'is_time_limited',
|
||||
'is_practice_exam',
|
||||
'self_paced'
|
||||
]
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -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
|
||||
"""
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user