parent
a9c6a8dceb
commit
f85f4523ca
@ -1,20 +1,25 @@ |
|||||||
<?php |
<?php |
||||||
|
/* For licensing terms, see /license.txt */ |
||||||
|
|
||||||
require_once __DIR__.'/../../../main/inc/global.inc.php'; |
require_once __DIR__.'/../../../main/inc/global.inc.php'; |
||||||
|
|
||||||
|
api_protect_admin_script(); |
||||||
|
|
||||||
$action = isset($_GET['what']) ? $_GET['what'] : ''; |
$action = isset($_GET['what']) ? $_GET['what'] : ''; |
||||||
define('CHAMILO_INTERNAL', true); |
define('CHAMILO_INTERNAL', true); |
||||||
|
|
||||||
$plugin = VChamiloPlugin::create(); |
$plugin = VChamiloPlugin::create(); |
||||||
$thisurl = api_get_path(WEB_PLUGIN_PATH).'vchamilo/views/manage.php'; |
$thisurl = api_get_path(WEB_PLUGIN_PATH).'vchamilo/views/manage.php'; |
||||||
|
|
||||||
api_protect_admin_script(); |
switch ($action) { |
||||||
|
case 'syncthis': |
||||||
if ($action === 'syncthis') { |
|
||||||
$res = include_once api_get_path(SYS_PLUGIN_PATH).'vchamilo/views/syncparams.controller.php'; |
$res = include_once api_get_path(SYS_PLUGIN_PATH).'vchamilo/views/syncparams.controller.php'; |
||||||
if (!$res) { |
if (!$res) { |
||||||
echo '<span class="label label-success">Success</span>'; |
echo '<span class="label label-success">Success</span>'; |
||||||
} else { |
} else { |
||||||
echo '<span class="label label-danger">Failure<br/>'.$errors.'</span>'; |
echo '<span class="label label-danger">Failure<br/>'.$errors.'</span>'; |
||||||
} |
} |
||||||
|
break; |
||||||
} |
} |
||||||
|
|
||||||
|
exit; |
||||||
|
|||||||
Loading…
Reference in new issue