diff --git a/index.php b/index.php index 6ca2abff24..292e1d0d15 100644 --- a/index.php +++ b/index.php @@ -127,7 +127,7 @@ if (!empty($_POST['submitAuth'])) { } if (api_get_setting('display_categories_on_homepage') == 'true') { - $controller->tpl->assign('content', $controller->return_anonymous_course_list()); + $controller->tpl->assign('course_category_block', $controller->return_courses_in_categories()); } // Facebook connexion, if activated diff --git a/main/attendance/attendance_controller.php b/main/attendance/attendance_controller.php index f74c08adda..61ee3c8c92 100644 --- a/main/attendance/attendance_controller.php +++ b/main/attendance/attendance_controller.php @@ -522,8 +522,6 @@ $head_table[] = $array_p2; */ //echo "
"; print_r($head_table); echo "
"; exit(); - - export_pdf_attendance(&$head_table, &$data_table, &$header_pdf, $footer_pdf, $title_pdf); - + export_pdf_attendance($head_table, $data_table, $header_pdf, $footer_pdf, $title_pdf); } } diff --git a/main/css/base_chamilo.css b/main/css/base_chamilo.css index b1dc14c7ec..8ccbf91886 100755 --- a/main/css/base_chamilo.css +++ b/main/css/base_chamilo.css @@ -499,16 +499,7 @@ a.nobold:hover { margin: 0; padding: 4px 0 0 10px; } -/* divs for category list / platform news on home page */ -.home_cats { - width: 45%; - float: left; - position: relative; - margin: 0; - padding: 0px; - padding-top: 8px; - background: transparent; -} + .home_news { width: 45%; float: right; diff --git a/main/css/blue_lagoon/default.css b/main/css/blue_lagoon/default.css index 6a73a9e18d..601effa102 100644 --- a/main/css/blue_lagoon/default.css +++ b/main/css/blue_lagoon/default.css @@ -1159,16 +1159,7 @@ span.form_error { margin: 0; padding: 4px 0 0 10px; } -/* divs for category list / platform news on home page */ -.home_cats { - width: 45%; - float: left; - position: relative; - margin: 0; - padding: 0px; - padding-top: 8px; - background: #fff; -} + .home_news { width: 45%; float: right; diff --git a/main/css/cool_blue/default.css b/main/css/cool_blue/default.css index d14e6e49c6..77be565e46 100644 --- a/main/css/cool_blue/default.css +++ b/main/css/cool_blue/default.css @@ -1107,16 +1107,7 @@ span.form_error { margin: 0; padding: 4px 0 0 10px; } -/* divs for category list / platform news on home page */ -.home_cats { - width: 45%; - float: left; - position: relative; - margin: 0; - padding: 0px; - padding-top: 8px; - background: #fff; -} + .home_news { width: 45%; float: right; diff --git a/main/css/delicious_bordeaux/default.css b/main/css/delicious_bordeaux/default.css index 26512b01ef..a6ebc110a0 100644 --- a/main/css/delicious_bordeaux/default.css +++ b/main/css/delicious_bordeaux/default.css @@ -1119,16 +1119,7 @@ span.form_error { margin: 0; padding: 4px 0 0 10px; } -/* divs for category list / platform news on home page */ -.home_cats { - width: 45%; - float: left; - position: relative; - margin: 0; - padding: 0px; - padding-top: 8px; - background: #fff; -} + .home_news { width: 45%; float: right; diff --git a/main/css/dokeos_blue/default.css b/main/css/dokeos_blue/default.css index 3019e06942..79a4cbdcd8 100644 --- a/main/css/dokeos_blue/default.css +++ b/main/css/dokeos_blue/default.css @@ -1128,16 +1128,6 @@ span.form_error { margin: 0; padding: 4px 0 0 10px; } -/* divs for category list / platform news on home page */ -.home_cats { - width: 45%; - float: left; - position: relative; - margin: 0; - padding: 0px; - padding-top: 8px; - background: #fff; -} .home_news { width: 45%; float: right; diff --git a/main/css/dokeos_classic/default.css b/main/css/dokeos_classic/default.css index b02e8351f7..c99f718ff8 100644 --- a/main/css/dokeos_classic/default.css +++ b/main/css/dokeos_classic/default.css @@ -998,16 +998,6 @@ span.form_error { margin: 0; padding: 4px 0 0 10px; } -/* divs for category list / platform news on home page */ -.home_cats { - width: 45%; - float: left; - position: relative; - margin: 0; - padding: 0px; - padding-top: 8px; - background: #fff; -} .home_news { width: 45%; float: right; diff --git a/main/css/dokeos_classic_2D/default.css b/main/css/dokeos_classic_2D/default.css index c2e179c563..41e749cf21 100644 --- a/main/css/dokeos_classic_2D/default.css +++ b/main/css/dokeos_classic_2D/default.css @@ -1055,21 +1055,6 @@ span.form_error { margin: 0; padding: 4px 0 0 10px; } -/* -============================================================================== - divs for category list / platform news on home page -============================================================================== -*/ - -.home_cats { - background: #fff; - float: left; - margin: 0; - padding: 0px; - padding-top: 8px; - position: relative; - width: 45%; -} .home_news { background: #fff; float: right; diff --git a/main/css/empire_green/default.css b/main/css/empire_green/default.css index d3a373738f..28d8eeaaea 100644 --- a/main/css/empire_green/default.css +++ b/main/css/empire_green/default.css @@ -1117,16 +1117,6 @@ span.form_error { margin: 0; padding: 4px 0 0 10px; } -/* divs for category list / platform news on home page */ -.home_cats { - width: 45%; - float: left; - position: relative; - margin: 0; - padding: 0px; - padding-top: 8px; - background: #fff; -} .home_news { width: 45%; float: right; diff --git a/main/css/fruity_orange/default.css b/main/css/fruity_orange/default.css index 6197ee717f..aacd02bc7b 100644 --- a/main/css/fruity_orange/default.css +++ b/main/css/fruity_orange/default.css @@ -1125,16 +1125,7 @@ span.form_error { margin: 0; padding: 4px 0 0 10px; } -/* divs for category list / platform news on home page */ -.home_cats { - width: 45%; - float: left; - position: relative; - margin: 0; - padding: 0px; - padding-top: 8px; - background: #fff; -} + .home_news { width: 45%; float: right; diff --git a/main/css/medical/default.css b/main/css/medical/default.css index 7d791fdf54..47f2545de9 100644 --- a/main/css/medical/default.css +++ b/main/css/medical/default.css @@ -1099,16 +1099,6 @@ span.form_error { margin: 0; padding: 4px 0 0 10px; } -/* divs for category list / platform news on home page */ -.home_cats { - width: 45%; - float: left; - position: relative; - margin: 0; - padding: 0px; - padding-top: 8px; - background: transparent; -} .home_news { width: 45%; float: right; diff --git a/main/css/public_admin/default.css b/main/css/public_admin/default.css index 4a6e2c8940..935657c0b3 100644 --- a/main/css/public_admin/default.css +++ b/main/css/public_admin/default.css @@ -868,16 +868,7 @@ span.form_error { margin: 0; padding: 4px 0 0 10px; } -/* divs for category list / platform news on home page */ -.home_cats { - width: 45%; - float: left; - position: relative; - margin: 0; - padding: 0px; - padding-top: 8px; - background: transparent; -} + .home_news { width: 45%; float: right; diff --git a/main/css/royal_purple/default.css b/main/css/royal_purple/default.css index 9423eb6e51..ba603f771e 100644 --- a/main/css/royal_purple/default.css +++ b/main/css/royal_purple/default.css @@ -1076,16 +1076,7 @@ span.form_error { margin: 0; padding: 4px 0 0 10px; } -/* divs for category list / platform news on home page */ -.home_cats { - width: 45%; - float: left; - position: relative; - margin: 0; - padding: 0px; - padding-top: 8px; - background: #fff; -} + .home_news { width: 45%; float: right; diff --git a/main/css/sober_brown/default.css b/main/css/sober_brown/default.css index 16f4782abd..0b4f18392c 100644 --- a/main/css/sober_brown/default.css +++ b/main/css/sober_brown/default.css @@ -760,16 +760,7 @@ span.form_error { margin: 0; padding: 4px 0 0 10px; } -/* divs for category list / platform news on home page */ -.home_cats { - width: 45%; - float: left; - position: relative; - margin: 0; - padding: 0px; - padding-top: 8px; - background: transparent; -} + .home_news { width: 45%; float: right; diff --git a/main/css/steel_grey/default.css b/main/css/steel_grey/default.css index 02eb30e9d9..e9d771feec 100644 --- a/main/css/steel_grey/default.css +++ b/main/css/steel_grey/default.css @@ -1109,16 +1109,7 @@ span.form_error { margin: 0; padding: 4px 0 0 10px; } -/* divs for category list / platform news on home page */ -.home_cats { - width: 45%; - float: left; - position: relative; - margin: 0; - padding: 0px; - padding-top: 8px; - background: #fff; -} + .home_news { width: 45%; float: right; diff --git a/main/css/tasty_olive/default.css b/main/css/tasty_olive/default.css index b327e9efe6..146a55542d 100644 --- a/main/css/tasty_olive/default.css +++ b/main/css/tasty_olive/default.css @@ -1053,16 +1053,7 @@ span.form_error { margin: 0; padding: 4px 0 0 10px; } -/* divs for category list / platform news on home page */ -.home_cats { - width: 45%; - float: left; - position: relative; - margin: 0; - padding: 0px; - padding-top: 8px; - background: #fff; -} + .home_news { width: 45%; float: right; diff --git a/main/inc/lib/database.lib.php b/main/inc/lib/database.lib.php index 24a0aec598..9231a3a97e 100644 --- a/main/inc/lib/database.lib.php +++ b/main/inc/lib/database.lib.php @@ -567,7 +567,7 @@ class Database { * @param resource $connection (optional) The database server connection, for detailed description see the method query(). * @return string/boolean Returns string data on success or FALSE on failure. */ - public function get_host_info($connection = null) { + public static function get_host_info($connection = null) { return self::use_default_connection($connection) ? mysql_get_host_info() : mysql_get_host_info($connection); } @@ -576,7 +576,7 @@ class Database { * @param resource $connection (optional) The database server connection, for detailed description see the method query(). * @return int/boolean Returns the protocol version on success or FALSE on failure. */ - public function get_proto_info($connection = null) { + public static function get_proto_info($connection = null) { return self::use_default_connection($connection) ? mysql_get_proto_info() : mysql_get_proto_info($connection); } @@ -585,7 +585,7 @@ class Database { * @param resource $connection (optional) The database server connection, for detailed description see the method query(). * @return string/boolean Returns the MySQL server version on success or FALSE on failure. */ - public function get_server_info($connection = null) { + public static function get_server_info($connection = null) { return self::use_default_connection($connection) ? mysql_get_server_info() : mysql_get_server_info($connection); } diff --git a/main/inc/lib/display.lib.php b/main/inc/lib/display.lib.php index 1f25c123a2..ae5524335f 100644 --- a/main/inc/lib/display.lib.php +++ b/main/inc/lib/display.lib.php @@ -1292,7 +1292,7 @@ class Display { * @param bool add a div wrapper * @todo use templates **/ - public function return_rating_system($id, $url, $point_info = array(), $add_div_wrapper = true) { + public static function return_rating_system($id, $url, $point_info = array(), $add_div_wrapper = true) { $number_of_users_who_voted = isset($point_info['users_who_voted']) ? $point_info['users_who_voted'] : null; $percentage = isset($point_info['point_average']) ? $point_info['point_average'] : 0; @@ -1336,11 +1336,11 @@ class Display { return $html; } - function return_default_table_class() { + public static function return_default_table_class() { return 'data_table'; } - public function page_header($title, $second_title = null) { + public static function page_header($title, $second_title = null) { $title = Security::remove_XSS($title); if (!empty($second_title)) { $second_title = Security::remove_XSS($second_title); @@ -1349,17 +1349,17 @@ class Display { return ''; } - public function page_header_and_translate($title, $second_title = null) { + public static function page_header_and_translate($title, $second_title = null) { $title = get_lang($title); return self::page_header($title, $second_title); } - public function page_subheader_and_translate($title, $second_title = null) { + public static function page_subheader_and_translate($title, $second_title = null) { $title = get_lang($title); return self::page_subheader($title, $second_title); } - public function page_subheader($title, $second_title = null) { + public static function page_subheader($title, $second_title = null) { if (!empty($second_title)) { $second_title = Security::remove_XSS($second_title); $title .= " $second_title"; @@ -1380,7 +1380,7 @@ class Display { return $html; } - function bar_progress($percentage, $show_percentage = true, $extra_info = null) { + public static function bar_progress($percentage, $show_percentage = true, $extra_info = null) { $percentage = intval($percentage); $div = '
@@ -1395,7 +1395,7 @@ class Display { return $div; } - function badge($count, $type ="warning") { + public static function badge($count, $type ="warning") { $class = ''; switch ($type) { @@ -1422,7 +1422,7 @@ class Display { return null; } - function badge_group($badge_list) { + public static function badge_group($badge_list) { $html = '
'; foreach ($badge_list as $badge) { $html .= $badge; @@ -1431,7 +1431,7 @@ class Display { return $html; } - function label($content, $type = null) { + public static function label($content, $type = null) { $class = ''; switch ($type) { case 'success': @@ -1460,7 +1460,7 @@ class Display { return $html; } - function actions($items) { + public static function actions($items) { if (!empty($items)) { $html = '
{% endif %} - {# ?? #} + {# Portal homepage #} {% if home_page_block %} -
+
- {{ home_page_block}} + {{ home_page_block }}
{% endif %} - + {# ?? #} {{ sniff_notification }} @@ -33,16 +33,27 @@ {{ content }}
{% endif %} - + {# Announcements #} {% if announcements_block %} -
+
{{ announcements_block }}
{% endif %} - + + {# Course categories (must be turned on in the admin settings) #} + {% if course_category_block %} +
+
+
+ {{ course_category_block }} +
+
+
+ {% endif %} + {# Hot courses template #} - {% include "default/layout/hot_courses.tpl" %} + {% include "default/layout/hot_courses.tpl" %} {# Content bottom #} {% if plugin_content_bottom %} diff --git a/plugin/bbb/config.php b/plugin/bbb/config.php index a8e79220ec..fda6f94043 100644 --- a/plugin/bbb/config.php +++ b/plugin/bbb/config.php @@ -4,5 +4,8 @@ /* bbb parameters that will be registered in the course settings */ require_once '../../main/inc/global.inc.php'; +require_once api_get_path(LIBRARY_PATH).'plugin.class.php'; + require_once 'lib/bbb.lib.php'; -require_once 'lib/bbb_api.php'; \ No newline at end of file +require_once 'lib/bbb_api.php'; +require_once 'lib/bbb_plugin.class.php'; \ No newline at end of file diff --git a/plugin/bbb/install.php b/plugin/bbb/install.php index 3b5bba2956..5b38d0d2ae 100644 --- a/plugin/bbb/install.php +++ b/plugin/bbb/install.php @@ -8,5 +8,5 @@ * Initialization */ -require_once 'config.php'; +require_once dirname(__FILE__).'/config.php'; BBBPlugin::create()->install(); \ No newline at end of file diff --git a/plugin/bbb/lib/bbb.lib.php b/plugin/bbb/lib/bbb.lib.php index 2b90ac3b66..22bb147a67 100644 --- a/plugin/bbb/lib/bbb.lib.php +++ b/plugin/bbb/lib/bbb.lib.php @@ -4,9 +4,6 @@ * @package chamilo.plugin.bigbluebutton */ -require_once api_get_path(LIBRARY_PATH).'plugin.class.php'; -require_once 'bbb_plugin.class.php'; - class bbb { var $url; diff --git a/plugin/bbb/listing.php b/plugin/bbb/listing.php index 23079d55c7..30f17744ef 100644 --- a/plugin/bbb/listing.php +++ b/plugin/bbb/listing.php @@ -8,7 +8,7 @@ */ $course_plugin = 'bbb'; //needed in order to load the plugin lang variables -require_once 'config.php'; +require_once dirname(__FILE__).'/config.php'; $tool_name = get_lang('Videoconference'); $tpl = new Template($tool_name); diff --git a/plugin/bbb/plugin.php b/plugin/bbb/plugin.php index 0b24ed9070..4c38a011e1 100644 --- a/plugin/bbb/plugin.php +++ b/plugin/bbb/plugin.php @@ -1,4 +1,4 @@ get_info(); \ No newline at end of file diff --git a/plugin/bbb/start.php b/plugin/bbb/start.php index aa5d59dbfb..69de4bdb6a 100644 --- a/plugin/bbb/start.php +++ b/plugin/bbb/start.php @@ -8,7 +8,7 @@ */ $course_plugin = 'bbb'; //needed in order to load the plugin lang variables -require_once 'config.php'; +require_once dirname(__FILE__).'/config.php'; $tool_name = get_lang('Videoconference'); $tpl = new Template($tool_name); $bbb = new bbb(); diff --git a/plugin/bbb/uninstall.php b/plugin/bbb/uninstall.php index 4167a208a2..e8f6b3d23a 100644 --- a/plugin/bbb/uninstall.php +++ b/plugin/bbb/uninstall.php @@ -9,5 +9,5 @@ /** * Queries */ -require_once 'config.php'; +require_once dirname(__FILE__).'/config.php'; BBBPlugin::create()->uninstall(); \ No newline at end of file diff --git a/plugin/olpc_peru_filter/install.php b/plugin/olpc_peru_filter/install.php index da546374e3..d95a8ed8b8 100644 --- a/plugin/olpc_peru_filter/install.php +++ b/plugin/olpc_peru_filter/install.php @@ -9,5 +9,5 @@ * Initialization */ -require_once 'config.php'; +require_once dirname(__FILE__).'/config.php'; OLPC_Peru_FilterPlugin::create()->install(); \ No newline at end of file diff --git a/plugin/olpc_peru_filter/plugin.php b/plugin/olpc_peru_filter/plugin.php index 4da5e508fd..775d8bf38b 100644 --- a/plugin/olpc_peru_filter/plugin.php +++ b/plugin/olpc_peru_filter/plugin.php @@ -1,4 +1,4 @@ get_info(); diff --git a/plugin/olpc_peru_filter/uninstall.php b/plugin/olpc_peru_filter/uninstall.php index 213dfcb190..e1813f8e50 100644 --- a/plugin/olpc_peru_filter/uninstall.php +++ b/plugin/olpc_peru_filter/uninstall.php @@ -9,5 +9,5 @@ /** * Queries */ -require_once 'config.php'; +require_once dirname(__FILE__).'/config.php'; OLPC_Peru_FilterPlugin::create()->uninstall();