Mgmt. Command to Sync Marketing Urls from Catalog service
Introduces a mgmt. command that retrieves course runs from catalog service in order to update marketing urls for the courses found in course metadata cache (i.e. CourseOverview). This also provides an updated utility to retrieve course sharing url.
This commit is contained in:
@@ -74,7 +74,7 @@ from student.auth import has_course_author_access, has_studio_write_access, has_
|
||||
from student.roles import (
|
||||
CourseInstructorRole, CourseStaffRole, CourseCreatorRole, GlobalStaff, UserBasedRole
|
||||
)
|
||||
from util.course import get_lms_link_for_about_page
|
||||
from util.course import get_link_for_about_page
|
||||
from util.date_utils import get_default_time_display
|
||||
from util.json_request import JsonResponse, JsonResponseBadRequest, expect_json
|
||||
from util.milestones_helpers import (
|
||||
@@ -987,7 +987,7 @@ def settings_handler(request, course_key_string):
|
||||
settings_context = {
|
||||
'context_course': course_module,
|
||||
'course_locator': course_key,
|
||||
'lms_link_for_about_page': get_lms_link_for_about_page(course_key),
|
||||
'lms_link_for_about_page': get_link_for_about_page(course_module),
|
||||
'course_image_url': course_image_url(course_module, 'course_image'),
|
||||
'banner_image_url': course_image_url(course_module, 'banner_image'),
|
||||
'video_thumbnail_image_url': course_image_url(course_module, 'video_thumbnail_image'),
|
||||
|
||||
@@ -14,7 +14,8 @@ from openedx.core.djangoapps.credit.signals import on_course_publish
|
||||
|
||||
|
||||
class CreditEligibilityTest(CourseTestCase):
|
||||
"""Base class to test the course settings details view in Studio for credit
|
||||
"""
|
||||
Base class to test the course settings details view in Studio for credit
|
||||
eligibility requirements.
|
||||
"""
|
||||
def setUp(self):
|
||||
@@ -24,7 +25,8 @@ class CreditEligibilityTest(CourseTestCase):
|
||||
|
||||
@mock.patch.dict("django.conf.settings.FEATURES", {'ENABLE_CREDIT_ELIGIBILITY': False})
|
||||
def test_course_details_with_disabled_setting(self):
|
||||
"""Test that user don't see credit eligibility requirements in response
|
||||
"""
|
||||
Test that user don't see credit eligibility requirements in response
|
||||
if the feature flag 'ENABLE_CREDIT_ELIGIBILITY' is not enabled.
|
||||
"""
|
||||
response = self.client.get_html(self.course_details_url)
|
||||
@@ -34,7 +36,8 @@ class CreditEligibilityTest(CourseTestCase):
|
||||
|
||||
@mock.patch.dict("django.conf.settings.FEATURES", {'ENABLE_CREDIT_ELIGIBILITY': True})
|
||||
def test_course_details_with_enabled_setting(self):
|
||||
"""Test that credit eligibility requirements are present in
|
||||
"""
|
||||
Test that credit eligibility requirements are present in
|
||||
response if the feature flag 'ENABLE_CREDIT_ELIGIBILITY' is enabled.
|
||||
"""
|
||||
# verify that credit eligibility requirements block don't show if the
|
||||
|
||||
Reference in New Issue
Block a user