refactor: Remove legacy course info page & related code
This commit is contained in:
@@ -62,7 +62,7 @@ class CourseOverviewTestCase(CatalogIntegrationMixin, ModuleStoreTestCase, Cache
|
||||
None: None,
|
||||
}
|
||||
|
||||
COURSE_OVERVIEW_TABS = {'courseware', 'info', 'textbooks', 'discussion', 'wiki', 'progress', 'dates'}
|
||||
COURSE_OVERVIEW_TABS = {'courseware', 'textbooks', 'discussion', 'wiki', 'progress', 'dates'}
|
||||
|
||||
ENABLED_SIGNALS = ['course_deleted', 'course_published']
|
||||
|
||||
|
||||
@@ -236,17 +236,6 @@ Configuration Flags
|
||||
Configuring Schedule Creation
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Self-paced Configuration
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Schedules will only be created for a course if it is self-paced. A
|
||||
course can be configured to be self-paced by going to
|
||||
``<studio_url>/admin/self_paced/selfpacedconfiguration/`` and adding an
|
||||
enabled self paced config. Then, go to Studio settings for the course
|
||||
and change the Course Pacing value to “Self-Paced”. Note that the Course
|
||||
Start Date has to be set to sometime in the future in order to change
|
||||
the Course Pacing.
|
||||
|
||||
Configuring Upgrade Deadline on Schedule
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
@@ -252,7 +252,7 @@ class TestCourseNextSectionUpdateResolver(SchedulesResolverTestMixin, ModuleStor
|
||||
def test_schedule_context(self):
|
||||
resolver = self.create_resolver()
|
||||
# using this to make sure the select_related stays intact
|
||||
with self.assertNumQueries(41):
|
||||
with self.assertNumQueries(38):
|
||||
sc = resolver.get_schedules()
|
||||
schedules = list(sc)
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
"""
|
||||
Admin site bindings for self-paced courses.
|
||||
"""
|
||||
|
||||
|
||||
from config_models.admin import ConfigurationModelAdmin
|
||||
from django.contrib import admin
|
||||
|
||||
from .models import SelfPacedConfiguration
|
||||
|
||||
admin.site.register(SelfPacedConfiguration, ConfigurationModelAdmin)
|
||||
@@ -1,27 +0,0 @@
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='SelfPacedConfiguration',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')),
|
||||
('enabled', models.BooleanField(default=False, verbose_name='Enabled')),
|
||||
('enable_course_home_improvements', models.BooleanField(default=False, verbose_name='Enable course home page improvements.')),
|
||||
('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')),
|
||||
],
|
||||
options={
|
||||
'ordering': ('-change_date',),
|
||||
'abstract': False,
|
||||
},
|
||||
),
|
||||
]
|
||||
@@ -1,21 +0,0 @@
|
||||
"""
|
||||
Configuration for self-paced courses.
|
||||
"""
|
||||
|
||||
|
||||
from config_models.models import ConfigurationModel
|
||||
from django.db.models import BooleanField
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class SelfPacedConfiguration(ConfigurationModel):
|
||||
"""
|
||||
Configuration for self-paced courses.
|
||||
|
||||
.. no_pii:
|
||||
"""
|
||||
|
||||
enable_course_home_improvements = BooleanField(
|
||||
default=False,
|
||||
verbose_name=_("Enable course home page improvements.")
|
||||
)
|
||||
@@ -124,8 +124,8 @@ class TestComprehensiveThemeLMS(TestCase):
|
||||
courses_url = reverse('courses')
|
||||
resp = self.client.get(courses_url)
|
||||
assert resp.status_code == 200
|
||||
# The courses.html template includes the info.html file, which is overriden in the theme.
|
||||
self.assertContains(resp, "This overrides the courseware/info.html template.")
|
||||
# The courses.html template includes the progress.html file, which is overriden in the theme.
|
||||
self.assertContains(resp, "This overrides the courseware/progress.html template.")
|
||||
|
||||
@with_comprehensive_theme("test-theme")
|
||||
def test_include_custom_template(self):
|
||||
|
||||
Reference in New Issue
Block a user