3192 Commits

Author SHA1 Message Date
Andrew Nicols
776f4bd80c MDL-72179 behat: Make use of page resolvers 2021-07-26 15:14:28 +08:00
Simey Lameze
b0133904bf MDL-71817 calendar: behat changes for calendar block
This commit does few things:

1) Remove unnecessary "I hover over today in the calendar"
steps as it's not necessary to hover onto the day to see the events
any more.

2) Replace "I follow This month" steps to "I follow Full calendar"

3) Update i_create_a_calendar_event_with_form_data() to use the new
fullcalendar lang string.
2021-07-22 09:00:30 +08:00
Simey Lameze
d2f612ab24 MDL-71817 block_calendar_month: load month view in the block 2021-07-22 08:46:01 +08:00
Jun Pataleta
6c131ead99 Merge branch 'MDL-71775-master' of git://github.com/lameze/moodle 2021-07-15 16:10:48 +08:00
Simey Lameze
f58750c2a5 MDL-71775 block_calendar_month: add footer options 2021-07-15 10:20:54 +08:00
Ilya Tregubov
4819625349 MDL-32103 completion: Allow instant completion updates.
For activity based course completion criteria allow instant
course completion updates if the activity completion state was changed
for a single user.
2021-07-13 12:07:53 +02:00
Andrew Nicols
4f422785c6 MDL-71113 javascript: Improve basic JS Documentation 2021-06-18 09:38:05 +08:00
Andrew Nicols
92179b7057 MDL-71113 js: Fix all jsdoc warnings 2021-06-18 09:38:05 +08:00
Andrew Nicols
70dcc60862 MDL-71113 js: Bare minimum fixes to build jsdoc 2021-06-18 09:38:04 +08:00
Dongsheng Cai
e3690a392d MDL-70846 accessibility: update tree attributes to pass a11y check
- Move aria-* atrributes from <p> to <li>
- Move "role" attribute from <p> to <li>
- Update behat tests

Based on reference implementation from:
- https://www.w3.org/TR/wai-aria-practices-1.1/examples/treeview/treeview-2/treeview-2a.html
- https://www.w3.org/WAI/GL/wiki/Using_ARIA_trees
2021-06-03 13:52:04 +10:00
Andrew Nicols
31d6adef4d MDL-70990 core_block: Replace legacy BLOCK_CONTENT_UPDATED event
The legacy M.core.event.BLOCK_CONTENT_UPDATED event has been replaced with a
new core_block/events::blockContentUpdated native DOM event.

The new event can be triggered using the `notifyBlockContentUpdated`
event, and by providing the HTMLElement that was updated, for example:

```
import {notifyBlockContentUpdated} from 'core_block/events';

const someHandler = e => {
    // ...
    const updatedBlock = e.target.closest('.block');
    notifyBlockContentUpdated(updatedBlock);
};
```

The new event can be listened to at any point in the DOM using the
following syntax:

```
import {eventTypes} from 'core_block/events';

const handler = e => {
    // The block that was updated.
    e.target;

    // The id of the updated block.
    e.detail.instanceId;
};

document.addEventListener(eventTypes.blockContentUpdated, handler);
```

A backward-compatabibility layer is included to ensure that any legacy
YUI event listener is still called with the same arguments.

This legacy bridges will be removed after Moodle 4.3.
2021-05-26 10:47:17 +08:00
Sara Arjona
fd8dabc9fe MDL-71157 block_myoverview: remove wait from behat
The step "And I wait until ".block_myoverview
[data-control='next']" "css_element" exists" is not correct
because this [data-control='next'] element exists before and
after the step so, in some cases, it might cause the following
step will start earlier than expected.
As pending JS has been added, this wait steps are not required
any more.
2021-05-19 09:43:04 +02:00
Sara Arjona
639707d8a2 Merge branch 'MDL-71611-master_blockaccessreviewupgrade' of https://github.com/brickfield/moodle 2021-05-13 11:45:36 +02:00
Jun Pataleta
97b623aa9b Merge branch 'MDL-71584-master_Languagestrings' of https://github.com/brickfield/moodle 2021-05-13 13:57:22 +08:00
Eloy Lafuente (stronk7)
d88452fd29 Merge branch 'MDL-71580-master-enfix' of git://github.com/mudrd8mz/moodle 2021-05-12 22:58:12 +02:00
Mike Churchward
0ebe676416 MDL-71611 block_accessreview: Return formats if feature disabled. 2021-05-12 16:29:09 -04:00
David Mudrák
03402e3c5d MDL-71580 lang: Fix reworded strings in tests 2021-05-12 17:10:16 +02:00
Helen Foster
c8dc7bc942 MDL-71580 lang: Import fixed English strings (en_fix) 2021-05-12 17:10:16 +02:00
Mike Churchward
13fb58c663 MDL-71584 tool_brickfield: Fixed up language string issues. 2021-05-12 08:44:01 -04:00
Eloy Lafuente (stronk7)
9d6aa39985 MDL-71583 versions: Add all the missing full-stops to version/requires
It seems that the new phpcs3 checker is now controlling those
line comments that previously were ignored.

This commit just looks for all the cases and bulk-add
them when needed. The bash script (mac) used to add all them is:

while read -r line; do
    arr=(${line//:/ })
    if [[ -n ${arr[0]} ]] && [[ -n ${arr[1]} ]]; then
        echo "  file ${arr[0]}, line ${arr[1]}"
        sed -i "${arr[1]}s/\$/\./" ${arr[0]}
    fi
done < <(find . -name version.php | xargs ag --nomultiline '>(version|requires) *=.*//.*[^;\.]$')
2021-05-11 20:11:07 +02:00
Víctor Déniz
85ccac0afb Merge branch 'MDL-71543-master_toggleicon' of https://github.com/brickfield/moodle 2021-05-10 22:06:59 +01:00
Jun Pataleta
3ebe3953da Merge branch 'MDL-71552-master_heatmaptoggle' of https://github.com/brickfield/moodle 2021-05-10 17:23:05 +08:00
Eloy Lafuente (stronk7)
dfb3c305a3 NOBUG: Fixed file access permissions 2021-05-07 16:54:26 +02:00
Jun Pataleta
3482ce5f78 Merge branch 'MDL-71395-master-2' of git://github.com/marinaglancy/moodle 2021-05-07 10:30:23 +08:00
Mike Churchward
0673d72e75 MDL-71543 block_accessreview: Toggling the heatmap icon image. 2021-05-06 17:30:49 -04:00
Mike Churchward
11646b9453 MDL-71552 block_accessreview: Removed 'alert' class when toggling off. 2021-05-06 16:06:17 -04:00
Marina Glancy
d7d609162e MDL-71395 block_tag_youtube: sometimes exception may have empty message 2021-05-06 14:44:24 +02:00
Eloy Lafuente (stronk7)
9b522367a0 Merge branch 'MDL-71425-master-enfix' of git://github.com/mudrd8mz/moodle 2021-05-04 23:39:32 +02:00
Eloy Lafuente (stronk7)
7ae6e5da34 MDL-69863 tool_brickfield: Final version adjustments to current
In master, fixed to 2021052500
2021-05-04 19:50:24 +02:00
Mike Churchward
be4fbf062c MDL-69863 block_accessreview: Better error display. 2021-05-04 19:49:55 +02:00
Mike Churchward
020109f3eb MDL-69863 tool_brickfield: Disable analysis by default on installation. 2021-05-04 19:49:54 +02:00
Mike Churchward
c6c7c28dea MDL-69863 tool_brickfield: Moving plugins to core files. 2021-05-04 19:49:54 +02:00
Mike Churchward
f8b34ffc68 MDL-69863 tool_brickfield: Added Behat tests. 2021-05-04 19:49:54 +02:00
Andrew Nicols
b3ead50a47 MDL-69863 block_accessreview: Fix file mode 2021-05-04 19:49:54 +02:00
Mike Churchward
e1c6497293 MDL-69863 tool_brickfield: Adding the Brickfield toolkit. 2021-05-04 19:49:54 +02:00
David Mudrák
ad30fde448 MDL-71425 lang: Fix reworded strings in tests 2021-05-04 17:45:18 +02:00
Helen Foster
49efd0b4b6 MDL-71425 lang: Import fixed English strings (en_fix) 2021-05-04 14:51:44 +02:00
Ilya Tregubov
cf1cf222e7 MDL-66431 core: Fix behat tests.
Move activity creation to data generators. Only fixing those
tests failing due to removing usemodchooser preference.
2021-05-01 16:22:03 +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
sam marshall
5e72715e4f MDL-71099 Lib: Move new user_fields class from core to core_user
This class would belong more appropriately within the 'user' API
(core_user) instead of within the 'core' API, since it is
directly related to user data.

Since the class has only just been added to Moodle, now is a good
time to move it.
2021-03-25 13:47:23 +00:00
Eloy Lafuente (stronk7)
81407f18ec MDL-71036 phpunit: Mock->setMethods() silently deprecated
The current ->setMethods() has been silently (won't emit any
warning) in PHPUnit 9. And will stop working (current plans)
in PHPUnit 10.

Basically the now deprecated method has been split into:

- onlyMethods(): To point to existing methods in the mocked artifact.
- addMethods(): To point to non existing (yet) methods in the mocked
  artifact.

In practice that means that all our current setMethods() calls can be
converted to onlyMethods() (existing) and done. The addMethods() is
mostly useful on development phases, not final testing.

Finally note that <null> isn't accepted anymore as parameter to
double all the methods. Instead empty array [] must be used.

Link: https://github.com/sebastianbergmann/phpunit/issues/3770
2021-03-11 23:04:31 +01:00
sam marshall
558cc1b85e MDL-45242 Lib: Replace calls to deprecated functions
In all cases changes have been kept to a minimum while not making
the code completely horrible. For example, there are many instances
where it would probably be better to rewrite a query entirely, but
I have not done that (in order to reduce the risk of changes).
2021-03-10 10:57:10 +00:00
Eloy Lafuente (stronk7)
8cf7878e18 Merge branch 'MDL-70424-auth-avoid-changes' of https://github.com/brendanheywood/moodle 2021-03-04 00:27:53 +01:00
Paul Holden
1d66efeda5 MDL-65552 block_activity_results: correct Behat tests for idnumbers.
Teachers can see user idnumber fields only when they are configured
identity fields. Students cannot.
2021-03-03 23:15:07 +08:00
Paul Holden
a7e0ba1e71 MDL-65552 user: escape idnumber field on output.
This commit also corrects parameter definition of the field to
match core_user.
2021-03-03 23:15:07 +08:00
Peter Dias
36e529a889 MDL-59293 block_onlineusers: Update behat tests 2021-03-02 15:51:31 +00:00
Peter Dias
33d6017287 MDL-59293 block_onlineusers: Check whether current user can view online users
- Removed block from site admin.
- Blocked guest from viewuserlist cap
2021-03-02 15:51:31 +00:00
Brendan Heywood
300213ee2e MDL-70424 auth: Avoid random changes to $CFG->auth 2021-02-23 11:40:57 +11:00
Marina Glancy
440073ff20 MDL-64554 user: make private files editor modal/ajax form 2021-02-17 18:06:57 +01:00
Shamim Rezaie
3a9fa051c3 MDL-70173 dashboard: ARIA role presentation conflicted the empty alt
The markup <img role="presentation" alt="alt text"> is contradictory.

According to https://www.w3.org/TR/2017/WD-wai-aria-practices-1.1-20170628/examples/presentation/PresentationRoleExamples.html
 It is recommended that authors instead use empty alt text (alt="")
 where they use role="presentation".
2021-02-09 16:16:09 +11:00