示例#1
0
$display_form = false;
$display_title_list = true;
// Maximum title messages to display
$maximum = '12';
// Length of the titles
$length = '36';
// Database Table Definitions
$tbl_courses = Database::get_main_table(TABLE_MAIN_COURSE);
$tbl_sessions = Database::get_main_table(TABLE_MAIN_SESSION);
$tbl_announcement = Database::get_course_table(TABLE_ANNOUNCEMENT);
$tbl_item_property = Database::get_course_table(TABLE_ITEM_PROPERTY);
$course_id = api_get_course_int_id();
$_course = api_get_course_info_by_id($course_id);
$group_id = api_get_group_id();
$sessionId = api_get_session_id();
api_protect_course_group(GroupManager::GROUP_TOOL_ANNOUNCEMENT);
/*	Tracking	*/
Event::event_access_tool(TOOL_ANNOUNCEMENT);
$announcement_id = isset($_GET['id']) ? intval($_GET['id']) : null;
$origin = isset($_GET['origin']) ? Security::remove_XSS($_GET['origin']) : null;
$action = isset($_GET['action']) ? Security::remove_XSS($_GET['action']) : 'list';
$announcement_number = AnnouncementManager::getNumberAnnouncements();
$homeUrl = api_get_self() . '?action=list&' . api_get_cidreq();
$content = '';
$searchFormToString = '';
switch ($action) {
    case 'move':
        /* Move announcement up/down */
        if (!empty($_GET['down'])) {
            $thisAnnouncementId = intval($_GET['down']);
            $sortDirection = "DESC";
示例#2
0
if ($action == 'upload_form') {
    $display_upload_form = true;
}
/*	Header */
if (!empty($_GET['gradebook']) && $_GET['gradebook'] == 'view') {
    $_SESSION['gradebook'] = Security::remove_XSS($_GET['gradebook']);
    $gradebook = $_SESSION['gradebook'];
} elseif (empty($_GET['gradebook'])) {
    unset($_SESSION['gradebook']);
    $gradebook = '';
}
if (!empty($gradebook) && $gradebook == 'view') {
    $interbreadcrumb[] = array('url' => '../gradebook/' . $_SESSION['gradebook_dest'], 'name' => get_lang('ToolGradebook'));
}
if (!empty($group_id)) {
    api_protect_course_group(GroupManager::GROUP_TOOL_WORK);
    $group_properties = GroupManager::get_group_properties($group_id);
    $interbreadcrumb[] = array('url' => '../group/group.php?' . api_get_cidreq(), 'name' => get_lang('Groups'));
    $interbreadcrumb[] = array('url' => '../group/group_space.php?' . api_get_cidreq(), 'name' => get_lang('GroupSpace') . ' ' . $group_properties['name']);
    $interbreadcrumb[] = array('url' => 'work.php?' . api_get_cidreq(), 'name' => get_lang('StudentPublications'));
    $url_dir = 'work.php?&id=' . $work_id . '&' . api_get_cidreq();
    if (!empty($my_folder_data)) {
        $interbreadcrumb[] = array('url' => $url_dir, 'name' => $my_folder_data['title']);
    }
    if ($action == 'upload_form') {
        $interbreadcrumb[] = array('url' => 'work.php?' . api_get_cidreq(), 'name' => get_lang('UploadADocument'));
    }
    if ($action == 'create_dir') {
        $interbreadcrumb[] = array('url' => 'work.php?' . api_get_cidreq(), 'name' => get_lang('CreateAssignment'));
    }
} else {
示例#3
0
 */
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_CHAT;
$this_section = SECTION_COURSES;
$nameTools = get_lang('ToolChat');
$origin = isset($_GET["origin"]) ? Security::remove_XSS($_GET["origin"]) : null;
$target = isset($_GET["target"]) ? Security::remove_XSS($_GET["target"]) : null;
if ($origin != 'whoisonline') {
    api_protect_course_script(true);
} else {
    $origin = $_SESSION['origin'];
    $target = $_SESSION['target'];
    $_SESSION['origin'] = $origin;
    $_SESSION['target'] = $target;
}
api_protect_course_group(GroupManager::GROUP_TOOL_CHAT, false);
/*  TRACKING */
Event::event_access_tool(TOOL_CHAT);
header('Content-Type: text/html; charset=UTF-8');
/*
 * Choose CSS style (platform's, user's, or course's)
 */
$my_style = api_get_visual_theme();
$mycourseid = api_get_course_id();
if (!empty($mycourseid) && $mycourseid != -1) {
    $open_chat_window = api_get_course_setting('allow_open_chat_window');
}
$courseCode = Security::remove_XSS($_GET['cidReq']);
?>
<!DOCTYPE html>
<html>
示例#4
0
 * 				where xml and other stuff should be added.
 * 2) Define the directory to display
 * 3) Read files and directories from the directory defined in part 2
 * 4) Display all of that on an HTML page
 *
 * @package chamilo.document
 */
//require_once __DIR__.'/../inc/global.inc.php';
$current_course_tool = TOOL_DOCUMENT;
$this_section = SECTION_COURSES;
$to_user_id = null;
$parent_id = null;
$lib_path = api_get_path(LIBRARY_PATH);
$actionsRight = '';
api_protect_course_script(true);
api_protect_course_group(GroupManager::GROUP_TOOL_DOCUMENTS);
DocumentManager::removeGeneratedAudioTempFile();
$row = [];
if (isset($_SESSION['temp_realpath_image']) && !empty($_SESSION['temp_realpath_image']) && file_exists($_SESSION['temp_realpath_image'])) {
    unlink($_SESSION['temp_realpath_image']);
}
$_user = api_get_user_info();
$courseInfo = api_get_course_info();
$course_dir = $courseInfo['directory'] . '/document';
$sys_course_path = api_get_path(SYS_COURSE_PATH);
$base_work_dir = $sys_course_path . $course_dir;
$http_www = api_get_path(WEB_COURSE_PATH) . $courseInfo['directory'] . '/document';
$document_path = $base_work_dir;
$usePpt2lp = api_get_setting('ppt_to_lp.active') == 'true';
$course_dir = $courseInfo['directory'] . '/document';
$sys_course_path = api_get_path(SYS_COURSE_PATH);
示例#5
0
$htmlHeadXtra[] = api_get_css('components/fullcalendar/dist/fullcalendar.min.css');
//$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/qtip2/jquery.qtip.min.css');
if (api_is_platform_admin() && ($type == 'admin' || $type == 'platform')) {
    $type = 'admin';
}
if (isset($_REQUEST['cidReq']) && !empty($_REQUEST['cidReq'])) {
    if ($_REQUEST['cidReq'] == -1) {
        // When is out of the course tool (e.g My agenda)
        header('Location: ' . api_get_self());
        exit;
    } else {
        $type = 'course';
        $this_section = SECTION_COURSES;
    }
}
api_protect_course_group(GroupManager::GROUP_TOOL_CALENDAR);
$agenda = new Agenda();
$agenda->type = $type;
$is_group_tutor = false;
$session_id = api_get_session_id();
$group_id = api_get_group_id();
if (!empty($group_id)) {
    $is_group_tutor = GroupManager::is_tutor_of_group(api_get_user_id(), $group_id);
    $group_properties = GroupManager::get_group_properties($group_id);
    $interbreadcrumb[] = array("url" => api_get_path(WEB_CODE_PATH) . "group/group.php?" . api_get_cidreq(), "name" => get_lang('Groups'));
    $interbreadcrumb[] = array("url" => api_get_path(WEB_CODE_PATH) . "group/group_space.php?" . api_get_cidreq(), "name" => get_lang('GroupSpace') . ' ' . $group_properties['name']);
}
$interbreadcrumb[] = array("url" => '#', "name" => get_lang('Agenda'));
$tpl->addGlobal('use_google_calendar', 0);
$can_add_events = 0;
switch ($type) {