diff --git a/main/dropbox/index.php b/main/dropbox/index.php index 03f5e007b8..36f4888cf4 100755 --- a/main/dropbox/index.php +++ b/main/dropbox/index.php @@ -346,7 +346,7 @@ if ($action != 'add') { } $column_show[] = 0; - // Here we change the way how the colums are going to be sort + // Here we change the way how the columns are going to be sort // in this case the the column of LastResent ( 4th element in $column_header) we will be order like the column RealDate // because in the column RealDate we have the days in a correct format "2008-03-12 10:35:48" @@ -366,26 +366,29 @@ if ($action != 'add') { // New icon $new_icon = ''; - if ($dropbox_file->last_upload_date > $last_access AND !in_array($dropbox_file->id, $_SESSION['_seen'][$_course['id']][TOOL_DROPBOX])) { + if ($dropbox_file->last_upload_date > $last_access && + !in_array($dropbox_file->id, $_SESSION['_seen'][$_course['id']][TOOL_DROPBOX]) + ) { $new_icon = ' '.Display::return_icon('new_dropbox_message.png', get_lang('New'),'',ICON_SIZE_SMALL); } $link_open = ''; $dropbox_file_data[] = $link_open.DocumentManager::build_document_icon_tag('file', $dropbox_file->title).''; - $dropbox_file_data[] = ''.Display::return_icon('save.png', get_lang('Download'), array('style' => 'float:right;'),ICON_SIZE_SMALL).''.$link_open.$dropbox_file->title.''.$new_icon.'
'.$dropbox_file->description; + $dropbox_file_data[] = ''. + Display::return_icon('save.png', get_lang('Download'), array('style' => 'float:right;'),ICON_SIZE_SMALL).''.$link_open.$dropbox_file->title.''.$new_icon.'
'.$dropbox_file->description; $file_size = $dropbox_file->filesize; $dropbox_file_data[] = format_file_size($file_size); $dropbox_file_data[] = $dropbox_file->author; - //$dropbox_file_data[] = $dropbox_file->description; $last_upload_date = api_get_local_time($dropbox_file->last_upload_date); - $dropbox_file_data[] = date_to_str_ago($last_upload_date).'
'.api_format_date($last_upload_date).''; + $dropbox_file_data[] = date_to_str_ago($last_upload_date).'
'. + api_format_date($last_upload_date).''; $action_icons = check_number_feedback($dropbox_file->id, $number_feedback).' '.get_lang('Feedback').' - '.Display::return_icon('discuss.png', get_lang('Comment'),'',ICON_SIZE_SMALL).' - '.Display::return_icon('move.png', get_lang('Move'),'',ICON_SIZE_SMALL).' - '. - Display::return_icon('delete.png', get_lang('Delete'),'',ICON_SIZE_SMALL).''; + '.Display::return_icon('discuss.png', get_lang('Comment'),'',ICON_SIZE_SMALL).' + '.Display::return_icon('move.png', get_lang('Move'),'',ICON_SIZE_SMALL).' + '. + Display::return_icon('delete.png', get_lang('Delete'),'',ICON_SIZE_SMALL).''; // This is a hack to have an additional row in a sortable table @@ -433,7 +436,11 @@ if ($action != 'add') { } // Displaying the table - $additional_get_parameters = array('view' => $view, 'view_received_category' => $viewReceivedCategory, 'view_sent_category' => $viewSentCategory); + $additional_get_parameters = array( + 'view' => $view, + 'view_received_category' => $viewReceivedCategory, + 'view_sent_category' => $viewSentCategory, + ); $selectlist = array( 'delete_received' => get_lang('Delete'), 'download_received' => get_lang('Download') @@ -534,7 +541,8 @@ if ($action != 'add') { $dropbox_file_data[] = $dropbox_file->id; $link_open = ''; $dropbox_file_data[] = $link_open.DocumentManager::build_document_icon_tag('file', $dropbox_file->title).''; - $dropbox_file_data[] = ''.Display::return_icon('save.png', get_lang('Save'), array('style' => 'float:right;'),ICON_SIZE_SMALL).''.$link_open.$dropbox_file->title.'
'.$dropbox_file->description; + $dropbox_file_data[] = ''. + Display::return_icon('save.png', get_lang('Save'), array('style' => 'float:right;'),ICON_SIZE_SMALL).''.$link_open.$dropbox_file->title.'
'.$dropbox_file->description; $file_size = $dropbox_file->filesize; $dropbox_file_data[] = format_file_size($file_size); $receivers_celldata = null; @@ -551,9 +559,9 @@ if ($action != 'add') { $receivers_celldata = ''; $action_icons = check_number_feedback($dropbox_file->id, $number_feedback).' '.get_lang('Feedback').' - '.Display::return_icon('discuss.png', get_lang('Comment'),'',ICON_SIZE_SMALL).' - '.Display::return_icon('move.png', get_lang('Move'),'',ICON_SIZE_SMALL).' - '.Display::return_icon('delete.png', get_lang('Delete'),'',ICON_SIZE_SMALL).''; + '.Display::return_icon('discuss.png', get_lang('Comment'),'',ICON_SIZE_SMALL).' + '.Display::return_icon('move.png', get_lang('Move'),'',ICON_SIZE_SMALL).' + '.Display::return_icon('delete.png', get_lang('Delete'),'',ICON_SIZE_SMALL).''; // This is a hack to have an additional row in a sortable table if ($action == 'viewfeedback' && isset($_GET['id']) && is_numeric($_GET['id']) && $dropbox_file->id == $_GET['id']) { $action_icons .= "\n"; // ending the normal row of the sortable table @@ -620,7 +628,8 @@ if ($action != 'add') { if (api_get_session_id() != 0 && !api_is_allowed_to_session_edit(false, true)) { $selectlist = array('download_received' => get_lang('Download')); } - echo '
'; + + echo '
'; Display::display_sortable_config_table( 'dropbox', $column_header, @@ -632,7 +641,7 @@ if ($action != 'add') { $column_order, $selectlist ); - echo '
'; + echo '
'; } } diff --git a/main/inc/lib/course.lib.php b/main/inc/lib/course.lib.php index b10f0d78d3..b00ca7bc76 100755 --- a/main/inc/lib/course.lib.php +++ b/main/inc/lib/course.lib.php @@ -5594,7 +5594,7 @@ class CourseManager $current_url_id = api_get_current_access_url_id(); // Get course list auto-register - $special_course_list = self::get_special_course_list(); + $special_course_list = self::get_special_course_list(); $without_special_courses = ''; if (!empty($special_course_list)) { @@ -5604,13 +5604,16 @@ class CourseManager //AND course_rel_user.relation_type<>".COURSE_RELATION_TYPE_RRHH." $sql = "SELECT course.id, course.title, course.code, course.subscribe subscr, course.unsubscribe unsubscr, course_rel_user.status status, course_rel_user.sort sort, course_rel_user.user_course_cat user_course_cat - FROM $TABLECOURS course, - $TABLECOURSUSER course_rel_user, ".$TABLE_ACCESS_URL_REL_COURSE." url - WHERE course.id=".intval($courseId)." - AND course.id = course_rel_user.c_id - AND url.c_id = course.id - AND course_rel_user.user_id = ".intval($user_id)." - $without_special_courses "; + FROM + $TABLECOURS course, + $TABLECOURSUSER course_rel_user, ".$TABLE_ACCESS_URL_REL_COURSE." url + WHERE + course.id=".intval($courseId)." AND + course.id = course_rel_user.c_id AND + url.c_id = course.id AND + course_rel_user.user_id = ".intval($user_id)." + $without_special_courses + "; // If multiple URL access mode is enabled, only fetch courses // corresponding to the current URL. @@ -5622,7 +5625,8 @@ class CourseManager $result = Database::query($sql); - // Browse through all courses. We can only have one course because of the course.id=".intval($courseId) in sql query + // Browse through all courses. We can only have one course because + // of the course.id=".intval($courseId) in sql query $course = Database::fetch_array($result); $course_info = api_get_course_info($course['code']); //$course['id_session'] = null; @@ -5631,10 +5635,15 @@ class CourseManager // For each course, get if there is any notification icon to show // (something that would have changed since the user's last visit). - $show_notification = Display :: show_notification($course_info); + $show_notification = Display::show_notification($course_info); // New code displaying the user's status in respect to this course. - $status_icon = Display::return_icon('blackboard.png', $course_info['title'], array(), ICON_SIZE_LARGE); + $status_icon = Display::return_icon( + 'blackboard.png', + $course_info['title'], + array(), + ICON_SIZE_LARGE + ); $params = array(); $params['right_actions'] = '';