Delete all correction see BT#11973

pull/2487/head
jmontoyaa 10 years ago
parent fba1a625bc
commit d1ef95d17b
  1. 7
      main/lang/english/trad4all.inc.php
  2. 3
      main/lang/spanish/trad4all.inc.php
  3. 2
      main/work/work.lib.php
  4. 16
      main/work/work_list_all.php

@ -7946,6 +7946,7 @@ $AreYouSureYouWantToUnassignTheTicket = "Are you sure you want to unassign this
$AreYouSureYouWantToCloseTheTicket = "Are you sure you want to close this ticket?";
$Unassigned = "Unassigned";
$SelectWeeksSpan = "Select the timespan in weeks";
$CourseXAdded = 'Course %s added.';
?>
$CourseXAdded = "Course %s added";
$CurrentPassword = "Current password";
$DeleteCorrections = "Delete corrections";
?>

@ -7963,4 +7963,7 @@ $AreYouSureYouWantToUnassignTheTicket = "Está seguro que quiere desasignar este
$AreYouSureYouWantToCloseTheTicket = "Está seguro que quiere cerrar este ticket?";
$Unassigned = "Desasignado";
$SelectWeeksSpan = "Seleccione la duración en semanas";
$CourseXAdded = "Curso %s añadido";
$CurrentPassword = "Contraseña actual";
$DeleteCorrections = "Eliminar correciones";
?>

@ -2056,7 +2056,7 @@ function get_work_user_list(
$feedback .= ' ';
}
$feedback .= '<a href="'.$url.'view.php?'.api_get_cidreq().'&id='.$item_id.'" title="'.get_lang('View').'">'.
$count . ' ' . Display::returnFontAwesomeIcon('comments-o') . '</a> ';
$count . ' ' . Display::returnFontAwesomeIcon('comments-o') . '</a> ';
}
$work['qualification'] = $qualification_string.$feedback;

@ -109,6 +109,20 @@ switch ($action) {
}
}
break;
case 'delete_correction':
$result = get_work_user_list(null, null, null, null, $workId);
if ($result) {
foreach ($result as $item) {
$workToDelete = get_work_data_by_id($item['id']);
deleteCorrection($courseInfo, $workToDelete);
}
Display::addFlash(
Display::return_message(get_lang('Deleted'), 'confirmation')
);
}
header('Location: '.api_get_self().'?'.api_get_cidreq().'&id='.$workId);
exit;
break;
case 'make_visible':
/* Visible */
if ($is_allowed_to_edit) {
@ -180,6 +194,8 @@ if (api_is_allowed_to_session_edit(false, true) && !empty($workId) && !$isDrhOfC
$url = api_get_path(WEB_CODE_PATH).'work/upload_corrections.php?'.api_get_cidreq().'&id='.$workId;
$actionsLeft .= '<a class="btn-toolbar" href="'.$url.'">'.
Display::return_icon('upload_package.png', get_lang('UploadCorrectionsPackage'), '', ICON_SIZE_MEDIUM) . ' ' . get_lang('UploadCorrectionsPackage') . '</a>';
$url = api_get_path(WEB_CODE_PATH).'work/work_list_all.php?'.api_get_cidreq().'&id='.$workId.'&action=delete_correction';
$actionsLeft .= Display::toolbarButton(get_lang('DeleteCorrections'), $url, 'upload', 'danger');
}
echo Display::toolbarAction('toolbar-worklist', array($actionsLeft), 1);

Loading…
Cancel
Save