diff --git a/main/work/work.lib.php b/main/work/work.lib.php index a2a5d44460..deb466beee 100644 --- a/main/work/work.lib.php +++ b/main/work/work.lib.php @@ -1957,8 +1957,16 @@ function get_work_user_list_from_documents( * @param bool $getCount * @return array */ -function get_work_user_list($start, $limit, $column, $direction, $work_id, $where_condition, $studentId = null, $getCount = false) -{ +function get_work_user_list( + $start, + $limit, + $column, + $direction, + $work_id, + $where_condition, + $studentId = null, + $getCount = false +) { $work_table = Database::get_course_table(TABLE_STUDENT_PUBLICATION); $iprop_table = Database::get_course_table(TABLE_ITEM_PROPERTY); $user_table = Database::get_main_table(TABLE_MAIN_USER); @@ -2053,6 +2061,8 @@ function get_work_user_list($start, $limit, $column, $direction, $work_id, $wher return $work['count']; } + $url = api_get_path(WEB_CODE_PATH).'work/'; + while ($work = Database::fetch_array($result, 'ASSOC')) { $item_id = $work['id']; //$workItem = get_work_data_by_id($item_id); @@ -2139,7 +2149,7 @@ function get_work_user_list($start, $limit, $column, $direction, $work_id, $wher $link_to_download = null; // If URL is present then there's a file to download keep BC. if ($work['contains_file'] || !empty($work['url'])) { - $link_to_download = ''. + $link_to_download = ''. Display::return_icon('save.png', get_lang('Save'),array(), ICON_SIZE_SMALL).' '; } else { //$link_to_download = ''.Display::return_icon('save_na.png', get_lang('Save'),array(), ICON_SIZE_SMALL).' '; @@ -2154,7 +2164,7 @@ function get_work_user_list($start, $limit, $column, $direction, $work_id, $wher $work['sent_date'] = date_to_str_ago(api_get_local_time($work['sent_date'])).' '.$add_string.'
'.$work_date; // Actions. - $url = api_get_path(WEB_CODE_PATH).'work/'; + $action = ''; if ($is_allowed_to_edit) { $action .= ''. @@ -2185,25 +2195,30 @@ function get_work_user_list($start, $limit, $column, $direction, $work_id, $wher } if ($work['accepted'] == '1') { - $action .= ''.Display::return_icon('visible.png', get_lang('Invisible'),array(), ICON_SIZE_SMALL).''; + $action .= ''. + Display::return_icon('visible.png', get_lang('Invisible'),array(), ICON_SIZE_SMALL).''; } else { - $action .= ''.Display::return_icon('invisible.png', get_lang('Visible'),array(), ICON_SIZE_SMALL).' '; + $action .= ''. + Display::return_icon('invisible.png', get_lang('Visible'),array(), ICON_SIZE_SMALL).' '; } if ($locked) { $action .= Display::return_icon('delete_na.png', get_lang('Delete'), '', ICON_SIZE_SMALL); } else { - $action .= ''.Display::return_icon('delete.png', get_lang('Delete'),'',ICON_SIZE_SMALL).''; + $action .= ''. + Display::return_icon('delete.png', get_lang('Delete'),'',ICON_SIZE_SMALL).''; } } elseif ($is_author && (empty($work['qualificator_id']) || $work['qualificator_id'] == 0)) { - $action .= ''.Display::return_icon('default.png', get_lang('View'),array(), ICON_SIZE_SMALL).''; + $action .= ''. + Display::return_icon('default.png', get_lang('View'),array(), ICON_SIZE_SMALL).''; if (api_get_course_setting('student_delete_own_publication') == 1) { if (api_is_allowed_to_session_edit(false, true)) { $action .= ''. - Display::return_icon('edit.png', get_lang('Comment'),array(), ICON_SIZE_SMALL).''; + Display::return_icon('edit.png', get_lang('Comment'),array(), ICON_SIZE_SMALL).''; } - $action .= ' '.Display::return_icon('delete.png',get_lang('Delete'),'',ICON_SIZE_SMALL).''; + $action .= ' '. + Display::return_icon('delete.png',get_lang('Delete'),'',ICON_SIZE_SMALL).''; } else { $action .= Display::return_icon('edit_na.png', get_lang('Modify'),array(), ICON_SIZE_SMALL); }