Removed self-paced feature flag from code
This commit is contained in:
@@ -20,7 +20,6 @@ from models.settings.course_grading import CourseGradingModel, GRADING_POLICY_CH
|
||||
from models.settings.course_metadata import CourseMetadata
|
||||
from models.settings.encoder import CourseSettingsEncoder
|
||||
from openedx.core.djangoapps.models.course_details import CourseDetails
|
||||
from openedx.core.djangoapps.self_paced.models import SelfPacedConfiguration
|
||||
from student.roles import CourseInstructorRole, CourseStaffRole
|
||||
from student.tests.factories import UserFactory
|
||||
from util import milestones_helpers
|
||||
@@ -113,7 +112,6 @@ class CourseDetailsViewTest(CourseTestCase, MilestonesTestCaseMixin):
|
||||
return Date().to_json(datetime_obj)
|
||||
|
||||
def test_update_and_fetch(self):
|
||||
SelfPacedConfiguration(enabled=True).save()
|
||||
details = CourseDetails.fetch(self.course.id)
|
||||
|
||||
# resp s/b json from here on
|
||||
@@ -297,7 +295,9 @@ class CourseDetailsViewTest(CourseTestCase, MilestonesTestCaseMixin):
|
||||
'short_description': 'empty',
|
||||
'overview': '',
|
||||
'effort': '',
|
||||
'intro_video': ''
|
||||
'intro_video': '',
|
||||
'start_date': '2012-01-01',
|
||||
'end_date': '2012-12-31',
|
||||
}
|
||||
response = self.client.post(settings_details_url, data=json.dumps(data), content_type='application/json',
|
||||
HTTP_ACCEPT='application/json')
|
||||
@@ -352,7 +352,9 @@ class CourseDetailsViewTest(CourseTestCase, MilestonesTestCaseMixin):
|
||||
'short_description': 'empty',
|
||||
'overview': '',
|
||||
'effort': '',
|
||||
'intro_video': ''
|
||||
'intro_video': '',
|
||||
'start_date': '2012-01-01',
|
||||
'end_date': '2012-12-31',
|
||||
}
|
||||
response = self.client.post(
|
||||
settings_details_url,
|
||||
@@ -375,7 +377,9 @@ class CourseDetailsViewTest(CourseTestCase, MilestonesTestCaseMixin):
|
||||
'short_description': 'empty',
|
||||
'overview': '',
|
||||
'effort': '',
|
||||
'intro_video': ''
|
||||
'intro_video': '',
|
||||
'start_date': '2012-01-01',
|
||||
'end_date': '2012-12-31',
|
||||
}
|
||||
|
||||
response = self.client.post(
|
||||
|
||||
@@ -14,7 +14,6 @@ from six import text_type
|
||||
|
||||
from django_comment_common.models import assign_default_role
|
||||
from django_comment_common.utils import seed_permissions_roles
|
||||
from openedx.core.djangoapps.self_paced.models import SelfPacedConfiguration
|
||||
from openedx.core.djangoapps.site_configuration.models import SiteConfiguration
|
||||
from student import auth
|
||||
from student.models import CourseEnrollment
|
||||
@@ -509,4 +508,4 @@ def is_self_paced(course):
|
||||
"""
|
||||
Returns True if course is self-paced, False otherwise.
|
||||
"""
|
||||
return course and course.self_paced and SelfPacedConfiguration.current().enabled
|
||||
return course and course.self_paced
|
||||
|
||||
@@ -60,7 +60,6 @@ from openedx.core.djangoapps.content.course_structures.api.v0 import api, errors
|
||||
from openedx.core.djangoapps.credit.api import get_credit_requirements, is_credit_course
|
||||
from openedx.core.djangoapps.credit.tasks import update_credit_course_requirements
|
||||
from openedx.core.djangoapps.models.course_details import CourseDetails
|
||||
from openedx.core.djangoapps.self_paced.models import SelfPacedConfiguration
|
||||
from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers
|
||||
from openedx.core.djangolib.js_utils import dump_js_escaped_json
|
||||
from openedx.core.lib.course_tabs import CourseTabPluginManager
|
||||
@@ -1045,7 +1044,7 @@ def settings_handler(request, course_key_string):
|
||||
'EDITABLE_SHORT_DESCRIPTION',
|
||||
settings.FEATURES.get('EDITABLE_SHORT_DESCRIPTION', True)
|
||||
)
|
||||
self_paced_enabled = SelfPacedConfiguration.current().enabled
|
||||
# self_paced_enabled = SelfPacedConfiguration.current().enabled
|
||||
|
||||
settings_context = {
|
||||
'context_course': course_module,
|
||||
@@ -1066,7 +1065,6 @@ def settings_handler(request, course_key_string):
|
||||
'enrollment_end_editable': enrollment_end_editable,
|
||||
'is_prerequisite_courses_enabled': is_prerequisite_courses_enabled(),
|
||||
'is_entrance_exams_enabled': is_entrance_exams_enabled(),
|
||||
'self_paced_enabled': self_paced_enabled,
|
||||
'enable_extended_course_details': enable_extended_course_details
|
||||
}
|
||||
if is_prerequisite_courses_enabled():
|
||||
|
||||
@@ -37,7 +37,6 @@ from contentstore.views.item import (
|
||||
highlights_setting,
|
||||
)
|
||||
from lms_xblock.mixin import NONSENSICAL_ACCESS_RESTRICTION
|
||||
from openedx.core.djangoapps.self_paced.models import SelfPacedConfiguration
|
||||
from student.tests.factories import UserFactory
|
||||
from xblock_django.models import XBlockConfiguration, XBlockStudioConfiguration, XBlockStudioConfigurationFlag
|
||||
from xblock_django.user_service import DjangoXBlockUserService
|
||||
@@ -3145,7 +3144,6 @@ class TestXBlockPublishingInfo(ItemTest):
|
||||
Test that when item was initially in `scheduled` state in instructor mode, change course pacing to self-paced,
|
||||
now in self-paced course, item should have `live` visibility state.
|
||||
"""
|
||||
SelfPacedConfiguration(enabled=True).save()
|
||||
|
||||
# Create course, chapter and setup future release date to make chapter in scheduled state
|
||||
course = CourseFactory.create(default_store=store_type)
|
||||
|
||||
@@ -118,6 +118,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
legend {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
// basic layout/elements
|
||||
.title-2 {
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ from util.date_utils import get_default_time_display
|
||||
from django.utils.translation import ugettext as _
|
||||
from openedx.core.djangolib.js_utils import dump_js_escaped_json
|
||||
from contentstore.utils import reverse_usage_url
|
||||
from openedx.core.djangoapps.self_paced.models import SelfPacedConfiguration
|
||||
from openedx.core.djangolib.markup import HTML, Text
|
||||
%>
|
||||
<%block name="title">${_("Course Outline")}</%block>
|
||||
@@ -166,17 +165,15 @@ from openedx.core.djangolib.markup import HTML, Text
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
% if SelfPacedConfiguration.current().enabled:
|
||||
<div class="status-pacing">
|
||||
<h2 class=status-pacing-label>${_("Course Pacing")}</h2>
|
||||
<br>
|
||||
% if context_course.self_paced:
|
||||
<p class="status-pacing-value">${_("Self-Paced")}</p>
|
||||
% else:
|
||||
<p class="status-pacing-value">${_("Instructor-Paced")}</p>
|
||||
% endif
|
||||
</div>
|
||||
% endif
|
||||
<div class="status-pacing">
|
||||
<h2 class=status-pacing-label>${_("Course Pacing")}</h2>
|
||||
<br>
|
||||
% if context_course.self_paced:
|
||||
<p class="status-pacing-value">${_("Self-Paced")}</p>
|
||||
% else:
|
||||
<p class="status-pacing-value">${_("Instructor-Paced")}</p>
|
||||
% endif
|
||||
</div>
|
||||
<div class="status-highlights-enabled"></div>
|
||||
</div>
|
||||
<div class="wrapper-dnd"
|
||||
|
||||
@@ -570,32 +570,32 @@ CMS.URL.UPLOAD_ASSET = '${upload_asset_url | n, js_escaped_string}'
|
||||
</div>
|
||||
% endif
|
||||
|
||||
% if self_paced_enabled:
|
||||
<hr class="divide" />
|
||||
|
||||
<hr class="divide" />
|
||||
|
||||
<div class="group-settings pacing">
|
||||
<header>
|
||||
<h2 class="title-2">${_("Course Pacing")}</h2>
|
||||
<span class="tip">${_("Set the pacing for this course")}</span>
|
||||
</header>
|
||||
<div class="group-settings pacing">
|
||||
<fieldset role="radiogroup">
|
||||
<legend>
|
||||
<header>
|
||||
<h2 class="title-2">${_("Course Pacing")}</h2>
|
||||
<span class="tip">${_("Set the pacing for this course")}</span>
|
||||
</header>
|
||||
</legend>
|
||||
<span class="msg" id="course-pace-toggle-tip"></span>
|
||||
|
||||
<ol class="list-input">
|
||||
<li class="field">
|
||||
<input type="radio" class="field-radio" name="self-paced" id="course-pace-instructor-paced" value="false"/>
|
||||
<label class="course-pace-label" for="course-pace-instructor-paced">${_("Instructor-Paced")}</label>
|
||||
<span class="tip">${_("Instructor-paced courses progress at the pace that the course author sets. You can configure release dates for course content and due dates for assignments.")}</span>
|
||||
</li>
|
||||
<li class="field">
|
||||
<input type="radio" class="field-radio" name="self-paced" id="course-pace-self-paced" value="true"/>
|
||||
<label class="course-pace-label" for="course-pace-self-paced">${_("Self-Paced")}</label>
|
||||
<span class="tip">${_("Self-paced courses do not have release dates for course content or due dates for assignments. Learners can complete course material at any time before the course end date.")}</span>
|
||||
</li>
|
||||
<li class="field">
|
||||
<input type="radio" class="field-radio" name="self-paced" id="course-pace-instructor-paced" value="false" aria-labelledby="course-pace-instructor-label" />
|
||||
<label id="course-pace-instructor-label" class="course-pace-label" for="course-pace-instructor-paced">${_("Instructor-Paced")}</label>
|
||||
<span class="tip">${_("Instructor-paced courses progress at the pace that the course author sets. You can configure release dates for course content and due dates for assignments.")}</span>
|
||||
</li>
|
||||
<li class="field">
|
||||
<input type="radio" class="field-radio" name="self-paced" id="course-pace-self-paced" value="true" aria-labelledby="course-pace-self-paced-label"/>
|
||||
<label id="course-pace-self-paced-label" class="course-pace-label" for="course-pace-self-paced">${_("Self-Paced")}</label>
|
||||
<span class="tip">${_("Self-paced courses do not have release dates for course content or due dates for assignments. Learners can complete course material at any time before the course end date.")}</span>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
% endif
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
% if settings.FEATURES.get("LICENSING", False):
|
||||
<hr class="divide" />
|
||||
|
||||
Reference in New Issue
Block a user