Commit graph

101178 commits

Author SHA1 Message Date
Paul Holden
f9f679611d MDL-57831 tool_monitor: update Behat tests for message preferences. 2021-04-22 16:11:30 +01:00
Ferran Recio
201a37e6aa MDL-70909 behat: context freeze and not freeze steps 2021-04-22 15:50:55 +02:00
Sara Arjona
841df2a216 Merge branch 'MDL-71136_master' of https://github.com/TomoTsuyuki/moodle 2021-04-22 13:56:37 +02:00
Ferran Recio
45048b8796 MDL-70909 core: add cannotmatchanyrows to capabilities join 2021-04-22 13:16:35 +02:00
Sara Arjona
c9c18da021 Merge branch 'MDL-71400-master' of git://github.com/mihailges/moodle 2021-04-22 13:16:23 +02:00
Shamim Rezaie
0ca7548443 MDL-71144 mod_scorm: Deprecate scorm_get_completion_state() 2021-04-22 21:11:43 +10:00
Shamim Rezaie
7d102bb67d MDL-71144 mod_quiz: custom_completion should not use deprecated function
This commit also removes an unnecessary DB query.
2021-04-22 21:11:43 +10:00
Shamim Rezaie
d9d0ae01d3 MDL-71144 mod_quiz: Deprecate quiz_get_completion_state() 2021-04-22 21:02:02 +10:00
Jun Pataleta
c070f3e66d Merge branch 'MDL-71170_master' of git://github.com/mdjnelson/moodle 2021-04-22 18:55:28 +08:00
Noel De Martin
168f28fa75 MDL-71386 behat: Support for 3.9.5+ mobile app 2021-04-22 12:14:18 +02:00
Paul Holden
4264f85063 MDL-71200 mod_folder: ensure "Download folder" option is backed up. 2021-04-22 10:29:25 +01:00
Paul Holden
250944bc1e MDL-70979 search: validate external user search parameters.
Clean return value in unit test for same.
2021-04-22 10:22:35 +01:00
Paul Holden
0de5ab4b43 MDL-71392 mod_quiz: don't display grade to pass if not set. 2021-04-22 09:53:24 +01:00
Mihail Geshoski
4e714cebae MDL-71400 assignfeedback_offline: Fix message after worksheet upload 2021-04-22 13:08:15 +08:00
Jun Pataleta
e853e6b7db Merge branch 'MDL-71156-master' of git://github.com/lameze/moodle 2021-04-22 11:51:59 +08:00
Andrew Nicols
81d5ed8184 Merge branch 'MDL-69460' of https://github.com/paulholden/moodle 2021-04-22 11:11:40 +08:00
Jun Pataleta
7af3fa1cdd Merge branch 'MDL-71288-master' of git://github.com/lameze/moodle 2021-04-22 10:29:25 +08:00
Simey Lameze
5b0282847e MDL-71156 core: machinery to recover orphaned calendar events
The machinery to fix orphaned calendar events that were broken by MDL-67494.

The solution consists of:

1) Upgrade step that checks if this site has executed the problematic upgrade steps and
   if positive, it will schedule a new run for calendar_fix_orphaned_events adhoc task.

2) Adhoc task that will self-spawn calling the recovery machinery, running until
   all the orphaned calendar events are fixed. It also sets the maximum runtime of
   60 seconds. It is also possible to override that number by specifing the desired
   number setting the ->calendareventsmaxseconds in your config.php

3) CLI script that will look for all the calendar events which userids
   where broken by a wrong upgrade step, affecting to Moodle 3.9.5
   and up.

   It performs checks to both:
     a) Detect if the site was affected (ran the wrong upgrade step).
     b) Look for orphaned calendar events, categorising them as:
       - standard: site / category / course / group / user events
       - subscription: events created via subscriptions.
       - action: normal action events, created to show common important dates.
       - override: user and group override events, particular, that some activities support.
       - custom: other events, not being any of the above, common or particular.

   By specifying it (--fix) try to recover as many broken events (missing userid) as
   possible. Standard, subscription, action, override events in core are fully supported but
   override or custom events should be fixed by each plugin as far as there isn't any standard
   API (plugin-wise) to launch a rebuild of the calendar events.

4) Unit tests and helper functions to generate calendar events. We have decided to
   keep the tests simple, testing only true and false and not using data generators because
   the code is purely to recover the calendar events and won't turn into an API or something
   and also due to the urgency of this issue.
   The helpers have been created in calendar/tests/helpers.php since there are no data generators
   for calendar.
2021-04-22 10:28:52 +08:00
Andrew Nicols
5104159fcc Merge branch 'MDL-70412-master' of git://github.com/aanabit/moodle 2021-04-22 10:10:38 +08:00
Simey Lameze
f518f61757 MDL-71288 completion: add fallback for plugins
This commits adds a fallback for plugins which does not have
custom_completion implementation.

For those cases, it will search for {modulename}_get_completion_state
callback in the plugin and call get_overall_completion() method in
cm_completion_details class to get the overall completion state for
a course module and user.
2021-04-22 09:45:11 +08:00
abgreeve
8a53fe7f6b Merge branch 'MDL-28452-master' of git://github.com/bmbrands/moodle 2021-04-22 09:38:50 +08:00
Shamim Rezaie
a2bf666a0c MDL-71144 mod_lesson: Deprecate lesson_get_completion_state() 2021-04-22 10:08:11 +10:00
Shamim Rezaie
b4c8f0f8a6 MDL-71144 mod_survey: Deprecate survey_get_completion_state() 2021-04-22 10:08:11 +10:00
Shamim Rezaie
5f9aa4d35f MDL-71144 mod_glossary: Deprecate glossary_get_completion_state() 2021-04-22 10:08:10 +10:00
Jun Pataleta
c9fa4f9cd7 MDL-71144 mod_forum: Deprecate forum_get_completion_state() 2021-04-22 10:08:10 +10:00
Jun Pataleta
c10dfd7583 MDL-71144 mod_feedback: Deprecate feedback_get_completion_state() 2021-04-22 10:08:10 +10:00
Jun Pataleta
08fb6a71b7 MDL-71144 mod_data: Deprecate data_get_completion_state() 2021-04-22 10:08:10 +10:00
Jun Pataleta
17c3c4dc75 MDL-71144 mod_choice: Deprecate choice_get_completion_state() 2021-04-22 10:08:10 +10:00
Jun Pataleta
d484b3e371 MDL-71144 mod_assign: Deprecate assign_get_completion_state() 2021-04-22 10:08:04 +10:00
Jun Pataleta
d0963c711f MDL-71144 completion: Deprecate get_completion_state callbacks
* *_get_completion_state() callback functions have been deprecated and
should no  longer be used. Plugins that define custom completion rules
must implement the mod_[modname]\completion\custom_completion class that
extends the \core_completion\activity_custom_completion base class.
2021-04-22 09:48:50 +10:00
Paul Holden
702b119f57 MDL-57831 theme_boost: accessibility update for message preferences.
The preferences table did not meet accessibility guidelines regarding
colour contrast between hovered rows and the disabled switch
elements.

Ensure white background is used for all table cells, and replace the
highlighted columns used to differentiate processors with borders.
2021-04-21 21:46:29 +01:00
Sara Arjona
49dbf2c130 Merge branch 'MDL-64336' of https://github.com/NeillM/moodle 2021-04-21 17:13:57 +02:00
Marina Glancy
e1ab67836d MDL-71394 core_blog: fix incorrect default setting in form
the keys of the options are strings, in PHP8 strings are compared with 0 differently
2021-04-21 16:22:22 +02:00
Neill Magill
bce4c28577 MDL-64336 assign: Add missing PHP doc 2021-04-21 15:14:15 +01:00
Neill Magill
06a69802d6 MDL-64336 assign: Teachers should be able to see all submissions
Before this change a teacher would be able to see users listed if:

* They have an active enrolment and can submit
* They have an an inactive enrolment for a role that can submit

After this change they will additonally be able to see users listed:

* That have an active enrolment and have submitted
* That have an inactive enrolment and have submitted

This means that if an assignment has it's context frozen all users
that have made some form of submission will still be listed.

It will also apply if the submission capability is removed from a
user.

If a user's enrolment is deleted they will not be listed.

The submission and grading counts have also been updated so
they will reflect the new rules.
2021-04-21 15:14:14 +01:00
Neill Magill
1f55fff393 MDL-64336 assign: Submissions should be visible while frozen
Before this change if a student visited an assignment that is
frozen they would only see the title and description even if
they had made a submission to it.

After the change they will be able to see the status of their
submission and any feedback and grades they have recived.

It will also make the Moodle app recognise that submission
should not happen because the assignment is frozen.

Tests based on ones created by Andrew Nicols
2021-04-21 15:14:14 +01:00
Marina Glancy
263c39ba21 MDL-71389 various: changes to unittests due to php8 changes:
- some engine error messages changed
- some warning levels changed
- the carriage return symbol randomly appears
- one phpunit assertion fails and not really representative of anything
2021-04-21 12:38:46 +02:00
Bas Brands
0fe5d5faa8 MDL-28452 core_user: add custom profilefield capability
Add a setting to show custom profilefields to self or others
with capability moodle/sit:viewuseridentity in the course context only
2021-04-21 11:22:31 +02:00
Bas Brands
2c89b82e17 MDL-28452 core_user: add behat test for duplicate shortname warning 2021-04-21 11:22:31 +02:00
Bas Brands
f9e1c2587a MDL-28452 core_user: migrate social profile fields
Create a new profile field type, move all existing content of the fields
'icq', 'skype', 'aim', 'yahoo', 'msn' and 'url' in the mdl_user table to
theses new profile fields if needed.

AMOS BEGIN
MOV [aimid,core],[aimid,courseimage,profilefield_social]
MOV [yahooid,core],[yahooid,profilefield_social]
MOV [skypeid,core],[skypeid,profilefield_social]
MOV [icqnumber,core],[icqnumber,profilefield_social]
MOV [msnid,core],[msnid,profilefield_social]
MOV [webpage,core],[webpage,profilefield_social]
AMOS END
2021-04-21 11:22:25 +02:00
Sara Arjona
d54a89ad2e Merge branch 'dynreg-upgrade-squash' of https://github.com/cengage/moodle 2021-04-21 09:58:29 +02:00
Jun Pataleta
610b339c6e Merge branch 'MDL-71017-master-2' of git://github.com/marinaglancy/moodle 2021-04-21 14:58:06 +08:00
abgreeve
d1be6cf1d8 Merge branch 'MDL-71205' of https://github.com/mkassaei/moodle 2021-04-21 13:32:14 +08:00
Jake Dallimore
49c97a866c Merge branch 'MDL-71030-master' of https://github.com/NashTechOpenUniversity/moodle 2021-04-21 12:06:50 +08:00
abgreeve
dac0c020ef Merge branch 'MDL-71174' of git://github.com/danmarsden/moodle 2021-04-21 11:01:05 +08:00
Eloy Lafuente (stronk7)
7c75781518 Merge branch 'MDL-63381_master_v3' of https://github.com/TomoTsuyuki/moodle 2021-04-20 23:56:56 +02:00
Claude Vervoort
ca80d53b38 MDL-70500 lti: dyn reg can be used to update tools 2021-04-20 17:12:28 -04:00
Sara Arjona
d0b3f1d24a Merge branch 'MDL-62244_master_label_view' of https://github.com/sheesania/moodle 2021-04-20 17:44:54 +02:00
Marina Glancy
881b4258f7 MDL-70897 various: uasort callback can not return bool
Co-authored-by: Ruslan Kabalin <ruslan.kabalin@gmail.com>
2021-04-20 14:58:25 +01:00
Sara Arjona
e29b256438 weekly release 4.0dev 2021-04-20 15:51:10 +02:00