moodle/tag/tag_autocomplete.php
moodler c933a06065 First checkin of tag system from GSOC student Luiz Cruz
It's a very simple first version.

TODO for 1.9:

   - Store rawname of each tag as well as normalised version and treat accordingly
   - Add blocks to the tag interest pages
2007-07-31 07:51:32 +00:00

19 lines
356 B
PHP

<?php // $Id$
require_once('lib.php');
if( empty($CFG->usetags)) {
error(get_string('tagsaredisabled', 'tag'));
}
$query = optional_param('query', 0, PARAM_TEXT);
$query = tag_normalize($query);
$similar_tags = similar_tags($query);
$count = 0;
foreach ($similar_tags as $tag){
echo $tag->name . "\t" . $tag->id . "\n";
}
?>