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.
29 lines
801 B
PHP
29 lines
801 B
PHP
<?php
|
|
/* For license terms, see /license.txt */
|
|
|
|
/**
|
|
* This script initiates a test2pdf plugin.
|
|
*
|
|
* @package chamilo.plugin.test2pdf
|
|
*/
|
|
require_once __DIR__.'/../../vendor/autoload.php';
|
|
|
|
$course_plugin = 'test2pdf'; //needed in order to load the plugin lang variables
|
|
require_once __DIR__.'/config.php';
|
|
|
|
$tool_name = get_lang('Test2pdf');
|
|
|
|
$plugin = Test2pdfPlugin::create();
|
|
$enable = $plugin->get('enable_plugin') == 'true';
|
|
|
|
if ($enable) {
|
|
$url = 'src/view-pdf.php?'.api_get_cidreq();
|
|
header('Location: '.$url);
|
|
exit;
|
|
} else {
|
|
Display::addFlash(Display::return_message($plugin->get_lang('PluginDisabledFromAdminPanel')));
|
|
$url = api_get_path(WEB_PATH).'courses/'.api_get_course_id().'/index.php?id_session='.api_get_session_id();
|
|
header('Location:'.$url);
|
|
exit;
|
|
}
|