104422 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
b3c4bd6250 MDL-73799 phpunit: Move some test names, as agreed in the issue
- behaviourtype_test => behaviour_type_test (10)
- questiontype_test => question_type_test (16)
- upgradelibnewqe_test => upgrade_old_attempt_data_test (13)
2022-03-03 12:22:36 +01:00
Eloy Lafuente (stronk7)
68b4a13cec MDL-73799 phpunit: various question & quiz testcase names
To all the walkthrough, questiontype, question, upgradelibnewqe,
behaviourtype_test and edit_form testcase classes::

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Remove file phpdoc block
- Remove MOODLE_INTERNAL if not needed.
- Changed code to point to global scope when needed.
- Fix some relative paths and comments here and there.
- All them passing individually.
- Complete runs passing too.

Special mention to:
- When belonging to other component and being valid api:
  - form related tests have been moved to tests/form subdir.
2022-03-03 12:22:36 +01:00
Eloy Lafuente (stronk7)
4003e31983 MDL-73785 phpunit: Move more tests to use correct names and namespaces
Applied the following changes to various testcase classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Remove file phpdoc block
- Remove MOODLE_INTERNAL if not needed.
- Changed code to point to global scope when needed.
- Fix some relative paths and comments here and there.
- All them passing individually.
- Complete runs passing too.

Special mention to:

- When belonging to other components and being valid api:
  - analytics related tests have been moved to tests/analytics subdir.
  - backup & restore related tests have been moved to tests/backup subdir.
  - events related tests have been moved to tests/event subdir.
  - privacy related tests have been moved to tests/privacy.
  - task related tests have been moved to tests/task subdir.
- Some simple renames, not including the component part anymore (not
  needed now that they are namespaced):
  - some xxxlib_test.php have been renamed lib_test.php
    (when they where testing the corresponding lib.php).
  - cache stores tests have been all renamed store_test, originally
    each one had its own name (file_test, apcu_test, redis_test...)
  - assign feedback tests have been all renamed feedback_test, originally
    each one had its own name (file_test, editpdf_test...)
2022-03-03 12:19:30 +01:00
Eloy Lafuente (stronk7)
e2821bf1ce MDL-73824 gradebook: Stricter float check to some gradelib functions
It has been detected that, right now, some localised floats are
being passed to those functions (say comma separator, say thousands)
and that's leading to all sort of problems later when comparing,
processing or storing those "wrong-floats" (user entered).

This just makes all those functions to be stricter, so any attempt
of passing to them a wrong float will fail with a clear TypeError.

Any existing case must be converted to a corrrect (X.Y) format, using
unformat_float() or PARAM_LOCALISEDFLOAT before any processing.

Localised floats cannot be used.

Also, fix all the places where those functions are called from
files having strict_types enabled because, with that, now float-like
strings are not accepted any more. Luckily, there is only case,
within the grade/classes/component_gradeitem.php file, and it has
been fixed by casting the float-like string coming from DB to float.
2022-03-03 12:19:02 +01:00
Jun Pataleta
1d99ba19a2 Moodle release 4.0beta v4.0.0-beta 2022-03-03 18:22:28 +08:00
Jun Pataleta
a1044ab030 NOBUG: Fixed file access permissions 2022-03-03 17:51:53 +08:00
Jun Pataleta
96e5418134 NOBUG: Fixed SVG browser compatibility 2022-03-03 17:51:51 +08:00
Jun Pataleta
26194eebbf Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2022-03-03 17:51:50 +08:00
Bas Brands
729ae8f096 MDL-73902 theme_boost: prevent dropdowns being cut off 2022-03-03 09:44:33 +01:00
Jake Dallimore
cfdd51a0da Merge branch 'MDL-73996-master-fix' of https://github.com/junpataleta/moodle 2022-03-03 11:30:51 +08:00
Jun Pataleta
898f3d0a82 MDL-73996 reportbuilder: Assert task log contains expected strings
* Ordering issues from \core_reportbuilder\local\helpers\schedule's
get_schedule_report_users() method won't guarantee that the expected
task log output will always be the same as user two can be fetched first
before user one which will cause the message to be sent to user two
first. So just get the task log's output string and make sure it
contains the expected log strings.
2022-03-03 11:09:59 +08:00
Jake Dallimore
350d7b9515 Merge branch 'MDL-73645-integration-master' of https://github.com/mihailges/moodle 2022-03-03 10:24:09 +08:00
Mikhail Golenkov
8c914c8756 MDL-73993 phpdoc: get_module_types_names returns lang_string objects 2022-03-03 10:39:09 +11:00
Eloy Lafuente (stronk7)
8d362e7249 Merge branch 'MDL-73996' of https://github.com/paulholden/moodle 2022-03-02 23:15:11 +01:00
Eloy Lafuente (stronk7)
d59b644d37 Merge branch 'master_MDL-71636-test-fix' of https://github.com/catalyst/moodle-MDL-70329 2022-03-02 21:23:51 +01:00
Mihail Geshoski
5de4513f3d MDL-73645 theme_boost: Type identifier when removing breadcrumb nodes
Introduces an additional type identifier argument to the remove() method.
This argument is optional and can be used to further specify the type of
the breadcrumb node we want to remove. This can add additional security
that the correct item is being removed.
2022-03-03 03:38:26 +08:00
Shamim Rezaie
25395ab58c Merge branch 'MDL-73742-master' of https://github.com/ferranrecio/moodle 2022-03-03 06:07:26 +11:00
Sara Arjona
ee480f04fb Merge branch 'MDL-73169-integration-master' of git://github.com/mihailges/moodle 2022-03-02 18:23:12 +01:00
Safat Shahin
cceabf651f MDL-71636 qbank_columnsortorder: unit and behat test fix 2022-03-02 11:26:36 -05:00
Bas Brands
aa134f981b MDL-74048 theme_boost: category manament nav margins 2022-03-02 16:50:24 +01:00
Ferran Recio
1501968e95 MDL-73742 theme_boost: fix double open block drawer title 2022-03-02 16:08:20 +01:00
Eloy Lafuente (stronk7)
bdedb3f9c9 Merge branch 'MDL-73953-master' of https://github.com/aanabit/moodle 2022-03-02 14:33:07 +01:00
Shamim Rezaie
96100fc518 Merge branch 'MDL-73880-master-integration' of https://github.com/ferranrecio/moodle 2022-03-03 00:18:59 +11:00
Amaia Anabitarte
7a6d0015e7 MDL-73953 core_adminpresets: Fixing latest created Full preset 2022-03-02 13:45:15 +01:00
Andrew Nicols
9331de13ab MDL-71636 qbank_columnsortorder: Fix issues identified during integration 2022-03-02 20:18:41 +08:00
Andrew Nicols
b15051a55f Merge branch 'MDL-71636' of https://github.com/timhunt/moodle 2022-03-02 19:56:24 +08:00
Eloy Lafuente (stronk7)
facf5cbcd0 Merge branch 'MDL-73953-master' of https://github.com/aanabit/moodle 2022-03-02 12:54:12 +01:00
Amaia Anabitarte
534cc4dada MDL-73953 core_adminpresets: Apply fullpreset setting changes 2022-03-02 12:49:02 +01:00
Amaia Anabitarte
c0196fb096 MDL-73953 core_adminpresets: Marking core presets on DB 2022-03-02 12:49:01 +01:00
Mihail Geshoski
9452555b35 MDL-73169 theme_boost: Add behat tests 2022-03-02 19:34:08 +08:00
Mathew May
030ade06ff MDL-74002 admin: Change conditions for rendering nav tabs 2022-03-02 19:29:47 +08:00
Bas Brands
a31cade872 MDL-74045 theme_boost: set the base layout to drawers 2022-03-02 11:07:45 +01:00
Mihail Geshoski
c427883cb7 MDL-73169 contentbank: Update the breadcrumb nodes and nav highlighting 2022-03-02 17:34:13 +08:00
Ferran Recio
ce887084fe MDL-73880 core_courseformat: fix section availability box 2022-03-02 10:31:59 +01:00
Mihail Geshoski
bcec96f952 MDL-73169 theme_boost: Update course category breadcrumb nodes 2022-03-02 17:29:35 +08:00
Mihail Geshoski
1388ce84a2 MDL-73169 tool_lp: Update course category breadcrumb nodes 2022-03-02 17:27:38 +08:00
Mihail Geshoski
5a1e70573d MDL-73169 core_backup: Update course category breadcrumb nodes 2022-03-02 17:27:38 +08:00
Mihail Geshoski
e949e1a33b MDL-73169 core_filter: Update course category breadcrumb nodes 2022-03-02 17:27:38 +08:00
Mihail Geshoski
0cbe8704ee MDL-73169 core_cohort: Update course category breadcrumb nodes 2022-03-02 17:27:38 +08:00
Mihail Geshoski
8469f9e724 MDL-73169 core_role: Update course category breadcrumb nodes 2022-03-02 17:27:38 +08:00
Mihail Geshoski
805a9eebf5 MDL-73169 core_course: Update course category breadcrumb nodes 2022-03-02 17:27:38 +08:00
Mihail Geshoski
3a333176d1 MDL-73169 course: Add a general setup method for the category pages 2022-03-02 17:27:35 +08:00
Cameron Ball
53d3843955 MDL-54724 qtype_multianswer: Better handle corrupted questions
When questions are deleted, we now check if the parent is in use before deletion.

Prior to this, it would be possible for multianswer questions to reference
questions that have been deleted. This results in fatal errors when the quiz
is viewed.

This patch uses a dummy 'subquestion_replacement' to handle this case and
display some information to the end user about what has happened so that
they may take action to repair the corrupted question.

As a result of the bug described above, the sequence column of
mdl_question_multianswer can contiain references to questions that no
longer exist, and these IDs can make their way in to backups.

When this happens, the backups cannot be restored. To avoid this,
this patch skips trying to restore those questions that reference
question IDs that no longer exist (as there is no way to recover them).
2022-03-02 17:12:19 +08:00
Marc-Alexandre Ghaly
6dc1084c47 MDL-71636 qbank_columnsortorder: Add a columnsortorder settings page
This implementation will introduce a feature "columnsortorder"
which will add the column sort order feature in an external page.
Having this feature will give users the flexibility of sorting plugin
columns in the question bank view.
2022-03-02 09:08:50 +00:00
Amaia Anabitarte
77ca86bf87 MDL-73953 core_adminpresets: Upgrading presets with different language 2022-03-02 09:42:46 +01:00
Marc-Alexandre Ghaly
7c016b3451 MDL-71636 core_question : API changes for column_base
This commit implements methods visibility changes to column_base class
and its child classes.
2022-03-02 08:14:48 +00:00
Jun Pataleta
7fe8e34f7d Merge branch 'MDL-73939-master' of git://github.com/rezaies/moodle 2022-03-02 14:34:12 +08:00
Jake Dallimore
c08caf57c5 Merge branch 'MDL-73645-master-1' of git://github.com/mihailges/moodle 2022-03-02 14:10:19 +08:00
Jun Pataleta
7ac5deaced Merge branch 'MDL-73462-master' of https://github.com/peterRd/moodle 2022-03-02 13:46:10 +08:00
Mihail Geshoski
2a09a3ff76 MDL-73645 theme_boost: Keep section breadcumb item in specific layouts
Avoids removing the section breadcrumb nodes in the course module
context when the course uses the 'One section per page' layout.
Additionaly, it also removes the Courses and Category breadcrumb
nodes in the module contexts to be consistent with the way the
breadcrumbs are displayed in the course context.
2022-03-02 13:01:03 +08:00