53 Commits

Author SHA1 Message Date
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
Ilya Tregubov
ac93013cd1 MDL-72995 core_course: Revert "MDL-55231: Partial course cache rebuild"
This reverts commits c1468388bcecec43e671335db8edfc839494e710,
c1468388bcecec43e671335db8edfc839494e710 and
9a900492bc14176c4f56b8e600ef459069a3ec7a.
2021-11-04 11:57:58 +02:00
Dongsheng Cai
9a900492bc MDL-55231 core_course: Partial course cache rebuild 2021-10-26 19:08:15 +11: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
8e7dc42440 MDL-65974 course: move format renderers to outputs 2021-03-11 17:36:34 +01:00
Peter
6afbdf2778 MDL-59954 mod_course: Remove file size restriction on D&D on course page
Remove file size restrictions for teachers on course page.
Use user_max_upload_file_size instead of the max_file_size
2018-12-19 08:36:45 +08:00
Huong Nguyen
0b245bf390 MDL-62712 Filepicker: Improve upload process
Lost the uploading file when user press Submit before upload process has done
2018-07-10 15:18:45 +07:00
Davo Smith
4e737cf37f MDL-60427 dndupload: detect attempts to upload folders 2018-01-03 12:36:32 +00:00
Jake Dallimore
b17ee68202 MDL-58138 completion: Assorted linting fixes.
Part of MDL-58138 epic
2017-04-19 08:56:11 +08:00
Marina Glancy
7f53e8aa22 MDL-58267 completion: allow to set default activity completion
Part of MDL-58138 epic
2017-04-19 08:54:35 +08:00
Andrew Nicols
296af14b19 MDL-51117 JavaScript: Convert alert to M.core.alert in dndupload
This also updates a language string to use string params instead of
hard-prefixing.
2016-02-11 08:43:27 +08:00
Marina Glancy
a80f592298 MDL-46834 dndupload: check course dndupload cap on course level 2014-09-11 11:23:32 +08:00
Marina Glancy
e6a0f10152 MDL-46834 dndupload: check course dndupload cap on course level 2014-09-10 15:00:35 +08:00
Ankit Agarwal
e20d306969 MDL-39883 events: Create a new api create_from_cm for module create event 2014-06-18 15:39:02 +08:00
Marina Glancy
158379e173 MDL-40907 events: additional legacy logging for module update/add events" 2014-04-08 13:45:13 +08:00
Damyon Wiese
a1ac22b815 Merge branch 'MDL-43531-master' of git://github.com/andrewnicols/moodle 2014-01-14 15:18:37 +08:00
Andrew Nicols
e9a235e444 MDL-43531 Course: Remove deprecated functions from dnduploadlib
These functions were deprecated in 2.5 and are due for removal in 2.7.

Removing as per deprecation policy.
2014-01-02 11:20:01 +08:00
Andrew Nicols
9b2ad813b8 MDL-42801 JavaScript: Fix dndupload to match actual style 2013-12-28 09:13:40 +08:00
Dan Poltawski
d147e833c0 Merge branch 'wip-MDL-42441-master' of git://github.com/marinaglancy/moodle 2013-10-29 17:28:25 +08:00
Marina Glancy
0ae13c0f63 MDL-42441 modules: Remove unnecessary code when creating the module in D&D
property groupmodelink is not used at all and groupmode is already processed
properly in core functions (respecting groupmodeforce property in course).
This looks like old code that has not been updated. It's a shame we
duplicate module creation login in draganddrop library
2013-10-29 20:12:51 +11:00
Eric Merrill
ac1a29755e MDL-42528 Activity Completion: DnD upload should obey default setting
Make activities created by drad and drop obey Default completion
tracking setting.
2013-10-24 17:50:08 -04:00
Ankit Agarwal
63deb5c379 MDL-39959 events: Replace add_to_log() calls with events for course module actions (create, delete and update) 2013-09-16 15:29:56 +08:00
Marina Glancy
4a3fb71c4f MDL-41436 Removing references to fields course.modinfo, sectioncache
Also add the field cacherev to the lists of default fields in course retrieval functions
2013-09-10 14:11:51 +10:00
Damyon Wiese
74df2951d1 Revert "MDL-39876 Change get_record('course') calls to get_course"
This reverts commit ab7632b74c331540c90229bf03d13aa2e6bdd9be.
2013-08-21 13:42:30 +08:00
sam marshall
ab7632b74c MDL-39876 Change get_record('course') calls to get_course 2013-08-15 11:31:20 +01:00
Petr Škoda
2f1e464a88 MDL-40438 migrate all collatorlib:: and textlib:: uses 2013-08-06 21:04:35 +02:00
Sam Hemelryk
ea5a01fbe5 MDL-39814 frontend: pre-integration fixes:
* Fixed IE8 display of icons.
* Fixed blocks using course renderer.
* Fixed behat tests.
* codecheckers fixes
* Removed alt from icons with descriptive text
* Tweaked actionmenu initialisation for performance
2013-07-30 16:15:58 +12:00
Petr Škoda
56da374e1e MDL-40220 use new core_component::normalize_component() 2013-07-16 22:41:00 +02:00
Rajesh Taneja
0434840004 MDL-39116 Course: Pluginname strings will be set in M.str for all modules supporting Dnd
Currently, if new activity/resource is created by DnD and M.str doesn't have pluginname string
it show wrong string, so loading pluginnames for all modules which support DnD
2013-04-15 17:42:24 +08:00
Andrew Robert Nicols
3f53437109 MDL-38658 JavaScript: Correct fullpath for dndupload definition 2013-03-22 17:29:56 +00:00
Damyon Wiese
1c14b1c10c MDL-38367 Course dnduploadlib : deprecated add_* functions as they are internal to the class. 2013-03-19 09:56:16 +08:00
Davo Smith
09fd07fe00 MDL-38367 course dndupload - deprecate public 'add_type' function, remove non-YUI3 API call to _node 2013-03-18 18:47:04 +00:00
Davo Smith
66079e28fd MDL-38367 course dndupload - various tweaks to the UI
Switched to Moodle-style dialog boxes (thanks Andrew for the pointer)
Enter button now submits the form (from within the 'name' field)
Upload button is disabled when the name is empty (if the name is required for the selected handler)
Dialog now has 'What do you want to do with this text?' and 'Name' for the text
Entire course section now has a class added when you drag over it (to enable it to be styled in the future)
2013-03-11 22:44:55 +00:00
Davo Smith
2748d8efdb MDL-33946 course dndupload - fixes to dialog when dragging text
Radio buttons have unique IDs, matching the label IDs
'What do you want to call this text' input moved down and disabled when 'label' selected
'Add page here' changed to 'Add text here'
2013-03-06 22:38:01 +00:00
Davo Smith
785e09a7e3 MDL-32456 mod_label - support course drag and drop upload images to create labels 2013-02-08 08:13:24 +00:00
Mark Nelson
a347aee32e MDL-37082 core_course: create new course_delete_module function that handles the whole deletion process
Instead of repeating code all over the place because the original function delete_course_module only partially deletes data, we now place all the functionality needed to delete a module here.
2013-01-22 17:05:16 +08:00
Sam Hemelryk
c8d3475e17 Merge branch 'wip-MDL-37085-master' of git://github.com/marinaglancy/moodle 2013-01-15 16:30:36 +13:00
Marina Glancy
9a36be7361 MDL-37085 Properly deprecated functions print_xxx() from course/lib.php
- get_print_section_cm_text()
- print_section_add_menus()
- print_section()
- make_editing_buttons()
2013-01-14 15:01:28 +11:00
Sam Hemelryk
f5c51a6d64 Merge branch 'MDL-35568_dndupload_hidden' of git://github.com/davosmith/moodle 2013-01-14 13:51:48 +13:00
Davo Smith
0470a094e2 MDL-35568 course dndupload - resources created with the same visibility as the section they are dragged onto 2013-01-04 12:31:31 +00:00
Davo Smith
c7e61fba0a MDL-35887 course dndupload - correct default used for completion tracking when resources created by drag and drop 2012-12-18 20:46:26 +00:00
Marina Glancy
38b19bbca1 MDL-35339 call rebuild_course_cache() always (and only) after changing course modules or sections 2012-10-15 14:08:14 +08:00
Marina Glancy
722e6ba947 MDL-35339 Deprecate add_mod_to_section(), create new function course_add_cm_to_section()
Function add_mod_to_section() has very confusing arguments when object  looks like record from
table course_modules but field ->section refers to relative section number (course_sections.section).
In table course_modules the field section refers to course_sections.id.
Also add_mod_to_section() does not update table course_modules and does not call rebuild_course_cache()
which developer can forget to do afterwards.

- Added function course_add_cm_to_section()
- In the core code add_mod_to_section() is replaced with course_add_cm_to_section()
- Function add_mod_to_section() is deprecated
2012-10-15 14:08:13 +08:00
Aparup Banerjee
d022f63202 MDL-35587 fixed up whitespaces 2012-10-09 16:35:32 +08:00
Rex Lorenzo
bc3f5bcae1 MDL-35587 - Display grouping name for Drag and Dropped resources 2012-09-23 01:14:14 -07:00
Dan Poltawski
3970a4719c MDL-33593 course: rename editingenabled param
Change to notifyeditingon to better reflect what it does and
prevent people getting confused with edit=1
2012-06-08 10:21:58 +08:00
Davo Smith
6c0ae99b69 MDL-33056 Course dnd upload - improved status box styling and added fade in/out 2012-06-01 11:27:42 +01:00
Davo Smith
82d2a84002 MDL-33074 Course drag and drop upload - fixed incorrect group mode button 2012-05-21 22:11:38 +01:00
Davo Smith
1ddc3d1f4c MDL-22504 Course drag and drop upload - experimental setting is now a checkbox 2012-05-21 10:03:55 +01:00
Davo Smith
f684250bda MDL-22504 Course drag and drop upload - removed browser specific content hacks, made 'text and link' dragging an experimental feature 2012-05-21 08:34:50 +01:00