コード例 #1
0
ファイル: autojudgeapp.php プロジェクト: nikosv/openeclass
 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;
 }
コード例 #2
0
ファイル: clouddrive.php プロジェクト: nikosv/openeclass
 protected function getExtApp() {
     if (!$this->extapp) {
         $this->extapp = ExtAppManager::getApp($this->getName());
     }
     return $this->extapp;
 }
コード例 #3
0
ファイル: delos_functions.php プロジェクト: nikosv/openeclass
 * 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;
コード例 #4
0
ファイル: extapp.php プロジェクト: nikosv/openeclass
$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');
        }