From 57ea6f13cd875c3fcd55892d1adfbb05d53f1027 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Thu, 4 Aug 2011 11:19:48 +0200 Subject: [PATCH] Removing old table code see #3675 --- main/inc/lib/display.lib.php | 11 ++++++----- main/user/user.php | 24 ++++++++---------------- tests/main/inc/lib/display.lib.test.php | 3 ++- 3 files changed, 16 insertions(+), 22 deletions(-) diff --git a/main/inc/lib/display.lib.php b/main/inc/lib/display.lib.php index 5927caecaa..9710a8349c 100755 --- a/main/inc/lib/display.lib.php +++ b/main/inc/lib/display.lib.php @@ -69,7 +69,7 @@ class Display { /** * Display simple html header of table. - * @deprecated + * @deprecated use the HTML_table class */ /*public static function display_table_header() { $bgcolor = 'bgcolor="white"'; @@ -89,8 +89,9 @@ class Display { * @author Roan Embrechts * @version 1.01 * @todo remove this function, is only use in user.php + * @deprecated use the HTML_table class * @return return type string, bgcolor - */ + *//* public static function display_complex_table_header($properties, $column_header) { $width = $properties['width']; if (!isset($width)) { @@ -120,7 +121,7 @@ class Display { echo "\n"; $bgcolor = 'bgcolor="'.HTML_WHITE.'"'; return $bgcolor; - } + }*/ /** * Displays a table row. @@ -130,7 +131,7 @@ class Display { * @param $is_alternating true: the row colours alternate, false otherwise * @todo remove this function, is only use in user.php */ - public static function display_table_row($bgcolor, $table_row, $is_alternating = true) { + /*public static function display_table_row($bgcolor, $table_row, $is_alternating = true) { echo ''; foreach ($table_row as & $table_element) { echo ''.$table_element.''; @@ -144,7 +145,7 @@ class Display { } } return $bgcolor; - } + }*/ /** * Displays a table diff --git a/main/user/user.php b/main/user/user.php index 02a526ce02..d9890f3e11 100755 --- a/main/user/user.php +++ b/main/user/user.php @@ -22,8 +22,6 @@ /** * Code */ - -/* INIT SECTION */ // name of the language file that needs to be included $language_file = array('registration', 'admin', 'userInfo'); $use_anonymous = true; @@ -216,11 +214,7 @@ if (api_is_allowed_to_edit(null, true)) { } // end if allowed to edit -/* -============================================================================== - FUNCTIONS -============================================================================== -*/ +/* FUNCTIONS */ function display_user_search_form() { echo '
'; @@ -239,11 +233,13 @@ function display_user_search_form() { * @author Roan Embrechts * @todo users from virtual courses always show "-" for the group related output. Edit and statistics columns are disabled * for these users, for now. */ +/* function show_users_in_virtual_courses() { global $_course, $_user, $origin; $real_course_code = $_course['sysCode']; $real_course_info = Database::get_course_info($real_course_code); $user_subscribed_virtual_course_list = CourseManager::get_list_of_virtual_courses_for_specific_user_and_real_course($_user['user_id'], $real_course_code); + $number_of_virtual_courses = count($user_subscribed_virtual_course_list); $row = 0; $column_header[$row++] = "ID"; @@ -302,17 +298,13 @@ function show_users_in_virtual_courses() { } echo ''; } -} +}*/ if (!$is_allowed_in_course) { api_not_allowed(true); } -/* ------------------------------------------------------------ - Header ------------------------------------------------------------ -*/ +/* Header */ if ($origin != 'learnpath') { if (isset($_GET['keyword']) && !empty($_GET['keyword'])) { $interbreadcrumb[] = array ("url" => "user.php", "name" => get_lang("Users")); @@ -668,10 +660,10 @@ if (api_get_setting('allow_user_headings') == 'true' && $is_courseAdmin && api_i } //User list of the virtual courses linked to this course. - -show_users_in_virtual_courses($is_allowed_to_track); +//@todo +//show_users_in_virtual_courses($is_allowed_to_track); /* FOOTER */ if ($origin != 'learnpath') { Display::display_footer(); -} +} \ No newline at end of file diff --git a/tests/main/inc/lib/display.lib.test.php b/tests/main/inc/lib/display.lib.test.php index fa34118cb8..47a43c5462 100755 --- a/tests/main/inc/lib/display.lib.test.php +++ b/tests/main/inc/lib/display.lib.test.php @@ -51,6 +51,7 @@ class TestDisplay extends UnitTestCase { * @param $is_alternating true: the row colours alternate, false otherwise * @return string color */ + /* public function testdisplay_table_row() { $bgcolor = 'red'; $table_row = array(); @@ -60,7 +61,7 @@ class TestDisplay extends UnitTestCase { ob_end_clean(); $this->assertTrue(is_string($res)); //var_dump($res); - } + }*/ public function testdisplay_sortable_table() { $header='';