26 Commits

Author SHA1 Message Date
Rajesh Taneja
a9e2d4c03a MDL-45698 behat: Added extra setting, to avoid timout issue 2014-05-29 09:44:03 +08: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
c545f3b0db MDL-45449 Availabillity settings - new visible/hidden control (eye icon) is hard to spot
This change makes it use a larger icon.
2014-05-07 16:35:23 +01:00
Dan Poltawski
f25e8c4133 Merge branch 'MDL-45054-master' of https://github.com/sammarshallou/moodle 2014-05-02 14:59:25 +08:00
sam marshall
f67dd62820 MDL-45054 Conditional availability: HTML structure improvements
1. Changed the 'delete' and 'eye' buttons to use an <a> link
tag so that it works without custom tabindex and shows a correct
mouse cursor. This also reduces the code slightly.

2. Changed the Cancel button on the dialog to use the mdl-align
class which is used in Atto dialogs. This results in the button
being centered, consistent with those dialogs.
2014-05-01 12:22:38 +01:00
sam marshall
a3a2423982 MDL-45362 Availability: Behat test fails on first of month 2014-05-01 11:18:06 +01:00
Sam Hemelryk
56418292f1 Merge branch 'MDL-45138-master' of https://github.com/sammarshallou/moodle
Conflicts:
	availability/yui/build/moodle-core_availability-form/moodle-core_availability-form-min.js
2014-04-22 08:29:38 +12:00
Dan Poltawski
166dfd56b8 Merge branch 'MDL-45059-master' of https://github.com/sammarshallou/moodle 2014-04-18 10:30:12 +08:00
Dan Poltawski
af80f7b4a5 Merge branch 'MDL-45027-master' of https://github.com/sammarshallou/moodle
Conflicts:
	availability/yui/build/moodle-core_availability-form/moodle-core_availability-form-min.js
2014-04-18 10:23:45 +08:00
sam marshall
1282c47446 MDL-45138 Conditional availability: toggling AND/OR affects nested groups 2014-04-17 14:09:12 +01:00
Marina Glancy
354aca95f4 Merge branch 'MDL-44992-master' of git://github.com/sammarshallou/moodle 2014-04-17 11:01:16 +08: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
sam marshall
0a8de7f6c8 MDL-44992 Conditional availability tab focus bug
Tabbing through the eye icon triggered it to change. Corrected by
making it work the same way as the delete icon (Enter key to change).
2014-04-11 11:37:59 +01:00
sam marshall
2a848ab9e2 MDL-45027 Availability API: Better handling of invalid data in GUI
If there is invalid data in the availability condition (note: this
should not happen, but can do in unusual situations, such as
specifying a date after 2038 in 32-bit PHP), this should not
leave the course so broken that users cannot edit the activity and
update it.
2014-04-11 10:57:15 +01:00
Marina Glancy
58d113934d MDL-45038 modinfo: added property section_info::modinfo 2014-04-10 20:26:25 +08:00
Rajesh Taneja
0adadbf00b MDL-44070 core_completion: Removed unwanted tag 2014-04-10 14:28:28 +08: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
sam marshall
d3db4b037c MDL-44070 Conditional availability enhancements (2): subsystem, API
This commit defines the new /availability root folder, with
/availability/classes, /availability/tests, and
/availability/condition where the condition plugins will live.
Condition plugin prefix is availability_, e.g. availability_date.

Rationale for this organisation:

1. I was originally going to put this in /lib/availability but
   it has been pointed out that putting even more junk in lib
   is probably bad.
2. 'availability' and 'condition' are the two names used in code
   to refer to this system ($CFG->enableavailability).
3. The prefix has to be short enough to allow database tables
   (although in practice I assume that condition plugins will not
   normally contain database tables).

The new API includes a Boolean tree structure that controls the
availability of an item.

AMOS BEGIN
 CPY [availabilityconditions,core_condition],[restrictaccess,core_availability]
 CPY [enableavailability,core_condition],[enableavailability,core_availability]
 CPY [configenableavailability,core_condition],[enableavailability_desc,core_availability]
AMOS END
2014-04-07 20:11:33 +01:00