component: mod_h5pactivity

## Human readable name of the plugin.
name: H5P activity

## Human readable release number.
release: "0.1.0"

## Plugin version number, e.g. 2016062100. Will be set to current date if left empty.
version: 2020020501

## Required Moodle version, e.g. 2015051100 or "2.9".
requires: "3.9"

## Plugin maturity level. Possible options are MATURIY_ALPHA, MATURITY_BETA,
## MATURITY_RC or MATURIY_STABLE.
maturity: MATURITY_BETA

## Copyright holder(s) of the generated files and classes.
copyright: 2020 Ferran Recio <ferran@moodle.com>, Carlos Escobedo <carlos@moodle.com>

## Features flags can control generation of optional files/code fragments.
features:
    readme: true
    license: true
    settings: true

    ## The db/upgrade.php file will be generated. Upgrade steps are defined in
    ## this file.
    upgrade: true

    ## The file db/upgradelib.php will also be generated.
    ## The upgrade feature will automatically be enabled.
    upgradelib: true

    install: true
    uninstall: true

## Privacy API implementation
privacy:
  haspersonaldata: true
  uselegacypolyfill: false
  meta:
    dbfields:
      auth_test_sometable:
        - username
        - timecreated
        - timemodified
      auth_test_another:
        - email
    subsystems:
      - files

## PHPUnit test classes.
phpunit_tests:
    ## The class will be defined in the file tests/firstclass_test.php
    ## The full class name will be local_test_firstclass_testcase.
    - classname: h5pactivity

mod_features:
    ## Creates the gradebook related functions. Adds FEATURE_GRADE_HAS_GRADE.
    ## The file grade.php is also created.
    gradebook: true

    ## Creates the files API related function.
    ## Adds FEATURE_MOD_INTRO.
    file_area: true

    ## Creates the functions <modulename>_extend_navigation() and
    ## <modulename>_extend_settings_navigation() in lib.php.
    ## navigation: true

    ## Backup the mod plugin.
    backup_moodle2:
        settingslib: true
        backup_elements:
            - name: elt
        restore_elements:
            - name: elt
              path: /path/to/file

## Capabilities defined by the plugin.
capabilities:
    - name: view
      title: View H5P
      captype: view
      contextlevel: CONTEXT_MODULE
      archetypes:
        - role: student
          permission: CAP_ALLOW
        - role: editingteacher
          permission: CAP_ALLOW
      clonepermissionsfrom: moodle/course:view

    - name: addinstance
      title: Add a new H5P
      captype: write
      contextlevel: CONTEXT_COURSE
      archetypes:
        - role: manager
          permission: CAP_ALLOW
        - role: editingteacher
          permission: CAP_ALLOW
      clonepermissionsfrom: moodle/course:manageactivities

## Creates event classes. The first class, located at
## classes/event/first_event.php, will extend the base class
## \core\event\first_event and the second class will be located at
## classes/event/second_event.php.
events:
    - eventname: course_module_viewed
      extends: \core\event\course_module_viewed
    - eventname: course_module_instance_list_viewed
      extends: \core\event\course_module_instance_list_viewed

## Explicitly added strings
lang_strings:

    ## Needed for mod plugins.
    - id: modulename
      text: H5P activity
    - id: modulenameplural
      text: H5P activities
    - id: modulename_help
      text: Use this module to use a H5P compatible content as a course activity.
    - id: modulename_link
      text: mod/scorm/view
    - id: h5pactivityname
      text: H5P
    - id: h5pactivityfieldset
      text: H5P Settings
    - id: h5pactivityname_help
      text: Use this module to use a H5P compatible content as a course activity.
    - id: h5pactivity_help
      text: Use this module to use a H5P compatible content as a course activity.
    - id: pluginadministration
      text: H5P administration
    - id: h5pactivitysettings
      text: Settings
    - id: missingidandcmid
      text: Missing id and cmid
    - id: nonewmodules
      text: No H5P
    - id: view
      text: View

## Explicitly added contents, such as files not covered by the generator logic.
##
## Not yet implemented.
##
#extra:
#  files:
#    - path: mycustomfile.php
#      skel: php
#      description: Explicitly generated PHP file.
