12 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
sam marshall
80ee9add2d MDL-47481 Availability: Profile condition error if no users 2014-10-02 10:39:20 +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
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
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