Multiple libraries listed, how to delete?

We have the the second to latest H5P Moodle plugin (2018012200) in our Moodle 3.4 environment. I noticed that when I check on the H5P libraries, I see 3 versions of the Course Presentation and Course Presentation Editor listed:
                         
Course Presentation (1.13.0)
Course Presentation (1.14.0)
Course Presentation (1.16.0)
Course Presentation Editor (1.13.0)
Course Presentation Editor (1.14.0)
Course Presentation Editor (1.16.0)                                                                          
          
I also see 3 Interactive Video and 3 Interactive Video Editor:
Interactive Video (1.12.1)                        
Interactive Video (1.13.0)                       
Interactive Video (1.15.0)                       
Interactive Video Editor (1.12.1)                        
Interactive Video Editor (1.13.0)                        
Interactive Video Editor (1.15.0)

Is there any way to remove the old libraries? Our users complained that when they attempt to at the Course Presentation and Interactive Video content types, they see a perpetual "Loading..." message in place of where the editor would sit.

BV52's picture

Hi ckong11,

Can you please try to update the content type cache. If this still does not resolve the issue please provide the following information (tested while the browser is on the "loading" screen)

  1. Any browser console errors
  2. Any PHP errors

-BV52

Thanks for getting back to be BV52. Unfortunately, Updating the content type cache did not work. When I checked my Firebug console, I saw this error pop up:

TypeError: H5P.DragNResize is not a constructor[Learn More] h5peditor.js:372:14

The DragNResize library is installed (version 1.2.5). And I have Moodle debug mode on, but I am not seeing any error messages on the page.

icc's picture

It looks like you may be missing some content type files. You can do the following to "reinstall" content types without losing any content:

1. Put the following in config.php

$CFG->mod_hvp_dev = true;
$CFG->mod_hvp_aggregate_assets = '0';

(remember to remove when you're done)

2. Go to your Moodle's /mod/hvp/library_list.php page. Here there's a form when you can upload the example content file.

3. Now your content should be working again.

Thank you so much icc. I followed the steps, but when I got to the part where I attempted to upload the example content file, I got this message:

"The system was unable to install the Interactive Video component from the package, it requires a newer version of the H5P plugin. This site is currently running version 1.14, whereas the required version is 1.15 or higher. You should consider upgrading and then try again."

Oddly enough, I have two libraries listed for the Interactive Video

Interactive Video (1.13.0)       
Interactive Video (1.15.0)

Is it possible to simply delete the libraries in the Moodle mdl_hvp_libraries table? Or will this wreck things? At the moment, the Interactive Video (1.13.0) does not have anything listed under the Instances or Instance dependencies, but there are two things listed under the Library dependecies for it.

THANKS in advance!!

icc's picture

Currently, I believe there's an issue with deleting old versions. So it's best to just leave them until a proper fix comes. They should not cause any harm.

Regarding the upload message, is there any reason why you haven't upgraded the plugin to the latest version?

I'm working with my developer to update to the latest version of the H5P plugin in Moodle. But would this resolve the multiple libraries issue and missing content type files?

icc's picture

Updating the plugin and then following the instructions to reinstall the content types should fix all the issues unless there is some misconfiguration with your setup.

In the meantime, is there a solution to delete individual libraries?