Commit Graph

478 Commits

Author SHA1 Message Date
Marina Glancy b03c67e978 MDL-61876 mod_data: call format_text on template before replacement
Otherwise when $CFG->forceclean is enabled all search input fields are stripped out
2018-05-07 11:21:06 +08:00
Simey Lameze 5e401a2a51 MDL-60060 mod_data: add calendar drag and drop callbacks 2017-12-11 14:05:00 +08:00
Mark Nelson 3dfd48ba9c MDL-57455 mod_data: moved export tag checkbox and set default
Also capitalised string 'tags'.

AMOS BEGIN
 CPY [tags,core],[tags,mod_data]
AMOS END
2017-10-18 16:03:17 +08:00
Eloy Lafuente (stronk7) 76feb5ac9b MDL-57455 mod_data: table aliases cannot use AS for crossdb 2017-10-16 19:16:17 +02:00
Mark Nelson 822b3346ce MDL-57455 mod_data: added 'Manage standard tags' link 2017-10-12 16:59:16 +08:00
Mark Nelson 80effa0faa MDL-57455 mod_data: added reset tags functionality 2017-10-12 16:59:16 +08:00
Andrew Hancox 04f7b079bc MDL-57455 mod_data: Import and export tags 2017-10-12 16:59:15 +08:00
Andrew Hancox d45c7a6823 MDL-57455 mod_data: Extend advanced search to cover tags
Also removed redundant code as $advtables, $advwhere etc.
are only used below when constructing $fromsql which is
only used if advanced is empty.
2017-10-12 16:59:15 +08:00
Andrew Hancox ca5f3e0a2e MDL-57455 mod_data: Implement tagging 2017-10-12 16:59:14 +08:00
Ankit Agarwal 0d14fcbc60 MDL-9367 restore: Roll only configuration dates
It was decided to roll only configuration dates and any date related to user content
such as 'timecreated' , 'timemodified' etc should not be rolled forward.
2017-08-01 10:46:37 +05:30
Adrian Greeve 9ffbdafc95 MDL-59287 calendar_events: Update modules to create all events.
All events equals all calendar events including completion events.
2017-07-10 09:40:02 +08:00
Marina Glancy e1577187ed MDL-58665 mod_data: cache times in modinfo for performance 2017-05-01 12:57:22 +08:00
Marina Glancy 438c01d0dd MDL-58731 modules: display intro on the course page
something that was forgotten when adding _get_coursemodule_info to activities in MDL-58190
2017-04-28 09:14:25 +08:00
Marina Glancy 23e5104ae2 MDL-58666 course: add module name to cache
without it there will be an extra db read in get_array_of_activities() to retrieve it for each activity
2017-04-21 13:00:28 +08:00
Jake Dallimore d233adbb77 MDL-58460 completion: add callbacks to mod_data for bulk completion
Part of MDL-58138 epic
2017-04-19 08:56:11 +08:00
Mark Nelson 59391e80ad MDL-58501 mod_*: improved docs for new calendar callbacks 2017-04-12 17:43:52 +08:00
Mark Nelson 01f96180ff MDL-58504 mod_*: fixed PHPDoc return type for *_provide_event_action 2017-04-06 15:00:02 +08:00
Marina Glancy 63709b0e16 MDL-23919 mod_data: fix bug when completion is reset 2017-04-06 08:54:00 +08:00
Dan Poltawski 1e4e5c52d7 Merge branch 'MDL-55611-master' of git://github.com/danpoltawski/moodle 2017-04-04 17:07:41 +01:00
Mark Nelson e1cd93ce20 MDL-58423 core_calendar: moved \core_calendar\event class
Part of MDL-55611 epic.
2017-04-04 11:01:49 +01:00
David Monllao ea51aa631b Merge branch 'MDL-23919-mod_data-required-entry-completion' of https://github.com/marcusgreen/moodle 2017-04-03 23:24:28 +02:00
Marina Glancy cf873ada46 MDL-23919 mod_data: small corrections to completion form element 2017-04-03 18:15:52 +01:00
Andrew Nicols 89cfa1e6b2 MDL-58363 mod_data: Remove calendar is_visible
Part of MDL-55611 epic.
2017-04-03 11:37:09 +08:00
Mark Nelson 7c6f961bf9 MDL-57877 mod_data: added action events
Part of MDL-55611 epic.
2017-04-03 11:36:34 +08:00
Mark Nelson e057f279e4 MDL-57497 core_calendar: added new calendar event class
Moved calendar_event class to new location using replaceclasses.php

Part of MDL-55611 epic.
2017-04-03 11:33:55 +08:00
Juan Leyva 0a34838725 MDL-57411 course: Return modules updates for teachers 2017-04-01 19:39:02 +02:00
Marcus Green f9729dcfe0 MDL-23919 mod_data: add requiredentries to completion settings
Added required entries text field to the completion criteria area.
This field accepts a number.

If the legacy Entries required field has a value greater than 0 it will
be displayed and editable. For new instances this field will not be displayed.
2017-03-31 15:20:44 +01:00
Juan Leyva 57ab070e01 MDL-57925 mod_data: Implement check_updates_since callback 2017-03-30 03:41:55 +02:00
Juan Leyva 01b7ec36d1 MDL-57925 mod_data: Support new search criteria 2017-03-30 03:19:45 +02:00
Juan Leyva aefe9c5faa MDL-57919 mod_data: Refactor and new method get_configs_for_external 2017-03-29 11:38:38 +02:00
Juan Leyva 8077107565 MDL-57918 mod_data: Minor refactors for the new WS
- Move entry permission code to function
- Retrieve user record when missing
2017-03-22 11:31:04 +01:00
Eloy Lafuente (stronk7) 74ccc7768e Merge branch 'MDL-57916-master' of git://github.com/jleyva/moodle
Mini bump version in merge...
2017-03-20 17:53:02 +01:00
Damyon Wiese b9b409cfc3 MDL-40759 icons: Peer review fixes (all minor) 2017-03-17 15:52:46 +08:00
Damyon Wiese 663640f5b3 MDL-40759 icons: convert uses of pix_url to pix_icon
Also change filepicker to use scaled svgs instead of sets of custom pngs. The svgs are taken from font-awesome.
2017-03-17 15:52:17 +08:00
Juan Leyva a99c13af84 MDL-57916 mod_data: Move notifications code to new functions 2017-03-15 11:44:28 +01:00
Juan Leyva 023ffa656d MDL-57915 mod_data: Move view completion and event code to function 2017-03-13 19:21:07 +01:00
Damyon Wiese 398be7c897 MDL-56725 mod_data: coding style
Fixes from lines in the previous commit.
2016-11-10 16:21:01 +08:00
Damyon Wiese e85fda95c6 MDL-56725 mod_data: Style fixes for boost theme 2016-11-10 16:21:01 +08:00
Juan Leyva 6492401d1c MDL-56307 mod: Add missing FEATURE_COMMENT in modules 2016-10-21 09:21:28 +01:00
Andrew Nicols 4e2e54eed0 MDL-55866 mod_data: Remember editor enabled state for templates
Some templates can legitimately contain invalid HTML (e.g. mismatched tags)
because the templates operate in pairs.

In these instances we should not use an editor because the nature of the
editor (content editable) means that the browser automatically corrects all
HTML supplied to it, thus breaking the template entirely.

Therefore we need to disable HTML editors for some templates, and do so in
a way tied to the instance of the activity, rather than to a specific user.

This patch adds a new 'config' field, with matching setters and getters, to
allow such per-instance values to be stored.
2016-09-15 08:38:10 +08:00
David Monllao fa90f52986 MDL-55127 mod_data: Search entries fixes
- If the database contains has than 4 valid fields all fields from the 4th one
  to the last one will be merged into the 4th one so we index all entry contents
- get_content_value now receives the whole data_content record as fields may need
  other values than just the content to prepare the value
- phpunit database generator changes to separate checkboxes from radio buttons options
  and to separate multimenu options from menu options
2016-08-25 16:50:15 +08:00
Devang Gaur 2af9ad7d30 MDL-55127 mod_data: added database entries to globalsearch 2016-08-19 13:58:19 +05:30
Andrew Hancox 421b2d44fe MDL-52230 mod_data: Take fieldname from field:name()
AMOS BEGIN
 CPY [namedate, mod_data],[fieldtypelable, datafield_date]
 CPY [namefile, mod_data],[fieldtypelable, datafield_file]
 CPY [namecheckbox, mod_data],[fieldtypelable, datafield_checkbox]
 CPY [namelatlong, mod_data],[fieldtypelable, datafield_latlong]
 CPY [namemenu, mod_data],[fieldtypelable, datafield_menu]
 CPY [namemultimenu, mod_data],[fieldtypelable, datafield_multimenu]
 CPY [namenumber, mod_data],[fieldtypelable, datafield_number]
 CPY [namepicture, mod_data],[fieldtypelable, datafield_picture]
 CPY [nameradiobutton, mod_data],[fieldtypelable, datafield_radiobutton]
 CPY [nametext, mod_data],[fieldtypelable, datafield_text]
 CPY [nametextarea, mod_data],[fieldtypelable, datafield_textarea]
 CPY [nameurl, mod_data],[fieldtypelable, datafield_url]
AMOS END
2016-08-09 16:22:00 +08:00
Stephen Bourget c4b70cfc61 MDL-55255 mod_data: prevent direct script access to lib files. 2016-07-25 09:39:57 +01:00
David Monllao 2f8da1e814 Merge branch 'MDL-55158_m32v3' of https://github.com/sbourget/moodle 2016-07-19 00:50:41 +02:00
Stephen Bourget 87d6e85a9a MDL-55158 mod_data: Add calendar events for database activities 2016-07-18 18:35:37 -04:00
Adrian Greeve d58f3a4d2a MDL-54962 mod_data: Approval status is now translated.
It was using hardcoded English. Now it uses get_string.
2016-07-08 10:53:39 +08:00
Mark Nelson 2c216a6c39 MDL-54125 mod_data: fixed PHP notice
Also removed unused variables.
2016-05-11 13:01:24 +08:00
Adrian Greeve 53934bd0a9 MDL-53538 mod_data: Show no records message instead of error.
When there are no records in the database module and a user
does an advanced search. Show a message that there are no entries
in the database.
2016-03-22 14:22:26 +08:00
David Mudrák a5fae3b0d2 MDL-52727 mod_data: Improve output of the form fields values
This issue mostly affects the search form fields. Submitted values for
these fields are typically obtained via optional_param() with
PARAM_NOTAGS specified as the parameter type - see parse_search_field()
methods. Such values themselves are not safe enough to be printed back
directly into the HTML as they might contain malicious code.

While working on the patch, some other places with weak protection were
detected and fixed.

In case of the itemid parameters, explicit clean_param() is added to
make sure we cast the value as an integer. That should make the s()
unnecessary but it was added anyway as an extra protection (just in case
the code flow changes or the parts of the code are re-used elsewhere).
2016-03-07 22:08:46 +01:00