Admin tools: Migrate content from mod_hvp to mod_h5pactivity

tool_migratehvp2h5p
Maintained by Picture of Moodle HQMoodle HQ, Picture of Ferran Recio CalderóFerran Recio Calderó
Moodle plugin allowing to migrate activities created with the mod_hvp plugin created by Joubel to the new mod_h5pactivity created by Moodle HQ since Moodle 3.9.
152 sites
368 downloads
7 fans
Current versions available: 1

Moodle plugin allowing to migrate activities created with the mod_hvp plugin created by Joubel to the new mod_h5pactivity created by Moodle HQ since Moodle 3.9.

How to use this tool

There are two ways to execute the activity migration:

  • Web interface: site administration -> Migrate content from mod_hvp to mod_h5pactivity
  • CLI via terminal: php admin/tool/migratehvp2h5p/cli/migrate.php --execute

Migrations tool will scan for non migrated hvp activities and will create as many H5P activities as needed.

By default, the CLI method will only migrate up to 100 hvp activities per execution and will keep the originals hvp in the courses. Use the option "--help" to know the CLI params to change this behavior to increase the migration limit or delete/hide the originals hvp.

The tool will only migrate each hvp once. In case you need to re-migrate an hvp, just remove or rename the migrated h5p activity, this way the tool won't detect the hvp as migrated.

Screenshots

Screenshot #0
Screenshot #1

Contributors

Picture of Moodle HQ
Moodle HQ (Lead maintainer)
Picture of Ferran Recio Calderó
Ferran Recio Calderó
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Plugins bot
    Fri, Jun 19, 2020, 6:20 PM
    Approval issue created: CONTRIB-8130
  • Picture of Rex Lorenzo
    Thu, Jul 9, 2020, 3:52 AM
    If we convert a module that had results like the H5P questionnaire would it bring over the responses and we can view the results in the new activity?
  • Picture of Mario G. Almonte Moreno
    Tue, Jul 14, 2020, 2:04 AM
    Hi,

    I've found an error when I try to access to site administration -> Migrate content from mod_hvp to mod_h5pactivity
    ---
    Table 'md_database.mdl_grade_items' doesn't exist
    SELECT COUNT(*)
    FROM grade_grades gg
    JOIN mdl_grade_items gi ON gi.id = gg.itemid AND gi.iteminstance = ?
    AND gi.courseid = ? AND gi.itemtype = 'mod' AND gi.itemmodule = 'hvp'
    [array (
    0 => '3',
    1 => '6',
    )]
    Error code: dmlreadexception
    ---------
  • Picture of Peter G
    Thu, Jul 16, 2020, 3:01 PM
    It's not working for me either, though unfortunately I'm getting only a very minimal "Error migration hvp ctivity with id ##" message. Command line also fails without error message.
  • Picture of Ferran Recio Calderó
    Thu, Jul 16, 2020, 9:31 PM
    A new version of the plugin is realeased correcting some minor bugs and adding more accurate error messages in case of exception.

    We found the migration could not be executed on older versions of mod_hvp. Now the minimum HVP version is specified in the version.php file. Please, update your mod_hvp plugin before executing the migration tool.
  • Picture of Osvaldo Canato
    Tue, Jul 21, 2020, 10:35 PM
    Hi, Ferran!

    Just to report that even using the new version 2020050100 the migration is not working well in moodle 3.9.1. and h5p 2020020500.

    I say not working well because it works in some few cases but in general results in this error message: "Error migration hvp activity with id 4: Can't find data record in database table context".
  • Picture of Osvaldo Canato
    Wed, Jul 22, 2020, 4:31 AM
    I’m glad to inform that in my case the Eric Merrill commits posted in bug tracker solved the problem!
  • Picture of Ferran Recio Calderó
    Fri, Jul 24, 2020, 6:32 PM
    Hi Osvaldo. I just integrate all que pull reuqests from Eric. All the changes will be available in this page soon. Thanks.
  • Picture of Ram Freedman
    Wed, Sep 30, 2020, 4:35 PM
    Hi,
    Will this plugin will solve the error "error/unknown_context_mapping" when attempting to restore a Moodle 3.9 course with H5P activity to a Moodle 3.8.3?

    Steps to reproduce the error:

    Add an h5p activity to a moodle 3.9 course.
    Backup the moodle 3.9 course.
    Restore into a moodle 3.8.3 course.
    The backup will fail with an error/unknown_context_mapping error.

    What can be done?
    Regards,
    Ram
Please login to post comments