-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
3.11.1
-
None
-
MOODLE_311_STABLE
Hello,
I would like to extend the progress class (completion/classes/progress.php) that currently calculates the progress based on the number of completed activities.
I would like to introduce the concept of duration for each activity and once the activity is done it could calculate the percentage of progress based on that value.
Example:
activity1: duration 10 (Done)
activity2: duration 3 (To be Done)
Currently, the progress percentage is 50%, instead, it should be 10 / (10+3) = 76% since the duration of the first activity is longer.
Is there any possibility to extend this feature using a local plugin? How should I name the class and where should I place it inside the plugin folder?
I have already added a custom field to hold the duration value for each activity and directly modified the progress.php file but I would like to produce a clean solution, by writing a local plugin.
If you consider this feature as a candidate improvement to be included in the core I would be happy to contribute and to receive suggestions on how to include it.
Thank you,
Albana