Change function names.

1.10.x
Julio Montoya 11 years ago
parent 02c71eb6cc
commit 99714a2d2f
  1. 10
      main/calendar/agenda.php
  2. 2
      main/calendar/agenda_list.php
  3. 2
      main/inc/ajax/agenda.ajax.php

@ -5,7 +5,7 @@
* @package chamilo.calendar * @package chamilo.calendar
*/ */
use \ChamiloSession as Session; use ChamiloSession as Session;
// use anonymous mode when accessing this course tool // use anonymous mode when accessing this course tool
$use_anonymous = true; $use_anonymous = true;
@ -63,7 +63,7 @@ $nameTools = get_lang('Agenda');
Event::event_access_tool(TOOL_CALENDAR_EVENT); Event::event_access_tool(TOOL_CALENDAR_EVENT);
// permission stuff - also used by loading from global in agenda.inc.php // permission stuff - also used by loading from global in agenda.inc.php
$is_allowed_to_edit = api_is_allowed_to_edit(false, true) OR (api_get_course_setting('allow_user_edit_agenda') && !api_is_anonymous()); $is_allowed_to_edit = api_is_allowed_to_edit(false, true) || (api_get_course_setting('allow_user_edit_agenda') && !api_is_anonymous());
$agenda = new Agenda(); $agenda = new Agenda();
$agenda->type = $type; $agenda->type = $type;
$actions = $agenda->displayActions('calendar'); $actions = $agenda->displayActions('calendar');
@ -88,10 +88,10 @@ $agenda->type = $event_type;
$message = null; $message = null;
$content = null; $content = null;
if (api_is_allowed_to_edit(false, true) OR if (api_is_allowed_to_edit(false, true) ||
(api_get_course_setting('allow_user_edit_agenda') && (api_get_course_setting('allow_user_edit_agenda') &&
!api_is_anonymous() && !api_is_anonymous() &&
api_is_allowed_to_session_edit(false, true)) OR api_is_allowed_to_session_edit(false, true)) ||
GroupManager::user_has_access(api_get_user_id(), $group_id, GroupManager::GROUP_TOOL_CALENDAR) && GroupManager::user_has_access(api_get_user_id(), $group_id, GroupManager::GROUP_TOOL_CALENDAR) &&
GroupManager::is_tutor_of_group(api_get_user_id(), $group_id) GroupManager::is_tutor_of_group(api_get_user_id(), $group_id)
) { ) {
@ -239,7 +239,7 @@ if (api_is_allowed_to_edit(false, true) OR
header("Location: $agendaUrl"); header("Location: $agendaUrl");
exit; exit;
} else { } else {
$content = $form->return_form(); $content = $form->returnForm();
} }
break; break;
case 'importical': case 'importical':

@ -14,7 +14,7 @@ $interbreadcrumb[] = array(
$agenda = new Agenda(); $agenda = new Agenda();
$type = isset($_REQUEST['type']) ? $_REQUEST['type'] : null; $type = isset($_REQUEST['type']) ? $_REQUEST['type'] : null;
$agenda->setType($type); $agenda->setType($type);
$events = $agenda->get_events( $events = $agenda->getEvents(
null, null,
null, null,
api_get_course_int_id(), api_get_course_int_id(),

@ -101,7 +101,7 @@ switch ($action) {
$start = isset($_REQUEST['start']) ? api_strtotime($_REQUEST['start']) : null; $start = isset($_REQUEST['start']) ? api_strtotime($_REQUEST['start']) : null;
$end = isset($_REQUEST['end']) ? api_strtotime($_REQUEST['end']) : null; $end = isset($_REQUEST['end']) ? api_strtotime($_REQUEST['end']) : null;
$events = $agenda->get_events( $events = $agenda->getEvents(
$start, $start,
$end, $end,
api_get_course_int_id(), api_get_course_int_id(),

Loading…
Cancel
Save