} $day_delta = $_REQUEST['day_delta']; $minute_delta = $_REQUEST['minute_delta']; $id = explode('_', $_REQUEST['id']); $id = $id[1]; $agenda->resizeEvent($id, $day_delta, $minute_delta); break; case 'move_event': if (!api_is_allowed_to_edit(null, true) && $type == 'course') { break; } $day_delta = $_REQUEST['day_delta']; $minute_delta = $_REQUEST['minute_delta']; $id = explode('_', $_REQUEST['id']); $id = $id[1]; $agenda->move_event($id, $day_delta, $minute_delta); break; case 'get_events': $filter = isset($_REQUEST['user_id']) ? $_REQUEST['user_id'] : null; $sessionId = isset($_REQUEST['session_id']) ? $_REQUEST['session_id'] : null; $result = $agenda->parseAgendaFilter($filter); $groupId = current($result['groups']); $userId = current($result['users']); $start = isset($_REQUEST['start']) ? api_strtotime($_REQUEST['start']) : null; $end = isset($_REQUEST['end']) ? api_strtotime($_REQUEST['end']) : null; if ($type == 'personal' && !empty($sessionId)) { $agenda->setSessionId($sessionId); } $events = $agenda->getEvents($start, $end, api_get_course_int_id(), $groupId, $userId); echo $events; break;