diff --git a/main/course_info/tools.php b/main/course_info/tools.php index 1dffde023f..ad8fbdba89 100644 --- a/main/course_info/tools.php +++ b/main/course_info/tools.php @@ -67,7 +67,6 @@ switch ($action) { } $form->addHtml(''); - $form->setDefaults($tool); $content = $form->returnForm(); @@ -86,7 +85,6 @@ switch ($action) { break; case 'list': default: - $toolList = CourseHome::toolsIconsAction( api_get_course_int_id(), api_get_session_id() @@ -107,26 +105,24 @@ switch ($action) { if (!empty($tool['custom_icon'])) { $image = getCustomWebIconPath().$tool['custom_icon']; - $icon = Display::img($image,$toolName); + $icon = Display::img($image, $toolName); } else { $image = (substr($tool['image'], 0, strpos($tool['image'], '.'))).'.png'; $icon = Display::return_icon( $image, - $tool_name, + $toolName, array('id' => 'tool_'.$tool['id']), ICON_SIZE_BIG, false ); } - $delete = (!empty($tool['custom_icon'])) ? " " : ""; $edit = ''; - $iconsTools .= '
'. $icon . '
'; $iconsTools .= '
' . $toolName . '
'; $iconsTools .= '
' . $edit . $delete . '
'; @@ -136,10 +132,11 @@ switch ($action) { $iconsTools .= ''; $iconsTools .= ''; - $content.=$iconsTools; + $content = $iconsTools; break; } + /** * @return string */ diff --git a/main/inc/introductionSection.inc.php b/main/inc/introductionSection.inc.php index eb4e66f264..3e74ca3f01 100755 --- a/main/inc/introductionSection.inc.php +++ b/main/inc/introductionSection.inc.php @@ -228,7 +228,7 @@ if ($tool == TOOL_COURSE_HOMEPAGE && !isset($_GET['intro_cmdEdit'])) {

- '. $thematic_advance .' : '. $courseInfo['name'] . ' ( '. $thematicScore .' ) + '. $thematic_advance .' : '. $courseInfo['name'] . ' ( '. $thematicScore .' )

@@ -240,11 +240,13 @@ if ($tool == TOOL_COURSE_HOMEPAGE && !isset($_GET['intro_cmdEdit'])) {
-
- '.$thematicScore.' -
+
+ '.$thematicScore.' +
+
+
+ ' . get_lang('ShowFullCourseAdvance') . '
-
' . get_lang('ShowFullCourseAdvance') . '
'; $thematic_description_html .= '
'; @@ -263,13 +265,14 @@ if ($tool == TOOL_COURSE_HOMEPAGE && !isset($_GET['intro_cmdEdit'])) { $thematic_advance_info2['start_date'] = api_get_local_time($thematic_advance_info2['start_date']); $thematic_advance_info2['start_date'] = api_format_date($thematic_advance_info2['start_date'], DATE_TIME_FORMAT_LONG); - $thematic_description_html .= '
-
'.$subTitle2.'
-

'.$thematic_info2['title'].'

-

'.$thematic_advance_info2['start_date'].'

-
'.$thematic_advance_info2['content'].'
-

'.get_lang('DurationInHours').' : '.$thematic_advance_info2['duration'].' - '.get_lang('SeeDetail').'

-
'; + $thematic_description_html .= ' +
+
'.$subTitle2.'
+

'.$thematic_info2['title'].'

+

'.$thematic_advance_info2['start_date'].'

+
'.$thematic_advance_info2['content'].'
+

'.get_lang('DurationInHours').' : '.$thematic_advance_info2['duration'].' - '.get_lang('SeeDetail').'

+
'; } $thematic_description_html.='
'; $thematic_description_html.=''; @@ -289,14 +292,16 @@ if (api_is_allowed_to_edit()) { ['class' => 'btn btn-default', 'title' => get_lang('CustomizeIcons') ] ); } + +$toolbar = ''; if ($intro_dispCommand) { if (empty($intro_content)) { // Displays "Add intro" commands $toolbar = '
'; if (!empty ($GLOBALS['_cid'])) { - $textIntro = ''; - $textIntro .= ' '; - $textIntro .= ""; + $textIntro = ''; + $textIntro .= ' '; + $textIntro .= ""; $toolbar .= $textIntro . $editIconButton; } else { $toolbar .= '"' . get_lang('AddIntro') . ''; @@ -309,10 +314,10 @@ if ($intro_dispCommand) { $toolbar .= '
'; if (!empty ($GLOBALS['_cid'])) { $toolbar .= - ' + ' '; $toolbar .= $editIconButton; - $toolbar .=""; @@ -322,7 +327,7 @@ if ($intro_dispCommand) { "'; $toolbar .= $editIconButton; - $toolbar .= ""; } @@ -351,9 +356,6 @@ if ($intro_dispDefault) { $introduction_section .= $toolbar; $introduction_section .= '
'; - - - $introduction_section .= '
'; $browser = api_get_navigator();