6079 Commits

Author SHA1 Message Date
Andrew Nicols
6544843894 Merge branch 'MDL-73762-master' of https://github.com/ferranrecio/moodle 2022-03-01 09:35:59 +08:00
Bas Brands
dd95845bf1 MDL-73595 theme_boost: make tertiary nav more distinct 2022-02-28 13:07:52 +01:00
Huong Nguyen
0d4069918e MDL-73457 Course: Fix drag & drop image prevents moving resources
Including in this commit:
 - Modify the UI to make the section dropzone more visible
 - Prevent the direct image dragging in Chrome, Safari by improving the check
2022-02-28 14:00:57 +07:00
Gareth Barnard
d1a473a3d6
MDL-73877 core_course: current class not applied to highlighted section 2022-02-26 11:52:32 +00:00
Ferran Recio
479faca428 MDL-73762 core_courseformat: fix coursedisplay dependency
For legacy reasons, the course renderings uses a format setting to know
if the page is multiple sections per page or a single section per page.
This format specific dependency is not solved using a get_course_display
format method any plugin can extend.
2022-02-25 13:35:23 +01:00
Ferran Recio
23856b1086 MDL-73762 core_courseformat: refactor cm and section outputs 2022-02-25 13:35:23 +01:00
Andrew Nicols
641240ce63 Merge branch 'MDL-72837-master' of https://github.com/sammarshallou/moodle 2022-02-25 10:59:54 +08:00
Andrew Nicols
faa6c74404 Merge branch 'MDL-73547-master-v03' of https://github.com/ferranrecio/moodle 2022-02-25 10:55:20 +08:00
sam marshall
02bb326314 MDL-72837 core_cache: Use versioned cache for modinfo
Uses the new versioned cache feature for modinfo, which should make it
safe as a localisable cache.
2022-02-24 13:51:07 +00:00
Jun Pataleta
baf360a7ba Merge branch 'MDL-73915-master-terser' of https://github.com/andrewnicols/moodle 2022-02-24 17:29:17 +08:00
Jake Dallimore
f167418fc9 Merge branch 'MDL-73683-master' of https://github.com/ferranrecio/moodle 2022-02-24 14:26:53 +08:00
sam marshall
691c5b8326 MDL-72837 core_cache: Rename unit test classes to new standard
For the three unit tests that are going to be modified in future
commit, I first changed them to use a namespace and class name
matching filename, as per current standard.
2022-02-23 16:36:40 +00:00
Andrew Nicols
e1b9d5f3cd MDL-73915 js: Drop support for IE and android
Moodle announced that support for IE would be dropped back in August
2020 with Moodle 3.9 but not active steps were taken at that time. That
decision was made in MDLSITE-6109 and this particular step was meant to
be taken in Moodle 3.10.

This is the first step taken to actively drop support for IE.

This commit also bumps the browser support pattern from 0.25% to 0.3%.
The percentage here includes any browser where at least this percentage
of users worldwide may be using a browser. In this case it causes
support for Android 4.3-4.4 to be dropped, which relate to Android
KitKat (released 2013).

This combination of changes means that all of the supported browsers in
our compatibility list support modern features including async,
for...of, classes, native Promises, and more which has a huge impact on
the ease of debugging code, and drastically reduces the minified file
size because a number of native Polyfills included by Babel are no
longer included.
2022-02-23 08:55:20 +08:00
Andrew Nicols
0a4047ab31 MDL-73915 js: Switch amd minification to terser
Unfortunately the babel minify-mangle plugin seems to be abandoned and
in certain circumstances can be very buggy. The only safe options are to
disable it, or to switch to a different minification library.

Not minifying our javascript is not ideal, so this commit updates the
javascript tasks to use a rollup, combined with babel, and terser.

Babel still converts code from ES/UMD/AMD to AMD modules with the
relevant browser support, whilst terser minifies the code.

The rollup bundler handles tracking and creation of sourcemaps, and
supports better parallelisation of the tasks.

Since the upgrade to Node LTS/Gallium requires an upgrade to @babel/core
and eslint, which change the built files anyway, this seems like the
ideal time to make this change.
2022-02-23 08:55:09 +08:00
Andrew Nicols
aa7f7957ea MDL-73915 js: Upgrade babel and eslint 2022-02-23 08:53:54 +08:00
Sujith Haridasan
e6a4eb3c36 MDL-73415 mod_forum: Address the followup issues for forum
This issue is a followup for changes made in forum. And hence
addresses the following issues spotted for forum:
1. Bring back the "Forums" header in the search page.
2. Remove the stale function forum_update_subscriptions_button
3. Fix the redirection to activity tab when subscription is
   changed, in the subscription tab.
2022-02-22 21:57:21 +05:30
Ferran Recio
3651b85fbe MDL-73547 core_courseformat: add collapsed section update actions
Now content and course index sections have special mutations to store
the collapsed preferences. This way the backend implementation is
independent of the frontend one and can use caches or other kind of
optimizations of necessary.
2022-02-21 12:33:33 +01:00
Ferran Recio
c64bef51a9 MDL-73547 core_courseformat: enable course index cache
Adding caches to the course editor reactive state. The patch improve the
course index loading.
2022-02-21 12:33:33 +01:00
Ferran Recio
d8b8f9bc3b MDL-73683 core_courseformat: match hasRestrictions criteria
Orignally, the lock icon in the course index and the course content
represents different things and it was confusing for users. Now both
section and cm state data calculate the hasRestrictions attribute the
same way as the course content lock icons.
2022-02-18 12:51:15 +01:00
Andrew Nicols
7d8c9396e3 Merge branch 'MDL-73636' of https://github.com/paulholden/moodle 2022-02-18 10:46:28 +08:00
Sara Arjona
9096a1e1ac MDL-73859 behat: Fix random error highlighting week
The first week is only highlighted if course starts today or
later. So, the course will be created with startdate on
yesterday to guarantee it always passes.
2022-02-15 17:43:12 +01:00
Ferran Recio
d7d154bd8b MDL-73683 core_courseformat: format section visible logic
Move the section visible logic to the format base class. This way format
plugins can decide whenever a section is visible or not instead of using
format custom settings from core.
2022-02-15 13:15:09 +01:00
Ferran Recio
c7a2e19ee0 MDL-73683 core_courseformat: fix state hasavailability
The course index lock icon depends on the state hasrestrictions
attributes on both section and course module. The lock icon
should be consistent with the content availability information
and it was not. With this patch the hasrestrictions attribute
uses a similar logic than the course content.
2022-02-15 13:15:09 +01:00
Paul Holden
c618717d1f MDL-73636 course: use formatted name in exported activity data. 2022-02-14 09:18:57 +00:00
Shamim Rezaie
e30493108d Merge branch 'MDL-73722' of https://github.com/paulholden/moodle 2022-02-10 17:21:10 +11:00
Andrew Nicols
d4d0e14fef Merge branch 'MDL-73697-master' of https://github.com/ferranrecio/moodle 2022-02-07 14:23:31 +08:00
Shamim Rezaie
7c8aaa6df2 Merge branch 'MDL-73480-master' of https://github.com/bmbrands/moodle 2022-02-07 16:36:39 +11:00
Sara Arjona
b841a811be Merge branch 'master_MDL-71696-versioning-integration' of https://github.com/catalyst/moodle-MDL-70329 2022-02-03 13:25:27 +01:00
Safat Shahin
111951d861 MDL-71696 mod_quiz: quiz updates and behat coverage
The versioning changes will require some major changes
in the backup and restore of question bank and its
elements. This change introduces those changes to make
it compatible with the new world of versioning in question
bank. This commit also removes quiz_slots fields and
quiz_slot_tags table.
This commit will also introduce the versioning db
structure and some major changes to the quiz
and quiz attempts for the question, random
question and the view.
This commit implements the behat changes for versioning
in core question and associated locations.
2022-02-03 22:22:44 +11:00
Shamim Rezaie
78b7fbb390 Merge branch 'MDL-73538-master' of https://github.com/ferranrecio/moodle 2022-02-03 15:24:04 +11:00
Jun Pataleta
b3d83d0ea4 Merge branch 'MDL-73390-master' of https://github.com/bmbrands/moodle 2022-02-03 11:36:58 +08:00
Eloy Lafuente (stronk7)
011251f229 Merge branch 'MDL-71724-master' of https://github.com/sarjona/moodle 2022-02-02 19:03:24 +01:00
Eloy Lafuente (stronk7)
5aa93e3066 Merge branch 'MDL-72466-master' of https://github.com/bmbrands/moodle 2022-02-02 12:10:18 +01:00
Ferran Recio
7c249a7d84 MDL-73538 core_courseformat: fix course index manual completion
The current manual completion button triggers an event to alert the page
of any completion change. This event is capture in the course page by
the core_courseformat/local/content module but it was ignored when this
happens in an activity page. Now the activity header has its own
component to capture this event and support possible future reactive
actions.
2022-02-02 11:54:12 +01:00
Ferran Recio
d7df919a2c MDL-73697 core_courseformat: fix weeks format this week badge 2022-02-02 09:25:37 +01:00
Amaia Anabitarte
2cd5c61049 MDL-73310 course: Add course index to all non-site course pages 2022-02-02 09:22:42 +01:00
Marina Glancy
5ddae1a189 MDL-73722 course: behat test for other users page 2022-02-01 12:23:05 +00:00
Bas Brands
7c76e1c349 MDL-72466 core_output: dropdown menu alignment 2022-01-27 17:24:20 +01:00
Bas Brands
2524339fc6 MDL-73390 core_course: align section collapse icons 2022-01-26 12:37:00 +01:00
Bas Brands
9c06763193 MDL-73480 core_course: course section heading alignment 2022-01-26 11:28:49 +01:00
Sara Arjona
08357782f2 MDL-72852 badges: Improve performance to display Badges nav
The course_get_user_navigation_options() is called on each request
from the add_course_essentials() method, to initialise the basic
navigation options that are available or not for the current user.
This information is not always displayed in boost (for
instance, in a module page), but it might be required by some blocks,
like Navigation.
However, this block is hidden by default in boost since MDL-73347,
so at any point we should check if it's possible to change the way
this navigations options is loaded, to only get this information
when it's strictly required.
2022-01-26 10:36:53 +01:00
Eloy Lafuente (stronk7)
f067a420cf Merge branch 'MDL-72089' of https://github.com/Chocolate-lightning/moodle 2022-01-26 10:23:01 +01:00
Shamim Rezaie
090fd3f8ae Merge branch 'MDL-72852-master' of https://github.com/sarjona/moodle 2022-01-25 13:34:01 +11:00
Shamim Rezaie
61f6e6c639 Merge branch 'MDL-73068-master-2' of git://github.com/mickhawkins/moodle 2022-01-25 10:55:47 +11:00
Sara Arjona
7c1d536b0d MDL-72852 navigation: Do not display badges when empty
If there are no course badges, students shouldn't have a link to a
page saying there are no badges available.

This patch is for displaying the Badges in the secondary navigation
only if the user can manage badges or there is, at least, one
badge available to the current user.
2022-01-24 15:31:23 +01:00
Sara Arjona
5b220a45ef MDL-71724 behat: Fix accessibility issues when upgrading axe lib 2022-01-24 15:30:57 +01:00
Mathew May
c530e4c448 MDL-72089 block_myoverview: Template changes for styling 2022-01-24 15:09:38 +08:00
Jake Dallimore
041b1beb46 Merge branch 'MDL-73347-master' of https://github.com/sarjona/moodle 2022-01-24 13:40:57 +08:00
Ilya Tregubov
67570f8b21 Merge branch 'MDL-73340-master-v02' of https://github.com/ferranrecio/moodle 2022-01-19 14:58:18 +02:00
Michael Hawkins
e01f2d514a MDL-73068 timeline: Update courses view to omit courses without events
Previously, the timeline block courses view included all courses in
alphabetical order, whether they contained any events matching the
relevant filters or not. This could be tedious and misleading if there
were many courses with no events appearing before a course which did
have matching events. Now, courses are only included if they contain
events matching the currently set time filter and search term. When
those values are modified, the block will be refreshed and fetch
results for the current values, and also takes these into
consideration when determining whether to display the show more courses
button.
2022-01-18 18:22:45 +08:00