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


PHP GroupManager::unsubscribe_all_users方法代码示例

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


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

示例1: switch

 */
if (api_is_allowed_to_edit(false, true)) {
    // Post-actions
    if (isset($_POST['action'])) {
        switch ($_POST['action']) {
            case 'delete_selected':
                if (is_array($_POST['group'])) {
                    GroupManager::delete_groups($my_group);
                    Display::addFlash(Display::return_message(get_lang('SelectedGroupsDeleted')));
                    header("Location: {$currentUrl}");
                    exit;
                }
                break;
            case 'empty_selected':
                if (is_array($_POST['group'])) {
                    GroupManager::unsubscribe_all_users($my_group);
                    Display::addFlash(Display::return_message(get_lang('SelectedGroupsEmptied')));
                    header("Location: {$currentUrl}");
                    exit;
                }
                break;
            case 'fill_selected':
                if (is_array($_POST['group'])) {
                    GroupManager::fill_groups($my_group);
                    Display::addFlash(Display::return_message(get_lang('SelectedGroupsFilled')));
                    header("Location: {$currentUrl}");
                    exit;
                }
                break;
        }
    }
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:31,代码来源:group.php

示例2: header

    // Returning to the group area (note: this is inconsistent with the rest of chamilo)
    $cat = GroupManager::get_category_from_group($current_group['id']);
    if (isset($_POST['group_members']) && count($_POST['group_members']) > $max_member && $max_member != GroupManager::MEMBER_PER_GROUP_NO_LIMIT) {
        Display::addFlash(Display::return_message(get_lang('GroupTooMuchMembers'), 'warning'));
        header('Location: group.php?' . api_get_cidreq(true, false));
    } else {
        Display::addFlash(Display::return_message(get_lang('GroupSettingsModified'), 'success'));
        header('Location: group.php?' . api_get_cidreq(true, false) . '&category=' . $cat['id']);
    }
    exit;
}
$action = isset($_GET['action']) ? $_GET['action'] : null;
switch ($action) {
    case 'empty':
        if (api_is_allowed_to_edit(false, true)) {
            GroupManager::unsubscribe_all_users($group_id);
            Display::display_confirmation_message(get_lang('GroupEmptied'));
        }
        break;
}
$defaults = $current_group;
$defaults['group_members'] = $selected_users;
$action = isset($_GET['action']) ? $_GET['action'] : '';
$defaults['action'] = $action;
if (!empty($_GET['keyword']) && !empty($_GET['submit'])) {
    $keyword_name = Security::remove_XSS($_GET['keyword']);
    echo '<br/>' . get_lang('SearchResultsFor') . ' <span style="font-style: italic ;"> ' . $keyword_name . ' </span><br>';
}
Display::display_header($nameTools, 'Group');
$form->setDefaults($defaults);
echo GroupManager::getSettingBar('member');
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:31,代码来源:member_settings.php

示例3: isset

    $values = $form->exportValues();
    if ($values['max_member_no_limit'] == GroupManager::MEMBER_PER_GROUP_NO_LIMIT) {
        $max_member = GroupManager::MEMBER_PER_GROUP_NO_LIMIT;
    } else {
        $max_member = $values['max_member'];
    }
    $self_registration_allowed = isset($values['self_registration_allowed']) ? 1 : 0;
    $self_unregistration_allowed = isset($values['self_unregistration_allowed']) ? 1 : 0;
    GroupManager::set_group_properties($current_group['id'], $values['name'], $values['description'], $max_member, $values['doc_state'], $values['work_state'], $values['calendar_state'], $values['announcements_state'], $values['forum_state'], $values['wiki_state'], $values['chat_state'], $self_registration_allowed, $self_unregistration_allowed);
    // Storing the tutors (we first remove all the tutors and then add only those who were selected)
    GroupManager::unsubscribe_all_tutors($current_group['id']);
    if (isset($_POST['group_tutors']) && count($_POST['group_tutors']) > 0) {
        GroupManager::subscribe_tutors($values['group_tutors'], $current_group['id']);
    }
    // Storing the users (we first remove all users and then add only those who were selected)
    GroupManager::unsubscribe_all_users($current_group['id']);
    if (isset($_POST['group_members']) && count($_POST['group_members']) > 0) {
        GroupManager::subscribe_users($values['group_members'], $current_group['id']);
    }
    // Returning to the group area (note: this is inconsistent with the rest of chamilo)
    $cat = GroupManager::get_category_from_group($current_group['id']);
    if (isset($_POST['group_members']) && count($_POST['group_members']) > $max_member && $max_member != GroupManager::MEMBER_PER_GROUP_NO_LIMIT) {
        Display::addFlash(Display::return_message(get_lang('GroupTooMuchMembers'), 'warning'));
        header('Location: group.php?' . api_get_cidreq(true, false));
    } else {
        Display::addFlash(Display::return_message(get_lang('GroupSettingsModified'), 'success'));
        header('Location: group.php?' . api_get_cidreq(true, false) . '&category=' . $cat['id']);
    }
    exit;
}
$defaults = $current_group;
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:31,代码来源:group_edit.php


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