diff --git a/main/course_description/index.php b/main/course_description/index.php index 7ba8c1f785..5a6fb70491 100644 --- a/main/course_description/index.php +++ b/main/course_description/index.php @@ -1,4 +1,4 @@ - "#", "name" => get_lang('GeneralDescription')); -if($description_id == 2) $interbreadcrumb[] = array ("url" => "#", "name" => get_lang('Objectives')); -if($description_id == 3) $interbreadcrumb[] = array ("url" => "#", "name" => get_lang('Topics')); -if($description_id == 4) $interbreadcrumb[] = array ("url" => "#", "name" => get_lang('Methodology')); -if($description_id == 5) $interbreadcrumb[] = array ("url" => "#", "name" => get_lang('CourseMaterial')); -if($description_id == 6) $interbreadcrumb[] = array ("url" => "#", "name" => get_lang('HumanAndTechnicalResources')); -if($description_id == 7) $interbreadcrumb[] = array ("url" => "#", "name" => get_lang('Assessment')); -if($description_id == 8) $interbreadcrumb[] = array ("url" => "#", "name" => get_lang('NewBloc')); +if(intval($description_id) == 1) $interbreadcrumb[] = array ("url" => "#", "name" => get_lang('GeneralDescription')); +if(intval($description_id) == 2) $interbreadcrumb[] = array ("url" => "#", "name" => get_lang('Objectives')); +if(intval($description_id) == 3) $interbreadcrumb[] = array ("url" => "#", "name" => get_lang('Topics')); +if(intval($description_id) == 4) $interbreadcrumb[] = array ("url" => "#", "name" => get_lang('Methodology')); +if(intval($description_id) == 5) $interbreadcrumb[] = array ("url" => "#", "name" => get_lang('CourseMaterial')); +if(intval($description_id) == 6) $interbreadcrumb[] = array ("url" => "#", "name" => get_lang('HumanAndTechnicalResources')); +if(intval($description_id) == 7) $interbreadcrumb[] = array ("url" => "#", "name" => get_lang('Assessment')); +if(intval($description_id) == 8) $interbreadcrumb[] = array ("url" => "#", "name" => get_lang('NewBloc')); api_protect_course_script(true); $nameTools = get_lang('CourseProgram'); @@ -134,7 +132,8 @@ $default_description_title_editable[7] = true; ============================================================================== */ -if (api_is_allowed_to_edit() && !is_null($description_id) || $action =='add') { +if (api_is_allowed_to_edit() && !is_null($description_id) || $action =='add') { + $description_id = intval($description_id); // Delete a description block if ($action == 'delete') { $sql = "DELETE FROM $tbl_course_description WHERE id='".$description_id."'"; @@ -296,7 +295,7 @@ if ($show_description_list) { $categories[ADD_BLOCK] = get_lang('NewBloc'); $i=1; - echo '
'; + echo '
'; ksort($categories); foreach ($categories as $id => $title) { if ($i==8) {