Fixing links see BT#6734

1.9.x
Julio Montoya 11 years ago
parent b00b6da013
commit 760d2e3884
  1. 1
      main/calendar/agenda.inc.php
  2. 6
      main/calendar/agenda_js.php
  3. 3
      main/calendar/agenda_list.php

@ -1580,6 +1580,7 @@ function display_courseadmin_links($filter = 0)
$actions = "<a href='agenda_js.php?type=course&".api_get_cidreq()."'>".Display::return_icon('calendar.png', get_lang('Agenda'), '', ICON_SIZE_MEDIUM)."</a>";
}
$actions .= "<a href='agenda_list.php?type=course&".api_get_cidreq()."'>".Display::return_icon('week.png', get_lang('Agenda'), '', ICON_SIZE_MEDIUM)."</a>";
$actions .= "<a href='agenda.php?".api_get_cidreq()."&amp;sort=asc&amp;toolgroup=".api_get_group_id()."&action=add'>".Display::return_icon('new_event.png', get_lang('AgendaAdd'), '', ICON_SIZE_MEDIUM)."</a>";
$actions .= "<a href='agenda.php?".api_get_cidreq()."&action=importical'>".Display::return_icon('import_calendar.png', get_lang('ICalFileImport'), '', ICON_SIZE_MEDIUM)."</a>";
$actions .= $form;

@ -12,7 +12,7 @@ $language_file = array('agenda', 'group', 'announcements');
// use anonymous mode when accessing this course tool
$use_anonymous = true;
//Calendar type
// Calendar type
$type = isset($_REQUEST['type']) && in_array($_REQUEST['type'], array('personal', 'course', 'admin')) ? $_REQUEST['type'] : 'personal';
if ($type == 'personal') {
@ -145,7 +145,9 @@ if (api_is_allowed_to_edit(false, true) OR
$actions = display_courseadmin_links($filter);
}
} else {
$actions = "<a href='agenda_list.php?type=course&".api_get_cidreq()."'>".Display::return_icon('week.png', get_lang('Agenda'), '', ICON_SIZE_MEDIUM)."</a>";
if ($type == 'course') {
$actions = "<a href='agenda_list.php?type=course&".api_get_cidreq()."'>".Display::return_icon('week.png', get_lang('Agenda'), '', ICON_SIZE_MEDIUM)."</a>";
}
}
$tpl->assign('actions', $actions);

@ -24,6 +24,9 @@ $events = $agenda->get_events(null, null, api_get_course_int_id(), api_get_group
$url = api_get_path(WEB_CODE_PATH).'calendar/agenda_list.php?'.api_get_cidreq();
$tpl->assign('url', $url);
$tpl->assign('agenda_events', $events);
$actions = '<a href="'.api_get_path(WEB_CODE_PATH).'calendar/agenda_js.php?type=course&'.api_get_cidreq().'">'.
Display::return_icon('calendar.png', get_lang('Agenda'), '', ICON_SIZE_MEDIUM)."</a>";
$tpl->assign('actions', $actions);
$tpl->assign('is_allowed_to_edit', api_is_allowed_to_edit());
if (api_is_allowed_to_edit()) {

Loading…
Cancel
Save