by Andrzej Tokarski.
Hi,
The only one case I was changing php file was changing the path to my moodledata on my www server.
Before doing that I was advised on a few forums what to do and how - so I knew what I was doing and it was successful.
I don't think it is a bad idea to open the file to see what sth. looks like if needed. Even if I think I know what I am doing I always have the copy of the file before changing anything, and the copy of the whole system in case I am "lost in translation".
I am almost certain the problem is that the files being restored are being send to the wrong folder or have php restrictions to check the wrong folder, but the case is not in line 157 which seems to be correct (at least is the same as yours).
I didn't change any core in my system except for mentioned above.
If the system itself is correct everything should be OK even with my limited php knowledge, but it isn't. Of course no offense.
Sorry to trouble you my friend, it seems to me that even if there is the solution, it would be too long to explain.
Below I insert info you asked for...always good to know what it looks like, just in case.
Nevertheless, don't bother. I am not going to waste your time for long explanations. I wil manage this way or another.
Just thought it was simple to solve if you know how.
Answers to your questions:
I tried both methods of uploading backup.mbz files
(before that I watched video tutorials how to do it)
but in my moodle neither of uploading methods was successful.
Using picking up file method - the system started thinking and thinking...
unsuccessfully trying to upload the file but nothing happened.
Using dropping method - the file was uploaded and unpacked - but after clicking "Restore" - there was an error.
Here is the info after debugging: (but the restoring process failed as before)
error/invalidrestorefile
More information about this error
Debug info:
Error code: invalidrestorefile
$a contents:
Stack trace:
line 225 of \backup\util\ui\restore_ui_stage.class.php: restore_ui_exception thrown
line 80 of \backup\restore.php: call to restore_ui_stage_confirm->process()
And at last - the part of the code according to
moodlecode/backup/util/ui/restore_ui_stage.class.php Line 157:
155 }
156 $item = array('text' => strlen(decbin($stage)).'. '.get_string('restorestage'.$stage, 'backup'),'class' => join(' ', $classes));
157 if ($stage < $currentstage && $currentstage < restore_ui::STAGE_COMPLETE) {
158 //$item['link'] = new moodle_url($PAGE->url, array('restore'=>$this->get_restoreid(), 'stage'=>$stage));
159 }
As you see, line 157 is exactly the same as yours.
Thank you so much for your time and effort.
I learned so much from you, but again I am not going to waste your time.
Best regards, Andrew.