Compare commits

..

80 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) b19d180a86 Moodle release 3.1.13 2018-07-07 06:48:58 +02:00
Eloy Lafuente (stronk7) 93b943b322 Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2018-07-07 06:48:44 +02:00
AMOS bot 8e3b262bb7 Automatically generated installer lang files 2018-07-07 00:09:05 +00:00
AMOS bot f0b9026133 Automatically generated installer lang files 2018-07-05 00:08:59 +00:00
Tim Hunt b779dc805e MDL-62820 question import: properly escape output 2018-07-04 15:42:36 +08:00
Marina Glancy e74867d06c MDL-62790 course: cap check in core_course_get_categories 2018-07-03 12:05:51 +08:00
AMOS bot 41feb40e7e Automatically generated installer lang files 2018-06-13 00:08:54 +00:00
David Monllao 7696a8d9e3 weekly release 3.1.12+ 2018-05-24 10:45:51 +02:00
David Monllao c44b6e79fa Merge branch 'm31_MDL-61893_Accept_Any_Node_Carbon_Version-minimal' of https://github.com/scara/moodle into MOODLE_31_STABLE 2018-05-22 09:24:23 +02:00
Matteo Scaramuccia 81d5b794d0 MDL-61893 JavaScript: Accept any node version but Carbon (LTS)
Bumped the npm-shrinkwrap.json file version too by simply running
'npm install' after having removed the 'node_modules' directory.
2018-05-21 23:00:53 +02:00
Eloy Lafuente (stronk7) 8137f98b1c Merge branch 'MDL-62500-31' of git://github.com/andrewnicols/moodle into MOODLE_31_STABLE 2018-05-21 13:40:28 +02:00
Andrew Nicols 9103f6ca8a MDL-62500 tag: Update checkbox label when updating tag 2018-05-21 15:48:51 +08:00
Eloy Lafuente (stronk7) e6973df683 Moodle release 3.1.12 2018-05-16 18:42:02 +02:00
Marina Glancy 7d7ca07870 MDL-62469 qtype_calculated: check remaining placeholders, see MDL-62275
Amended for phpunit 4.x exception expectations.
2018-05-16 18:04:59 +02:00
David Monllao 8398fbe8b6 weekly release 3.1.11+ 2018-05-15 09:42:19 +02:00
David Monllao 7c362df750 Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2018-05-15 09:42:18 +02:00
AMOS bot 550b956e23 Automatically generated installer lang files 2018-05-15 00:07:06 +00:00
AMOS bot 59dbf60906 Automatically generated installer lang files 2018-05-13 00:07:23 +00:00
Eloy Lafuente (stronk7) f6f7a788ac MDL-62416 question_calculated: fix const to work under php54 2018-05-12 18:55:31 +02:00
Eloy Lafuente (stronk7) b6c0d8fc2a MDL-62275 qtype_calculatedmulti: Fix typo 2018-05-11 21:18:49 +02:00
Tim Hunt b7bbe9fd94 MDL-62275 qtype_calc*: improve validation of formulae
Many thanks to Marina Glancy for helping with this.
2018-05-11 01:44:17 +02:00
Marina Glancy f6da281a83 MDL-62206 blocks: do not add fixed form elements as hidden 2018-05-10 12:09:27 +08:00
Adam Olley f72830b4f0 MDL-62210 mod_assign: limit file lookup to the target assign 2018-05-10 11:22:39 +08:00
Brendan Cox ecd1bce400 MDL-62210 mod_assign: improved validation in portfolio caller class 2018-05-10 11:22:39 +08:00
Jun Pataleta 6c0e979eda MDL-62232 mod_forum: Use setExpectedException() 2018-05-10 09:21:06 +08:00
Brendan Cox 3ff27109ec MDL-62232 mod_forum: Additional tests for portfolio file export 2018-05-10 09:21:06 +08:00
Adam Olley f06f4603b8 MDL-62232 mod_forum: Limit portfolio to files belonging to the post 2018-05-10 09:21:06 +08:00
Marina Glancy 7bed262b8f MDL-62233 portfolio: check caller parent class 2018-05-10 09:21:05 +08:00
Marina Glancy e9ba7022fc MDL-61996 core: when loggedin always check user is complete 2018-05-09 12:10:02 +08:00
Jun Pataleta 60aab30175 weekly release 3.1.11+ 2018-05-09 12:00:59 +08:00
Jun Pataleta 85e9ee2175 Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2018-05-09 12:00:57 +08:00
Jake Dallimore 10426ccf9d Merge branch 'MDL-62280-31' of git://github.com/andrewnicols/moodle into MOODLE_31_STABLE 2018-05-03 10:55:04 +08:00
AMOS bot babe95c9dc Automatically generated installer lang files 2018-05-03 00:07:08 +00:00
Andrew Nicols 9a15bdc97f MDL-62280 xhprof: Support tideways_xhprof 2018-05-01 11:03:49 +08:00
AMOS bot 86f0bb4591 Automatically generated installer lang files 2018-05-01 00:07:45 +00:00
AMOS bot b0d7351cff Automatically generated installer lang files 2018-04-30 00:07:08 +00:00
AMOS bot ad5761237a Automatically generated installer lang files 2018-04-16 00:07:54 +00:00
AMOS bot d98544a729 Automatically generated installer lang files 2018-04-11 00:07:57 +00:00
AMOS bot 1dd71c502a Automatically generated installer lang files 2018-03-31 00:07:48 +00:00
Jun Pataleta fae9236939 weekly release 3.1.11+ 2018-03-29 12:55:45 +08:00
Jun Pataleta 36a7b9f234 Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2018-03-29 12:55:43 +08:00
Jake Dallimore 878d69b794 Merge branch 'MDL-61770-31' of git://github.com/andrewnicols/moodle into MOODLE_31_STABLE 2018-03-28 13:32:54 +08:00
Andrew Nicols 2032491730 MDL-61770 iplookup: Check types rather than values 2018-03-28 11:38:45 +08:00
AMOS bot 7b2fc2b81e Automatically generated installer lang files 2018-03-25 00:06:59 +00:00
AMOS bot c8fe4d8b88 Automatically generated installer lang files 2018-03-21 00:06:46 +00:00
AMOS bot 567c0bb51d Automatically generated installer lang files 2018-03-20 00:06:46 +00:00
AMOS bot fe8a827cb0 Automatically generated installer lang files 2018-03-20 00:06:45 +00:00
Eloy Lafuente (stronk7) e25e165231 Moodle release 3.1.11 2018-03-17 01:18:16 +01:00
Eloy Lafuente (stronk7) fdcf7fb3f6 Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2018-03-17 01:18:13 +01:00
David Mudrák 88bd118665 MDL-61392 enrol_paypal: Improve IPN input parameters checking 2018-03-14 09:19:02 +08:00
David Mudrák b061fba2c4 MDL-61392 enrol_paypal: Improve the IPN notifications handling
* Notify administrators once incoming IPN request is verified by PayPal.
* Fix the HTTP status as expected by the IPN protocol.
2018-03-14 09:19:02 +08:00
Eloy Lafuente (stronk7) 7f5f07b68e Merge branch 'MDL-48501-mdl31' of git://github.com/jswebster/moodle into MOODLE_31_STABLE 2018-03-12 23:51:49 +01:00
Jeff Webster 6843744660 MDL-48501 mod_feedback: update feedback to use reCAPTCHA v2 2018-03-07 17:49:47 -05:00
Jeff Webster fe82348810 MDL-48501 login: update signup_form to use reCAPTCHA v2 2018-03-07 17:49:46 -05:00
Jeff Webster cfefd25d6c MDL-48501 form/recaptcha: update to use reCAPTCHA v2 2018-03-07 17:01:01 -05:00
Jeff Webster 956166b766 MDL-48501 recaptchalib_v2: add new lib to support reCAPTCHA v2 2018-03-07 17:01:01 -05:00
Jeff Webster c692bb567f MDL-48501 lang: update reCAPTCHA language strings 2018-03-07 15:52:02 -05:00
AMOS bot 70a7b23df5 Automatically generated installer lang files 2018-03-07 00:07:03 +00:00
AMOS bot 42c5d3aa9d Automatically generated installer lang files 2018-02-19 00:06:59 +00:00
AMOS bot f0a15feedb Automatically generated installer lang files 2018-02-17 00:07:02 +00:00
David Monllao 2078761831 weekly release 3.1.10+ 2018-02-08 17:40:21 +01:00
Andrew Nicols 6fb9c39256 Merge branch 'MDL-61269_31' of git://github.com/stronk7/moodle into MOODLE_31_STABLE 2018-02-05 17:55:08 +08:00
David Monllao 8103058154 weekly release 3.1.10+ 2018-02-01 14:26:54 +01:00
David Monllao f9000970ca Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2018-02-01 14:26:53 +01:00
AMOS bot 2412171944 Automatically generated installer lang files 2018-02-01 00:07:20 +00:00
David Mudrák ea12e51d4d MDL-61242 repository_equella: Fix missing class repository
The call to the class 'repository' introduced in the commit d05c2ac7cc
didn't fully work and threw: "Exception - Class 'repository' not found".
This fixes the missing library inclusion.
2018-01-31 23:42:58 +01:00
AMOS bot 40b1f7f86d Automatically generated installer lang files 2018-01-31 00:07:08 +00:00
AMOS bot e052fe614f Automatically generated installer lang files 2018-01-30 00:07:08 +00:00
Eloy Lafuente (stronk7) 52c730014e Merge branch 'wip-MDL-61242-31' of git://github.com/abgreeve/moodle into MOODLE_31_STABLE 2018-01-29 16:35:57 +08:00
Andrew Nicols 787727c745 weekly release 3.1.10+ 2018-01-29 11:02:31 +08:00
Andrew Nicols 5e99464c96 Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2018-01-29 11:02:28 +08:00
Eloy Lafuente (stronk7) 46ecac536c MDL-61269 behat-extension: bump to fix some caps & defaults 2018-01-25 00:55:14 +01:00
Adrian Greeve b4e05280c1 MDL-61242 repository_equella: Add source key when sending the source.
A thank you to Nelson Cheng for find this issue and suggesting a patch.
2018-01-20 11:03:58 +08:00
AMOS bot 572838664d Automatically generated installer lang files 2018-01-19 00:07:34 +00:00
AMOS bot 2090c294bc Automatically generated installer lang files 2018-01-17 00:06:58 +00:00
Jun Pataleta a9c4c8da11 Merge branch 'MDL-61221-31' of git://github.com/andrewnicols/moodle into MOODLE_31_STABLE 2018-01-16 23:02:14 +08:00
Andrew Nicols 499c8d894d MDL-61221 badges: Ignore site availabilty for behat
Behat sites should not be available publically, and the check against
the backpack API for site availablity can time out in some situations.

We should be testing as though the site _is_ available, as this is the
standard expectation.
2018-01-16 13:26:30 +08:00
Eloy Lafuente (stronk7) 16ab239fb4 Merge branch 'MDL-61204-31' of git://github.com/andrewnicols/moodle into MOODLE_31_STABLE 2018-01-16 02:17:39 +01:00
Andrew Nicols 4940aa5152 MDL-61204 user: Fix random failure in behat
We need to get into the habit of not using usernames like 'student1'
and 'student10' as our matches are non-strict, and the tests become
dependent upon DB sort order.

This change adds a character after the varying value to act as a
delimter for all of these tests.
2018-01-16 08:33:09 +08:00
AMOS bot 3e130de203 Automatically generated installer lang files 2018-01-16 00:07:14 +00:00
72 changed files with 3728 additions and 1222 deletions
+1 -4
View File
@@ -45,12 +45,9 @@ matrix:
fast_finish: true
include:
# Run grunt/npm install on lowest supported npm version
- php: 7
env: DB=none TASK=GRUNT NVM_VERSION='0.10'
# Run grunt/npm install on highest version ('node' is an alias for the latest node.js version.)
- php: 7
env: DB=none TASK=GRUNT NVM_VERSION='node'
env: DB=none TASK=GRUNT NVM_VERSION='lts/carbon'
exclude:
# MySQL - it's just too slow.
+3 -1
View File
@@ -32,7 +32,9 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
$ADMIN->add('development', $temp);
// "Profiling" settingpage (conditionally if the 'xhprof' extension is available only).
$xhprofenabled = extension_loaded('xhprof') || extension_loaded('tideways');
$xhprofenabled = extension_loaded('tideways_xhprof');
$xhprofenabled = $xhprofenabled || extension_loaded('tideways');
$xhprofenabled = $xhprofenabled || extension_loaded('xhprof');
$temp = new admin_settingpage('profiling', new lang_string('profiling', 'admin'), 'moodle/site:config', !$xhprofenabled);
// Main profiling switch.
$temp->add(new admin_setting_configcheckbox('profilingenabled', new lang_string('profilingenabled', 'admin'), new lang_string('profilingenabled_help', 'admin'), false));
+6 -2
View File
@@ -25,8 +25,12 @@
defined('MOODLE_INTERNAL') || die;
// profiling tool, added to development
if ((extension_loaded('xhprof') || extension_loaded('tideways')) && (!empty($CFG->profilingenabled) || !empty($CFG->earlyprofilingenabled))) {
// Profiling tool, added to development.
$hasextension = extension_loaded('tideways_xhprof');
$hasextension = $hasextension || extension_loaded('tideways');
$hasextension = $hasextension || extension_loaded('xhprof');
$isenabled = !empty($CFG->profilingenabled) || !empty($CFG->earlyprofilingenabled);
if ($hasextension && $isenabled) {
$ADMIN->add('development', new admin_externalpage('toolprofiling', get_string('pluginname', 'tool_profiling'),
"$CFG->wwwroot/$CFG->admin/tool/profiling/index.php", 'moodle/site:config'));
}
+45 -26
View File
@@ -50,6 +50,12 @@ class block_edit_form extends moodleform {
*/
public $page;
/**
* Defaults set in set_data() that need to be returned in get_data() if form elements were not created
* @var array
*/
protected $defaults = [];
function __construct($actionurl, $block, $page) {
global $CFG;
$this->block = $block;
@@ -92,9 +98,6 @@ class block_edit_form extends moodleform {
}
$parentcontext = context::instance_by_id($this->block->instance->parentcontextid);
$mform->addElement('hidden', 'bui_parentcontextid', $parentcontext->id);
$mform->setType('bui_parentcontextid', PARAM_INT);
$mform->addElement('static', 'bui_homecontext', get_string('createdat', 'block'), $parentcontext->get_context_name());
$mform->addHelpButton('bui_homecontext', 'createdat', 'block');
@@ -109,21 +112,9 @@ class block_edit_form extends moodleform {
// implies one (and only one) harcoded page-type that will be set later
// when processing the form data at {@link block_manager::process_url_edit()}
// There are some conditions to check related to contexts
$ctxconditions = $this->page->context->contextlevel == CONTEXT_COURSE &&
$this->page->context->instanceid == get_site()->id;
// And also some pagetype conditions
$pageconditions = isset($bits[0]) && isset($bits[1]) && $bits[0] == 'site' && $bits[1] == 'index';
// So now we can be 100% sure if edition is happening at frontpage
$editingatfrontpage = $ctxconditions && $pageconditions;
// Let the form to know about that, can be useful later
$mform->addElement('hidden', 'bui_editingatfrontpage', (int)$editingatfrontpage);
$mform->setType('bui_editingatfrontpage', PARAM_INT);
// Front page, show the page-contexts element and set $pagetypelist to 'any page' (*)
// as unique option. Processign the form will do any change if needed
if ($editingatfrontpage) {
if ($this->is_editing_the_frontpage()) {
$contextoptions = array();
$contextoptions[BUI_CONTEXTS_FRONTPAGE_ONLY] = get_string('showonfrontpageonly', 'block');
$contextoptions[BUI_CONTEXTS_FRONTPAGE_SUBS] = get_string('showonfrontpageandsubs', 'block');
@@ -135,16 +126,13 @@ class block_edit_form extends moodleform {
// Any other system context block, hide the page-contexts element,
// it's always system-wide BUI_CONTEXTS_ENTIRE_SITE
} else if ($parentcontext->contextlevel == CONTEXT_SYSTEM) {
$mform->addElement('hidden', 'bui_contexts', BUI_CONTEXTS_ENTIRE_SITE);
} else if ($parentcontext->contextlevel == CONTEXT_COURSE) {
// 0 means display on current context only, not child contexts
// but if course managers select mod-* as pagetype patterns, block system will overwrite this option
// to 1 (display on current context and child contexts)
$mform->addElement('hidden', 'bui_contexts', BUI_CONTEXTS_CURRENT);
} else if ($parentcontext->contextlevel == CONTEXT_MODULE or $parentcontext->contextlevel == CONTEXT_USER) {
// module context doesn't have child contexts, so display in current context only
$mform->addElement('hidden', 'bui_contexts', BUI_CONTEXTS_CURRENT);
} else {
$parentcontextname = $parentcontext->get_context_name();
$contextoptions[BUI_CONTEXTS_CURRENT] = get_string('showoncontextonly', 'block', $parentcontextname);
@@ -181,8 +169,6 @@ class block_edit_form extends moodleform {
} else {
$values = array_keys($pagetypelist);
$value = array_pop($values);
$mform->addElement('hidden', 'bui_pagetypepattern', $value);
$mform->setType('bui_pagetypepattern', PARAM_RAW);
// Now we are really hiding a lot (both page-contexts and page-type-patterns),
// specially in some systemcontext pages having only one option (my/user...)
// so, until it's decided if we are going to add the 'bring-back' pattern to
@@ -191,7 +177,7 @@ class block_edit_form extends moodleform {
// TODO: Revisit this once MDL-30574 has been decided and implemented, although
// perhaps it's not bad to always show this statically when only one pattern is
// available.
if (!$editingatfrontpage) {
if (!$this->is_editing_the_frontpage()) {
// Try to beautify it
$strvalue = $value;
$strkey = 'page-'.str_replace('*', 'x', $strvalue);
@@ -205,10 +191,7 @@ class block_edit_form extends moodleform {
}
if ($this->page->subpage) {
if ($parentcontext->contextlevel == CONTEXT_USER) {
$mform->addElement('hidden', 'bui_subpagepattern', '%@NULL@%');
$mform->setType('bui_subpagepattern', PARAM_RAW);
} else {
if ($parentcontext->contextlevel != CONTEXT_USER) {
$subpageoptions = array(
'%@NULL@%' => get_string('anypagematchingtheabove', 'block'),
$this->page->subpage => get_string('thisspecificpage', 'block', $this->page->subpage),
@@ -252,6 +235,19 @@ class block_edit_form extends moodleform {
$this->add_action_buttons();
}
/**
* Returns true if the user is editing a frontpage.
* @return bool
*/
public function is_editing_the_frontpage() {
// There are some conditions to check related to contexts.
$ctxconditions = $this->page->context->contextlevel == CONTEXT_COURSE &&
$this->page->context->instanceid == get_site()->id;
$issiteindex = (strpos($this->page->pagetype, 'site-index') === 0);
// So now we can be 100% sure if edition is happening at frontpage.
return ($ctxconditions && $issiteindex);
}
function set_data($defaults) {
// Prefix bui_ on all the core field names.
$blockfields = array('showinsubcontexts', 'pagetypepattern', 'subpagepattern', 'parentcontextid',
@@ -281,6 +277,13 @@ class block_edit_form extends moodleform {
$defaults->bui_contexts = $defaults->bui_showinsubcontexts;
}
// Some fields may not be editable, remember the values here so we can return them in get_data().
$this->defaults = [
'bui_parentcontextid' => $defaults->bui_parentcontextid,
'bui_contexts' => $defaults->bui_contexts,
'bui_pagetypepattern' => $defaults->bui_pagetypepattern,
'bui_subpagepattern' => $defaults->bui_subpagepattern,
];
parent::set_data($defaults);
}
@@ -291,4 +294,20 @@ class block_edit_form extends moodleform {
protected function specific_definition($mform) {
// By default, do nothing.
}
/**
* Return submitted data if properly submitted or returns NULL if validation fails or
* if there is no submitted data.
*
* @return object submitted data; NULL if not valid or not submitted or cancelled
*/
public function get_data() {
if ($data = parent::get_data()) {
// Blocklib expects 'bui_editingatfrontpage' property to be returned from this form.
$data->bui_editingatfrontpage = $this->is_editing_the_frontpage();
// Some fields are non-editable and we need to populate them with the values from set_data().
return (object)((array)$data + $this->defaults);
}
return $data;
}
}
+1 -1
View File
@@ -4,6 +4,6 @@
"phpunit/dbUnit": "1.4.1",
"sebastian/environment": "1.3.7",
"sebastian/recursion-context": "1.0.2",
"moodlehq/behat-extension": "3.31.6"
"moodlehq/behat-extension": "3.31.7"
}
}
Generated
+190 -173
View File
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "be501c2af95e3e00762b8cf30d957b2b",
"content-hash": "3a6c6907fe5405dbbd8ae2ba209fa942",
"packages": [],
"packages-dev": [
{
@@ -89,16 +89,16 @@
},
{
"name": "behat/gherkin",
"version": "v4.4.5",
"version": "v4.5.1",
"source": {
"type": "git",
"url": "https://github.com/Behat/Gherkin.git",
"reference": "5c14cff4f955b17d20d088dec1bde61c0539ec74"
"reference": "74ac03d52c5e23ad8abd5c5cce4ab0e8dc1b530a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Behat/Gherkin/zipball/5c14cff4f955b17d20d088dec1bde61c0539ec74",
"reference": "5c14cff4f955b17d20d088dec1bde61c0539ec74",
"url": "https://api.github.com/repos/Behat/Gherkin/zipball/74ac03d52c5e23ad8abd5c5cce4ab0e8dc1b530a",
"reference": "74ac03d52c5e23ad8abd5c5cce4ab0e8dc1b530a",
"shasum": ""
},
"require": {
@@ -144,7 +144,7 @@
"gherkin",
"parser"
],
"time": "2016-10-30T11:50:56+00:00"
"time": "2017-08-30T11:04:43+00:00"
},
{
"name": "behat/mink",
@@ -262,27 +262,27 @@
},
{
"name": "behat/mink-extension",
"version": "v2.2",
"version": "2.3.0",
"source": {
"type": "git",
"url": "https://github.com/Behat/MinkExtension.git",
"reference": "5b4bda64ff456104564317e212c823e45cad9d59"
"reference": "badc565b7a1d05c4a4bf49c789045bcf7af6c6de"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Behat/MinkExtension/zipball/5b4bda64ff456104564317e212c823e45cad9d59",
"reference": "5b4bda64ff456104564317e212c823e45cad9d59",
"url": "https://api.github.com/repos/Behat/MinkExtension/zipball/badc565b7a1d05c4a4bf49c789045bcf7af6c6de",
"reference": "badc565b7a1d05c4a4bf49c789045bcf7af6c6de",
"shasum": ""
},
"require": {
"behat/behat": "~3.0,>=3.0.5",
"behat/mink": "~1.5",
"behat/behat": "^3.0.5",
"behat/mink": "^1.5",
"php": ">=5.3.2",
"symfony/config": "~2.2|~3.0"
"symfony/config": "^2.7|^3.0|^4.0"
},
"require-dev": {
"behat/mink-goutte-driver": "~1.1",
"phpspec/phpspec": "~2.0"
"behat/mink-goutte-driver": "^1.1",
"phpspec/phpspec": "^2.0"
},
"type": "behat-extension",
"extra": {
@@ -317,7 +317,7 @@
"test",
"web"
],
"time": "2016-02-15T07:55:18+00:00"
"time": "2017-11-24T19:30:49+00:00"
},
{
"name": "behat/mink-goutte-driver",
@@ -437,25 +437,29 @@
},
{
"name": "behat/transliterator",
"version": "v1.1.0",
"version": "v1.2.0",
"source": {
"type": "git",
"url": "https://github.com/Behat/Transliterator.git",
"reference": "868e05be3a9f25ba6424c2dd4849567f50715003"
"reference": "826ce7e9c2a6664c0d1f381cbb38b1fb80a7ee2c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Behat/Transliterator/zipball/868e05be3a9f25ba6424c2dd4849567f50715003",
"reference": "868e05be3a9f25ba6424c2dd4849567f50715003",
"url": "https://api.github.com/repos/Behat/Transliterator/zipball/826ce7e9c2a6664c0d1f381cbb38b1fb80a7ee2c",
"reference": "826ce7e9c2a6664c0d1f381cbb38b1fb80a7ee2c",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
"chuyskywalker/rolling-curl": "^3.1",
"php-yaoi/php-yaoi": "^1.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.1-dev"
"dev-master": "1.2-dev"
}
},
"autoload": {
@@ -473,7 +477,7 @@
"slug",
"transliterator"
],
"time": "2015-09-28T16:26:35+00:00"
"time": "2017-04-04T11:38:05+00:00"
},
{
"name": "doctrine/instantiator",
@@ -580,21 +584,22 @@
},
{
"name": "guzzlehttp/guzzle",
"version": "5.3.1",
"version": "5.3.2",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
"reference": "70f1fa53b71c4647bf2762c09068a95f77e12fb8"
"reference": "f9acb4761844317e626a32259205bec1f1bc60d2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/70f1fa53b71c4647bf2762c09068a95f77e12fb8",
"reference": "70f1fa53b71c4647bf2762c09068a95f77e12fb8",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/f9acb4761844317e626a32259205bec1f1bc60d2",
"reference": "f9acb4761844317e626a32259205bec1f1bc60d2",
"shasum": ""
},
"require": {
"guzzlehttp/ringphp": "^1.1",
"php": ">=5.4.0"
"php": ">=5.4.0",
"react/promise": "^2.2"
},
"require-dev": {
"ext-curl": "*",
@@ -628,7 +633,7 @@
"rest",
"web service"
],
"time": "2016-07-15T19:28:39+00:00"
"time": "2018-01-15T07:18:01+00:00"
},
{
"name": "guzzlehttp/ringphp",
@@ -733,16 +738,16 @@
},
{
"name": "instaclick/php-webdriver",
"version": "1.4.3",
"version": "1.4.5",
"source": {
"type": "git",
"url": "https://github.com/instaclick/php-webdriver.git",
"reference": "0c20707dcf30a32728fd6bdeeab996c887fdb2fb"
"reference": "6fa959452e774dcaed543faad3a9d1a37d803327"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/instaclick/php-webdriver/zipball/0c20707dcf30a32728fd6bdeeab996c887fdb2fb",
"reference": "0c20707dcf30a32728fd6bdeeab996c887fdb2fb",
"url": "https://api.github.com/repos/instaclick/php-webdriver/zipball/6fa959452e774dcaed543faad3a9d1a37d803327",
"reference": "6fa959452e774dcaed543faad3a9d1a37d803327",
"shasum": ""
},
"require": {
@@ -750,7 +755,8 @@
"php": ">=5.3.2"
},
"require-dev": {
"satooshi/php-coveralls": "dev-master"
"phpunit/phpunit": "^4.8",
"satooshi/php-coveralls": "^1.0||^2.0"
},
"type": "library",
"extra": {
@@ -787,20 +793,20 @@
"webdriver",
"webtest"
],
"time": "2015-06-15T20:19:33+00:00"
"time": "2017-06-30T04:02:48+00:00"
},
{
"name": "moodlehq/behat-extension",
"version": "v3.31.6",
"version": "v3.31.7",
"source": {
"type": "git",
"url": "https://github.com/moodlehq/moodle-behat-extension.git",
"reference": "ae6be43e359fb36f825da1f248b727d7a46a94ed"
"reference": "9baefa57d61771b7ec46bcc899a48046dba50b2b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/moodlehq/moodle-behat-extension/zipball/ae6be43e359fb36f825da1f248b727d7a46a94ed",
"reference": "ae6be43e359fb36f825da1f248b727d7a46a94ed",
"url": "https://api.github.com/repos/moodlehq/moodle-behat-extension/zipball/9baefa57d61771b7ec46bcc899a48046dba50b2b",
"reference": "9baefa57d61771b7ec46bcc899a48046dba50b2b",
"shasum": ""
},
"require": {
@@ -836,20 +842,20 @@
"Behat",
"moodle"
],
"time": "2017-01-19T00:08:20+00:00"
"time": "2018-01-24T19:13:01+00:00"
},
{
"name": "phpdocumentor/reflection-docblock",
"version": "2.0.4",
"version": "2.0.5",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
"reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8"
"reference": "e6a969a640b00d8daa3c66518b0405fb41ae0c4b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8",
"reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/e6a969a640b00d8daa3c66518b0405fb41ae0c4b",
"reference": "e6a969a640b00d8daa3c66518b0405fb41ae0c4b",
"shasum": ""
},
"require": {
@@ -885,37 +891,37 @@
"email": "mike.vanriel@naenius.com"
}
],
"time": "2015-02-03T12:10:50+00:00"
"time": "2016-01-25T08:17:30+00:00"
},
{
"name": "phpspec/prophecy",
"version": "v1.6.2",
"version": "1.7.3",
"source": {
"type": "git",
"url": "https://github.com/phpspec/prophecy.git",
"reference": "6c52c2722f8460122f96f86346600e1077ce22cb"
"reference": "e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/6c52c2722f8460122f96f86346600e1077ce22cb",
"reference": "6c52c2722f8460122f96f86346600e1077ce22cb",
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf",
"reference": "e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf",
"shasum": ""
},
"require": {
"doctrine/instantiator": "^1.0.2",
"php": "^5.3|^7.0",
"phpdocumentor/reflection-docblock": "^2.0|^3.0.2",
"sebastian/comparator": "^1.1",
"sebastian/recursion-context": "^1.0|^2.0"
"phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0",
"sebastian/comparator": "^1.1|^2.0",
"sebastian/recursion-context": "^1.0|^2.0|^3.0"
},
"require-dev": {
"phpspec/phpspec": "^2.0",
"phpunit/phpunit": "^4.8 || ^5.6.5"
"phpspec/phpspec": "^2.5|^3.2",
"phpunit/phpunit": "^4.8.35 || ^5.7"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.6.x-dev"
"dev-master": "1.7.x-dev"
}
},
"autoload": {
@@ -948,7 +954,7 @@
"spy",
"stub"
],
"time": "2016-11-21T14:58:47+00:00"
"time": "2017-11-24T13:59:53+00:00"
},
{
"name": "phpunit/dbunit",
@@ -1073,16 +1079,16 @@
},
{
"name": "phpunit/php-file-iterator",
"version": "1.4.2",
"version": "1.4.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
"reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5"
"reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5",
"reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5",
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4",
"reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4",
"shasum": ""
},
"require": {
@@ -1116,7 +1122,7 @@
"filesystem",
"iterator"
],
"time": "2016-10-03T07:40:28+00:00"
"time": "2017-11-27T13:52:08+00:00"
},
{
"name": "phpunit/php-text-template",
@@ -1161,25 +1167,30 @@
},
{
"name": "phpunit/php-timer",
"version": "1.0.8",
"version": "1.0.9",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-timer.git",
"reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260"
"reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260",
"reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260",
"url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
"reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
"php": "^5.3.3 || ^7.0"
},
"require-dev": {
"phpunit/phpunit": "~4|~5"
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
@@ -1201,20 +1212,20 @@
"keywords": [
"timer"
],
"time": "2016-05-12T18:03:57+00:00"
"time": "2017-02-26T11:10:40+00:00"
},
{
"name": "phpunit/php-token-stream",
"version": "1.4.9",
"version": "1.4.12",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
"reference": "3b402f65a4cc90abf6e1104e388b896ce209631b"
"reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3b402f65a4cc90abf6e1104e388b896ce209631b",
"reference": "3b402f65a4cc90abf6e1104e388b896ce209631b",
"url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/1ce90ba27c42e4e44e6d8458241466380b51fa16",
"reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16",
"shasum": ""
},
"require": {
@@ -1250,7 +1261,7 @@
"keywords": [
"tokenizer"
],
"time": "2016-11-15T14:06:22+00:00"
"time": "2017-12-04T08:55:13+00:00"
},
{
"name": "phpunit/phpunit",
@@ -1429,21 +1440,24 @@
},
{
"name": "react/promise",
"version": "v2.5.0",
"version": "v2.5.1",
"source": {
"type": "git",
"url": "https://github.com/reactphp/promise.git",
"reference": "2760f3898b7e931aa71153852dcd48a75c9b95db"
"reference": "62785ae604c8d69725d693eb370e1d67e94c4053"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/reactphp/promise/zipball/2760f3898b7e931aa71153852dcd48a75c9b95db",
"reference": "2760f3898b7e931aa71153852dcd48a75c9b95db",
"url": "https://api.github.com/repos/reactphp/promise/zipball/62785ae604c8d69725d693eb370e1d67e94c4053",
"reference": "62785ae604c8d69725d693eb370e1d67e94c4053",
"shasum": ""
},
"require": {
"php": ">=5.4.0"
},
"require-dev": {
"phpunit/phpunit": "~4.8"
},
"type": "library",
"autoload": {
"psr-4": {
@@ -1468,20 +1482,20 @@
"promise",
"promises"
],
"time": "2016-12-22T14:09:01+00:00"
"time": "2017-03-25T12:08:31+00:00"
},
{
"name": "sebastian/comparator",
"version": "1.2.2",
"version": "1.2.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
"reference": "6a1ed12e8b2409076ab22e3897126211ff8b1f7f"
"reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/6a1ed12e8b2409076ab22e3897126211ff8b1f7f",
"reference": "6a1ed12e8b2409076ab22e3897126211ff8b1f7f",
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be",
"reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be",
"shasum": ""
},
"require": {
@@ -1532,27 +1546,27 @@
"compare",
"equality"
],
"time": "2016-11-19T09:18:40+00:00"
"time": "2017-01-29T09:50:25+00:00"
},
{
"name": "sebastian/diff",
"version": "1.4.1",
"version": "1.4.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
"reference": "13edfd8706462032c2f52b4b862974dd46b71c9e"
"reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e",
"reference": "13edfd8706462032c2f52b4b862974dd46b71c9e",
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4",
"reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
"php": "^5.3.3 || ^7.0"
},
"require-dev": {
"phpunit/phpunit": "~4.8"
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
},
"type": "library",
"extra": {
@@ -1584,7 +1598,7 @@
"keywords": [
"diff"
],
"time": "2015-12-08T07:14:41+00:00"
"time": "2017-05-22T07:24:03+00:00"
},
{
"name": "sebastian/environment",
@@ -1844,16 +1858,16 @@
},
{
"name": "symfony/browser-kit",
"version": "v2.8.16",
"version": "v2.8.33",
"source": {
"type": "git",
"url": "https://github.com/symfony/browser-kit.git",
"reference": "d2a5de15c8341a470a66becf4597bc675686a72b"
"reference": "e49a78bcf09ba2e6d03e63e80211f889c037add5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/browser-kit/zipball/d2a5de15c8341a470a66becf4597bc675686a72b",
"reference": "d2a5de15c8341a470a66becf4597bc675686a72b",
"url": "https://api.github.com/repos/symfony/browser-kit/zipball/e49a78bcf09ba2e6d03e63e80211f889c037add5",
"reference": "e49a78bcf09ba2e6d03e63e80211f889c037add5",
"shasum": ""
},
"require": {
@@ -1861,8 +1875,8 @@
"symfony/dom-crawler": "~2.1|~3.0.0"
},
"require-dev": {
"symfony/css-selector": "~2.0,>=2.0.5|~3.0.0",
"symfony/process": "~2.3.34|~2.7,>=2.7.6|~3.0.0"
"symfony/css-selector": "^2.0.5|~3.0.0",
"symfony/process": "~2.3.34|^2.7.6|~3.0.0"
},
"suggest": {
"symfony/process": ""
@@ -1897,20 +1911,20 @@
],
"description": "Symfony BrowserKit Component",
"homepage": "https://symfony.com",
"time": "2017-01-02T20:30:24+00:00"
"time": "2018-01-03T07:36:31+00:00"
},
{
"name": "symfony/class-loader",
"version": "v2.8.16",
"version": "v2.8.33",
"source": {
"type": "git",
"url": "https://github.com/symfony/class-loader.git",
"reference": "7c46951128f7169cbece2c303fba4a9eb35cbe68"
"reference": "f87f46e5e1bf31382a65966795fa2d4dd7e2b300"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/class-loader/zipball/7c46951128f7169cbece2c303fba4a9eb35cbe68",
"reference": "7c46951128f7169cbece2c303fba4a9eb35cbe68",
"url": "https://api.github.com/repos/symfony/class-loader/zipball/f87f46e5e1bf31382a65966795fa2d4dd7e2b300",
"reference": "f87f46e5e1bf31382a65966795fa2d4dd7e2b300",
"shasum": ""
},
"require": {
@@ -1918,7 +1932,7 @@
"symfony/polyfill-apcu": "~1.1"
},
"require-dev": {
"symfony/finder": "~2.0,>=2.0.5|~3.0.0"
"symfony/finder": "^2.0.5|~3.0.0"
},
"type": "library",
"extra": {
@@ -1950,20 +1964,20 @@
],
"description": "Symfony ClassLoader Component",
"homepage": "https://symfony.com",
"time": "2017-01-10T14:03:07+00:00"
"time": "2018-01-03T07:36:31+00:00"
},
{
"name": "symfony/config",
"version": "v2.8.16",
"version": "v2.8.33",
"source": {
"type": "git",
"url": "https://github.com/symfony/config.git",
"reference": "4537f2413348fe271c2c4b09da219ed615d79f9c"
"reference": "705d1687222c08deabac8993ec2e04ad1a422c52"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/config/zipball/4537f2413348fe271c2c4b09da219ed615d79f9c",
"reference": "4537f2413348fe271c2c4b09da219ed615d79f9c",
"url": "https://api.github.com/repos/symfony/config/zipball/705d1687222c08deabac8993ec2e04ad1a422c52",
"reference": "705d1687222c08deabac8993ec2e04ad1a422c52",
"shasum": ""
},
"require": {
@@ -2006,25 +2020,25 @@
],
"description": "Symfony Config Component",
"homepage": "https://symfony.com",
"time": "2017-01-02T20:30:24+00:00"
"time": "2018-01-03T07:36:31+00:00"
},
{
"name": "symfony/console",
"version": "v2.8.16",
"version": "v2.8.33",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "2e18b8903d9c498ba02e1dfa73f64d4894bb6912"
"reference": "a4bd0f02ea156cf7b5138774a7ba0ab44d8da4fe"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/2e18b8903d9c498ba02e1dfa73f64d4894bb6912",
"reference": "2e18b8903d9c498ba02e1dfa73f64d4894bb6912",
"url": "https://api.github.com/repos/symfony/console/zipball/a4bd0f02ea156cf7b5138774a7ba0ab44d8da4fe",
"reference": "a4bd0f02ea156cf7b5138774a7ba0ab44d8da4fe",
"shasum": ""
},
"require": {
"php": ">=5.3.9",
"symfony/debug": "~2.7,>=2.7.2|~3.0.0",
"symfony/debug": "^2.7.2|~3.0.0",
"symfony/polyfill-mbstring": "~1.0"
},
"require-dev": {
@@ -2067,20 +2081,20 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
"time": "2017-01-08T20:43:03+00:00"
"time": "2018-01-03T07:36:31+00:00"
},
{
"name": "symfony/css-selector",
"version": "v2.8.16",
"version": "v2.8.33",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
"reference": "f45daea42232d9ca5cf561ec64f0d4aea820877f"
"reference": "c5b39674eacd34adedbef78227c57109caa9e318"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/f45daea42232d9ca5cf561ec64f0d4aea820877f",
"reference": "f45daea42232d9ca5cf561ec64f0d4aea820877f",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/c5b39674eacd34adedbef78227c57109caa9e318",
"reference": "c5b39674eacd34adedbef78227c57109caa9e318",
"shasum": ""
},
"require": {
@@ -2120,20 +2134,20 @@
],
"description": "Symfony CssSelector Component",
"homepage": "https://symfony.com",
"time": "2017-01-02T20:30:24+00:00"
"time": "2018-01-03T07:36:31+00:00"
},
{
"name": "symfony/debug",
"version": "v2.8.16",
"version": "v2.8.33",
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
"reference": "567681e2c4e5431704e884e4be25a95fd900770f"
"reference": "546db6f2bf8aefb43f37ce6f2f67fb700c51c1c2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/debug/zipball/567681e2c4e5431704e884e4be25a95fd900770f",
"reference": "567681e2c4e5431704e884e4be25a95fd900770f",
"url": "https://api.github.com/repos/symfony/debug/zipball/546db6f2bf8aefb43f37ce6f2f67fb700c51c1c2",
"reference": "546db6f2bf8aefb43f37ce6f2f67fb700c51c1c2",
"shasum": ""
},
"require": {
@@ -2145,7 +2159,7 @@
},
"require-dev": {
"symfony/class-loader": "~2.2|~3.0.0",
"symfony/http-kernel": "~2.3.24|~2.5.9|~2.6,>=2.6.2|~3.0.0"
"symfony/http-kernel": "~2.3.24|~2.5.9|^2.6.2|~3.0.0"
},
"type": "library",
"extra": {
@@ -2177,20 +2191,20 @@
],
"description": "Symfony Debug Component",
"homepage": "https://symfony.com",
"time": "2017-01-02T20:30:24+00:00"
"time": "2018-01-03T17:12:09+00:00"
},
{
"name": "symfony/dependency-injection",
"version": "v2.8.16",
"version": "v2.8.33",
"source": {
"type": "git",
"url": "https://github.com/symfony/dependency-injection.git",
"reference": "b75356611675364607d697f314850d9d870a84aa"
"reference": "954ff7c61879479b2f57f427798f9c82555438a6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/dependency-injection/zipball/b75356611675364607d697f314850d9d870a84aa",
"reference": "b75356611675364607d697f314850d9d870a84aa",
"url": "https://api.github.com/repos/symfony/dependency-injection/zipball/954ff7c61879479b2f57f427798f9c82555438a6",
"reference": "954ff7c61879479b2f57f427798f9c82555438a6",
"shasum": ""
},
"require": {
@@ -2240,20 +2254,20 @@
],
"description": "Symfony DependencyInjection Component",
"homepage": "https://symfony.com",
"time": "2017-01-10T14:27:01+00:00"
"time": "2018-01-03T07:36:31+00:00"
},
{
"name": "symfony/dom-crawler",
"version": "v2.8.16",
"version": "v2.8.33",
"source": {
"type": "git",
"url": "https://github.com/symfony/dom-crawler.git",
"reference": "52cc211afa9458c0a54c478010a55f44892c1c02"
"reference": "31ff8f1d7a3de4b43b35ff821e6e223d81a8988b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/52cc211afa9458c0a54c478010a55f44892c1c02",
"reference": "52cc211afa9458c0a54c478010a55f44892c1c02",
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/31ff8f1d7a3de4b43b35ff821e6e223d81a8988b",
"reference": "31ff8f1d7a3de4b43b35ff821e6e223d81a8988b",
"shasum": ""
},
"require": {
@@ -2296,20 +2310,20 @@
],
"description": "Symfony DomCrawler Component",
"homepage": "https://symfony.com",
"time": "2017-01-02T20:30:24+00:00"
"time": "2018-01-03T07:36:31+00:00"
},
{
"name": "symfony/event-dispatcher",
"version": "v2.8.16",
"version": "v2.8.33",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
"reference": "74877977f90fb9c3e46378d5764217c55f32df34"
"reference": "d64be24fc1eba62f9daace8a8918f797fc8e87cc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/74877977f90fb9c3e46378d5764217c55f32df34",
"reference": "74877977f90fb9c3e46378d5764217c55f32df34",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/d64be24fc1eba62f9daace8a8918f797fc8e87cc",
"reference": "d64be24fc1eba62f9daace8a8918f797fc8e87cc",
"shasum": ""
},
"require": {
@@ -2317,7 +2331,7 @@
},
"require-dev": {
"psr/log": "~1.0",
"symfony/config": "~2.0,>=2.0.5|~3.0.0",
"symfony/config": "^2.0.5|~3.0.0",
"symfony/dependency-injection": "~2.6|~3.0.0",
"symfony/expression-language": "~2.6|~3.0.0",
"symfony/stopwatch": "~2.3|~3.0.0"
@@ -2356,20 +2370,20 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
"time": "2017-01-02T20:30:24+00:00"
"time": "2018-01-03T07:36:31+00:00"
},
{
"name": "symfony/filesystem",
"version": "v2.8.16",
"version": "v2.8.33",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
"reference": "5b77d49ab76e5b12743b359ef4b4a712e6f5360d"
"reference": "1f4e8351e0196562f5e8ec584baeceeb8e2e92f6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/filesystem/zipball/5b77d49ab76e5b12743b359ef4b4a712e6f5360d",
"reference": "5b77d49ab76e5b12743b359ef4b4a712e6f5360d",
"url": "https://api.github.com/repos/symfony/filesystem/zipball/1f4e8351e0196562f5e8ec584baeceeb8e2e92f6",
"reference": "1f4e8351e0196562f5e8ec584baeceeb8e2e92f6",
"shasum": ""
},
"require": {
@@ -2405,20 +2419,20 @@
],
"description": "Symfony Filesystem Component",
"homepage": "https://symfony.com",
"time": "2017-01-08T20:43:03+00:00"
"time": "2018-01-03T07:36:31+00:00"
},
{
"name": "symfony/polyfill-apcu",
"version": "v1.3.0",
"version": "v1.6.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-apcu.git",
"reference": "5d4474f447403c3348e37b70acc2b95475b7befa"
"reference": "04f62674339602def515bff4bc6901fc1d4951e8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-apcu/zipball/5d4474f447403c3348e37b70acc2b95475b7befa",
"reference": "5d4474f447403c3348e37b70acc2b95475b7befa",
"url": "https://api.github.com/repos/symfony/polyfill-apcu/zipball/04f62674339602def515bff4bc6901fc1d4951e8",
"reference": "04f62674339602def515bff4bc6901fc1d4951e8",
"shasum": ""
},
"require": {
@@ -2427,10 +2441,13 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.3-dev"
"dev-master": "1.6-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Apcu\\": ""
},
"files": [
"bootstrap.php"
]
@@ -2458,20 +2475,20 @@
"portable",
"shim"
],
"time": "2016-11-14T01:06:16+00:00"
"time": "2017-10-11T12:05:26+00:00"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.3.0",
"version": "v1.6.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "e79d363049d1c2128f133a2667e4f4190904f7f4"
"reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/e79d363049d1c2128f133a2667e4f4190904f7f4",
"reference": "e79d363049d1c2128f133a2667e4f4190904f7f4",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296",
"reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296",
"shasum": ""
},
"require": {
@@ -2483,7 +2500,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.3-dev"
"dev-master": "1.6-dev"
}
},
"autoload": {
@@ -2517,20 +2534,20 @@
"portable",
"shim"
],
"time": "2016-11-14T01:06:16+00:00"
"time": "2017-10-11T12:05:26+00:00"
},
{
"name": "symfony/process",
"version": "v2.8.16",
"version": "v2.8.33",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
"reference": "ebb3c2abe0940a703f08e0cbe373f62d97d40231"
"reference": "ea3226daa3c6789efa39570bfc6e5d55f7561a0a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/ebb3c2abe0940a703f08e0cbe373f62d97d40231",
"reference": "ebb3c2abe0940a703f08e0cbe373f62d97d40231",
"url": "https://api.github.com/repos/symfony/process/zipball/ea3226daa3c6789efa39570bfc6e5d55f7561a0a",
"reference": "ea3226daa3c6789efa39570bfc6e5d55f7561a0a",
"shasum": ""
},
"require": {
@@ -2566,20 +2583,20 @@
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
"time": "2017-01-02T20:30:24+00:00"
"time": "2018-01-03T07:36:31+00:00"
},
{
"name": "symfony/translation",
"version": "v2.8.16",
"version": "v2.8.33",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation.git",
"reference": "b4ac4a393f6970cc157fba17be537380de396a86"
"reference": "a1623f94ec61090fded29ade24e14ce4f4e5878b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/translation/zipball/b4ac4a393f6970cc157fba17be537380de396a86",
"reference": "b4ac4a393f6970cc157fba17be537380de396a86",
"url": "https://api.github.com/repos/symfony/translation/zipball/a1623f94ec61090fded29ade24e14ce4f4e5878b",
"reference": "a1623f94ec61090fded29ade24e14ce4f4e5878b",
"shasum": ""
},
"require": {
@@ -2592,7 +2609,7 @@
"require-dev": {
"psr/log": "~1.0",
"symfony/config": "~2.8",
"symfony/intl": "~2.4|~3.0.0",
"symfony/intl": "~2.7.25|^2.8.18|~3.2.5",
"symfony/yaml": "~2.2|~3.0.0"
},
"suggest": {
@@ -2630,20 +2647,20 @@
],
"description": "Symfony Translation Component",
"homepage": "https://symfony.com",
"time": "2017-01-02T20:30:24+00:00"
"time": "2018-01-03T07:36:31+00:00"
},
{
"name": "symfony/yaml",
"version": "v2.8.16",
"version": "v2.8.33",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "dbe61fed9cd4a44c5b1d14e5e7b1a8640cfb2bf2"
"reference": "be720fcfae4614df204190d57795351059946a77"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/dbe61fed9cd4a44c5b1d14e5e7b1a8640cfb2bf2",
"reference": "dbe61fed9cd4a44c5b1d14e5e7b1a8640cfb2bf2",
"url": "https://api.github.com/repos/symfony/yaml/zipball/be720fcfae4614df204190d57795351059946a77",
"reference": "be720fcfae4614df204190d57795351059946a77",
"shasum": ""
},
"require": {
@@ -2679,7 +2696,7 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
"time": "2017-01-03T13:49:52+00:00"
"time": "2018-01-03T07:36:31+00:00"
}
],
"aliases": [],
+2 -6
View File
@@ -1524,9 +1524,7 @@ class core_course_external extends external_api {
break;
case 'visible':
if (has_capability('moodle/category:manage', $context)
or has_capability('moodle/category:viewhiddencategories',
context_system::instance())) {
if (has_capability('moodle/category:viewhiddencategories', $context)) {
$value = clean_param($crit['value'], PARAM_INT);
} else {
throw new moodle_exception('criteriaerror',
@@ -1637,9 +1635,7 @@ class core_course_external extends external_api {
if (!isset($excludedcats[$category->id])) {
// Final check to see if the category is visible to the user.
if ($category->visible
or has_capability('moodle/category:viewhiddencategories', context_system::instance())
or has_capability('moodle/category:manage', $context)) {
if ($category->visible or has_capability('moodle/category:viewhiddencategories', $context)) {
$categoryinfo = array();
$categoryinfo['id'] = $category->id;
+4 -3
View File
@@ -201,6 +201,7 @@ class core_course_externallib_testcase extends externallib_advanced_testcase {
// Set the required capabilities by the external function.
$context = context_system::instance();
$roleid = $this->assignUserCapability('moodle/category:manage', $context->id);
$this->assignUserCapability('moodle/category:viewhiddencategories', $context->id, $roleid);
// Retrieve category1 + sub-categories except not visible ones
$categories = core_course_external::get_categories(array(
@@ -259,10 +260,10 @@ class core_course_externallib_testcase extends externallib_advanced_testcase {
$this->assertEquals($DB->count_records('course_categories'), count($categories));
$this->unassignUserCapability('moodle/category:manage', $context->id, $roleid);
$this->unassignUserCapability('moodle/category:viewhiddencategories', $context->id, $roleid);
// Ensure maxdepthcategory is 2 and retrieve all categories without category:manage capability. It should retrieve all
// visible categories as well.
// Ensure maxdepthcategory is 2 and retrieve all categories without category:viewhiddencategories capability.
// It should retrieve all visible categories as well.
set_config('maxcategorydepth', 2);
$categories = core_course_external::get_categories();
+37 -28
View File
@@ -32,6 +32,7 @@
// comment out when debugging or better look into error log!
define('NO_DEBUG_DISPLAY', true);
// @codingStandardsIgnoreLine This script does not require login.
require("../../config.php");
require_once("lib.php");
require_once($CFG->libdir.'/eventslib.php');
@@ -42,9 +43,16 @@ require_once($CFG->libdir . '/filelib.php');
// the custom handler just logs exceptions and stops.
set_exception_handler('enrol_paypal_ipn_exception_handler');
// Make sure we are enabled in the first place.
if (!enrol_is_enabled('paypal')) {
http_response_code(503);
throw new moodle_exception('errdisabled', 'enrol_paypal');
}
/// Keep out casual intruders
if (empty($_POST) or !empty($_GET)) {
print_error("Sorry, you can not use the script that way.");
http_response_code(400);
throw new moodle_exception('invalidrequest', 'core_error');
}
/// Read all the data from PayPal and get it ready for later;
@@ -57,11 +65,27 @@ $req = 'cmd=_notify-validate';
$data = new stdClass();
foreach ($_POST as $key => $value) {
if ($key !== clean_param($key, PARAM_ALPHANUMEXT)) {
throw new moodle_exception('invalidrequest', 'core_error', '', null, $key);
}
if (is_array($value)) {
throw new moodle_exception('invalidrequest', 'core_error', '', null, 'Unexpected array param: '.$key);
}
$req .= "&$key=".urlencode($value);
$data->$key = fix_utf8($value);
}
if (empty($data->custom)) {
throw new moodle_exception('invalidrequest', 'core_error', '', null, 'Missing request param: custom');
}
$custom = explode('-', $data->custom);
unset($data->custom);
if (empty($custom) || count($custom) < 3) {
throw new moodle_exception('invalidrequest', 'core_error', '', null, 'Invalid value of the request param: custom');
}
$data->userid = (int)$custom[0];
$data->courseid = (int)$custom[1];
$data->instanceid = (int)$custom[2];
@@ -69,29 +93,11 @@ $data->payment_gross = $data->mc_gross;
$data->payment_currency = $data->mc_currency;
$data->timeupdated = time();
$user = $DB->get_record("user", array("id" => $data->userid), "*", MUST_EXIST);
$course = $DB->get_record("course", array("id" => $data->courseid), "*", MUST_EXIST);
$context = context_course::instance($course->id, MUST_EXIST);
/// get the user and course records
if (! $user = $DB->get_record("user", array("id"=>$data->userid))) {
message_paypal_error_to_admin("Not a valid user id", $data);
die;
}
if (! $course = $DB->get_record("course", array("id"=>$data->courseid))) {
message_paypal_error_to_admin("Not a valid course id", $data);
die;
}
if (! $context = context_course::instance($course->id, IGNORE_MISSING)) {
message_paypal_error_to_admin("Not a valid context id", $data);
die;
}
if (! $plugin_instance = $DB->get_record("enrol", array("id"=>$data->instanceid, "status"=>0))) {
message_paypal_error_to_admin("Not a valid instance id", $data);
die;
}
$plugin_instance = $DB->get_record("enrol", array("id" => $data->instanceid, "enrol" => "paypal", "status" => 0), "*", MUST_EXIST);
$plugin = enrol_get_plugin('paypal');
/// Open a connection back to PayPal to validate the data
@@ -106,10 +112,9 @@ $options = array(
$location = "https://$paypaladdr/cgi-bin/webscr";
$result = $c->post($location, $req, $options);
if (!$result) { /// Could not connect to PayPal - FAIL
echo "<p>Error: could not access paypal.com</p>";
message_paypal_error_to_admin("Could not access paypal.com to verify payment", $data);
die;
if ($c->get_errno()) {
throw new moodle_exception('errpaypalconnect', 'enrol_paypal', '', array('url' => $paypaladdr, 'result' => $result),
json_encode($data));
}
/// Connection is OK, so now we post the data to validate it
@@ -304,7 +309,7 @@ if (strlen($result) > 0) {
} else if (strcmp ($result, "INVALID") == 0) { // ERROR
$DB->insert_record("enrol_paypal", $data, false);
message_paypal_error_to_admin("Received an invalid payment notification!! (Fake payment?)", $data);
throw new moodle_exception('erripninvalid', 'enrol_paypal', '', null, json_encode($data));
}
}
@@ -354,5 +359,9 @@ function enrol_paypal_ipn_exception_handler($ex) {
}
error_log($logerrmsg);
if (http_response_code() == 200) {
http_response_code(500);
}
exit(0);
}
+3
View File
@@ -39,6 +39,9 @@ $string['enrolperiod_desc'] = 'Default length of time that the enrolment is vali
$string['enrolperiod_help'] = 'Length of time that the enrolment is valid, starting with the moment the user is enrolled. If disabled, the enrolment duration will be unlimited.';
$string['enrolstartdate'] = 'Start date';
$string['enrolstartdate_help'] = 'If enabled, users can be enrolled from this date onward only.';
$string['errdisabled'] = 'PayPal plugin is disabled and does not handle payment notifications.';
$string['erripninvalid'] = 'Instant payment notification has not been verified by PayPal.';
$string['errpaypalconnect'] = 'Could not connect to {$a->url} to verify the instant payment notification: {$a->result}';
$string['expiredaction'] = 'Enrolment expiration action';
$string['expiredaction_help'] = 'Select action to carry out when user enrolment expires. Please note that some user data and settings are purged from course during course unenrolment.';
$string['mailadmins'] = 'Notify admin';
+1 -6
View File
@@ -38,7 +38,6 @@ if (!empty($CFG->defaulthomepage) && ($CFG->defaulthomepage == HOMEPAGE_MY) && o
$urlparams['redirect'] = 0;
}
$PAGE->set_url('/', $urlparams);
$PAGE->set_course($SITE);
$PAGE->set_pagelayout('frontpage');
$PAGE->set_other_editing_capability('moodle/course:update');
$PAGE->set_other_editing_capability('moodle/course:manageactivities');
@@ -47,11 +46,7 @@ $PAGE->set_other_editing_capability('moodle/course:activityvisibility');
// Prevent caching of this page to stop confusion when changing page after making AJAX changes.
$PAGE->set_cacheable(false);
if ($CFG->forcelogin) {
require_login();
} else {
user_accesstime_log();
}
require_course_login($SITE);
$hassiteconfig = has_capability('moodle/site:config', context_system::instance());
+3
View File
@@ -38,3 +38,6 @@ $string['clitypevalue'] = 'Tiepe waarde';
$string['clitypevaluedefault'] = 'Tiepe waarde, druk Enter om die standaard waarde te gebruik ({$a})';
$string['cliunknowoption'] = 'Ontkende opsies: {$ a} Gebruik asseblief - help opsie.';
$string['cliyesnoprompt'] = 'Tik y (beteken ja) of n (beteken nee)';
$string['environmentrequireinstall'] = 'moet geïnstalleer en geaktiveer wees';
$string['environmentrequireversion'] = 'weergawe {$a->needed} word benodig en jy het tans {$a->current}';
$string['upgradekeyset'] = 'Opgradering sleutel (los skoon om nie te stel nie)';
+45
View File
@@ -0,0 +1,45 @@
<?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/>.
/**
* Automatically generated strings for Moodle installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['clianswerno'] = 'n';
$string['cliansweryes'] = 's';
$string['cliincorrectvalueerror'] = 'Error, valor incorrecta "{$a->value}" pa "{$a->option}"';
$string['cliincorrectvalueretry'] = 'Valor incorrecta, per favor, intente de nuevo';
$string['clitypevalue'] = 'valor d\'o tipo';
$string['clitypevaluedefault'] = 'valor d\'o tipo, prete Enter pa utilizar la valor per defecto ({$a})';
$string['cliunknowoption'] = 'Opcions no reconoixidas:
{$a}
Per favor, utilice la opción Aduya.';
$string['cliyesnoprompt'] = 'escriba s (pa sí) u n (pa no)';
$string['environmentrequireinstall'] = 'ha d\'estar instalau/activau';
$string['environmentrequireversion'] = 'versión {$a->needed} ye obligatoria y ye executando {$a->current}';
$string['upgradekeyset'] = 'Clau d\'actualización (deixar en blanco pa no establir-la)';
+51
View File
@@ -0,0 +1,51 @@
<?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/>.
/**
* Automatically generated strings for Moodle installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['cannotcreatedboninstall'] = '<p> No se puede creyar la base de datos. </p><p> La base de datos especificada no existe y l\'usuario indicau no tiene permiso pa creyar la base de datos. </p><p> L\'administrador d\'o puesto ha de comprebar la configuración de base de datos. </p>';
$string['cannotcreatelangdir'] = 'No se puede creyar lo directorio d\'idioma.';
$string['cannotcreatetempdir'] = 'No se puede creyar lo directorio temp.';
$string['cannotdownloadcomponents'] = 'No se puede descargar components';
$string['cannotdownloadzipfile'] = 'No se puede descargar lo fichero ZIP';
$string['cannotfindcomponent'] = 'No se puede trobar lo component.';
$string['cannotsavemd5file'] = 'No se puede alzar lo fichero md5';
$string['cannotsavezipfile'] = 'No se puede alzar lo fichero ZIP';
$string['cannotunzipfile'] = 'No se puede descomprimir lo fichero';
$string['componentisuptodate'] = 'Lo component ye actualizau';
$string['dmlexceptiononinstall'] = '<p>S\'ha produciu una error de base de datos [{$a->errorcode}].<br />{$a->debuginfo}</p>';
$string['downloadedfilecheckfailed'] = 'Ha fallau la comprebación d\'o fichero descargau';
$string['invalidmd5'] = 'La variable de verificación MD5 ye incorrecta no ye valida - tracte nuevament';
$string['missingrequiredfield'] = 'Falta bell campo necesario';
$string['remotedownloaderror'] = '<p>Falló la descarga d\'o component a lo suyo servidor. Se recomienda verificar los achustes d\'o proxy, extensión PHP cURL.</p>
<p>Ha de descargar lo <a href="{$a->url}">{$a->url}</a> fichero manualment, copiar-lo en "{$a->dest}" en o suyo servidor y descomprimir-lo allí.</p>';
$string['wrongdestpath'] = 'Rota de destín erronia.';
$string['wrongsourcebase'] = 'Base de fuent d\'URL erronia.';
$string['wrongzipfilename'] = 'Nombre de fichero ZIP erronio.';
+95
View File
@@ -0,0 +1,95 @@
<?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/>.
/**
* Automatically generated strings for Moodle installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['admindirname'] = 'Directorio Admin';
$string['availablelangs'] = 'Packs d\'idiomas disponibles';
$string['chooselanguagehead'] = 'Triar idioma';
$string['chooselanguagesub'] = 'Per favor, tríe un idioma pa lo proceso d\'instalación. Este idioma s\'usará tamién como idioma per defecto d\'o puesto, si bien puede cambiar-se mas abance.';
$string['clialreadyconfigured'] = 'Lo fichero de configuración config.php ya existe. Per favor, faga servir admin/cli/install_database.php pa instalar Moodle en este puesto.';
$string['clialreadyinstalled'] = 'Lo fichero de configuración config.php ya existe. Per favor, faga servir admin/cli/install_database.php pa actualizar Moodle en este puesto.';
$string['cliinstallheader'] = 'Programa d\'instalación Moodle de linia de comando {$a}';
$string['databasehost'] = 'Servidor d\'a base de datos';
$string['databasename'] = 'Nombre d\'a base de datos';
$string['databasetypehead'] = 'Tríe lo controlador d\'a base de datos';
$string['dataroot'] = 'Directorio de Datos';
$string['datarootpermission'] = 'Permiso directorios de datos';
$string['dbprefix'] = 'Prefixo de tablas';
$string['dirroot'] = 'Directorio de Moodle';
$string['environmenthead'] = 'Comprebando lo suyo entorno';
$string['environmentsub2'] = 'Cada versión de Moodle tiene bell requisito minimo d\'a versión de PHP y un numero obligatorio d\'extensions de PHP.
Una comprebación de l\'entorno completo se realiza antes de cada instalación y actualización. Per favor, se meta en contacto con l\'administrador d\'o servidor si no sabes cómo instalar la nueva versión u habilitar las extensions PHP.';
$string['errorsinenvironment'] = 'La comprebación de l\'entorno fallo!';
$string['installation'] = 'Instalación';
$string['langdownloaderror'] = 'L\'idioma "{$a}" no podió estar descargau. Lo proceso d\'instalación continará en Anglés.';
$string['memorylimithelp'] = '<p>Lo limite de memoria PHP en o suyo servidor ye actualment {$a}.</p>
<p>Esto puede ocasionar que Moodle tienga problemas de memoria mas abance, especialment si vusté tiene activaus muitos modulos y/u muitos usuarios.</p>
<p>Recomendamos que configure PHP con o limite mas alto posible, y.g. 40M.
I hai quantas formas de fer esto:</p>
<ol>
<li>Si puede fer-lo, recompile PHP con <i>--enable-memory-limit</i>.
Esto fa que Moodle fixe per ell mesmo lo limite de memoria.</li>
<li>Si tiene acceso a lo fichero php.ini, puede cambiar l\'achuste <b>memory_limit</b>
a, digamos, 40M. Si no lo tiene, pida a lo suyo administrador que lo faiga per vusté.</li>
<li>En qualques servidors PHP vusté puede creyar en o directorio Moodle un fichero .htaccess que contienga esta linia:
<p><blockquote>php_value memory_limit 40M</blockquote></p>
<p>Manimenos, en qualques servidors esto fa que <b>totas</b> las pachinas PHP deixen de funcionar (podrá veyer las errors quan mire las pachinas) de traza que habrá d\'eliminar lo fichero .htaccess.</p></li>
</ol>';
$string['paths'] = 'Rotas';
$string['pathserrcreatedataroot'] = 'Lo directorio d\'os datos ({$a->dataroot}) no puede estar creyau per l\'instalador.';
$string['pathshead'] = 'Confirme las rotas';
$string['pathsrodataroot'] = 'Lo directorio dataroot no tiene permisos d\'escritura.';
$string['pathsroparentdataroot'] = 'Lo directorio pai ({$a->parent}) no tiene permisos d\'escritura. Lo directorio d\'os datos ({$a->dataroot}) no puede estar creyau per l\'instalador.';
$string['pathssubadmindir'] = 'Muit pocos servidors web usan /admin como un URL especial pa acceder a un panel de control u bella cosa semellant. Lamentablement, esto dentra en conflicto con a ubicación estandard pa las pachinas d\'administración de Moodle. Vusté puede solucionar este problema, renombrando lo directorio admin en a suya instalación Moodle, metendo un nuevo nombre aquí. Per eixemplo: <em> moodleadmin </em>. Esto solucionará los vinclos d\'administración en instalación Moodle.';
$string['pathssubdataroot'] = 'Necesita bell espacio an que Moodle puede alzar los fichers puyaus. En este directorio ha de poder LEYER y ESCRIBIR l\'usuario d\'o servidor web (per lo cheneral \'nobody\', \'apache\' u \'www-data\'), pero no ha de poder-se acceder a esta carpeta dreitament a traviés d\'a web. L\'instalador tractará de creyar-la si no existe.';
$string['pathssubdirroot'] = '<p>Rota completa d\'o directorio que contiene lo codigo de Moodle.</p>';
$string['pathssubwwwroot'] = 'Adreza web completa pa acceder a Moodle. No ye posible acceder a Moodle utilizando multiples adrezas. Si lo suyo puesto tiene quantas adrezas publicas ha de configurar redireccions permanents en totas ellas, fueras d\'en2 esta. Si lo suyo puesto web ye accesible tanto dende una intranet como dende Internet, escriba aquí l\'adreza publica y configure la suya DNS pa que los usuarios d\'o suyo intranet puedan tamién utilizar l\'adreza publica.';
$string['pathsunsecuredataroot'] = 'La ubicación de dataroot no ye segura';
$string['pathswrongadmindir'] = 'Lo directorio admin no existe';
$string['phpextension'] = 'Extensión PHP {$a}';
$string['phpversion'] = 'Versión PHP';
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
$string['welcomep20'] = 'Si ye veyendo esta pachina ye perque ha puesto executar lo paquet <strong>{$a->packname} {$a->packversion}</strong> en o suyo ordinador. Parabiens!';
$string['welcomep30'] = 'Esta versión de <strong>{$a->installername}</strong> incluye las
aplicacions necesarias pa que <strong>Moodle</strong> funcione en o suyo ordinador,
principalment:';
$string['welcomep40'] = 'Lo paquet tamién incluye <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong>.';
$string['welcomep50'] = 'L\'uso de totas las aplicacions d\'o paquet ye gubernau per las suyas respectivas
licencias. Lo programa <strong>{$a->installername}</strong> ye
<a href="http://www.opensource.org/docs/definition_plain.html">codigo ubierto</a> y se distribuye
baixo licencia <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a>.';
$string['welcomep60'] = 'Las siguients pachinas le guiarán a traviés de qualques sencillos pasos pa configurar
y achustar <strong>Moodle</strong> en o suyo ordinador. Puede utilizar las valors per defecto sucherius u,
de forma opcional, modificar-los pa que s\'achusten a las suyas necesidatz.';
$string['welcomep70'] = 'Prete en o botón "Siguient" pa continar con a configuración de <strong>Moodle</strong>.';
$string['wwwroot'] = 'Adreza Web';
+37
View File
@@ -0,0 +1,37 @@
<?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/>.
/**
* Automatically generated strings for Moodle installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['language'] = 'Idioma';
$string['moodlelogo'] = 'Logo de Moodle';
$string['next'] = 'Siguient';
$string['previous'] = 'Anterior';
$string['reload'] = 'Recargar';
+1 -1
View File
@@ -33,7 +33,7 @@ defined('MOODLE_INTERNAL') || die();
$string['clianswerno'] = 'No';
$string['cliansweryes'] = 'Sí';
$string['cliincorrectvalueerror'] = 'Error, valor incorrecte "{$a->value}" per a "{$a->option}"';
$string['cliincorrectvalueretry'] = 'Valor incorrecte, si us plau, torneu-ho a provar.';
$string['cliincorrectvalueretry'] = 'Valor incorrecte; torneu-ho a provar.';
$string['clitypevalue'] = 'Valor de tipus';
$string['clitypevaluedefault'] = 'valor de tipus, premeu la tecla de retorn (<em>Enter</em>) per fer servir un valor per defecte ({$a})';
$string['cliunknowoption'] = 'Opcions invàlides:
+4 -4
View File
@@ -52,15 +52,15 @@ $string['installation'] = 'Instal·lació';
$string['langdownloaderror'] = 'Dissortadament l\'idioma "{$a}" no es pot baixar. La instal·lació prosseguirà en anglès.';
$string['memorylimithelp'] = '<p>El límit de memòria del PHP del vostre servidor actualment està definit en {$a}.</p>
<p>Això pot causar que Moodle tingui problemes de memòria més endavant, especialment si teniu molts mòduls habilitats i/o molts usuaris.</p>
<p>Això pot causar que Moodle tingui problemes de memòria més endavant, especialment, si teniu molts mòduls habilitats i/o molts usuaris.</p>
<p>És recomanable que configureu el PHP amb un límit superior, com ara 40 MB, sempre que sigui possible. Hi ha diverses maneres de fer això:</p>
<ol>
<li>Si podeu, recompileu el PHP amb <i>--enable-memory-limit</i>. Això permetrà que Moodle defineixi el límit de memòria per si mateix.</li>
<li>Si teniu accés al fitxer php.ini, podeu canviar el paràmetre <b>memory_limit</b> a 40 MB. Si no hi teniu accés podeu demanar al vostre administrador que ho faci ell.</li>
<li>En alguns servidors PHP podeu crear un fitxer .htaccess dins del directori de Moodle amb aquesta línia:
<li>Si teniu accés al fitxer php.ini, podeu canviar el paràmetre <b>memory_limit</b> a 40 MB. Si no hi teniu accés, podeu demanar al vostre administrador que us ho faci.</li>
<li>En alguns servidors PHP podeu crear un fitxer .htaccess dins el directori de Moodle amb aquesta línia:
<p><blockquote>php_value memory_limit 40M</blockquote></p>
<p>Tanmateix, en alguns servidors això farà que no funcioni <b>cap</b> pàgina PHP (es visualitzaran errors) en el qual cas hauríeu de suprimir el fitxer .htaccess.</p></li>
<p>Tanmateix, en alguns servidors això farà que no funcioni <b>cap</b> pàgina PHP (es visualitzaran errors); en aquest cas, hauríeu de suprimir el fitxer .htaccess.</p></li>
</ol>';
$string['paths'] = 'Camins';
$string['pathserrcreatedataroot'] = 'L\'instal·lador no pot crear el directori de dades ({$a->dataroot}).';
+35
View File
@@ -0,0 +1,35 @@
<?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/>.
/**
* Automatically generated strings for Moodle installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['parentlanguage'] = 'de';
$string['thisdirection'] = 'ltr';
$string['thislanguage'] = 'Deutsch - Schweiz';
+3
View File
@@ -30,6 +30,9 @@
defined('MOODLE_INTERNAL') || die();
$string['cannotcreatedboninstall'] = '<p>Αδυναμία δημιουργίας βάσης δεδομένων.</p>
<p>Η βάση δεδομένων που προσδιορίστηκε δεν υπάρχει και ο χρήστης που δόθηκε δεν έχει δικαίωμα να δημιουργήσει την βάση δεδομένων.</p>
<p>Ο διαχειριστής του ιστοτόπου πρέπει να επαληθεύσει την ρύθμιση της βάσης δεδομένων.</p>';
$string['cannotcreatelangdir'] = 'Δε δημιουργήθηκε φάκελος γλώσσας.';
$string['cannotcreatetempdir'] = 'Δε δημιουργήθηκε φάκελος temp.';
$string['cannotdownloadcomponents'] = 'Δεν κατέβηκαν τα τμήματα.';
+1 -1
View File
@@ -31,7 +31,7 @@
defined('MOODLE_INTERNAL') || die();
$string['admindirname'] = 'Directorio Admin';
$string['availablelangs'] = 'Packs de idiomas disponibles';
$string['availablelangs'] = 'Paquetes de idiomas disponibles';
$string['chooselanguagehead'] = 'Seleccionar idioma';
$string['chooselanguagesub'] = 'Por favor, seleccione un idioma para el proceso de instalación. Este idioma se usará también como idioma por defecto del sitio, si bien puede cambiarse más adelante.';
$string['clialreadyconfigured'] = 'El archivo de configuración config.php ya existe. Por favor, utilice admin/cli/install_database.php para instalar Moodle en este sitio.';
+1
View File
@@ -30,5 +30,6 @@
defined('MOODLE_INTERNAL') || die();
$string['parentlanguage'] = '';
$string['thisdirection'] = 'ltr';
$string['thislanguage'] = 'Euskara';
+1
View File
@@ -32,3 +32,4 @@ defined('MOODLE_INTERNAL') || die();
$string['language'] = 'Tungumál';
$string['next'] = 'Næsta';
$string['previous'] = 'Undanfarna';
+2 -5
View File
@@ -59,11 +59,8 @@ $string['pathsroparentdataroot'] = 'A felettes könyvtár ({$a->parent}) nem ír
$string['pathssubadmindir'] = 'Egy pár webes gazdagép esetén az /admin speciális URL pl. a vezérlőpanel eléréséhez. Ez ütközik a Moodle admin oldalainak standard helyével. Javítás: a telepítésben nevezze át a rendszergazda könyvtárát, az új nevet pedig írja be ide. Például: <em>moodleadmin</em>. Ezzel helyrehozhatók a Moodle rendszergazdai ugrópontjai.';
$string['pathssubdataroot'] = 'Szüksége van egy helyre, ahol a Moodle mentheti a feltöltött állományokat. Ez a könyvtár a webszerver felhasználója (általában \'nobody\' vagy \'apache\') számára legyen mind olvasható, MIND ÍRHATÓ. Ha nem létezik, a telepítő megpróbálja létrehozni.';
$string['pathssubdirroot'] = 'Teljes útvonal a Moodle telepítéséhez. ';
$string['pathssubwwwroot'] = 'A Moodle elérésére használandó teljes webcím. A Moodle egyszerre több
címről nem érhető el. Ha portálja több címet használ, a jelen cím kivételével az összeshez állandó
átirányítást kell beállítania. Ha portálja mind intranetről, mind az internetről elérhető, a nyilvános
címet itt adja meg, a DNS-t pedig úgy állítsa be, hogy az intranetről a
nyilvános cím is elérhető legyen. Ha a cím hibás, módosítsa böngészőjében az URL-t, hogy a telepítés egy másik értékkel induljon újra.';
$string['pathssubwwwroot'] = 'A Moodle elérésére használandó teljes webcím. A Moodle egyszerre több címről nem érhető el. Ha portálja több címet használ, a jelen cím kivételével az összeshez állandó
átirányítást kell beállítania. Ha portálja mind intranetről, mind az internetről elérhető, a nyilvános címet itt adja meg, a DNS-t pedig úgy állítsa be, hogy az intranetről a nyilvános cím is elérhető legyen. Ha a cím hibás, módosítsa böngészőjében a webcímet, hogy a telepítés egy másik értékkel induljon újra.';
$string['pathsunsecuredataroot'] = 'Az adatok gyökérkönyvtára nem biztonságos.';
$string['pathswrongadmindir'] = 'Nem létezik az admin könyvtár.';
$string['phpextension'] = '{$a} PHP-bővítmény';
+1
View File
@@ -31,6 +31,7 @@
defined('MOODLE_INTERNAL') || die();
$string['language'] = 'Bahasa';
$string['moodlelogo'] = 'Logo Moodle';
$string['next'] = 'Selanjutnya';
$string['previous'] = 'Sebelumnya';
$string['reload'] = 'Muat ulang';
+2 -2
View File
@@ -36,8 +36,8 @@ $string['cannotcreatetempdir'] = 'Não é possível criar a pasta de ficheiros t
$string['cannotdownloadcomponents'] = 'Não é possível descarregar os componentes.';
$string['cannotdownloadzipfile'] = 'Não é possível descarregar o ficheiro ZIP.';
$string['cannotfindcomponent'] = 'Não é possível encontrar o componente';
$string['cannotsavemd5file'] = 'Não é possível gravar o ficheiro md5';
$string['cannotsavezipfile'] = 'Não é possível gravar o ficheiro ZIP';
$string['cannotsavemd5file'] = 'Não é possível guardar o ficheiro md5';
$string['cannotsavezipfile'] = 'Não é possível guardar o ficheiro ZIP';
$string['cannotunzipfile'] = 'Não é possível descompactar o ficheiro ZIP';
$string['componentisuptodate'] = 'O componente está atualizado.';
$string['dmlexceptiononinstall'] = '<p>Ocorreu um erro de base de dados [{$a->errorcode}].<br />{$a->debuginfo}</p>';
+3 -3
View File
@@ -37,9 +37,9 @@ $string['chooselanguagesub'] = 'Por favor, escolha o idioma para a instalação.
$string['clialreadyconfigured'] = 'Arquivo config.php já existe. Por favor, use admin/cli/install_database.php para instalar o Moodle neste site.';
$string['clialreadyinstalled'] = 'Arquivo config.php já existe. Por favor use admin/cli/install_database.php para atualizar o Moodle neste site.';
$string['cliinstallheader'] = 'Programa de instalação por linha de comando do Moodle {$a}';
$string['databasehost'] = 'Host da base de dados';
$string['databasename'] = 'Nome da base de dados';
$string['databasetypehead'] = 'Escolha o driver da base de dados';
$string['databasehost'] = 'Host do banco de dados';
$string['databasename'] = 'Nome do banco de dados';
$string['databasetypehead'] = 'Escolha o driver do banco de dados';
$string['dataroot'] = 'Diretório de dados';
$string['datarootpermission'] = 'Permissões nos diretórios de dados';
$string['dbprefix'] = 'Prefixo das tabelas';
+8 -4
View File
@@ -34,15 +34,18 @@ $string['admindirname'] = 'Adresár pre správu (admin)';
$string['availablelangs'] = 'Dostupné jazykové balíčky';
$string['chooselanguagehead'] = 'Vyberte jazyk';
$string['chooselanguagesub'] = 'Zvoľte si jazyk pre inštaláciu. Tento jazyk bude tiež použitý ako východzí jazyk portálu, ale môže byť neskôr zmenený.';
$string['clialreadyinstalled'] = 'Súbor config.php už existuje. Použite admin/cli/upgrade.php ak chcete aktualizovať váš portál.';
$string['clialreadyconfigured'] = 'Konfiguračný súbor config.php už existuje. Spusťte admin/cli/install_database.php, ak chcete inštalovať Moodle pre tento portál.';
$string['clialreadyinstalled'] = 'Súbor config.php už existuje. Použite admin/cli/install_database.php ak chcete aktualizovať váš portál.';
$string['cliinstallheader'] = 'Moodle {$a} inštalačný program z príkazového riadku';
$string['databasehost'] = 'Databázový server';
$string['databasename'] = 'Názov databázy';
$string['databasetypehead'] = 'Vyberte ovládač pre databázu';
$string['dataroot'] = 'Adresár pre údaje';
$string['datarootpermission'] = 'Prístupové práva k údajovému adresáru';
$string['dbprefix'] = 'Predpona tabuliek';
$string['dirroot'] = 'Adresár Moodle';
$string['environmenthead'] = 'Kontrola programového prostredia...';
$string['environmentsub2'] = 'Každé vydanie Moodle vyžaduje určitú minimálnu verziu PHP a niekoľko povinných rozšírení PHP. Plná kontrola prostredia sa vykonáva pred každou inštaláciou a aktualizáciou. Prosím, kontaktujte správcu servera, ak neviete, ako nainštalovať novú verziu, alebo povoliť rozšírenia PHP.';
$string['errorsinenvironment'] = 'Kontrola programového prostredia zlyhala!';
$string['installation'] = 'Inštalácia';
$string['langdownloaderror'] = 'Bohužiaľ, jazyk "{$a}" sa nepodarilo nainštalovať. Inštalácia bude pokračovať v angličtine.';
@@ -62,8 +65,9 @@ $string['pathserrcreatedataroot'] = 'Inštalátor nemôže vytvoriť dátový ad
$string['pathshead'] = 'Vytvoriť cesty';
$string['pathsrodataroot'] = 'Kmeňový adresár nie je zapisovateľný';
$string['pathsroparentdataroot'] = 'Nadriadený adresár ({$a->parent}) nie je zapisovateľný. Inštalátor nemôže vytvoriť dátový adresár ({$a->dataroot}). ';
$string['pathssubdataroot'] = 'Potrebujete adresár, kam Moodle bude ukladať nahrané súbory. Adresár by mal povoliť čítanie a zapisovanie údajov používateľom web serveru, ale nesmie byť prístupný priamo cez web rozhranie. Pokiaľ ešte neexistuje, inštalácia sa pokúsi o jeho vytvorenie. ';
$string['pathssubdirroot'] = 'Plná cesta adresára moodle inštalácie';
$string['pathssubdataroot'] = '<p>Potrebujete adresár, kam Moodle bude ukladať nahrané súbory.</p>
<p>Adresár by mal povoliť čítanie a zapisovanie údajov používateľom web serveru (webový server býva väčšinou spustený pod používateľom "www-data" alebo "apache"), ale nesmie byť prístupný priamo cez web rozhranie. Pokiaľ ešte neexistuje, inštalácia sa pokúsi o jeho vytvorenie. </p>';
$string['pathssubdirroot'] = '<p>Absolútna cesta adresára Moodle inštalácie.</p>';
$string['pathsunsecuredataroot'] = 'Umiestnenie dátového adresára nie je bezpečné';
$string['pathswrongadmindir'] = 'Administrátorský adresár neexistuje';
$string['phpextension'] = 'Rozšírenie PHP {$a}';
@@ -73,7 +77,7 @@ $string['phpversionhelp'] = '<p>Moodle si vyžaduje verziu PHP aspoň 4.3.0 ale
<p>Musíte aktualizovať PHP alebo sa presunúť na hostiteľský počítač s novšou verziou PHP!<br />(V prípade 5.0.X môžete tiež prejsť na verziu 4.4.x)</p>';
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
$string['welcomep20'] = 'Podarilo so vám úspešne nainštalovať a spustiť balíček <strong>{$a->packname} {$a->packversion}</strong>. Gratulujeme!';
$string['welcomep30'] = '<strong>{$a->installername}</strong> obsahuje aplikáciu k vytvoreniu prostredia, v ktorom bude prevádzkovaný váš <strong>Moodle</strong>. Menovite sa jedná o:';
$string['welcomep30'] = 'Táto verzia <strong>{$a->installername}</strong> obsahuje aplikáciu k vytvoreniu prostredia, v ktorom bude prevádzkovaný váš <strong>Moodle</strong>. Menovite sa jedná o:';
$string['welcomep40'] = 'Balíček tiež obsahuje <strong>Moodle vo verzii {$a->moodlerelease} ({$a->moodleversion})</strong>.';
$string['welcomep50'] = 'Použitie všetkých aplikácií v tomto balíčku je viazané ich príslušnými licenciami. Kompletný balíček <strong>{$a->installername}</strong> je software s <a href="http://www.opensource.org/docs/definition_plain.html"> otvoreným kódom (open source)</a> a je šírený pod licenciou <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a>.';
$string['welcomep60'] = 'Nasledujúce stránky vás povedú v nekoľkých jednoduchých krokoch nastavením <strong>Moodle</strong> na vašom počítači. Môžete prijať východzie nastavenie, alebo si ich upraviť podľa svojich potrieb.';
+1
View File
@@ -42,3 +42,4 @@ $string['cliunknowoption'] = 'Unrecognised ఎంపికలు:
$string['cliyesnoprompt'] = 'y (అంటే ఔనని) గానీ, n (అంటే వద్దని) గానీ నొక్కండి';
$string['environmentrequireinstall'] = 'స్థాపించి, చేతనం చెయ్యడం తప్పనిసరి';
$string['environmentrequireversion'] = '{$a->needed} వెర్షను తప్పనిసరి. మీరేమో {$a->current} వెర్షను వాడుతున్నారు';
$string['upgradekeyset'] = 'అప్గ్రేడ్ కీ (ఇది సెట్ చేయకుండా ఖాళీగా వదలండి)';
+1
View File
@@ -31,6 +31,7 @@
defined('MOODLE_INTERNAL') || die();
$string['language'] = 'భాష';
$string['moodlelogo'] = 'మూడ్లె లోగో';
$string['next'] = 'తరువాతి';
$string['previous'] = 'గత';
$string['reload'] = 'మళ్ళీ లోడు చెయ్యి';
+1
View File
@@ -31,6 +31,7 @@
defined('MOODLE_INTERNAL') || die();
$string['language'] = 'Забон';
$string['moodlelogo'] = 'Логотипи Moodle';
$string['next'] = 'Давомаш';
$string['previous'] = 'Ба ақиб';
$string['reload'] = 'Навсозӣ карда шавад';
+10
View File
@@ -30,5 +30,15 @@
defined('MOODLE_INTERNAL') || die();
$string['clianswerno'] = 'n';
$string['cliansweryes'] = 'y';
$string['cliincorrectvalueerror'] = 'Error, maling halagang "{$a->value}" para sa "{$a->option}"';
$string['cliincorrectvalueretry'] = 'Maling halaga, ulitin po';
$string['clitypevalue'] = 'iteklado ang halaga';
$string['clitypevaluedefault'] = 'iteklado ang halaga, pindutin ang Enter para magamit ang default na halaga ({$a})';
$string['cliunknowoption'] = 'Di-kilalang opsiyon:
{$a}
Gamit po ang --help na opsiyon';
$string['cliyesnoprompt'] = 'iteklado ang y (ibig sabihin ay yes/oo) o n (ibig sabihin ay no/hindi)';
$string['environmentrequireinstall'] = 'ay kinakailangang maluklok/mabuhay';
$string['environmentrequireversion'] = 'ang bersiyon {$a->needed} ay kinakailangan at ang pinatatakbo mo ay {$a->current}';
+2
View File
@@ -31,5 +31,7 @@
defined('MOODLE_INTERNAL') || die();
$string['language'] = 'Wikà';
$string['moodlelogo'] = 'Logo ng Moodle';
$string['next'] = 'Susunod';
$string['previous'] = 'Nakaraan';
$string['reload'] = 'I-reload';
+33
View File
@@ -0,0 +1,33 @@
<?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/>.
/**
* Automatically generated strings for Moodle installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['thislanguage'] = 'Uyghur - latin';
+34
View File
@@ -0,0 +1,34 @@
<?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/>.
/**
* Automatically generated strings for Moodle installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['clianswerno'] = 'ن';
$string['cliansweryes'] = 'ي';
+34
View File
@@ -0,0 +1,34 @@
<?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/>.
/**
* Automatically generated strings for Moodle installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['thisdirection'] = 'rtl';
$string['thislanguage'] = 'ئۇيغۇرچە';
+48 -17
View File
@@ -25,29 +25,37 @@
defined('MOODLE_INTERNAL') || die();
global $CFG;
require_once("{$CFG->libdir}/filelib.php");
require_once("{$CFG->dirroot}/iplookup/lib.php");
/**
* GeoIp data file parsing test.
*/
class core_iplookup_geoip_testcase extends advanced_testcase {
public function setUp() {
global $CFG;
require_once("$CFG->libdir/filelib.php");
require_once("$CFG->dirroot/iplookup/lib.php");
if (!PHPUNIT_LONGTEST) {
// this may take a long time
// These tests are intensive and required downloads.
$this->markTestSkipped('PHPUNIT_LONGTEST is not defined');
}
$this->resetAfterTest();
}
// let's store the file somewhere
/**
* Setup the GeoIP2File system.
*/
public function setup_geoip2file() {
global $CFG;
// Store the file somewhere where it won't be wiped out..
$gzfile = "$CFG->dataroot/phpunit/geoip/GeoLiteCity.dat.gz";
check_dir_exists(dirname($gzfile));
if (file_exists($gzfile) and (filemtime($gzfile) < time() - 60*60*24*30)) {
// delete file if older than 1 month
// Delete file if older than 1 month.
unlink($gzfile);
}
@@ -72,17 +80,40 @@ class core_iplookup_geoip_testcase extends advanced_testcase {
$CFG->geoipfile = $geoipfile;
}
public function test_ipv4() {
/**
* Test the format of data returned in the iplookup_find_location function.
*
* @dataProvider ip_provider
* @param string $ip The IP to test
*/
public function test_ip($ip) {
$this->setup_geoip2file();
$result = iplookup_find_location('192.30.255.112');
// Note: The results we get from the iplookup tests are beyond our control.
// We used to check a specific IP to a known location, but these have become less reliable and change too
// frequently to be used for testing.
$this->assertEquals('array', gettype($result));
$this->assertEquals('San Francisco', $result['city']);
$this->assertEquals(-122.3933, $result['longitude'], 'Coordinates are out of accepted tolerance', 0.01);
$this->assertEquals(37.7697, $result['latitude'], 'Coordinates are out of accepted tolerance', 0.01);
$result = iplookup_find_location($ip);
$this->assertInternalType('array', $result);
$this->assertInternalType('float', $result['latitude']);
$this->assertInternalType('float', $result['longitude']);
$this->assertInternalType('string', $result['city']);
$this->assertInternalType('string', $result['country']);
$this->assertInternalType('array', $result['title']);
$this->assertInternalType('string', $result['title'][0]);
$this->assertInternalType('string', $result['title'][1]);
$this->assertNull($result['error']);
$this->assertEquals('array', gettype($result['title']));
$this->assertEquals('San Francisco', $result['title'][0]);
$this->assertEquals('United States', $result['title'][1]);
}
/**
* Data provider for IP lookup test.
*
* @return array
*/
public function ip_provider() {
return [
'IPv4: github.com' => ['192.30.255.112'],
];
}
}
+2 -2
View File
@@ -288,8 +288,8 @@ $string['configproxypassword'] = 'Password needed to access internet through pro
$string['configproxyport'] = 'If this server needs to use a proxy computer, then provide the proxy port here.';
$string['configproxytype'] = 'Type of web proxy (PHP5 and cURL extension required for SOCKS5 support).';
$string['configproxyuser'] = 'Username needed to access internet through proxy if required, empty if none (PHP cURL extension required).';
$string['configrecaptchaprivatekey'] = 'String of characters (private key) used to communicate between your Moodle server and the recaptcha server. ReCAPTCHA keys can be obtained from <a target="_blank" href="https://www.google.com/recaptcha">Google reCAPTCHA</a>.';
$string['configrecaptchapublickey'] = 'String of characters (public key) used to display the reCAPTCHA element in the signup form. ReCAPTCHA keys can be obtained from <a target="_blank" href="https://www.google.com/recaptcha">Google reCAPTCHA</a>.';
$string['configrecaptchaprivatekey'] = 'String of characters (secret key) used to communicate between your Moodle server and the recaptcha server. ReCAPTCHA keys can be obtained from <a target="_blank" href="https://www.google.com/recaptcha">Google reCAPTCHA</a>.';
$string['configrecaptchapublickey'] = 'String of characters (site key) used to display the reCAPTCHA element in the signup form. ReCAPTCHA keys can be obtained from <a target="_blank" href="https://www.google.com/recaptcha">Google reCAPTCHA</a>.';
$string['configrequestcategoryselection'] = 'Allow the selection of a category when requesting a course.';
$string['configrequestedstudentname'] = 'Word for student used in requested courses';
$string['configrequestedstudentsname'] = 'Word for students used in requested courses';
+3 -2
View File
@@ -95,6 +95,7 @@ $string['forgottenpasswordurl'] = 'Forgotten password URL';
$string['getanaudiocaptcha'] = 'Get an audio CAPTCHA';
$string['getanimagecaptcha'] = 'Get an image CAPTCHA';
$string['getanothercaptcha'] = 'Get another CAPTCHA';
$string['getrecaptchaapi'] = 'To use reCAPTCHA you must get an API key from <a href=\'https://www.google.com/recaptcha/admin\'>https://www.google.com/recaptcha/admin</a>';
$string['guestloginbutton'] = 'Guest login button';
$string['changepassword'] = 'Change password URL';
$string['changepasswordhelp'] = 'URL of lost password recovery page, which will be sent to users in an email. Note that this setting will have no effect if a forgotten password URL is set in the authentication common settings.';
@@ -131,9 +132,9 @@ $string['pluginnotenabled'] = 'Authentication plugin \'{$a}\' is not enabled.';
$string['pluginnotinstalled'] = 'Authentication plugin \'{$a}\' is not installed.';
$string['potentialidps'] = 'Log in using your account on:';
$string['recaptcha'] = 'reCAPTCHA';
$string['recaptcha_help'] = 'The CAPTCHA is for preventing abuse from automated programs. Simply enter the words in the box, in order and separated by a space.
$string['recaptcha_help'] = 'The CAPTCHA is for preventing abuse from automated programs. Follow the instructions to verify you are a person. This could be a box to check, characters presented in an image you must enter or a set of images to select from.
If you are not sure what the words are, you can try getting another CAPTCHA or an audio CAPTCHA.';
If you are not sure what the images are, you can try getting another CAPTCHA or an audio CAPTCHA.';
$string['recaptcha_link'] = 'auth/email';
$string['security_question'] = 'Security question';
$string['selfregistration'] = 'Self registration';
+1 -1
View File
@@ -1143,7 +1143,7 @@ $string['missinglastname'] = 'Missing surname';
$string['missingname'] = 'Missing name';
$string['missingnewpassword'] = 'Missing new password';
$string['missingpassword'] = 'Missing password';
$string['missingrecaptchachallengefield'] = 'Missing reCAPTCHA challenge field';
$string['missingrecaptchachallengefield'] = 'Failed reCAPTCHA challenge, try again.';
$string['missingreqreason'] = 'Missing reason';
$string['missingshortname'] = 'Missing short name';
$string['missingshortsitename'] = 'Missing short site name';
+1 -1
View File
File diff suppressed because one or more lines are too long
+5
View File
@@ -63,6 +63,11 @@ define(['jquery', 'core/ajax', 'core/templates', 'core/notification', 'core/str'
// Set cell 'time modified' to 'now' when any of the element is updated in this row.
$('body').on('updated', '[data-inplaceeditable]', function(e) {
str.get_string('selecttag', 'core_tag', e.ajaxreturn.value)
.then(function(s) {
return $('label[for="tagselect' + e.ajaxreturn.itemid + '"]').html(s);
})
.fail(notification.exception);
str.get_string('now').done(function(s) {
$(e.target).closest('tr').find('td.col-timemodified').html(s);
});
+6
View File
@@ -1148,6 +1148,12 @@ function badges_download($userid) {
* @return string Code of backpack accessibility status.
*/
function badges_check_backpack_accessibility() {
if (defined('BEHAT_SITE_RUNNING') && BEHAT_SITE_RUNNING) {
// For behat sites, do not poll the remote badge site.
// Behat sites should not be available, but we should pretend as though they are.
return 'available';
}
global $CFG;
include_once $CFG->libdir . '/filelib.php';
+16 -62
View File
@@ -42,9 +42,6 @@ class MoodleQuickForm_recaptcha extends HTML_QuickForm_input {
/** @var string html for help button, if empty then no help */
var $_helpbutton='';
/** @var bool if true, recaptcha will be servered from https */
var $_https=false;
/**
* constructor
*
@@ -54,14 +51,8 @@ class MoodleQuickForm_recaptcha extends HTML_QuickForm_input {
* or an associative array
*/
public function __construct($elementName = null, $elementLabel = null, $attributes = null) {
global $CFG;
parent::__construct($elementName, $elementLabel, $attributes);
$this->_type = 'recaptcha';
if (is_https()) {
$this->_https = true;
} else {
$this->_https = false;
}
}
/**
@@ -75,49 +66,15 @@ class MoodleQuickForm_recaptcha extends HTML_QuickForm_input {
}
/**
* Returns the recaptcha element in HTML
* Returns the reCAPTCHA element in HTML
*
* @return string
* @return string The HTML to render
*/
function toHtml() {
global $CFG, $PAGE;
require_once $CFG->libdir . '/recaptchalib.php';
public function toHtml() {
global $CFG;
require_once($CFG->libdir . '/recaptchalib_v2.php');
$recaptureoptions = Array('theme'=>'custom', 'custom_theme_widget'=>'recaptcha_widget');
$html = html_writer::script(js_writer::set_variable('RecaptchaOptions', $recaptureoptions));
$attributes = $this->getAttributes();
if (empty($attributes['error_message'])) {
$attributes['error_message'] = null;
$this->setAttributes($attributes);
}
$error = $attributes['error_message'];
unset($attributes['error_message']);
$strincorrectpleasetryagain = get_string('incorrectpleasetryagain', 'auth');
$strenterthewordsabove = get_string('enterthewordsabove', 'auth');
$strenterthenumbersyouhear = get_string('enterthenumbersyouhear', 'auth');
$strgetanothercaptcha = get_string('getanothercaptcha', 'auth');
$strgetanaudiocaptcha = get_string('getanaudiocaptcha', 'auth');
$strgetanimagecaptcha = get_string('getanimagecaptcha', 'auth');
$html .= '
<div id="recaptcha_widget" style="display:none">
<div id="recaptcha_image"></div>
<div class="recaptcha_only_if_incorrect_sol" style="color:red">' . $strincorrectpleasetryagain . '</div>
<span class="recaptcha_only_if_image"><label for="recaptcha_response_field">' . $strenterthewordsabove . '</label></span>
<span class="recaptcha_only_if_audio"><label for="recaptcha_response_field">' . $strenterthenumbersyouhear . '</label></span>
<input type="text" id="recaptcha_response_field" name="recaptcha_response_field" />
<input type="hidden" name="recaptcha_element" value="dummyvalue" /> <!-- Dummy value to fool formslib -->
<div><a href="javascript:Recaptcha.reload()">' . $strgetanothercaptcha . '</a></div>
<div class="recaptcha_only_if_image"><a href="javascript:Recaptcha.switch_type(\'audio\')">' . $strgetanaudiocaptcha . '</a></div>
<div class="recaptcha_only_if_audio"><a href="javascript:Recaptcha.switch_type(\'image\')">' . $strgetanimagecaptcha . '</a></div>
</div>';
return $html . recaptcha_get_html($CFG->recaptchapublickey, $error, $this->_https);
return recaptcha_get_challenge_html(RECAPTCHA_API_URL, $CFG->recaptchapublickey);
}
/**
@@ -130,25 +87,22 @@ class MoodleQuickForm_recaptcha extends HTML_QuickForm_input {
}
/**
* Checks input and challenged field
* Checks recaptcha response with Google.
*
* @param string $challenge_field recaptcha shown to user
* @param string $response_field input value by user
* @param string $responsestr
* @return bool
*/
function verify($challenge_field, $response_field) {
public function verify($responsestr) {
global $CFG;
require_once $CFG->libdir . '/recaptchalib.php';
$response = recaptcha_check_answer($CFG->recaptchaprivatekey,
getremoteaddr(),
$challenge_field,
$response_field,
$this->_https);
if (!$response->is_valid) {
require_once($CFG->libdir . '/recaptchalib_v2.php');
$response = recaptcha_check_response(RECAPTCHA_VERIFY_URL, $CFG->recaptchaprivatekey,
getremoteaddr(), $responsestr);
if (!$response['isvalid']) {
$attributes = $this->getAttributes();
$attributes['error_message'] = $response->error;
$attributes['error_message'] = $response['error'];
$this->setAttributes($attributes);
return $response->error;
return $response['error'];
}
return true;
}
+4
View File
@@ -2962,6 +2962,10 @@ function require_course_login($courseorid, $autologinguest = true, $cm = null, $
// Always login for hidden activities.
require_login($courseorid, $autologinguest, $cm, $setwantsurltome, $preventredirect);
} else if (isloggedin() && !isguestuser()) {
// User is already logged in. Make sure the login is complete (user is fully setup, policies agreed).
require_login($courseorid, $autologinguest, $cm, $setwantsurltome, $preventredirect);
} else if ($issite) {
// Login for SITE not required.
// We still need to instatiate PAGE vars properly so that things that rely on it like navigation function correctly.
+3 -3
View File
@@ -117,9 +117,9 @@ class portfolio_exporter {
* @param portfolio_caller_base $caller portfolio caller (passed by reference)
* @param string $callercomponent the name of the callercomponent
*/
public function __construct(&$instance, &$caller, $callercomponent) {
$this->instance =& $instance;
$this->caller =& $caller;
public function __construct($instance, portfolio_caller_base $caller, $callercomponent) {
$this->instance = $instance;
$this->caller = $caller;
if ($instance) {
$this->instancefile = 'portfolio/' . $instance->get('plugin') . '/lib.php';
$this->instance->set('exporter', $this);
+5 -2
View File
@@ -1357,8 +1357,11 @@ function portfolio_include_callback_file($component, $class = null) {
throw new portfolio_button_exception('nocallbackfile', 'portfolio', '', $component);
}
if (!is_null($class) && !class_exists($class)) {
throw new portfolio_button_exception('nocallbackclass', 'portfolio', '', $class);
if (!is_null($class)) {
// If class is specified, check it exists and extends portfolio_caller_base.
if (!class_exists($class) || !is_subclass_of($class, 'portfolio_caller_base')) {
throw new portfolio_button_exception('nocallbackclass', 'portfolio', '', $class);
}
}
}
+189
View File
@@ -0,0 +1,189 @@
<?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/>.
// 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/>.
/**
* This is a PHP library that handles calling reCAPTCHA v2.
*
* - Documentation
* {@link https://developers.google.com/recaptcha/docs/display}
* - Get a reCAPTCHA API Key
* {@link https://www.google.com/recaptcha/admin}
* - Discussion group
* {@link http://groups.google.com/group/recaptcha}
*
* @package core
* @copyright 2018 Jeff Webster
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
* The reCAPTCHA URL's
*/
define('RECAPTCHA_API_URL', 'https://www.google.com/recaptcha/api.js');
define('RECAPTCHA_VERIFY_URL', 'https://www.google.com/recaptcha/api/siteverify');
/**
* Returns the language code the reCAPTCHA element should use.
* Google reCAPTCHA uses different language codes than Moodle so we must convert.
* https://developers.google.com/recaptcha/docs/language
*
* @return string A language code
*/
function recaptcha_lang() {
$mlang = current_language();
$glang = $mlang;
switch ($glang) {
case 'en':
$glang = 'en-GB';
break;
case 'en_us':
$glang = 'en';
break;
case 'zh_cn':
$glang = 'zh-CN';
break;
case 'zh_tw':
$glang = 'zh-TW';
break;
case 'fr_ca':
$glang = 'fr-CA';
break;
case 'pt_br':
$glang = 'pt-BR';
break;
case 'he':
$glang = 'iw';
break;
}
// For any language code that didn't change reduce down to the base language.
if (($mlang === $glang) and (strpos($mlang, '_') !== false)) {
list($glang, $trash) = explode('_', $mlang, 2);
}
return $glang;
}
/**
* Gets the challenge HTML
* This is called from the browser, and the resulting reCAPTCHA HTML widget
* is embedded within the HTML form it was called from.
*
* @param string $apiurl URL for reCAPTCHA API
* @param string $pubkey The public key for reCAPTCHA
* @return string - The HTML to be embedded in the user's form.
*/
function recaptcha_get_challenge_html($apiurl, $pubkey) {
global $CFG, $PAGE;
// To use reCAPTCHA you must have an API key.
if ($pubkey === null || $pubkey === '') {
return get_string('getrecaptchaapi', 'auth');
}
$jscode = "
var recaptchacallback = function() {
grecaptcha.render('recaptcha_element', {
'sitekey' : '$pubkey'
});
}";
$lang = recaptcha_lang();
$apicode = "\n<script type=\"text/javascript\" ";
$apicode .= "src=\"$apiurl?onload=recaptchacallback&render=explicit&hl=$lang\" async defer>";
$apicode .= "</script>\n";
$return = html_writer::script($jscode, '');
$return .= html_writer::div('', 'recaptcha_element', array('id' => 'recaptcha_element'));
$return .= $apicode;
return $return;
}
/**
* Calls an HTTP POST function to verify if the user's response was correct
*
* @param string $verifyurl URL for reCAPTCHA verification
* @param string $privkey The private key for reCAPTCHA
* @param string $remoteip The user's IP
* @param string $response The response from reCAPTCHA
* @return ReCaptchaResponse
*/
function recaptcha_check_response($verifyurl, $privkey, $remoteip, $response) {
global $CFG;
require_once($CFG->libdir.'/filelib.php');
// Check response - isvalid boolean, error string.
$checkresponse = array('isvalid' => false, 'error' => 'check-not-started');
// To use reCAPTCHA you must have an API key.
if ($privkey === null || $privkey === '') {
$checkresponse['isvalid'] = false;
$checkresponse['error'] = 'no-apikey';
return $checkresponse;
}
// For security reasons, you must pass the remote ip to reCAPTCHA.
if ($remoteip === null || $remoteip === '') {
$checkresponse['isvalid'] = false;
$checkresponse['error'] = 'no-remoteip';
return $checkresponse;
}
// Discard spam submissions.
if ($response === null || strlen($response) === 0) {
$checkresponse['isvalid'] = false;
$checkresponse['error'] = 'incorrect-captcha-sol';
return $checkresponse;
}
$params = array('secret' => $privkey, 'remoteip' => $remoteip, 'response' => $response);
$curl = new curl();
$curlresponse = $curl->post($verifyurl, $params);
if ($curl->get_errno() === 0) {
$curldata = json_decode($curlresponse);
if (isset($curldata->success) && $curldata->success === true) {
$checkresponse['isvalid'] = true;
$checkresponse['error'] = '';
} else {
$checkresponse['isvalid'] = false;
$checkresponse['error'] = $curldata->{error-codes};
}
} else {
$checkresponse['isvalid'] = false;
$checkresponse['error'] = 'check-failed';
}
return $checkresponse;
}
+23 -4
View File
@@ -62,6 +62,21 @@ function profiling_is_saved($value = null) {
return $saved;
}
/**
* Whether PHP profiling is available.
*
* This check ensures that one of the available PHP Profiling extensions is available.
*
* @return bool
*/
function profiling_available() {
$hasextension = extension_loaded('tideways_xhprof');
$hasextension = $hasextension || extension_loaded('tideways');
$hasextension = $hasextension || extension_loaded('xhprof');
return $hasextension;
}
/**
* Start profiling observing all the configuration
*/
@@ -69,7 +84,7 @@ function profiling_start() {
global $CFG, $SESSION, $SCRIPT;
// If profiling isn't available, nothing to start
if (!extension_loaded('xhprof') && !extension_loaded('tideways')) {
if (!profiling_available()) {
return false;
}
@@ -146,7 +161,9 @@ function profiling_start() {
// Arrived here, the script is going to be profiled, let's do it
$ignore = array('call_user_func', 'call_user_func_array');
if (extension_loaded('tideways')) {
if (extension_loaded('tideways_xhprof')) {
tideways_xhprof_enable(TIDEWAYS_XHPROF_FLAGS_CPU + TIDEWAYS_XHPROF_FLAGS_MEMORY);
} else if (extension_loaded('tideways')) {
tideways_enable(TIDEWAYS_FLAGS_CPU + TIDEWAYS_FLAGS_MEMORY, array('ignored_functions' => $ignore));
} else {
xhprof_enable(XHPROF_FLAGS_CPU + XHPROF_FLAGS_MEMORY, array('ignored_functions' => $ignore));
@@ -164,7 +181,7 @@ function profiling_stop() {
global $CFG, $DB, $SCRIPT;
// If profiling isn't available, nothing to stop
if (!extension_loaded('xhprof') && !extension_loaded('tideways')) {
if (!profiling_available()) {
return false;
}
@@ -183,7 +200,9 @@ function profiling_stop() {
// Arrived here, profiling is running, stop and save everything
profiling_is_running(false);
if (extension_loaded('tideways')) {
if (extension_loaded('tideways_xhprof')) {
$data = tideways_xhprof_disable();
} else if (extension_loaded('tideways')) {
$data = tideways_disable();
} else {
$data = xhprof_disable();
+18 -13
View File
@@ -1,5 +1,4 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -119,7 +118,15 @@ class login_signup_form extends moodleform {
}
}
function validation($data, $files) {
/**
* Validate user supplied data on the signup form.
*
* @param array $data array of ("fieldname"=>value) of submitted data
* @param array $files array of uploaded files "element_name"=>tmp_file_path
* @return array of "element_name"=>"error_description" if there are errors,
* or an empty array if everything is OK (true allowed for backwards compatibility too).
*/
public function validation($data, $files) {
global $CFG, $DB;
$errors = parent::validation($data, $files);
@@ -128,7 +135,7 @@ class login_signup_form extends moodleform {
if ($DB->record_exists('user', array('username'=>$data['username'], 'mnethostid'=>$CFG->mnet_localhost_id))) {
$errors['username'] = get_string('usernameexists');
} else {
//check allowed characters
// Check allowed characters.
if ($data['username'] !== core_text::strtolower($data['username'])) {
$errors['username'] = get_string('usernamelowercase');
} else {
@@ -139,8 +146,8 @@ class login_signup_form extends moodleform {
}
}
//check if user exists in external db
//TODO: maybe we should check all enabled plugins instead
// Check if user exists in external db.
// TODO: maybe we should check all enabled plugins instead.
if ($authplugin->user_exists($data['username'])) {
$errors['username'] = get_string('usernameexists');
}
@@ -171,15 +178,14 @@ class login_signup_form extends moodleform {
}
if ($this->signup_captcha_enabled()) {
$recaptcha_element = $this->_form->getElement('recaptcha_element');
if (!empty($this->_form->_submitValues['recaptcha_challenge_field'])) {
$challenge_field = $this->_form->_submitValues['recaptcha_challenge_field'];
$response_field = $this->_form->_submitValues['recaptcha_response_field'];
if (true !== ($result = $recaptcha_element->verify($challenge_field, $response_field))) {
$errors['recaptcha'] = $result;
$recaptchaelement = $this->_form->getElement('recaptcha_element');
if (!empty($this->_form->_submitValues['g-recaptcha-response'])) {
$response = $this->_form->_submitValues['g-recaptcha-response'];
if (!$recaptchaelement->verify($response)) {
$errors['recaptcha_element'] = get_string('incorrectpleasetryagain', 'auth');
}
} else {
$errors['recaptcha'] = get_string('missingrecaptchachallengefield');
$errors['recaptcha_element'] = get_string('missingrecaptchachallengefield');
}
}
// Validate customisable profile fields. (profile_validation expects an object as the parameter with userid set)
@@ -188,7 +194,6 @@ class login_signup_form extends moodleform {
$errors += profile_validation($dataobject, $files);
return $errors;
}
/**
+18
View File
@@ -8225,6 +8225,7 @@ class assign_portfolio_caller extends portfolio_module_caller_base {
* @throws portfolio_caller_exception
*/
public function load_data() {
global $DB;
$context = context_module::instance($this->cmid);
@@ -8233,6 +8234,23 @@ class assign_portfolio_caller extends portfolio_module_caller_base {
throw new portfolio_caller_exception('invalidfileandsubmissionid', 'mod_assign');
}
$submission = $DB->get_record('assign_submission', array('id' => $this->sid));
} else {
$submissionid = $DB->get_field('files', 'itemid', array('id' => $this->fileid, 'contextid' => $context->id));
if ($submissionid) {
$submission = $DB->get_record('assign_submission', array('id' => $submissionid));
}
}
if (empty($submission)) {
throw new portfolio_caller_exception('filenotfound');
} else if ($submission->userid == 0) {
// This must be a group submission.
if (!groups_is_member($submission->groupid, $this->user->id)) {
throw new portfolio_caller_exception('filenotfound');
}
} else if ($this->user->id != $submission->userid) {
throw new portfolio_caller_exception('filenotfound');
}
// Export either an area of files or a single file (see function for more detail).
+254
View File
@@ -0,0 +1,254 @@
<?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/>.
/**
* Tests behaviour of the assign_portfolio_caller class.
*
* @package mod_assign
* @category test
* @copyright Brendan Cox <brendan.cox@totaralearning.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
global $CFG;
require_once($CFG->dirroot . '/mod/assign/locallib.php');
require_once($CFG->dirroot . '/mod/assign/tests/base_test.php');
require_once($CFG->dirroot . '/group/lib.php');
/**
* Class mod_assign_portfolio_caller_testcase
*
* Tests behaviour of the assign_portfolio_caller class.
*
* @copyright Brendan Cox <brendan.cox@totaralearning.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class mod_assign_portfolio_caller_testcase extends advanced_testcase {
/**
* Test an assignment file is loaded for a user who submitted it.
*/
public function test_user_submission_file_is_loaded() {
$this->resetAfterTest(true);
$user = $this->getDataGenerator()->create_user();
$course = $this->getDataGenerator()->create_course();
/* @var mod_assign_generator $assigngenerator */
$assigngenerator = $this->getDataGenerator()->get_plugin_generator('mod_assign');
$activityrecord = $assigngenerator->create_instance(array('course' => $course->id));
$cm = get_coursemodule_from_instance('assign', $activityrecord->id);
$context = context_module::instance($cm->id);
$assign = new testable_assign($context, $cm, $course);
$submission = $assign->get_user_submission($user->id, true);
$fs = get_file_storage();
$dummy = (object) array(
'contextid' => $context->id,
'component' => 'assignsubmission_file',
'filearea' => ASSIGNSUBMISSION_FILE_FILEAREA,
'itemid' => $submission->id,
'filepath' => '/',
'filename' => 'myassignmnent.pdf'
);
$file = $fs->create_file_from_string($dummy, 'Content of ' . $dummy->filename);
$caller = new assign_portfolio_caller(array('cmid' => $cm->id, 'fileid' => $file->get_id()));
$caller->set('user', $user);
$caller->load_data();
$this->assertEquals($file->get_contenthash(), $caller->get_sha1_file());
// This processes the file either by fileid or by other fields in the file table.
// We should get the same outcome with either approach.
$caller = new assign_portfolio_caller(
array(
'cmid' => $cm->id,
'sid' => $submission->id,
'area' => ASSIGNSUBMISSION_FILE_FILEAREA,
'component' => 'assignsubmission_file',
)
);
$caller->set('user', $user);
$caller->load_data();
$this->assertEquals($file->get_contenthash(), $caller->get_sha1_file());
}
/**
* Test an assignment file is not loaded for a user that did not submit it.
*/
public function test_different_user_submission_file_is_not_loaded() {
$this->resetAfterTest(true);
$user = $this->getDataGenerator()->create_user();
$course = $this->getDataGenerator()->create_course();
/* @var mod_assign_generator $assigngenerator */
$assigngenerator = $this->getDataGenerator()->get_plugin_generator('mod_assign');
$activityrecord = $assigngenerator->create_instance(array('course' => $course->id));
$cm = get_coursemodule_from_instance('assign', $activityrecord->id);
$context = context_module::instance($cm->id);
$assign = new testable_assign($context, $cm, $course);
$submission = $assign->get_user_submission($user->id, true);
$fs = get_file_storage();
$dummy = (object) array(
'contextid' => $context->id,
'component' => 'assignsubmission_file',
'filearea' => ASSIGNSUBMISSION_FILE_FILEAREA,
'itemid' => $submission->id,
'filepath' => '/',
'filename' => 'myassignmnent.pdf'
);
$file = $fs->create_file_from_string($dummy, 'Content of ' . $dummy->filename);
// Now add second user.
$wronguser = $this->getDataGenerator()->create_user();
$caller = new assign_portfolio_caller(array('cmid' => $cm->id, 'fileid' => $file->get_id()));
$caller->set('user', $wronguser);
$this->setExpectedException('portfolio_caller_exception', 'Sorry, the requested file could not be found');
$caller->load_data();
}
/**
* Test an assignment file is loaded for a user who is part of a group that submitted it.
*/
public function test_group_submission_file_is_loaded() {
$this->resetAfterTest(true);
$user = $this->getDataGenerator()->create_user();
$course = $this->getDataGenerator()->create_course();
$groupdata = new stdClass();
$groupdata->courseid = $course->id;
$groupdata->name = 'group1';
$groupid = groups_create_group($groupdata);
$this->getDataGenerator()->enrol_user($user->id, $course->id);
groups_add_member($groupid, $user);
/* @var mod_assign_generator $assigngenerator */
$assigngenerator = $this->getDataGenerator()->get_plugin_generator('mod_assign');
$activityrecord = $assigngenerator->create_instance(array('course' => $course->id));
$cm = get_coursemodule_from_instance('assign', $activityrecord->id);
$context = context_module::instance($cm->id);
$assign = new testable_assign($context, $cm, $course);
$submission = $assign->get_group_submission($user->id, $groupid, true);
$fs = get_file_storage();
$dummy = (object) array(
'contextid' => $context->id,
'component' => 'assignsubmission_file',
'filearea' => ASSIGNSUBMISSION_FILE_FILEAREA,
'itemid' => $submission->id,
'filepath' => '/',
'filename' => 'myassignmnent.pdf'
);
$file = $fs->create_file_from_string($dummy, 'Content of ' . $dummy->filename);
$caller = new assign_portfolio_caller(array('cmid' => $cm->id, 'fileid' => $file->get_id()));
$caller->set('user', $user);
$caller->load_data();
$this->assertEquals($file->get_contenthash(), $caller->get_sha1_file());
// This processes the file either by fileid or by other fields in the file table.
// We should get the same outcome with either approach.
$caller = new assign_portfolio_caller(
array(
'cmid' => $cm->id,
'sid' => $submission->id,
'area' => ASSIGNSUBMISSION_FILE_FILEAREA,
'component' => 'assignsubmission_file',
)
);
$caller->set('user', $user);
$caller->load_data();
$this->assertEquals($file->get_contenthash(), $caller->get_sha1_file());
}
/**
* Test an assignment file is not loaded for a user who is not part of a group that submitted it.
*/
public function test_different_group_submission_file_is_not_loaded() {
$this->resetAfterTest(true);
$user = $this->getDataGenerator()->create_user();
$course = $this->getDataGenerator()->create_course();
$groupdata = new stdClass();
$groupdata->courseid = $course->id;
$groupdata->name = 'group1';
$groupid = groups_create_group($groupdata);
$this->getDataGenerator()->enrol_user($user->id, $course->id);
groups_add_member($groupid, $user);
/* @var mod_assign_generator $assigngenerator */
$assigngenerator = $this->getDataGenerator()->get_plugin_generator('mod_assign');
$activityrecord = $assigngenerator->create_instance(array('course' => $course->id));
$cm = get_coursemodule_from_instance('assign', $activityrecord->id);
$context = context_module::instance($cm->id);
$assign = new testable_assign($context, $cm, $course);
$submission = $assign->get_group_submission($user->id, $groupid,true);
$fs = get_file_storage();
$dummy = (object) array(
'contextid' => $context->id,
'component' => 'assignsubmission_file',
'filearea' => ASSIGNSUBMISSION_FILE_FILEAREA,
'itemid' => $submission->id,
'filepath' => '/',
'filename' => 'myassignmnent.pdf'
);
$file = $fs->create_file_from_string($dummy, 'Content of ' . $dummy->filename);
// Now add second user.
$wronguser = $this->getDataGenerator()->create_user();
// Create a new group for the wrong user.
$groupdata = new stdClass();
$groupdata->courseid = $course->id;
$groupdata->name = 'group2';
$groupid = groups_create_group($groupdata);
$this->getDataGenerator()->enrol_user($wronguser->id, $course->id);
groups_add_member($groupid, $wronguser);
// In the negative test for the user, we loaded the caller via fileid. Switching to the other approach this time.
$caller = new assign_portfolio_caller(
array(
'cmid' => $cm->id,
'sid' => $submission->id,
'area' => ASSIGNSUBMISSION_FILE_FILEAREA,
'component' => 'assignsubmission_file',
)
);
$caller->set('user', $wronguser);
$this->setExpectedException('portfolio_caller_exception', 'Sorry, the requested file could not be found');
$caller->load_data();
}
}
+8 -11
View File
@@ -25,13 +25,13 @@ class feedback_item_captcha extends feedback_item_base {
$editurl = new moodle_url('/mod/feedback/edit.php', array('id'=>$cm->id));
//ther are no settings for recaptcha
// There are no settings for recaptcha.
if (isset($item->id) AND $item->id > 0) {
notice(get_string('there_are_no_settings_for_recaptcha', 'feedback'), $editurl->out());
exit;
}
//only one recaptcha can be in a feedback
// Only one recaptcha can be in a feedback.
$params = array('feedback' => $feedback->id, 'typ' => $this->type);
if ($DB->record_exists('feedback_item', $params)) {
notice(get_string('only_one_captcha_allowed', 'feedback'), $editurl->out());
@@ -39,7 +39,7 @@ class feedback_item_captcha extends feedback_item_base {
}
$this->item = $item;
$this->item_form = true; //dummy
$this->item_form = true; // Dummy.
$lastposition = $DB->count_records('feedback_item', array('feedback'=>$feedback->id));
@@ -139,16 +139,13 @@ class feedback_item_captcha extends feedback_item_base {
$form->add_validation_rule(function($values, $files) use ($item, $form) {
$elementname = $item->typ . '_' . $item->id . 'recaptcha';
$recaptchaelement = $form->get_form_element($elementname);
if (empty($values['recaptcha_response_field'])) {
if (empty($values['g-recaptcha-response'])) {
return array($elementname => get_string('required'));
} else if (!empty($values['recaptcha_challenge_field'])) {
$challengefield = $values['recaptcha_challenge_field'];
$responsefield = $values['recaptcha_response_field'];
if (true !== ($result = $recaptchaelement->verify($challengefield, $responsefield))) {
} else {
$response = $values['g-recaptcha-response'];
if (true !== ($result = $recaptchaelement->verify($response))) {
return array($elementname => $result);
}
} else {
return array($elementname => get_string('missingrecaptchachallengefield'));
}
return true;
});
@@ -163,7 +160,7 @@ class feedback_item_captcha extends feedback_item_base {
public function get_hasvalue() {
global $CFG;
//is recaptcha configured in moodle?
// Is recaptcha configured in moodle?
if (empty($CFG->recaptchaprivatekey) OR empty($CFG->recaptchapublickey)) {
return 0;
}
+6
View File
@@ -95,6 +95,12 @@ class forum_portfolio_caller extends portfolio_module_caller_base {
$fs = get_file_storage();
if ($this->post) {
if ($this->attachment) {
// Make sure the requested file belongs to this post.
$file = $fs->get_file_by_id($this->attachment);
if ($file->get_contextid() != $this->modcontext->id
|| $file->get_itemid() != $this->post->id) {
throw new portfolio_caller_exception('filenotfound');
}
$this->set_file_and_format_data($this->attachment);
} else {
$attach = $fs->get_area_files($this->modcontext->id, 'mod_forum', 'attachment', $this->post->id, 'timemodified', false);
+142
View File
@@ -0,0 +1,142 @@
<?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/>.
/**
* The portfolio forum tests.
*
* @package mod_forum
* @copyright 2018 onwards Totara Learning Solutions LTD {@link http://www.totaralms.com/}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @author Brendan Cox <brendan.cox@totaralearning.com>
*/
defined('MOODLE_INTERNAL') || die();
/**
* Class mod_forum_portfolio_caller_testcase
*
* Tests behaviour of the forum_portfolio_caller class.
*/
class mod_forum_portfolio_caller_testcase extends advanced_testcase {
/**
* Ensure that a file will be loaded in an instance of the caller when supplied valid and
* accessible post and attachment file ids.
*/
public function test_file_in_user_post_is_loaded() {
global $CFG;
require_once($CFG->dirroot . '/mod/forum/locallib.php');
$this->resetAfterTest(true);
$user = $this->getDataGenerator()->create_user();
$course = $this->getDataGenerator()->create_course();
$forum = $this->getDataGenerator()->create_module('forum', array('course' => $course->id));
$context = context_module::instance($forum->cmid);
/* @var mod_forum_generator $forumgenerator */
$forumgenerator = $this->getDataGenerator()->get_plugin_generator('mod_forum');
$discussion = $forumgenerator->create_discussion(
array(
'course' => $course->id,
'forum' => $forum->id,
'userid' => $user->id,
'attachment' => 1
)
);
$fs = get_file_storage();
$dummy = (object) array(
'contextid' => $context->id,
'component' => 'mod_forum',
'filearea' => 'attachment',
'itemid' => $discussion->firstpost,
'filepath' => '/',
'filename' => 'myassignmnent.pdf'
);
$firstpostfile = $fs->create_file_from_string($dummy, 'Content of ' . $dummy->filename);
$caller = new forum_portfolio_caller(array(
'postid' => $discussion->firstpost,
'attachment' => $firstpostfile->get_id()
));
$caller->load_data();
$this->assertEquals($caller->get_sha1_file(), $firstpostfile->get_contenthash());
}
/**
* Ensure that files will not be loaded if the supplied attachment id is for a file that is not attached to
* the supplied post id.
*/
public function test_file_not_in_user_post_not_loaded() {
global $CFG;
require_once($CFG->dirroot . '/mod/forum/locallib.php');
$this->resetAfterTest(true);
$user = $this->getDataGenerator()->create_user();
$course = $this->getDataGenerator()->create_course();
$forum = $this->getDataGenerator()->create_module('forum', array('course' => $course->id));
$context = context_module::instance($forum->cmid);
/* @var mod_forum_generator $forumgenerator */
$forumgenerator = $this->getDataGenerator()->get_plugin_generator('mod_forum');
$discussion = $forumgenerator->create_discussion(
array(
'course' => $course->id,
'forum' => $forum->id,
'userid' => $user->id,
'attachment' => 1
)
);
$fs = get_file_storage();
$dummyone = (object) array(
'contextid' => $context->id,
'component' => 'mod_forum',
'filearea' => 'attachment',
'itemid' => $discussion->firstpost,
'filepath' => '/',
'filename' => 'myassignmnent.pdf'
);
$firstpostfile = $fs->create_file_from_string($dummyone, 'Content of ' . $dummyone->filename);
// Create a second post and add a file there.
$secondpost = $forumgenerator->create_post(
array(
'discussion' => $discussion->id,
'userid' => $user->id,
'attachment' => 1
)
);
$dummytwo = (object) array(
'contextid' => $context->id,
'component' => 'mod_forum',
'filearea' => 'attachment',
'itemid' => $secondpost->id,
'filepath' => '/',
'filename' => 'myotherthing.pdf'
);
$secondpostfile = $fs->create_file_from_string($dummytwo, 'Content of ' . $dummytwo->filename);
$caller = new forum_portfolio_caller(array(
'postid' => $discussion->firstpost,
'attachment' => $secondpostfile->get_id()
));
$this->setExpectedException('portfolio_caller_exception', 'Sorry, the requested file could not be found');
$caller->load_data();
}
}
+2 -2
View File
@@ -726,8 +726,8 @@ class qformat_default {
// @@PLUGINFILE@@ with a real URL, but it doesn't matter what.
// We use http://example.com/.
$text = str_replace('@@PLUGINFILE@@/', 'http://example.com/', $question->questiontext);
return html_to_text(format_text($text,
$question->questiontextformat, $formatoptions), 0, false);
return s(html_to_text(format_text($text,
$question->questiontextformat, $formatoptions), 0, false));
}
/**
+2075 -726
View File
File diff suppressed because it is too large Load Diff
+3
View File
@@ -11,5 +11,8 @@
"grunt-contrib-uglify": "0.11.0",
"grunt-contrib-watch": "0.6.1",
"shifter": "0.5.0"
},
"engines": {
"node": ">=8.9 <9"
}
}
+2 -2
View File
@@ -938,8 +938,8 @@ class qformat_default {
* during import to let the user see roughly what is going on.
*/
protected function format_question_text($question) {
return question_utils::to_plain_text($question->questiontext,
$question->questiontextformat);
return s(question_utils::to_plain_text($question->questiontext,
$question->questiontextformat));
}
}
@@ -313,7 +313,7 @@ class question_dataset_dependent_items_form extends question_wizard_form {
// Decode equations in question text.
$qtext = $this->qtypeobj->substitute_variables(
$this->question->questiontext, $data);
$textequations = $this->qtypeobj->find_math_equations($qtext);
$textequations = $this->qtypeobj->find_formulas($qtext);
if ($textequations != '' && count($textequations) > 0 ) {
$mform->addElement('static', "divider1[{$j}]", '',
'Formulas {=..} in question text');
@@ -58,10 +58,8 @@ class qtype_calculated_edit_form extends qtype_numerical_edit_form {
if (isset($this->question->id)) {
// Remove prefix #{..}# if exists.
$this->initialname = $question->name;
$regs= array();
if (preg_match('~#\{([^[:space:]]*)#~', $question->name , $regs)) {
$question->name = str_replace($regs[0], '', $question->name);
};
$question->name = question_bank::get_qtype($this->qtype())
->clean_technical_prefix_from_question_name($question->name);
}
}
parent::__construct($submiturl, $question, $category, $contexts, $formeditable);
+8 -1
View File
@@ -28,6 +28,7 @@ defined('MOODLE_INTERNAL') || die();
require_once($CFG->dirroot . '/question/type/questionbase.php');
require_once($CFG->dirroot . '/question/type/numerical/question.php');
require_once($CFG->dirroot . '/question/type/calculated/questiontype.php');
/**
* Represents a calculated question.
@@ -423,7 +424,13 @@ class qtype_calculated_variable_substituter {
if ($error = qtype_calculated_find_formula_errors($expression)) {
throw new moodle_exception('illegalformulasyntax', 'qtype_calculated', '', $error);
}
return $this->calculate_raw($this->substitute_values_for_eval($expression));
$expression = $this->substitute_values_for_eval($expression);
if ($datasets = question_bank::get_qtype('calculated')->find_dataset_names($expression)) {
// Some placeholders were not substituted.
throw new moodle_exception('illegalformulasyntax', 'qtype_calculated', '',
'{' . reset($datasets) . '}');
}
return $this->calculate_raw($expression);
}
/**
+58 -24
View File
@@ -38,8 +38,20 @@ require_once($CFG->dirroot . '/question/type/numerical/question.php');
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_calculated extends question_type {
/** Regular expression that finds the formulas in content. */
const FORMULAS_IN_TEXT_REGEX = '~\{=([^{}]*(?:\{[^{}]+}[^{}]*)*)\}~';
/**
* @const string a placeholder is a letter, followed by almost any characters. (This should probably be restricted more.)
*/
const PLACEHOLDER_REGEX_PART = '[[:alpha:]][^>} <`{"\']*';
/**
* @const string REGEXP for a placeholder, wrapped in its {...} delimiters, with capturing brackets around the name.
*/
const PLACEHODLER_REGEX = '~\{([[:alpha:]][^>} <`{"\']*)\}~';
/**
* @const string Regular expression that finds the formulas in content, with capturing brackets to get the forumlas.
*/
const FORMULAS_IN_TEXT_REGEX = '~\{=([^{}]*(?:\{[[:alpha:]][^>} <`{"\']*\}[^{}]*)*)\}~';
const MAX_DATASET_ITEMS = 100;
@@ -486,6 +498,15 @@ class qtype_calculated extends question_type {
}
}
/**
* Remove prefix #{..}# if exists.
* @param $name a question name,
* @return string the cleaned up question name.
*/
public function clean_technical_prefix_from_question_name($name) {
return preg_replace('~#\{([^[:space:]]*)#~', '', $name);
}
/**
* This method prepare the $datasets in a format similar to dadatesetdefinitions_form.php
* so that they can be saved
@@ -553,11 +574,7 @@ class qtype_calculated extends question_type {
AND a.category != 0
AND b.question = ?
ORDER BY a.name ", array($question->id));
$questionname = $question->name;
$regs= array();
if (preg_match('~#\{([^[:space:]]*)#~', $questionname , $regs)) {
$questionname = str_replace($regs[0], '', $questionname);
};
$questionname = $this->clean_technical_prefix_from_question_name($question->name);
if (!empty($categorydatasetdefs)) {
// There is at least one with the same name.
@@ -1527,15 +1544,28 @@ class qtype_calculated extends question_type {
: '');
}
/**
* Find the names of all datasets mentioned in a piece of question content like the question text.
* @param $text the text to analyse.
* @return array with dataset name for both key and value.
*/
public function find_dataset_names($text) {
// Returns the possible dataset names found in the text as an array.
// The array has the dataset name for both key and value.
$datasetnames = array();
while (preg_match('~\\{([[:alpha:]][^>} <{"\']*)\\}~', $text, $regs)) {
$datasetnames[$regs[1]] = $regs[1];
$text = str_replace($regs[0], '', $text);
}
return $datasetnames;
preg_match_all(self::PLACEHODLER_REGEX, $text, $matches);
return array_combine($matches[1], $matches[1]);
}
/**
* Find all the formulas in a bit of text.
*
* For example, called with "What is {a} plus {b}? (Hint, it is not {={a}*{b}}.)" this
* returns ['{a}*{b}'].
*
* @param $text text to analyse.
* @return array where they keys an values are the formulas.
*/
public function find_formulas($text) {
preg_match_all(self::FORMULAS_IN_TEXT_REGEX, $text, $matches);
return array_combine($matches[1], $matches[1]);
}
/**
@@ -1908,13 +1938,17 @@ function qtype_calculated_calculate_answer($formula, $individualdata,
* @return string|boolean false if there are no problems. Otherwise a string error message.
*/
function qtype_calculated_find_formula_errors($formula) {
foreach (['//', '/*', '#', '<?', '?>'] as $commentstart) {
if (strpos($formula, $commentstart) !== false) {
return get_string('illegalformulasyntax', 'qtype_calculated', $commentstart);
}
}
// Validates the formula submitted from the question edit page.
// Returns false if everything is alright
// otherwise it constructs an error message.
// Strip away dataset names.
while (preg_match('~\\{[[:alpha:]][^>} <{"\']*\\}~', $formula, $regs)) {
$formula = str_replace($regs[0], '1', $formula);
}
// Strip away dataset names. Use 1.0 to catch illegal concatenation like {a}{b}.
$formula = preg_replace(qtype_calculated::PLACEHODLER_REGEX, '1.0', $formula);
// Strip away empty space and lowercase it.
$formula = strtolower(str_replace(' ', '', $formula));
@@ -1978,14 +2012,14 @@ function qtype_calculated_find_formula_errors($formula) {
return get_string('unsupportedformulafunction', 'qtype_calculated', $regs[2]);
}
// Exchange the function call with '1' and then check for
// Exchange the function call with '1.0' and then check for
// another function call...
if ($regs[1]) {
// The function call is proceeded by an operator.
$formula = str_replace($regs[0], $regs[1] . '1', $formula);
$formula = str_replace($regs[0], $regs[1] . '1.0', $formula);
} else {
// The function call starts the formula.
$formula = preg_replace("~^{$regs[2]}\\([^)]*\\)~", '1', $formula);
$formula = preg_replace('~^' . preg_quote($regs[2], '~') . '\([^)]*\)~', '1.0', $formula);
}
}
@@ -2003,10 +2037,10 @@ function qtype_calculated_find_formula_errors($formula) {
* @return string|boolean false if there are no problems. Otherwise a string error message.
*/
function qtype_calculated_find_formula_errors_in_text($text) {
preg_match_all(qtype_calculated::FORMULAS_IN_TEXT_REGEX, $text, $matches);
$formulas = question_bank::get_qtype('calculated')->find_formulas($text);
$errors = array();
foreach ($matches[1] as $match) {
foreach ($formulas as $match) {
$error = qtype_calculated_find_formula_errors($match);
if ($error) {
$errors[] = $error;
@@ -46,6 +46,14 @@ class qtype_calculated_formula_validation_testcase extends basic_testcase {
$this->assertFalse(qtype_calculated_find_formula_errors('1 + 1'));
$this->assertFalse(qtype_calculated_find_formula_errors('{x} + {y}'));
$this->assertFalse(qtype_calculated_find_formula_errors('{x}*{y}'));
$this->assertFalse(qtype_calculated_find_formula_errors('{x}*({y}+1)'));
}
public function test_simple_equations_errors() {
$this->assert_nonempty_string(qtype_calculated_find_formula_errors('{a{b}}'));
$this->assert_nonempty_string(qtype_calculated_find_formula_errors('{a{b}}'));
$this->assert_nonempty_string(qtype_calculated_find_formula_errors('{a}({b})'));
$this->assert_nonempty_string(qtype_calculated_find_formula_errors('2({b})'));
}
public function test_safe_functions_ok() {
@@ -59,6 +67,15 @@ class qtype_calculated_formula_validation_testcase extends basic_testcase {
$this->assertFalse(qtype_calculated_find_formula_errors('max(1.0, 1.0, 2, 3)'));
}
public function test_php_comments_blocked() {
$this->assert_nonempty_string(qtype_calculated_find_formula_errors('# No need for this.'));
$this->assert_nonempty_string(qtype_calculated_find_formula_errors('/* Also blocked. */'));
$this->assert_nonempty_string(qtype_calculated_find_formula_errors('1 + 1 /* Blocked too. */'));
$this->assert_nonempty_string(qtype_calculated_find_formula_errors('// As is this.'));
$this->assert_nonempty_string(qtype_calculated_find_formula_errors('1/*2'));
$this->assert_nonempty_string(qtype_calculated_find_formula_errors('/*{a*///{x}}'));
}
public function test_dangerous_functions_blocked() {
$this->assert_nonempty_string(qtype_calculated_find_formula_errors('eval(1)'));
$this->assert_nonempty_string(qtype_calculated_find_formula_errors('system(1)'));
@@ -106,4 +106,37 @@ class qtype_calculated_test extends advanced_testcase {
),
), $this->qtype->get_possible_responses($q));
}
public function test_placehodler_regex() {
preg_match_all(qtype_calculated::PLACEHODLER_REGEX, '= {={a} + {b}}', $matches);
$this->assertEquals([['{a}', '{b}'], ['a', 'b']], $matches);
}
public function test_formulas_in_text_regex() {
preg_match_all(qtype_calculated::FORMULAS_IN_TEXT_REGEX, '= {={a} + {b}}', $matches);
$this->assertEquals([['{={a} + {b}}'], ['{a} + {b}']], $matches);
}
public function test_find_dataset_names() {
$this->assertEquals([], $this->qtype->find_dataset_names('Frog.'));
$this->assertEquals(['a' => 'a', 'b' => 'b'],
$this->qtype->find_dataset_names('= {={a} + {b}}'));
$this->assertEquals(['a' => 'a', 'b' => 'b'],
$this->qtype->find_dataset_names('What is {a} plus {b}? (Hint, it is not {={a}*{b}}.)'));
$this->assertEquals(['a' => 'a', 'b' => 'b', 'c' => 'c'],
$this->qtype->find_dataset_names('
<p>If called with $a = {a} and $b = {b}, what does this PHP function return?</p>
<pre>
/**
* What does this do?
*/
function mystery($a, $b) {
return {c}*$a + $b;
}
</pre>
'));
}
}
@@ -91,6 +91,12 @@ class qtype_calculated_variable_substituter_test extends advanced_testcase {
$this->assertEquals('= 3', $vs->replace_expressions_in_text('= {={a} + {b}}'));
}
public function test_expression_has_unmapped_placeholder() {
$this->setExpectedException('moodle_exception', (get_string('illegalformulasyntax', 'qtype_calculated', '{c}')));
$vs = new qtype_calculated_variable_substituter(array('a' => 1, 'b' => 2), '.');
$vs->calculate('{c} - {a} + {b}');
}
public function test_replace_expressions_in_text_negative() {
$vs = new qtype_calculated_variable_substituter(array('a' => -1, 'b' => 2), '.');
$this->assertEquals('temperatures -1 and 2',
@@ -317,7 +317,7 @@ class qtype_calculatedmulti_qe2_attempt_updater extends question_qtype_attempt_u
*/
public function replace_expressions_in_text($text, $length = null, $format = null) {
$vs = $this; // Can't see to use $this in a PHP closure.
$text = preg_replace_callback('~\{=([^{}]*(?:\{[^{}]+}[^{}]*)*)}~',
$text = preg_replace_callback(qtype_calculated::FORMULAS_IN_TEXT_REGEX,
function ($matches) use ($vs, $format, $length) {
return $vs->format_float($vs->calculate($matches[1]), $length, $format);
}, $text);
@@ -54,10 +54,8 @@ class qtype_calculatedmulti_edit_form extends question_edit_form {
if (isset($this->question->id)) {
// Remove prefix #{..}# if exists.
$this->initialname = $question->name;
$regs= array();
if (preg_match('~#\{([^[:space:]]*)#~', $question->name , $regs)) {
$question->name = str_replace($regs[0], '', $question->name);
};
$question->name = question_bank::get_qtype('calculated')
->clean_technical_prefix_from_question_name($question->name);
}
}
parent::__construct($submiturl, $question, $category, $contexts, $formeditable);
+10 -19
View File
@@ -231,36 +231,27 @@ class qtype_calculatedmulti extends qtype_calculated {
public function comment_on_datasetitems($qtypeobj, $questionid, $questiontext,
$answers, $data, $number) {
global $DB;
$comment = new stdClass();
$comment->stranswers = array();
$comment->outsidelimit = false;
$comment->answers = array();
$answers = fullclone($answers);
$errors = '';
$delimiter = ': ';
foreach ($answers as $key => $answer) {
$anssubstituted = $this->substitute_variables($answer->answer, $data);
// Evaluate the equations i.e {=5+4).
$anstext = '';
$anstextremaining = $anssubstituted;
while (preg_match('~\{=([^[:space:]}]*)}~', $anstextremaining, $regs1)) {
$anstextsplits = explode($regs1[0], $anstextremaining, 2);
$anstext =$anstext.$anstextsplits[0];
$anstextremaining = $anstextsplits[1];
if (empty($regs1[1])) {
$str = '';
$anssubstituted = $this->substitute_variables($answer->answer, $data);
$formulas = $this->find_formulas($anssubstituted);
$replaces = [];
foreach ($formulas as $formula) {
if ($formulaerrors = qtype_calculated_find_formula_errors($formula)) {
$str = $formulaerrors;
} else {
if ($formulaerrors = qtype_calculated_find_formula_errors($regs1[1])) {
$str=$formulaerrors;
} else {
eval('$str = '.$regs1[1].';');
}
eval('$str = ' . $formula . ';');
}
$anstext = $anstext.$str;
$replaces[$formula] = $str;
}
$anstext .= $anstextremaining;
$anstext = str_replace(array_keys($replaces), array_values($replaces), $anssubstituted);
$comment->stranswers[$key] = $anssubstituted.'<br/>'.$anstext;
}
return fullclone($comment);
+4
View File
@@ -23,6 +23,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(dirname(dirname(dirname(__FILE__))).'/config.php');
require_once($CFG->dirroot . '/repository/lib.php');
$json = required_param('tlelinks', PARAM_RAW);
require_login();
@@ -60,6 +62,7 @@ if (isset($info->license)) {
}
$source = base64_encode(json_encode(array('url'=>$url,'filename'=>$filename)));
$sourcekey = sha1($source . repository::get_secret_key() . sesskey());
$js =<<<EOD
<html>
@@ -70,6 +73,7 @@ $js =<<<EOD
var resource = {};
resource.title = "$filename";
resource.source = "$source";
resource.sourcekey = "$sourcekey";
resource.thumbnail = '$thumbnail';
resource.author = "$author";
resource.license = "$license";
+48 -48
View File
@@ -6,57 +6,57 @@ Feature: View course participants
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
| student3 | Student | 3 | student3@example.com |
| student4 | Student | 4 | student4@example.com |
| student5 | Student | 5 | student5@example.com |
| student6 | Student | 6 | student6@example.com |
| student7 | Student | 7 | student7@example.com |
| student8 | Student | 8 | student8@example.com |
| student9 | Student | 9 | student9@example.com |
| student10 | Student | 10 | student10@example.com |
| student11 | Student | 11 | student11@example.com |
| student12 | Student | 12 | student12@example.com |
| student13 | Student | 13 | student13@example.com |
| student14 | Student | 14 | student14@example.com |
| student15 | Student | 15 | student15@example.com |
| student16 | Student | 16 | student16@example.com |
| student17 | Student | 17 | student17@example.com |
| student18 | Student | 18 | student18@example.com |
| student19 | Student | 19 | student19@example.com |
| student20 | Student | 20 | student20@example.com |
| username | firstname | lastname | email |
| teacher1x | Teacher | 1x | teacher1x@example.com |
| student1x | Student | 1x | student1x@example.com |
| student2x | Student | 2x | student2x@example.com |
| student3x | Student | 3x | student3x@example.com |
| student4x | Student | 4x | student4x@example.com |
| student5x | Student | 5x | student5x@example.com |
| student6x | Student | 6x | student6x@example.com |
| student7x | Student | 7x | student7x@example.com |
| student8x | Student | 8x | student8x@example.com |
| student9x | Student | 9x | student9x@example.com |
| student10x | Student | 10x | student10x@example.com |
| student11x | Student | 11x | student11x@example.com |
| student12x | Student | 12x | student12x@example.com |
| student13x | Student | 13x | student13x@example.com |
| student14x | Student | 14x | student14x@example.com |
| student15x | Student | 15x | student15x@example.com |
| student16x | Student | 16x | student16x@example.com |
| student17x | Student | 17x | student17x@example.com |
| student18x | Student | 18x | student18x@example.com |
| student19x | Student | 19x | student19x@example.com |
| student20x | Student | 20x | student20x@example.com |
And the following "courses" exist:
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
| student4 | C1 | student |
| student5 | C1 | student |
| student6 | C1 | student |
| student7 | C1 | student |
| student8 | C1 | student |
| student9 | C1 | student |
| student10 | C1 | student |
| student11 | C1 | student |
| student12 | C1 | student |
| student13 | C1 | student |
| student14 | C1 | student |
| student15 | C1 | student |
| student16 | C1 | student |
| student17 | C1 | student |
| student18 | C1 | student |
| student19 | C1 | student |
| teacher1x | C1 | editingteacher |
| student1x | C1 | student |
| student2x | C1 | student |
| student3x | C1 | student |
| student4x | C1 | student |
| student5x | C1 | student |
| student6x | C1 | student |
| student7x | C1 | student |
| student8x | C1 | student |
| student9x | C1 | student |
| student10x | C1 | student |
| student11x | C1 | student |
| student12x | C1 | student |
| student13x | C1 | student |
| student14x | C1 | student |
| student15x | C1 | student |
| student16x | C1 | student |
| student17x | C1 | student |
| student18x | C1 | student |
| student19x | C1 | student |
@javascript
Scenario: Use select and deselect all buttons
Given I log in as "teacher1"
Given I log in as "teacher1x"
And I follow "Course 1"
And I follow "Participants"
When I press "Select all"
@@ -106,14 +106,14 @@ Feature: View course participants
@javascript
Scenario: Use select all users on this page, select all n users and deselect all
Given the following "course enrolments" exist:
| user | course | role |
| student20 | C1 | student |
When I log in as "teacher1"
| user | course | role |
| student20x | C1 | student |
When I log in as "teacher1x"
And I follow "Course 1"
And I follow "Participants"
And I follow "Surname"
And I press "Select all users on this page"
Then I should not see "Student 9"
Then I should not see "Student 9x"
And the field with xpath "//tbody//tr[1]//input[@class='usercheckbox']" matches value "1"
And the field with xpath "//tbody//tr[2]//input[@class='usercheckbox']" matches value "1"
And the field with xpath "//tbody//tr[3]//input[@class='usercheckbox']" matches value "1"
@@ -158,7 +158,7 @@ Feature: View course participants
And the field with xpath "//tbody//tr[20]//input[@class='usercheckbox']" matches value "0"
And I press "Select all 21 users"
And I should see "Student 9"
And I should see "Student 9x"
And the field with xpath "//tbody//tr[1]//input[@class='usercheckbox']" matches value "1"
And the field with xpath "//tbody//tr[2]//input[@class='usercheckbox']" matches value "1"
And the field with xpath "//tbody//tr[3]//input[@class='usercheckbox']" matches value "1"
+2 -2
View File
@@ -29,11 +29,11 @@
defined('MOODLE_INTERNAL') || die();
$version = 2016052310.00; // 20160523 = branching date YYYYMMDD - do not modify!
$version = 2016052313.00; // 20160523 = branching date YYYYMMDD - do not modify!
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.
$release = '3.1.10 (Build: 20180115)'; // Human-friendly version name
$release = '3.1.13 (Build: 20180709)'; // Human-friendly version name
$branch = '31'; // This version's branch.
$maturity = MATURITY_STABLE; // This version's maturity level.