Migrate content from mod_hvp to mod_h5pactivity

Admin tools ::: tool_migratehvp2h5p
Maintained by Picture of Moodle HQMoodle HQ, Picture of Ferran Recio CalderóFerran Recio Calderó, Picture of Sara Arjona TéllezSara Arjona Téllez
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.
Latest release:
370 sites
676 downloads
16 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 behaviour to increase the migration limit, delete/hide the originals hvp or migration only some hvp activities based on their content-type.

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
Screenshot #2
Screenshot #3

Contributors

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

Comments RSS

Show comments
  • 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
  • Me at the Moodle Moot NZ11
    Mon, Nov 30, 2020, 11:53 AM
    Hi smile
    I've just added a discussion post regarding my experience with this plugin, detailing some errors when converting H5P objects (most relating to Branching Scenario)
    https://moodle.org/mod/forum/discuss.php?d=405472#p1671396
    I'm happy to investigate further with plugin maintainers to identify issue and hopefully resolve.
  • Picture of Frans Zwijnenberg
    Mon, Nov 30, 2020, 11:31 PM
    I have the same problem as Peter G (16 jul 2020, 15:01) "Error migration hvp activity with id ##" message.
    I'm using Moodle 3.9.3 (build: 20201109).
    Last update libraries H5P 3/nov/2020
    Version HVP: 2020080400
  • Picture of Sara Arjona Téllez
    Fri, Dec 4, 2020, 12:05 AM
    Hi Ram!
    My apologies for the late reply! :-S
    The issue you mentioned isn't related to this migration tool so I suggest you create an issue in Moodle Tracker: https://docs.moodle.org/dev/Tracker_introduction
  • Picture of Sara Arjona Téllez
    Fri, Dec 4, 2020, 12:11 AM
    Hi Stuart and Frans!
    In order to fix this issue, we need more information, such as replication steps. If you know how to reproduce these errors, could you please create an issue in GitHub tracker: https://github.com/moodlehq/moodle-tool_migratehvp2h5p/issues (preferred option) or share here the details (and I'll create it)? Thanks in advance! smile
  • Picture of Frans Zwijnenberg
    Fri, Dec 4, 2020, 6:24 PM
    Hi Sara:
    Done
  • Picture of Dan Jeffries
    Wed, Dec 30, 2020, 5:25 PM
    Hi. We're looking to migrate content from the previous H5P plugin to this new one. However it would appear that the H5P Content Libraries and and Types are missing.

    I've run the scheduled task but they're still not there. I also don't know where to get the zip file, and ideally I'd rather it was from the scheduled task.

    Can anyone advise on what I might be doing wrong?

    Thanks - Dan
  • Picture of Sara Arjona Téllez
    Fri, Jan 8, 2021, 10:13 PM
    Hi Dan!
    When using this migration tool, the required content-types will be installed automatically (so you don't need to run the scheduled task because the H5P activities will be created and displayed as expected without it).
    If you know how to reproduce the error you're facing, could you please create an issue in GitHub tracker: https://github.com/moodlehq/moodle-tool_migratehvp2h5p/issues (preferred option) or share here the details (and I'll create it)? Thanks in advance! smile
  • Picture of Dan Jeffries
    Fri, Jan 8, 2021, 10:48 PM
    Thanks. So If I do 1 single H5P migration, the whole content library will update? What do I do if I DON'T want to migrate - how do I get the content libraries then? They just don't appear to be there, which wasn't the case with the H5P original plugin.

    Thanks.
  • Picture of Sara Arjona Téllez
    Fri, Jan 8, 2021, 11:04 PM
    Hi Dan!
    If you migrate a single H5P activity, only the content type libraries required for this activity will be "installed" into core using the same versions they had in the mod_hvp activity. You'll be able to see these libraries accessing to "Site administration / H5P / Manage H5P content types" (these are the content-types used for all the H5P features included in core, such as the new H5P activity). From this admin page, you can remove content-type libraries and also upload manually them. When the scheduled task is run, these libraries are downloaded and upgraded automatically (and will magically appear here); otherwise, only libraries uploaded manually by admins or migrated from mod_hvp will be displayed into the "Manage H5P content types" page (/h5p/libraries.php).
    I hope this answers your questions smile
1 2
Please login to post comments