|
|
|
@ -13,21 +13,23 @@ class DisplayGradebook |
|
|
|
|
$status=CourseManager::get_user_in_course_status(api_get_user_id(), api_get_course_id()); |
|
|
|
|
if (api_is_allowed_to_edit(null, true)) { |
|
|
|
|
$header = '<div class="actions">'; |
|
|
|
|
$header .= '<a href="'.Security::remove_XSS($_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'),'','32').'</a>'; |
|
|
|
|
if ($evalobj->get_course_code() == null) { |
|
|
|
|
//Disabling code when course code is null see issue #2705 |
|
|
|
|
//$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>'; |
|
|
|
|
} elseif (!$evalobj->has_results()) { |
|
|
|
|
$header .= '<a href="gradebook_add_result.php?selectcat=' . $selectcat . '&selecteval=' . $evalobj->get_id() . '"><img src="../img/filenew.gif" alt="' . get_lang('AddResult') . '" align="absmiddle"/> ' . get_lang('AddResult') . '</a>'; |
|
|
|
|
} |
|
|
|
|
$header .= '<a href="' . api_get_self() . '?&selecteval=' . $evalobj->get_id() . '&import="><img src="../img/import_data.gif" border="0" alt="" />' . ' ' . get_lang('ImportResult') . '</a>'; |
|
|
|
|
$header .= '<a href="' . api_get_self() . '?&selecteval=' . $evalobj->get_id() . '&import="> |
|
|
|
|
'.Display::return_icon('import_evaluation.png',get_lang('ImportResult'),'','32') . '</a>'; |
|
|
|
|
if ($evalobj->has_results()) { |
|
|
|
|
$header .= '<a href="' . api_get_self() . '?&selecteval=' . $evalobj->get_id() . '&export="><img src="../img/file_pdf.gif" border="0" alt="" />' . ' ' . get_lang('ExportResult') . '</a>'; |
|
|
|
|
$header .= '<a href="gradebook_edit_result.php?selecteval=' . $evalobj->get_id() .'"><img src="../img/edit.gif" alt="' . get_lang('EditResult') . '" align="absmiddle" /> ' . get_lang('EditResult') . '</a>'; |
|
|
|
|
$header .= '<a href="' . api_get_self() . '?&selecteval=' . $evalobj->get_id() . '&deleteall=" onclick="return confirmationall();"><img src="../img/delete.gif" border="0" alt="" />' . ' ' . get_lang('DeleteResult') . '</a>'; |
|
|
|
|
$header .= '<a href="' . api_get_self() . '?&selecteval=' . $evalobj->get_id() . '&export=">'.Display::return_icon('export_evaluation.png',get_lang('ExportResult'),'','32') . '</a>'; |
|
|
|
|
$header .= '<a href="gradebook_edit_result.php?selecteval=' . $evalobj->get_id() .'">'.Display::return_icon('edit.png',get_lang('EditResult'),'','32').'</a>'; |
|
|
|
|
|
|
|
|
|
$header .= '<a href="' . api_get_self() . '?&selecteval=' . $evalobj->get_id() . '&deleteall=" onclick="return confirmationall();">'.Display::return_icon('delete.png',get_lang('DeleteResult'),'','32').'</a>'; |
|
|
|
|
} |
|
|
|
|
$header .= '<a href="' . api_get_self() . '?print=&selecteval=' . $evalobj->get_id() . '" target="_blank"><img src="../img/printmgr.gif" alt="' . get_lang('Print') . '" /> ' . get_lang('Print') . '</a>'; |
|
|
|
|
|
|
|
|
|
$header .= '<a href="' . api_get_self() . '?print=&selecteval=' . $evalobj->get_id() . '" target="_blank"> |
|
|
|
|
'.Display::return_icon('printer.png',get_lang('Print'),'','32').'</a>'; |
|
|
|
|
$header .= '</div>'; |
|
|
|
|
} |
|
|
|
|
if ($evalobj->is_visible() == '1') { |
|
|
|
@ -58,12 +60,12 @@ class DisplayGradebook |
|
|
|
|
$evalinfo .= '<br /><i>' . get_lang('NoResultsInEvaluation') . '</i>'; |
|
|
|
|
elseif ($scoredisplay->is_custom() && api_get_self() != '/dokeos/main/gradebook/gradebook_statistics.php') { |
|
|
|
|
if (api_is_allowed_to_edit(null, true)) { |
|
|
|
|
$evalinfo .= '<br /><br /><a href="gradebook_view_result.php?selecteval='.Security::remove_XSS($_GET['selecteval']).'"> '.Display::return_icon(('gradebook_eval_not_empty.gif'),get_lang('ViewResult')) . '</a>'; |
|
|
|
|
$evalinfo .= '<br /><br /><a href="gradebook_view_result.php?selecteval='.Security::remove_XSS($_GET['selecteval']).'"> '.Display::return_icon(('certificate_list.png'),get_lang('ViewResult'),'','32') . '</a>'; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (api_is_allowed_to_edit(null, true)) { |
|
|
|
|
$evalinfo .= '<a href="gradebook_statistics.php?selecteval='.Security::remove_XSS($_GET['selecteval']).'"> '.Display::return_icon(('statistics.gif'),get_lang('ViewStatistics')) . '</a>'; |
|
|
|
|
$evalinfo .= '<a href="gradebook_statistics.php?selecteval='.Security::remove_XSS($_GET['selecteval']).'"> '.Display::return_icon(('statistics.png'),get_lang('ViewStatistics'),'','32').'</a>'; |
|
|
|
|
} |
|
|
|
|
$evalinfo .= '</td><td><img style="float:right; position:relative;" src="../img/tutorial.gif"></img></td></table>'; |
|
|
|
|
|
|
|
|
@ -100,8 +102,8 @@ class DisplayGradebook |
|
|
|
|
$header .= '<td style="vertical-align: top;"><a href="' . api_get_self() . '?selectcat=' . $catobj->get_parent_id() . '"><img src="../img/gradebook.gif" border="0" alt="'.get_lang('Up').'" /></a></td>'; |
|
|
|
|
} |
|
|
|
|
$header .= '<td style="vertical-align: top;">'.$simple_search_form->toHtml().'</td>'; |
|
|
|
|
$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() . '?print=&selectcat=' . $catobj->get_id() . '" target="_blank"><img src="../img/printmgr.gif" alt=' . get_lang('Print') . '/> ' . get_lang('Print') . '</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/icons/32/pdf.png alt=' . get_lang('ExportPDF') . '/> ' . get_lang('ExportPDF') . '</a>'; |
|
|
|
|
$header .= '<td style="vertical-align: top;"><a href="' . api_get_self() . '?print=&selectcat=' . $catobj->get_id() . '" target="_blank"><img src="../img/icons/32/printer.png" alt=' . get_lang('Print') . '/> ' . get_lang('Print') . '</a>'; |
|
|
|
|
$header .= '</td></tr></table>'; |
|
|
|
|
if (!$catobj->get_id() == '0') { |
|
|
|
|
$header .= '<table border="0" cellpadding="5"><tr><td><form name="itemfilter" method="post" action="' . api_get_self() . '?selectcat=' . $catobj->get_id() . '"><input type="checkbox" name="showeval" onclick="document.itemfilter.submit()" ' . (($showeval == '1') ? 'checked' : '') . '>Show Evaluations '; |
|
|
|
@ -121,7 +123,7 @@ class DisplayGradebook |
|
|
|
|
*/ |
|
|
|
|
function display_header_reduce_flatview($catobj, $showeval, $showlink,$simple_search_form) { |
|
|
|
|
$header = '<div class="actions">'; |
|
|
|
|
$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 .= '<a href="'.Security::remove_XSS($_SESSION['gradebook_dest']).'?'.api_get_cidreq().'">'. Display::return_icon('back.png',get_lang('FolderView'),'','32').'</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 |
|
|
|
@ -143,10 +145,10 @@ class DisplayGradebook |
|
|
|
|
echo '<input type="hidden" name="export_format" value="xls">'; |
|
|
|
|
echo '</form>'; |
|
|
|
|
|
|
|
|
|
$header .= '<a href="javascript: void(0);" onclick="javascript: document.form1a.submit();">'.Display::return_icon('csv.gif', get_lang('ExportAsCSV')).' '.get_lang('ExportAsCSV').'</a>'; |
|
|
|
|
$header .= '<span><a " href="javascript: void(0);" onclick="javascript: document.form1b.submit();">'.Display::return_icon('excel.gif', get_lang('ExportAsXLS')).' '.get_lang('ExportAsXLS').'</a></span>'; |
|
|
|
|
$header .= '<a href="' . api_get_self() . '?print=&selectcat=' . $catobj->get_id() . '" target="_blank">'.Display::return_icon('printmgr.gif', get_lang('Print')).' ' . get_lang('Print') . '</a>'; |
|
|
|
|
$header .= '<a href="' . api_get_self() . '?exportpdf=&selectcat=' . $catobj->get_id() . '" >'.Display::return_icon('file_pdf.gif', get_lang('ExportToPDF')).' ' . get_lang('ExportToPDF') . '</a>'; |
|
|
|
|
$header .= '<a href="javascript: void(0);" onclick="javascript: document.form1a.submit();">'.Display::return_icon('export_csv.png', get_lang('ExportAsCSV'),'','32').'</a>'; |
|
|
|
|
$header .= '<span><a " href="javascript: void(0);" onclick="javascript: document.form1b.submit();">'.Display::return_icon('export_excel.png', get_lang('ExportAsXLS'),'','32').'</a></span>'; |
|
|
|
|
$header .= '<a href="' . api_get_self() . '?print=&selectcat=' . $catobj->get_id() . '" target="_blank">'.Display::return_icon('printer.png', get_lang('Print'),'','32').'</a>'; |
|
|
|
|
$header .= '<a href="' . api_get_self() . '?exportpdf=&selectcat=' . $catobj->get_id() . '" >'.Display::return_icon('pdf.png', get_lang('ExportToPDF'),'','32').'</a>'; |
|
|
|
|
|
|
|
|
|
//exportpdf |
|
|
|
|
//<div class="clear"> |
|
|
|
@ -226,7 +228,7 @@ class DisplayGradebook |
|
|
|
|
$header .= '<tr>'; |
|
|
|
|
|
|
|
|
|
if (!$selectcat == '0') { |
|
|
|
|
$header .= '<td style=" "><a href="' . api_get_self() . '?selectcat=' . $catobj->get_parent_id() . '">'.Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('RootCat')).get_lang('BackTo').' '.get_lang('RootCat').'</a></td>'; |
|
|
|
|
$header .= '<td style=" "><a href="' . api_get_self() . '?selectcat=' . $catobj->get_parent_id() . '">'.Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('RootCat'),'','32').'</a></td>'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$header .= '<td style=" ">' . get_lang('CurrentCategory') . '</td>' . |
|
|
|
@ -263,7 +265,7 @@ class DisplayGradebook |
|
|
|
|
//$header .= '<td style="vertical-align: top;"><a href="'.api_get_self().'?'.api_get_cidreq().'&studentoverview=&selectcat=' . $catobj->get_id() . '"><img src="../img/view_list.gif" alt="' . get_lang('FlatView') . '" /> ' . get_lang('FlatView') . '</a>'; |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
$header .= '<td style="vertical-align: top;"><a href="'.api_get_self().'?'.api_get_cidreq().'&studentoverview=&exportpdf=&selectcat=' . $catobj->get_id() . '" target="_blank"><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().'?'.api_get_cidreq().'&studentoverview=&exportpdf=&selectcat=' . $catobj->get_id() . '" target="_blank"><img src="../img/icons/32/.png" alt="' . get_lang('ExportPDF') . '" /> ' . get_lang('ExportPDF') . '</a>'; |
|
|
|
|
} |
|
|
|
|
$header .= '</td></tr>'; |
|
|
|
|
} |
|
|
|
@ -293,28 +295,28 @@ class DisplayGradebook |
|
|
|
|
$my_api_cidreq='cidReq='.$my_category['course_code']; |
|
|
|
|
} |
|
|
|
|
if ($show_add_link && !$message_resource) { |
|
|
|
|
$header .= '<td><a href="gradebook_add_eval.php?'.$my_api_cidreq.'&selectcat=' . $catobj->get_id() . '" >'.Display::return_icon('filenew.gif', get_lang('NewEvaluation')).' ' . get_lang('NewEvaluation') . '</a> '; |
|
|
|
|
$header .= '<td><a href="gradebook_add_eval.php?'.$my_api_cidreq.'&selectcat=' . $catobj->get_id() . '" >'.Display::return_icon('new_evaluation.png', get_lang('NewEvaluation'),'','32').'</a>'; |
|
|
|
|
$cats= Category :: load($selectcat); |
|
|
|
|
if ($cats[0]->get_course_code() != null && !$message_resource) { |
|
|
|
|
//$header .= '<td><a href="gradebook_add_link.php?'.api_get_cidreq().'&selectcat=' . $catobj->get_id() . '"><img src="../img/link.gif" alt="' . get_lang('MakeLink') . '" align="absmiddle" /> ' . get_lang('MakeLink') . '</a>'; |
|
|
|
|
$header .= '<td><a href="gradebook_add_link.php?'.$my_api_cidreq.'&selectcat=' . $catobj->get_id() . '">'.Display::return_icon('link.gif', get_lang('MakeLink')).' ' . get_lang('MakeLink') . '</a> '; |
|
|
|
|
$header .= '<td><a href="gradebook_add_link.php?'.$my_api_cidreq.'&selectcat=' . $catobj->get_id() . '">'.Display::return_icon('link.png', get_lang('MakeLink'),'','32').'</a>'; |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
$header .= '<td><a href="gradebook_add_link_select_course.php?'.$my_api_cidreq.'&selectcat=' . $catobj->get_id() . '">'.Display::return_icon('link.gif', get_lang('MakeLink')).' ' . get_lang('MakeLink') . '</a> '; |
|
|
|
|
$header .= '<td><a href="gradebook_add_link_select_course.php?'.$my_api_cidreq.'&selectcat=' . $catobj->get_id() . '">'.Display::return_icon('link.png', get_lang('MakeLink'),'','32').'</a>'; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!$message_resource) { |
|
|
|
|
$myname=$catobj->shows_all_information_an_category($catobj->get_id()); |
|
|
|
|
$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>'; |
|
|
|
|
$header .= '<td><a href="gradebook_edit_all.php?id_session='.intval($_SESSION['id_session']).'&'.$my_api_cidreq.'&selectcat=' . $catobj->get_id() . '">'.Display::return_icon('percentage.png', get_lang('EditAllWeights'),'','32').'</a>'; |
|
|
|
|
$my_course_id=api_get_course_id(); |
|
|
|
|
$my_file= substr($_SESSION['gradebook_dest'],0,5); |
|
|
|
|
|
|
|
|
|
if (api_is_allowed_to_edit(null, true)) { |
|
|
|
|
$header .= '<td style="vertical-align: top;"><a href="gradebook_scoring_system.php?'.$my_api_cidreq.'&selectcat=' . $catobj->get_id() .'">'.Display::return_icon('acces_tool.gif', get_lang('ScoreEdit')).' ' . get_lang('ScoreEdit') . '</a>'; |
|
|
|
|
$header .= '<td style="vertical-align: top;"><a href="gradebook_flatview.php?'.$my_api_cidreq.'&selectcat=' . $catobj->get_id() . '">'.Display::return_icon('stats_access.gif', get_lang('FlatView')).' ' . get_lang('FlatView') . '</a>'; |
|
|
|
|
$header .= '<td style="vertical-align: top;"><a href="../document/document.php?curdirpath=/certificates&'.$my_api_cidreq.'&origin=gradebook&selectcat=' . $catobj->get_id() . '">'.Display::return_icon('certificate.png', get_lang('AttachCertificate')).' ' . get_lang('AttachCertificate') . '</a>'; |
|
|
|
|
$header .= '<td style="vertical-align: top;"><a href="gradebook_display_certificate.php?'.$my_api_cidreq.'&cat_id='.(int)$_GET['selectcat'].'">'.Display::return_icon('gradebook_eval_not_empty.gif', get_lang('GradebookSeeListOfStudentsCertificates')).' ' . get_lang('GradebookSeeListOfStudentsCertificates') . '</a>'; |
|
|
|
|
$header .= '<td style="vertical-align: top;"><a href="gradebook_scoring_system.php?'.$my_api_cidreq.'&selectcat=' . $catobj->get_id() .'">'.Display::return_icon('settings.png', get_lang('ScoreEdit'),'','32').'</a>'; |
|
|
|
|
$header .= '<td style="vertical-align: top;"><a href="gradebook_flatview.php?'.$my_api_cidreq.'&selectcat=' . $catobj->get_id() . '">'.Display::return_icon('stats.png', get_lang('FlatView'),'','32').'</a>'; |
|
|
|
|
$header .= '<td style="vertical-align: top;"><a href="../document/document.php?curdirpath=/certificates&'.$my_api_cidreq.'&origin=gradebook&selectcat=' . $catobj->get_id() . '">'.Display::return_icon('certificate.png', get_lang('AttachCertificate'),'','32').'</a>'; |
|
|
|
|
$header .= '<td style="vertical-align: top;"><a href="gradebook_display_certificate.php?'.$my_api_cidreq.'&cat_id='.(int)$_GET['selectcat'].'">'.Display::return_icon('certificate_list.png', get_lang('GradebookSeeListOfStudentsCertificates'),'','32').'</a>'; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -348,12 +350,12 @@ class DisplayGradebook |
|
|
|
|
$header = '<div class="actions">'; |
|
|
|
|
|
|
|
|
|
if ($is_course_admin) { |
|
|
|
|
$header .= '<a href="gradebook_flatview.php?'.api_get_cidreq().'&selectcat=' . $catobj->get_id() . '">'.Display::return_icon('stats_access.gif', get_lang('FlatView')).' '. get_lang('FlatView') . '</a>'; |
|
|
|
|
$header .= '<a href="gradebook_scoring_system.php?'.api_get_cidreq().'&selectcat=' . $catobj->get_id() .'">'.Display::return_icon('acces_tool.gif', get_lang('ScoreEdit')).' ' . get_lang('ScoreEdit') . '</a>'; |
|
|
|
|
$header .= '<a href="gradebook_flatview.php?'.api_get_cidreq().'&selectcat=' . $catobj->get_id() . '">'.Display::return_icon('stats.png', get_lang('FlatView'),'','32').'</a>'; |
|
|
|
|
$header .= '<a href="gradebook_scoring_system.php?'.api_get_cidreq().'&selectcat=' . $catobj->get_id() .'">'.Display::return_icon('settings.png', get_lang('ScoreEdit'),'','32').'</a>'; |
|
|
|
|
} elseif (!(isset ($_GET['studentoverview']))) { |
|
|
|
|
$header .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&studentoverview=&selectcat=' . $catobj->get_id() . '">'.Display::return_icon('view_list.gif', get_lang('FlatView')).' ' . get_lang('FlatView') . '</a>'; |
|
|
|
|
} else { |
|
|
|
|
$header .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&studentoverview=&exportpdf=&selectcat=' . $catobj->get_id() . '" target="_blank">'.Display::return_icon('file_pdf.gif', get_lang('ExportPDF')).' ' . get_lang('ExportPDF') . '</a>'; |
|
|
|
|
$header .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&studentoverview=&exportpdf=&selectcat=' . $catobj->get_id() . '" target="_blank">'.Display::return_icon('pdf.png', get_lang('ExportPDF'),'','32').'</a>'; |
|
|
|
|
} |
|
|
|
|
$header.='</div>'; |
|
|
|
|
echo $header; |
|
|
|
|