Commit graph

2780 commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
0524a0b9f9 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:00:11 +02:00
Eloy Lafuente (stronk7)
71d0cfefab MDL-71583 versions: bump all versions and requires near release
version = 2021051700 release version
requires= 2021051100 current rc1 (week7roll1) version

Note that, because we are under parallel development period,
this is being done in the branch that is going to be released
(MOODLE_311_STABLE already existing) for Moodle 3.11.0 and
not in master, that is the one getting the bump under normal
(non-parallel) periods.
2021-05-11 18:50:34 +02:00
Mihail Geshoski
f0351e4d95 MDL-71570 core_grades: Avoid using deprecated string in grade templates 2021-05-10 12:22:10 +08:00
David Mudrák
4806989294 MDL-71425 lang: Fix reworded strings in tests 2021-05-04 17:47:01 +02:00
Eloy Lafuente (stronk7)
372a6c5742 Merge branch 'MDL-66431-311' of git://github.com/ilyatregubov/moodle into MOODLE_311_STABLE 2021-05-02 19:13:56 +02:00
Víctor Déniz
2f2f1e6798 Merge branch 'MDL-69956-311' of https://github.com/dcai/moodle into MOODLE_311_STABLE 2021-05-02 19:13:45 +02:00
Ilya Tregubov
be5eff78ab 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:18:56 +02:00
Dongsheng Cai
4f1c48ef54 MDL-69956 forum: throw exception when advanced grading is not ready 2021-04-30 14:59:31 +10:00
Sara Arjona
d7f2abf5af Merge branch 'MDL-71016-311' of git://github.com/paulholden/moodle into MOODLE_311_STABLE 2021-04-29 09:21:44 +02:00
Adrian Greeve
702ea8590e Merge branch 'MDL-71051-311-2' of git://github.com/marinaglancy/moodle into MOODLE_311_STABLE 2021-04-29 09:22:37 +08:00
Paul Holden
23f0859a9c MDL-71016 gradeexport_xml: ensure user/grade idnumbers are encoded. 2021-04-28 19:03:50 +01:00
Sara Arjona
2e877cd448 Merge branch 'MDL-70763-311' of git://github.com/paulholden/moodle into MOODLE_311_STABLE 2021-04-28 12:36:30 +02:00
Marina Glancy
3c9e54eafa MDL-71051 core_user: always use API when working with profile fields 2021-04-28 11:49:27 +02:00
Víctor Déniz
6b9033f251 Merge branch 'MOODLE_311_STABLE_fix_gradeimport_csv' of https://github.com/intrajp/moodle into MOODLE_311_STABLE 2021-04-19 22:48:24 +01:00
Víctor Déniz
42a4fea40c Merge branch 'MDL-71118-311' of git://github.com/lucaboesch/moodle into MOODLE_311_STABLE 2021-04-19 19:44:08 +01:00
Eloy Lafuente (stronk7)
51a5d523a1 MDL-71031 external: Minor tweaks towards coding style and external rules
- Some small namespace/use/MOODLE_INTERNAL/requires reorganization.
- Move file phpdocs to class phpdocs.
- Move external method names to be new "execute" default ones.
- Move unit tests to matching core_grades\external namespace.
- Add missing clean_returnvalue() calls.
2021-04-18 11:53:09 +02:00
Peter Burnett
74a86a9880 MDL-71031 webservices: Extended gradecategory creation API
This adds a new webservice that creates gradecategories as a batch,
and deprecates the old single creation call, which is superseded.
It also patches a few small issues in the single WS, for any integrations
currently relying on that webservice.
2021-04-18 11:53:03 +02:00
Luca Bösch
c5446c9cc7 MDL-71118 core: Add grade (verb) string.
AMOS BEGIN
 CPY [grade,core],[gradenoun,core]
 CPY [grade,core],[gradeverb,core]
AMOS END
2021-04-17 11:45:57 +02:00
Luca Bösch
3256a63914 MDL-71118 gradereport_user: Display Grades (plural) in profile page. 2021-04-17 11:45:57 +02:00
abgreeve
dfda0b1c19 Merge branch 'MDL-71007-courseidnumer-grade-ws-MOODLE_311_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_311_STABLE 2021-04-15 13:47:02 +08:00
Eloy Lafuente (stronk7)
e0d45a6bc2 Merge branch 'MDL-70616-311-fix' of https://github.com/izendegi/moodle into MOODLE_311_STABLE 2021-04-14 12:45:11 +02:00
Iñigo Zendegi
a8d4abf091 MDL-70616 gradingform_rubric: Filters not applied to rubric name 2021-04-14 11:52:16 +02:00
Andrew Nicols
8e358c9983 Merge branch 'MDL-71169-311-execute' of git://github.com/mudrd8mz/moodle into MOODLE_311_STABLE 2021-04-14 08:35:38 +08:00
Paul Holden
95aa0b1802 MDL-70763 gradereport_grader: export preferences for correct user. 2021-04-04 23:15:34 +01:00
Eloy Lafuente (stronk7)
d1c41b4dbb MDL-37655 phpunit: Avoid having multiple testcase classes in 1 file
Note that there wasn't any case of multiple testcase classes in
1 file. All the cases reported in the issue were false positives
caused but other "mock/fixture" files being named _test.

So all this issue does is:

1) rename any _test suffixed class in test files, because we are
   going to start renaming a lot of test classes to _test.

2) ensure that the 2 test case classes modified in this issue,
   are already observing the filename = classname rule that will
   be implemented soon (and verigy it works).
2021-03-30 19:17:59 +02:00
Shintaro Fujiwara
e271fd3a79 MDL-69304 gradeimport_csv: Validate if the user id is numerical. 2021-03-26 10:35:51 +09:00
sam marshall
3dee5cd74c 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:48:04 +00:00
Víctor Déniz
7fb15daff2 Merge branch 'MDL-71022-311' of git://github.com/paulholden/moodle into MOODLE_311_STABLE 2021-03-23 23:01:00 +00:00
David Mudrák
4983142e5a MDL-71169 external: Do not explicitly specify the default methodname 2021-03-22 15:49:59 +01:00
Eloy Lafuente (stronk7)
6f2b5817d6 Merge branch 'MDL-70893-311' of git://github.com/marinaglancy/moodle into MOODLE_311_STABLE 2021-03-18 00:23:36 +01:00
Eloy Lafuente (stronk7)
790237a77f MDL-71036 phpunit: xml config - switch coverage info to new includes
This applies the "whitelist" => "include" changes to all the core
phpunit_coverage_info occurrences, so core won't emit any deprecation
warning (see previous commit).

At the same time, modified a bunch of comments in coverage files
to be more readable/understandable.
2021-03-11 23:07:31 +01:00
Eloy Lafuente (stronk7)
3dd26fe334 MDL-71036 phpunit: assertContains() now performs strict comparison
The methods assertContains() and assertNotContains() now perform
strict (type and value) comparison, pretty much like assertSame()
does.

A couple of new assertContainsEquals() and assertNotContainsEquals()
methods have been created to provide old (non-strict) behavior, pretty
much like assertEquals() do.

Apart from replacing the calls needing a relaxed comparison to those
new methods, there are also a couple of alternative, about how to
fix this, depending of every case:

- If the test is making any array_values() conversion, then it's better
  to remove that conversion and use assertArrayHasKey(), that is not
  strict.
- Sometimes if may be also possible to, simply, cast the expectation
  to the exact type coming in the array. I've not applied this technique
  to any of the cases in core.

Link: https://github.com/sebastianbergmann/phpunit/issues/3426
2021-03-11 23:07:31 +01:00
sam marshall
3cc4d3d2e2 MDL-45242 Course: Enrol feature supports custom profile fields 2021-03-10 10:58:09 +00:00
sam marshall
0919a04311 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:58:09 +00:00
Brendan Heywood
f8fe2fabfe MDL-71007 grade_report: Add course idnumber to grade report api
The gradereport_user_get_grade_items now includes the idnumber
2021-03-04 16:20:52 +11:00
Ilya Tregubov
4bc3faf193 MDL-69680 lib: Replace deprecated jQuery functions 2021-03-04 12:48:06 +08:00
Paul Holden
2474bc765f 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:14:54 +08:00
Paul Holden
d1c9dc2ac0 MDL-71022 gradereport_history: prevent double escaping of users.
The user identity fields are already escaped by the AJAX endpoint
that returns them, we don't need to do it again at the client.
2021-03-02 09:14:32 +00:00
Mark Nelson
0f33c1b820 MDL-70125 core_grade: do not change overridden status during regrading 2021-02-22 17:35:53 +08:00
Marina Glancy
d2d0cffd1d MDL-70893 various: optional function arguments must be in the end 2021-02-15 16:54:01 +01:00
Tomo Tsuyuki
77b857714a MDL-70736 gradingform_guide: Fix loading marking guide template issue
Do not check grade item name if it is from shared template.
2021-02-05 10:54:33 +11:00
Andrew Nicols
d467f87bd7 MDL-66979 behat: Work around weird gradebook focus behaviour
I can't expand this one in a sane fashion but the older JS is doing some
weird and wonderful things with focus.

The only way I could get this to behave correctly was to move away from
the field, move back to it, and then move away again. Other combinations
failed in different browsers for different reasons.
2021-01-22 14:52:18 +08:00
Sara Arjona
1520ae2cbd Merge branch 'MDL-69308_311' of https://github.com/stronk7/moodle into MOODLE_311_STABLE 2021-01-14 12:03:36 +01:00
Eloy Lafuente (stronk7)
5aed7f4217 MDL-69308 upgrade: remove all the < 3.6.0 upgrade steps
This just deletes all the upgrade steps previous to 3.6.0. Some
small adjustments, like tweaking globals can also be applied
when needed.

Also includes an upgrade step to prevent upgrading from any
version < 2018120300 (v3.6.0) as anti-cheating measure.

Note that in this case, there wasn't any case of upgradelib
functions being used, hence we haven't to deprecate/remove
anything in codebase. When there is such a need, that is done
in separate commits (one for each function) and documented here.

See MDL-65809 commits for an example removing/deprecating a
good number of functions.
2021-01-13 19:28:39 +01:00
Juan Segarra Montesinos
c689df0a5d MDL-69797 core_grades: Implement authorization into fetch method 2021-01-12 17:14:31 +01:00
Juan Segarra Montesinos
3a02eccc2e MDL-69797 core_grades: Implement authorization into fetch method 2021-01-12 17:14:31 +01:00
Juan Segarra Montesinos
dcbaed2862 MDL-69797 gradingform_rubric: Implement authorization into fetch method 2021-01-12 17:14:31 +01:00
Juan Segarra Montesinos
808ad0df73 MDL-69797 gradingform_guide: Implement authorization into fetch method 2021-01-12 17:14:31 +01:00
Mark Nelson
a64c837ae5 MDL-70034 gradingform_guide: use new API to retrieve grade item name 2021-01-11 15:20:05 +01:00
David Mudrák
3a9b87a29c MDL-70550 lang: Use the fixed strings in Behat tests, too 2021-01-08 09:01:29 +01:00