Migrate content from mod_hvp to mod_h5pactivity

Admin tools ::: tool_migratehvp2h5p
Maintained by Moodle HQ, Ferran Recio Calderó, Sara 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:
884 sites
629 downloads
19 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

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

Comments RSS

Show comments
  • 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".
  • 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!
  • 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.
  • 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.
  • 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
  • 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
  • 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
  • Fri, Dec 4, 2020, 6:24 PM
    Hi Sara:
    Done
  • 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
  • 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
  • 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.
  • 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
  • Thu, May 6, 2021, 9:34 PM
    Hi,
    A question before using the Bug tracker.

    mod_h5pactivity - 2020061500
    mod_hvp -1.22.2 - 2021043000
    tool_migratehvp2h5p - 0.1.4 - 2021020400
    Moodle 3.9.1 (Build: 20200713)

    There are no errors while the conversion process is running.
    But there are some problems in the course where the activies where located - whatever option is used in the 'Should these contents be added to the content bank?' selector - when clicking on a converted activity I got o blank page (mod/h5pactivity/view.php?id=XXX). By the way, when trying to add a new activity I get now the same problem - blank page (/modedit.php?add=h5pactivity&type=&course=XXX&section=XXX&return=0&sr=0) - this does not happen in a course where activities were not converted.
    Anybody got the same problem?
    Cp




  • Mon, May 10, 2021, 3:34 PM
    Hi Cedric!
    I suggest you report this in the H5P forum (https://moodle.org/mod/forum/view.php?id=8603) to check if there are more people facing this smile
1 2
Please login to post comments