08/04/2020
* Change Page Number Display in report
* Certain number of course to display in report
* Dates problem fixing

Add $perpage_record in config.php. Per page record will be display based upon this variable in report.
Add $showcourseids in config.php. Add multiple course ids followed by comma. This variable only allowed result from configure courses.

*Replaced cc.timecompleted with gg.timemodified in query to match output as used in course report block.

29/04/2020
* Once a particular course (identified via course id number) has been completed by a student, then that particular course does not then display in the reporting tool at all again. So basically if there is an Accreditation course that needs to be completed before then a Re-Accreditation course is completed, that initial Accreditation course is not displayed.  This can be more than one course and these are listed in the Config file.
Scenario : 1.Original Course, 2.Re-Cert course 2020, 3.Re-Cert course 2021, 4.Re-Cert course 2022.....etc

We will list these in the config file if you like, and can put them in order as well.

So within the actual Moodle site, once they have finished the first course (1.Original Course) they are then automatically enrolled into the second course (2.Re-Cert course 2020).  Again in Moodle once they finish the second course (2.Re-Cert course 2020), they will then be automatically enrolled into the third course (3.Re-Cert course 2020).  But at the beginning they will only be enrolled in the "Original" course

Students will stay enrolled in these all of these courses within Moodle (so they can reference material when they want) and therefore they will all show up in the Moodle Reporting Tool.

Action : Re-accrediation courses array need to be defined in config.php as key array like below.
$re_accrediation_course = array(2=>8,8=>10,31=>32);
You can define multiple dependent values like 
Module 1 : course 1 has id 2, course 2 has id 4, course 3 has id 5, course 4 has id 7. 
Module 2 : course 5 has id 11, course 6 has id 14, course 7 has id 15
So you can add like array(2=>4,4=>5,5=>7, 11=>14,14=>15); You can add new value like 1=>2:


* List of courses that are selected by default when a user opens the Reporting Tool
Action : Pre selected courses array need to be defined in config.php as normal array like below. You can add new value after comma in array :
$pre_selected_courses = array(2,8);

* Another column to the report called "Certification".  This would show either "Certified until ???" or "Not Certified"
Action : certified courses array need to be defined in config.php as normal array like below. You can add new value after comma in array :
$certified_courses = array(2,8);

* Another search box for "Certification", with three options, "Certified", "Not certified", and "Both"
* An indicator at the top of the Report saying in Green "Your Clinic is currently Accredited" (in GREEN, if they have over 50% students certified) or in Red "Your Clinic is currently NOT Accredited”. It will be visible only to clinic user.

09/05/2020
1. Original course will not display but we need to use "Certified until 2021" things for particular user to his upcoming latest course.
2. Take out the "Date" column.

16/05/2020
* The ability for the "Certified until..." need to stay with a users no matter what course is listed.
* Put back in the Date column

19/05/2020
* please put in a "Temporary" function that shows all users enrolled in the course ID=8 as being "Certified until 2020" please
-We have aligned code in such a way that you only need to update course id in $showcourseids and $pre_selected_courses variables. It will work as you expected.
*  Percentage of students are currently "Certified", and if over a certain percentage (say 50%) of students are currently "Certified" then the words appear next to the Percentage with a Green background and White text "Clinic Accredited", otherwise a Red background and White text of " Clinic not Accredited".

27/05/2020
* Overall Accreditation Indicator for Managers of how their users are doing in all courses, not just individual courses.
set $accredited_display_course = "8,16,17"; in config.php
* Turn off the ability to see "Suspended" users
set $hide_suspended variable in config.php (Option true,false)

09/06/2020
* Get users from database from department and phone1 field. 
* Make changes in moodle DB mdl_user table for phone1 field. Change varchar(20) to varchar(255).
* Make changes in editlib.php in moodle for phone1 field to accept 255 character. 
Add value in phone1 field like "TAFE GC 2019+GX-Wyong"

19/01/2021
* Add $showhiddencourses variable in config.php(Option true,false) and make code adjustment to allow hidden courses to be listed in report. If this is set as false, only visible course will display

10/03/2021
* Add summary view to report. If user select checkbox, he will only receive summary view otherwise user will get full view.
* "Certified until 2021" or "Certified until 2022" be GREEN (CURRENT and FUTURE years), but the PAST years before now, ie "Certified until 2020" or "Certified until 2019" show up as RED (the same RED as "Not Certified" currently is)

08/07/2022
* Fix problem for custom report field related to empty record besides surname.

28/06/2024
* Added functionality for select all courses

04/08/2025
* Replace completion logic form final grade to course completion criteria for moodle 4.4+ instance