This commit defines the new /availability root folder, with
/availability/classes, /availability/tests, and
/availability/condition where the condition plugins will live.
Condition plugin prefix is availability_, e.g. availability_date.
Rationale for this organisation:
1. I was originally going to put this in /lib/availability but
it has been pointed out that putting even more junk in lib
is probably bad.
2. 'availability' and 'condition' are the two names used in code
to refer to this system ($CFG->enableavailability).
3. The prefix has to be short enough to allow database tables
(although in practice I assume that condition plugins will not
normally contain database tables).
The new API includes a Boolean tree structure that controls the
availability of an item.
AMOS BEGIN
CPY [availabilityconditions,core_condition],[restrictaccess,core_availability]
CPY [enableavailability,core_condition],[enableavailability,core_availability]
CPY [configenableavailability,core_condition],[enableavailability_desc,core_availability]
AMOS END
Converts existing data to new structure in database as part of
upgrade, including a progress bar.
Deletes the database tables and fields that were used by the old
system and are no longer needed.
This commit creates a Behat step of the form:
Then the "title" attribute of "Toggle visibility" "button"
should contain "Show"
This is useful because unless I missed something there is currently
no step that checks attribute values; this seems like a simple
generic step. Behat is intended to check user-visible effects in
the resulting HTML, and sometimes these effects are implemented
using attribute values (two common examples are the alt= attribute,
which is visible to screenreader users, and the title= attribute,
which is visible to all users; there's also the src attribute of
images, and lots of other possibilities too).
Some browsers do not bubble form submission events to the window, and we
had more than one form on the page in certain conditions. We need to select
all of the forms on a page and then test the action.
Do not show the collapse button if:
* it's specified after the cut-off and would therefore be unusable; or
* the total number of groups matches the number of groups to display anyway.