fix for restore hvp before migrate tested on 3.9 1.10 adn 4-dev

fix for restore hvp before migrate tested on 3.9 1.10 adn 4-dev

by avi cohen -
Number of replies: 0

I used some bad prctice to fix the restore problem  from HVP to H5P, where on restore the context ($context->id) genertated an error.

i changed   mod/hvp/backup/moodle2/restore_hvp_stepslib.php

line 291 >>

  protected function after_execute() {
global $COURSE;
global $USER;
 $usercontext = context_user::instance($USER->id);  
        // Add files for libraries.
        $context = \context_system::instance();
        $this->add_related_files('mod_hvp', 'libraries', null, $usercontext->id);
    }

How should it be done properly.

Thank you

Avi

Average of ratings: -