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

Increase robustness of the task for downloading/upgrading H5P content types in case any of them fails

XMLWordPrintable

    • MOODLE_401_STABLE, MOODLE_402_STABLE, MOODLE_403_STABLE
    • MOODLE_403_STABLE, MOODLE_404_STABLE
    • MDL-81717-403
    • MDL-81717-404
    • MDL-81717-main
    • Hide
      1. In a clean Moodle site, run the following command:

        php admin/cli/scheduled_task.php --execute="core\task\h5p_get_content_types_task"

      2. Verify that the task will be completed without error. (Note: If you see a timeout error, it's related to H5P server connection, you can re-try the task)
      3.  Login as admin and go to Site administration > H5P > Manage H5P content types.
      4. Check most of the content types (more than 5) are displayed.
      Show
      In a clean Moodle site, run the following command: php admin/cli/scheduled_task.php --execute= "core\task\h5p_get_content_types_task" Verify  that the task will be completed without error. (Note: If you see a timeout error, it's related to H5P server connection, you can re-try the task)  Login as admin and go to Site administration > H5P > Manage H5P content types. Check most of the content types (more than 5) are displayed.
    • HQ 2024 Maintenance I2 Mop

      To replicate: Run Download available H5P content types from h5p.org task

      php admin/cli/scheduled_task.php --execute="core\task\h5p_get_content_types_task"

       
      Expected output:

      Execute scheduled task: Download available H5P content types from h5p.org (core\task\h5p_get_content_types_task)
      ... started $time. Current memory use $memoryuse.
      $ntypes new content types installed
      ... used $nqueries dbqueries
      ... used $nseconds seconds
      Scheduled task complete: Download available H5P content types from h5p.org (core\task\h5p_get_content_types_task)

      Actual output:

      Execute scheduled task: Download available H5P content types from h5p.org (core\task\h5p_get_content_types_task)
      ... started $time. Current memory use $memoryuse.Warning: Trying to access array offset on value of type null in /var/www/html/h5p/classes/core.php on line 276

      ... used $nqueries dbqueries
      ... used $nseconds seconds

      Scheduled task failed: Download available H5P content types from h5p.org (core\task\h5p_get_content_types_task),array_key_exists(): Argument #2 ($array) must be of type array, null given

      Backtrace:

      line 277 of /h5p/classes/core.php: call to array_key_exists()

      line 210 of /h5p/classes/core.php: call to core_h5p\core->fetch_content_type()

      line 64 of /lib/classes/task/h5p_get_content_types_task.php: call to core_h5p\core->fetch_latest_content_types()

      line 405 of /lib/classes/cron.php: call to core\task\h5p_get_content_types_task->execute()

      line 198 of /admin/cli/scheduled_task.php: call to core\cron::run_inner_scheduled_task()

       

      Probable cause : naming scheme of the H5P libraries is currently being changed : https://h5p.org/node/1484767

        1. test-scheduled-tasks-1.png
          test-scheduled-tasks-1.png
          435 kB
        2. test-scheduled-task-int-branch-1.png
          test-scheduled-task-int-branch-1.png
          275 kB
        3. test-h5p-content-types-list-1.png
          test-h5p-content-types-list-1.png
          173 kB
        4. modhvp_error.png
          modhvp_error.png
          96 kB
        5. hub-download-column-all-475780.h5p
          5.93 MB
        6. h5pcolumnwrongnumber.png
          h5pcolumnwrongnumber.png
          24 kB
        7. collage-3065.h5p
          672 kB
        8. berries-28-441940.h5p
          8.70 MB

            sarjona Sara Arjona (@sarjona)
            salemsaidi Salem Saidi
            Carlos Escobedo Carlos Escobedo
            Huong Nguyen Huong Nguyen
            David Woloszyn David Woloszyn
            Votes:
            5 Vote for this issue
            Watchers:
            16 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 3 minutes
                4h 3m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.