104560 Commits

Author SHA1 Message Date
Jun Pataleta
9a9244dcf9 Merge branch 'MDL-73793-master' of https://github.com/bmbrands/moodle 2022-03-18 11:51:20 +08:00
Shamim Rezaie
bdccf3eb3b Merge branch 'MDL-73593-master' of https://github.com/bmbrands/moodle 2022-03-18 11:30:27 +11:00
Víctor Déniz
d60d936c0e Merge branch 'MDL-74153-master' of https://github.com/ferranrecio/moodle 2022-03-17 23:02:24 +00:00
Eloy Lafuente (stronk7)
337dea4afa Merge branch 'MDL-69078-better-error-message-for-wrong-encoding' of https://github.com/ziegenberg/moodle 2022-03-17 22:22:03 +01:00
Daniel Ziegenberg
f942a5cedd
MDL-69078 questions: check for UTF-8 encoding of the import file
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2022-03-17 20:53:50 +01:00
Eloy Lafuente (stronk7)
05c07f2656 Merge branch 'MDL-74159-master' of https://github.com/sarjona/moodle 2022-03-17 18:08:25 +01:00
Eloy Lafuente (stronk7)
3a2b094973 Merge branch 'MDL-74240-master' of https://github.com/bmbrands/moodle 2022-03-17 18:06:05 +01:00
Jun Pataleta
1e533995dd Merge branch 'MDL-73233-master' of https://github.com/sarjona/moodle 2022-03-18 00:35:11 +08:00
Sara Arjona
47550abe6b Merge branch 'MDL-74080-master' of https://github.com/aanabit/moodle 2022-03-17 17:21:23 +01:00
Sara Arjona
d51c17a2ca Merge branch 'MDL-74076' of https://github.com/paulholden/moodle 2022-03-17 16:58:00 +01:00
Sara Arjona
12252ebec0 Merge branch 'MDL-74172-master' of https://github.com/bmbrands/moodle 2022-03-17 15:48:14 +01:00
Sara Arjona
1ccea2c9ff Merge branch 'MDL-74132' of https://github.com/roland04/moodle 2022-03-17 15:42:34 +01:00
Andrew Nicols
27bed0b928 Merge branch 'MDL-72991-master-4' of https://github.com/HuongNV13/moodle 2022-03-17 22:25:10 +08:00
Bas Brands
0ee53f2dcd MDL-74240 mod_forum: tertiary nav button wrapper 2022-03-17 13:56:29 +01:00
Sara Arjona
08bae4cce8 Merge branch 'MDL-74214' of https://github.com/paulholden/moodle 2022-03-17 13:11:47 +01: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
dbb63cfffc Merge branch 'MDL-73863-master' of https://github.com/mihailges/moodle 2022-03-17 11:33:58 +01:00
Ilya Tregubov
ff0b43830a Merge branch 'MDL-73999' of https://github.com/paulholden/moodle 2022-03-17 15:23:56 +06:00
Jun Pataleta
23ea7d6b43 Merge branch 'MDL-74112-master' of https://github.com/andrewnicols/moodle 2022-03-17 17:08:47 +08:00
Huong Nguyen
bfe14e2312 MDL-72991 Course: Partial course cache rebuild with cache versioning 2022-03-17 15:34:26 +07:00
Huong Nguyen
457d10a49f MDL-72991 Course: Fix move_section_to is not updating correct section
When we change the position of two sections, we just need to update
the position of the affected sections, not all the sections in the course.
This will improve the performance since the system only executes the queries to affected sections.
Also, the system only clears the cache for affected sections, not all the sections in the course.
2022-03-17 15:34:26 +07:00
Huong Nguyen
273fbac739 MDL-72991 Course: Create PHPUnit for course_modinfo and move_section_to
Newly PHPUnit tests were created to verify the below methods
 - course_modinfo::purge_section_cache_by_id()
 - course_modinfo::purge_section_cache_by_number()
 - move_section_to()
2022-03-17 15:34:26 +07:00
Huong Nguyen
4bc2b24a51 MDL-72991 Course: Modify the courseminfo cacheid to force a rebuild
Co-authored-by: Andrew Lyons <andrew@nicols.co.uk>
2022-03-17 15:34:26 +07:00
Dongsheng Cai
f97b86e841 MDL-72991 Course: Partial course cache rebuild
When updating/deleting a section/module, the system now only
invalidate of the element (section/module), not the whole course cache
Also, the system now only recalculate the cache for element (section/module)
if necessary, not the whole course cache

Move module/section purging to course_modinfo:
  + course_modinfo::purge_course_section_cache_by_id was created to purge section by id
  + course_modinfo::purge_course_section_cache_by_number was created to purge section by number
  + course_modinfo::purge_course_module_cache was created to purge module
2022-03-17 15:34:01 +07:00
Sara Arjona
95e3d07435 Merge branch 'MDL-74127-master' of https://github.com/peterRd/moodle 2022-03-17 09:14:58 +01:00
Jun Pataleta
e2e048d49a Merge branch 'MDL-73597-master' of https://github.com/HuongNV13/moodle 2022-03-17 15:50:36 +08:00
Andrew Nicols
44a4e78075 MDL-74112 course: Support multiple mforms in format chooser
The format chooser JS assumes that it is the only mform on the page. If
it is not, and another mform appears before it, then the jump will not
work.

This change:
* updates the formatchooser to modern JS
* allows multiple forms to exist on the page
* stops using id fields
* always hide the format selection button
2022-03-17 11:11:53 +08:00
Eloy Lafuente (stronk7)
5b98ad241a Merge branch 'MDL-74116-master' of https://github.com/andrewnicols/moodle 2022-03-16 22:18:40 +01:00
Eloy Lafuente (stronk7)
89e020a872 Merge branch 'MDL-74114-master' of https://github.com/aanabit/moodle 2022-03-16 22:13:57 +01:00
Eloy Lafuente (stronk7)
cee098f8bf Merge branch 'MDL-74175' of https://github.com/paulholden/moodle 2022-03-16 22:03:25 +01:00
Eloy Lafuente (stronk7)
06e7273add Merge branch 'MDL-74154-fix' of https://github.com/sarjona/moodle 2022-03-16 16:45:42 +01:00
Eloy Lafuente (stronk7)
c885ef8b92 Merge branch 'MDL-74181-fix' of https://github.com/sarjona/moodle 2022-03-16 16:36:49 +01:00
Sara Arjona
19af5abcfa MDL-74181 user: has_secondary_navigation_setter has been renamed
In MDL-72481, method has_secondary_navigation_setter has been renamed
to set_secondary_navigation.
2022-03-16 16:23:33 +01:00
Víctor Déniz
3f1e26b54e Merge branch 'MDL-73489-master' of https://github.com/HuongNV13/moodle 2022-03-16 15:12:30 +00:00
Sara Arjona
8893ba5236 MDL-74154 calendar: has_secondary_navigation_setter has been renamed
In MDL-72481, method has_secondary_navigation_setter has been renamed
to set_secondary_navigation.
2022-03-16 16:10:23 +01:00
Andrew Nicols
c3404942e4 MDL-74116 behat: Fix browser instantiation for Selenium 4 2022-03-16 22:29:20 +08:00
Sara Arjona
ff402712a3 Merge branch 'MDL-74154-master' of https://github.com/peterRd/moodle 2022-03-16 12:29:07 +01:00
Sara Arjona
dd7d03a50e Merge branch 'MDL-74073-master-2' of https://github.com/junpataleta/moodle 2022-03-16 12:17:08 +01:00
Sara Arjona
9261157cc3 MDL-73233 course: Remove make_active() call
When accessing to User grades and then to the grades from a
specific course, this call was causing several behat errors
because the dashboard node was not found.
The code causing this issue can be safely removed because it
isn't used (the current node is calculated a few lines below).
2022-03-16 11:35:09 +01:00
Sara Arjona
07f7da93cc MDL-73233 tool_mobile: Return enabledashboard setting
External function tool_mobile::get_config now returns the
enabledashboard setting.
2022-03-16 11:35:09 +01:00
Sara Arjona
42c96d1708 MDL-73233 navigation: Remove dashboard when it is disabled
- Only add Dashboard to 'home' the root node if the $CFG->enabledashboard
setting is enabled.
- The "More..." link displayed in the "My courses" section from the
navigation block was pointing to the dashboard. However, now that we have
the "My courses" page, it makes more sense to change it and link to it.
- For the User preferences, I've changed breadcrumbs from "Dashboard" to
"Home" because they are more generic (and don't strictly belong to the
dashboard).
2022-03-16 11:35:09 +01:00
Sara Arjona
599cb8bbb1 MDL-73233 shibboleth: Change urltogo only when dashboard is enabled 2022-03-16 11:35:08 +01:00
Sara Arjona
04d8b5999a MDL-73233 moodlenet: Change cancel link to /
The cancel link when content is imported from MoodleNet has
been changed from /my to /, in order to get it working always,
regardless the $CFG->enabledashboard setting is enabled or not.
2022-03-16 11:35:08 +01:00
Sara Arjona
40894d7c31 MDL-73233 frontpage: Display link to My courses
Before MDL-70801, the "My courses" page didn't exist so the "More"
button displayed bellow the "Enrolled courses" in frontpage pointed
to Dashboard.
I think this is a leftover from the issue when the "My courses" page
was added and it makes more sense using the "My courses" page here
always.
2022-03-16 11:35:08 +01:00
Sara Arjona
31ed9a6c2f MDL-73233 my: Disable /my page depending on setting
When $CFG->enabledashboard will be disabled, the /my page
will redirect to a different page or display an error message.
2022-03-16 11:35:08 +01: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
e3d2fa41d0 MDL-73233 user: Review Start page user preferences
The "Start page" user preferences page has been reviewed to
consider the new $CFG->enabledashboard setting.
The "Dashboard" won't be displayed in the list if it's disabled.
Besides, the default value is now calculated calling the new
get_default_home_page() method.
2022-03-16 11:22:22 +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
Mihail Geshoski
7066c7618c MDL-74216 navigation: Do not show 'My courses' in primary nav to guests 2022-03-16 18:16:58 +08:00