From 272cc88766b91f3109473874d98b99fef3361411 Mon Sep 17 00:00:00 2001 From: Eric Marguin Date: Wed, 18 Apr 2007 17:34:55 +0200 Subject: [PATCH] [svn r12055] update the name of the lp on the link on the homepage too --- main/newscorm/learnpath.class.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/main/newscorm/learnpath.class.php b/main/newscorm/learnpath.class.php index f0eee572ee..ea830a4419 100644 --- a/main/newscorm/learnpath.class.php +++ b/main/newscorm/learnpath.class.php @@ -3797,7 +3797,17 @@ class learnpath { //$res = Database::query($sql); - $res = api_sql_query($sql); + $res = api_sql_query($sql, __FILE__, __LINE__); + + // if the lp is visible on the homepage, change his name there + if(mysql_affected_rows()) + { + $table = Database :: get_course_table(TABLE_TOOL_LIST); + $sql = 'UPDATE '.$table.' SET + name = "'.$this->name.'" + WHERE link = "newscorm/lp_controller.php?action=view&lp_id='.$lp_id.'"'; + api_sql_query($sql, __FILE__, __LINE__); + } return true;