817 Commits

Author SHA1 Message Date
Andrew Nicols
c6de3bd68f Merge branch 'MDL-59382-master-4' of git://github.com/ryanwyllie/moodle 2017-08-03 09:31:44 +08:00
Ryan Wyllie
6973baa31e MDL-59382 form: fix name in template context 2017-08-02 04:47:42 +00:00
John Okely
1318aec36e MDL-59299 filepicker: Display what filetypes are accepted 2017-07-31 09:58:22 +08:00
John Okely
320889c02b MDL-59299 filemanager: Display what filetypes are accepted 2017-07-31 09:58:21 +08:00
David Monllao
a2b326c232 Merge branch 'MDL-59544-master-filemanagervalidation' of git://github.com/mudrd8mz/moodle 2017-07-25 11:17:07 +02:00
Vladimir Zhirov
0398bbe675 MDL-59407 folder resource: remember view mode using preference API 2017-07-15 00:46:36 +04:00
David Mudrák
1661204a6c MDL-59544 forms: Implicit validation of the filemanager and filepicker
The patch adds an extra validation step against accepted file types.
Even if the repository checks are bypassed (as illustrated in the
Behat), the invalid file is still caught by the element's validation
rules.

It turns out there is no way to test the filepicker element easily via
Behat. Additionally, it provides the renaming features only with
disabled javascript. So the Behat tests are provided for the filemanager
only.

AMOS BEGIN
 CPY [err_wrongfileextension,mod_workshop],[err_wrongfileextension,core_form]
AMOS END
2017-07-14 20:38:54 +02: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
David Mudrák
ee7e8fdf8e MDL-59443 forms: Add behat tests for the field validation 2017-07-06 09:29:04 +02:00
David Mudrák
a100469875 MDL-59443 forms: Consider '*' as a known file type
While working on the filetypes element validation, I realized we did not
cover the case of selecting 'Any file type'. So the value '*' was
falsely reported as unknown file type.
2017-07-06 09:29:04 +02:00
David Mudrák
572d6fdef3 MDL-59443 forms: Allow implicit validation of filetypes element values
The validation obeys the element options 'allowall', 'allowunknown' and
'onlytypes' passed when creating the element.
2017-07-06 09:29:04 +02:00
David Mudrák
6b59e4aafb MDL-59452 forms: Add Behat test for the filetypes form element
This is a very basic test for now to illustrate that it is possible now
to specify filetypes fields by the label.
2017-07-06 09:22:14 +02:00
David Mudrák
9aabf267ee MDL-59452 forms: Provide a label for the filetypes input field
This is a pragmatic (read: hacky) solution of the problem that
Behat/Mink is unable to locate the input field within the filetypes
group. I've spent a while trying to figure out how to make it work. On
the road, I've discovered that our situation with labels of mform group
elements is a bit messy. And generally there seems to be no easy way how
to use the group's label to identify one particular input field in the
group.

In this case, we use mform group but in fact there is a single input
field within the group. Mink does not locate the group itself as an
input field and throws ElementNotFoundException. So reusing the group's
label as a hidden label for the input makes sense from certain
perspective.

The potential drawback (unconfirmed) is that screen readers might read
the same label text twice. But only one of them is associated with the
actual input field so chances are they would ignore the group's one,
like Mink does.
2017-07-05 17:38:04 +02:00
David Mudrák
710a2414d8 MDL-53240 filetypes: Use multibyte safe variant of strtolower
Credit goes to failed unit tests.
2017-06-05 20:50:28 +02:00
David Mudrák
8cf36e9c81 MDL-53240 filetypes: Introduce admin_setting_filetypes class
This new type of admin settings makes use of the filetypes browser but
for the admin settings.
2017-06-01 09:48:45 +02:00
David Mudrák
8b493eb09d MDL-53240 filetypes: Enhance the filetypes element with a types browser 2017-06-01 09:20:07 +02:00
John Okely
86bb4f5bf2 MDL-53240 filetypes: Add functions to be used for input validation 2017-06-01 09:18:38 +02:00
David Mudrák
e3ad9db6b6 MDL-53240 filetypes: Add methods for generating the browser tree content
These new methods will be used to render the tree of file types groups
and extensions in the browser widget.

Co-Authored-By: John Okely <john@moodle.com>
2017-06-01 09:18:38 +02:00
Jonathon Fowler
97bb4f755e MDL-53240 filetypes: Introduce the form element to specify plugin types
This is a stripped down version of the original Jonathon's element
without the actual JS selector. The options "allowall" and "onlytypes"
are not fully supported right now yet.
2017-06-01 09:18:38 +02:00
David Mudrák
6c4a5fdf88 MDL-53240 filetypes: Introduce the filetypes_util helper class 2017-06-01 09:18:38 +02:00
Dan Poltawski
1e4e5c52d7 Merge branch 'MDL-55611-master' of git://github.com/danpoltawski/moodle 2017-04-04 17:07:41 +01:00
Marina Glancy
125c4c4cb8 MDL-57961 course: change wording of module availability
renamed Visible to Availability and added help strings

AMOS BEGIN
 CPY [availability,core_moodle],[modvisible,core_moodle]
 CPY [availability,core_moodle],[modvisiblewithstealth,core_moodle]
 CPY [availability,core_moodle],[modvisiblehiddensection,core_moodle]
 CPY [show,core_moodle],[modshow,core_moodle]
 CPY [hide,core_moodle],[modhide,core_moodle]
AMOS END
2017-04-04 17:05:57 +08:00
Damyon Wiese
72fd103add MDL-58219 cibot: Fixes
Fixes for cibot warnings.

Part of MDL-58220
2017-04-03 13:41:19 +08:00
Damyon Wiese
151b0f9409 MDL-58132 repositories: Controlled link file type
This introduces a new "controlled link" file type where the file is not
stored in Moodle - but Moodle will control the access permissions on the file.

Plugins can "freeze" a filearea which means Moodle will take ownership of all the remote
files of this type.

When accessing a file, if the "filebrowser" infomation indicates the current user can write to the file, they
will be granted temporary write access.

Part of MDL-58220
2017-04-03 13:40:13 +08:00
Simey Lameze
fdeeaff954 MDL-58265 core_test: replace I turn editing on steps
Also remove few more unnecessary steps that redirects behat to
site home page to actually get to the course.

Part of MDL-55611 epic.
2017-04-03 11:37:07 +08:00
Simey Lameze
93be3f730c MDL-58265 core_test: remove unnecessary steps
This commmit removes steps that take behat to site home page
to actually get to a course page.

Part of MDL-55611 epic.
2017-04-03 11:37:07 +08:00
Simey Lameze
c987d1b2ef MDL-58265 core_test: replace all uses of I follow course steps
Part of MDL-55611 epic.
2017-04-03 11:37:07 +08:00
Marina Glancy
cc401e6f30 MDL-34859 forms: fix the checkbox in defaultcustom element 2017-03-22 11:25:58 +08:00
Marina Glancy
b4eb5f0212 MDL-34859 forms: new element defaultcustom 2017-03-20 14:59:45 +08:00
Marina Glancy
8341055eb4 MDL-4782 course: Allow activities in the "stealth" mode
Add field 'visibleoncoursepage' to the course_modules table
Add site-wide setting for turning on stealth mode availability
Add callback for "stealth" mode support in the course formats
Change display of modules/sections availability on the course page
2017-02-14 16:38:05 +08:00
Helson Castro
5ad0bb82f1 MDL-57568 forms: Added missing include for button element. 2017-01-27 13:58:31 +08:00
Nadav Kavalerchik
bb13339a2e
MDL-46714 Calendar: Properly order Date & Time fields in RTL mode 2016-12-12 12:38:04 +08:00
Andrew Nicols
4b2bcd2376 Merge branch 'wip-mdl-56353' of https://github.com/rajeshtaneja/moodle 2016-12-07 11:53:34 +08:00
Rajesh Taneja
451ae0cabc
MDL-56353 behat: Added test for multi select dependency 2016-12-07 11:30:46 +08:00
Marina Glancy
e5287f9b3b MDL-56614 behat: navigate without navigation and admin blocks 2016-12-06 11:49:14 +08:00
David Monllao
80ee8a3eb0 Merge branch 'MDL-57209-master' of git://github.com/crmpicco/moodle 2016-12-02 13:26:56 +08:00
Andrew Nicols
b95107ca83 Merge branch 'MDL-57205-master' of git://github.com/damyon/moodle 2016-11-30 15:03:43 +08:00
Craig R Morton
f6f0cb49aa MDL-57209 forms: Notice: Undefined index: options in profile edit page
Skipping a loop iteration if the option group has no options.
2016-11-30 13:08:56 +08:00
Damyon Wiese
7c0725857a MDL-57205 forms: Prevent debugging in selectgroups
Sometimes the option group has no options I guess. The same check is in
exportValue.
2016-11-30 10:38:51 +08:00
Dan Poltawski
1f5fbd1696 Merge branch 'wip-mdl-56659' of https://github.com/rajeshtaneja/moodle 2016-11-25 11:17:36 +00:00
Rajesh Taneja
350d0ae6b7
MDL-56659 core: Enable password field when label is clicked 2016-11-25 12:09:37 +08:00
Rajesh Taneja
dfa707c994
MDL-56659 core: No need for noscript tag and set size later
1. BrowserKitDriver::setValue only checks if the element is
   disabled. It still is able to set value on hidden elements
   So there is no need for noscript tag in password unmask
2. Set size on hidden field is not valid html, so set it later
   when text element is displayed
2016-11-25 12:09:37 +08:00
Cameron Ball
28e93cc41b
MDL-55324 atto_media: Implement HTML compliant media plugin
This patch completely reworks the atto media plugin to allow
insertion of HTML media elements.
2016-11-23 11:57:33 +08:00
Dan Poltawski
da55f3582b Merge branch 'MDL-56705-master' of git://github.com/damyon/moodle 2016-11-10 08:03:37 +00:00
Damyon Wiese
e7bda18de6 MDL-56705 forms: Use [] for multiple values
Some "select" based form elements are not inheriting directly from
MoodleQuickForm_select - so did not have the adjustment to the form
field name that allows multiple values. I moved this fix to the
templateable trait so all the form fields get this fix.
2016-11-10 14:57:58 +08:00
John Okely
eea9f10900 MDL-56715 form: Allow password unmask fields to be cleared in FF49 2016-11-10 11:22:59 +08:00
Rajesh Taneja
e4c98de168
MDL-56630 behat: Click on link in specificed block/region 2016-11-08 18:06:09 +08:00
Rajesh Taneja
dc90838aaa
MDL-56630 behat: Click on link in specificed block/region 2016-11-08 14:45:43 +08:00
Damyon Wiese
9f592c243c MDL-55215 forms: Searchable selector was reindexing keys 2016-11-07 11:03:17 +08:00
Andrew Nicols
741c0e6abe MDL-55215 forms: Rename searchableselector params 2016-11-07 09:06:40 +08:00