Пример #1
0
        if (isset($_GET['mod'])) {
            $current_module = $_GET['mod'];
        }
        if (isset($_GET['fct'])) {
            $current_function = $_GET['fct'];
        }
    }
}
$environment->setCurrentContextID($current_context);
$environment->setCurrentModule($current_module);
$environment->setCurrentFunction($current_function);
unset($current_context);
#unset($current_module);
#unset($current_function);
// HTML text area corrections
$_POST = $environment->getTextConverter()->correctPostValuesForTextEditor($_POST);
// set output mode: default is html
if ($environment->getCurrentFunction() == 'index' and $environment->getCurrentModule() == type2Module(CS_MATERIAL_TYPE) or $environment->getCurrentModule() == 'ajax' or $environment->getCurrentModule() == 'scorm') {
    if (!empty($_GET['output'])) {
        $environment->setOutputMode($_GET['output']);
    } elseif (!empty($_POST['output'])) {
        $environment->setOutputMode($_POST['output']);
    }
}
if ($environment->inPortal() or $environment->inServer()) {
    $class_factory->setDesignTo6();
} else {
    $class_factory->setDesignTo7();
}
$server_item = $environment->getServerItem();
if ($server_item->showOutOfService()) {
Пример #2
0
     }
     unset($manager);
     unset($item);
     break;
 case 'annotation':
     include_once 'classes/cs_annotations_manager.php';
     $manager = new cs_annotations_manager($environment);
     $item = $manager->getItem($row['item_id']);
     if (isset($item) and !$item->isNotActivated()) {
         $linked_item = $item->getLinkedItem();
         if (isset($linked_item)) {
             $title = $translator->getMessage('RSS_NEW_ANNOTATION_TITLE', $item->getTitle(), $linked_item->getTitle());
             setFileArray($item);
             #$description = $environment->getTextConverter()->text_as_html_long($environment->getTextConverter()->cleanDataFromTextArea($item->getDescription()));
             #$description = $environment->getTextConverter()->text_as_html_long($item->getDescription());
             $description = $environment->getTextConverter()->textFullHTMLFormatting($item->getDescription());
             $user_item = $item->getModificatorItem();
             if (isset($user_item)) {
                 $fullname = $user_item->getFullName();
                 $email = $user_item->getEmail();
             } else {
                 $fullname = '';
                 $email = '';
             }
             if ($context_item->isCommunityRoom() and isset($user_item)) {
                 if (empty($_GET['hid']) and !$user_item->isVisibleForAll()) {
                     $fullname = $translator->getMessage('COMMON_USER_NOT_VISIBLE');
                     $email = $translator->getMessage('COMMON_USER_NOT_VISIBLE');
                 }
             }
             if (isset($user_item) and !$user_item->isEmailVisible()) {
Пример #3
0
$result_array = array();
echo '<h1>CommSy Cron Jobs</h1>' . LF;
#$result_html .= '<h1>CommSy Cron Jobs</h1>'.LF;
fwrite($file, '<h1>CommSy Cron Jobs</h1>' . LF);
// server
$server_item = $environment->getServerItem();
// server cron jobs must be run AFTER all other portal crons
// portals and rooms
$result_array['portal'] = array();
$portal_id_array = $server_item->getPortalIDArray();
$portal_manager = $environment->getPortalManager();
foreach ($portal_id_array as $portal_id) {
    if (!isset($context_id) or $context_id == $portal_id) {
        // portal
        $portal = $portal_manager->getItem($portal_id);
        fwrite($file, '<h4>' . $environment->getTextConverter()->text_as_html_short($portal->getTitle()) . ' - Portal</h4>' . LF);
        displayCronResults($portal->runCron());
        fwrite($file, '<hr/>' . LF);
        // private rooms
        #$id_array = $portal->getPrivateIDArray();
        $id_array = $portal->getActiveUserPrivateIDArray();
        fwrite($file, '<h4>Private Rooms (' . count($id_array) . ')</h4>' . LF);
        performRoomIDArray($id_array, $portal->getTitle(), true);
        unset($id_array);
        fwrite($file, '<hr/>' . LF);
        // community rooms
        #$id_array = $portal->getCommunityIDArray();
        $id_array = $portal->getActiveCommunityIDArray();
        fwrite($file, '<h4>Community Rooms (' . count($id_array) . ')</h4>' . LF);
        performRoomIDArray($id_array, $portal->getTitle());
        unset($id_array);