Quantcast
Channel: Backup and restore
Viewing all articles
Browse latest Browse all 6586

Re: Possible to 'backwards' restore from Moodle 2.7 to 1.9?

$
0
0
by Alex Vanden Bosch.  

It looks like you're onto a winner there; I followed the 'hello world' tutorial and it works perfectly! I think I owe you about a month of my life!

One small question though. This is the hello word code:

<?php

class filter_helloworld extends moodle_text_filter {

    public function filter($text, array $options = array()) {

        return str_replace('world', 'hello world!', $text);

    }

}

?>

So it replaces the string 'world' with 'hello world!', but I have a list of about 400 words to change. How would that go in the coding? Like this?

return str_replace('colour', 'color', $text);

return str_replace('centre', 'center', $text);

return str_replace('metre', 'meter', $text);




Viewing all articles
Browse latest Browse all 6586

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>