Commit Graph

38 Commits

Author SHA1 Message Date
John Okely 52b817b6ba MDL-44520 behat: Change behat features to use new section selectors 2015-02-06 10:35:05 +08:00
Eloy Lafuente (stronk7) d09c57ee33 Merge branch 'MDL-48660-m27' of https://github.com/sammarshallou/moodle into MOODLE_27_STABLE 2015-01-27 21:14:10 +01:00
sam marshall 848dd93bf2 MDL-48660 Availability: filter_user_list() should respect 'view hidden'
Updated filter_user_list to account for the viewhiddenactivities and
viewhiddensections capabilities.
2015-01-27 12:02:28 +00:00
Eric Merrill ca1b2405c4 MDL-35765 availability: Use category total full names 2015-01-20 15:38:12 -05:00
PJ King 719c2dac88 MDL-46671 availability: DEBUG when course_module does not exist.
There was a fatal error when calendar event linked to non-extant activities.

Now, instead of throwing an exception when a course_module does not exist, is_user_visible() will print a debug statement.
2015-01-02 09:38:21 -05:00
Marina Glancy 6eef37f045 MDL-46262 availability: validation of fields without value
Thanks to Tomasz Pawlik | CKO USl for the patch
2014-11-01 16:58:51 +08:00
Tim Hunt 362d958e5a 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:59 +01:00
Sam Hemelryk 80165b6ee8 Merge branch 'MDL-47481-m27' of https://github.com/sammarshallou/moodle into MOODLE_27_STABLE 2014-10-08 11:51:38 +13:00
sam marshall 805122a72f MDL-47481 Availability: Profile condition error if no users 2014-10-02 10:47:06 +01:00
Dan Poltawski 6b57d95fe3 Merge branch 'MDL-47322-m27' of https://github.com/sammarshallou/moodle into MOODLE_27_STABLE 2014-09-29 10:55:13 +01:00
sam marshall dea57f0107 MDL-47380 Availability: Editing interface broken in IE8 2014-09-26 15:46:02 +01:00
sam marshall 0e290bc008 MDL-47322 Availability: empty availability should be saved as null 2014-09-26 15:43:53 +01:00
sam marshall 81c4057908 MDL-46991 Availability: Conditional dates not updated on restore 2014-09-18 16:36:38 +01:00
Adam Olley 2181953d43 MDL-47208 core_availability: Return false when cm isnt in modinfo list
If a cm isn't in modinfo's cm list, then the user shouldn't be able to see that cm.
This fixes an issue where hidden activities would cause users to be unable to use moodle.
2014-09-12 09:15:26 +09:30
sam marshall 648cc055c2 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:35:21 +01:00
Rajesh Taneja 008cfb2a1f MDL-45698 behat: Added extra setting, to avoid timout issue 2014-05-29 14:52:57 +12:00
sam marshall cc41096ad5 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-20 09:52:36 +08:00
Ankit Agarwal 41d178f9da MDL-45543 availability: Use correct namespace for global classes 2014-05-20 12:07:39 +12:00
sam marshall 7c75924319 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-19 17:30:43 +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 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