From 646150ec5883c37048d187b679952d3ee9fe94ef Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Thu, 1 May 2014 13:39:17 +0200 Subject: [PATCH] Minor format code. --- main/exercice/overview.php | 1 - main/group/group.php | 7 ++++--- main/inc/lib/sortable_table.class.php | 6 ++++-- main/social/profile.php | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/main/exercice/overview.php b/main/exercice/overview.php index bfccb1f660..e675f3bb99 100644 --- a/main/exercice/overview.php +++ b/main/exercice/overview.php @@ -237,7 +237,6 @@ if ($objExercise->selectAttempts()) { if ($visible_return['value'] == true) { $message .= $attempt_message; } - //$options.= $attempt_message; //Display::div($attempt_message, array('class'=>"offset2 span2")); } if ($time_control) { diff --git a/main/group/group.php b/main/group/group.php index c58683ba16..ba71087a59 100644 --- a/main/group/group.php +++ b/main/group/group.php @@ -215,15 +215,16 @@ if (api_get_setting('allow_group_categories') == 'true') { } echo Display::page_header($category['title'].' '. $label.' '.$actions); - echo '

'.$category['description'].'

'; - GroupManager ::process_groups($group_list, $category['id']); + echo $category['description']; + GroupManager::process_groups($group_list, $category['id']); } } else { $group_list = GroupManager::get_group_list(); GroupManager::process_groups($group_list); + } -if (!isset ($_GET['origin']) || $_GET['origin'] != 'learnpath') { +if (!isset($_GET['origin']) || $_GET['origin'] != 'learnpath') { Display::display_footer(); } $_SESSION['_gid'] = 0; diff --git a/main/inc/lib/sortable_table.class.php b/main/inc/lib/sortable_table.class.php index 443d3bafa7..077036b254 100644 --- a/main/inc/lib/sortable_table.class.php +++ b/main/inc/lib/sortable_table.class.php @@ -326,7 +326,7 @@ class SortableTable extends HTML_Table $html .= ''; $html .= $nav; $html .= ''; - }else{ + } else { $html .= ' '; $html .= ''; } @@ -919,6 +919,7 @@ class SortableTableFromArray extends SortableTable */ public function get_table_data($from = 1, $per_page = null, $column = null, $direction = null, $sort = true) { + if ($sort) { $content = TableSort::sort_table($this->table_data, $this->column, $this->direction == 'ASC' ? SORT_ASC : SORT_DESC); } else { @@ -981,7 +982,7 @@ class SortableTableFromArrayConfig extends SortableTable * @param string $direction * @param bool $doc_filter special modification to fix the document name order */ - public function __construct ( + public function __construct( $table_data, $default_column = 1, $default_items_per_page = 20, @@ -1018,6 +1019,7 @@ class SortableTableFromArrayConfig extends SortableTable SORT_REGULAR, $this->doc_filter ); + return array_slice($content, $from, $this->per_page); } diff --git a/main/social/profile.php b/main/social/profile.php index 3da57839fb..c0cedb9f5c 100644 --- a/main/social/profile.php +++ b/main/social/profile.php @@ -767,4 +767,4 @@ $tpl->assign('social_left_content', $social_left_content); $tpl->assign('social_right_content', $social_right_content); $social_layout = $tpl->get_template('layout/social_layout.tpl'); -$tpl->display($social_layout); \ No newline at end of file +$tpl->display($social_layout);