mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-33084 grade: made localize() and unlocalize() in lib/mathslib.php static as they are used as if they were static
This commit is contained in:
parent
4f7f2a8828
commit
8c222e1768
@ -115,7 +115,7 @@ class calc_formula {
|
||||
* @param string $formula
|
||||
* @return string localised formula
|
||||
*/
|
||||
function localize($formula) {
|
||||
public static function localize($formula) {
|
||||
$formula = str_replace('.', '$', $formula); // temp placeholder
|
||||
$formula = str_replace(',', get_string('listsep', 'langconfig'), $formula);
|
||||
$formula = str_replace('$', get_string('decsep', 'langconfig'), $formula);
|
||||
@ -127,7 +127,7 @@ class calc_formula {
|
||||
* @param string $formula localised formula
|
||||
* @return string
|
||||
*/
|
||||
function unlocalize($formula) {
|
||||
public static function unlocalize($formula) {
|
||||
$formula = str_replace(get_string('decsep', 'langconfig'), '$', $formula);
|
||||
$formula = str_replace(get_string('listsep', 'langconfig'), ',', $formula);
|
||||
$formula = str_replace('$', '.', $formula); // temp placeholder
|
||||
|
Loading…
x
Reference in New Issue
Block a user