소스 검색

[svn r16209] Added method to set index terms at the learning path level

Yannick Warnier 16 년 전
부모
커밋
e2247a6ff8
1개의 변경된 파일13개의 추가작업 그리고 1개의 파일을 삭제
  1. 13 1
      main/newscorm/learnpath.class.php

+ 13 - 1
main/newscorm/learnpath.class.php

@@ -3567,7 +3567,19 @@ class learnpath {
     	return true;
     	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)
      * Sets the theme of the LP (local/remote) (and save)
      * @param	string	Optional string giving the new theme of this learnpath
      * @param	string	Optional string giving the new theme of this learnpath