4332 Commits

Author SHA1 Message Date
David Monllao
5bc64b0fab MDL-38814 behat: Deleting old files 2013-04-01 12:22:43 +08:00
David Mudrák
b2a138a20f MDL-38509 Escalate the maturity level of the plugin
The API is considered stable now and there should not be a need to
change it.
2013-03-29 01:30:00 +01:00
David Mudrák
0a6a344d29 MDL-38509 Add hook for the installaddonrequest into admin/index.php
If the user selects a plugin in Moodle plugins directory to be installed
into their site, Moodle plugins directory will redirect them into their
site's admin/index.php script, providing the installaddonrequest
parameter.

This patch makes sure that only if the user is logged-in as the admin
and the site is fully installed and up-to-date, the add-on installation
request will be dispatched to the tool_installaddon for actual
processing.

We need to store the installaddonrequest value in the $PAGE's URL so
that is is stored in $SESSION->wantsurl in case the user needs to log in
at their site. Thanks to this, the request is dispatched after the user
logs in.
2013-03-29 01:00:16 +01:00
David Mudrák
af96f120e9 MDL-38509 Add ability to install add-ons from the remote repository
There is a new hook in the index.php file. If valid HTTP parameter
installaddonrequest is detected, the installer asks the administrator to
confirm the request.

If confirmed, the installer calls download.moodle.org/api/1.2/pluginfo.php
service to get information about the given plugin version. The essential
data are the URL of the ZIP to download and the MD5 hash of the ZIP.
These data must be fetched via HTTPS to protect against MiM attack.

If the ZIP is downloaded and the MD5 content hash is correct, the user
is redirected to the previously implemented ZIP validation page, as if
the ZIP was uploaded manually.

The valid format of the installaddonrequest is documented via the
test_decode_remote_request() unit test method.
2013-03-29 00:16:06 +01:00
Rex Lorenzo
c4dbfb2c91 MDL-35603 - Backup - Course import selector notice
* added new config option to determine length of courses returned by import
* added text indicator if there are more than X number of courses, similar to how the restore course list currently works
2013-03-28 15:24:51 -07:00
David Mudrák
399ddcc73e MDL-38509 Move the tool node in the navigation
The "Install add-ons" should appear just below Site administration >
Plugins, before the "Activity modules".
2013-03-28 11:54:07 +01:00
David Mudrák
b7f6442670 MDL-38509 Fix the communication protocol with Moodle plugins directory
Implements the behaviour currently specified at
http://docs.moodle.org/dev/On-click_add-on_installation
2013-03-28 11:54:06 +01:00
David Mudrák
59a2cc8d38 MDL-38509 Add the script that finally deploys the validated ZIP contents 2013-03-28 11:54:06 +01:00
David Mudrák
a143984a36 MDL-38509 Add strings for the new admin tool 2013-03-28 11:54:06 +01:00
David Mudrák
cbd125e85d MDL-38509 Implement the ZIP package validation page
The script validate.php expects a ZIP file stored in a temporary
location. It extracts the ZIP (optionally renaming the root directory)
and executes the validator. Then it renders the validator log messages
and continue buttons.
2013-03-28 11:54:06 +01:00
David Mudrák
07083b230b MDL-38509 Add new tool_installaddon_installer::extract_installfromzip_file() method 2013-03-28 11:54:06 +01:00
David Mudrák
585b64a607 MDL-38509 Save uploaded ZIP into a temporary location and redirect to validator 2013-03-28 11:54:06 +01:00
David Mudrák
30bec5ba8d MDL-38509 Add new tool_installaddon_installer::get_plugintype_root() method 2013-03-28 11:54:06 +01:00
David Mudrák
a4fcf56f0a MDL-38509 Implement the plugin ZIP package validator
The validator code contains (modified) fragments of the
local_plugins_archive_validator class copyrighted by Marina Glancy that
is part of the local_plugins plugin. It operates over an extracted
copy of the ZIP file.
2013-03-28 11:54:06 +01:00
David Mudrák
ddab904ba8 MDL-38509 Check for writable plugin type location in install from ZIP form
Standard mform validation is implemented as well as progressively
enhanced AJAX version.
2013-03-28 11:54:05 +01:00
David Mudrák
0056f2a37b MDL-38509 Initial version of the new admin tool to install add-ons 2013-03-28 11:54:05 +01:00
David Monllao
28435f1a64 MDL-38689 behat: Allowing more than one selector type argument
Regex's placeholders can not be repeated, if
there are definitions that have more than one
selector type of the same kind it would not
be displayed like that in the steps definitions
list UI
2013-03-28 14:41:41 +08:00
David Monllao
2904bf9ddf MDL-38620 behat: New test
According to MDLQA-1175; test
removed from repository_upload as
is included in MDLQA-1175 test
2013-03-28 11:19:07 +08:00
David Monllao
3ea8721a0c MDL-38621 behat: New test
According to MDLQA-1172, course short
names may be displayed on the list of
courses page.
2013-03-28 10:58:57 +08:00
Aparup Banerjee
cf457c2169 Merge branch 'MDL-38659' of git://github.com/stronk7/moodle 2013-03-27 10:38:31 +08:00
Eloy Lafuente (stronk7)
2477bb29cc Merge branch 'MDL-38531_master' of git://github.com/dmonllao/moodle 2013-03-27 00:46:05 +01:00
Eloy Lafuente (stronk7)
8ef5dc58ea Merge branch 'MDL-38563-master-int' of git://github.com/FMCorz/moodle 2013-03-26 23:10:11 +01:00
Eloy Lafuente (stronk7)
6341d977a3 MDL-38659 environment: fix incorrect feedback messages 2013-03-26 15:34:50 +01:00
Damyon Wiese
35f155519e Merge branch 'w13_MDL-38654_m25_gdversion' of git://github.com/skodak/moodle
Conflicts:
	lang/en/admin.php
2013-03-25 14:02:31 +08:00
Damyon Wiese
81409525b9 MDL-37033 Environment - Fix indenting in XML 2013-03-25 09:20:53 +08:00
Frederic Massart
8819a83601 MDL-26644 course: Remove useless setting completionstartonenrol
This commit removes any trace of the setting 'Completion tracking
begins on enrolment' as it does not appear to do anything.
2013-03-25 08:28:01 +08:00
Petr Škoda
689096bc26 MDL-38654 do not test $CFG->gdversion
GD PHP extension is now required. Add-ons need to remove $CFG->gdversion tests. The worst case regression is that add-on will think GD is not available.
2013-03-22 16:57:55 +01:00
Eloy Lafuente (stronk7)
40b5cb2d71 MDL-37033 environment: add 2.5 brach details 2013-03-22 16:41:15 +01:00
Frederic Massart
0a94e4a928 MDL-38563 navigation: Removed extra parameters when calling add() 2013-03-22 14:40:12 +08:00
David Monllao
355a2c2c25 MDL-38524 behat: Add fake jsrev and themerev
The behat admin tool does not use moodle database
as it runs before anything else, it should set
CFG->jsrev and CFG->themerev as they are required.
2013-03-21 16:34:55 +08:00
David Monllao
371b7fc397 MDL-38414_master behat: Changing expand fieldsets test to forum form 2013-03-21 10:42:24 +08:00
David Monllao
25919739fd MDL-38364 phpunit: PHPUnit autoload uses capital A 2013-03-20 16:02:40 +08:00
Damyon Wiese
c2eb74df47 Merge branch 'MDL-34401-muc-pluginlib' of git://github.com/mudrd8mz/moodle
Conflicts:
	lib/db/caches.php
	version.php
2013-03-20 14:08:55 +08:00
Eloy Lafuente (stronk7)
6a32219c84 Merge branch 'w12_MDL-38364_m25_phpunitloading' of git://github.com/skodak/moodle 2013-03-20 00:17:35 +01:00
Eloy Lafuente (stronk7)
58b9cd031f Merge branch 'MDL-38497-admintree-beforesibling' of git://github.com/mudrd8mz/moodle
Conflicts:
	lib/upgrade.txt
2013-03-19 17:16:32 +01:00
David Monllao
1e63755fb5 MDL-38531 behat: Replacing composer install for composer update 2013-03-19 16:45:58 +08:00
Damyon Wiese
db98fa786e Merge branch 'wip-mdl-36395-m' of git://github.com/rajeshtaneja/moodle
Conflicts:
	version.php
2013-03-19 15:18:13 +08:00
Petr Škoda
94388d18ca MDL-38364 rework PHPUnit autoloading
This is related to BC incompatibility introduced in https://github.com/sebastianbergmann/phpunit/issues/848
2013-03-17 19:54:55 +01:00
David Mudrák
56aee7c2f6 MDL-38497 Fix invalid $ADMIN->add() calls
As the admin_category::add() method now checks for the third parameter,
couple of typos were detected in the code. Additional parameters passed
to the add() method were probably a mistake, a relict or a typo.

Note that the typo in admin/tool/unsuproles/settings.php had actually
significant impact on the functionality as the array with required
capabilities was not actually passed to the admin_externalpage
constructor as intended.
2013-03-15 01:00:29 +01:00
Eloy Lafuente (stronk7)
2472cdd305 Merge branch 'wip-mdl-38332' of git://github.com/rajeshtaneja/moodle 2013-03-12 22:50:32 +01:00
Rajesh Taneja
9a51c3d95c MDL-36395: Converted hard-coded MAX_USER_PER_PAGE to config setting
course, cohort, enrol, role, groups and forum used to use hard-coded
MAX_USERS_PER_PAGE=100 for rendering user list. This has been converted
to $CFG->maxusersperpage.
2013-03-12 17:14:53 +08:00
Damyon Wiese
61cd50618a Merge branch 'MDL-38184_master' of git://github.com/dmonllao/moodle 2013-03-12 16:35:19 +08:00
Eloy Lafuente (stronk7)
8aa0a1423b Merge branch 'MDL-38307_master' of git://github.com/dmonllao/moodle 2013-03-12 00:50:50 +01:00
Eloy Lafuente (stronk7)
8ed6ee97a6 Merge branch 'MDL-38346_master' of git://github.com/dmonllao/moodle 2013-03-12 00:43:38 +01:00
Eloy Lafuente (stronk7)
e314a6436e Merge branch 'wip-mdl-38382' of git://github.com/rajeshtaneja/moodle 2013-03-12 00:38:37 +01:00
David Mudrák
ad3ed98b05 MDL-34401 Replace ad-hoc plugin request caches with proper application caches
Data cached in these caches change only at well defined places (during
need for upgrade checks, at the plugin management screen etc). So it
makes sense to use proper application caches instead of request caches.

This saves couple of database queries at almost every page in Moodle.
2013-03-11 12:48:53 +01:00
David Monllao
37652a9cb9 MDL-38352 behat: Updating tests
According to non-escaped double quotes
in TableNodes. Also refactoring previous
test affected by the issue.
2013-03-11 12:52:13 +08:00
David Monllao
bceb65ee2d MDL-38307 behat: Remove notices 2013-03-08 12:29:59 +08:00
David Monllao
bd21f796cb MDL-38184 behat: Tests for filepicker steps 2013-03-08 11:57:54 +08:00
Rajesh Taneja
4e0b615ede MDL-38332 Users: Browse list of users should not contain guest user record 2013-03-08 11:44:42 +08:00