Bug #2627
closedadding objects to learning path...
100%
Description
Not able to add objects to learning path using the pulldown select menu. In ff and ie....
Adding objects with click on icons works...
Updated by Anonymous over 12 years ago
Unfortunately my expertise of chamilo doesn't enable me to fix this but this is what I found :
The dropdown list is generated in repository/php/lib/content_object_type_selector.class.php#pepare() the 2 intersting lines are :
$this->form = new FormValidator('select_content_object_type', 'post', $this->parent->get_url());
$select = $this->form->addElement('select', self :: PARAM_CONTENT_OBJECT_TYPE, Translation :: get('CreateANew'), array(), array('class' => 'learning-object-creation-type postback'));
So the url of the action is found via $this->parent->get_url() (I guess its current url) and the name of the field is self :: PARAM_CONTENT_OBJECT_TYPE ('content_object_type')
the icons are generated in another class : repository/content_object/learning_path/php/builder/component/browser.class.php#get_content_object_type_creation_url($type) with following lines :
return $this->get_url(array(
ComplexBuilder :: PARAM_BUILDER_ACTION => LearningPathBuilder :: ACTION_CREATE_LP_ITEM,
ComplexBuilder :: PARAM_TYPE => $type,
ComplexBuilder :: PARAM_COMPLEX_CONTENT_OBJECT_ITEM_ID => $this->get_complex_content_object_item_id()));
If I get it right the url is thus based on the current one but the param builder_action is appended AND the object_type param is ComplexBuilder :: PARAM_TYPE ("type") instead of ContentObjectTypeSelector :: :: PARAM_CONTENT_OBJECT_TYPE ('content_object_type')
Hope that helps
Updated by Sven Vanpoucke over 12 years ago
I believe that the postback of the form isn't correctly because it should be redirected to the action 'item_creator' instead of the current action 'browser'
/chamilo/core.php?renderer=table&application=repository&object=10&go=complex_builder&builder_action=browser&category=0
Updated by Sven Vanpoucke over 12 years ago
- Status changed from New to Needs testing
- % Done changed from 0 to 100
Updated by Stefaan Vanbillemont over 12 years ago
- Status changed from Needs testing to Bug resolved
Updated by Stefaan Vanbillemont about 12 years ago
- Project changed from Chamilo LCMS Connect to Common
- Category deleted (
39)
Updated by Stefaan Vanbillemont about 12 years ago
- Target version changed from 21 to 2.1.0