start:overrides
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| start:overrides [2026/02/08 19:20] – [Core patchs] admin | start:overrides [2026/03/26 16:08] (Version actuelle) – [Tracking patches and customscriptings needs in plugin design] admin | ||
|---|---|---|---|
| Ligne 16: | Ligne 16: | ||
| < | < | ||
| + | |||
| + | The impact unit should be not far from some Energy measurement. | ||
| It can be modelized roughly as a function of increasing factors: Number of maintenance operations - Nop, complexitxy of operations - Xop, and probably an organisational factor that increases when both number and complexity grows. Organisational factor can include f.e. an increasing of the number of actors in the operations and the loss in coordination. | It can be modelized roughly as a function of increasing factors: Number of maintenance operations - Nop, complexitxy of operations - Xop, and probably an organisational factor that increases when both number and complexity grows. Organisational factor can include f.e. an increasing of the number of actors in the operations and the loss in coordination. | ||
| Ligne 23: | Ligne 25: | ||
| Now we can address the notion of " | Now we can address the notion of " | ||
| + | Now let propose a structural definition of the Trouble: | ||
| + | |||
| + | < | ||
| + | |||
| + | Let's explain now... | ||
| + | |||
| + | The trouble raises when the Technical Impact raises. We just add a k constant factor to adjust units and scales. | ||
| + | |||
| + | Oppositely, the trouble decreases when the "gain in process" | ||
| ====Customcripts==== | ====Customcripts==== | ||
| + | |||
| + | Customscripts are a " | ||
| + | |||
| + | By defining a directory (often ''/ | ||
| + | |||
| + | | ||
| + | |||
| + | In your config file, then any request to a php script say: '' | ||
| + | |||
| + | Customscripts MUST NOT include '' | ||
| + | |||
| + | By ending the customscript by a '' | ||
| + | |||
| + | Customscripts MUST NOT redefine classes, functions or any " | ||
| + | |||
| + | ===Good cases=== | ||
| + | |||
| + | Customscripts work fine when the change is very superficial, | ||
| + | |||
| + | ===Less good cases=== | ||
| + | |||
| + | When the change is deeper, customscripting will force you to deroute deeper calls to derouted APIs, so the code path may need a lot of work to reach the changing point. | ||
| + | |||
| + | Too complicated derouting will lead to replacing a LOT of standard code. As the standard code is occulted in your Moodle, it will not reveal upgrades or bugfixes, so your replaced code will diverge slowly from moodle standard state of the art. this can be problematic. | ||
| ====Core patchs==== | ====Core patchs==== | ||
| + | Core patchs are the last extremity of overriding core code. All moodle developers are conscious that patching **IS BAD**, but sometime are the only reasonable solution we have to make things work as they //should work//. | ||
| + | |||
| + | Core patches rais a real issu of middle term and long term maintenance, | ||
| + | |||
| + | * **Trivial way (no patchs):** Get the moodle Zip archive, unpack it, copy all other third party plugins in it. check third party compatibility level, and upgrade, and that's it. | ||
| + | * **Non trivial way (some patchs):** Do the some way than trivial **PLUS** report all patchs from the previous code base to the new codebase. | ||
| + | |||
| + | and THIS can be the tough part, specially if: | ||
| + | |||
| + | * Patchs are **not documented** | ||
| + | * Patchs are **not properly tagged** and identified in the code | ||
| + | * There is **no tool** to help the process | ||
| ====Tracking patches and customscriptings needs in plugin design==== | ====Tracking patches and customscriptings needs in plugin design==== | ||
| + | |||
| + | In our plugins, a common structure to self-document and provide out-of-the-band info about moodle alteration we need to get the plugin run correctly is given as '< | ||
| + | |||
| + | * **< | ||
| + | * **< | ||
| + | * **< | ||
| + | |||
| + | ===What happens if several plugins need patching/ | ||
| + | |||
| + | This is a more tricky situation that can happen, as we aim to keep the modularity concept of Moodle as clean as possible, which means, many plugin do not have to car another plugin exist, moreover if there is no functional relation between them. | ||
| + | |||
| + | As a consequence, | ||
| + | |||
| + | So it may be possible that assembling several unrelated plugins might need to overload the same core files. | ||
| + | |||
| + | In case of patchs, all patchs are bounded strictly in ''< | ||
| + | |||
| + | In case of customscripts, | ||
| [[: | [[: | ||
start/overrides.1770578419.txt.gz · Dernière modification : de admin
