/** * Get the terms stored at database * @return array Array of terms */ function get_terms_on_db($prefix, $course_code, $tool_id, $ref_id) { require_once api_get_path(LIBRARY_PATH) . 'specific_fields_manager.lib.php'; $terms = get_specific_field_values_list_by_prefix($prefix, $course_code, $tool_id, $ref_id); $prefix_terms = array(); foreach ($terms as $term) { $prefix_terms[] = $term['value']; } return $prefix_terms; }
/** * Get the specific prefix index terms of this learning path * @return array Array of terms */ function get_common_index_terms_by_prefix($prefix) { require_once api_get_path(LIBRARY_PATH) . 'specific_fields_manager.lib.php'; $terms = get_specific_field_values_list_by_prefix($prefix, $this->cc, TOOL_LEARNPATH, $this->lp_id); $prefix_terms = array(); foreach ($terms as $term) { $prefix_terms[] = $term['value']; } return $prefix_terms; }