Commit graph

435 commits

Author SHA1 Message Date
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
Adrian Greeve
ca3e8022d1 MDL-51486 mod_data: Can view rating information.
When students are given the appropriate permissions
to view ratings, in the situation where there are
separate groups. The students can view the ratings
of an entry that is in the all participants group.
2015-11-04 10:12:39 +08:00
Eloy Lafuente (stronk7)
46e92173fd Merge branch 'wip-MDL-51259-master' of git://github.com/abgreeve/moodle 2015-09-24 15:37:12 +02:00
Dan Poltawski
abd3fdc977 Merge branch 'wip-MDL-51108-master' of git://github.com/abgreeve/moodle 2015-09-22 11:48:49 +01:00
Adrian Greeve
d25043270c MDL-51108 mod_data: Add validation for Lat. and Long.
Added a check to see that both the Lat. and Long. values
are entered when filling in database module entries.
2015-09-18 07:33:12 +08:00
Adrian Greeve
f3013ba67e MDL-51259 mod_data: ratings of items not activated.
When selecting a rating method, the restrict rating
to items with dates would be automatically enabled if
not checked. This code brings the data module inline
with forum and glossary.
2015-09-18 07:21:59 +08:00
Johannes Burk
97fe80ad68 MDL-50664 mod_data: add 'manageapproved' setting.
New function data_user_can_manage_entry checks whether a user is allowed to manage an entry.
Considering manageentries capability, data_in_readonly_period() result,
ownership (determined by data_isowner()), approval and manageapproved setting.
2015-09-15 07:16:40 +00:00
Ankit Agarwal
731c2712e7 MDL-50173 ratings: Use proper checks to ensure ratings are viewable.
Mainly to verify groups visibility this new callback has been created.

Note this was originally 3 commits but for amending purposes they have
been squashed.
2015-09-09 04:07:21 +02:00
John Okely
c07c5e7bdd MDL-50127 mod_data: Fix required icons in add entry screen 2015-08-14 16:46:58 +08:00
Henning Bostelmann
0bec64c6a1 MDL-50720 mod_data: Highlight non-approved entries 2015-08-11 11:30:02 +01:00
Frederic Massart
546a58bcdc MDL-50128 mod_data: String needed escaping before being used in regex 2015-05-07 11:19:47 +08:00
John Okely
9b5e702a11 MDL-49748 mod_data: Fix undefined offset error and add behat coverage 2015-04-10 09:42:34 +08:00
Alex Mitin
23464633c8 MDL-49748 mod_data: update fields even when empty 2015-04-10 09:42:34 +08:00
John Okely
1c3b2058c8 MDL-5583 mod_data: Improve required fields
Fix accidental <tr> in some field modify screens
Update mod_data version
Change required asterisk to image
Improve required error message
Fix required icon positions
Remove required code from date field
Add name in labels for fields
Add required field option for multimenu
Remove old required field title text modifier
Add multimenu to behat
Add more comprehensive behat tests
Reload old input when an input error occurs
Behat grammar fixes
Allow location of 0, 0
Use html_writer
Fix existing mod_data behat tests
2015-03-09 13:56:16 +08:00
Damyon Wiese
b89cca197e MDL-5583 mod_data: Add required fields
This is implemented for most fields but not all. The reason is that there are
some fields for which this does not make sense because no entry is a valid entry.

The supported fields are:
    checkbox
    file
    latlong
    menu
    number
    picture
    radio
    text
    textarea
    url

The unsupported fields are:
    date
    multimenu
2015-03-06 09:55:49 +08:00
Adrian Greeve
c910cf308c MDL-20053 mod_data: Removal of individual DB call.
The main functions for retrieving records have been
updated to include user picture information.
2015-01-19 15:24:47 +08:00
Anthony Borrow
560237b4b3 MDL-20053 mod_data: Add userpicture tag to show profile pictures 2015-01-16 09:57:36 +08:00
Mark Nelson
4e4572963a MDL-30619 mod_data: fixed deletion of files on reset 2014-11-16 21:42:59 -08:00
sam marshall
9c85baa8c5 MDL-44725 Availability: Replace groupmembersonly - FEATURE_xx (6)
Remove old FEATURE_GROUPMEMBERSONLY as no longer required.
2014-09-02 13:03:17 +01:00
Henning Bostelmann
f09040d76a MDL-46911 Database activity: jump to correct place in list after (un)approve 2014-08-26 10:15:15 +01:00
Andrew Davis
607d581d89 MDL-42467 mod_data: added code to delete cached RSS feeds when database or glossary entries are deleted 2014-06-25 08:48:16 +08:00
Brian King
6a97697a2a MDL-40371 Upgrade-until-22: remove obsolete _upgrade_grades functions 2014-05-29 19:43:37 +12:00
Rajesh Taneja
b2b4ec308e MDL-41283 report_participation: Added phpdoc about function not used
In new logging api, xxx_get_view_actions() and xxx_get_post_actions()
will not be used to identify the paticipation of user. Event's crud
and edulevel status will define user's participation.
2014-04-15 13:31:03 +08:00
Eloy Lafuente (stronk7)
7927245288 Merge branch '44154-27' of git://github.com/samhemelryk/moodle 2014-02-18 00:55:19 +01:00
Sam Hemelryk
002a2a44a7 MDL-44154 mod_data: unified @package use 2014-02-18 11:22:41 +13:00
Mark Nelson
561672d3a6 MDL-40061 mod_data: replaced 'record delete' add_to_log call with an event 2014-02-14 18:40:19 -08:00
Mark Nelson
76ca452c12 MDL-40061 mod_data: replaced 'add' add_to_log call with an event 2014-02-14 18:39:50 -08:00
Mark Nelson
d1ec55570d MDL-40061 mod_data: replaced 'fields update' add_to_log call with an event 2014-02-14 18:12:41 -08:00
Mark Nelson
e0d7ed6dae MDL-40061 mod_data: replaced 'fields add' add_to_log call with an event 2014-02-14 18:12:13 -08:00
Mark Nelson
e37c413e87 MDL-40061 mod_data: replaced 'fields delete' add_to_log call with an event 2014-02-14 18:11:47 -08:00
Sam Hemelryk
a775f2c96d Merge branch 'MDL-40731_headings' of https://github.com/andyjdavis/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-09-10 11:22:04 +12:00
Henning Bostelmann
d0372ed6f1 MDL-29069 Data / Glossary: allow disapproving entries 2013-09-04 20:37:46 +01:00
Andrew Davis
66e2b9f8c2 MDL-38856 reposition activity group control and fixed titles in chat, database and forum 2013-09-02 11:49:39 +07:00
Damyon Wiese
74df2951d1 Revert "MDL-39876 Change get_record('course') calls to get_course"
This reverts commit ab7632b74c.
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
Adrian Greeve
cf9ecfdac4 MDL-40871 - mod_data: Allow bulk deletion of entries in the database module. 2013-08-09 16:53:18 +08:00
Petr Škoda
bd3b3bba9f MDL-40220 use new core_component::get_plugin_list() 2013-07-16 22:36:11 +02:00
Adrian Greeve
a327f25ef1 MDL-31776 - lib: Alternate name fields
Add support for additional name fields and flexible formating of
user names.
2013-07-09 11:45:50 +08:00
Sam Hemelryk
e1e6c0dd4c Merge branch 'wip-MDL-39040-master' of git://github.com/abgreeve/moodle 2013-06-12 10:21:45 +12:00
Petr Škoda
a9cda870ba MDL-38109 use always get_plugin_list() to get list of plugins
get_list_of_plugins() is NOT intended for real plugins, only plugin like directories.
2013-06-11 10:22:45 +02:00
Adrian Greeve
f7a00e9dbf MDL-39040 - mod_data: Database description available in single view tab. 2013-04-30 09:06:02 +08:00
Petr Škoda
75427a824c MDL-37171 fix multiple spreadsheet related PHP4isms 2012-12-15 12:36:40 +01:00
Frederic Massart
851d3b7a97 MDL-36830 usability: Glossary and database small design improvements 2012-11-30 16:48:46 +08:00
Sam Hemelryk
1762071194 Merge branch 'wip-MDL-36551-master' of git://github.com/abgreeve/moodle 2012-11-26 14:44:40 +13:00