assign('month_names', json_encode($months)); $tpl->assign('month_names_short', json_encode($months_short)); $tpl->assign('day_names', json_encode($days)); $tpl->assign('day_names_short', json_encode($day_short)); $tpl->assign('button_text', json_encode(array( 'today' => get_lang('Today'), 'month' => get_lang('Month'), 'week' => get_lang('Week'), 'day' => get_lang('Day')))); //Calendar Type : course, admin, personal $tpl->assign('type', $type); //Calendar type label $tpl->assign('type_label', get_lang($type.'Calendar')); //Current user can add event? $tpl->assign('can_add_events', $can_add_events); //Setting AJAX caller $agenda_ajax_url = api_get_path(WEB_AJAX_PATH).'agenda.ajax.php?type='.$type.'&'; $tpl->assign('web_agenda_ajax_url', $agenda_ajax_url); $course_code = api_get_course_id(); if (api_is_allowed_to_edit() && $course_code != '-1') { $user_list = CourseManager::get_user_list_from_course_code(api_get_course_id()); $group_list = CourseManager::get_group_list_of_course(api_get_course_id(), api_get_session_id()); $agenda = new Agenda(); $select = $agenda->construct_not_selected_select_form($group_list, $user_list, 'everyone'); $tpl->assign('visible_to', $select); } //Loading Agenda template $content = $tpl->fetch('default/agenda/month.tpl'); $tpl->assign('content', $content); //Loading main Chamilo 1 col template $tpl->display_one_col_template();