diff --git a/main/newscorm/learnpath.class.php b/main/newscorm/learnpath.class.php index 901acee70d..795ca8a4a5 100644 --- a/main/newscorm/learnpath.class.php +++ b/main/newscorm/learnpath.class.php @@ -5623,7 +5623,7 @@ class learnpath { if ($action != 'move') { $return .= ''; $return .= ''; - $return .= ''; + $return .= ''; $return .= ''; } @@ -5632,7 +5632,7 @@ class learnpath { $return .= ''; $return .= ''; - $return .= ''; $return .= ''; @@ -6681,9 +6681,8 @@ class learnpath { if (isset ($_GET['edit']) && $_GET['edit'] == 'true') { $return .= Display :: return_warning_message('' . get_lang('Warning') . ' !
' . get_lang('WarningEditingDocument'), false); - } - require_once api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php'; - $form = new FormValidator('form', 'POST', api_get_self() . '?' . $_SERVER['QUERY_STRING'], '', 'enctype="multipart/form-data"'); + } + $form = new FormValidator('form', 'POST', api_get_self() . '?' .Security::remove_XSS($_SERVER['QUERY_STRING']), '', array('enctype'=> "multipart/form-data")); $defaults['title'] = Security :: remove_XSS($item_title); if (empty($item_title)) { $defaults['title'] = Security::remove_XSS($item_title); @@ -6691,7 +6690,7 @@ class learnpath { $defaults['description'] = $item_description; $form->addElement('html', $return); if ($action != 'move') { - $form->addElement('text', 'title', get_lang('Title'), 'id="idTitle" class="learnpath_item_form" size=44%'); + $form->addElement('text', 'title', get_lang('Title'), array('id' => 'idTitle', 'class' => 'span4')); $form->applyFilter('title', 'html_filter'); } @@ -6881,8 +6880,7 @@ class learnpath { if (is_numeric($extra_info)) { $form->addElement('style_submit_button', 'submit_button', get_lang('SaveDocument'), 'value="submit_button", class="save"'); $form->addElement('hidden', 'path', $extra_info); - } - elseif (is_array($extra_info)) { + } elseif (is_array($extra_info)) { $form->addElement('style_submit_button', 'submit_button', get_lang('SaveDocument'), 'class="save"'); $form->addElement('hidden', 'path', $extra_info['path']); } diff --git a/main/newscorm/lp_add.php b/main/newscorm/lp_add.php index 27a6a5a95e..1cf6bf233e 100644 --- a/main/newscorm/lp_add.php +++ b/main/newscorm/lp_add.php @@ -139,7 +139,7 @@ $form = new FormValidator('lp_add', 'post', 'lp_controller.php'); $form->addElement('header', null, get_lang('AddLpToStart')); // Title -$form->addElement('text', 'lp_name', api_ucfirst(get_lang('LPName')), array('size' => 43)); +$form->addElement('text', 'lp_name', api_ucfirst(get_lang('LPName')), array('class' => 'span6')); $form->applyFilter('lp_name', 'html_filter'); $form->addRule('lp_name', get_lang('ThisFieldIsRequired'), 'required'); diff --git a/main/newscorm/lp_add_item.php b/main/newscorm/lp_add_item.php index ff0b29915c..66ff131545 100644 --- a/main/newscorm/lp_add_item.php +++ b/main/newscorm/lp_add_item.php @@ -149,6 +149,10 @@ $isStudentView = (int) $_REQUEST['isStudentView']; $learnpath_id = (int) $_REQUEST['lp_id']; $submit = $_POST['submit_button']; + +$type = isset($_GET['type']) ? $_GET['type'] : null; +$action = isset($_GET['action']) ? $_GET['action'] : null; + // Using the resource linker as a tool for adding resources to the learning path. if ($action == 'add' && $type == 'learnpathitem') { $htmlHeadXtra[] = ""; @@ -184,13 +188,11 @@ if (!empty($gradebook) && $gradebook == 'view') { ); } -$type = isset($_GET['type']) ? $_GET['type'] : null; -$action = isset($_GET['action']) ? $_GET['action'] : null; $interbreadcrumb[] = array('url' => 'lp_controller.php?action=list', 'name' => get_lang('LearningPaths')); $interbreadcrumb[] = array('url' => api_get_self()."?action=build&lp_id=$learnpath_id", 'name' => stripslashes("{$therow['name']}")); -switch($type) { +switch ($type) { case 'chapter': $interbreadcrumb[]= array ('url' => '#', 'name' => get_lang('NewChapter')); break;