From 0560581a7f4beae2b3f667a554925ac21d284aad Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Wed, 4 Sep 2013 11:23:37 +0200 Subject: [PATCH] Fixing PHP warning + format code --- main/admin/course_information.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/main/admin/course_information.php b/main/admin/course_information.php index 3e7e2db70b..aa3e51977e 100644 --- a/main/admin/course_information.php +++ b/main/admin/course_information.php @@ -62,15 +62,16 @@ $tool_name = $course_info['title'].' ('.$course_info['visual_code'].')'; Display::display_header($tool_name); echo '
'; -echo ''.Display::display_icon('home.png', get_lang('CourseHomepage'), array(), ICON_SIZE_MEDIUM).''; +echo ''. + Display::display_icon('home.png', get_lang('CourseHomepage'), array(), ICON_SIZE_MEDIUM).''; echo '
'; echo Display::page_header($tool_name); echo Display::page_subheader(get_lang('CourseUsage')); -$id_session = intval($_GET['id_session']); -$table = new SortableTableFromArray(get_course_usage($course_info['code'],$id_session),0,20,'usage_table'); +$id_session = isset($_GET['id_session']) ? $_GET['id_session'] : 0; +$table = new SortableTableFromArray(get_course_usage($course_info['code'], $id_session), 0, 20,'usage_table'); $table->set_additional_parameters(array ('code' => Security::remove_XSS($_GET['code']))); $table->set_other_tables(array('user_table','class_table')); $table->set_header(0,get_lang('Tool'), true); @@ -152,7 +153,6 @@ if (!empty($extra_fields)) { $value = null; if ($result) { $value = $result['field_value']; - if (is_bool($value)) { $value = $value ? get_lang('Yes') : get_lang('No'); } @@ -167,4 +167,4 @@ if (!empty($extra_fields)) { echo ""; } -Display::display_footer(); \ No newline at end of file +Display::display_footer();