844 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
bd5fdcfccd MDL-63422 general: review core loop / switch / case / continue
This commit reviews all continue uses in core happening within a
loop / switch / case hierarchy. This does not cover:

- Changes to libraries. Will be handled in another issue / commit.
- Uses out from loops, will be reviewed by other commit.

The policy followed has been:
- When possible, take rid of the continue.
- When clearly the intention was to jump to next element in loop
  change to continue 2
- When it was not clear, keep old behavior switching to break, no
  matter how weird the behavior may be.
2018-10-31 00:17:59 +01:00
Michael Hawkins
e917288971 MDL-63497 mod_feedback: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:48:33 +02:00
Jonathan Champ
b2f349a433 MDL-54035 accesslib: separate role definition cache clear
Thanks to MDL-49398, we can separate the combined user session and role
definition cache clearing function into two separate functions. At the
same time, we want to identify and remove mark_dirty() calls that were
added for role definition changes but were incorrectly left behind.

Change highlights:
 - Remove unnecessary mark_dirty() calls performed after
   assign_capability(), unassign_capability(), delete_role(),
   deleted contexts, brand new contexts
 - Move role definition cache clear from the user-centric
   accesslib_clear_all_caches() to the newly created,
   role-dedicated accesslib_reset_role_cache()
2018-09-21 09:17:42 -04:00
Amaia Anabitarte
b0af7093cf MDL-58781 mod_feedback: Inconsistency in analysis exported to excel 2018-09-14 12:47:56 +02:00
Jake Dallimore
c96c9601af MDL-62947 mod_feedback: fix feedback so it correctly uses forms API
Feedback code was doing the following, which is incompatible with the
sec-patched quickforms lib:
- appending '[0]' to non-group element names, meaning type checks in
getCleanType() were falling back to PARAM_RAW instead of PARAM_INT,
and meaning _findValue() was comparing elements it thought to be arrays
with scalar submit values (worked with eval() implementation as the 0th
element of a string was the character, but not working when patched).
- external unit tests incorrectly testing multichoice questions in the
process_page tests - patched lib highlighted failures.

It was also doing the following:
- actively setting null as default element values instead of 0 for
radio buttons and dropdowns (for 'not selected'). This is incompatible
with more recent quickforms lib (see MDL-63070).
- creating groups using addElement instead of addGroup - not recommended

This patch addresses the above.
2018-09-05 12:12:20 +08:00
Jun Pataleta
d58fd3dcbb Merge branch 'MDL-60578-master' of git://github.com/jleyva/moodle 2018-09-04 21:18:02 +08:00
Juan Leyva
f39d43af41 MDL-60578 mod_feedback: Handle correctly site feedbacks 2018-09-04 14:18:41 +02:00
Marina Glancy
38fefb5cdf MDL-60578 mod_feedback: pass courseid to WS 2018-09-04 14:18:39 +02:00
Neill Magill
bbf1fde412 MDL-62944 activities: Activities should not require capability
Activities should not require the user manipulating them to have
calendar capabilities for their events to be added to the Moodle
calendar
2018-08-31 10:15:37 +01:00
Neill Magill
196aa50489 MDL-62944 activities: Test adding activities with no calendar capability 2018-08-31 10:15:36 +01:00
Andrew Nicols
03655bb050 Merge branch 'MDL-50225_master' of git://github.com/markn86/moodle 2018-08-08 08:14:55 +08:00
David Monllao
77f9983189 Merge branch 'MDL-61290_master' of https://github.com/aanabit/moodle 2018-07-31 17:18:17 +02:00
Amaia Anabitarte
4a6cd05ae1 MDL-61290 mod_feedback: adding groups to csv download
Thanks Christine LEGEMBLE for your proposal
2018-07-31 15:32:43 +01:00
Mark Nelson
4d67fe6161 MDL-50225 core: replace usages of print_textarea() 2018-07-30 09:57:01 +08:00
Adrian Greeve
5454e72c21 MDL-55188 events: First deprecation of eventslib.php 2018-07-30 09:23:54 +08:00
Eloy Lafuente (stronk7)
193a3aa9d7 Merge branch 'MDL-62961_master' of git://github.com/markn86/moodle 2018-07-25 01:24:34 +02:00
Mark Nelson
0089fc929e MDL-62961 mod_feedback: style buttons appropriately 2018-07-23 15:47:38 +08:00
Mihail Geshoski
10bd37fabd MDL-54742 general: Remove strings deprecated in 3.2 2018-07-23 14:25:14 +08:00
Mihail Geshoski
98f9db0d63 MDL-53972 feedback: Final deprecation in mod/feedback/lib.php 2018-07-16 14:21:18 +08:00
Helen Foster
9722f6a25e MDL-62763 lang: Merge English strings from the en_fix language pack
Significant string changes:

* various strings in tool_dataprivacy and tool_policy - 'Data Protection
  Officer' changed to 'privacy officer'
* idnumbermod_help,core - mentioning resource and custom reporting
2018-07-02 11:15:26 +02:00
Eloy Lafuente (stronk7)
00977e984e MDL-62478 upgrade: add 3.5.0 separation line to all upgrade scripts 2018-05-28 13:15:48 +02:00
Eloy Lafuente (stronk7)
57ea6753d3 MDL-62361 versions: bump all versions and requires near release
version = 2018051400 release version
requires= 2018050800 current beta+ (week4roll1) version
2018-05-09 02:46:30 +02:00
Helen Foster
970c1a4bf1 MDL-62181 lang: Merge English strings from the en_fix language pack
Significant string changes:

* sitepolicies, core_admin - 'Site policies' changed to 'Site security
  settings'
* processexpirationstask, enrol_paypal - more explanatory name
* sitepolicy_help and sitepolicyguest_help, core_admin - setting will
  only have an effect if the site policy handler is set to default
* sitepolicyhandler_desc,core_admin - improved wording
* pathtodot_help, core_admin - Windows and Mac paths
* debugstringids_desc, core_admin - improved explanation
2018-04-24 22:05:30 +02:00
Frédéric Massart
29b44cedfc MDL-61862 mod_feedback: Tweak query to support UNION on TEXT fields
Thanks Oracle.
2018-04-17 11:35:55 +08:00
Frédéric Massart
9f6296e5de MDL-61862 mod_feedback: Implement core_privacy API 2018-04-16 18:45:27 +08:00
Eloy Lafuente (stronk7)
67eb557286 Merge branch 'MDL-61321-master' of git://github.com/jleyva/moodle 2018-03-28 18:16:19 +02:00
Luca Bösch
efdf25636a MDL-60119 mod_feedback: Suppress choice weight in parentheses. 2018-03-22 23:52:36 +01:00
Juan Leyva
bc694b4761 MDL-61321 mod_feedback: Return all the items responses
The WS should receive all the item responses for all the attempts.
2018-03-20 10:36:11 +01:00
Jeff Webster
f567f34b92 MDL-48501 mod_feedback: update feedback to use reCAPTCHA v2 2018-03-08 14:48:35 -05:00
Ankit Agarwal
84fe42d8b6 MDL-51885 lang: Remove strings deprecated in 3.1 2018-01-08 12:44:07 +05:30
David Monllao
4292318562 Merge branch 'MDL-61056-master-feedbackresponsenav' of git://github.com/mudrd8mz/moodle 2017-12-27 17:54:56 +01:00
David Mudrák
c581517dd7 MDL-61056 feedback: Fix the response navigation links
Floats are evil and unreliable. Even with the clearfix class added to
the response_navigation wrapper, the Next link would remain unaligned.
We need a proper three columns layout here.

It did not feel necessary to introduce a special template here so I'm
making use of the core one.
2017-12-18 21:56:44 +01:00
Ryan Wyllie
e236dc1446 MDL-60858 feedback: update behat tests for lang string change 2017-12-13 05:07:19 +00:00
Ryan Wyllie
85ce9b535b MDL-60858 feedback: remove ellipsis from form lang strings
Remove the trailing ellipsis from the complete_the_form and
continue_the_form lang strings.
2017-12-13 03:37:00 +00:00
Mitsuhiro Yoshida
97627d2783 MDL-60858 feedback: add button style for "Answer the questions" link. 2017-12-13 03:36:04 +00:00
Eloy Lafuente (stronk7)
7ec475e2d7 MDL-59159 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:

- mod_feedback_upgrade_delete_duplicate_values()
- mod_feedback_upgrade_courseid()

These have been kept because they continue being used:

- @ install: make_competence_scale()
- @ restore: upgrade_course_letter_boundary()
2017-12-04 01:42:01 +01:00
Eloy Lafuente (stronk7)
e4eba4c346 MDL-59159 upgrade: clean < 3.1.0 upgrade steps
LTS (3.5) requires previous LTS (3.1)

This just deletes all the upgrade steps previous to 3.1.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 < 2016052300 (v3.1.0) as anti-cheating measure.

Next commit will get rid of/deprecate all the upgradelib functions
not used anymore in codebase.
2017-12-04 01:18:57 +01:00
sam marshall
a938e4096c MDL-60174 core_dml: fix miscellaneous incorrect recordset usage
The new recordset support for Postgres requires transactions and
will cause errors if recordsets are not closed correctly. This
commit fixes problems that were identified during unit tests, and
via some basic code analysis, across all core code. Most of these
are incorrect usage of recordset (forgetting to close them).
2017-11-27 11:10:33 +00:00
Eloy Lafuente (stronk7)
6499085f36 MDL-60784 upgrade: add 3.4.0 separation line to all upgrade scripts 2017-11-12 18:43:30 +01:00
Eloy Lafuente (stronk7)
ba854606e6 MDL-60764 versions: bump all versions and requires near release
version = 2017111300 release version
requires= 2017110800 current rc2 version
2017-11-10 02:52:53 +01:00
Jake Dallimore
5243e93661 Merge branch 'MDL-59256_master' of git://github.com/dmonllao/moodle 2017-11-07 16:03:43 +08:00
David Monllao
aa30dc8860 MDL-59256 analytics: Respect activities specific access conditions 2017-11-07 08:14:53 +01:00
Andrew Nicols
03561ea899 Merge branch 'MDL-60062-master-2' of git://github.com/ryanwyllie/moodle 2017-11-07 13:49:47 +08:00
Ryan Wyllie
478b1d194f MDL-60062 calendar: remove validate_event_timestart callback 2017-11-07 01:25:33 +00:00
Jun Pataleta
a56833d49d Merge branch 'MDL-60611' of git://github.com/stronk7/moodle 2017-11-07 10:14:24 +13:00
Eloy Lafuente (stronk7)
796e48a58b MDL-60611 phpunit: remove deprecated stuff and other minor fixes
Thanks @scara for MDL-60611 phpunit: improved redis skipping reasons
2017-11-05 01:45:04 +01:00
Damyon Wiese
5dbd051502 Merge branch 'MDL-59950_master' of git://github.com/dmonllao/moodle 2017-11-02 14:39:32 +08:00
David Monllao
ef9f60a635 MDL-59950 analytics: Use cognitive depth and social breadth constants 2017-10-27 10:48:42 +02:00
Damyon Wiese
7f91fb036b Merge branch 'MDL-60366_feedback_upgrade' of git://github.com/davosmith/moodle 2017-10-26 16:02:13 +08:00
Eloy Lafuente (stronk7)
6b7194a7cf Merge branch 'MDL-60072-master' of git://github.com/andrewnicols/moodle 2017-10-19 22:30:08 +02:00