As the title says, really - is it possible? :/
Possible to 'backwards' restore from Moodle 2.7 to 1.9?
Re: Possible to 'backwards' restore from Moodle 2.7 to 1.9?
I don't think it is, no, I'm afraid. I am not an expert though, so let's see what others think too.
Re: Possible to 'backwards' restore from Moodle 2.7 to 1.9?
No. No backwards compatibility.
Re: Possible to 'backwards' restore from Moodle 2.7 to 1.9?
Both Mary and Emma are correct ... using the Moodle UI's, no.
From command line and a text editor with a great deal of re-editing the xml flies of an un-archived backup of the 2.7 on could acquire some parts but not all. Example: in a 2.x backup, the 'roadmap' for restoring the course contained in a moodle_backup.xml file. A valid 1.9 backup had a similar file called moodle.xml. Now changing the name won't do the trick by itself. One also has to edit the xml file to make it compatible with the 1.9 restore process. For the files contained in the 2.7 course - files.xml and the related 'files' directory for the actual files themselves (by contenthash name - not humanly re-cognizable by filename.ext).
One could NOT get users for sure ... too much has changed in the area of passwords.
It might, however, be possible to get the files that were uploaded to a 2.7 extracted from the backup in 2.7 format, out into an 'extracted' directory by their humanly recognizable file names/types with some work (command line only).
The real question is ... just how important is it to do this ... 2.7 course backwards to a 1.9 ... and how much time one really wants to spend on it.
'spirit of sharing', Ken
Re: Possible to 'backwards' restore from Moodle 2.7 to 1.9?
Thanks for getting back to me, guys!
It sounds like something that I wont be tackling any time soon.
The reason for doing it was I remember in the course back ups in 1.9, the moodle.xml file held all the course information in a, more or less, 'human readable' format.
My current predicament is that I have to find and replace all the British English words in our courses into US English words over many hundreds of pages of content. In Moodle 1.9, I could pull out the xml file and just 'find and replace' and it would change the words throughout the whole course. Now I don't know where to begin with it all!
Re: Possible to 'backwards' restore from Moodle 2.7 to 1.9?
Why not just change the language in the language settings?
Re: Possible to 'backwards' restore from Moodle 2.7 to 1.9?
That just changes the language of Moodle, no? I need to change the language within our content which is made up of various things like lessons and pages.
Re: Possible to 'backwards' restore from Moodle 2.7 to 1.9?
Alex, Part of this will depend on what you mean by 'pages'
Are they files? word/pdf maybe. Or Moodle pages? Or inside Lesson etc? Or are they section details and labels?
Have you pulled apart a backup from 2.x to see how it is constructed?
-Derek
Re: Possible to 'backwards' restore from Moodle 2.7 to 1.9?
Its mainly Moodle pages, but some lessons. It was originally Word docs, but it has been split up and put into various Moodle pages. For example; a subject on Genetics has been split into 7 Moodle topics, each of which has around 5-7 Moodle pages and then a quiz. So one subject may have 50+ pages and there are around 30 subjects.
I have unzipped a backup, but I can't see anything related to the actual content text?
Re: Possible to 'backwards' restore from Moodle 2.7 to 1.9?
How did it go Alex?
Re: Possible to 'backwards' restore from Moodle 2.7 to 1.9?
Sorry for the delayed response, but see above
Re: Possible to 'backwards' restore from Moodle 2.7 to 1.9?
i'd be very tempted to just write a Moodle filter that converted the words on the fly - and install/configure that filter on your US site - that way you don't have to modify any of the content at all.... Probably wouldn't be very hard to create either...
Re: Possible to 'backwards' restore from Moodle 2.7 to 1.9?
That just sounds like magic and witchcraft to me, I'm afraid!
Edit: Just looking at the Moodledocs page on filters and it looks like you could be right! Just going to give it a go now (with my very limited coding abilities, this could all go horribly wrong)
Re: Possible to 'backwards' restore from Moodle 2.7 to 1.9?
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);
Re: Possible to 'backwards' restore from Moodle 2.7 to 1.9?
Why are you deliberately entering misspellings into your text? No wonder kids can't read any more!
Look at the Oxford Dictionary, please!
P.S Webster got it wrong! Ask Stephen Fry, Melvin Bragg et. al.!!!!
Re: Possible to 'backwards' restore from Moodle 2.7 to 1.9?
As a Brit that is now also an American, I can confirm that he is translating not misspelling. I too am bilingual - English and American!!
Re: Possible to 'backwards' restore from Moodle 2.7 to 1.9?
Sadly Emma, our local Murdoch rag ran a front page headline that used the word "jail" instead of the correct "gaol". Unbelievable!!!! Having said that, Webster's dictionary predates OED by more than 60 years, a fact the purists have long lamented. Although Johnson's work predates them all, there were many other English, mostly unreliable and more concerned with the etymology of words, dictionaries before him.
And btw, I was really being sarcastic, or caustic or something there... Every now and again, some serious topic needs a bit of lightening up
Re: Possible to 'backwards' restore from Moodle 2.7 to 1.9?
Re: Possible to 'backwards' restore from Moodle 2.7 to 1.9?
$strings = array();
$strings['colour'] = 'color';
$strings['centre'] = 'center';
foreach ($strings as $string1 => $string2) {
$text = str_replace($string1, $string2, $text);
}
Or you could be "clever" and read the lang/en_us/moodle.php file to load in all your US strings and the lang/en/moodle.php to load in the "proper" strings and then replace all of them.
Of course - because all your text is being parsed by filters this may affect the performance of your server so it's probably worth doing some testing to see how well it performs.
Re: Possible to 'backwards' restore from Moodle 2.7 to 1.9?
Where would I put the code you put in your example above?
I tried this, but it didn't work:
<?php
class filter_helloworld extends moodle_text_filter {
public function filter($strings = array();
$strings['colour'] = 'color';
$strings['centre'] = 'center';) {
foreach ($strings as $string1 => $string2) {
$text = str_replace($string1, $string2, $text);
}
}
?>