Hotfix release available: 2025-05-14b "Librarian". upgrade now! [56.2] (what's this?)
Hotfix release available: 2025-05-14a "Librarian". upgrade now! [56.1] (what's this?)
New release available: 2025-05-14 "Librarian". upgrade now! [56] (what's this?)
Hotfix release available: 2024-02-06b "Kaos". upgrade now! [55.2] (what's this?)
Hotfix release available: 2024-02-06a "Kaos". upgrade now! [55.1] (what's this?)
New release available: 2024-02-06 "Kaos". upgrade now! [55] (what's this?)
Hotfix release available: 2023-04-04b "Jack Jackrum". upgrade now! [54.2] (what's this?)
Hotfix release available: 2023-04-04a "Jack Jackrum". upgrade now! [54.1] (what's this?)
New release available: 2023-04-04 "Jack Jackrum". upgrade now! [54] (what's this?)
Hotfix release available: 2022-07-31b "Igor". upgrade now! [53.1] (what's this?)
Hotfix release available: 2022-07-31a "Igor". upgrade now! [53] (what's this?)
New release available: 2022-07-31 "Igor". upgrade now! [52.2] (what's this?)
New release candidate 2 available: rc2022-06-26 "Igor". upgrade now! [52.1] (what's this?)
New release candidate available: 2022-06-26 "Igor". upgrade now! [52] (what's this?)
Hotfix release available: 2020-07-29a "Hogfather". upgrade now! [51.4] (what's this?)
New release available: 2020-07-29 "Hogfather". upgrade now! [51.3] (what's this?)
New release candidate 3 available: 2020-06-09 "Hogfather". upgrade now! [51.2] (what's this?)
New release candidate 2 available: 2020-06-01 "Hogfather". upgrade now! [51.1] (what's this?)
New release candidate available: 2020-06-01 "Hogfather". upgrade now! [51] (what's this?)
Hotfix release available: 2018-04-22c "Greebo". upgrade now! [50.3] (what's this?)
Hotfix release available: 2018-04-22b "Greebo". upgrade now! [50.2] (what's this?)
course_progress_tracking

Course Progress Tracking

We should be able to provide detailed tracking on courses. A course contain many contents. At present only quiz has a detailed scoring mechanism. We should be able to give a detailed progress on each content.

Content progress is tracked at the enrollment level as of now. So, when an enrollment is removed the progress also will be lost.

Progress on a document

A document is played using the flex paper viewer. The viewer API provides us with a way to get the total number of pages and the current page the user is viewing. At any time user's progress percentage is obtained by

(largest page number visited / total number of pages)*100.

An event is fired when ever user changes the page. But we do not want to fire an ajax request every time he changes the page because when he scrolls through 100 pages it ends up firing 100 requests. Instead we periodically update his progress every 10 secs.

The progress on the document is tracked with the help of the changes made to the FlexPaperViewer js file present in /public/docviewer.js/flexpaper_htmlui.js.

We need to set 3 js parameters where we include the flexpaper viewer.

1. updateProgress - (true/false) specifies whether we need to send the progress update or not.

2. progressUpdateUrl - The url to which ajax request is sent every 10 secs when some progress is made.

3. progressPercent - The previous progress percentage of this user. This is used for optimization purpose. When it is passed. The ajax requests are sent only after the progress crosses previous progress.

An ajax reuest is sent to progressUpdateUrl with the following params.

1. total_pages - Total number of pages in the document.

2.last_visited_page - The largest page number user visited in last 10 secs.

Progress on a video(uploaded)

Videos uploaded to the system are played using jwplayer. We can score them by the length of the video played at any time. So, percentage progress at any time is

(length of video played/ duration of the video)*100

The progress tracking for videos played by jwplayer is done using jwplayer_progress_updater plugin which can be found in /public/javascripts/jwplayer_progress_updater.js. This can be included in the jwplayer setup as below.

        :javascript
          jwplayer('player').setup({
            id: 'playerId',
            allowscriptaccess: 'always',
            flashplayer: '/jwplayer/player.swf',
            file: "#{content.public_filename}",
            source: '/jwplayer/player.swf',
            plugins : {
              'javascripts/jwplayer_progress_updater.js' : {
                      progress_update_url: '#{update_document_progress_course_path}',
                      progress_percent: #{percentage_score}
              }
            }
          });
          

Options

1. progress_update_url - the url to which the ajax request containing progress information is to be sent. Pass an empty string('') if do not want to send any progress update.

2. progress_percent - It is the progress percent in the previous attempt of the video. This is passed for optimization purpose. When it is passed the ajax requests are sent only after a progress which is higher than this is made. Pass 0 if you do not have any value.

This plugin sends Ajax request for every 10 secs of progress made. The request parameters are

1. video - true (indicates that this is video content)

2. duration - length of the video in seconds.

3. current_position - length of the video played till now in secs.

Progress on a quiz

There would be only one quiz content per course. The quiz is to be completed to say that a user is done with the quiz. There is no partial attempt for a quiz. Tf the quiz is complete then we need to determine

So, When a quiz is completed, the progress is 100%. Otherwise it is 0%.

A weblink can be a simple HTML or an image or a video embedded. The most uniform way to score them is just to track if they are opened or not.

So, progress is 0% as long as it is not launched and 100% as soon as it is launched.

The only exception is for videos which are played using jwplayer. At present we can play youtube and vimeo videos with jwplayer.

They will be tracked similar to how uploaded videos are tracked.

Questions

1. How to track the scores on multiple attempts on a course and on a content ?

We always store the highest progress the user has made in any attempt.

2. User going to the end of the document/video directly -

With our current design we do not store the actual number of pages visited by the user(as they may be large in numbers and we do not want to save all of them now). We only get the largest page visited in every 10 seconds and calculate score based on it. So, if a user directly jumps to the last page he ends up completing the document.

If we want to be more precise on the exact content user has read, we need to save all the pages he visited. But this is not required at the moment. May be the amount of time spent on each document/video will be a good one to track in this case ?

3. What about contents repeating in a course ?

We do support duplicate contents in a course but they are treated as a single content when it comes to scoring them. Once a user is done with the content it is marked as complete even if it repeats.

Table Design

1. Table name - progress_scores

Stores the percentage score of each content of an enrollment.

Column_name type Description
id integer primary key
enrollment_id integer id of the enrolment
content_id integer id of the content(may be document, video or webtext etc.)
attempt integer the number of times user has opened this content
percentage_score integer The score on the latest attempt for an uncompleted content. Completed content value is 100
created_at date_time created date time. The first time the user has opened this content
updated_at date_time updated date time. The last update of the score
course_progress_tracking.txt · Last modified: 2018/08/31 16:16 (external edit)