From 1e375a1b39d1dd9e6b3874444d14514d3826f904 Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Tue, 2 Sep 2008 06:57:22 +0200 Subject: [PATCH] [svn r16210] Added call to set terms at learning path level upon edition --- main/newscorm/lp_controller.php | 3 ++- main/newscorm/lp_edit.php | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/main/newscorm/lp_controller.php b/main/newscorm/lp_controller.php index 38a6be5eff..2f63390516 100644 --- a/main/newscorm/lp_controller.php +++ b/main/newscorm/lp_controller.php @@ -585,7 +585,8 @@ switch($action) $_SESSION['oLP']->set_maker($_REQUEST['lp_maker']); $_SESSION['oLP']->set_proximity($_REQUEST['lp_proximity']); $_SESSION['oLP']->set_theme($_REQUEST['lp_theme']); - + $_SESSION['oLP']->set_terms($_REQUEST['lp_terms']); + if ($_REQUEST['remove_picture']) { $_SESSION['oLP']->delete_lp_image(); diff --git a/main/newscorm/lp_edit.php b/main/newscorm/lp_edit.php index dece9e7fd5..acb29ecdfc 100644 --- a/main/newscorm/lp_edit.php +++ b/main/newscorm/lp_edit.php @@ -113,6 +113,12 @@ $form->addElement('html', $div); $form->addRule('lp_preview_image', get_lang('OnlyImagesAllowed'), 'mimetype', array('image/gif', 'image/jpeg', 'image/png')); +// Search terms (only if search is activated) +if (api_get_setting('search_enabled') == 'true') +{ + $form -> addElement('text', 'lp_terms', get_lang('SearchFeatureTerms')); + $defaults['lp_terms'] = $_SESSION['oLP']->get_common_index_terms(); +} //default values $content_proximity_select -> setSelected($s_selected_proximity);