= 1) { Display::display_header(); if (api_get_course_setting('student_delete_own_publication') == '1') { Display::display_warning_message(get_lang('CantUploadDeleteYourPaperFirst')); } else { Display::display_warning_message(get_lang('YouAlreadySentAPaperYouCantUpload')); } Display::display_footer(); exit; } }*/ $homework = get_work_assignment_by_id($workInfo['id']); $validationStatus = getWorkDateValidationStatus($homework); $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.php?'.api_get_cidreq().'&id='.$work_id, 'name' => $workInfo['title'], ); $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('UploadADocument')); $form = new FormValidator( 'form', 'POST', api_get_self()."?".api_get_cidreq()."&id=".$work_id, '', array('enctype' => "multipart/form-data") ); setWorkUploadForm($form, $workInfo['allow_text_assignment']); $form->addElement('hidden', 'id', $work_id); $form->addElement('hidden', 'sec_token', $token); $error_message = null; $succeed = false; if ($form->validate()) { if ($student_can_edit_in_session && $check) { $values = $form->getSubmitValues(); // Process work processWorkForm( $workInfo, $values, $course_info, $session_id, $group_id, $user_id ); $script = 'work_list.php'; if ($is_allowed_to_edit) { $script = 'work_list_all.php'; } header('Location: '.api_get_path(WEB_CODE_PATH).'work/'.$script.'?'.api_get_cidreq().'&id='.$work_id); exit; } else { // Bad token or can't add works $error_message = Display::return_message(get_lang('IsNotPosibleSaveTheDocument'), 'error'); } } $url = api_get_path(WEB_AJAX_PATH).'work.ajax.php?'.api_get_cidreq().'&a=upload_file&id='.$work_id; $htmlHeadXtra[] = api_get_jquery_libraries_js(array('jquery-ui', 'jquery-upload')); $htmlHeadXtra[] = to_javascript_work(); $htmlHeadXtra[] = " "; Display :: display_header(null); $headers = array( get_lang('Upload'), get_lang('Upload').' ('.get_lang('Simple').')', ); $multiple_form = '