Skip to content

Commit

Permalink
Merge pull request #11 from kecherou/maj_3_4
Browse files Browse the repository at this point in the history
MAJ Moodle 3.4
  • Loading branch information
DigiDago authored Oct 31, 2017
2 parents 8dda71a + afa1cc2 commit 6c775ab
Showing 30 changed files with 612 additions and 98 deletions.
23 changes: 12 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -4,28 +4,29 @@ notifications:
on_failure: change
language: php
php:
- "5.6"
env:
- DB=pgsql
- "7.0"
node_js:
- "iojs"
- "7"
addons:
postgresql: "9.3"
before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start
- git clone git://github.com/moodle/moodle ../moodle && cd ../moodle
- git checkout $TRAVIS_BRANCH
- sudo apt-get update > /dev/null
- travis_retry composer install
- mv ../moodle-block_admin_presets blocks/admin_presets
- cp config-dist.php config.php
- sh -c "sed -i -e s/'password'/''/ -e s/example.com/localhost/ -e s%192.168.1.250%localhost% -e s%127.0.0.1/moodle%localhost:8000% -e s%/home/example%$HOME% -e 's%\(\$CFG.*bht\)%\n\1%' -e 's%\(\$CFG.*behat_wwwroot.*http://localhost:8000\)%\n\1%' config.php"
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'create database moodle;' -U postgres; fi"
- sh -c "if [ '$DB' = 'pgsql' ]; then sed -i s/\'username\'/\'postgres\'/ config.php; fi"
- psql -c 'create database moodle;' -U postgres
- sed -i s/\'username\'/\'postgres\'/ config.php
- cat config.php
- mkdir -m777 $HOME/moodledata
- php -S localhost:8000 2> /dev/null > /dev/null &
- sleep 3 # give the built-in server some time to start
- "wget http://selenium-release.storage.googleapis.com/2.48/selenium-server-standalone-2.48.2.jar"
- xvfb-run -a java -jar selenium-server-standalone-2.48.2.jar 2> /dev/null > /dev/null &
- php admin/tool/behat/cli/init.php
- npm install -g grunt
- npm install -g grunt-cli
- npm install
script:
- vendor/bin/behat --config /home/travis/bht_moodledata/behat/behat.yml --tags @block_admin_presets
- grunt gherkinlint
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -16,6 +16,4 @@ Block to export and import Moodle administration settings
* Third parties plugins supported

## See also
* Modules and Plugins entry: https://moodle.org/plugins/view.php?plugin=block_admin_presets
* Forum discussion: http://moodle.org/mod/forum/discuss.php?d=171536
* Tracker component for bugs and other issues: http://tracker.moodle.org/browse/CONTRIB/component/10914
* Modules and Plugins entry: https://moodle.org/plugins/view.php?plugin=block_admin_presets
24 changes: 24 additions & 0 deletions block_admin_presets.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* Admin presets block main controller
*
* @package blocks/admin_presets
* @copyright 2017 Digidago <contact@digidago.com><www.digidago.com>
* @author Jordan Kesraoui | DigiDago
* @orignalauthor David Monllaó <david.monllao@urv.cat>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

class block_admin_presets extends block_list {

24 changes: 24 additions & 0 deletions classes/event/preset_deleted.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* Admin presets block main controller
*
* @package blocks/admin_presets
* @copyright 2017 Digidago <contact@digidago.com><www.digidago.com>
* @author Jordan Kesraoui | DigiDago
* @orignalauthor David Monllaó <david.monllao@urv.cat>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_admin_presets\event;

24 changes: 24 additions & 0 deletions classes/event/preset_downloaded.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* Admin presets block main controller
*
* @package blocks/admin_presets
* @copyright 2017 Digidago <contact@digidago.com><www.digidago.com>
* @author Jordan Kesraoui | DigiDago
* @orignalauthor David Monllaó <david.monllao@urv.cat>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_admin_presets\event;

24 changes: 24 additions & 0 deletions classes/event/preset_exported.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* Admin presets block main controller
*
* @package blocks/admin_presets
* @copyright 2017 Digidago <contact@digidago.com><www.digidago.com>
* @author Jordan Kesraoui | DigiDago
* @orignalauthor David Monllaó <david.monllao@urv.cat>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_admin_presets\event;

24 changes: 24 additions & 0 deletions classes/event/preset_imported.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* Admin presets block main controller
*
* @package blocks/admin_presets
* @copyright 2017 Digidago <contact@digidago.com><www.digidago.com>
* @author Jordan Kesraoui | DigiDago
* @orignalauthor David Monllaó <david.monllao@urv.cat>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_admin_presets\event;

24 changes: 24 additions & 0 deletions classes/event/preset_loaded.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* Admin presets block main controller
*
* @package blocks/admin_presets
* @copyright 2017 Digidago <contact@digidago.com><www.digidago.com>
* @author Jordan Kesraoui | DigiDago
* @orignalauthor David Monllaó <david.monllao@urv.cat>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_admin_presets\event;

24 changes: 24 additions & 0 deletions classes/event/preset_previewed.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* Admin presets block main controller
*
* @package blocks/admin_presets
* @copyright 2017 Digidago <contact@digidago.com><www.digidago.com>
* @author Jordan Kesraoui | DigiDago
* @orignalauthor David Monllaó <david.monllao@urv.cat>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_admin_presets\event;

24 changes: 24 additions & 0 deletions classes/event/preset_reverted.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* Admin presets block main controller
*
* @package blocks/admin_presets
* @copyright 2017 Digidago <contact@digidago.com><www.digidago.com>
* @author Jordan Kesraoui | DigiDago
* @orignalauthor David Monllaó <david.monllao@urv.cat>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_admin_presets\event;

24 changes: 24 additions & 0 deletions classes/event/presets_listed.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* Admin presets block main controller
*
* @package blocks/admin_presets
* @copyright 2017 Digidago <contact@digidago.com><www.digidago.com>
* @author Jordan Kesraoui | DigiDago
* @orignalauthor David Monllaó <david.monllao@urv.cat>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_admin_presets\event;

8 changes: 5 additions & 3 deletions db/access.php
Original file line number Diff line number Diff line change
@@ -15,10 +15,12 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* Block presets capabilities.
* Admin presets block main controller
*
* @package block_admin_presets
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
* @package blocks/admin_presets
* @copyright 2017 Digidago <contact@digidago.com><www.digidago.com>
* @author Jordan Kesraoui | DigiDago
* @orignalauthor David Monllaó <david.monllao@urv.cat>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

24 changes: 24 additions & 0 deletions db/upgrade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* Admin presets block main controller
*
* @package blocks/admin_presets
* @copyright 2017 Digidago <contact@digidago.com><www.digidago.com>
* @author Jordan Kesraoui | DigiDago
* @orignalauthor David Monllaó <david.monllao@urv.cat>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

/**
* @global moodle_database $DB
24 changes: 24 additions & 0 deletions forms/admin_presets_export_form.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* Admin presets block main controller
*
* @package blocks/admin_presets
* @copyright 2017 Digidago <contact@digidago.com><www.digidago.com>
* @author Jordan Kesraoui | DigiDago
* @orignalauthor David Monllaó <david.monllao@urv.cat>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

require_once($CFG->dirroot.'/lib/formslib.php');

Loading

0 comments on commit 6c775ab

Please sign in to comment.