Merge pull request #23346 from edx/jlajoie/dates-tab-for-sp-courses

Enables Dates Tab for Self-Paced courses
This commit is contained in:
Jeff LaJoie
2020-03-10 08:11:28 -04:00
committed by GitHub
3 changed files with 4 additions and 5 deletions

View File

@@ -321,8 +321,7 @@ class DatesTab(CourseTab):
@classmethod
def is_enabled(cls, course, user=None):
"""Returns true if this tab is enabled."""
# We want to only limit this feature to instructor led courses for now (and limit to relative dates experiment)
return not CourseOverview.get_from_id(course.id).self_paced and RELATIVE_DATES_FLAG.is_enabled(course.id)
return RELATIVE_DATES_FLAG.is_enabled(course.id)
def get_course_tab_list(user, course):

View File

@@ -431,8 +431,8 @@ class SelfPacedCourseInfoTestCase(LoginEnrollmentTestCase, SharedModuleStoreTest
def test_num_queries_instructor_paced(self):
# TODO: decrease query count as part of REVO-28
self.fetch_course_info_with_queries(self.instructor_paced_course, 55, 7)
self.fetch_course_info_with_queries(self.instructor_paced_course, 43, 3)
def test_num_queries_self_paced(self):
# TODO: decrease query count as part of REVO-28
self.fetch_course_info_with_queries(self.self_paced_course, 55, 7)
self.fetch_course_info_with_queries(self.self_paced_course, 43, 3)

View File

@@ -134,7 +134,7 @@ class TestCourseUpdatesPage(SharedModuleStoreTestCase):
# Fetch the view and verify that the query counts haven't changed
# TODO: decrease query count as part of REVO-28
with self.assertNumQueries(52, table_blacklist=QUERY_COUNT_TABLE_BLACKLIST):
with self.assertNumQueries(50, table_blacklist=QUERY_COUNT_TABLE_BLACKLIST):
with check_mongo_calls(4):
url = course_updates_url(self.course)
self.client.get(url)