19422 Commits

Author SHA1 Message Date
Dan Poltawski
0a023e5fc7 MDL-57945 stylelint: use csstree to replace some rules
Ironically we have to reverse the change from e63d89a5 because
this linter is more clever..
2017-07-19 14:29:56 +01:00
Eloy Lafuente (stronk7)
1d52027e57 MDL-59534 feedback: avoid some randomness with behat test failures 2017-07-13 20:08:33 +02:00
Dan Poltawski
eff0303ad8 Merge branch 'MDL-56486-master-workshopfiletypes' of git://github.com/mudrd8mz/moodle 2017-07-12 12:22:32 +01:00
David Mudrák
6218889e2d MDL-56486 workshop: Do not rely on the button implementation in behat
It turned out that behat's "I should see ..." does not work for buttons
rendered as `<input>` elements so this assertion worked only in Boost
where the button is rendered as `<button>` but not in Clean.

But we do not really need this check here. All we need is to make sure
that the form has been saved successfully. For which, checking for the
text on the page is enough.

p.s. Another mistake of mine to not double-check behat on both standard
themes. Sigh ...
2017-07-12 11:58:08 +02:00
David Mudrák
581710e278 MDL-56486 workshop: Fix behat scenario for submission attachments
This Behat scenario was not failing only because it actually relied on
the bug in the wrongly set accepted_types for submission attachments.
Now that the previous commit has fixed that bug, this scenario started
to fail correctly.

We need to do the same trick here as we are doing in the latter
scenario: we first upload a valid file to bypass the upload repository
checks, and rename it before submitting the form. That allows us to see
that the invalid file is caught finally.

p.s. It was a silly mistake of mine. I should had been wondering why
the same procedure worked for one field and not for the other. I would
spot the bug with wrong accepted_types earlier.
2017-07-12 11:39:49 +02:00
Dan Poltawski
331785d0f7 Merge branch 'MDL-56486-master-workshopfiletypes' of git://github.com/mudrd8mz/moodle 2017-07-12 09:50:36 +01:00
David Mudrák
afa6deec48 MDL-56486 workshop: Fix accepted_types for submission attachments
It was a copy&paste mistake that the accepted_types option for the
submission attachments used the value configured for overall feedback
attachments.

Credit goes to Marina Glancy for catching this during testing.
2017-07-12 09:57:06 +02:00
Eloy Lafuente (stronk7)
64ea4b5edd Merge branch 'MDL-54965-master' of git://github.com/tobiasreischmann/moodle 2017-07-11 13:43:16 +01:00
David Monllao
e78d7cc0b1 Merge branch 'wip-MDL-59363-master' of git://github.com/marinaglancy/moodle 2017-07-11 12:36:58 +02:00
Dan Poltawski
e5ca70ba1d MDL-59287 upgrade.txt: avoid misleading versions 2017-07-11 11:30:43 +01:00
Dan Poltawski
58a9d391a6 Merge branch 'wip-MDL-59287-master-v3' of git://github.com/abgreeve/moodle 2017-07-11 11:29:53 +01:00
Dan Poltawski
58fcd0a0ed Merge branch 'MDL-56486-master-workshopfiletypes' of git://github.com/mudrd8mz/moodle 2017-07-11 10:18:48 +01:00
Eloy Lafuente (stronk7)
f84bdb4347 Merge branch 'MDL-57432-master' of git://github.com/danpoltawski/moodle 2017-07-11 10:44:06 +02:00
Dan Poltawski
54ef4a9f36 Merge branch 'wip-MDL-40408-master' of git://github.com/marinaglancy/moodle 2017-07-10 14:36:40 +01:00
David Monllao
0245f733b7 Merge branch 'MDL-52501' of https://github.com/NeillM/moodle 2017-07-10 14:38:27 +02:00
David Monllao
bef9a71934 MDL-58851 lti: Fix undefined var PHP notice 2017-07-10 14:26:24 +02:00
Bryan Holladay
1aa11df72f MDL-58851 LTI module: Add LTI admin role capability
Adding a new 'mod/lti:admin' capability and passes the LTI admin role if the user has the 'mod/lti:admin' capability.
2017-07-10 08:19:48 -04:00
Tobias Reischmann
3a133b3028 MDL-54965 mod_data: removed unused code in display_add_field()
Since the refactoring towards using the filepicker for file and picture
fields there are several variables, which are set but never read. Thus,
I removed them.
2017-07-10 14:14:41 +02:00
Tobias Reischmann
bdf6753528 MDL-54965 mod_data: Init draft area for empty file/pic fields
When a file or picture field was added with existing records, these
records could not be saved, since the draft area was not created
properly.

Co-authored-by: Jérôme Mouneyrac <mouneyrac>
2017-07-10 14:14:41 +02:00
Eloy Lafuente (stronk7)
f83d212bcf MDL-57432 upgrade: remove unused functions/settings from upgradelib
All these functions were used only by deleted upgrade steps
so it's safe to proceed with straight deletion, considering
them internal. Deletion has been documented in corresponding
upgrade.txt files:

- upgrade_mimetypes()
- upgrade_fix_missing_root_folders_draft()
- upgrade_minmaxgrade() and upgrade_minmaxgradestepignored setting
- upgrade_course_tags()
- atto_equation_update_librarygroup4_setting()
- mod_lti_upgrade_custom_separator()

These have been kept because continue being used by restore:

- upgrade_group_members_only()
- upgrade_extra_credit_weightoverride()
- upgrade_calculated_grade_items()
2017-07-10 09:18:56 +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
Adrian Greeve
9ffbdafc95 MDL-59287 calendar_events: Update modules to create all events.
All events equals all calendar events including completion events.
2017-07-10 09:40:02 +08:00
Neill Magill
733c4978fc MDL-52501 assign: Fix group submissions without submission record
Based on work by Tim Lock <tim.lock@blackboard.com>

While upgrading to Moodle 2.8 or above it is possible for it to fail if
the site has multiple graded attempts for a user without an associated
submission record. This caused the upgrade to violate the databases
unique key rules.

This same issue could apply to a backup that was created of an
assignment that had this issue, when it is restored into Moodle 2.8 or
later.

This change adds the attempt number from the grade table into the query
that is inserting the new submission record (thanks to Tim). It also
moves the insert query before the latest flag is set on submission
records to ensure that only one has it, without this it is possible that
multiple submission records would be marked as the latest after an
upgrade or restore.
2017-07-06 15:23:40 +01:00
David Mudrák
fd8fe9c1db MDL-56486 workshop: Add behat tests for restricting file types 2017-07-06 12:31:26 +02:00
David Mudrák
b8b07ce2c4 MDL-56486 workshop: Deprecate custom methods for handling file types
The functionality and the tests are now part of the core element.
2017-07-06 09:49:04 +02:00
David Mudrák
9ef238bc84 MDL-56486 workshop: Use filetypes utility class to normalize file types 2017-07-06 09:49:04 +02:00
David Mudrák
5a0865a1b1 MDL-56486 workshop: Use filetypes utility class to check submitted files 2017-07-06 09:49:04 +02:00
David Mudrák
f9a8d98047 MDL-56486 workshop: Use the new filetypes element in the mod_form
The element copes well with the legacy syntax - just extensions, no
dots. So the upgrade step is not actually necessary here. The element
has in-built validation so there is no need to validate it explicitly
here again.
2017-07-06 09:49:04 +02:00
Eloy Lafuente (stronk7)
aef0609316 Merge branch 'MDL-59398-master-enfix' of git://github.com/mudrd8mz/moodle 2017-07-05 11:51:05 +02:00
Helen Foster
f08d4da505 MDL-59398 lang: Merge English strings from the en_fix language pack 2017-07-05 09:27:29 +02:00
Ankit Agarwal
8d8d00ef42 MDL-56565 forum: Add sitename as heading when there is nothing to display 2017-07-04 10:11:34 +08:00
Ankit Agarwal
73d78820c8 MDL-56565 forum: Make sure userfullname is not disclosed 2017-07-04 10:11:34 +08:00
Simey Lameze
1fad6ff3f5 MDL-59008 mod_resource: add option to serve external files embed 2017-07-03 10:19:33 +08:00
Mark Nelson
1370d793fc MDL-56046 mod_quiz: do not close the sheet twice 2017-06-28 18:24:48 +02:00
Eloy Lafuente (stronk7)
1555f25b24 Merge branch 'MDL-57809-34-progressbar' of https://github.com/roperto/moodle 2017-06-28 18:24:47 +02:00
Marina Glancy
6023e58bd1 MDL-59363 mod_workshop: user object must have alternative name fields 2017-06-28 11:36:11 +08:00
Eloy Lafuente (stronk7)
56fc5143ad Merge branch 'MDL-59073_workshop_prevent_submission_without_content_or_file' of https://github.com/dannyjung90/moodle 2017-06-27 16:59:44 +02:00
David Monllao
1243fce158 Merge branch 'wip-MDL-59308-master' of git://github.com/marinaglancy/moodle 2017-06-27 16:41:26 +02:00
Eloy Lafuente (stronk7)
ce836829e6 Merge branch 'MDL-59296-master' of git://github.com/crazyserver/moodle 2017-06-27 11:37:52 +02:00
Josh Ebarvia
a06face2ce MDL-49484 mod_lesson: Fix lesson page headers when editing 2017-06-24 05:21:25 +09:30
Pau Ferrer Ocaña
43cf2cb0a4 MDL-59296 data: Fix latlong field search 2017-06-23 09:15:40 +02:00
Daniel Thee Roperto
ef8ceb2fc2 MDL-57809 weblib: Added missing NO_OUTPUT_BUFFERING directive. 2017-06-23 09:43:07 +10:00
Danny Jung
36a7651de2 MDL-59073 Workshop: Prevent submission without content or file 2017-06-22 14:03:28 -07:00
Marina Glancy
412a56027b MDL-58919 mod_assign: fix check for existing setting 2017-06-22 16:09:55 +02:00
Marina Glancy
70b6230829 MDL-59308 calendar: pass module context when known
this will protect us from exceptions when context for removed instance can not be retrieved
2017-06-22 13:42:22 +08:00
Jake Dallimore
c6b32acdb1 MDL-58919 mod_assign: fix allowing accepted file types to be empty 2017-06-21 17:15:21 +08:00
Dan Poltawski
22ef8f1f9b Merge branch 'MDL-58919-master' of git://github.com/Dave-B/moodle 2017-06-20 14:24:59 +01:00
Dan Poltawski
7419853951 Merge branch 'MDL-59171-master' of git://github.com/junpataleta/moodle 2017-06-14 12:36:39 +01:00
Eloy Lafuente (stronk7)
736973d604 Merge branch 'wip-MDL-58523-master' of git://github.com/marinaglancy/moodle 2017-06-14 12:32:03 +01:00
Eloy Lafuente (stronk7)
84e3c97bb0 MDL-46322 database: alias sort fields to avoid ambiguous naming 2017-06-14 12:32:01 +01:00