MDL-57455 mod_data: Implement tagging

This commit is contained in:
Andrew Hancox 2017-09-14 16:57:00 +08:00 committed by Mark Nelson
parent d8e9a23c48
commit ca5f3e0a2e
10 changed files with 407 additions and 3 deletions

View file

@ -259,6 +259,11 @@ if ($mode != 'csstemplate' and $mode != 'jstemplate') {
echo '<option value="[['.$field->name.'#id]]" title="'.$field->description.' id">'.$field->name.' id - [['.$field->name.'#id]]</option>';
}
echo '</optgroup>';
if (core_tag_tag::is_enabled('mod_data', 'data_records')) {
echo '<optgroup label="'.get_string('other', 'data').'">';
echo '<option value="##tags##">' . get_string('tags') . ' - ##tags##</option>';
echo '</optgroup>';
}
}
// Print special tags. fix for MDL-7031
@ -284,6 +289,11 @@ if ($mode != 'csstemplate' and $mode != 'jstemplate') {
echo '<option value="##user##">' .get_string('user'). ' - ##user##</option>';
echo '<option value="##userpicture##">' . get_string('userpic') . ' - ##userpicture##</option>';
echo '<option value="##approvalstatus##">' .get_string('approvalstatus', 'data'). ' - ##approvalstatus##</option>';
if (core_tag_tag::is_enabled('mod_data', 'data_records')) {
echo '<option value="##tags##">' . get_string('tags') . ' - ##tags##</option>';
}
if ($mode != 'singletemplate') {
// more points to single template - not useable there
echo '<option value="##comments##">' .get_string('comments', 'data'). ' - ##comments##</option>';