Skip to content
Snippets Groups Projects
Commit 98507d2c authored by Matt Petro's avatar Matt Petro
Browse files

fixed support for moodle2 archives without user data

parent 3f2b120e
No related branches found
No related tags found
No related merge requests found
......@@ -41,7 +41,12 @@ class archive_storagetype_moodle2 extends archive_storagetype_moodle {
throw new Exception("Can't load $xml");
}
} else {
throw new Exception("Can't load $xml");
// users.xml is missing in backups without user information
if ($infotype == 'users') {
$simple = new SimpleXMLElement('<users></users>');
} else {
throw new Exception("Can't load $xml");
}
}
/* Send only desired path in xml */
if($info['path']){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment