Before this change the nested select did a full table scan of
either the enrol or user_enrolments table. This meant that
on large sites the query could be very slow.
This change ensures that there are no full table scans which
makes the query much more efficient.
In my testing the all courses version of the query changed
from ~15 s to ~ 5 s; the singles course version changed
from ~15 s to > 0.1 s
We want to avoid page jumps wherever possible. This change uses the original select element as a "proxy" to reserve the space
in the DOM for the enhanced auto-complete when the JS runs.
It uses visibility: hidden to make the select not rendered - but still take up space.
The exact sizing for the CSS was determined by testing and reverse engineering the bootstrap calculations.
The size of user pictures in selectors was reduced to avoid flicker when switching between no selection and a selected user. I
could have reserved a larger amount of space, but it looks worse for pickers with no pictures.
The commit message above was my best attempt at meeting the very short restrictions on commit message first lines.
What it needed to say was: "Only show bulk enrolment operations for enrolment methods that have an instance in the course"
* Cleanup edit enrolment form.
* Improve edit enrol form validation error message.
* Add modal custom data flag to edit enrolment form to hide action
buttons if loaded via fragment.
* Point return URLs of edit enrolment and user unenrol pages back to
participants page.
Improve the helpers for autocomplete so that:
a) the set field for an auto complete will automatically close the suggestions list.
b) add a new helper to open the suggestions list
c) move the helper for clicking on an element in the suggestions list from tool_lp to core.
There use to be a little cot to easily navigate from the
participations page to the enrollments page.
In boost it was already hidden, but present and the test was still
working (non-javascript).
With the conversion, the functionality is 100% gone so, right now,
the only way to navigate from participats to enrollments (that will
dissappear with with unification), is using the course admin cog.
* Fix coalesce on postgres.
* The edit icon's alt shows the HTML entities causing
* enrol/tests/behat/add_to_group.feature Contains a '@doit' tag which I assume is there from testing.
* group/classes/output/user_groups_editable.php
** Missing MOODLE_INTERNAL check.
** Unused variables context_system and moodle_exception.
** The PHPDocs for the constructors are wrong.
** export_for_template() returns an array, not stdClass (according to parent docs).
** Change moodle_exception to coding_exception at the beginning.
* group/lib.php
** Missing docs for core_group_inplace_editable().
* user/classes/participants_table.php
** The docs for the class variables $groups, $course and $context need a '\' beforehand as they are in a namespace.
** I would prefer $this->context = $context; and $this->groups = ... to be done at the end of the constructor with the other class variable assignments.
** You could get rid of the class variable courseid if we are setting course and use $this->course->id instead.
** The function col_groups has @param \stdclass $row but it should be $data
* lib/amd/src/form-autocomplete.js and lib/amd/src/inplace_editable.js
** Some issues here CiBot has pointed out.
* lib/classes/output/inplace_editable.php
** @see should be on a new line.
The add/roles thing was only converted to bootstrap 2/4 markup and the yui left in place.
The modal for adding users to a course was unsavable so I rewrote it with an mform in a popup, still calling
the same (barely) modified ajax script.
The webservice for searching cohorts was taken from admin/tool/lp and moved into /cohort. I added a generic "cohort"
mform element at the same time.
The webservice for searching for users was taken from the original ajax script.
This just deletes all the upgrade steps previous to 3.0.0. Some
small adjustments, like adding missing MOODLE_INTERNAL or tweaking
globals can also be applied when needed.
Also includes an upgrade step to prevent upgrading from any
version < 2015111600 (v3.0.0) as anti-cheating measure.
Next commit will get rid of/deprecate all the upgradelib functions
not used anymore in codebase.
When a user is entering a password which isn't returned back to them
then its not correct to use the unmask element - this element was
designed for places where we are storing shared secrets.