100767 Commits

Author SHA1 Message Date
Shamim Rezaie
796e82124f MDL-71410 mod_quiz: implement activity_dates for the quiz module 2021-04-27 14:32:26 +10:00
Shamim Rezaie
ec519a6488 MDL-71410 mod_quiz: Cache quiz times in modinfo for performance
We update the dates with user/group overrides. The calculation of
the override in the quiz module is different from the assignment
module as the quiz_overrides table des not have a sortorder column.
See quiz_update_effective_access().
2021-04-27 14:32:26 +10:00
Shamim Rezaie
d61f18433f MDL-71410 mod_quiz: Cache user and group overrides 2021-04-27 14:32:26 +10:00
Shamim Rezaie
660f7c08c5 MDL-71410 mod_lesson: implement activity_dates for the lesson module 2021-04-27 14:32:26 +10:00
Shamim Rezaie
8a308c498c MDL-71410 mod_lesson: Cache lesson times in modinfo for performance
We update the dates with user/group overrides. The calculation of
the override in the lesson module is different from the assignment
module as the lesson_overrides table des not have a sortorder column.
See lesson::update_effective_access().
2021-04-27 14:01:49 +10:00
Shamim Rezaie
47fcfa0af8 MDL-71410 mod_lesson: Cache user and group overrides 2021-04-27 14:01:45 +10:00
Shamim Rezaie
18efd91d2f MDL-71410 mod_assign: implement activity_dates for the assignment module 2021-04-27 14:00:06 +10:00
Shamim Rezaie
4532d3f8b7 MDL-71410 mod_assign: Cache assign times in modinfo for performance
We update the dates with user/group overrides
2021-04-27 14:00:06 +10:00
Shamim Rezaie
8e50d64baf MDL-71410 mod_assign: Cache user and group overrides 2021-04-27 14:00:02 +10:00
Shamim Rezaie
14e37590bb MDL-71410 core: Introduce override_customdata()
The get_custom_data() method now calls obtain_dynamic_data() because
$this->customdata can be dynamic now.
2021-04-26 05:28:36 +10:00
Sara Arjona
146a38dc45 weekly release 4.0dev 2021-04-23 10:46:53 +02:00
Sara Arjona
a080f64c01 NOBUG: Fixed SVG browser compatibility 2021-04-23 10:46:51 +02:00
Jun Pataleta
24a5f53086 Merge branch 'MDL-71171_master' of git://github.com/mdjnelson/moodle 2021-04-23 12:41:15 +08:00
Mark Nelson
5eb3d47403 MDL-71171 customfield_text: ensure we set defaults properly 2021-04-23 12:31:53 +08:00
abgreeve
ea362206a3 Merge branch 'MDL-70818-master-4' of git://github.com/rezaies/moodle 2021-04-23 12:19:51 +08:00
Andrew Nicols
db49294748 Merge branch 'MDL-70903-master' of git://github.com/roland04/moodle 2021-04-23 11:56:47 +08:00
Andrew Nicols
1a34066129 Merge branch 'master-MDL-71376' of https://github.com/rjnl/moodle 2021-04-23 11:52:21 +08:00
Shamim Rezaie
ac2b200a6e MDL-70818 mod_workshop: implement activity_dates for the workshop module 2021-04-23 13:46:28 +10:00
Shamim Rezaie
0b64b10eb9 MDL-70818 mod_workshop: cache workshop times in modinfo for performance 2021-04-23 13:46:28 +10:00
Shamim Rezaie
2ad16d8d9e MDL-70818 mod_scorm: implement activity_dates for the scorm module 2021-04-23 13:46:28 +10:00
Shamim Rezaie
31288bd1a6 MDL-70818 mod_forum: implement activity_dates for the forum module 2021-04-23 13:46:28 +10:00
Shamim Rezaie
b284e9e705 MDL-70818 mod_forum: cache forum times in modinfo for performance 2021-04-23 13:46:28 +10:00
Shamim Rezaie
b3b7c3f95a MDL-70818 mod_feedback: implement activity_dates for the feedback module 2021-04-23 13:46:28 +10:00
Shamim Rezaie
6b243c62e6 MDL-70818 mod_data: implement activity_dates for the database module 2021-04-23 13:46:28 +10:00
Andrew Nicols
8b7a5809b3 Merge branch 'MDL-71394-master' of git://github.com/marinaglancy/moodle 2021-04-23 11:42:00 +08:00
Andrew Nicols
b124832fe6 Merge branch 'MDL-70970' of git://github.com/paulholden/moodle 2021-04-23 11:26:53 +08:00
Andrew Nicols
33173e7223 Merge branch 'MDL-70902-master' of git://github.com/dravek/moodle 2021-04-23 11:12:15 +08:00
Sara Arjona
80b1bb4751 Merge branch 'MDL-57831' of git://github.com/paulholden/moodle 2021-04-22 18:13:04 +02:00
Paul Holden
f9f679611d MDL-57831 tool_monitor: update Behat tests for message preferences. 2021-04-22 16:11:30 +01:00
Sara Arjona
841df2a216 Merge branch 'MDL-71136_master' of https://github.com/TomoTsuyuki/moodle 2021-04-22 13:56:37 +02:00
Sara Arjona
c9c18da021 Merge branch 'MDL-71400-master' of git://github.com/mihailges/moodle 2021-04-22 13:16:23 +02:00
Jun Pataleta
c070f3e66d Merge branch 'MDL-71170_master' of git://github.com/mdjnelson/moodle 2021-04-22 18:55:28 +08: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
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
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