2054 Commits

Author SHA1 Message Date
Andrew Nicols
2a77813b51 MDL-59882 behat: Update known uses of dialogue CSS 2017-10-02 12:44:37 +08:00
Eloy Lafuente (stronk7)
186a8c1572 Merge branch 'MDL-43176' of https://github.com/NeillM/moodle 2017-09-20 10:12:37 +02:00
sam marshall
22ef155087 MDL-53169 Lib: enrol_get_my_courses can list available courses too 2017-09-19 12:19:49 +01:00
Neill Magill
dbe7012475 MDL-43176 enrol_meta: enrol_meta_sync query is inefficient
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
2017-09-15 14:12:32 +01:00
Mark Nelson
93b47710ac MDL-59977 core: do not directly check 'viewparticipant' capability 2017-09-11 12:44:27 +08:00
Eloy Lafuente (stronk7)
95fc1e720c Merge branch 'MDL-59983-master-enfix' of git://github.com/mudrd8mz/moodle 2017-09-07 10:58:35 +02:00
Andrew Nicols
030ede54f8 MDL-59759 enrol: Update behat tests for unenrol confirm dialogue 2017-09-07 10:53:35 +02:00
Helen Foster
7698619bc6 MDL-59983 lang: Merge English strings from the en_fix language pack
Significant string changes:

* mobileappenabled, setuplink and setuplink_desc in tool_mobile -
  improved wording
* getmoodleonyourmobile and custommenuitems_desc in tool_mobile -
  improved wording
2017-09-05 11:01:09 +02:00
Jun Pataleta
b26ce53776 Merge branch 'MDL-59823-master' of git://github.com/damyon/moodle 2017-08-29 15:49:24 +08:00
Andrew Nicols
85419c5b2e Merge branch 'MDL-59828-master' of git://github.com/damyon/moodle 2017-08-29 11:56:28 +08:00
Damyon Wiese
d8e57f02a7 MDL-59828 autocomplete: Sizing issues on themes
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.
2017-08-25 15:07:40 +08:00
Andrew Nicols
b05f2cd794 MDL-59859 enrol_manual: Improve modal creation ordering 2017-08-21 13:00:00 +08:00
Damyon Wiese
f4ddc4ecd3 MDL-59823 users: Enrol bulk op course instance
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"
2017-08-17 12:03:52 +08:00
Eloy Lafuente (stronk7)
19e8e56e7e Merge branch 'MDL-59756-master-2' of git://github.com/junpataleta/moodle 2017-08-15 13:38:01 +02:00
Damyon Wiese
5dd94c811d MDL-59370 behat: Behat fixes for enrolled users
We removed the enrolled users page, so we need to update the behats that were using it.
2017-08-14 11:06:22 +08:00
Damyon Wiese
4b50765bd5 MDL-59370 enrol: Kill the enrol/users page. 2017-08-14 11:06:16 +08:00
Jun Pataleta
00aba5ec9a MDL-59756 enrol: Swap positions of edit and unenrol actions 2017-08-11 10:18:30 +08:00
Jun Pataleta
1453d146b3 MDL-59366 enrol: Nuke manage_enrolments_from_participants.feature
This will be removed soon. Better remove it now since it started to
cause failures after the new course participants page improvements
have landed.
2017-08-04 09:51:28 +08:00
Jun Pataleta
37fc1d4db7 MDL-59366 enrol: Be more specific on which autocomplete is being opened
* Specify that the autocomplete in the student's row in the
  participants table is being opened.
2017-08-04 09:14:30 +08:00
Andrew Nicols
3d4739ab64 MDL-59602 enrol: Correct course name for restored course 2017-08-02 13:02:29 +08:00
Dan Poltawski
e3a2d7a473 Merge branch 'MDL-59366-master' of git://github.com/junpataleta/moodle 2017-08-01 10:36:14 +01:00
Andrew Nicols
5c5b130268 Merge branch 'MDL-58928-alt-attribute-enrolment-edit-delete-icons' of https://github.com/lucaboesch/moodle 2017-08-01 14:54:05 +08:00
Luca Bösch
da15576180 MDL-58928 enrol: delete and edit icon alt attribute 2017-07-31 17:31:07 +02:00
David Monllao
7190f330b4 Merge branch 'MDL-59602_coursenav' of https://github.com/mrmark/moodle 2017-07-31 13:21:09 +02:00
Jun Pataleta
445de896ef MDL-59366 enrol: Add $onlyenabled param in enrol instances getters
* Add param in order allow flexibility for the methods to be able
to fetch only active enrol instances as well.

Part of MDL-59290.
2017-07-28 16:11:56 +08:00
Jun Pataleta
91b099dbed MDL-59369 enrol: Fix add_to_group Behat tests
Tab to the next element after selecting groups in order for
the autocomplete element to close and be able to click on the
"Save changes" link.
2017-07-27 11:17:33 +08:00
Jun Pataleta
06aa592315 MDL-59369 enrol: Behat tests for plugin enrol actions 2017-07-26 09:44:33 +08:00
Jun Pataleta
fd0a43be1b MDL-59369 enrol: Introduce data-action attribute for enrol action links 2017-07-26 09:44:33 +08:00
Jun Pataleta
ea758b85e4 MDL-59369 enrol: Cleanup enrol pages
* 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.
2017-07-26 09:44:02 +08:00
Jun Pataleta
58c20c8108 MDL-59369 enrol: New ws core_enrol_external::edit_user_enrolment 2017-07-26 09:43:16 +08:00
David Monllao
58f86c4cc5 MDL-59174 enrollib: More flexibility for enrol_get_course_users
Part of MDL-57791 epic.
2017-07-24 08:36:46 +02:00
David Monllao
8970ff91bb MDL-59174 analytics: Analyser queries to enrollib
Part of MDL-57791 epic.
2017-07-24 08:36:46 +02:00
Mark Nielsen
197e2bca5b MDL-59602 behat: make use of new course nav steps 2017-07-21 13:50:47 -07:00
Damyon Wiese
dda64b6f45 MDL-59548 behat: Helpers for autocomplete
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.
2017-07-17 11:10:15 +08:00
Eloy Lafuente (stronk7)
28fcc33944 MDL-59437 behat: old "edit" cog to go to enrollments page is gone
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.
2017-07-13 11:48:28 +08:00
Damyon Wiese
af6d23853a MDL-59365 enrol: Behat fixes
Fixes for the new enrol users popup with behat.
2017-07-13 10:55:01 +08:00
David Monllao
eac6f51590 Merge branch 'MDL-59368-master' of git://github.com/damyon/moodle 2017-07-12 16:46:49 +02:00
Damyon Wiese
2cc2001bef MDL-59365 enrol: Teachers can see other users on the site
In order to enrol new users into a course, you need to see users who are not in the current course.
2017-07-12 14:47:11 +08:00
Damyon Wiese
f3ecea3af4 MDL-59368 groups: Peer review fixes
* 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.
2017-07-12 10:09:09 +08:00
Damyon Wiese
76c493b3f2 MDL-59368 groups: Add behat for new group edit 2017-07-12 10:07:58 +08:00
Damyon Wiese
d77c73a359 MDL-59365 enrol: Use standard modal
Replace the custom footer with a standard modal.
2017-07-11 13:48:27 +01:00
Damyon Wiese
2e1615f2c0 MDL-59365 eslint: Noop changes for eslint 2017-07-11 13:48:26 +01:00
Damyon Wiese
aa8909f479 MDL-59365 enrol: Make select users first
This is the most important element in the form - make it first.
2017-07-11 13:47:52 +01:00
Damyon Wiese
0fa35b1abc MDL-59365 enrol: Switch the user selector
The user selector was calling the wrong API to get the potential list of users to enrol.

Now it works.
2017-07-11 13:47:46 +01:00
Damyon Wiese
a60e8ba51e MDL-59365 enrol_manual: Rewrite the yui enrolment popup in amd
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.
2017-07-11 13:47:26 +01:00
Eloy Lafuente (stronk7)
29af7b0b4c MDL-57432 upgrade: clean < 3.0.0 upgrade steps
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.
2017-07-10 09:16:55 +01:00
Eloy Lafuente (stronk7)
58da7e8851 Merge branch 'MDL-57021-master-v2' of git://github.com/danpoltawski/moodle 2017-07-05 12:24:45 +02:00
John Okely
d349b0f0f8 MDL-58286 enrol_ldap: Pass connection to ldap_paged_results_supported
Thanks to Bianco Veigel for the original patch.
2017-07-05 09:46:27 +08:00
Dan Poltawski
dd58863dab MDL-57021 passwords: only use unmask field with shared secrets
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.
2017-06-15 12:59:19 +01:00
Eloy Lafuente (stronk7)
5e27228335 MDL-58933 upgrade: add 3.3.0 separation line to all upgrade scripts 2017-05-19 19:22:07 +02:00