MDL-23174 Private files editing page needs headings, navbar etc like a normal page
[moodle.git] / tag / tag_autocomplete.php
CommitLineData
333abbf1 1<?php
c933a060 2
9c9d3076 3require_once('../config.php');
c933a060 4require_once('lib.php');
5
9c9d3076 6require_login();
7
8if (empty($CFG->usetags)) {
294ce987 9 print_error('tagsaredisabled', 'tag');
c933a060 10}
11
6f5e0852 12$query = optional_param('query', '', PARAM_RAW);
c933a060 13
db32b054 14if ($similar_tags = tag_autocomplete($query)) {
16803c57 15 foreach ($similar_tags as $tag) {
e7134583 16 echo $tag->name . "\t" . tag_display_name($tag) . "\n";
9c9d3076 17 }
c933a060 18}