if ($course_to_crsind && !isset($_GET['confirm'])) { GradebookUtils::block_students(); if (!isset($_GET['movecat']) && !isset($_GET['moveeval'])) { die('Error: movecat or moveeval not defined'); } $button = '<form name="confirm" method="post" action="' . api_get_self() . '?confirm=' . (isset($_GET['movecat']) ? '&movecat=' . Security::remove_XSS($_GET['movecat']) : '&moveeval=' . Security::remove_XSS($_GET['moveeval'])) . '&selectcat=' . Security::remove_XSS($_GET['selectcat']) . '&targetcat=' . Security::remove_XSS($_GET['targetcat']) . '"> <input type="submit" value="' . ' ' . get_lang('Ok') . ' ' . '"> </form>'; $warning_message = get_lang('MoveWarning') . '<br><br>' . $button; $filter_warning_msg = false; } //actions on the sortabletable if (isset($_POST['action'])) { GradebookUtils::block_students(); $number_of_selected_items = count($_POST['id']); if ($number_of_selected_items == '0') { $warning_message = get_lang('NoItemsSelected'); $filter_warning_msg = false; } else { switch ($_POST['action']) { case 'deleted': $number_of_deleted_categories = 0; $number_of_deleted_evaluations = 0; $number_of_deleted_links = 0; foreach ($_POST['id'] as $indexstr) { if (api_substr($indexstr, 0, 4) == 'CATE') { $cats = Category::load(api_substr($indexstr, 4)); if ($cats[0] != null) { $cats[0]->delete_all();