From e2247a6ff81deb88378d0ce9d904c20dadb4c854 Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Tue, 2 Sep 2008 06:54:01 +0200 Subject: [PATCH] [svn r16209] Added method to set index terms at the learning path level --- main/newscorm/learnpath.class.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/main/newscorm/learnpath.class.php b/main/newscorm/learnpath.class.php index 6bd85c60c6..ee6989cbde 100644 --- a/main/newscorm/learnpath.class.php +++ b/main/newscorm/learnpath.class.php @@ -3567,7 +3567,19 @@ class learnpath { return true; } - + /** + * Set index terms for all items in this path + * @param string Comma-separated list of terms + * @return boolean False on error, true otherwise + */ + function set_terms($terms) { + if ( empty($terms) ) return false; + + foreach ( $this->items as $item ) { + $item->set_terms($terms); + } + return true; + } /** * Sets the theme of the LP (local/remote) (and save) * @param string Optional string giving the new theme of this learnpath