25 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
de881693f7 MDL-48021 bump: Bump all versions to planned release
This bumps all versions to planned 2.8 release
(2014111000) version and all the dependencies to
current 2.8rc1 (2014110400)
2014-11-04 17:52:35 +01:00
Tim Hunt
a3d5068083 MDL-47726 availability: fix tests when there is a text custom field
This unit tests assumed that on a fresh install, there were no custom
user-profile fields. Given some third-party plugins, that assumption is
false.
2014-10-20 16:15:34 +01:00
Dan Poltawski
0993f24df0 Merge branch 'MDL-47509' of https://github.com/stronk7/moodle 2014-10-09 07:13:18 +01:00
Eloy Lafuente (stronk7)
278432258f MDL-47509 Profile restriction: More oracle/text fixes
1) Get rid of "uid" that is a reserved word.
2) Add cross-db support for text columns in the get_condition_sql() method
   by adding a new, defaulting to false for BC param and intensively using
   the sql_compare_text() helper to build the correct sql fragments.
2014-10-08 01:45:29 +02:00
sam marshall
9634c60e7b MDL-47509 Profile restriction: Broken Oracle causes problem 2014-10-08 01:45:28 +02:00
Sam Hemelryk
28fffe1f9b Merge branch 'MDL-47481-master' of https://github.com/sammarshallou/moodle 2014-10-08 11:51:32 +13:00
sam marshall
80ee9add2d MDL-47481 Availability: Profile condition error if no users 2014-10-02 10:39:20 +01:00
sam marshall
06c0603825 MDL-47322 Availability: empty availability should be saved as null
As part of the unit test modifications for this change, I added the get_json
function to the availability conditions that didn't have it. (This is a function
for use in unit tests.)
2014-09-26 15:42:37 +01:00
sam marshall
5176504d3f MDL-46991 Availability: Conditional dates not updated on restore 2014-09-18 16:37:53 +01:00
sam marshall
1a7049af22 MDL-44725 Availability: Add SQL feature for user lists (11)
The previous API included a facility to filter a list of users
to include only those who are allowed to access an activity, i.e.
only people who belong to the required groups etc.

This change adds a new API function to return SQL that obtains
this list of users, so that it can be combined with other
queries.
2014-09-02 13:03:29 +01:00
sam marshall
f9103882dc MDL-44725 Availability: Add utility API to make unit testing easier (7)
Previously there was no way in PHP to create the JSON values used for
availability, except by manually hard-coding them (the main code to
do this normally is in JavaScript).

This makes unit tests hard to read, so I have implemented static
functions tree::get_root_json and tree::get_nested_json which allow
for easier-to-read unit tests.
2014-09-02 13:03:19 +01:00
sam marshall
3d962d49cb MDL-44725 Availability: Replace groupmembersonly - core_availability (2)
Remove groupmembersonly usage in the core_availability API, and change
the update code (used in backup) so that it considers groupmembersonly
when restoring old backups.
2014-09-02 13:03:09 +01:00
sam marshall
61f5302b85 MDL-46414 Conditional availability: Dropdowns not set correctly when editing in IE
In IE, you cannot set the value of a dropdown to an integer; it has to be a string.
This caused a bug in several parts of the conditional availability editing
interface.
2014-07-29 18:33:03 +01:00
Marina Glancy
f0085cd6ab Merge branch 'MDL-45469-master' of git://github.com/sammarshallou/moodle 2014-05-20 09:52:25 +08:00
Sam Hemelryk
00a8c0d956 Merge branch 'MDL-45543-master' of git://github.com/ankitagarwal/moodle 2014-05-20 12:07:12 +12:00
sam marshall
abdbfc76fc MDL-45469 Conditional availability: Restrict by text area broken
It has never worked, because the data for text area fields is not
loaded into the $USER object.

Changing it so that the dropdown list does not include these types
of field.
2014-05-19 11:37:51 +01:00
Marina Glancy
f50bf62da6 Merge branch 'MDL-45478-master' of git://github.com/sammarshallou/moodle 2014-05-19 17:29:27 +08:00
Ankit Agarwal
5cad8d353d MDL-45543 availability: Use correct namespace for global classes 2014-05-14 15:31:08 +08:00
Eloy Lafuente (stronk7)
538bf99ece MDL-45486 Bump all versions to planned release
This bumps all versions to planned 2.7 release
(2014051200) version and all the dependencies to
current 2.7rc2 (2014050800)
2014-05-09 02:12:28 +02:00
sam marshall
4133822ea5 MDL-45478 Conditional availability: Custom user restriction missing
There was an error in the JavaScript and custom user field
restrictions did not show correctly when editing the form.

Behat tests didn't cover custom user fields, so I added a
scenario.
2014-05-08 11:57:57 +01:00
sam marshall
a3a2423982 MDL-45362 Availability: Behat test fails on first of month 2014-05-01 11:18:06 +01:00
sam marshall
02dd7ac2ea MDL-45059 Availability: Hide group options with groupmembersonly
When groupmembersonly is turned on, the 'restrict access' options
for group and grouping are supposed to appear only for sections
(which don't have groupmembersonly) and not for modules.

Prior to this fix, they appeared when creating a new module but
not when editing an existing one.
2014-04-11 12:11:35 +01:00
Damyon Wiese
515fe565f6 Merge branch 'MDL-44070-master' of https://github.com/sammarshallou/moodle
Conflicts:
	theme/bootstrapbase/less/moodle/forms.less
	theme/bootstrapbase/style/moodle.css
	version.php
2014-04-08 13:30:41 +08:00
sam marshall
46d70f0535 MDL-44070 Conditional availability enhancements (10): autogenerated
Includes all the autogenerated files (to make it easier/less worrying
when reviewing and rebasing).
2014-04-07 20:12:03 +01:00
sam marshall
e01efa2cfd MDL-44070 Conditional availability enhancements (3): conditions
Includes all the conditions that were in previous Moodle versions:

* Date
* Grade
* Completion (of another activity)
* User profile field

Also includes conditions that are used to reimplement
groupmembersonly:

* Grouping
* Group

For each condition, the component plus unit tests are included.

PLEASE NOTE: The code to actually check each condition is reused
from previous Moodle versions and has not been modified except to
pass codechecker. This is intentional, to reduce the risk of the
change and maximise the chance that behaviour is preserved. Some
of this code might not be very good and might need updating but
that can happen separately.

AMOS BEGIN
 CPY [contains,core_condition],[op_contains,availability_profile]
 CPY [doesnotcontain,core_condition],[op_doesnotcontain,availability_profile]
 CPY [endswith,core_condition],[op_endswith,availability_profile]
 CPY [isempty,core_condition],[op_isempty,availability_profile]
 CPY [isequalto,core_condition],[op_isequalto,availability_profile]
 CPY [isnotempty,core_condition],[op_isnotempty,availability_profile]
 CPY [startswith,core_condition],[op_startswith,availability_profile]
 CPY [completion_fail,core_condition],[option_fail,availability_completion]
 CPY [completion_pass,core_condition],[option_pass,availability_completion]
 CPY [completion_complete,core_condition],[option_complete,availability_completion]
 CPY [completion_incomplete,core_condition],[option_incomplete,availability_completion]
AMOS END
2014-04-07 20:11:37 +01:00