Issues with restoring a course from 2.4.3+ to 2.5

Issues with restoring a course from 2.4.3+ to 2.5

by Paul Vivian -
Number of replies: 6

Hi All,

I am trying to restore a course that was created in 2.4.3+ into a new system which is running 2.5 (proper release). This is the message I am getting:

Fatal error: Call to undefined function badges_handle_course_deletion() in /home/career48/public_html/elearn/lib/moodlelib.php on line 4728

Just for giggles, I tried another course and its doing the same thing (smaller file size as well, incase it was the file size)

Any words of wisdom would be appreciated

BTW, I love the look of 2.5 and its functions..

Paul

Average of ratings: -
In reply to Paul Vivian

Re: Issues with restoring a course from 2.4.3+ to 2.5

by Jean-Michel Védrine -

Hello,

I just got the same error trying to restore a course from my production 2.4.1+ (build 20130118) to a newly created 2.5 test serveur.

Have you created a tracker issue for that bug ?

 

In reply to Jean-Michel Védrine

Re: Issues with restoring a course from 2.4.3+ to 2.5

by Jean-Michel Védrine -

Hello,

After studying the code, I tested a fix that seems to work

in file lib/moodlelib.php

change the line

function delete_course($courseorid, $showfeedback = true) {
    global $DB;

to:

function delete_course($courseorid, $showfeedback = true) {
    global $DB, $CFG;
    require_once($CFG->libdir . '/badgeslib.php');

But beware that this is just a guess from looking at the code. I am doing this on a test site so I don't mind if something go wrong. And backup/restore and badge aren't the areas of Moodle code that I know best !

If you value your data, maybe it's better to wait for an official fix or statement on the problem.

In reply to Paul Vivian

Re: Issues with restoring a course from 2.4.3+ to 2.5

by Matthew Orlando -

Have you tried disabling badges and then attempting the restore?  I agree it sounds like a bug that should be reported, but this might be a work around.

In reply to Matthew Orlando

Re: Issues with restoring a course from 2.4.3+ to 2.5

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Hi all. There is a tracker issue out already regarding badges backup and restore here /MDL-39558

In reply to Paul Vivian

Re: Issues with restoring a course from 2.4.3+ to 2.5

by Jon Fila -

Not sure if I should create a new thread for this but the topic is relevant to my issue...

I've restored two separate courses from a 2.4.3 site to a 2.5 site and they are not appearing in the category to which they were restored initially. They still exist on the site and in user profiles but do not appear when I click on the category from the main page. Additionally, the teacher of the course is not displayed.

The courses also give this error at the top of the page:

Notice: Undefined variable: forceforcontext in /var/www/moodle/lib/navigationlib.php on line 4082

Can anyone tell me if these things are related and if it is something I should report in the tracker?