Filter Active Table Schema (filter_active)


Stores information about which filters are active in which contexts. Also the filter sort order. See get_active_filters in lib/filterlib.php for how this data is used.

filter_active table columns

Column Type Size Nulls Auto Default Children Parents Comments
id BIGINT 19 null
filter VARCHAR 32

The filter internal name, like 'tex'.

contextid BIGINT 19 null filtacti_con2_fk R


active SMALLINT 5 null

Whether this filter is active in this context. +1 = On, -1 = Off, no row with this contextid = inherit. As a special case, when contextid points to the system context, -9999 means this filter is completely disabled.

sortorder BIGINT 19 0

Only relevant if contextid points to the system context. In other cases this field should contain 0. The order in which the filters should be applied.

Table contained -1 rows

filter_active table indexes

Constraint Name Type Sort Column(s)
PRIMARY Primary key Asc id
filtacti_con_ix Performance Asc contextid
filtacti_confil_uix Must be unique Asc/Asc contextid + filter

filter_active table relationships