Files
Chamilo/plugin/h5p/h5p_plugin.class.php
Xes 73154ae174
Behat tests 1.11.x 🐞 / PHP 7.4 Test on ubuntu-latest (push) Canceled after 0s
PHP-CS-Fixer / composer_install (7.4) (push) Canceled after 0s
Chamilo 1.11.40 (ZIP oficial v1.11.40)
Fuente: https://github.com/chamilo/chamilo-lms/releases/download/v1.11.40/chamilo-1.11.40.zip
sha256: 1cf4bf2cc7bae1ef1a1eff643235db1d552f78ddf4b6dd1e2d2dac9868679439
Snapshot independiente (rama huerfana); diffable vs 1.11.38. vendor incluido.
2026-08-06 17:59:45 +02:00

63 lines
1.5 KiB
PHP

<?php
/* For licensing terms, see /license.txt */
class H5PPlugin extends Plugin
{
public $table = 'plugin_mindmap';
protected function __construct()
{
parent::__construct(
'1.0', 'Damien Renou - Batisseurs Numériques',
[
'tool_enable' => 'boolean',
]
);
}
/**
* @return H5PPlugin|null
*/
public static function create()
{
static $result = null;
return $result ? $result : $result = new self();
}
/**
* Install the structure necessary for the plugin.
*/
public function install()
{
$sql = "CREATE TABLE IF NOT EXISTS plugin_h5p(
id INT NOT NULL AUTO_INCREMENT,
user_id INT,
node_type VARCHAR(155),
url_id INT,
title VARCHAR(255) NOT NULL,
descript VARCHAR(255) NOT NULL,
creation_date VARCHAR(12) NOT NULL,
terms_a VARCHAR(512) NOT NULL,
terms_b VARCHAR(512) NOT NULL,
terms_c VARCHAR(512) NOT NULL,
terms_d VARCHAR(512) NOT NULL,
terms_e VARCHAR(512) NOT NULL,
terms_f VARCHAR(512) NOT NULL,
opt_1 VARCHAR(512) NOT NULL,
opt_2 VARCHAR(512) NOT NULL,
opt_3 VARCHAR(512) NOT NULL,
PRIMARY KEY (id));";
Database::query($sql);
}
/**
* Uninstall the plugin structure.
*/
public function uninstall()
{
$sql = "DROP TABLE IF EXISTS plugin_h5p";
Database::query($sql);
}
}