$eventNotifier->notifyCourseEvent('anouncement_visible', claro_get_current_course_id(), claro_get_current_tool_id(), $id, claro_get_current_group_id(), '0'); $visibility = 'SHOW'; } if ('mkHide' == $cmd) { $eventNotifier->notifyCourseEvent('anouncement_invisible', claro_get_current_course_id(), claro_get_current_tool_id(), $id, claro_get_current_group_id(), '0'); $visibility = 'HIDE'; } if (announcement_set_item_visibility($id, $visibility)) { $dialogBox->success(get_lang('Visibility modified')); } $autoExportRefresh = true; } // Require new announcement's creation if ('rqCreate' == $cmd) { $subTitle = get_lang('Add announcement'); claro_set_display_mode_available(false); $displayForm = true; $formCmd = 'exCreate'; $announcement = array(); } // Submit announcement if ('exCreate' == $cmd || 'exEdit' == $cmd) { $title = isset($_REQUEST['title']) ? trim($_REQUEST['title']) : ''; $content = isset($_REQUEST['newContent']) ? trim($_REQUEST['newContent']) : ''; $emailOption = isset($_REQUEST['emailOption']) ? (int) $_REQUEST['emailOption'] : 0; $visibility = (int) $_REQUEST['visibility']; // Manage the visibility options if (isset($_REQUEST['visibility']) && $_REQUEST['visibility'] == 1) { if (isset($_REQUEST['enable_visible_from']) && (isset($_REQUEST['visible_from_year']) && isset($_REQUEST['visible_from_month']) && isset($_REQUEST['visible_from_day']))) { $visible_from = $_REQUEST['visible_from_year'] . '-' . $_REQUEST['visible_from_month'] . '-' . $_REQUEST['visible_from_day']; } else {
include_once get_path('incRepositorySys') . '/lib/fileManage.lib.php'; include_once get_path('incRepositorySys') . '/lib/pager.lib.php'; include_once get_path('incRepositorySys') . '/lib/group.lib.inc.php'; $tbl_mdb_names = claro_sql_get_main_tbl(); $tbl_user = $tbl_mdb_names['user']; $tbl_rel_course_user = $tbl_mdb_names['rel_course_user']; $tbl_cdb_names = claro_sql_get_course_tbl(); $tbl_wrk_submission = $tbl_cdb_names['wrk_submission']; $tbl_group_team = $tbl_cdb_names['group_team']; $tbl_group_rel_team_user = $tbl_cdb_names['group_rel_team_user']; $currentUserFirstName = claro_get_current_user_data('firstName'); $currentUserLastName = claro_get_current_user_data('lastName'); // 'step' of pager $usersPerPage = get_conf('usersPerPage', 20); // use viewMode claro_set_display_mode_available(true); /*============================================================================ Basic Variables Definitions ============================================================================*/ $fileAllowedSize = get_conf('max_file_size_per_works'); //file size in bytes (from config file) $maxFilledSpace = get_conf('maxFilledSpace', 100000000); // initialise dialog box to an empty string, all dialog will be concat to it $dialogBox = new DialogBox(); /*============================================================================ Clean informations sent by user ============================================================================*/ unset($req); $acceptedCmdList = array('rqDownload', 'exDownload'); if (isset($_REQUEST['cmd']) && in_array($_REQUEST['cmd'], $acceptedCmdList)) { $cmd = $_REQUEST['cmd'];
* as published by the FREE SOFTWARE FOUNDATION. The GPL is available * through the world-wide-web at http://www.gnu.org/copyleft/gpl.html * @author Frederic Minne <*****@*****.**> * @package Wiki */ $tlabelReq = 'CLWIKI'; require_once "../inc/claro_init_global.inc.php"; if (!claro_is_tool_allowed()) { if (!claro_is_in_a_course()) { claro_disp_auth_form(true); } else { claro_die(get_lang("Not allowed")); } } // display mode claro_set_display_mode_available(TRUE); // check and set user access level for the tool // set admin mode and groupId $is_allowedToAdmin = claro_is_allowed_to_edit(); if (claro_is_in_a_group() && claro_is_group_allowed()) { // group context $groupId = (int) claro_get_current_group_id(); } elseif (claro_is_in_a_group() && !claro_is_group_allowed()) { claro_die(get_lang("Not allowed")); } elseif (claro_is_course_allowed()) { // course context $groupId = 0; } else { claro_disp_auth_form(); } // require wiki files