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; }
* 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;
$tool_content .= " </div>\n"; $tool_content .= " </fieldset>\n"; $tool_content .= " </form>\n</div>\n</div>\n</div>\n"; //$tool_content .= "<p>".$app->getLongDescription()."</p>"; } else { $tool_content .= action_bar(array( array('title' => $langBack, 'url' => "index.php", 'icon' => 'fa-reply', 'level' => 'primary-label'))); $tool_content .= "<div class=\"row extapp\">\n<div class='col-xs-12'>\n"; $tool_content .="<table class=\"table-default dataTable no-footer extapp-table\">\n"; $tool_content.="<thead class='list-header'><td>$langExtAppName</td><td>$langExtAppDescription</td></thead>\n"; $tool_content.="\n"; foreach (ExtAppManager::getApps() as $app) { $tool_content .="<tr>\n"; // WARNING!!!! LEAVE THE SIZE OF THE IMAGE TO BE DOUBLE THE SIZE OF THE ACTUAL PNG FILE, TO SUPPORT HDPI DISPLAYS!!!! $tool_content .= "<td style=\"width:90px; padding:0px;\">"; $tool_content .= "<div class=\"text-center\" style=\"padding:10px;\"><a href=\"$urlAppend" . $app->getConfigUrl() . "\"'>"; if ($app->getAppIcon() !== null) { $tool_content .= "<img height=\"50\" width=\"89\" src=\"" . $app->getAppIcon() . "\"/>\n"; } if ($app->isConfigured()){ $app_active = $app->isEnabled() ? "<button type=\"button\" class=\"btn btn-success extapp-status\" data-app=\"" . $app->getName() . "\"> <i class=\"fa fa-toggle-on\"></i> </button>" : "<button type=\"button\" class=\"btn btn-danger extapp-status\" data-app=\"" . $app->getName() . "\"> <i class=\"fa fa-toggle-off\"></i></button>"; } else { $app_active = "<button type=\"button\" class=\"btn btn-default\" data-app=\"" . $app->getName() . "\" data-toggle='modal' data-target='#noSettings'> <i class=\"fa fa-warning\"></i> </button>"; } $tool_content .= $app->getDisplayName() . "</a></div></td>\n"; $tool_content .= "<td class=\"text-muted clearfix\"><div class=\"extapp-dscr-wrapper\">" . $app->getShortDescription() . "</div><div class=\"extapp-controls\"><div class=\"btn-group btn-group-sm\">" . $app_active . "<a href=\"$urlAppend" . $app->getConfigUrl() . "\" class=\"btn btn-primary\"> <i class=\"fa fa-sliders fw\"></i> </a></div></div></td>\n";
protected function getExtApp() { if (!$this->extapp) { $this->extapp = ExtAppManager::getApp($this->getName()); } return $this->extapp; }
/** * * @param string $appname * @return ExtApp */ public static function getApp($appname) { $apps = ExtAppManager::getApps(); return array_key_exists($appname, $apps) ? $apps[$appname] : null; }