From dcf94db2e255fc0b9d7ffc10ffe3c9900b59f9b9 Mon Sep 17 00:00:00 2001 From: rayzhou-bit Date: Thu, 21 Nov 2024 18:29:55 +0000 Subject: [PATCH] feat: name and description changes to course opti --- cms/djangoapps/contentstore/views/course_optimizer.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cms/djangoapps/contentstore/views/course_optimizer.py b/cms/djangoapps/contentstore/views/course_optimizer.py index 45ac395f10ac..3aa07ce57183 100644 --- a/cms/djangoapps/contentstore/views/course_optimizer.py +++ b/cms/djangoapps/contentstore/views/course_optimizer.py @@ -38,6 +38,7 @@ log = logging.getLogger(__name__) +# Tuple containing zero or more filters for UserTaskStatus listing REST API calls. STATUS_FILTERS = user_tasks_settings.USER_TASKS_STATUS_FILTERS @@ -162,7 +163,7 @@ def _latest_task_status(request, course_key_string, view_func=None): def _create_dto(json_content, request_user): """ - Returns a DTO for frontend given a list of broken links. + Returns a Data Transfer Object for frontend given a list of broken links. json_content contains a list of the following: [block_id, link] @@ -190,12 +191,12 @@ def _create_dto(json_content, request_user): block_id, link = item usage_key = usage_key_with_run(block_id) block = get_xblock(usage_key, request_user) - _add_broken_link(result, block, link) + _add_broken_link_description(result, block, link) return result -def _add_broken_link(result, block, link): +def _add_broken_link_description(result, block, link): """ Adds broken link found in the specified block along with other block data. Note that because the celery queue does not have credentials, some broken links will