Commit Graph

1607 Commits

Author SHA1 Message Date
Andrew Nicols
abedeb8c70 MDL-51723 ldap: Normalise the user objectclass 2016-02-01 10:24:34 +08:00
Mark Johnson
a2497e5036 MDL-52913 behat: Abort database transactions on exception. 2016-01-29 11:54:56 +00:00
Rajesh Taneja
5e48383330 MDL-52932 behat: Restart session if it fails because of some reason 2016-01-29 11:59:01 +08:00
John Okely
a057ba5924 MDL-35590 navigation: Remove link from admin node if you have javascript
Also:
* In behat, ensure nav node exists before checking attribute (Credit to
  Rajesh Taneja)
* Remove some unused JS constants
* Fix debugging notice for users without settings block
2016-01-29 11:28:08 +08:00
Rajesh Taneja
80f37f2739 MDL-35590 behat: Data-loaded is on li node 2016-01-29 10:15:25 +08:00
Eloy Lafuente (stronk7)
6e38f41d8e MDL-52567 Core: amend existing test to new counting rules 2016-01-29 10:15:24 +08:00
David Monllao
6c3def94fa Merge branch 'MDL-35590-master' of git://github.com/lameze/moodle 2016-01-29 10:15:15 +08:00
David Mudrák
d84c64b7d6 MDL-52873 forms: Generate unique id attributes for modgrade elements
The previous method of generating the id attribute of the elements
within the modgrade group did not take the name of the modgrade field
into account. So if there were multiple fields of the modgrade type
added into a form (not a common case yet still valid), elements created
within the group were assigned same id attributes.

The patch introduces a new method for generating the id attribute of
modgrade elements. The new method takes the name of the modgrade group
into account and returns the id in the format similar to the default one
returned by HTML_QuickForm_element::_generateId().

The patch changes the generated id attribute. Apart from the
block_activity_results' behat feature files, not other places seem to
rely on the exact value.
2016-01-22 14:24:53 +01:00
Rajesh Taneja
10ac8baf6e MDL-35590 behat: Fixed navigation steps to support aria attributes 2016-01-22 17:53:44 +08:00
David Monllao
20ff2fba25 MDL-48621 events: Adapting unit tests to debugging messages
- A new assertDebuggingCalledCount has been introduced, as multiple debugging messages
  may be called in some cases, for example when calling events_cron with queued events
  that need to be dispatched.
- events_update_definition has been moved out of setUp as debugging messages are only
  caught by our phpunit custom stuff when they are called inside tests.
2016-01-19 15:19:10 +08:00
Marina Glancy
b355a1c97c MDL-50851 core_question: use new tag API 2016-01-10 15:25:47 +08:00
Mark Nelson
be5e0110ff MDL-49566 core: used reflection in unit tests
Also split the tests into multiple functions for each scenario.
2015-12-29 17:42:43 +08:00
Ankit Agarwal
bef0d6b052 MDL-49566 core: Write unittests for MDL-45898 2015-12-29 11:22:42 +08:00
David Monllao
a49fd98349 MDL-52226 tests: Fix behat phpunit naming conflict 2015-12-21 16:27:23 +08:00
David Monllao
f08d1590c8 Merge branch 'MDL-52226-master' of git://github.com/sammarshallou/moodle 2015-12-21 14:41:21 +08:00
Dan Poltawski
e42b60351e Merge branch 'MDL-52487_master' of git://github.com/dmonllao/moodle 2015-12-14 09:23:03 +00:00
David Monllao
abc4e1efed MDL-52487 rss: PHP 7 compatible error supression
PHP5 used to update error_reporting to 0 on functions called with the
suppress errors operator (@). In PHP7 it is not updated.

Credit to Rajesh Taneja.
2015-12-14 15:28:37 +08:00
David Monllao
05178f0745 Merge branch 'MDL-52471-master' of git://github.com/danpoltawski/moodle 2015-12-11 11:52:02 +08:00
Dan Poltawski
ef5df7b721 MDL-52471 tests: simplify setup code
Test code was not using the generator for simple enrollments, couldn't
help to fix when noticed.
2015-12-10 15:47:11 +00:00
Dan Poltawski
194a02e409 MDL-52471 completion: fix deprecated use of 'object'
And add a unit test covering completion_can_view_data() without
full course object passed.
2015-12-10 15:47:11 +00:00
Dan Poltawski
9708ff95fd MDL-52471 setuplib: depreciate class object properly
Previously was marked depricated but not throwwing debugging
2015-12-10 14:26:30 +00:00
David Monllao
a4fb992435 Merge branch 'MDL-52335-master' of git://github.com/marinaglancy/moodle 2015-12-10 15:47:14 +08:00
sam marshall
6d4858d5b3 MDL-52226 Forms: max_input_vars problems with advanced checkbox 2015-12-09 12:15:45 +00:00
Eloy Lafuente (stronk7)
7955476cab Merge branch 'MDL-51483_master' of https://github.com/jinhofer/moodle 2015-12-09 01:09:08 +01:00
jinhofer
4ebdd15487 MDL-51483 lib/moodlelib.php: Added conditional checks to shorten_text 2015-12-03 10:00:08 -06:00
Dan Poltawski
50901a53bc Merge branch 'MDL-51664-master' of git://github.com/FMCorz/moodle 2015-12-03 11:16:30 +01:00
Dan Poltawski
0ad66dda0e Merge branch 'MDL-52292' of git://github.com/timhunt/moodle 2015-12-03 11:13:26 +01:00
Marina Glancy
83bef8dabb MDL-52335 tool_uploaduser: php7 compatibility in variable syntax 2015-12-03 09:31:25 +08:00
Tim Hunt
eb3884e48f MDL-52292 block testing generators: improve the API
* Refactor the block generator base class, to remove the amount
  of duplication required in base classes.

* Change the defaults that are filled in to be a little more natural.

* Make the Behat step 'Given the following "block" exist:' work.
2015-12-01 13:48:08 +00:00
Dan Poltawski
8fea53a0b1 Merge branch 'MDL-51718-set-scheme' of https://github.com/brendanheywood/moodle 2015-11-30 13:37:47 +00:00
Dan Poltawski
14248189b7 Merge branch 'wip-mdl-50163' of https://github.com/rajeshtaneja/moodle 2015-11-23 11:33:55 +00:00
David Mudrák
182d9990f1 MDL-52214 core: Fix the is_web_crawler() regression
In MDL-50891, the is_web_crawler() was refactored into a core_useragent
method and the function itself was deprecated. However, there were no
unit tests kept to check the backwards compatible behaviour. It turned
out that the deprecated function leads to PHP fatal error due to a typo.

This patch fixes the typo and brings back the previous unit tests. To be
able to explicitly check the raised debugging message, the test case
now must be subclass of advanced_testcase.

Additionally fixes missing info about the function being deprecated.
2015-11-23 09:44:13 +01:00
Rajesh Taneja
8f76de32d9 MDL-50163 behat: Return subcontext from session
Creating a new context with new mink context
with different session was keeping the session
and was not returning proper session information
2015-11-17 13:27:10 +08:00
rajesh Taneja
131d4ac2b0 MDL-50163 behat: Restart session after scenario with switch_window
Restart session after a scenario with switch window
is finished. This will close all open browser windows
and open a new browser window
2015-11-17 12:12:03 +08:00
Dan Poltawski
2759c1218d Merge branch 'MDL-52036-master-resettable' of git://github.com/mudrd8mz/moodle 2015-11-05 09:03:20 +00:00
Brendan Heywood
462065e822 MDL-51718 weblib: Allow moodle_url scheme to be set 2015-11-05 09:08:00 +11:00
David Mudrák
19168d0934 MDL-52036 tablelib: Fix the behaviour of resetting table preferences
The problem with the previous implementation was that the table's
$this->prefs can contain valid non-empty value in its default state -
the default column to sort by. On resetting, we must not throw away
these default prefs.

This patch simplifies the TABLE_VAR_RESET interpretation. If such an
HTTP parameter is passed via the request, the table simply behaves as if
there were no previously stored preferences (does not matter if coming
from the current session, or from the persistent cross-session storage).

The logic that decides on whether or not the reset widget should be
displayed is put into a new method can_be_reset() with unit tests
attached.

Finally, the previously private method render_reset_button() is now
protected and the reset widget is given a new semantic CSS class.
2015-11-04 15:07:17 +01:00
Ryan Wyllie
77b0811021 MDL-51983 actionmenu: behat tests 2015-11-04 06:36:32 +00:00
Eloy Lafuente (stronk7)
217c3e0fc9 Merge branch 'wip-mdl-52007' of https://github.com/rajeshtaneja/moodle 2015-11-03 17:56:23 +01:00
rajesh Taneja
180fdb2f7c MDL-52007 behat: Use extended timeout for site admin expansion 2015-11-03 16:08:27 +08:00
Jun Pataleta
bbbdfc8610 MDL-47073 lib: Replace backslashes with slashes in jquery plugin urls
This patch replaces backslash characters in the generated jQuery
plugin URL to forward slashes when slasharguments is disabled and
 the Moodle server is running on IIS.
Thanks to Ryan Panning <Ryan.Panning@district196.org> for
reporting this issue and for suggesting a fix.
2015-10-30 17:05:23 -05:00
Andrew Nicols
37d0021369 Merge branch 'MDL-51915' of git://github.com/timhunt/moodle 2015-10-29 14:41:45 +08:00
Eloy Lafuente (stronk7)
7c549a17f4 MDL-51893 core_date: Stop using Pacific/Norfolk as 11.5 replacement
Norfolk Island's standard time (NFT) was on UTC+11:30 until 4 October
2015, when it was changed to UTC+11:00. So it's not suitable for 11.5
bad mapping replacement anymore.

It seems that there isn't any other location using such 11.5 timezone
so completely getting rid of it for conversions.
2015-10-27 10:17:05 +01:00
Tim Hunt
42406bc413 MDL-51915 lib tests: Extra unit test for html_to_text. 2015-10-26 18:30:21 +00:00
Dan Poltawski
0a05907873 Merge branch 'MDL-51737-master-3' of git://github.com/andrewnicols/moodle 2015-10-22 14:43:20 +01:00
Andrew Nicols
39a731efb4 MDL-51737 core: Add Edge UserAgent support 2015-10-22 08:37:27 +08:00
Eloy Lafuente (stronk7)
9062fa25ae Merge branch 'MDL-49329-master-multiplug' of git://github.com/mudrd8mz/moodle 2015-10-19 18:10:40 +02:00
David Mudrák
c8a6d162a0 MDL-51832 tests: Fix failing code manager unit tests on Windows 2015-10-19 18:08:59 +02:00
Dan Poltawski
e926ee8cf1 MDL-49329 fixtures: remove trailing whitespace 2015-10-16 15:22:37 +01:00
Dan Poltawski
293197afb3 Merge branch 'MDL-49329-master-multiplug' of git://github.com/mudrd8mz/moodle 2015-10-16 14:53:26 +01:00