Skip to content

Commit

Permalink
feat: name and description changes to course opti
Browse files Browse the repository at this point in the history
  • Loading branch information
rayzhou-bit committed Nov 21, 2024
1 parent 355533b commit e9fb603
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cms/djangoapps/contentstore/views/course_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e9fb603

Please sign in to comment.