@ -13,7 +13,7 @@ class DisplayGradebook
$status=CourseManager::get_user_in_course_status(api_get_user_id(), api_get_course_id());
$status=CourseManager::get_user_in_course_status(api_get_user_id(), api_get_course_id());
if ($shownavbar == '1' & & $status==1) {
if ($shownavbar == '1' & & $status==1) {
$header = '< div class = "actions" > ';
$header = '< div class = "actions" > ';
$header .= '< a href = "'.$_SESSION['gradebook_dest'].'?selectcat=' . $selectcat . '" > '. Display::return_icon(('back.png'),get_lang('FolderView')) . get_lang('FolderView') . '< / a > ';
$header .= '< a href = "'.Security::remove_XSS( $_SESSION['gradebook_dest']) .'?selectcat=' . $selectcat . '" > '. Display::return_icon(('back.png'),get_lang('FolderView')) . get_lang('FolderView') . '< / a > ';
if ($evalobj->get_course_code() == null) {
if ($evalobj->get_course_code() == null) {
$header .= '< a href = "gradebook_add_user.php?selecteval=' . $evalobj->get_id() . '" > < img src = "../img/add_user_big.gif" alt = "' . get_lang('AddStudent') . '" align = "absmiddle" / > ' . get_lang('AddStudent') . '< / a > ';
$header .= '< a href = "gradebook_add_user.php?selecteval=' . $evalobj->get_id() . '" > < img src = "../img/add_user_big.gif" alt = "' . get_lang('AddStudent') . '" align = "absmiddle" / > ' . get_lang('AddStudent') . '< / a > ';
}
}
@ -71,7 +71,7 @@ class DisplayGradebook
*/
*/
function display_header_flatview($catobj, $showeval, $showlink,$simple_search_form) {
function display_header_flatview($catobj, $showeval, $showlink,$simple_search_form) {
$header= '< table border = "0" cellpadding = "5" > ';
$header= '< table border = "0" cellpadding = "5" > ';
$header .= '< td style = "vertical-align: top;" > < a href = "'.$_SESSION['gradebook_dest'].'?selectcat=' . Security::remove_XSS($_GET['selectcat']) . '" > ' . Display::return_icon('gradebook.gif') . get_lang('Gradebook') . '< / a > < / td > ';
$header .= '< td style = "vertical-align: top;" > < a href = "'.Security::remove_XSS( $_SESSION['gradebook_dest']) .'?selectcat=' . Security::remove_XSS($_GET['selectcat']) . '" > ' . Display::return_icon('gradebook.gif') . get_lang('Gradebook') . '< / a > < / td > ';
$header .= '< td style = "vertical-align: top;" > ' . get_lang('FilterCategory') . '< / td > < td style = "vertical-align: top;" > < form name = "selector" > < select name = "selectcat" onchange = "document.selector.submit()" > ';
$header .= '< td style = "vertical-align: top;" > ' . get_lang('FilterCategory') . '< / td > < td style = "vertical-align: top;" > < form name = "selector" > < select name = "selectcat" onchange = "document.selector.submit()" > ';
$cats= Category :: load();
$cats= Category :: load();
$tree= $cats[0]->get_tree();
$tree= $cats[0]->get_tree();
@ -113,7 +113,7 @@ class DisplayGradebook
*/
*/
function display_header_reduce_flatview($catobj, $showeval, $showlink,$simple_search_form) {
function display_header_reduce_flatview($catobj, $showeval, $showlink,$simple_search_form) {
$header = '< div class = "actions" > ';
$header = '< div class = "actions" > ';
$header .= '< a href = "'.$_SESSION['gradebook_dest'].'?'.api_get_cidreq().'" > '. Display::return_icon('back.png',get_lang('FolderView')) . get_lang('FolderView') . '< / a > ';
$header .= '< a href = "'.Security::remove_XSS( $_SESSION['gradebook_dest']) .'?'.api_get_cidreq().'" > '. Display::return_icon('back.png',get_lang('FolderView')) . get_lang('FolderView') . '< / a > ';
// $header .= '< td style = "vertical-align: top;" > < a href = "' . api_get_self() . '?exportpdf=&offset='.Security::remove_XSS($_GET['offset']).'&search=' . Security::remove_XSS($_GET['search']).'&selectcat=' . $catobj->get_id() . '" > < img src = ../img/file_pdf.gif alt = ' . get_lang(' ExportPDF ' ) . ' / > ' . get_lang('ExportPDF') . '< / a > ';
// $header .= '< td style = "vertical-align: top;" > < a href = "' . api_get_self() . '?exportpdf=&offset='.Security::remove_XSS($_GET['offset']).'&search=' . Security::remove_XSS($_GET['search']).'&selectcat=' . $catobj->get_id() . '" > < img src = ../img/file_pdf.gif alt = ' . get_lang(' ExportPDF ' ) . ' / > ' . get_lang('ExportPDF') . '< / a > ';
// this MUST be a GET variable not a POST
// this MUST be a GET variable not a POST
@ -298,7 +298,7 @@ class DisplayGradebook
if ($message_resource===false ) {
if ($message_resource===false ) {
$myname=$catobj->shows_all_information_an_category($catobj->get_id());
$myname=$catobj->shows_all_information_an_category($catobj->get_id());
$header .= '< td > < a href = "gradebook_edit_all.php?id_session='.$_SESSION['id_session'].'&'.$my_api_cidreq.'&selectcat=' . $catobj->get_id() . '" > '.Display::return_icon('statistics.gif', get_lang('EditAllWeights')).' ' . get_lang('EditAllWeights') . '< / a > ';
$header .= '< td > < a href = "gradebook_edit_all.php?id_session='.intval( $_SESSION['id_session']) .'&'.$my_api_cidreq.'&selectcat=' . $catobj->get_id() . '" > '.Display::return_icon('statistics.gif', get_lang('EditAllWeights')).' ' . get_lang('EditAllWeights') . '< / a > ';
$my_course_id=api_get_course_id();
$my_course_id=api_get_course_id();
$my_file= substr($_SESSION['gradebook_dest'],0,5);
$my_file= substr($_SESSION['gradebook_dest'],0,5);
if (($my_file!='index' || $status_user==1) || api_is_platform_admin()) {
if (($my_file!='index' || $status_user==1) || api_is_platform_admin()) {