Merge commit 'catalyst/MOODLE_19_STABLE' into mdl19-linuxchix
[moodle-linuxchix.git] / tag / tag_autocomplete.php
blob755d38d3b0d20eec7dee9880b48c65d3f4c10480
1 <?php // $Id$
3 require_once('../config.php');
4 require_once('lib.php');
6 require_login();
8 if (empty($CFG->usetags)) {
9 print_error('tagsaredisabled', 'tag');
12 $query = addslashes(optional_param('query', '', PARAM_RAW));
14 if ($similar_tags = tag_autocomplete($query)) {
15 foreach ($similar_tags as $tag) {
16 echo $tag->name . "\t" . tag_display_name($tag) . "\n";