The progress bar seems to us to be a very interresting tool so that we decided, more than one year ago to make progress bar a default block that is present in all new course (Default blocks present in new courses are defined in the config.php file).
So that today, most of our courses have a progress bar present but it is not often configurated.
We first of all tried to suppress all non configured progress bars, but it supposed us to touch to many moodle tables and especially to understand the tricky Moodle context functionning.
We finally had the idea to convert all non configured progress bar to non configured completion progress bars.
It suppose to have activated the Completion progress plugin.
To make things clear for users, we renamed the progress bar block as "Progression (obsolete)" through language customization.
Here is the SQL request that converts non configured progress bars in non configured completion progress bars (our Moodle tables are prefixed with the "mdl_" string) :
UPDATE `mdl_block_instances`We had a look at the possibility to convert programmatically progress bars to completion progress bars but it is actually not possible.
WHERE(`configdata`='') AND (`blockname`='progress')
In completion progress bar, the use of activities achievement conditions is mandatory while it is optionnal in progress bar.
The conversion has therefore to be proceeded manually.
As far as few courses use actually the progress bar, we decided to have a target communication toward these courses teachers.
Here is the SQL request to have the list of courses where progress bar is configured (our Moodle tables are prefixed with the "mdl_" string):
SELECT DISTINCT `mdl_course`.id, `mdl_course`.category, `mdl_course_categories`.name, `mdl_course`.fullname, `mdl_course`.shortname,And here is the SQL request to have the list of teachers in courses with configured progress bar (our Moodle tables are prefixed with the "mdl_" string) :
JOIN `mdl_block_instances` ON `mdl_block_instances`.parentcontextid=`mdl_context`.id JOIN `mdl_course_categories` ON `mdl_course`.category=`mdl_course_categories`.id WHERE (`mdl_block_instances`.blockname = 'progress') AND (`mdl_block_instances`.configdata != '')
SELECT DISTINCT `mdl_user`.id, `mdl_user`.firstname, `mdl_user`.lastname,`mdl_user`.department,`mdl_user`.email FROM `mdl_user` JOIN `mdl_user_enrolments` ON `mdl_user_enrolments`.userid=`mdl_user`.id JOIN `mdl_enrol` ON `mdl_enrol`.id=`mdl_user_enrolments`.enrolid JOIN `mdl_context` ON `mdl_context`.instanceid=`mdl_enrol`.courseid JOIN `mdl_role_assignments` ON(`mdl_role_assignments`.contextid=`mdl_context`.id) AND(`mdl_role_assignments`.userid=`mdl_user`.id) JOIN `mdl_block_instances` ON `mdl_block_instances`.parentcontextid=`mdl_context`.id WHERE (`mdl_block_instances`.blockname = 'progress') AND (`mdl_block_instances`.configdata != '') AND (`mdl_role_assignments`.roleid=3)These requests are quite complicated and I would appreciate if any Moodle database specialist could validate it.
Results seems coherent for our Moodle but we have 173 progress bar instances in our Moodle, in 144 courses implying 207 teachers so that it is difficult to have a full verification.
Our plan is now to make a small video explaining the difference between the old and the new progress bar.
This video will be send to targeted teachers and we hope the change will progressively operate.
If any of you has an other idea on how to face this changing, do not hesitate to reply