64 Commits

Author SHA1 Message Date
Simey Lameze
06d631f1c5 MDL-49412 availability: Fix behat failures
Part of MDL-45774
2015-04-10 17:18:22 +08:00
Petr Skoda
d6e7a63d9a MDL-49684 timezones: rewrite timezone support
This patch replaces all homegrown timezone
stuff with standard PHP date/time code.

The main change is the introduction of core_date
class that returns normalised user and server
timezones. From now on nobody should be using
$CFG->timezone or $user->timezone directly!

Other new features and fixes:
* admins are prompted for timezone during install
* editing of other users is finally fixed
* timezones are displayed in user profile
* new $this->setTimezone() in phpunit
* time locale is now automatically reset in phpunit
* timezone is now automatically reset in phpunit
* phpunit has Australia/Perth as default timezone
2015-04-06 13:53:51 +12:00
Rajesh Taneja
bed97c39eb MDL-49513 behat: Set admin config using php api
Added a new set to set config using set_config() api
to make steps faster and more efficient
2015-04-01 14:25:23 +08:00
Tim Price
e1de40f7f7 MDL-18177 backup: adding PHPdocs blocks 2015-02-20 11:45:23 +11:00
Matt Sammarco
5ef6f97f47 MDL-18177 availability: Excluding group members availability info
If setting was not enabled when backing up, exclude the availability
information of group members.
2015-02-20 11:45:22 +11:00
John Okely
e7bcd2764a MDL-44520 behat: Change behat features to use new section selectors 2015-02-06 10:34:54 +08:00
Eloy Lafuente (stronk7)
8181ab5865 Merge branch 'MDL-48620-master' of git://github.com/andrewnicols/moodle
Conflicts:
	lib/editor/atto/plugins/undo/yui/build/moodle-atto_undo-button/moodle-atto_undo-button-min.js
2015-01-28 01:02:54 +01:00
Eloy Lafuente (stronk7)
7615deba22 Merge branch 'MDL-48660-master' of https://github.com/sammarshallou/moodle 2015-01-27 21:11:27 +01:00
sam marshall
6b40e5b2ec MDL-48660 Availability: filter_user_list() should respect 'view hidden'
Updated filter_user_list and get_user_list_sql to account for
the viewhiddenactivities and viewhiddensections capabilities.
2015-01-27 10:59:05 +00:00
Andrew Nicols
557f44d970 MDL-48620 JavaScript: Updated shifted files to comply with coding style 2015-01-23 14:51:24 +08:00
Eric Merrill
4b4e41342a MDL-35765 availability: Use category total full names 2015-01-20 15:37:13 -05:00
PJ King
c8c746c440 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 10:34:16 -05:00
Dan Poltawski
3d891e3263 Merge branch 'MDL-47628-master' of https://github.com/sammarshallou/moodle
Conflicts:
	availability/yui/build/moodle-core_availability-form/moodle-core_availability-form-min.js
2014-12-04 12:04:07 +00:00
Andrew Nicols
64e7aa4de1 MDL-28286 JavaScript: Convert all uses of M.str to M.util.get_string 2014-12-01 08:32:04 +13:00
sam marshall
a4c318325c MDL-47628 Availability: Restrict by selected grouping button 2014-11-28 15:55:41 +00:00
Dan Poltawski
5a6c9f1cfb Merge branch 'MDL-48021' of git://github.com/stronk7/moodle
Conflicts:
	admin/tool/monitor/version.php
	mod/lesson/version.php
2014-11-05 12:11:16 +00:00
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
Marina Glancy
41107173e4 MDL-46262 availability: validation of fields without value
Thanks to Tomasz Pawlik | CKO USl for the patch
2014-11-01 16:58:14 +08: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
01c3b4c50b Merge branch 'MDL-47564-master' of https://github.com/sammarshallou/moodle 2014-10-16 11:50:38 +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
c0d92241f1 MDL-47564 Availability: incorrect use of defined('PHP_UNIT') 2014-10-07 14:47:29 +01:00
sam marshall
80ee9add2d MDL-47481 Availability: Profile condition error if no users 2014-10-02 10:39:20 +01:00
Dan Poltawski
2633f23627 Merge branch 'MDL-47322-master' of https://github.com/sammarshallou/moodle 2014-09-29 11:12:29 +01:00
sam marshall
38584d1167 MDL-47380 Availability: Editing interface broken in IE8 2014-09-26 15:47:00 +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
Adam Olley
0151ca2b91 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:14:56 +09:30
sam marshall
28f31f7d2d MDL-44725 Availability: Unit test for tree::get_user_list_sql 2014-09-04 10:25:01 +08:00
Marina Glancy
3b4db5bdf5 MDL-44725 dml: added sql_intersect() 2014-09-03 13:33:58 +08: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
Nadav Kavalerchik
51f2398ce7 MDL-46450 availability/info: Add links to module names inside restrict access availabilityinfo box 2014-08-24 23:39:20 +03: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
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