当前位置: 首页>>代码示例>>PHP>>正文


PHP Agenda::parseAgendaFilter方法代码示例

本文整理汇总了PHP中Agenda::parseAgendaFilter方法的典型用法代码示例。如果您正苦于以下问题:PHP Agenda::parseAgendaFilter方法的具体用法?PHP Agenda::parseAgendaFilter怎么用?PHP Agenda::parseAgendaFilter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Agenda的用法示例。


在下文中一共展示了Agenda::parseAgendaFilter方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: FormValidator

$tpl->addGlobal('type_label', $type_label);
$tpl->addGlobal('type_event_class', $type_event_class);
// Current user can add event?
$tpl->addGlobal('can_add_events', $can_add_events);
//Setting AJAX caller
if (!empty($userId)) {
    $agenda_ajax_url = api_get_path(WEB_AJAX_PATH) . 'agenda.ajax.php?user_id=' . $userId . '&type=' . $type;
} else {
    $agenda_ajax_url = api_get_path(WEB_AJAX_PATH) . 'agenda.ajax.php?type=' . $type;
}
$tpl->addGlobal('web_agenda_ajax_url', $agenda_ajax_url);
$course_code = api_get_course_id();
//This will fill the select called #users_to_send_id
$form = new FormValidator('form', 'get', null, null, array('id' => 'add_event_form'));
$form->addElement('html', '<div id="visible_to_input">');
$sendTo = $agenda->parseAgendaFilter($userId);
$addOnlyItemsInSendTo = true;
if ($sendTo['everyone']) {
    $addOnlyItemsInSendTo = false;
}
$agenda->showToForm($form, $sendTo, array(), $addOnlyItemsInSendTo);
$form->addElement('html', '</div>');
$form->addElement('html', '<div id="visible_to_read_only" style="display: none">');
$form->addElement('label', get_lang('To'), '<div id="visible_to_read_only_users"></div>');
$form->addElement('html', '</div>');
$form->addElement('label', get_lang('Agenda'), '<div id="color_calendar"></div>');
$form->addElement('label', get_lang('Date'), '<span id="start_date"></span><span id="end_date"></span>');
$form->addElement('text', 'title', get_lang('Title'), array('id' => 'title'));
$form->addElement('textarea', 'content', get_lang('Description'), array('id' => 'content'));
if ($agenda->type == 'course') {
    $form->addElement('html', '<div id="add_as_announcement_div" style="display: none">');
开发者ID:ragebat,项目名称:chamilo-lms,代码行数:31,代码来源:agenda_js.php

示例2: explode

     $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;
 case 'get_user_agenda':
     //Used in the admin user list
     api_protect_admin_script();
     if (api_is_allowed_to_edit(null, true)) {
         //@todo move this in the agenda class
开发者ID:jloguercio,项目名称:chamilo-lms,代码行数:31,代码来源:agenda.ajax.php


注:本文中的Agenda::parseAgendaFilter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。