api_get_path(WEB_CODE_PATH).'group/group.php?'.api_get_cidreq(), 'name' => get_lang('Groups') ); $interbreadcrumb[] = array( 'url' => api_get_path(WEB_CODE_PATH).'group/group_space.php?'.api_get_cidreq(), 'name' => get_lang('GroupSpace').' '.$group_properties['name'] ); } $interbreadcrumb[] = array( 'url' => api_get_path(WEB_CODE_PATH).'work/work.php?'.api_get_cidreq(), 'name' => get_lang('StudentPublications') ); $interbreadcrumb[] = array( 'url' => api_get_path(WEB_CODE_PATH).'work/work_list_all.php?'.api_get_cidreq().'&id='.$workId, 'name' => $my_folder_data['title'] ); $error_message = null; $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : null; $itemId = isset($_REQUEST['item_id']) ? intval($_REQUEST['item_id']) : null; $message = null; switch ($action) { case 'delete': /* Delete document */ if ($itemId) { $fileDeleted = deleteWorkItem($itemId, $courseInfo); if (!$fileDeleted) { $message = Display::return_message(get_lang('YouAreNotAllowedToDeleteThisDocument'), 'error'); } else { $message = Display::return_message(get_lang('TheDocumentHasBeenDeleted'), 'confirmation'); } } break; case 'make_visible': /* Visible */ if ($is_allowed_to_edit) { if (!empty($itemId)) { if (isset($itemId) && $itemId == 'all') { } else { makeVisible($itemId, $courseInfo); $message = Display::return_message(get_lang('FileVisible'), 'confirmation'); } } } break; case 'make_invisible': /* Invisible */ if (!empty($itemId)) { if (isset($itemId) && $itemId == 'all') { } else { makeInvisible($itemId, $courseInfo); $message = Display::return_message(get_lang('FileInvisible'), 'confirmation'); } } break; case 'export_pdf': exportAllStudentWorkFromPublication( $workId, $courseInfo, $sessionId, 'pdf' ); break; } Display :: display_header(null); echo $message; $documentsAddedInWork = getAllDocumentsFromWorkToString($workId, $courseInfo); echo '
'; echo ''. Display::return_icon('back.png', get_lang('BackToWorksList'), '', ICON_SIZE_MEDIUM).''; if (api_is_allowed_to_session_edit(false, true) && !empty($workId) && !$isDrhOfCourse) { /*echo ''; echo Display::return_icon('upload_file.png', get_lang('UploadADocument'), '', ICON_SIZE_MEDIUM).'';*/ if (ADD_DOCUMENT_TO_WORK) { echo ''; echo Display::return_icon('new_document.png', get_lang('AddDocument'), '', ICON_SIZE_MEDIUM).''; echo ''; echo Display::return_icon('user.png', get_lang('AddUsers'), '', ICON_SIZE_MEDIUM).''; echo ''; echo Display::return_icon('pdf.png', get_lang('Export'), '', ICON_SIZE_MEDIUM).''; } $display_output = ''. Display::return_icon('exercice_uncheck.png', get_lang('ViewUsersWithoutTask'), '', ICON_SIZE_MEDIUM).""; $count = get_count_work($workId); if ($count > 0) { $display_output .= ''. Display::return_icon('save_pack.png', get_lang('Save'), array('style' => 'float:right;'), ICON_SIZE_MEDIUM).''; } echo $display_output; echo ''; echo Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_MEDIUM).''; } echo '
'; if (!empty($my_folder_data['title'])) { echo Display::page_subheader($my_folder_data['title']); } $error_message = Session::read('error_message'); if (!empty($error_message)) { echo $error_message; Session::erase('error_message'); } if (!empty($my_folder_data['description'])) { echo '

'.get_lang('Description').':

'. Security::remove_XSS($my_folder_data['description']).'

'; } $check_qualification = intval($my_folder_data['qualification']); if (!empty($work_data['enable_qualification']) && !empty($check_qualification) ) { $type = 'simple'; $columns = array( get_lang('Type'), get_lang('FirstName'), get_lang('LastName'), get_lang('Title'), get_lang('Score'), get_lang('Date'), get_lang('Status'), get_lang('Actions') ); if (ALLOW_USER_COMMENTS) { $columns = array( get_lang('Type'), get_lang('FirstName'), get_lang('LastName'), get_lang('Title'), get_lang('Feedback'), get_lang('Date'), get_lang('Status'), get_lang('Actions') ); } $column_model = array( array('name'=>'type', 'index'=>'file', 'width'=>'8', 'align'=>'left', 'search' => 'false', 'sortable' => 'false'), array('name'=>'firstname', 'index'=>'firstname', 'width'=>'35', 'align'=>'left', 'search' => 'true'), array('name'=>'lastname', 'index'=>'lastname', 'width'=>'35', 'align'=>'left', 'search' => 'true'), array('name'=>'title', 'index'=>'title', 'width'=>'40', 'align'=>'left', 'search' => 'false', 'wrap_cell' => 'true'), array('name'=>'qualification', 'index'=>'qualification', 'width'=>'20', 'align'=>'left', 'search' => 'true'), array('name'=>'sent_date', 'index'=>'sent_date', 'width'=>'40', 'align'=>'left', 'search' => 'true', 'wrap_cell' => 'true'), array('name'=>'qualificator_id','index'=>'qualificator_id', 'width'=>'25', 'align'=>'left', 'search' => 'true'), array('name'=>'actions', 'index'=>'actions', 'width'=>'30', 'align'=>'left', 'search' => 'false', 'sortable'=>'false', ) ); } else { $type = 'complex'; $columns = array( get_lang('Type'), get_lang('FirstName'), get_lang('LastName'), get_lang('Title'), get_lang('Date'), get_lang('Actions') ); $column_model = array( array('name'=>'type', 'index'=>'file', 'width'=>'8', 'align'=>'left', 'search' => 'false', 'sortable' => 'false'), array('name'=>'firstname', 'index'=>'firstname', 'width'=>'35', 'align'=>'left', 'search' => 'true'), array('name'=>'lastname', 'index'=>'lastname', 'width'=>'35', 'align'=>'left', 'search' => 'true'), array('name'=>'title', 'index'=>'title', 'width'=>'40', 'align'=>'left', 'search' => 'false', 'wrap_cell' => "true"), array('name'=>'sent_date', 'index'=>'sent_date', 'width'=>'45', 'align'=>'left', 'search' => 'true', 'wrap_cell' => 'true'), array('name'=>'actions', 'index'=>'actions', 'width'=>'40', 'align'=>'left', 'search' => 'false', 'sortable'=>'false', 'wrap_cell' => 'true') ); if (ALLOW_USER_COMMENTS) { $columns = array( get_lang('Type'), get_lang('FirstName'), get_lang('LastName'), get_lang('Title'), get_lang('Feedback'), get_lang('Date'), get_lang('Actions') ); $column_model = array( array('name'=>'type', 'index'=>'file', 'width'=>'8', 'align'=>'left', 'search' => 'false', 'sortable' => 'false'), array('name'=>'firstname', 'index'=>'firstname', 'width'=>'35', 'align'=>'left', 'search' => 'true'), array('name'=>'lastname', 'index'=>'lastname', 'width'=>'35', 'align'=>'left', 'search' => 'true'), array('name'=>'title', 'index'=>'title', 'width'=>'40', 'align'=>'left', 'search' => 'false', 'wrap_cell' => "true"), array('name'=>'qualification', 'index'=>'qualification', 'width'=>'25', 'align'=>'left', 'search' => 'true'), array('name'=>'sent_date', 'index'=>'sent_date', 'width'=>'45', 'align'=>'left', 'search' => 'true', 'wrap_cell' => 'true'), array('name'=>'actions', 'index'=>'actions', 'width'=>'40', 'align'=>'left', 'search' => 'false', 'sortable'=>'false', 'wrap_cell' => 'true') ); } } $extra_params = array( 'autowidth' => 'true', 'height' => 'auto', 'sortname' => 'firstname' ); $url = api_get_path(WEB_AJAX_PATH).'model.ajax.php?a=get_work_user_list_all&work_id='.$workId.'&type='.$type; ?>