public static function getAutojudge() { $autojudge = ExtAppManager::getApp('autojudge'); $connector = q(get_config('autojudge_connector')); if(!$connector) { $connector = new AutojudgeDnnaApp(); } else { $connector = new $connector(); } $connector->setEnabled($autojudge->isEnabled()); return $connector; }
protected function getExtApp() { if (!$this->extapp) { $this->extapp = ExtAppManager::getApp($this->getName()); } return $this->extapp; }
* be useful (without any warranty), under the terms of the GNU (General * Public License) as published by the Free Software Foundation. * The full license can be read in "/info/license/license_gpl.txt". * * Contact address: GUnet Asynchronous eLearning Group, * Network Operations Center, University of Athens, * Panepistimiopolis Ilissia, 15784, Athens, Greece * e-mail: info@openeclass.org * ======================================================================== */ require_once 'modules/admin/extconfig/externals.php'; require_once 'modules/admin/extconfig/opendelosapp.php'; require_once 'include/log.php'; $opendelosapp = ExtAppManager::getApp(strtolower(OpenDelosApp::NAME)); function getDelosURL() { global $opendelosapp; return $opendelosapp->getParam(OpenDelosApp::URL)->value(); } function getDelosExtEnabled() { global $opendelosapp; return $opendelosapp->isEnabled(); } function isDelosEnabled() { global $opendelosapp; if ($opendelosapp && getDelosExtEnabled() && getDelosURL()) { return true;
$available_themes = active_subdirs("$webDir/template", 'theme.html'); $appName = isset($_GET['edit'])? $_GET['edit']: null; // Code to be executed with Ajax call when clicking the activate/deactivate button from External App list page if (isset($_POST['state'])) { $newState = $_POST['state'] == 'fa-toggle-on' ? 0 : 1; $appNameAjax = $_POST['appName']; ExtAppManager::getApp($appNameAjax)->setEnabled($newState); echo $newState; exit; } if ($appName) { $app = ExtAppManager::getApp($appName); if (isset($_POST['submit'])) { if ($_POST['submit'] == 'clear') { foreach ($app->getParams() as $param) { $param->setValue(''); $param->persistValue(); } Session::Messages($langFileUpdatedSuccess, 'alert-info'); } else { $result = $app->storeParams(); if ($result) { Session::Messages($result, 'alert-danger'); } else { Session::Messages($langFileUpdatedSuccess, 'alert-success'); }