Moved check for plugin import/export to the start rather than the end
[moodle-linuxchix.git] / tag / tag_autocomplete.php
blobc3daab8070870250806d1185c72d0df511dbda0c
1 <?php // $Id$
3 require_once('lib.php');
5 if( empty($CFG->usetags)) {
6 error(get_string('tagsaredisabled', 'tag'));
9 $query = optional_param('query', 0, PARAM_TEXT);
10 $query = tag_normalize($query);
12 $similar_tags = similar_tags($query);
14 $count = 0;
15 foreach ($similar_tags as $tag){
16 echo tag_display_name($tag) . "\t" . $tag->id . "\n";