diff --git a/main/dashboard/dashboard.php b/main/dashboard/dashboard.php index 3cd4b21736..41f8dfe337 100755 --- a/main/dashboard/dashboard.php +++ b/main/dashboard/dashboard.php @@ -20,9 +20,11 @@ if(isset($_GET['view']) && in_array($_GET['view'], $views)){ $link_blocks_view = $link_list_view = null; if (isset($dashboard_view) && $dashboard_view == 'list') { - $link_blocks_view = ''.Display::return_icon('blocks.png',get_lang('DashboardBlocks'),'',ICON_SIZE_MEDIUM).''; + $link_blocks_view = ''. + Display::return_icon('blocks.png',get_lang('DashboardBlocks'),'',ICON_SIZE_MEDIUM).''; } else { - $link_list_view = ''.Display::return_icon('edit.png',get_lang('EditBlocks'),'',ICON_SIZE_MEDIUM).''; + $link_list_view = ''. + Display::return_icon('edit.png',get_lang('EditBlocks'),'',ICON_SIZE_MEDIUM).''; } $configuration_link = null; @@ -37,11 +39,6 @@ echo ''; // block dashboard view if (isset($dashboard_view) && $dashboard_view == 'blocks') { - - if (isset($msg)) { - //Display::display_confirmation_message(get_lang('BlocksHaveBeenUpdatedSuccessfully')); - } - if (count($blocks) > 0) { $columns = array(); // group content html by number of column @@ -96,4 +93,4 @@ if (isset($dashboard_view) && $dashboard_view == 'blocks') { } $user_id = api_get_user_id(); DashboardManager::display_user_dashboard_list($user_id); -} \ No newline at end of file +} diff --git a/main/dashboard/dashboard_controller.php b/main/dashboard/dashboard_controller.php index f3b5207089..fabaff6932 100755 --- a/main/dashboard/dashboard_controller.php +++ b/main/dashboard/dashboard_controller.php @@ -6,6 +6,7 @@ * the requested action * This file contains class used like controller, it should be included inside a dispatcher file (e.g: index.php) * @author Christian Fasanando + * * @package chamilo.dashboard */ class DashboardController @@ -17,7 +18,8 @@ class DashboardController /** * Constructor */ - public function __construct() { + public function __construct() + { $this->user_id = api_get_user_id(); $this->toolname = 'dashboard'; $this->view = new View($this->toolname); @@ -28,8 +30,8 @@ class DashboardController * @param string message (optional) * render to dashboard.php view */ - public function display($msg = false) { - + public function display($msg = false) + { $data = array(); $user_id = $this->user_id; @@ -85,8 +87,8 @@ class DashboardController * This method allow store user blocks from dashboard manager * render to dashboard.php view */ - public function store_user_block() { - + public function store_user_block() + { $data = array(); $user_id = $this->user_id; if (strtoupper($_SERVER['REQUEST_METHOD']) == "POST") { @@ -111,7 +113,8 @@ class DashboardController * This method is used when you close a block from dashboard block interface * render to dashboard.php view */ - public function close_user_block($path) { + public function close_user_block($path) + { $user_id = $this->user_id; $result = DashboardManager::close_user_block($user_id, $path); $this->display($result); diff --git a/main/dashboard/index.php b/main/dashboard/index.php index 12ee4d4482..766bc1909a 100755 --- a/main/dashboard/index.php +++ b/main/dashboard/index.php @@ -32,9 +32,6 @@ if (isset($_GET['action']) && in_array($_GET['action'],$actions)) { $dashboar_plugin_styles = DashboardManager::get_links_for_styles_from_dashboard_plugins(); $htmlHeadXtra[] = $dashboar_plugin_styles; -// interbreadcrumb -//$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('Dashboard')); - // course description controller object $dashboard_controller = new DashboardController(); diff --git a/main/inc/lib/dashboard.lib.php b/main/inc/lib/dashboard.lib.php index 4ee0668a70..902531078b 100755 --- a/main/inc/lib/dashboard.lib.php +++ b/main/inc/lib/dashboard.lib.php @@ -101,7 +101,8 @@ class DashboardManager echo ''; echo '
'; - echo ''; + echo ''; } /** @@ -334,9 +335,8 @@ class DashboardManager * @param int User id * @return void */ - public static function display_user_dashboard_list($user_id) { - - $block_data_without_plugin = self::get_block_data_without_plugin(); + public static function display_user_dashboard_list($user_id) + { $enabled_dashboard_plugins = self::get_enabled_dashboard_blocks(); $user_block_data = self::get_user_block_data($user_id); @@ -382,11 +382,11 @@ class DashboardManager self::display_user_dashboard_list_checkboxes($user_id, $block['id']); echo ''.$block['name'].''; echo ''.$block['description'].''; - echo '
+ echo '
+ '; echo ''; } else { @@ -396,12 +396,14 @@ class DashboardManager echo ''; echo '
'; - echo ''; + echo ''; echo ''; } else { echo '
'.get_lang('ThereAreNoEnabledDashboardPlugins').'
'; if (api_is_platform_admin()) { - echo ''.get_lang('ConfigureDashboardPlugin').''; + echo ''. + get_lang('ConfigureDashboardPlugin').''; } } }