Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-75427

An empty H5P activity will generate an error

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.11.8
    • None
    • H5P
    • MOODLE_311_STABLE

    Description

      I found this via our monitoring:

      Error: Uncaught exception 'Error' with message 'Call to a member function get_contextid() on bool' in /var/www/html/mod/h5pactivity/view.php:57
      

      It appears that the H5P activity does not have any files associated to it, which causes the following error.

      It looks like this can happen if the following happens:

      1. Create a H5P activity
      2. In administration disable the content type added to the activity
      3. Use the duplicate, import or another backup and restore function to create a new copy of the activity.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              nmagill Neill Magill
              Amaia Anabitarte, Carlos Escobedo, Laurent David, Mikel Martín Corrales, Sabina Abellan, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: