Ask A Question

Notifications

You’re not receiving notifications from this thread.

How do i track a course progress?

Jay Kapoor asked in General

Hey Chris,
I have been trying to build a onemonth like sample website.
How do i track the user's progress for each of his course.
Just like onemonth all these courses have multiple episodes, and i would like to display the progress bar indicating the progress made by a user.

Reply

So we use public_activity to track the views and completions of each step. You can complete a step a few times, so to calculate the progress, you count the number of unique steps completed by the user and the total number of published steps in the course and divide those. That's really all there is to it! The public_activity gem makes creating the activity records pretty easy so than all you'll have to do is grab a count after that.

Reply

Can you post a detailed tutorial here on how do achieve this?

Reply

I don't have time to at the moment, but might be able to next week.

Reply

Or even if you can post the steps to achieve the same, that would be quite helpful as well.

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 82,464+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.