This commit will add the index for the question_reference
and the question_set_reference table if its not already
added. This commit will also implement the logic of adding
the question area and component in the joins of the question
reference table in order to make sure any other plugin using
the qbank api does not conflict with each other.
Summary:
- Allows nulls for a number of fields meaning largely empty drafts can
be stored.
- Adds 'uniqueid', an id unique to each issuer which is intended
to be used as a parameter in both the initiate login and dynamic
registration urls provided to platforms, as a means to identify specific
registrations for the issuer, in the absense of client_id (optional in
the 1.3 spec).
- Add 'status', used to denote draft or active registrations.
In practice it is as if the feature was turned off most of the time.
However, some long processes may benefit from this very safe value
in case admins missed to configure it.
moodle_database::commit_delegated_transaction() calls
core\event\manager::database_transaction_commited() which may invoke
events that do database reads.
This change adjusts tables last written time in moodle_read_slave_trait *before*
calling moodle_database::commit_delegated_transaction().
Sometimes, in order to provide a cross-db behaviour of unique indexes
mixing null and not null columns, we create, under the hood, some
function based indexes.
When that happens get_indexes() is returning the name of the
expression objects used to calculate that function index. But we need
the original column names to be able to compare indexes and get
column dependencies properly.
So, this patch just looks, when the index is unique and function based,
to the expressions (pretty standard CASE statements) and gets the
original column name from it.
Covered with tests.
Use PARAM_ALPHANUMEXT for $areaid as areaid can also be
say mod_h5pactivity. When PARAM_ALPHAEXT is used it would
become mod_hpactivity and would cause exception in code flow.
When a student post exceeds the posting threshold
block then 'Add discussion topic' button should not be shown.
Also the student cannot reply to a topic if this is exceeded.
This commit is UNRELATED to the MDL-74184, but we need the
@skip_interim tag removed to a couple of scenarios that were
causing lots of noise and failures @ci infrastructure.
MDL-74265 was created to deal with this issue but these jobs
are now passing, and nothing has been changed...
So we are using MDL-74184 (this extra commit) to remove that
tag (sorry for the noise).
To ensure legacy course formats works on Moodle 4.0 some method are
reintroduced (but marked as deprecated) like start_section_list and
end_section_list. Furthermore, the course_section_cm_availability
returns a string again as expected.