93 Commits

Author SHA1 Message Date
Paul Holden
47d119945d MDL-74634 theme_boost: remove old drawer-open-nav user preference. 2022-06-12 20:01:23 +01:00
Eloy Lafuente (stronk7)
95c8cb7582 MDL-74512 behat: Skip tests requiring lang install/upgrade
By adding the step:

Given remote langimport tests are enabled

We make the execution of scenarios requiring to install /
upgrade lang packs optional, based in the existence of the constant:

TOOL_LANGIMPORT_REMOTE_TESTS

That way, when we are skipping language upgrades with the CFG var:

$CFG->skiplangupgrade = true

We can decide not not execute those tests.

With other words, putting something like this in the config.php
file we will be controlling when to execute or no the behat tests:

    // Disable lang updates on upgrade.
    $CFG->skiplangupgrade = true;
    if (empty($CFG->skiplangupgrade)) {
        // Define it only if we aren't skipping lang upgrades.
        define('TOOL_LANGIMPORT_REMOTE_TESTS', true);
    }
2022-04-17 20:27:57 +02:00
Sara Arjona
e9883614ab Merge branch 'MDL-74078-master' of https://github.com/mickhawkins/moodle 2022-04-04 15:09:34 +02:00
Michael Hawkins
a640f43181 MDL-74078 core_my: Lock all blocks on the my courses page 2022-04-04 14:24:56 +08:00
Peter Dias
6b25d957bf MDL-74298 core: Render complete links when searching for a setting. 2022-04-01 11:22:05 +08:00
Andrew Nicols
322395f29c Merge branch 'MDL-74199-master' of https://github.com/aanabit/moodle 2022-03-19 22:00:16 +08:00
Jun Pataleta
1e533995dd Merge branch 'MDL-73233-master' of https://github.com/sarjona/moodle 2022-03-18 00:35:11 +08:00
Jun Pataleta
cb9480841c Merge branch 'MDL-74216-master' of https://github.com/mihailges/moodle 2022-03-17 19:47:46 +08:00
Sara Arjona
c612f121a0 MDL-73233 navigation: Hide Dashboard from primary nav
When the $CFG->enabledashboard is disabled, the "Dashboard"
menu option won't be displayed in the primary navigation.
2022-03-16 11:35:07 +01:00
Sara Arjona
5349861e69 MDL-73233 admin: Add enabledashboard setting
The $CFG->enabledashboard setting has been added to Appearance >
Navigation, to let admins disable the "Dashboard" option from the
primary navigation.

This commit also changes the behaviour of get_home_page(), to take
into account this setting and adds a new method, get_default_home_page(),
to return the expected default home page (that wil be used when current
default page is not defined or valid).
2022-03-16 11:22:22 +01:00
Mihail Geshoski
5f227de8f3 MDL-74216 navigation: Add behat tests 2022-03-16 18:16:58 +08:00
Amaia Anabitarte
c28b5ad8c0 MDL-74199 core_user: Remove breadcrumbs on private files 2022-03-15 18:01:17 +01:00
Jun Pataleta
1f21daf8b3 MDL-72481 core: Fix more menu keyboard navigation
* Allow the more menu to be rendered as a tablist when needed.
* Let menu_navigation handle keyboard navigation only when
menu items are not rendered as dropdowns. Otherwise, leave
the keyboard navigation handling via the default handlers
(e.g. dropdown.js/aria.js/tab.js).
* When the more menu is rendered as a tablist, use aria-selected
for the selected tab. When it's rendered as a menu, use aria-current
for the selected menu item. (The menuitem role supports aria-current and
not aria-selected)
* Make sure that the active tab is tabbable by default.
* Submenu items should always have tabindex=-1
* Update behat to use css_element instead of xpath. Also, improved it
to consider that it is the active element that should be tabbable.

Co-authored-by: Shamim Rezaie <shamim@moodle.com>
2022-03-15 12:48:21 +11:00
Mihail Geshoski
748ce930b4 MDL-74087 theme_boost: Add behat tests 2022-03-10 22:30:00 +08: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
Jake Dallimore
c08caf57c5 Merge branch 'MDL-73645-master-1' of git://github.com/mihailges/moodle 2022-03-02 14:10:19 +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
Mihail Geshoski
2ee1e6053c MDL-73645 theme_boost: Re-implement breadcrumbs in the course context 2022-03-02 13:00:25 +08:00
Peter Dias
081b255ab0 MDL-73462 navigation: Behat test update 2022-03-01 17:57:24 +08:00
Peter Dias
f1959af7f6 MDL-73462 course: Introduce course category tertiary navigation
Update the category management page.
2022-03-01 17:57:24 +08:00
Víctor Déniz
efdd77a157 MDL-73812 lang: Replace modified strings in tests 2022-02-18 16:14:02 +00:00
Jun Pataleta
4e1a6e6830 Merge branch 'MDL-73646-master-v2' of https://github.com/sharidas/moodle 2022-02-03 19:09:37 +08:00
Sujith Haridasan
3eda637c44 MDL-73646 navigation: Fix breadcrumbs for site admin
Fix the breadcrumbs for site administration page.
Created a new public method get_active_method for the same.
2022-02-02 10:56:16 +05:30
Michael Hawkins
537e31cf96 MDL-73452 navigation: Update to Course reuse string in secondary nav
Previously this used the "Course administration" string, which causes
some confusion for those familiar with the older usage of that string.
A new "Course reuse" string has been added to better reflect what is
being linked to in course secondary navigation.
2022-02-01 21:10:59 +08:00
Eloy Lafuente (stronk7)
8f8b780008 Merge branch 'MDL-73216-master' of https://github.com/bmbrands/moodle 2022-01-28 00:23:48 +01:00
Bas Brands
c5089fd7a7 MDL-73216 theme_boost: fix mobile primary nav 2022-01-25 10:50:42 +01:00
Eloy Lafuente (stronk7)
d8e1ec2c81 Merge branch 'MDL-73188-master-3' of https://github.com/HuongNV13/moodle 2022-01-25 00:06:30 +01:00
Jake Dallimore
041b1beb46 Merge branch 'MDL-73347-master' of https://github.com/sarjona/moodle 2022-01-24 13:40:57 +08:00
Huong Nguyen
2137ce6539 MDL-73188 usertours: Make language string ID work again
- New dropdown was created, user can choose to enter the content manually
  or using Moodle Language string
- New text field was created to allow user to input the Lang string format
- New validation was created to validate the language identifier
- New Behat tests were created to validate the new feature
2022-01-21 17:07:39 +07:00
Bas Brands
5e8b258cac MDL-73114 theme_boost: show page title on Dashboard page
replace the page title when the welcome message is shown
2022-01-19 17:36:54 +01:00
Sara Arjona
341a7b2a97 MDL-73347 blocks: New unaddableblocks theme setting
A new method, get_unaddable_by_theme_block_types(), has been added to
block_manager class to let themes define, using the unaddableblocks
theme setting, the blocks that won't be displayed in the "Add a block"
list.
For now, only the boost theme uses it, to disable some of the blocks,
like settings, navigation, course_list and section_links (they are still
required for classic).
2022-01-14 13:08:48 +01:00
Huong Nguyen
1ac6a82e1f MDL-72809 Themes: Fix the missing 'Reset user tour on this page' link 2022-01-07 17:03:32 +07:00
Sara Arjona
0fc33251bf Merge branch 'MDL-72904-master-dec21' of https://github.com/peterRd/moodle 2021-12-27 08:47:50 +01:00
Peter Dias
6d5ab2233a MDL-72904 core_badges: Update behat tests 2021-12-23 21:25:36 +08:00
Eloy Lafuente (stronk7)
e4a2d9c1d4 MDL-73348 phpunit: normalize all privacy provider tests
As far as now all them have correct privacy level2 namespace:
- Move them to "privacy" subdir.
- Rename the files to "provider_test.php", this includes old
  privacy_test.php and privacy_provider_test.php files
- Rename the testcase to provider_test too (to match file name)

Also, change some relative paths and comments to point to new
locations.
2021-12-17 14:21:02 +01:00
Eloy Lafuente (stronk7)
57e6fb7ad9 MDL-73348 phpunit: privacy and privacy_provider testcase names
All privacy_test and privacy_provider_test classes:

- Namespaced with component\privacy.
- Fixed incorrect use statements with leading backslash.
- Changed code to point to global scope when needed.
- Renamed a few files to make all be privacy_test or privacy_provider_test.php
- All them passing individually.
- Complete runs passing too.
2021-12-17 14:21:02 +01:00
Sara Arjona
29649e2d6f Merge branch 'MDL-73231' of https://github.com/Chocolate-lightning/moodle 2021-12-13 16:31:43 +01:00
Mathew May
54e098c5a5 MDL-73231 my: Allow my courses to be a homepage 2021-12-13 22:43:28 +08:00
Peter Dias
468204450c MDL-72413 page: Use the common module for setting the header 2021-12-13 09:49:35 +08:00
abgreeve
89d749fda6 MDL-72090 navigation: New unit and behat tests for navigation.
This adds new tests for functions that impact the more menu and
the course administration overflow.
2021-12-09 11:13:35 +08:00
Mathew May
b983003e2e MDL-70197 navigation: Remove old navigation elements and migrate behat 2021-11-29 15:47:42 +08:00
Peter Dias
423e5a5fee MDL-72816 navigation: Make sure a primary node is active
- Revert unnecessary primary_active_tab setters
- Modify the navigation nodes to never change text based on default homepage
- Make sure a tab is set active
2021-11-17 15:55:18 +08:00
Peter Dias
d632240ac4 MDL-72736 course: Switch tests to classic only 2021-11-01 15:17:00 +08:00
Mihail Geshoski
fac039f231 MDL-72450 theme_boost: Blacklist feature files related to activity nav 2021-10-14 15:38:48 +08:00
Shamim Rezaie
3805f25a76 MDL-72689 theme_boost: Move the primary nav test to theme_boost 2021-10-13 01:50:11 +11:00
Mihail Geshoski
7d821080f0 MDL-72093 navigation: Update behat tests 2021-09-14 12:02:35 +08:00
Peter Dias
dfefc86393 MDL-72032 core: Add roles to items
- Part of: MDL-69588
2021-08-23 17:47:22 +08:00
Mihail Geshoski
e565850e50 MDL-71683 boost: Add behat tests related to the language selector
- Part of: MDL-69588
2021-08-23 17:46:40 +08:00
Mihail Geshoski
7d739e9902 MDL-71683 behat: Add step definitions related to the lang menu in boost
- Part of: MDL-69588
2021-08-23 17:46:40 +08:00
Andrew Nicols
776f4bd80c MDL-72179 behat: Make use of page resolvers 2021-07-26 15:14:28 +08:00