[Proposal] Course Optimizer

View the GitHub ticket for proposal status updates

Overview

This document explains the need and specifications for a feature that we are calling Course Optimizer. This feature would point out where broken links and images within a given course are. This would minimize what we store on our servers, save course teams time, and provide a better learning experience. 

Problem

Course authors often have broken links in their courses but are unaware of this issue. Staff often become aware of this through interaction with students. It would be better if they could check for themselves in Studio.

Use Cases

  • As a course author, I want to be able to quickly find and replace broken links so that I can be confident that learners don't have to interact with this problem. 

  • As a course author, I want a tool in Studio that enables me to check for broken links and images so that I can more proactively check for issues.

Supporting Data

Proposed Solution

Course Optimizer should exist in Studio as another selection in the “Tools” dropdown along with import, export and checklist.

User Workflow

Author scans course for broken links

  1. User navigates to Course Optimizer.

  2. User clicks the button to check for broken links.

  3. User waits for the scan to complete. Browser displays task progress.

    1. [Backend] Celery task for scanning broken links is kicked off.

  4. When the task completes successfully, the browser displays a list of broken links within the course separated by section, subsection, unit and block.

  5. User navigates to the associated block to fix broken links.

Frontend (What should be on the page)

  • Should contain broken links found within the course.

  • For each link, there should be

    • a link to the block

  • A button for fetching links.

    • an indicator for fetch progress

    • time/date “...of last link scan”

Initial:

 

 

Scanning:

 

 

 

 

Results:

Backend

We want to store this similar to what course exporter is doing so it is not fetched every time the page loads. If the user is utilizing Course Optimizer, they will want to fetch an updated list of links often. However, we should still require them to click a button to fetch so as not to overload the celery queue. The frontend will check the status of the current task and only allow a new task to start if the previous one finished or errored.

Api endpoints:

  1. link_check/<course_id> : Starts link check celery task process.

    1. kicks off a celery task that creates a backend storage record for that course

  2. link_check_status/<course_id> : Checks the current status of link_check.

    1. returns status, output link and error message

 

Backend Storage Record

 

DTO for Frontend

 

Celery Task/Modulestore

The celery task should be similar to what is done with course exporting. It would be queued through a backend endpoint in edx-platform. We want to take all/most of the content and run a check for links. Similar to course export, we want a task status check and we wouldn’t allow users to start another task when an existing one is running. We should also time out of the process if the task takes too long.

Following steps are for navigating modulestore.

 

  1. get course id of the current published version from modulestore.active_versions:

  1. use course id to get xblocks ids from modulestore.structures

  2. use xblock ids to get data from modulestore.definitions:

 

 

  1. find links in the data field

    1. update /static/ links

  2. evaluate if link is broken

  3. return list of broken links with their associated xblock

 

Future Considerations

Recheck Functionality

The recheck functionality is designed for users who have already scanned their course for broken links and plan to address them over multiple sessions. The feature focuses on two key considerations:

  1. Rescanning the entire course is too time-consuming.

  2. Ensuring the list of broken links remains accurate.

Instead of scanning the entire course, the recheck functionality scans only the blocks identified during the previous scan. However, implementing this feature has been deemed too complex for the initial release of Course Optimizer. For more details, refer to the original planning document.

NEW Based on the helpful comments, I have added three possibilities as future enhancements:

  • Automatically Run  & Warn Authors: extend this check to run in the background once for your course and give you a heads up via email or course outline page message. When / how to do this might be tricky to define since course publishing workflows vary greatly. As an example, perhaps only run if it wasn’t run manually and if there are published unit pages in your course with the start date N weeks away? This could help catch issues before a course goes live.

  • In-Context Checks for Text + Problem Blocks: how much cost / effort it might be to run this course optimizer for just a singular block. If it was quick to run the optimizer just in time after draft publish or draft save of any text / video components, you could show a unit page or block level message warning for any detected broken links soon after authoring. 

  • Find a way to enable authors to fix the link from the checker: rather than taking them away to the block - Axim have some related designs mocked up for the “sync feature” for library content in courses (see story 11). There’s a modal that lets the authors scroll through a list of components that have updates available, and accept/deny the changes from within the same modal. I can see something similar here, with an option to edit the links directly in the modal. 

Additional Information

Competitive research (Canvas)

  • As an instructor on Canvas, you can verify links to course content throughout your course to ensure they are valid. You can check these links using the course link validator, which searches through course content and returns invalid or unresponsive course content links. 

 

Implementation Plan:

2U will drive and fund the delivery and ownership/maintainership

Questions:

The original idea was that we could add to it over time, with other aspects of this feature potentially including videos/images that are not used in the course, duplicate content, etc. However, for this first version perhaps Course Optimizer is not the best title. Link Verifier could be an option. I am open to suggestions.