|
|
|
@ -229,7 +229,7 @@ if (isset($_GET['deleteeval'])) { |
|
|
|
|
//parameters for links |
|
|
|
|
if (isset($_GET['visiblelink'])) { |
|
|
|
|
GradebookUtils::block_students(); |
|
|
|
|
if (isset ($_GET['set_visible'])) { |
|
|
|
|
if (isset($_GET['set_visible'])) { |
|
|
|
|
$visibility_command = 1; |
|
|
|
|
} else { |
|
|
|
|
$visibility_command = 0; |
|
|
|
@ -246,7 +246,7 @@ if (isset($_GET['visiblelink'])) { |
|
|
|
|
$filter_confirm_msg = false; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (isset ($_GET['deletelink'])) { |
|
|
|
|
if (isset($_GET['deletelink'])) { |
|
|
|
|
GradebookUtils::block_students(); |
|
|
|
|
//fixing #5229 |
|
|
|
|
if (!empty($_GET['deletelink'])) { |
|
|
|
@ -319,7 +319,7 @@ if (isset($_POST['action'])) { |
|
|
|
|
$confirmation_message = get_lang('DeletedCategories').' : <b>'.$number_of_deleted_categories.'</b><br />'.get_lang('DeletedEvaluations').' : <b>'.$number_of_deleted_evaluations.'</b><br />'.get_lang('DeletedLinks').' : <b>'.$number_of_deleted_links.'</b><br /><br />'.get_lang('TotalItems').' : <b>'.$number_of_selected_items.'</b>'; |
|
|
|
|
$filter_confirm_msg = false; |
|
|
|
|
break; |
|
|
|
|
case 'setvisible' : |
|
|
|
|
case 'setvisible': |
|
|
|
|
foreach ($_POST['id'] as $indexstr) { |
|
|
|
|
if (api_substr($indexstr, 0, 4) == 'CATE') { |
|
|
|
|
$cats = Category:: load(api_substr($indexstr, 4)); |
|
|
|
@ -341,7 +341,7 @@ if (isset($_POST['action'])) { |
|
|
|
|
$confirmation_message = get_lang('ItemsVisible'); |
|
|
|
|
$filter_confirm_msg = false; |
|
|
|
|
break; |
|
|
|
|
case 'setinvisible' : |
|
|
|
|
case 'setinvisible': |
|
|
|
|
foreach ($_POST['id'] as $indexstr) { |
|
|
|
|
if (api_substr($indexstr, 0, 4) == 'CATE') { |
|
|
|
|
$cats = Category:: load(api_substr($indexstr, 4)); |
|
|
|
@ -367,7 +367,7 @@ if (isset($_POST['action'])) { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (isset ($_POST['submit']) && isset ($_POST['keyword'])) { |
|
|
|
|
if (isset($_POST['submit']) && isset($_POST['keyword'])) { |
|
|
|
|
header('Location: '.api_get_self().'?selectcat='.$selectcat |
|
|
|
|
. '&search='.Security::remove_XSS($_POST['keyword'])); |
|
|
|
|
exit; |
|
|
|
@ -382,43 +382,43 @@ if (isset($_GET['evaluationmoved'])) { |
|
|
|
|
if (isset($_GET['linkmoved'])) { |
|
|
|
|
Display::addFlash(Display::return_message(get_lang('LinkMoved'), 'confirmation', false)); |
|
|
|
|
} |
|
|
|
|
if (isset ($_GET['addcat'])) { |
|
|
|
|
if (isset($_GET['addcat'])) { |
|
|
|
|
Display::addFlash(Display::return_message(get_lang('CategoryAdded'), 'confirmation', false)); |
|
|
|
|
} |
|
|
|
|
if (isset ($_GET['linkadded'])) { |
|
|
|
|
if (isset($_GET['linkadded'])) { |
|
|
|
|
Display::addFlash(Display::return_message(get_lang('LinkAdded'), 'confirmation', false)); |
|
|
|
|
} |
|
|
|
|
if (isset ($_GET['addresult'])) { |
|
|
|
|
if (isset($_GET['addresult'])) { |
|
|
|
|
Display::addFlash(Display::return_message(get_lang('ResultAdded'), 'confirmation', false)); |
|
|
|
|
} |
|
|
|
|
if (isset ($_GET['editcat'])) { |
|
|
|
|
if (isset($_GET['editcat'])) { |
|
|
|
|
Display::addFlash(Display::return_message(get_lang('CategoryEdited'), 'confirmation', false)); |
|
|
|
|
} |
|
|
|
|
if (isset ($_GET['editeval'])) { |
|
|
|
|
if (isset($_GET['editeval'])) { |
|
|
|
|
Display::addFlash(Display::return_message(get_lang('EvaluationEdited'), 'confirmation', false)); |
|
|
|
|
} |
|
|
|
|
if (isset ($_GET['linkedited'])) { |
|
|
|
|
if (isset($_GET['linkedited'])) { |
|
|
|
|
Display::addFlash(Display::return_message(get_lang('LinkEdited'), 'confirmation', false)); |
|
|
|
|
} |
|
|
|
|
if (isset ($_GET['nolinkitems'])) { |
|
|
|
|
if (isset($_GET['nolinkitems'])) { |
|
|
|
|
Display::addFlash(Display::return_message(get_lang('NoLinkItems'), 'warning', false)); |
|
|
|
|
} |
|
|
|
|
if (isset ($_GET['addallcat'])) { |
|
|
|
|
if (isset($_GET['addallcat'])) { |
|
|
|
|
Display::addFlash(Display::return_message(get_lang('AddAllCat'), 'normal', false)); |
|
|
|
|
} |
|
|
|
|
if (isset ($confirmation_message)) { |
|
|
|
|
if (isset($confirmation_message)) { |
|
|
|
|
Display::addFlash(Display::return_message($confirmation_message, 'confirmation', $filter_confirm_msg)); |
|
|
|
|
} |
|
|
|
|
if (isset ($warning_message)) { |
|
|
|
|
if (isset($warning_message)) { |
|
|
|
|
Display::addFlash(Display::return_message($warning_message, 'warning', $filter_warning_msg)); |
|
|
|
|
} |
|
|
|
|
if (isset ($move_form)) { |
|
|
|
|
if (isset($move_form)) { |
|
|
|
|
Display::addFlash(Display::return_message($move_form->toHtml(), 'normal', false)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// DISPLAY HEADERS AND MESSAGES - |
|
|
|
|
if (!isset($_GET['exportpdf']) && !isset($_GET['export_certificate'])) { |
|
|
|
|
if (isset ($_GET['studentoverview'])) { |
|
|
|
|
if (isset($_GET['studentoverview'])) { |
|
|
|
|
$interbreadcrumb[] = array( |
|
|
|
|
'url' => $_SESSION['gradebook_dest'].'?selectcat='.$selectcat.'&'.api_get_cidreq(), |
|
|
|
|
'name' => get_lang('ToolGradebook') |
|
|
|
@ -486,15 +486,14 @@ if (!empty($keyword)) { |
|
|
|
|
$alleval = Evaluation::find_evaluations($keyword, $cats[0]->get_id()); |
|
|
|
|
$alllink = LinkFactory::find_links($keyword, $cats[0]->get_id()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} elseif (isset ($_GET['studentoverview'])) { |
|
|
|
|
} elseif (isset($_GET['studentoverview'])) { |
|
|
|
|
//@todo this code seems to be deprecated because the gradebook tab is off |
|
|
|
|
$cats = Category :: load($category); |
|
|
|
|
$stud_id = (api_is_allowed_to_edit() ? null : api_get_user_id()); |
|
|
|
|
$allcat = array(); |
|
|
|
|
$alleval = $cats[0]->get_evaluations($stud_id, true); |
|
|
|
|
$alllink = $cats[0]->get_links($stud_id, true); |
|
|
|
|
if (isset ($_GET['exportpdf'])) { |
|
|
|
|
if (isset($_GET['exportpdf'])) { |
|
|
|
|
$datagen = new GradebookDataGenerator($allcat, $alleval, $alllink); |
|
|
|
|
$header_names = array( |
|
|
|
|
get_lang('Name'), |
|
|
|
@ -587,10 +586,13 @@ $addparams = array('selectcat' => $cats[0]->get_id()); |
|
|
|
|
if (isset($_GET['search'])) { |
|
|
|
|
$addparams['search'] = $keyword; |
|
|
|
|
} |
|
|
|
|
if (isset ($_GET['studentoverview'])) { |
|
|
|
|
if (isset($_GET['studentoverview'])) { |
|
|
|
|
$addparams['studentoverview'] = ''; |
|
|
|
|
} |
|
|
|
|
if (isset($allcat_info) && count($allcat_info) >= 0 && (isset($_GET['selectcat']) && $_GET['selectcat'] == 0) && isset($_GET['search']) && strlen(trim($_GET['search'])) > 0) { |
|
|
|
|
if (isset($allcat_info) && count($allcat_info) >= 0 && |
|
|
|
|
(isset($_GET['selectcat']) && $_GET['selectcat'] == 0) && |
|
|
|
|
isset($_GET['search']) && strlen(trim($_GET['search'])) > 0 |
|
|
|
|
) { |
|
|
|
|
$allcat = $allcat_info; |
|
|
|
|
} else { |
|
|
|
|
$allcat = $allcat; |
|
|
|
@ -602,7 +604,10 @@ $gradebooktable = new GradebookTable( |
|
|
|
|
$alllink, |
|
|
|
|
$addparams |
|
|
|
|
); |
|
|
|
|
if (((empty($allcat)) && (empty ($alleval)) && (empty ($alllink)) && (!$is_platform_admin) && ($is_course_admin) && (!isset($_GET['selectcat']))) && |
|
|
|
|
if (((empty($allcat)) && (empty($alleval)) && (empty ($alllink)) && (!$is_platform_admin) && |
|
|
|
|
($is_course_admin) && |
|
|
|
|
(!isset($_GET['selectcat'])) |
|
|
|
|
) && |
|
|
|
|
api_is_course_tutor() |
|
|
|
|
) { |
|
|
|
|
echo Display::return_message( |
|
|
|
|