What went wrong
In the LMS, a lesson’s transcriptLMS · LMS AI Core · The Laravel sideLesson sourcesEach lesson is saved as a source with a version number, split into small chunks of text. Each chunk gets a fingerprint, a short code that changes when its content changes. Searches look only inside the learner’s own courses.See it in the LMS build is one of its lesson sources. Some lessons had a usable manual transcript, one added by hand. At the same time, the automatic import of captions for them was still failing. The job that rebuilds a lesson’s sources lined up another caption import anyway. It could then finish without rebuilding the sections and smaller chunks of text. Study guidesLMS · LMS AI Core · The Laravel sideStudy guidesA saved guide is shown only while it still matches the lesson as it is now. It must also match the current AI provider, model and settings.See it in the LMS build and the AI assistant need those pieces.
Why it happened
The rebuild job asked for a caption import before it looked for transcript text that was already saved. The manual transcript was there, but the job never reached it.
What I changed
The rebuild job now looks first. It picks a transcript version marked ready. Then it checks that the version has usable text or chunks that are not empty, because a source marked ready can still be empty. If the text is usable, the rebuild goes ahead. So do the jobs that follow it, such as making the study guide. If not, the job still has to get a transcript.
A usable transcript can still be the wrong one. It can belong to a video or file that has since been replaced. So one shared check compares each source made from a video or file with the lesson’s current one. Building a study guide uses this check, and so does searching for the assistant. Both leave out chunks from a replaced video or file. Reusing a manual transcript still does not check that it matches the video.
How I know it works
The June report shows tests for two cases failing and then passing. One reuses a manual transcript. The other has an empty source marked ready. Later tests cover a replaced video or file and its out-of-date chunks. In the empty-source test, the right result is a transcript repair and no study guide. The fix changes the order of the steps and the checks on sources. It does not create a missing transcript.