MDL-75449 reportbuilder: add no tags/exclude tags filter operators.

Allow user to filter for elements that either contain no tags, plus
those that don't contain selected tags.
This commit is contained in:
Paul Holden 2022-08-18 13:02:56 +01:00
parent 3bc792b9b8
commit fd01461b7a
3 changed files with 29 additions and 2 deletions

View file

@ -42,8 +42,11 @@ class tags_test extends advanced_testcase {
return [
'Any value' => [tags::ANY_VALUE, null, ['course01', 'course01', 'course02', 'course03']],
'Not empty' => [tags::NOT_EMPTY, null, ['course01', 'course01', 'course02']],
'Empty' => [tags::EMPTY, null, ['course03']],
'Equal to unselected' => [tags::EQUAL_TO, null, ['course01', 'course01', 'course02', 'course03']],
'Equal to selected tag' => [tags::EQUAL_TO, 'cat', ['course01']],
'Not equal to unselected' => [tags::NOT_EQUAL_TO, null, ['course01', 'course01', 'course02', 'course03']],
'Not equal to selected tag' => [tags::NOT_EQUAL_TO, 'fish', ['course01', 'course01', 'course03']],
];
}