"MDL-15592, change js function name toggle() to menu_toggle(), to be friendly with...
[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";