Exemplo n.º 1
0
     if (!api_is_allowed_to_edit(null, true) && $type == 'course') {
         break;
     }
     $id_list = explode('_', $_REQUEST['id']);
     $id = $id_list[1];
     $agenda->delete_event($id);
     break;
 case 'resize_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->resize_event($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':
     $user_id = isset($_REQUEST['user_id']) ? $_REQUEST['user_id'] : null;
     if (substr($user_id, 0, 1) == 'G') {
         $length = strlen($user_id);