Ejemplo n.º 1
0
function delete_group_wikis($groupIdList = 'ALL')
{
    // echo "passed here";
    if (strtoupper($groupIdList) == 'ALL') {
        delete_wiki('ALL');
    } elseif (is_array($groupIdList) && count($groupIdList) > 0) {
        foreach ($groupIdList as $groupId) {
            // echo "passed here";
            delete_wiki($groupId);
        }
    } else {
        delete_wiki($groupIdList);
    }
}
Ejemplo n.º 2
0
                        $userinfo = api_get_user_info($last_row['is_editing']);
                        $is_being_edited = get_lang('ThisPageisBeginEditedBy') . ' <a href=../user/userInfo.php?uInfo=' . $userinfo['user_id'] . '>' . Display::tag('span', $userinfo['complete_name_login_as']) . get_lang('ThisPageisBeginEditedTryLater') . ' ' . date("i", $rest_time) . ' ' . get_lang('MinMinutes') . '';
                        Display::display_normal_message($is_being_edited, false);
                    } else {
                        Display::display_confirmation_message(restore_wikipage($current_row['page_id'], $current_row['reflink'], api_htmlentities($current_row['title']), api_htmlentities($current_row['content']), $current_row['group_id'], $current_row['assignment'], $current_row['progress'], $current_row['version'], $last_row['version'], $current_row['linksto']) . ': <a href="index.php?cidReq=' . $_course['id'] . '&action=showpage&amp;title=' . api_htmlentities(urlencode($last_row['reflink'])) . '&session_id=' . $last_row['session_id'] . '&group_id=' . $last_row['group_id'] . '">' . api_htmlentities($last_row['title']) . '</a>', false);
                    }
                }
            }
        }
    }
}
echo '<div style="overflow:hidden">';
if ($_GET['action'] == 'deletewiki') {
    if (api_is_allowed_to_edit(false, true) || api_is_platform_admin()) {
        if ($_GET['delete'] == 'yes') {
            $return_message = delete_wiki();
            Display::display_confirmation_message($return_message);
        }
    }
}
if ($_GET['action'] == 'discuss' && $_POST['Submit']) {
    Display::display_confirmation_message(get_lang('CommentAdded'));
}
echo '</div>';
/* WIKI WRAPPER */
echo '<div id="wikiwrapper">';
/** Actions bar (= action of the wiki tool, not of the page)**/
//dynamic wiki menu
?>
<script type="text/javascript">
function menu_wiki(){