|
|
|
@ -201,9 +201,9 @@ function build_edit_icons_cat($cat, $selectcat) { |
|
|
|
|
if ($show_message===false) { |
|
|
|
|
$visibility_icon= ($cat->is_visible() == 0) ? 'invisible' : 'visible'; |
|
|
|
|
$visibility_command= ($cat->is_visible() == 0) ? 'set_visible' : 'set_invisible'; |
|
|
|
|
$modify_icons= '<a href="gradebook_edit_cat.php?editcat='.$cat->get_id().'&cidReq='.$cat->get_course_code().'">'.Display::return_icon('edit.png', get_lang('Modify'),'','22').'</a>'; |
|
|
|
|
$modify_icons= '<a href="gradebook_edit_cat.php?editcat='.$cat->get_id().'&cidReq='.$cat->get_course_code().'">'.Display::return_icon('edit.png', get_lang('Modify'),'',ICON_SIZE_SMALL).'</a>'; |
|
|
|
|
|
|
|
|
|
$modify_icons .= ' <a href="' . api_get_self() . '?visiblecat=' . $cat->get_id() . '&' . $visibility_command . '=&selectcat=' . $selectcat . ' ">'.Display::return_icon($visibility_icon.'.png', get_lang('Visible'),'','22').'</a>'; |
|
|
|
|
$modify_icons .= ' <a href="' . api_get_self() . '?visiblecat=' . $cat->get_id() . '&' . $visibility_command . '=&selectcat=' . $selectcat . ' ">'.Display::return_icon($visibility_icon.'.png', get_lang('Visible'),'',ICON_SIZE_SMALL).'</a>'; |
|
|
|
|
|
|
|
|
|
//no move ability for root categories |
|
|
|
|
if ($cat->is_movable()) { |
|
|
|
@ -213,7 +213,7 @@ function build_edit_icons_cat($cat, $selectcat) { |
|
|
|
|
//$modify_icons .= ' <img src="../img/deplacer_fichier_na.gif" border="0" title="' . get_lang('Move') . '" alt="" />'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$modify_icons .= ' <a href="' . api_get_self() . '?deletecat=' . $cat->get_id() . '&selectcat=' . $selectcat . '&cidReq='.$cat->get_course_code().'" onclick="return confirmation();">'.Display::return_icon('delete.png', get_lang('DeleteAll'),'','22').'</a>'; |
|
|
|
|
$modify_icons .= ' <a href="' . api_get_self() . '?deletecat=' . $cat->get_id() . '&selectcat=' . $selectcat . '&cidReq='.$cat->get_course_code().'" onclick="return confirmation();">'.Display::return_icon('delete.png', get_lang('DeleteAll'),'',ICON_SIZE_SMALL).'</a>'; |
|
|
|
|
|
|
|
|
|
return $modify_icons; |
|
|
|
|
} |
|
|
|
@ -233,23 +233,23 @@ function build_edit_icons_eval($eval, $selectcat) { |
|
|
|
|
$visibility_icon= ($eval->is_visible() == 0) ? 'invisible' : 'visible'; |
|
|
|
|
$visibility_command= ($eval->is_visible() == 0) ? 'set_visible' : 'set_invisible'; |
|
|
|
|
$modify_icons= '<a href="gradebook_edit_eval.php?editeval=' . $eval->get_id() . ' &cidReq='.$eval->get_course_code().'"> |
|
|
|
|
'.Display::return_icon('edit.png', get_lang('Modify'),'','22').'</a>'; |
|
|
|
|
'.Display::return_icon('edit.png', get_lang('Modify'),'',ICON_SIZE_SMALL).'</a>'; |
|
|
|
|
|
|
|
|
|
//$modify_icons .= ' <a href="' . api_get_self() . '?moveeval=' . $eval->get_id() . '&selectcat=' . $selectcat . '"><img src="../img/deplacer_fichier.gif" border="0" title="' . get_lang('Move') . '" alt="" /></a>'; |
|
|
|
|
$modify_icons .= ' <a href="' . api_get_self() . '?visibleeval=' . $eval->get_id() . '&' . $visibility_command . '=&selectcat=' . $selectcat . ' ">'.Display::return_icon($visibility_icon.'.png', get_lang('Visible'),'','22').'</a>'; |
|
|
|
|
$modify_icons .= ' <a href="' . api_get_self() . '?visibleeval=' . $eval->get_id() . '&' . $visibility_command . '=&selectcat=' . $selectcat . ' ">'.Display::return_icon($visibility_icon.'.png', get_lang('Visible'),'',ICON_SIZE_SMALL).'</a>'; |
|
|
|
|
if (api_is_allowed_to_edit(null, true)){ |
|
|
|
|
$modify_icons .= ' <a href="gradebook_showlog_eval.php?visiblelog=' . $eval->get_id() . '&selectcat=' . $selectcat . ' &cidReq='.$eval->get_course_code().'">'.Display::return_icon('history.png', get_lang('GradebookQualifyLog'),'','22').'</a>'; |
|
|
|
|
$modify_icons .= ' <a href="gradebook_showlog_eval.php?visiblelog=' . $eval->get_id() . '&selectcat=' . $selectcat . ' &cidReq='.$eval->get_course_code().'">'.Display::return_icon('history.png', get_lang('GradebookQualifyLog'),'',ICON_SIZE_SMALL).'</a>'; |
|
|
|
|
} |
|
|
|
|
if ($locked_status == 0){ |
|
|
|
|
$modify_icons .= " <a href=\"javascript:if (confirm('".addslashes(get_lang('AreYouSureToLockedTheEvaluation'))."')) { location.href='".api_get_self().'?lockedeval=' . $eval->get_id() . '&selectcat=' . $selectcat . ' &cidReq='.$eval->get_course_code()."'; }\">".Display::return_icon('unlock.png',get_lang('LockEvaluation'), array(), 22)."</a>"; |
|
|
|
|
$modify_icons .= " <a href=\"javascript:if (confirm('".addslashes(get_lang('AreYouSureToLockedTheEvaluation'))."')) { location.href='".api_get_self().'?lockedeval=' . $eval->get_id() . '&selectcat=' . $selectcat . ' &cidReq='.$eval->get_course_code()."'; }\">".Display::return_icon('unlock.png',get_lang('LockEvaluation'), array(), ICON_SIZE_SMALL)."</a>"; |
|
|
|
|
} else { |
|
|
|
|
if (api_is_platform_admin()){ |
|
|
|
|
$modify_icons .= " <a href=\"javascript:if (confirm('".addslashes(get_lang('AreYouSureToUnLockedTheEvaluation'))."')) { location.href='".api_get_self().'?lockedeval=' . $eval->get_id() . '&typelocked=&selectcat=' . $selectcat . ' &cidReq='.$eval->get_course_code()."'; }\">".Display::return_icon('lock.png',get_lang('UnLockEvaluation'), array(), 22)."</a>"; |
|
|
|
|
$modify_icons .= " <a href=\"javascript:if (confirm('".addslashes(get_lang('AreYouSureToUnLockedTheEvaluation'))."')) { location.href='".api_get_self().'?lockedeval=' . $eval->get_id() . '&typelocked=&selectcat=' . $selectcat . ' &cidReq='.$eval->get_course_code()."'; }\">".Display::return_icon('lock.png',get_lang('UnLockEvaluation'), array(), ICON_SIZE_SMALL)."</a>"; |
|
|
|
|
} else { |
|
|
|
|
$modify_icons .= ' <img src="../img/locked_na.png" border="0" title="' . get_lang('TheEvaluationIsLocked') . '" alt="" />'; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
$modify_icons .= ' <a href="' . api_get_self() . '?deleteeval=' . $eval->get_id() . '&selectcat=' . $selectcat . ' &cidReq='.$eval->get_course_code().'" onclick="return confirmation();">'.Display::return_icon('delete.png', get_lang('Delete'),'','22').'</a>'; |
|
|
|
|
$modify_icons .= ' <a href="' . api_get_self() . '?deleteeval=' . $eval->get_id() . '&selectcat=' . $selectcat . ' &cidReq='.$eval->get_course_code().'" onclick="return confirmation();">'.Display::return_icon('delete.png', get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>'; |
|
|
|
|
return $modify_icons; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -266,11 +266,11 @@ function build_edit_icons_link($link, $selectcat) { |
|
|
|
|
if ($message_link===false) { |
|
|
|
|
$visibility_icon= ($link->is_visible() == 0) ? 'invisible' : 'visible'; |
|
|
|
|
$visibility_command= ($link->is_visible() == 0) ? 'set_visible' : 'set_invisible'; |
|
|
|
|
$modify_icons= '<a href="gradebook_edit_link.php?editlink=' . $link->get_id() . ' &cidReq='.$link->get_course_code().'">'.Display::return_icon('edit.png', get_lang('Modify'),'','22').'</a>'; |
|
|
|
|
$modify_icons= '<a href="gradebook_edit_link.php?editlink=' . $link->get_id() . ' &cidReq='.$link->get_course_code().'">'.Display::return_icon('edit.png', get_lang('Modify'),'',ICON_SIZE_SMALL).'</a>'; |
|
|
|
|
|
|
|
|
|
//$modify_icons .= ' <a href="' . api_get_self() . '?movelink=' . $link->get_id() . '&selectcat=' . $selectcat . '"><img src="../img/deplacer_fichier.gif" border="0" title="' . get_lang('Move') . '" alt="" /></a>'; |
|
|
|
|
$modify_icons .= ' <a href="' . api_get_self() . '?visiblelink=' . $link->get_id() . '&' . $visibility_command . '=&selectcat=' . $selectcat . ' ">'.Display::return_icon($visibility_icon.'.png', get_lang('Visible'),'','22').'</a>'; |
|
|
|
|
$modify_icons .= ' <a href="gradebook_showlog_link.php?visiblelink=' . $link->get_id() . '&selectcat=' . $selectcat . '&cidReq='.$link->get_course_code().'">'.Display::return_icon('history.png', get_lang('GradebookQualifyLog'),'','22').'</a>'; |
|
|
|
|
$modify_icons .= ' <a href="' . api_get_self() . '?visiblelink=' . $link->get_id() . '&' . $visibility_command . '=&selectcat=' . $selectcat . ' ">'.Display::return_icon($visibility_icon.'.png', get_lang('Visible'),'',ICON_SIZE_SMALL).'</a>'; |
|
|
|
|
$modify_icons .= ' <a href="gradebook_showlog_link.php?visiblelink=' . $link->get_id() . '&selectcat=' . $selectcat . '&cidReq='.$link->get_course_code().'">'.Display::return_icon('history.png', get_lang('GradebookQualifyLog'),'',ICON_SIZE_SMALL).'</a>'; |
|
|
|
|
|
|
|
|
|
//If a work is added in a gradebook you can only delete the link in the work tool |
|
|
|
|
$show_delete = true; |
|
|
|
@ -278,9 +278,9 @@ function build_edit_icons_link($link, $selectcat) { |
|
|
|
|
$show_delete = false; |
|
|
|
|
} |
|
|
|
|
if ($show_delete) { |
|
|
|
|
$modify_icons .= ' <a href="' . api_get_self() . '?deletelink=' . $link->get_id() . '&selectcat=' . $selectcat . ' &cidReq='.$link->get_course_code().'" onclick="return confirmation();">'.Display::return_icon('delete.png', get_lang('Delete'),'','22').'</a>'; |
|
|
|
|
$modify_icons .= ' <a href="' . api_get_self() . '?deletelink=' . $link->get_id() . '&selectcat=' . $selectcat . ' &cidReq='.$link->get_course_code().'" onclick="return confirmation();">'.Display::return_icon('delete.png', get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>'; |
|
|
|
|
} else { |
|
|
|
|
$modify_icons .= ' .'.Display::return_icon('delete_na.png', get_lang('Delete'),'','22'); |
|
|
|
|
$modify_icons .= ' .'.Display::return_icon('delete_na.png', get_lang('Delete'),'',ICON_SIZE_SMALL); |
|
|
|
|
} |
|
|
|
|
return $modify_icons; |
|
|
|
|
} |
|
|
|
|