From d3a64974aaf54d16d42bc10764899e48407a664c Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Tue, 14 Jul 2015 15:42:03 +0200 Subject: [PATCH] Fix PHP warnings. --- main/admin/settings.php | 3 ++- main/document/create_audio.php | 26 ++++++++---------------- main/gradebook/lib/be/category.class.php | 14 ++++++------- 3 files changed, 18 insertions(+), 25 deletions(-) diff --git a/main/admin/settings.php b/main/admin/settings.php index 284ba65d43..30a4a69860 100755 --- a/main/admin/settings.php +++ b/main/admin/settings.php @@ -521,8 +521,9 @@ if (!empty($_GET['category'])) { handle_templates(); break; case 'search_setting': - search_setting($_REQUEST['search_field']); if (isset($_REQUEST['search_field'])) { + + search_setting($_REQUEST['search_field']); $form->display(); } break; diff --git a/main/document/create_audio.php b/main/document/create_audio.php index 1e4fe23b9e..9cf8add63c 100755 --- a/main/document/create_audio.php +++ b/main/document/create_audio.php @@ -126,11 +126,7 @@ for ($i = 0; $i < $array_len; $i++) { $url_dir = 'document.php?&curdirpath='.$dir_acum.$dir_array[$i]; //Max char 80 $url_to_who = cut($dir_array[$i],80); - if ($is_certificate_mode) { - $interbreadcrumb[] = array('url' => $url_dir.'&selectcat='.Security::remove_XSS($_GET['selectcat']), 'name' => $url_to_who); - } else { - $interbreadcrumb[] = array('url' => $url_dir, 'name' => $url_to_who); - } + $interbreadcrumb[] = array('url' => $url_dir, 'name' => $url_to_who); $dir_acum .= $dir_array[$i].'/'; } @@ -193,13 +189,14 @@ $(document).ready(function(){
get_course_code(); + $params['name'] = $component['acronym']; + $params['description'] = $component['title']; + $params['user_id'] = api_get_user_id(); + $params['parent_id'] = $id; + $params['weight'] = $component['percentage'] / 100 * $default_weight; + $params['session_id'] = api_get_session_id(); + $params['course_code'] = $this->get_course_code(); $gradebook->save($params); }