| |
416 |
416 |
This callback is invoked to return an HTML fragment highlighting the terms in query |
| |
417 |
417 |
} - |
| |
418 |
418 |
|
| |
419 |
419 |
ad_proc -callback search::driver_info { |
| |
420 |
420 |
} { |
| |
421 |
421 |
This callback returns information about the search engine implementation |
| |
422 |
422 |
} - |
| |
423 |
423 |
|
| |
424 |
424 |
ad_proc -public search::driver_name { |
| |
425 |
425 |
} { |
| |
426 |
426 |
Return the name of the current search driver. |
| |
427 |
427 |
} { |
| |
428 |
428 |
return [parameter::get -package_id [apm_package_id_from_key search] -parameter FtsEngineDriver] |
| |
429 |
429 |
} |
| |
430 |
430 |
|
| |
431 |
431 |
# dotlrn specific procs |
| |
432 |
432 |
|
| |
433 |
433 |
namespace eval search::dotlrn {} |
| |
434 |
434 |
|
| |
435 |
435 |
ad_proc -public search::dotlrn::get_community_id { |
| |
436 |
|
-package_id |
| |
|
436 |
-package_id:required |
| |
437 |
437 |
} { |
| |
438 |
438 |
If dotlrn is installed find the package's community_id |
| |
439 |
439 |
|
| |
440 |
440 |
@param package_id Package to find community |
| |
441 |
441 |
|
| |
442 |
442 |
@return dotLRN community_id. Empty string if package_id is not |
| |
443 |
443 |
under a dotlrn package instance |
| |
444 |
444 |
} { |
| |
445 |
445 |
if {[apm_package_installed_p dotlrn]} { |
| |
446 |
446 |
set site_node [site_node::get_node_id_from_object_id -object_id $package_id] |
| |
447 |
447 |
set dotlrn_package_id [site_node::closest_ancestor_package \ |
| |
448 |
448 |
-node_id $site_node \ |
| |
449 |
449 |
-package_key dotlrn \ |
| |
450 |
450 |
-include_self] |
| |
451 |
451 |
set community_id [db_string get_community_id { |
| |
452 |
452 |
select community_id from dotlrn_communities_all |
| |
453 |
453 |
where package_id = :dotlrn_package_id |
| |
454 |
454 |
} -default ""] |
| |
455 |
455 |
return $community_id |
| |
456 |
456 |
} |