From 20423ee5697aa5d5e1a7ac1e862edee3a9084cc7 Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Wed, 7 Nov 2007 23:15:17 +0100 Subject: [PATCH] [svn r13642] Minor - Fixed bug preventing the last position to be selected by default on new chapter creation --- main/newscorm/learnpath.class.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/main/newscorm/learnpath.class.php b/main/newscorm/learnpath.class.php index a17ab8afa6..2fc1b18e32 100644 --- a/main/newscorm/learnpath.class.php +++ b/main/newscorm/learnpath.class.php @@ -5582,8 +5582,7 @@ function display_thread_form($action = 'add', $id = 0, $extra_info = '') foreach($arrHide as $key => $value){ $position->addOption($value['value'],$key,'style="padding-left:'.$value['padding'].'px;"'); } - if(empty($s_selected_position)) - $position -> setSelected($s_selected_position); + if(!empty($s_selected_position)) { $position->setSelected($s_selected_position); } if(is_array($arrLP)) { reset($arrLP); } if($action != 'move'){