Minor - flint fixes

pull/2744/head
Julio Montoya 6 years ago
parent 06ba4ea898
commit aa7dc27aa9
  1. 23
      main/course_info/infocours.php
  2. 2
      main/inc/lib/course_category.lib.php
  3. 9
      main/inc/lib/formvalidator/FormValidator.class.php
  4. 1
      main/install/install.lib.php
  5. 2
      user_portal.php

@ -51,30 +51,32 @@ $form = new FormValidator(
api_get_self().'?'.api_get_cidreq()
);
// COURSE SETTINGS
function card_settings_open($id, $title, $open = false, $icon, $parent){
function card_settings_open($id, $title, $open = false, $icon, $parent)
{
$html = '<div class="card">';
$html .= '<div class="card-header" id="card_'.$id.'">';
$html .= '<h5 class="card-title">';
$html .= '<a role="button" class="'.(($open) ? 'collapse':' ').'" data-toggle="collapse" data-target="#collapse_'.$id.'" aria-expanded="true" aria-controls="collapse_'.$id.'">';
if($icon){
$html .= Display::return_icon($icon,null,null,ICON_SIZE_SMALL);
$html .= '<a role="button" class="'.(($open) ? 'collapse' : ' ').'" data-toggle="collapse" data-target="#collapse_'.$id.'" aria-expanded="true" aria-controls="collapse_'.$id.'">';
if ($icon) {
$html .= Display::return_icon($icon, null, null, ICON_SIZE_SMALL);
}
$html .= $title;
$html .= '</a></h5></div>';
$html .= '<div id="collapse_'.$id.'" class="collapse show" aria-labelledby="heading_'.$id.'" data-parent="#'.$parent.'">';
$html .= '<div class="card-body">';
return $html;
}
function card_settings_close(){
function card_settings_close()
{
$html = '</div></div></div>';
return $html;
}
$form->addHtml(card_settings_open('course_settings', get_lang('CourseSettings'), true, 'settings.png', 'accordionSettings'));
$image = '';
@ -638,8 +640,7 @@ if (api_get_setting('allow_course_theme') == 'true') {
0
);
$globalGroup[get_lang("AllowLearningPathTheme")]= $group;
$globalGroup[get_lang("AllowLearningPathTheme")] = $group;
}
$allowLPReturnLink = api_get_setting('allow_lp_return_link');
@ -707,7 +708,6 @@ if ($isEditable) {
$form->freeze();
}
$form->addPanelOption(
'config_lp',
get_lang('ConfigLearnpath'),
@ -1052,13 +1052,10 @@ if ($show_delete_watermark_text_message) {
//Template Course Info
$tpl = new Template($nameTools);
Display::display_header($nameTools, 'Settings');
//$form->display();
$tpl->assign('course_settings', $form->returnForm());
$courseInfoLayout = $tpl->get_template("course_info/index.html.twig");
$content = $tpl->fetch($courseInfoLayout);

@ -50,8 +50,10 @@ class CourseCategory
$category['access_url_id'] = $result['access_url_id'];
}
$category['course_count'] = self::countCoursesInCategory($categoryCode);
return $category;
}
return [];
}

@ -947,17 +947,16 @@ EOT;
*/
public function addPanelOption($name, $title, $groupList, $icon, $open = false, $parent)
{
$html = '<div class="card">';
$html .= '<div class="card-header" id="card_'.$name.'">';
$html .= '<h5 class="card-title">';
$html .= '<a role="button" class="'.(($open) ? 'collapse':' ').'" data-toggle="collapse" data-target="#collapse_'.$name.'" aria-expanded="true" aria-controls="collapse_'.$name.'">';
if($icon){
$html .= Display::return_icon($icon,null,null,ICON_SIZE_SMALL);
$html .= '<a role="button" class="'.(($open) ? 'collapse' : ' ').'" data-toggle="collapse" data-target="#collapse_'.$name.'" aria-expanded="true" aria-controls="collapse_'.$name.'">';
if ($icon) {
$html .= Display::return_icon($icon, null, null, ICON_SIZE_SMALL);
}
$html .= $title;
$html .= '</a></h5></div>';
$html .= '<div id="collapse_'.$name.'" class="collapse '.(($open) ? 'show':' ').'" aria-labelledby="heading_'.$name.'" data-parent="#'.$parent.'">';
$html .= '<div id="collapse_'.$name.'" class="collapse '.(($open) ? 'show' : ' ').'" aria-labelledby="heading_'.$name.'" data-parent="#'.$parent.'">';
$html .= '<div class="card-body">';
$this->addHtml($html);

@ -856,7 +856,6 @@ function display_requirements(
</table>';
echo '</div>';
// RECOMMENDED SETTINGS
// Note: these are the settings for Joomla, does this also apply for Chamilo?
// Note: also add upload_max_filesize here so that large uploads are possible

@ -235,7 +235,7 @@ if (api_get_setting('go_to_course_after_login') === 'true') {
}
}
$showWelcomeCourse = false;
$showWelcomeCourse = false;
// Show the chamilo mascot
if (empty($courseAndSessions['html']) && !isset($_GET['history'])) {
$controller->setWelComeCourse();

Loading…
Cancel
Save