refactor: rename module -> block within lms/djangoapps/courseware
Also, removed unused `_has_access_xmodule` methid from `lms/djangoapps/courseware/access.py`.
This commit is contained in:
@@ -5,7 +5,7 @@ Utilities for course updates.
|
||||
import hashlib
|
||||
from datetime import datetime
|
||||
|
||||
from lms.djangoapps.courseware.courses import get_course_info_section_module
|
||||
from lms.djangoapps.courseware.courses import get_course_info_section_block
|
||||
from openedx.core.djangoapps.user_api.course_tag.api import get_course_tag, set_course_tag
|
||||
|
||||
STATUS_VISIBLE = 'visible'
|
||||
@@ -59,7 +59,7 @@ def get_ordered_updates(request, course):
|
||||
"""
|
||||
Returns all public course updates in reverse chronological order, including dismissed ones.
|
||||
"""
|
||||
info_module = get_course_info_section_module(request, request.user, course, 'updates')
|
||||
info_module = get_course_info_section_block(request, request.user, course, 'updates')
|
||||
if not info_module:
|
||||
return []
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ from django.views.decorators.cache import cache_control
|
||||
from opaque_keys.edx.keys import CourseKey
|
||||
from web_fragments.fragment import Fragment
|
||||
|
||||
from lms.djangoapps.courseware.courses import get_course_info_section_module, get_course_with_access
|
||||
from lms.djangoapps.courseware.courses import get_course_info_section_block, get_course_with_access
|
||||
from lms.djangoapps.courseware.views.views import CourseTabView
|
||||
from openedx.core.djangoapps.plugin_api.views import EdxFragmentView
|
||||
from openedx.features.course_experience import default_course_url
|
||||
@@ -76,7 +76,7 @@ class CourseUpdatesFragmentView(EdxFragmentView):
|
||||
for older implementations and a few tests that store
|
||||
a single html object representing all the updates.
|
||||
"""
|
||||
info_module = get_course_info_section_module(request, request.user, course, 'updates')
|
||||
info_module = get_course_info_section_block(request, request.user, course, 'updates')
|
||||
info_block = getattr(info_module, '_xmodule', info_module)
|
||||
return info_block.system.service(
|
||||
info_block, "replace_urls"
|
||||
|
||||
Reference in New Issue
Block a user