Progress Tracker (course format hack)

Progress Tracker (course format hack)

by Jerome Di Pietro -
Number of replies: 11
This progress tracker is a hack of the Topic Course Format. It enables users to keep tabs of their progress through a course by allowing them to tick completed activities.

See demo video: http://bioinf1.sgul.ac.uk/healthinformatics/private/mdl-progress-tracker/

Screenshot of the course listing with tickboxes by each resourceIt is purposefully not a Course Format - instead the page simply lists all the resources for a particular course and displays tickboxes next to each one. Additionally, users with editing privileges (and when in editing mode) can show or hide each tickbox, and/or hide the course page's Section0.

Finally, a config setting allows you to choose whether the Moodle site header is displayed. (default is off).

The zip package also includes code for an HTML page block (page_block_html-snippet.html) that displays a link to the progress tracker page.

Requirements - Javascript must be enabled on the end user's browser.

NB Installation requires new MySql tables to be created – I’ve purposefully not added them to the Moodle database (preferring to keep things separate in case of update issues) but you can just add the tables to the moodle db.

Installation:
unzip attached archive to Moodle root.
Create a new database. I suggest something along the lines of ‘moodle_progress_tracker’ (otherwise change name in config.php)
Alter the database log-in details in /progress/db_functions/config.php

Use /progress/create_tracker_sql_tables.txt
to create the necessary tables

test by going to
http://yoursite.com/moodle/progress/index.php?id=6
where the id variable passed is a valid course id and ‘http://yoursite.com/moodle/’ is the url for the Moodle installation being used to test.

Supplied as is, I hope it's useful to someone.

--
p.s. I personally lack the experience to turn this into a fully fledged Course Format (I find the Moodle developer documentation far too cryptic to work out how to properly integrate this into the official Moodle codebase) but I'd be very happy if someone wanted to adapt my code to create Topic and Weekly formats with this tracking functionality.
Average of ratings: -
In reply to Jerome Di Pietro

Re: Progress Tracker (course format hack)

by Ken Task -
Picture of Particularly helpful Moodlers
First, thanks for sharing. Just a question or two or maybe some clarification.

I've downloaded and installed in a 1.9.7 instance of Moodle on a CentOS box.
All things check out and function with the core Moodle as well as other add-ons.
My DB however is "moodle19" (I've more than one instance of Moodle running on a single server).

If I followed directions, the special url should show a chart as you've shown, however, I get a mysql connection error without any error reference.

Cannot Connect to MySQL. Error:

I created a "moodle_progress_tracker" database and have the correct server (localhost), user and password to access the database.

In the config.php of db_functions subdirectory of the progress directory, it shows these two:

define("sitePrefix", "mdl_"); // Database Tables PREFIX

define("dbTable", "_progress_"); // Database Tables PREFIX

In the actual DB itself, the table names begin with: v1_mdl_progress_
and when using the command line I can see:
mysql> show tables;
+-----------------------------------+
| Tables_in_moodle_progress_tracker |
+-----------------------------------+
| v1_mdl_progress_course_config |
| v1_mdl_progress_resources |
| v1_mdl_progress_user_checks

Am still learning the backend ... deeper and deeper.
I've tried:
define("dbTable", "v1_mdl_progress_"); // Database Tables PREFIX
same error.

I see in opendb.php
if (settings == "local"){
$connect=@mysql_connect(HOSTM, dbUser, dbPassword)
but not sure about "local" nor "HOSTM".

So what am I missing here? :\

Think this is a great tool and I've had some schools that I assist with Moodle ask for such a feature. So am all for it!

Thanks, in advance,
Ken



In reply to Ken Task

Re: Progress Tracker (course format hack)

by Jerome Di Pietro -
Hi Ken,

My apologies - you're not missing anything, you've just inadvertently become a bug tester for my sloppy code.

"if (settings == "local"){" and the other anomalies you found are just left overs from settings I use on my local server - I should have been more careful to remove them from the release version.

I've attached a new v1.1 zip with all the files updated.



Just to clarify re. the database tables:

As you've correctly identified, the original v1.0 text file created the following tables
| v1_mdl_progress_course_config |
| v1_mdl_progress_resources |
| v1_mdl_progress_user_checks


For your set-up, using a database called 'moodle19', the config file would look as follows:

define("HOSTM", "localhost"); // Database HOST
define("dbUser", "USERNAME"); // Database USER
define("dbToUse", "moodle19"); // Database NAME
define("dbPassword", "PASSWORD"); // Database PASSWORD

define("sitePrefix", "vl_"); // Database Tables PREFIX

define("dbTable", "
mdl_progress_"); // Database Tables PREFIX

NB The database tables take the format sitePrefix.dbTable so with the above settings the code makes connections to the following tables: "v1_mdl_progress_course_config", "v1_mdl_progress_resources" and "v1_mdl_progress_user_checks"
But please note that the files in the new zip have done away with the "v1" prefix.



I hope that helps. Let me know how you get on smile
In reply to Jerome Di Pietro

Re: Progress Tracker (course format hack)

by Ken Task -
Picture of Particularly helpful Moodlers
Jerome,
Thanks! Vr. 2 got it.

For others who try this usefull tool, please see the screen movie Jerome created.

Again ... very useful tool for students to keep track of their own progress through out a course. Good work!

Ken

In reply to Ken Task

Re: Progress Tracker (course format hack)

by Jerome Di Pietro -
Great! I'm delighted it's of use.

I made the Progress Tracker after numerous requests from my students - I expect they're not the only ones who have a need for this kind of functionality!

Best wishes,

Jerome
In reply to Jerome Di Pietro

Re: Progress Tracker (course format hack)

by Barry Oosthuizen -
Hi Jerome,

Have you seen MDL-20212? It's a hack of course/lib.php. It displays either a green tick or a red cross and works on topics, weeks and collapsed topics formats (maybe others as well).

Here are the modules it currently supports:

Assignments
Resource
Lesson
HotPot
Quiz
Questionnaire
Quizport
Database
Feedback

Here is the original forum discussion.

Cheers,

Barry
In reply to Barry Oosthuizen

Re: Progress Tracker (course format hack)

by Jerome Di Pietro -
Thanks Barry,

Looks good too - although, as the tracker entry mentions, the feature's now been implemented in Moodle 2.0 so there's probably not too much reason to persevere with the hacks. My version gives me the flexibility I need in the short term and works well for my students.

Thanks for the info though!
In reply to Jerome Di Pietro

Re: Progress Tracker (course format hack)

by Barry Oosthuizen -
You're welcome Jerome, there is also the study calendar course format (with tick boxes next to activities) which I think may be more similar to what you've done. Yes, I agree the hack is not something to consider for Moodle 2.0 as it already has this functionality & more, but until that gets backported to 1.9 (which will still be used for a long time) this is an easy hack (just replace one file) with huge benefits.
In reply to Jerome Di Pietro

Re: Progress Tracker (course format hack)

by Kelly Pryce -
I watched the video and have a question - I was imagining that it would just add a small tick box beside each resource on the course page, but from the video it looks like students would have to click the box on the sidebar to view a reproduction of the course page with the tick boxes, which they can then tick/untick. Is this correct?
In reply to Jerome Di Pietro

Re: Progress Tracker (course format hack)

by Esteban Sánchez -
Hi. Its necessary to install in a diferent database? I have some technical limits in the server. Great hack. Thank you!
In reply to Jerome Di Pietro

Re: Progress Tracker (course format hack)

by jayendra gothi -

m new to moodle and i installed moodle to my pc and when i was adding  a progress tracker module to moodle it is not working properly

i think this is due to version  difference between moodle 2.0 and progress tracker 1.9 i dont know what to do further please help me m begineer to moodle....

i followed all instruction given in v1.p1.txt

but still "Coding error detected, it must be fixed by a programmer: PHP catchable fatal error" comes.....

In reply to Jerome Di Pietro

Re: Progress Tracker (course format hack)

by Dhanabalan c -

Hello Jerome,

Is there any plugins available for Progress tracking for Moodle 2.3 Version?

Please help me

 

Thanks,

Dhanabalan.c