Error restoring a course

Error restoring a course

by Nico Nimis -
Number of replies: 1
We have installed a Moodle 2.8.5  (Build: 20150310) since we must restore a course backup made with the same Moodle version. Is a clean setup on ubuntu 16.04 with PHP 5.6. The restore process works just fine, but when trying to access the course we have the following:


Warning: require(/var/www/html/moodle/course/format/site/format.php): failed to open stream: No such file or directory in /var/www/html/moodle/course/view.php on line 281

Fatal error: require(): Failed opening required '/var/www/html/moodle/course/format/site/format.php' (include_path='/var/www/html/moodle/lib/zend:/var/www/html/moodle/lib/pear:.:/usr/share/php') in /var/www/html/moodle/course/view.php on line 281


I went through the old Moodle site and there is no 'site' course format (and there is no 'site' folder under course/format). I went through Moodle plugins filtering by course format plugins and I haven't found any format that may match this configuration.

Does anybody knows how to solve it and get the course working? Thanks in advance!

Average of ratings: -
In reply to Nico Nimis

Re: Error restoring a course

by Ken Task -
Picture of Particularly helpful Moodlers

By chance were you trying to restore a 'front page' backup/course ... course ID 1?

Those will not restore the front page but rather as another course, if I re-call correctly.

There is a format called 'site' and it's reserved for the front page ... course ID 1.

Check out the table:

mdl_course_format_options

in the DB for Moodle.   The first three or so rows should show value of 'site' in format column for course ID 1.

'spirit of sharing', Ken