コード例 #1
0
ファイル: groups.php プロジェクト: annickvdp/Chamilo1.9.10
        }
        //Avoiding my groups
        $join_url = '';
        if (!in_array($id, $my_group_list)) {
            $join_url = '<a class="btn" href="groups.php?id=' . $id . '&action=join&u=' . api_get_user_id(
                ) . '">' . get_lang('JoinGroup') . '</a> ';
        }

        $item_4 = '<div class="box_description_group_actions" >' . $join_url . '</div>';
        $grid_item_2 = $item_0 . $item_1 . $item_2 . $item_3 . $item_4;

        $grid_newest_groups[] = array($grid_item_2);
    }

    // Pop groups
    $results = GroupPortalManager::get_groups_by_popularity(4, false);
    $grid_pop_groups = array();

    if (is_array($results) && count($results) > 0) {
        foreach ($results as $result) {
            $result['name'] = Security::remove_XSS(
                $result['name'],
                STUDENT,
                true
            );
            $result['description'] = Security::remove_XSS(
                $result['description'],
                STUDENT,
                true
            );
            $id = $result['id'];