107 Commits

Author SHA1 Message Date
Mikel Martín
34ab1582cb MDL-81050 course: Fix section renaming in section page
Fix section page heading title update when the section name has been
modified using inplace editable.
2024-03-19 08:53:49 +01:00
Sara Arjona
e6f75b59a3
MDL-80248 course: Display only content for the General section 2024-01-19 12:03:36 +01:00
Ilya Tregubov
faae0874ce MDL-68652 mod_forum: Only include gradable users in grading 2023-12-06 21:11:28 +08:00
Andrew Nicols
48bc688ccd
MDL-78324 core: Convert modals to use new static methods
This commit takes all modals which were not using the legacy
ModalFactory.create triggers and migrates them to the new Modal.create
method.
2023-09-09 00:04:11 +08:00
Andrew Nicols
af7719682d
MDL-79064 core: Update all get_strings as uses 2023-08-29 10:57:54 +08:00
Andrew Nicols
83050a2fb0
MDL-78938 course: Wrap manual completion toggle in pending
This commit makes two changes to reduce random failures in behat:
- wrap the toggling of manually configured completion in pendingjs
- set the loading spinner content without forcing the completion toggle
  ws to wait for the loading spinner to update.
2023-08-16 20:01:29 +08:00
Amaia Anabitarte
3ae96a0496 MDL-78201 core_course: Prepare group mode state actions 2023-06-16 00:52:18 +02:00
Paul Holden
97f5badba5
MDL-78006 course: register activity chooser listeners just once. 2023-04-24 11:40:31 +01:00
Marina Glancy
04f8fdd021 MDL-77164 various: fix javascript AMD module name 2023-04-13 09:43:15 +01:00
Laurent David
166e04899e MDL-77712 core_course: Fix exception with inplace editor
* On fresh install, an exception is raised when we try to modify
the name of a newly inserted activity in the front page
2023-04-03 10:33:56 +02:00
Jun Pataleta
8441270181 Merge branch 'MDL-77559-master-2' of https://github.com/andrewnicols/moodle 2023-03-09 16:02:01 +08:00
Andrew Nicols
511401f4f6 MDL-77559 js: Rebuild all JS with Node 16 2023-03-09 09:53:19 +08:00
Sara Arjona
5c20b537b4 MDL-70226 course: Add more options to the activitychoosertabmode setting
Some extra options have been added to the activitychoosertabmode setting, to let
admins decide when to display the Recommended tab.
Apart from that, one of these values have be set as default value for this setting,
as suggested by the UX/PX teams. So the Starter and Full presets have been updated
too with the new values.
2023-03-03 13:45:15 +01:00
Jun Pataleta
916503658d Merge branch 'MDL-75012-master-5' of https://github.com/andrewnicols/moodle 2023-03-02 12:34:34 +08:00
Andrew Nicols
33b1e41f13 MDL-75012 js: Full build of all grunt things 2023-03-02 11:55:32 +08:00
Amaia Anabitarte
b37fe9a088 MDL-76990 core_course: Recover move right/left functionality 2023-02-27 18:27:57 +01:00
Andrew Nicols
01da499897 Merge branch 'MDL-76418-master' of https://github.com/srobotta/moodle 2023-02-08 08:52:59 +08:00
Stephan Robotta
a8de5c5002 MDL-76418 course: section action menu item to show permlink to section 2023-02-07 17:56:46 +01:00
Sara Arjona
908f3a4c78 Merge branch 'MDL-74987-master' of https://github.com/ferranrecio/moodle 2023-01-04 16:57:31 +01:00
Sara Arjona
be95fb2581 Merge branch 'MDL-75596-master' of https://github.com/sh-csg/moodle 2023-01-04 16:15:37 +01:00
Ferran Recio
35a12cfffb MDL-74987 core_courseformat: migrate duplicate to state action 2023-01-04 09:25:52 +01:00
Stefan Hanauska
15034e7100 MDL-75596 course: Allow inserting activities everywhere
Co-authored-by: Mathew May <mathewm@hotmail.co.nz>
2023-01-03 21:49:06 +01:00
Ferran Recio
fe4784e60f MDL-74989 core_courseformat: migrate cm delete to reactive
Migrate the course index delete activities to the new reactive actions
with batch deletion.
2023-01-03 13:07:31 +01:00
Ferran Recio
63a7c58ee3 MDL-76188 core_courseformat: migrate highlight to reactive component
The highlight and unhighlight sections applies only to the format_topics
plugins. With this commit all the related code is migrated to reactive
component and format_topics extend the current course editor to add all
the logic
2023-01-02 11:39:52 +01:00
Sara Arjona
78a1791e24 Merge branch 'MDL-75567-master' of https://github.com/justusdieckmann/moodle 2022-11-17 13:06:28 +01:00
Justus Dieckmann
877474fb37 MDL-75567 core_course: Other hidden badges remain when adding new one 2022-10-08 23:01:29 +02:00
Mihail Geshoski
383e1893b2 MDL-68437 course: ws support to optionally fetch only active users
Modifies the 'core_course_get_enrolled_users_by_cmid' webservice and
the generic js methods that call this webservice and enables defining
whether the ws should only return the active users or all enrolled
users in the course.
2022-09-30 02:23:18 +08:00
Ferran Recio
8777705827 MDL-73933 core_courseformat: hide and show reactive action
Hide, show and stealth actions were still using the old YUI
module. Now they are using the new course editor
2022-09-15 16:39:29 +02:00
Andrew Nicols
4bb0feb176 MDL-73952 course: Revert iscurrent => highlighted rename 2022-03-28 14:37:55 +08:00
Andrew Nicols
495da02824 MDL-73952 core_course: Rename iscurrent to highlighted
The term 'iscurrent' suggests that something is current, when this may
not be technically true. The term highlight is more appropriate as we
are highlighting content. Whether that content is for the current week
may also be true, but it may be that some course formats allow multiple
sections to be highlighted.
2022-03-28 13:15:12 +08:00
Andrew Nicols
a313795354 Merge branch 'MDL-73952-master' of https://github.com/bmbrands/moodle 2022-03-28 13:09:55 +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
Bas Brands
c3f0f59134 MDL-73952 core_course: update section badges using JS 2022-03-14 09:10:07 +01:00
Jun Pataleta
baf360a7ba Merge branch 'MDL-73915-master-terser' of https://github.com/andrewnicols/moodle 2022-02-24 17:29:17 +08: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
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
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
Bas Brands
cdb651d46a MDL-71691 core_course: section styling 2021-12-08 13:14:05 +01:00
Ferran Recio
675f8e24ca MDL-72776 theme_boost: new editing progress effect 2021-11-22 08:57:10 +01:00
Ferran Recio
461226ed27 MDL-72569 core_courseformat: aria-tree to move tool 2021-11-02 16:00:12 +01:00
Ferran Recio
3d2a6eacae MDL-71779 core_courseformat: reactive add and delete sections 2021-10-28 16:41:17 +02:00
Ferran Recio
fb7d246a29 MDL-71663 core_courseformat: add move tool 2021-10-20 15:27:45 +02:00
Ferran Recio
639a99014d MDL-71834 course: lock elements
Now components has a new property lock to disable all user interactions.
This is applied directly into the course index and course content to
freeze an element if some action is performed over it. To set this
locked value there are 2 new mutations cmLock and sectionLock.
2021-09-29 11:34:43 +02:00
Ferran Recio
23499e6447 MDL-71664 course: add browser native drag and drop 2021-09-22 11:08:06 +02:00
Ferran Recio
7659a18993 MDL-71228 course: sorting course on section state change 2021-09-09 11:16:10 +02:00
Ferran Recio
ef745009ed MDL-71209 courseformat: add state suport to legacy action
Adapt the current course editing libraries to modify also
the course state data. This way, any UI component that
watches the course structure can react to the changes.
2021-08-20 16:49:06 +02:00
Ferran Recio
21d93554d4 MDL-71863 courseformat: create courseformat subsystem 2021-06-28 13:50:18 +02:00
Andrew Nicols
4f422785c6 MDL-71113 javascript: Improve basic JS Documentation 2021-06-18 09:38:05 +08:00