121 Commits

Author SHA1 Message Date
Kevin Percy
939e6b546a MDL-80746 core_course: Move initials selector from core_grades 2024-09-25 11:03:55 +08:00
Mikel Martín
a0fa76c86b MDL-81767 courseformat: Add module quickcreation feature
- Add new 'FEATURE_QUICKCREATE' plugin feature that indicates the module can
  be created with a single click. It will use its own 'quickcreatename' defined
  string as the initial default name.
- Add new 'core_courseformat\external\create_module' web service to create new
  modules with the quickcreate featuer in the course page.
- Add a new 'create_module' state action.
2024-09-03 13:35:04 +02:00
Paul Holden
3a4c0f32b2
MDL-82547 javascript: convert to native inplace editable events. 2024-08-16 10:15:22 +01:00
Mihail Geshoski
4da5dbcb52 MDL-82393 course: The group selector component should be context-aware
The group selector component should be sensitive to the current context
to ensure accurate validation and retrieval of group settings
(e.g. group mode).
2024-08-07 17:27:41 +08:00
ferranrecio
a908c0f8af MDL-81766 core_course: fix modchooser section number 2024-07-23 16:32:59 +02:00
Mikel Martín
572d45c885 MDL-81766 course: Fix activity name inplace editor selector
Fix name inplace editor for course modules by updating the selector
to a more specific one.
2024-07-22 13:34:45 +02:00
Paul Holden
c03234b5a6
MDL-82329 course: consistent section permalink on view/section pages. 2024-06-28 08:59:51 +01:00
Sara Arjona
7402706c59
MDL-81866 course: Improve workflow for reset course
The following changes have been done to improve the reset course:
- Reset course button moved to sticky footer. Select default and
deselect all buttons set as secondary and left at the end of the form
- Adjusted page layout to a standardized format, centering the form for
improving presentation and recolocating the Reset course button away
from the bottom-right corner
- Changed page layout to standard, to display the form centered and
avoid having the Reset course button in the right bottom corner
- Modal added before resetting a course, asking user for confirmation
- Reset course buttons displayed with danger styling, because they
remove information
- All sections are expanded by default
- Default options are selected by default
2024-06-25 12:59:25 +02:00
Shamim Rezaie
37eae68cdb MDL-80745 core_course: group selector renderer for actionbar in course 2024-06-19 00:41:05 +10:00
Sara Arjona
e18aefa69e
Merge branch 'MDL-81676-main' of https://github.com/aanabit/moodle 2024-06-10 16:07:28 +02:00
Amaia Anabitarte
267a474154 MDL-81676 core_course: Rename data-sectionid to data-sectionnum
Activity chooser is saving section number in a data attribute called
data-sectionid. We should use data-sectionnum instead to make it easier
to understand.
2024-06-10 15:42:09 +02:00
Sara Arjona
4f3712505d
Merge branch 'MDL-81675-main' of https://github.com/aanabit/moodle 2024-06-10 12:38:46 +02:00
Andrew Nicols
847e1098da
MDL-82045 course: Destroy copy course modal instead of hiding it 2024-06-06 10:03:44 +08:00
Amaia Anabitarte
be267a625d MDL-81675 course: Prevent creating subsections into subsections 2024-06-05 16:29:16 +02:00
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