Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

sulaimanMisri's avatar

Progress Bar based on student learning progress.

Hello there. I would like to ask for a piece of advice on the logic behind the progress bar.

Currently, I need to develop Learning Management System using Laravel 8. I'm not started yet. For every function requested by the client, I think I can do it well.

However, I have a blockage on how student learning progress work.

My idea is like Laracast, students can click to complete, then if there are 100 lessons, they can see their progress such as "10 from 120 lessons completed".

Is that I need to create a table that has the value true/false at the lessons table or what.

Please enlightenment me about this. Thank you for helping :)

0 likes
5 replies
Sinnbeck's avatar

I would personally add a timestamp (video_finished_at) instead of a boolean. You might some day in the future be answer to check if a student just watched the last 2 seconds of all videos, to cheat, and it would be nice to see when they completed each video.

1 like
Tray2's avatar

You most likely need a lesson_student table and you have the total number of lessons then for the student you just need to count the completed lessons.

Something like

$totalLessons = Lesson::count();
$lessonsCompleted = User::find($request->user->id)->lessons->count();
1 like
sulaimanMisri's avatar

@Tray2 I see. I also think to counting the completed lessons. But not thinking about the lesson_student table. Thank you for the suggestion Tray2!

MillyBacker's avatar

Hello there, Im really sorry for bumping old thread. Just searching similar information, can someone help me please?

Please or to participate in this conversation.