|
|
|
Issue Links:
|
Relates
|
|
This issue has a non-specific relationship to:
|
|
MDL-13217
Strings in lib/scroll_to_errors.js are hardcoded.
|
|
|
|
|
|
|
|
|
|
|
|
|
Sub-Tasks:
|
All
|
Open
|
|
| Sub-Task Progress: |
|
|
|
No sub-tasks match this view.
|
|
|
|
There are thousands of places in Moodle where we are using the error() function to print out hardcoded strings.
In the long term, we should end with ZERO calls to this function, by using the print_error() on instead.
Here it's one plan that could be good to start handling this migration:
1) Move error() to deprecatelib. Just that. 1.9 and HEAD
2) Make print_error() autonomous so it won't rely on error() code anymore (will cause code duplication, I guess, but better in the long term.) 1.9 and HEAD
3) Under HEAD (not under 19_STABLE because it could be the plague!), in the deprecated error() function, add some DEBUG_DEVELOPER debugging() to inform developers. It will cause a lot of output (pain!)
4) Move all current uses of error(get_string('xxxx')) to a proper use of print_error() 1.9 and HEAD
5) Gradually, start creating error strings and changing error() calls to print_error() ones. Moodle 2.0 should be free of error() calls. HEAD only.
This is the overall plan. I think each step above could be a subtask of this. Please review it with MD. I think it could work (although once we do point 3 HEAD will be horrible until we'll have all the error() uses killed).
Ciao :-)
|
|
Description
|
There are thousands of places in Moodle where we are using the error() function to print out hardcoded strings.
In the long term, we should end with ZERO calls to this function, by using the print_error() on instead.
Here it's one plan that could be good to start handling this migration:
1) Move error() to deprecatelib. Just that. 1.9 and HEAD
2) Make print_error() autonomous so it won't rely on error() code anymore (will cause code duplication, I guess, but better in the long term.) 1.9 and HEAD
3) Under HEAD (not under 19_STABLE because it could be the plague!), in the deprecated error() function, add some DEBUG_DEVELOPER debugging() to inform developers. It will cause a lot of output (pain!)
4) Move all current uses of error(get_string('xxxx')) to a proper use of print_error() 1.9 and HEAD
5) Gradually, start creating error strings and changing error() calls to print_error() ones. Moodle 2.0 should be free of error() calls. HEAD only.
This is the overall plan. I think each step above could be a subtask of this. Please review it with MD. I think it could work (although once we do point 3 HEAD will be horrible until we'll have all the error() uses killed).
Ciao :-) |
Show » |
committed 2 files to 'Moodle CVS' on branch 'MOODLE_19_STABLE' - 01/Apr/08 12:07 PM
committed 1 file to 'Moodle CVS' on branch 'MOODLE_19_STABLE' - 01/Apr/08 02:15 PM
committed 1 file to 'Moodle CVS' - 01/Apr/08 02:19 PM
MDL-14085, Make print_error() autonomous, merged from MOODLE_19_STABLE
|
|
|
committed 1 file to 'Moodle CVS' - 01/Apr/08 02:31 PM
MDL-14085, add debug information to error() function,
|
|
|
committed 3 files to 'Moodle CVS' on branch 'MOODLE_19_STABLE' - 08/Apr/08 09:45 AM
committed 3 files to 'Moodle CVS' - 08/Apr/08 09:51 AM
|