Compare commits

...

149 Commits

Author SHA1 Message Date
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
Eloy Lafuente (stronk7) f41a173317 Moodle release 3.1.10 2018-01-12 20:35:29 +01:00
Eloy Lafuente (stronk7) dc7420d411 Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2018-01-12 20:35:27 +01:00
Adrian Greeve 96e40b6cfc MDL-61131 repositories: Added a key to verify incoming urls. 2018-01-09 11:35:05 +01:00
Simey Lameze a1eb47211d MDL-60235 core_calendar: clean event name field 2018-01-08 22:05:36 +08:00
Juan Leyva f5f0074aee MDL-60908 mod_quiz: Return question state only when configured
The question state should be returned following the quiz review options
settings.
2018-01-08 22:05:36 +08:00
Andrew Nicols ea8f903568 MDL-61169 iplookup: Change to github.com IP 2018-01-08 15:02:47 +01:00
AMOS bot 51a43f5fa7 Automatically generated installer lang files 2018-01-04 00:07:36 +00:00
AMOS bot 2edcf6861a Automatically generated installer lang files 2018-01-03 00:06:55 +00:00
AMOS bot bd5779cfb5 Automatically generated installer lang files 2017-12-18 00:06:49 +00:00
Eloy Lafuente (stronk7) 5a13113b07 weekly release 3.1.9+ 2017-12-14 14:47:35 +01:00
Eloy Lafuente (stronk7) 6ac052dbc4 Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2017-12-14 14:47:34 +01:00
AMOS bot c8c5e35bb1 Automatically generated installer lang files 2017-12-14 00:06:41 +00:00
Damyon Wiese 28964ed251 Merge branch 'MDL-61002-31' of git://github.com/andrewnicols/moodle into MOODLE_31_STABLE 2017-12-11 09:49:00 +08:00
Andrew Nicols e362c66d49 MDL-61002 iplookup: Improve test stability 2017-12-11 08:12:43 +08:00
AMOS bot 977861a47b Automatically generated installer lang files 2017-12-08 00:10:26 +00:00
Jun Pataleta b8067e0b01 weekly release 3.1.9+ 2017-12-08 09:09:56 +13:00
Andrew Nicols cf877600b7 Merge branch 'MDL-59159_31' of git://github.com/stronk7/moodle into MOODLE_31_STABLE 2017-12-06 10:06:26 +08:00
Eloy Lafuente (stronk7) d1660a6aae MDL-59159 environment: 3.1 (LTS) required 2017-12-04 02:05:42 +01:00
Eloy Lafuente (stronk7) e0b391da98 MDL-59159 environment: 3.5 base information
This is a direct copy of the 3.4 branch to
have changes under control easier in next commits.
2017-12-04 02:05:41 +01:00
Eloy Lafuente (stronk7) 687aad78bd Moodle release 3.1.9 2017-11-11 19:29:23 +01:00
Eloy Lafuente (stronk7) 21144b8419 Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2017-11-11 19:29:19 +01:00
AMOS bot 0372a0accb Automatically generated installer lang files 2017-11-11 00:06:07 +00:00
AMOS bot fea4000d5e Automatically generated installer lang files 2017-11-09 00:05:29 +00:00
AMOS bot 7105cb7684 Automatically generated installer lang files 2017-11-08 00:05:29 +00:00
AMOS bot d868aafa8e Automatically generated installer lang files 2017-11-05 00:07:15 +00:00
Sara Arjona 54bb01439e MDL-60550 user: Add more restrictions in keyword searches
Original patch provided by Tim Schroeder.
2017-10-31 11:55:28 +13:00
David Monllao 0b42937599 weekly release 3.1.8+ 2017-10-27 12:48:23 +02:00
David Monllao fab3e4fa3d Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2017-10-27 12:48:22 +02:00
Damyon Wiese 2393486db4 Merge branch 'MDL-60366_feedback_upgrade_31' of git://github.com/davosmith/moodle into MOODLE_31_STABLE 2017-10-26 16:05:16 +08:00
Andrew Nicols 853fbda447 Merge branch 'wip-MDL-60543-31' of git://github.com/marinaglancy/moodle into MOODLE_31_STABLE 2017-10-26 14:35:45 +08:00
AMOS bot 007edbdecb Automatically generated installer lang files 2017-10-25 00:06:28 +08:00
Davo Smith c614487d2d MDL-60366 mod_feedback: fix deletion of valid anonymous duplicates 2017-10-24 09:38:49 +01:00
Marina Glancy 58643c8b11 MDL-60543 env: Moodle 3.2 and 3.3 do no support PHP7.2 2017-10-23 14:25:43 +08:00
AMOS bot 9cdf50cb79 Automatically generated installer lang files 2017-10-14 00:09:00 +08:00
AMOS bot 03bfea8134 Automatically generated installer lang files 2017-10-10 00:12:39 +08:00
AMOS bot 9962df9eb3 Automatically generated installer lang files 2017-09-29 00:06:41 +08:00
AMOS bot 6f845655e5 Automatically generated installer lang files 2017-09-22 00:08:45 +08:00
AMOS bot 1ff9dccd8d Automatically generated installer lang files 2017-09-22 00:08:45 +08:00
AMOS bot 5fd13b5970 Automatically generated installer lang files 2017-09-21 00:06:44 +08:00
AMOS bot f79a3236ea Automatically generated installer lang files 2017-09-13 00:07:27 +08:00
Eloy Lafuente (stronk7) 25fd679aaf Moodle release 3.1.8 2017-09-09 22:48:00 +02:00
Eloy Lafuente (stronk7) 93cca9afbe Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2017-09-09 22:47:57 +02:00
David Mudrák 26663756fb MDL-59969 admin: Warn admins if a development libs directory exists
We can't really control the direct web access to directories in dirroot,
that is part of the server setup. So we at least warn admins as they may
not realize the risks of having directories like vendor or node_modules
exposed.

Credit goes to Petr Škoda for mentioning the PHPUnit issue CVE-2017-9841
to me.
2017-09-05 21:59:01 +08:00
Marina Glancy e404606458 MDL-59972 mod_feedback: escape subject when showing the contact form 2017-09-04 11:31:15 +08:00
Jake Dallimore 68b925e274 MDL-58953 user: additional test case for user_can_view_profile() 2017-08-30 10:35:51 +08:00
Jake Dallimore 0a8190569f MDL-58953 user: fix course checking logic in user_can_view_profile()
Make sure to check that $user in enrolled in $course before checking
whether the current user has capabilities in that course, and make sure
that we don't check user context caps when handling a specific course.
2017-08-30 10:35:51 +08:00
AMOS bot d95fb5245b Automatically generated installer lang files 2017-08-29 00:08:35 +08:00
AMOS bot fcea6de794 Automatically generated installer lang files 2017-08-28 00:10:01 +08:00
AMOS bot e5b89df732 Automatically generated installer lang files 2017-08-26 00:07:44 +08:00
AMOS bot 67ea841f41 Automatically generated installer lang files 2017-08-25 00:06:23 +08:00
AMOS bot a64872eb59 Automatically generated installer lang files 2017-08-25 00:06:23 +08:00
AMOS bot 5d20a3ed14 Automatically generated installer lang files 2017-08-17 00:09:03 +08:00
Simey Lameze 39aacd1dfe MDL-59776 core_calendar: unit tests of module events deletion 2017-08-15 11:34:25 +08:00
Simey Lameze bc312c648a MDL-59776 core_calendar: prevent deletion of module events 2017-08-15 11:34:25 +08:00
AMOS bot b545f830d0 Automatically generated installer lang files 2017-08-14 00:09:03 +08:00
AMOS bot 5325b4efe1 Automatically generated installer lang files 2017-07-31 00:10:57 +08:00
AMOS bot c6d38b89dc Automatically generated installer lang files 2017-07-29 00:11:21 +08:00
AMOS bot 73e0775d26 Automatically generated installer lang files 2017-07-26 00:08:17 +08:00
AMOS bot e4eb50ae15 Automatically generated installer lang files 2017-07-23 00:09:26 +08:00
AMOS bot 34e60f0dbf Automatically generated installer lang files 2017-07-22 00:08:38 +08:00
AMOS bot 5f2a1f0c36 Automatically generated installer lang files 2017-07-21 00:07:28 +08:00
Juan Leyva 1357976049 MDL-58762 core: Get full course objects on navigation
The course object passed as parameter to extend_navigation_user
callback contained only a few parameters, some parameters like
showgrades or showreports were missing.
The callback should receive a full course object.
2017-07-20 20:23:43 +08:00
Juan Leyva 9f7af133fd MDL-58762 report: Check group permissions in course user reports
Teachers were able to see any student report even with forced separated
groups and capability moodle/course:accessallgroups off.
2017-07-20 20:23:43 +08:00
Dan Poltawski 0faa1175fe weekly release 3.1.7+ 2017-07-20 13:21:01 +01:00
Dan Poltawski f3fe4f52e1 Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2017-07-20 13:21:00 +01:00
Andrew Nicols 45a405014e Merge branch 'wip-MDL-57649-31-fix2' of git://github.com/abgreeve/moodle into MOODLE_31_STABLE 2017-07-20 10:24:43 +08:00
Adrian Greeve b77e45119c MDL-57649 mod_lesson: Improvement to upgrade query.
We only need one record for each filearea that we
are removing.
2017-07-20 10:03:29 +08:00
AMOS bot 9a3855aa00 Automatically generated installer lang files 2017-07-20 00:07:29 +08:00
Dan Poltawski f06abbd040 Merge branch 'wip-MDL-57649-31-fix' of git://github.com/abgreeve/moodle into MOODLE_31_STABLE 2017-07-19 09:33:31 +01:00
Adrian Greeve 9e1375fac0 MDL-57649 mod_lesson: Additional refinement to upgrade script. 2017-07-19 15:48:59 +08:00
Dani Palou 62be5f6154 MDL-59068 lesson: Revert MDL-54849
MDL-54859 made the 'wrong jump' setting useless, since clicking 'No' always sends the user to the next page.
2017-07-17 10:10:22 +02:00
Dan Poltawski 5db085f0a7 Merge branch 'wip-MDL-57649-31' of git://github.com/abgreeve/moodle into MOODLE_31_STABLE 2017-07-17 09:01:12 +01:00
Adrian Greeve 734fb0f015 MDL-57649 mod_lesson: Delete answer files correctly.
The files associated with answers and responses were
not being deleted due to the fact that the wrong itemid
was being used.
2017-07-17 09:20:40 +08:00
AMOS bot 0fd90e2044 Automatically generated installer lang files 2017-07-17 00:07:23 +08:00
Dan Poltawski ab4afd711a weekly release 3.1.7+ 2017-07-14 11:46:55 +01:00
Dan Poltawski 4fc794b7ef Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2017-07-14 11:46:54 +01:00
Eloy Lafuente (stronk7) f883e31728 Merge branch 'MDL-57432-31' of git://github.com/danpoltawski/moodle into MOODLE_31_STABLE 2017-07-11 10:18:31 +02:00
AMOS bot c2e08a97c1 Automatically generated installer lang files 2017-07-11 00:07:01 +08:00
Dan Poltawski cd7cd469ae MDL-57432 environment: raise Moodle requirement
Due to Moodle 2.7 and Moodle 3.4 not having a common compatible php version
between them to upgrade from Moodle 3.4 from Moodle 2.7 you'll need to upgrade
to a higher version first or upgrade php at the same time as upgrade,
this encourages the former.
2017-07-10 09:22:51 +01:00
Dan Poltawski 43d1a8695c MDL-57432 environment: raise Moodle 3.4 requirements
1) PHP minimum version raised to 7.0.0
2) Intl extension raised from optional to required
2017-07-10 09:22:51 +01:00
Dan Poltawski 499e619868 MDL-57432 environment: 3.4 base information
This is a direct copy of the 3.3 branch to
have changes under control easier in next commits.
2017-07-10 09:22:51 +01:00
130 changed files with 2610 additions and 678 deletions
+354
View File
@@ -1754,6 +1754,7 @@
<VENDOR name="oracle" version="10.2" />
</DATABASE>
<PHP version="5.6.5" level="required">
<RESTRICT function="restrict_php_version_72" message="unsupportedphpversion72" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
@@ -1919,6 +1920,7 @@
<VENDOR name="oracle" version="10.2" />
</DATABASE>
<PHP version="5.6.5" level="required">
<RESTRICT function="restrict_php_version_72" message="unsupportedphpversion72" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
@@ -2081,4 +2083,356 @@
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="3.4" requires="3.0">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mariadb" version="5.5.31" />
<VENDOR name="mysql" version="5.5.31" />
<VENDOR name="postgres" version="9.3" />
<VENDOR name="mssql" version="10.0" />
<VENDOR name="oracle" version="10.2" />
</DATABASE>
<PHP version="7.0.0" level="required">
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
<ON_CHECK message="pcreunicodewarning" />
</FEEDBACK>
</PCREUNICODE>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
<FEEDBACK>
<ON_CHECK message="mbstringrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="required">
<FEEDBACK>
<ON_ERROR message="opensslrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="soap" level="optional">
<FEEDBACK>
<ON_CHECK message="soaprecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="required">
<FEEDBACK>
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zip" level="required">
<FEEDBACK>
<ON_ERROR message="ziprequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zlib" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="gd" level="required">
<FEEDBACK>
<ON_ERROR message="gdrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="dom" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xml" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlreader" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="intl" level="required">
<FEEDBACK>
<ON_ERROR message="intlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="json" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="hash" level="required"/>
<PHP_EXTENSION name="fileinfo" level="required"/>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="96M" level="required">
<FEEDBACK>
<ON_ERROR message="settingmemorylimit" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="file_uploads" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="settingfileuploads" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="opcache.enable" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="opcacherecommended" />
</FEEDBACK>
</PHP_SETTING>
</PHP_SETTINGS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_storage_engine" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbstorageengine" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="question/engine/upgrade/upgradelib.php" function="quiz_attempts_upgraded" level="required">
<FEEDBACK>
<ON_ERROR message="quizattemptsupgradedmessage" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_slasharguments" level="optional">
<FEEDBACK>
<ON_CHECK message="slashargumentswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_tables_row_format" level="optional">
<FEEDBACK>
<ON_CHECK message="unsupporteddbtablerowformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_unoconv_version" level="optional">
<FEEDBACK>
<ON_CHECK message="unoconvwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
<FEEDBACK>
<ON_CHECK message="libcurlwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_format" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfileformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_per_table" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfilepertable" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_large_prefix" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddblargeprefix" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_is_https" level="optional">
<FEEDBACK>
<ON_CHECK message="ishttpswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_incomplete_unicode_support" level="optional">
<FEEDBACK>
<ON_CHECK message="incompleteunicodesupport" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="3.5" requires="3.1">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mariadb" version="5.5.31" />
<VENDOR name="mysql" version="5.5.31" />
<VENDOR name="postgres" version="9.3" />
<VENDOR name="mssql" version="10.0" />
<VENDOR name="oracle" version="10.2" />
</DATABASE>
<PHP version="7.0.0" level="required">
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
<ON_CHECK message="pcreunicodewarning" />
</FEEDBACK>
</PCREUNICODE>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
<FEEDBACK>
<ON_CHECK message="mbstringrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="required">
<FEEDBACK>
<ON_ERROR message="opensslrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="soap" level="optional">
<FEEDBACK>
<ON_CHECK message="soaprecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="required">
<FEEDBACK>
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zip" level="required">
<FEEDBACK>
<ON_ERROR message="ziprequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zlib" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="gd" level="required">
<FEEDBACK>
<ON_ERROR message="gdrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="dom" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xml" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlreader" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="intl" level="required">
<FEEDBACK>
<ON_ERROR message="intlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="json" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="hash" level="required"/>
<PHP_EXTENSION name="fileinfo" level="required"/>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="96M" level="required">
<FEEDBACK>
<ON_ERROR message="settingmemorylimit" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="file_uploads" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="settingfileuploads" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="opcache.enable" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="opcacherecommended" />
</FEEDBACK>
</PHP_SETTING>
</PHP_SETTINGS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_storage_engine" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbstorageengine" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="question/engine/upgrade/upgradelib.php" function="quiz_attempts_upgraded" level="required">
<FEEDBACK>
<ON_ERROR message="quizattemptsupgradedmessage" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_slasharguments" level="optional">
<FEEDBACK>
<ON_CHECK message="slashargumentswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_tables_row_format" level="optional">
<FEEDBACK>
<ON_CHECK message="unsupporteddbtablerowformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_unoconv_version" level="optional">
<FEEDBACK>
<ON_CHECK message="unoconvwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
<FEEDBACK>
<ON_CHECK message="libcurlwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_format" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfileformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_per_table" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfilepertable" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_large_prefix" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddblargeprefix" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_is_https" level="optional">
<FEEDBACK>
<ON_CHECK message="ishttpswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_incomplete_unicode_support" level="optional">
<FEEDBACK>
<ON_CHECK message="incompleteunicodesupport" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
</COMPATIBILITY_MATRIX>
+8 -1
View File
@@ -852,10 +852,17 @@ $cachewarnings = cache_helper::warnings();
// Check if there are events 1 API handlers.
$eventshandlers = $DB->get_records_sql('SELECT DISTINCT component FROM {events_handlers}');
// Check if a directory with development libraries exists.
if (is_dir($CFG->dirroot.'/vendor') || is_dir($CFG->dirroot.'/node_modules')) {
$devlibdir = true;
} else {
$devlibdir = false;
}
admin_externalpage_setup('adminnotifications');
$output = $PAGE->get_renderer('core', 'admin');
echo $output->admin_notifications_page($maturity, $insecuredataroot, $errorsdisplayed, $cronoverdue, $dbproblems,
$maintenancemode, $availableupdates, $availableupdatesfetch, $buggyiconvnomb,
$registered, $cachewarnings, $eventshandlers);
$registered, $cachewarnings, $eventshandlers, null, $devlibdir);
+23 -1
View File
@@ -276,12 +276,15 @@ class core_admin_renderer extends plugin_renderer_base {
* @param int|null $availableupdatesfetch timestamp of the most recent updates fetch or null (unknown)
* @param string[] $cachewarnings An array containing warnings from the Cache API.
* @param array $eventshandlers Events 1 API handlers.
* @param bool $ignored Forward-compatible placeholder for the themedesignermode.
* @param bool $devlibdir Warn about development libs directory presence.
*
* @return string HTML to output.
*/
public function admin_notifications_page($maturity, $insecuredataroot, $errorsdisplayed,
$cronoverdue, $dbproblems, $maintenancemode, $availableupdates, $availableupdatesfetch,
$buggyiconvnomb, $registered, array $cachewarnings = array(), $eventshandlers = 0) {
$buggyiconvnomb, $registered, array $cachewarnings = array(), $eventshandlers = 0,
$ignored = false, $devlibdir = false) {
global $CFG;
$output = '';
@@ -290,6 +293,7 @@ class core_admin_renderer extends plugin_renderer_base {
$output .= $this->legacy_log_store_writing_error();
$output .= empty($CFG->disableupdatenotifications) ? $this->available_updates($availableupdates, $availableupdatesfetch) : '';
$output .= $this->insecure_dataroot_warning($insecuredataroot);
$output .= $this->development_libs_directories_warning($devlibdir);
$output .= $this->display_errors_warning($errorsdisplayed);
$output .= $this->buggy_iconv_warning($buggyiconvnomb);
$output .= $this->cron_overdue_warning($cronoverdue);
@@ -519,6 +523,24 @@ class core_admin_renderer extends plugin_renderer_base {
}
}
/**
* Render a warning that a directory with development libs is present.
*
* @param bool $devlibdir True if the warning should be displayed.
* @return string
*/
protected function development_libs_directories_warning($devlibdir) {
if ($devlibdir) {
$moreinfo = new moodle_url('/report/security/index.php');
$warning = get_string('devlibdirpresent', 'core_admin', ['moreinfourl' => $moreinfo->out()]);
return $this->warning($warning, 'error');
} else {
return '';
}
}
/**
* Render an appropriate message if dataroot is insecure.
* @param bool $errorsdisplayed
+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;
}
}
+4 -3
View File
@@ -58,9 +58,11 @@ if (!$course) {
$PAGE->set_context(context_system::instance()); //TODO: wrong
}
$title = get_string('deleteevent', 'calendar');
// Check the user has the required capabilities to edit an event
if (!calendar_edit_event_allowed($event)) {
print_error('nopermissions');
if (!calendar_edit_event_allowed($event) || !empty($event->modulename)) {
print_error('nopermissions', 'error', $PAGE->url, $title);
}
// Count the repeats, do we need to consider the possibility of deleting repeats
@@ -88,7 +90,6 @@ if ($confirm) {
}
// Prepare the page to show the confirmation form
$title = get_string('deleteevent', 'calendar');
$strcalendar = get_string('calendar', 'calendar');
$PAGE->navbar->add($strcalendar, $viewcalendarurl);
+3 -2
View File
@@ -81,8 +81,9 @@ class core_calendar_external extends external_api {
$eventobj = calendar_event::load($event['eventid']);
// Let's check if the user is allowed to delete an event.
if (!calendar_edit_event_allowed($eventobj)) {
throw new moodle_exception("nopermissions");
if (!empty($eventobj->modulename) || !calendar_edit_event_allowed($eventobj)) {
throw new moodle_exception("nopermissions", 'error', '',
get_string('deleteevent', 'calendar'));
}
// Time to do the magic.
$eventobj->delete($event['repeat']);
+1 -1
View File
@@ -411,7 +411,7 @@ function calendar_get_mini($courses, $groups, $users, $calmonth = false, $calyea
$name = format_string($event->name, true);
}
}
$popupcontent .= html_writer::link($dayhref, $name);
$popupcontent .= html_writer::link($dayhref, clean_text($name));
$popupcontent .= html_writer::end_tag('div');
}
+23
View File
@@ -506,4 +506,27 @@ class core_calendar_externallib_testcase extends externallib_advanced_testcase {
$this->assertEquals(1, count($eventsret['events']));
$this->assertEquals(2, count($eventsret['warnings']));
}
/**
* Test for deleting module events.
*/
public function test_delete_calendar_events_for_modules() {
$this->resetAfterTest();
$this->setAdminUser();
$course = $this->getDataGenerator()->create_course();
$nexttime = time() + DAYSECS;
$this->getDataGenerator()->create_module('assign', ['course' => $course->id, 'duedate' => $nexttime]);
$events = calendar_get_events(time(), $nexttime, true, true, true);
$this->assertCount(1, $events);
$params = [];
foreach($events as $event) {
$params[] = [
'eventid' => $event->id,
'repeat' => false
];
}
$this->setExpectedException('moodle_exception');
core_calendar_external::delete_calendar_events($params);
}
}
+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": [],
+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';
+3 -5
View File
@@ -35,12 +35,10 @@ $string['cliansweryes'] = 'j';
$string['cliincorrectvalueerror'] = 'Fejl, "{$a->value}" er en forkert værdi for "{$a->option}"';
$string['cliincorrectvalueretry'] = 'Forkert værdi, prøv igen!';
$string['clitypevalue'] = 'tast værdi';
$string['clitypevaluedefault'] = 'tast værdi eller brug standardværdien ({$a}) ved at trykke Enter';
$string['cliunknowoption'] = 'Ukendte options:
$string['clitypevaluedefault'] = 'tast værdi, tryk på Enter for at bruge standardværdien ({$a})';
$string['cliunknowoption'] = 'Ukendte optioner:
{$a}
Brug venligst --help option.';
Brug optionen --help.';
$string['cliyesnoprompt'] = 'j (betyder ja) og n (betyder nej)';
$string['environmentrequireinstall'] = 'skal være installeret og aktiveret';
$string['environmentrequireversion'] = 'minimumskravet er version {$a->needed} og du kører {$a->current}';
+9 -14
View File
@@ -35,7 +35,7 @@ $string['availablelangs'] = 'Tilgængelige sprogpakker';
$string['chooselanguagehead'] = 'Vælg et sprog';
$string['chooselanguagesub'] = 'Vælg et sprog til brug under installationen. Dette sprog vil også blive brugt som standardsprog på webstedet, men det kan altid ændres til et andet sprog.';
$string['clialreadyconfigured'] = 'Konfigurationsfilen config.php eksisterer allerede. Benyt venigst admin/cli/install_database.php til at installere Moodle for dette site.';
$string['clialreadyinstalled'] = 'Filen config.php eksisterer allerede, brug venligst admin/cli/install_database.php hvis du ønsker at opgradere dette websted.';
$string['clialreadyinstalled'] = 'Filen config.php eksisterer allerede, brug admin/cli/install_database.php hvis du ønsker at opgradere dette websted.';
$string['cliinstallheader'] = 'Moodle {$a} kommandolinje-installationsprogram';
$string['databasehost'] = 'Databasevært';
$string['databasename'] = 'Databasenavn';
@@ -52,20 +52,15 @@ $string['installation'] = 'Installation';
$string['langdownloaderror'] = 'Sproget "{$a}" blev desværre ikke installeret. Installationen vil fortsætte på engelsk.';
$string['memorylimithelp'] = '<p>Den mængde hukommelse PHP kan bruge, er sat til {$a}.</p>
<p>Dette kan forårsage at der opstår problemer senere, især hvis du har mange moduler aktiveret eller mange brugere.</p>
<p>Det kan forårsage at der opstår problemer senere, især hvis du har mange moduler aktiveret eller mange brugere.</p>
<p>Vi anbefaler at du konfigurerer PHP med mere hukommelse, f.eks. 40M.
Der er flere måder hvorpå du kan rette det.</p>
<p>Vi anbefaler at du konfigurerer PHP med mere hukommelse, f.eks. 40M. Der er flere måder hvorpå du kan ændre det.</p>
<ol>
<li>Hvis du har mulighed for det, kan du rekompilere PHP med <i>--enable-memory-limit</i>.
Det vil tillade at Moodle selv kan definere hvor meget hukommelse der er brug for.</li>
<li>Hvis du har mulighed for det, kan du rekompilere PHP med <i>--enable-memory-limit</i>. Det vil tillade at Moodle selv kan definere hvor meget hukommelse der er brug for.</li>
<li>Hvis du har adgang til php.ini filen kan du ændre <b>memory_limit</b>-indstillingen til noget i retning af 40M. Hvis du ikke har direkte adgang til den kan du bede systemadministratoren om at gøre det for dig.</li>
<li>På nogle servere kan du oprette en \'.htaccess\'-fil og gemme den i moodle-mappen med linjen: <blockquote><div>php_value memory_limit 40M</div></blockquote>
<li>Hvis du har adgang til php.ini filen kan du ændre <b>memory_limit</b>-indstillingen til noget i retning af 40M.
Hvis du ikke har direkte adgang til den kan du bede systemadministratoren om at gøre det for dig.</li>
<li>På nogle servere kan du oprette en \'.htaccess\' fil og gemme den i moodle-mappen med linjen:
<blockquote><div>php_value memory_limit 40M</div></blockquote>
<p>Det kan dog på nogle servere forhindre <b>alle</b> PHP-siderne i at virke (du vil se fejl når du ser på siderne). I så fald kan du blive nødt til at fjerne \'.htaccess\' filen igen.</p></li> </ol>';
<p>Det kan dog på nogle servere forhindre <b>alle</b> PHP-siderne i at virke (du vil se fejl når du ser på siderne). I så fald kan du blive nødt til at fjerne \'.htaccess\'filen igen.</p></li> </ol>';
$string['paths'] = 'Stier';
$string['pathserrcreatedataroot'] = 'Datamappen ({$a->dataroot}) kan ikke oprettes af installationsprogrammet.';
$string['pathshead'] = 'Bekræft stier';
@@ -76,7 +71,7 @@ $string['pathssubdataroot'] = '<p>En mappe hvori Moodle kan gemme uploadede file
<p>Webserver-brugeren (som regel \'www-data\', \'nobody\', eller \'apache\') skal have læse- og skriveadgang til den.</p>
<p>Mappen må ikke være tilgængelig direkte fra internettet.</p>
<p>Hvis ikke den allerede eksisterer, vil Installationsprogrammet forsøge at oprette den</p>';
$string['pathssubdirroot'] = '<p>Den fulde sti mappen med til Moodlekoden.</p>';
$string['pathssubdirroot'] = '<p>Den fulde sti til mappen med Moodlekoden.</p>';
$string['pathssubwwwroot'] = '<p>Moodles fulde web-adresse, dvs. adressen som den skal stå i browserens adressefelt for at komme ind på Moodle.</p>
<p>Moodle kan ikke bruges fra flere adresser. Hvis dit websted kan tilgås fra flere adresser, skal du vælge den enkleste og opsætte permanent viderestilling for hver af de øvrige.</p>
<p>Hvis dit websted er tilgængeligt fra både internettet og et internt net (nogen gange kaldet intranet), skal du bruge den offentlige adresse her</p>
@@ -84,7 +79,7 @@ $string['pathssubwwwroot'] = '<p>Moodles fulde web-adresse, dvs. adressen som de
$string['pathsunsecuredataroot'] = 'Datamappen er ikke sikret';
$string['pathswrongadmindir'] = 'Adminmappe eksisterer ikke';
$string['phpextension'] = '{$a} PHP-extension';
$string['phpversion'] = 'PHP version';
$string['phpversion'] = 'PHP-version';
$string['phpversionhelp'] = '<p>Moodle kræver mindst PHP version 5.4.4 (7.0.x har visse begrænsninger).</p> <p>Du bruger i øjeblikket version {$a}</p> <p>Du bliver nødt til at opgradere PHP eller flytte systemet over på en webserver med en nyere version af PHP!</p>';
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
$string['welcomep20'] = 'Du ser denne side fordi du har installeret og åbnet pakken <strong>{$a->packname} {$a->packversion}</strong> på din computer.
+1
View File
@@ -30,5 +30,6 @@
defined('MOODLE_INTERNAL') || die();
$string['parentlanguage'] = '';
$string['thisdirection'] = 'ltr';
$string['thislanguage'] = 'Dansk';
+5 -5
View File
@@ -31,13 +31,13 @@
defined('MOODLE_INTERNAL') || die();
$string['cannotcreatedboninstall'] = '<p>Die Datenbank konnte nicht angelegt werden.</p><p>Die angegebene Datenbank existiert nicht und das genannten Nutzerkonto hat keine Rechte, die Datenbank neu anzulegen. Die Datenbank-Konfiguration muss überprüft werden.</p>';
$string['cannotcreatelangdir'] = 'Verzeichnis \'lang\' wurde nicht angelegt';
$string['cannotcreatetempdir'] = 'Das Verzeichnis \'temp\' wurde nicht angelegt';
$string['cannotcreatelangdir'] = 'Das Verzeichnis \'lang\' wurde nicht angelegt.';
$string['cannotcreatetempdir'] = 'Das Verzeichnis \'temp\' wurde nicht angelegt.';
$string['cannotdownloadcomponents'] = 'Einige Komponenten können nicht geladen werden.';
$string['cannotdownloadzipfile'] = 'ZIP-Datei kann nicht heruntergeladen werden.';
$string['cannotfindcomponent'] = 'Komponente wurde nicht gefunden';
$string['cannotsavemd5file'] = 'Die md5-Datei wurde nicht gespeichert';
$string['cannotsavezipfile'] = 'Die ZIP-Datei wurde nicht gespeichert';
$string['cannotfindcomponent'] = 'Die Komponente kann nicht gefunden werden.';
$string['cannotsavemd5file'] = 'Die md5-Datei wurde nicht gespeichert.';
$string['cannotsavezipfile'] = 'Die ZIP-Datei wurde nicht gespeichert.';
$string['cannotunzipfile'] = 'Die Datei kann nicht entpackt werden';
$string['componentisuptodate'] = 'Die Komponente ist aktuell.';
$string['dmlexceptiononinstall'] = '<p>Ein Datenbankfehler ist aufgetreten [{$a->errorcode}]. <br />{$a->debuginfo}</p>';
+1 -1
View File
@@ -36,7 +36,7 @@ $string['chooselanguagehead'] = 'Sprache wählen';
$string['chooselanguagesub'] = 'Wählen Sie eine Sprache, die Sie während der Installation verwenden wollen. Die ausgewählte Sprache wird nach der Installation als Standardsprache der Instanz benutzt, aber Sie dürfen die Sprache jederzeit ändern.';
$string['clialreadyconfigured'] = 'Die Datei config.php existiert bereits. Bitte benutzen Sie admin/cli/install_database.php, wenn Sie diese Site installieren möchten.';
$string['clialreadyinstalled'] = 'Die Datei config.php existiert bereits. Bitte benutzen Sie admin/cli/install_database.php, wenn Sie diese Site aktualisieren möchten.';
$string['cliinstallheader'] = 'Installation von Moodle {$a} über die Kommandozeile';
$string['cliinstallheader'] = 'Installation von Moodle {$a} über die Befehlszeile';
$string['databasehost'] = 'Datenbank-Server';
$string['databasename'] = 'Datenbank-Name';
$string['databasetypehead'] = 'Datenbank-Treiber wählen';
+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';
+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['parentlanguage'] = 'de';
$string['thislanguage'] = 'Dolnoserbski';
+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
View File
@@ -31,6 +31,7 @@
defined('MOODLE_INTERNAL') || die();
$string['language'] = 'Γλώσσα';
$string['moodlelogo'] = 'Λογότυπο Moodle';
$string['next'] = 'Επόμενο';
$string['previous'] = 'Προηγούμενο';
$string['reload'] = 'Eπαναφόρτωση';
+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.';
+2 -3
View File
@@ -85,10 +85,9 @@ $string['pathsunsecuredataroot'] = 'La ubicación de dataroot no es segura';
$string['pathswrongadmindir'] = 'El directorio admin no existe';
$string['phpextension'] = 'Extensión PHP {$a}';
$string['phpversion'] = 'Versión PHP';
$string['phpversionhelp'] = '<p>Moodle requiere al menos una versión de PHP 4.3.0 o 5.1.0 ((5.0.x tiene una serie de problemas conocidos).</p>
$string['phpversionhelp'] = '<p>Moodle requiere al menos una versión de PHP al menos de 5.4.4 (7.0.x tienealgunas limitaciones del motor.</p>
<p>En este momento está ejecutando la versión {$a}</p>
<p>¡Debe actualizar PHP o trasladarse a otro servidor con una versión más reciente de PHP!<br />
(En caso de 5.0.x podría también revertir a la versión 4.4.x)</p>';
<p>¡Debe actualizar PHP o trasladarse a otro servidor con una versión más reciente de PHP!</p>';
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
$string['welcomep20'] = 'Si está viendo esta página es porque ha podido instalar y ejecutar exitosamente el paquete <strong>{$a->packname} {$a->packversion}</strong> en su computadora. !Enhorabuena!';
$string['welcomep30'] = 'Esta versión de <strong>{$a->installername}</strong> incluye las aplicaciones necesarias para que <strong>Moodle</strong> funcione en su computadora, principalmente:';
+1 -1
View File
@@ -31,4 +31,4 @@
defined('MOODLE_INTERNAL') || die();
$string['parentlanguage'] = 'es_mx';
$string['thislanguage'] = 'Español de México para niños';
$string['thislanguage'] = 'Español - México para niños';
+1
View File
@@ -41,3 +41,4 @@ Mesedez, erabili --laguntza aukera.';
$string['cliyesnoprompt'] = 'idatzi b (bai esateko) edo e (ez esateko)';
$string['environmentrequireinstall'] = 'derrigorrezkoa da instalatuta eta gaituta izatea';
$string['environmentrequireversion'] = '{$a->needed} bertsioa beharrezkoa da eta zu {$a->current} ari zara egikaritzen';
$string['upgradekeyset'] = 'Eguneraketa-kodea (utzi hutsik kodea erabili nahi ez baduzu)';
+2 -2
View File
@@ -30,8 +30,8 @@
defined('MOODLE_INTERNAL') || die();
$string['cannotcreatedboninstall'] = '<p>Ezin da datu-basea sortu.<p>
<p>Zehaztutako datu-basea ez da existitzen eta adierazitako erabiltzaileak ez du baimenik datu-basea sortzeko.<p>
$string['cannotcreatedboninstall'] = '<p>Ezin da datu-basea sortu.</p>
<p>Zehaztutako datu-basea ez da existitzen eta adierazitako erabiltzaileak ez du baimenik datu-basea sortzeko.</p>
<p>Guneko kudeatzaileak datu-basearen konfigurazioa egiaztatu behar du.</p>';
$string['cannotcreatelangdir'] = 'Ezin da hizkuntza-direktorioa sortu';
$string['cannotcreatetempdir'] = 'Ezin da temp direktorioa sortu';
+1
View File
@@ -44,6 +44,7 @@ $string['cannotunzipfile'] = 'فایل نمی‌تواند unzip شود';
$string['componentisuptodate'] = 'کامپوننت به‌روز است';
$string['dmlexceptiononinstall'] = '<p>یک خطای پایگاه داده رخ داد [{$a->errorcode}].<br />{$a->debuginfo}</p>';
$string['downloadedfilecheckfailed'] = 'بررسی فایل دریافت‌شده ناموفق بود';
$string['invalidmd5'] = 'متغیر بررسی نادرست بود - دوباره تلاش کنید';
$string['missingrequiredfield'] = 'بعضی از فیلدهای ضروری خالی است';
$string['remotedownloaderror'] = '<p>دانلود کامپوننت بر روی کارگزار شما ناموفق بود. لطفا تنظیمات پروکسی را بررسی کنید؛ افزونهٔ پی‌اچ‌پی cURL بسیار توصیه می‌شود.</p>
<p>باید به‌صورت دستی فایل <a href="{$a->url}">{$a->url}</a> را دریافت کنید، آن را در «{$a->dest}» در کارگزار خود کپی کنید و آنجا از حالت فشرده خارج کنید.</p>';
+1
View File
@@ -32,3 +32,4 @@ defined('MOODLE_INTERNAL') || die();
$string['language'] = 'Tungumál';
$string['next'] = 'Næsta';
$string['previous'] = 'Undanfarna';
+1 -1
View File
@@ -66,7 +66,7 @@ $string['pathsrodataroot'] = 'Le dossier de données n\'est pas accessible en é
$string['pathsroparentdataroot'] = 'Le dossier parent ({$a->parent}) n\'est pas accessible en écriture. Le dossier de données ({$a->dataroot}) ne peut pas être créé par l\'installeur.';
$string['pathssubadmindir'] = 'Quelques rares hébergeurs utilisent « /admin » comme URL spéciale pour l\'accès à un tableau de bord ou d\'autres fonctionnalités. Malheureusement ceci entre en conflit avec l\'emplacement standard des pages d\'administration de Moodle. Vous pouvez corriger ceci en renommant le dossier admin de votre installation Moodle et en plaçant le nouveau nom choisi dans ce champ. Par exemple, <em>moodleadmin</em>. Ceci modifiera tous les liens de l\'administration de Moodle.';
$string['pathssubdataroot'] = '<p>Un dossier dans lequel Moodle stockera tous les fichiers qui seront déposés par les utilisateurs.</p>
<p>Ce dossier doit être accessible en lecture et en écriture par le serveur web (dénomé « nobody » ou « apache » ou encore « www-data »).</p>
<p>Ce dossier doit être accessible en lecture et en écriture par l\'utilisateur système du serveur web (habituellement nommé « www-data », « nobody » ou encore « apache »).</p>
<p>Il ne doit pas être accessible directement via le web.</p>
<p>Si ce dossier n\'existe pas encore, Moodle tentera de le créer au cours du processus d\'installation.</p>';
$string['pathssubdirroot'] = '<p>Le chemin d\'accès complet au dossier contenant le code source de Moodle.</p>';
+1
View File
@@ -31,6 +31,7 @@
defined('MOODLE_INTERNAL') || die();
$string['language'] = 'שפת ממשק';
$string['moodlelogo'] = 'לוגו של Moodle';
$string['next'] = 'הבא';
$string['previous'] = 'קודם';
$string['reload'] = 'טעינה מחדש';
+4
View File
@@ -35,4 +35,8 @@ $string['cliansweryes'] = 'वाई';
$string['cliincorrectvalueerror'] = 'त्रुटि, "{$a->option}" के लिए गलत मान जो की "{$a->value}" है';
$string['cliincorrectvalueretry'] = 'ग़लत मान, कृपया पुनः प्रयास करें';
$string['clitypevalue'] = 'टाइप मूल्य';
$string['clitypevaluedefault'] = 'वैल्यू टाइप करें, डिफ़ॉल्ट वैल्यू ({$ a}) का उपयोग करने के लिए Enter दबाएं';
$string['cliunknowoption'] = 'अपरिचित विकल्प:
{$a}
कृपया --help विकल्प का उपयोग करें।';
$string['cliyesnoprompt'] = 'टाइप Y (का मतलब है हाँ) या N (का मतलब है नहीं )';
+1
View File
@@ -31,6 +31,7 @@
defined('MOODLE_INTERNAL') || die();
$string['language'] = 'Jezik';
$string['moodlelogo'] = 'Moodle logo';
$string['next'] = 'Nastavi';
$string['previous'] = 'Prethodni';
$string['reload'] = 'Učitaj ponovno';
+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';
+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'] = 'Igbo';
+3 -3
View File
@@ -35,7 +35,7 @@ $string['availablelangs'] = '利用可能な言語パック';
$string['chooselanguagehead'] = '言語を選択してください。';
$string['chooselanguagesub'] = 'インストールにのみ使用する言語を選択してください。この言語はサイトのデフォルト言語としても使用されます。後でサイト言語を変更することができます。';
$string['clialreadyconfigured'] = '設定ファイルconfig.phpはすでに登録されています。このサイトをインストールする場合、admin/cli/install_database.phpを使用してください。';
$string['clialreadyinstalled'] = '設定ファイルconfig.phpはすでに登録されています。このサイトをアップグレードする場合、admin/cli/upgrade.phpを使用してください。';
$string['clialreadyinstalled'] = '設定ファイルconfig.phpはすでに登録されています。このサイトをアップグレードする場合、admin/cli/upgrade.phpを使用してください。';
$string['cliinstallheader'] = 'Moodle {$a} コマンドラインインストールプログラム';
$string['databasehost'] = 'データベースホスト :';
$string['databasename'] = 'データベース名 :';
@@ -57,7 +57,7 @@ $string['memorylimithelp'] = '<p>現在、サーバのPHPメモリ制限が {$a}
<ol>
<li>あなたがリコンパイル可能な場合、PHPを<i>--enable-memory-limit</i>オプションでコンパイルしてください。これにより、Moodle自身がメモリ制限を設定することが可能になります。</li>
<li>あなたがphp.iniファイルにアクセスできる場合、<b>memory_limit</b>設定を40Mのように変更することができます。php.iniファイルにアクセスできない場合、管理者に変更を依頼してください。</li>
<li>いくつかのPHPサーバでは下記の行を含む.htaccessファイルをMoodleディレクトリに作成することができます:
<li>いくつかのPHPサーバでは下記の行を含む.htaccessファイルをMoodleディレクトリに作成することができます:
<blockquote><div>php_value memory_limit 40M</div></blockquote>
<p>しかし、この設定が<b>すべての</b>PHPページの動作を妨げる場合もあります。ページ閲覧中にエラーが表示される場合、.htaccessファイルを削除してください。</p></li>
</ol>';
@@ -91,7 +91,7 @@ $string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
$string['welcomep20'] = 'インストールが正常に完了して、あなたのコンピュータで <strong>{$a->packname} {$a->packversion}</strong> パッケージが起動されたため、このページが表示されています。おめでとうございます!';
$string['welcomep30'] = 'このリリース <strong>{$a->installername}</strong> には<strong>Moodle</strong>で環境を作成するアプリケーションが含まれています。すなわち:';
$string['welcomep40'] = 'パッケージには <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong> も含まれています。';
$string['welcomep50'] = 'このパッケージ内のすべてのアプリケーションの使用は個のライセンスによって規定されています。全体の<strong>{$a->installername}</strong>パッケージは<a href="http://www.opensource.org/docs/definition_plain.html">オープンソース</a>であり、<a href="http://www.gnu.org/copyleft/gpl.html">GPL</a>ライセンスの下で配布されています。';
$string['welcomep50'] = 'このパッケージ内のすべてのアプリケーションの使用は個のライセンスによって規定されています。全体の<strong>{$a->installername}</strong>パッケージは<a href="http://www.opensource.org/docs/definition_plain.html">オープンソース</a>であり、<a href="http://www.gnu.org/copyleft/gpl.html">GPL</a>ライセンスの下で配布されています。';
$string['welcomep60'] = '次からのページはあなたのコンピュータに<strong>Moodle</strong>を簡単に設定およびセットアップする手順にしたがって進みます。あなたはデフォルトの設定を使用することも、必要に応じて任意で設定を変更することもできます。';
$string['welcomep70'] = '<strong>Moodle</strong>のセットアップを続けるには「次へ」ボタンをクリックしてください。';
$string['wwwroot'] = 'ウェブアドレス';
+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['availablelangs'] = 'ಲಭ್ಯವಿರುವ ಭಾಷಾ ಪೊಟ್ಟಣಗಳು';
+1
View File
@@ -40,3 +40,4 @@ $string['cliunknowoption'] = 'Neatpažintos parinktys: {$a} naudokite --žinyno
$string['cliyesnoprompt'] = 'įveskite t (taip) arba n (ne)';
$string['environmentrequireinstall'] = 'turi būti įdiegta ir įjungta';
$string['environmentrequireversion'] = 'būtina naudoti versiją {$a->needed}, o jūs naudojate {$a->current}';
$string['upgradekeyset'] = 'Naujovinimo raktas (palikite tuščią, jei nenorite nustatyti)';
-1
View File
@@ -30,6 +30,5 @@
defined('MOODLE_INTERNAL') || die();
$string['parentlanguage'] = '';
$string['thisdirection'] = 'ltr';
$string['thislanguage'] = 'Lietuvių';
+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'] = 'ltr';
$string['thislanguage'] = 'Te Reo Māori';
+3
View File
@@ -37,6 +37,9 @@ $string['cliincorrectvalueerror'] = 'Грешка, погрешна вредно
$string['cliincorrectvalueretry'] = 'Неточни вредност, ве молиме обидете се повторно';
$string['clitypevalue'] = 'впишете вредност';
$string['clitypevaluedefault'] = 'впишете вредност, притиснете Enter за да го користите стандардната вредност ({$a})';
$string['cliunknowoption'] = 'Непрепознаена опција:
{$a}
Ве молиме употребете --help опција.';
$string['cliyesnoprompt'] = 'впишете y (значи да) или n (значи не)';
$string['environmentrequireinstall'] = 'потребно е да се инсталира/овозможи';
$string['environmentrequireversion'] = 'верзијата {$a->needed} е потребна, а вие извршувате {$a->current}';
+3 -3
View File
@@ -35,11 +35,11 @@ $string['cliansweryes'] = 'y';
$string['cliincorrectvalueerror'] = 'Error, valor incorrècta « {$a->value} » pel paramètre « {$a->option} »';
$string['cliincorrectvalueretry'] = 'Valor incorrècta, ensajar tornamai';
$string['clitypevalue'] = 'tipe valor';
$string['clitypevaluedefault'] = 'tipe valor, tapez Entrée per utilizar la valor per defaut ({$a})';
$string['clitypevaluedefault'] = 'tipe valor, picatz Entrada per utilizar la valor per defaut ({$a})';
$string['cliunknowoption'] = 'Options non reconegudas :
{$a}.
Utilisez l\'option --help.';
Utilizatz l\'opcion --help.';
$string['cliyesnoprompt'] = 'Picatz y (per òc) o n (per non)';
$string['environmentrequireinstall'] = 'doit èsser installat e activat';
$string['environmentrequireinstall'] = 'deu èsser installat e activat';
$string['environmentrequireversion'] = 'la version {$a->needed} es requesida ; utilizatz actualament la version {$a->current}';
$string['upgradekeyset'] = 'Metre a jorn la clau (daissar void per la definir pas)';
+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'] = 'Pidgin';
+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>';
+1 -2
View File
@@ -46,8 +46,7 @@ $string['dmlexceptiononinstall'] = '<p> Ocorreu um erro no banco de dados [{$a->
$string['downloadedfilecheckfailed'] = 'A verificação do arquivo baixado falhou';
$string['invalidmd5'] = 'A variável de verificação estava errada - tente novamente';
$string['missingrequiredfield'] = 'Faltam informações obrigatórias';
$string['remotedownloaderror'] = '<p>O download do componente falhou, por favor verifique as configurações do proxy. A extensão cURL do PHP é altamente recomendada.</p>
<p>Você precisar baixar o <a href="{$a->url}">{$a->url}</a> manualmente, copiar para "{$a->dest}" e descompactar lá.</p>';
$string['remotedownloaderror'] = '<p>O download do componente falhou, por favor verifique as configurações do proxy. A extensão cURL do PHP é altamente recomendada.</p><p>Você precisar baixar o <a href="{$a->url}">arquivo</a> manualmente, copiar para "{$a->dest}" e descompactar lá.</p>';
$string['wrongdestpath'] = 'Caminho do destino errado';
$string['wrongsourcebase'] = 'URL do recurso errada';
$string['wrongzipfilename'] = 'Nome do arquivo ZIP errado';
+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';
+6
View File
@@ -71,5 +71,11 @@ $string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
$string['welcomep20'] = 'Vedeți această pagină deoarece ați instalat și lansat cu succes pachetul <strong>{$a->packname} {$a->packversion}</strong> în computerul dumneavoastră. Felicitări!';
$string['welcomep30'] = 'Această versiune <strong>{$a->installername}</strong> include aplicații pentru a crea un mediu în care <strong>Moodle</strong> va funcționa, și anume:';
$string['welcomep40'] = 'Pachetul include și <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong>.';
$string['welcomep50'] = 'Utilizarea tuturor aplicațiilor din acest pachet este determinată de respectivele lor
licențe. Pachetul complet <strong>{$a->installername}</strong> este
<a href="http://www.opensource.org/docs/definition_plain.html">open source</a> și este distribuit sub licența <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a>.';
$string['welcomep60'] = 'Următoarele pagini vă oferă pași ușor de urmat pentru a
configura și seta <strong>Moodle</strong> în computerul dumneavoastră. Puteți accepta setările implicite
sau, opțional, să le modificați pentru a corespunde nevoilor dumneavoastră.';
$string['welcomep70'] = 'Click pe butonul "Next" de mai jos pentru a continua setarea <strong>Moodle</strong>.';
$string['wwwroot'] = 'Adresă Web';
+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
@@ -31,6 +31,7 @@
defined('MOODLE_INTERNAL') || die();
$string['language'] = 'Jazyk';
$string['moodlelogo'] = 'Moodle logo';
$string['next'] = 'Ďalší';
$string['previous'] = 'Predchádzajúci';
$string['reload'] = 'Reload';
+4
View File
@@ -30,6 +30,9 @@
defined('MOODLE_INTERNAL') || die();
$string['cannotcreatedboninstall'] = '<p>Podatkovne zbirke ni bilo mogoče ustvariti.</p>
<p>Navedena podatkovna zbirka ne obstaja in navedeni uporabnik nima dovoljenja, da ustvari podatkovno zbirko.</p>
<p>Skrbnik spletnega mesta mora potrditi konfiguracijo podatkovne zbirke.</p>';
$string['cannotcreatelangdir'] = 'Imenika jezika ni možno ustvariti.';
$string['cannotcreatetempdir'] = 'Začasnega imenika ni možno ustvariti.';
$string['cannotdownloadcomponents'] = 'Komponent ni možno prenesti.';
@@ -39,6 +42,7 @@ $string['cannotsavemd5file'] = 'Datoteke MD5 ni možno shraniti.';
$string['cannotsavezipfile'] = 'Datoteke ZIP ni možno shraniti.';
$string['cannotunzipfile'] = 'Datoteke ni možno razširiti (unzip).';
$string['componentisuptodate'] = 'Komponenta je posodobljena.';
$string['dmlexceptiononinstall'] = '<p>Prišlo je do napake podatkovne zbirke [{$a->errorcode}].<br />{$a->debuginfo}</p>';
$string['downloadedfilecheckfailed'] = 'Preverjanje prenesene datoteke je spodletelo.';
$string['invalidmd5'] = 'Neveljaven MD5';
$string['missingrequiredfield'] = 'Eno izmed zahtevanih polj manjka';
+5 -6
View File
@@ -33,7 +33,7 @@ defined('MOODLE_INTERNAL') || die();
$string['admindirname'] = 'Администраторски директоријум';
$string['availablelangs'] = 'Доступни језички пакети';
$string['chooselanguagehead'] = 'Изаберите језик';
$string['chooselanguagesub'] = 'Молимо изаберите језик који ће се користити током инсталације. Овај језик ће, такође, бити коришћен на нивоу сајта као подразумевани, мада то накнадно може бити промењено.';
$string['chooselanguagesub'] = 'Изаберите језик који ће се користити током инсталације. Овај језик ће, такође, бити коришћен на нивоу сајта као подразумевани, иако то накнадно може да се промени.';
$string['clialreadyconfigured'] = 'Датотека config.php већ постоји. Молимо, користите admin/cli/install_database.php ако желите да инсталирате Moodle на овом серверу.';
$string['clialreadyinstalled'] = 'Датотека config.php већ постоји. Молимо користите admin/cli/upgrade.php ако желите да надоградите Moodle на овом серверу.';
$string['cliinstallheader'] = 'Moodle {$a} програм за инсталацију из командне линије';
@@ -73,17 +73,16 @@ $string['pathssubdataroot'] = '<p>Директоријум где ће Moodle ч
<p>Уколико овај директоријум не постоји процес инсталације ће покушати да га креира.</p>';
$string['pathssubdirroot'] = '<p>Пуна путања до директоријума који садржи кôд Moodlea.</p>';
$string['pathssubwwwroot'] = '<p>Пуна адреса путем које ће се приступати Moodleu, тј. адреса коју ће корисници унети у адресну траку својих веб читача како би приступили Moodleu.</p>
<p>Није могуће приступати Moodleu коришћењем више адреса Ако се вашем сајту може приступити са више адреса, онда изаберите најлакшу, а за све остале адресе подесите перманентну редирекцију.</p>
<p>Ако се вашем сајту може приступити са интернета али и са унутрашње мреже (која се понекад назив интранет), онда овде употребите јавну адресу.</p>
<p>Није могуће приступати Moodleu коришћењем више адреса. Ако се вашем сајту може приступити са више адреса, онда изаберите најлакшу, а за све остале адресе подесите перманентну редирекцију.</p>
<p>Ако се вашем сајту може приступити како са интернета, тако и из интерне мреже (која се понекад назив интранет), онда овде употребите јавну адресу.</p>
<p>Ако је текућа адреса нетачна, молимо вас, промените URL адресу у адресној траци свог веб читача и поново покрените инсталацију.</p>';
$string['pathsunsecuredataroot'] = 'Dataroot локација није безбедна';
$string['pathswrongadmindir'] = 'Админ директоријум не постоји';
$string['phpextension'] = '{$a} PHP екстензија';
$string['phpversion'] = 'PHP верзија';
$string['phpversionhelp'] = '<p>Moodle захтева најмање PHP верзију 4.3.0 или 5.1.0 (5.0.x има бројне уочене проблеме).</p>
$string['phpversionhelp'] = '<p>Moodle захтева најмање PHP верзију 5.4.4 или 7.1 (7.0.x има нека ограничења).</p>
<p>Тренутно користите верзију {$a}</p>
<p>Морате надоградити PHP или преместити Moodle на веб сервер са новијом верзијом PHP-a!</br>
(У случају верзије 5.0.x можете, такође, да се вратите на 4.4.x верзију)</p>';
<p>Морате да надоградите PHP или да преместити Moodle на веб сервер са новијом верзијом PHP-a.</p>';
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
$string['welcomep20'] = 'Ову страницу видите зато што сте успешно инсталирали и покренули <strong>{$a->packname} {$a->packversion}</strong> пакет на свом серверу. Честитамо!';
$string['welcomep30'] = 'Ово издање <strong>{$a->installername}</strong> укључује апликације за креирање окружења у којем ће <strong>Moodle</strong> успешно функционисати, конкретно:';
+4 -8
View File
@@ -33,7 +33,7 @@ defined('MOODLE_INTERNAL') || die();
$string['admindirname'] = 'Administratorski direktorijum';
$string['availablelangs'] = 'Dostupni jezički paketi';
$string['chooselanguagehead'] = 'Izaberite jezik';
$string['chooselanguagesub'] = 'Molimo izaberite jezik koji će se koristiti tokom instalacije. Ovaj jezik će, takođe, biti korišćen na nivou sajta kao podrazumevani, mada to naknadno može biti promenjeno.';
$string['chooselanguagesub'] = 'Izaberite jezik koji će se koristiti tokom instalacije. Ovaj jezik će, takođe, biti korišćen na nivou sajta kao podrazumevani, iako to naknadno može da se promeni.';
$string['clialreadyconfigured'] = 'Datoteka config.php već postoji. Molimo, koristite admin/cli/install_database.php ako želite da instalirate Moodle na ovom serveru.';
$string['clialreadyinstalled'] = 'Datoteka config.php već postoji. Molimo koristite admin/cli/upgrade.php ako želite da nadogradite Moodle na ovom serveru.';
$string['cliinstallheader'] = 'Moodle {$a} program za instalaciju iz komandne linije';
@@ -72,18 +72,14 @@ $string['pathssubdataroot'] = '<p>Direktorijum gde će Moodle čuvati datoteke i
<p>Direktorijum ne sme biti dostupan direktno preko veba. </p>
<p>Ukoliko ovaj direktorijum ne postoji proces instalacije će pokušati da ga kreira.</p>';
$string['pathssubdirroot'] = '<p>Puna putanja do direktorijuma koji sadrži kôd Moodlea.</p>';
$string['pathssubwwwroot'] = '<p>Puna adresa putem koje će se pristupati Moodleu, tj. adresa koju će korisnici uneti u adresnu traku svojih veb čitača kako bi pristupili Moodleu.</p>
<p>Nije moguće pristupati Moodleu korišćenjem više adresa Ako se vašem sajtu može pristupiti sa više adresa, onda izaberite najlakšu, a za sve ostale adrese podesite permanentnu redirekciju.</p>
<p>Ako se vašem sajtu može pristupiti sa interneta ali i sa unutrašnje mreže (koja se ponekad naziv intranet), onda ovde upotrebite javnu adresu.</p>
<p>Ako je tekuća adresa netačna, molimo vas, promenite URL adresu u adresnoj traci svog veb čitača i ponovo pokrenite instalaciju.</p>';
$string['pathssubwwwroot'] = '<p>Puna adresa putem koje će se pristupati Moodleu, tj. adresa koju će korisnici uneti u adresnu traku svojih veb čitača kako bi pristupili Moodleu.</p> <p>Nije moguće pristupati Moodleu korišćenjem više adresa. Ako se vašem sajtu može pristupiti sa više adresa, onda izaberite najlakšu, a za sve ostale adrese podesite permanentnu redirekciju.</p> <p>Ako se vašem sajtu može pristupiti kako sa interneta, tako i iz interne mreže (koja se ponekad naziv intranet), onda ovde upotrebite javnu adresu.</p> <p>Ako je tekuća adresa netačna, molimo vas, promenite URL adresu u adresnoj traci svog veb čitača i ponovo pokrenite instalaciju.</p>';
$string['pathsunsecuredataroot'] = 'Dataroot lokacija nije bezbedna';
$string['pathswrongadmindir'] = 'Admin direktorijum ne postoji';
$string['phpextension'] = '{$a} PHP ekstenѕija';
$string['phpversion'] = 'PHP verzija';
$string['phpversionhelp'] = '<p>Moodle zahteva najmanje PHP verziju 4.3.0 ili 5.1.0 (5.0.x ima brojne uočene probleme).</p>
$string['phpversionhelp'] = '<p>Moodle zahteva najmanje PHP verziju 5.4.4 ili 7.1 (7.0.x ima neka ograničenja).</p>
<p>Trenutno koristite verziju {$a}</p>
<p>Morate nadograditi PHP ili premestiti Moodle na veb server sa novijom verzijom PHP-a!</br>
(U slučaju verzije 5.0.x možete, takođe, da se vratite na 4.4.x verziju)</p>';
<p>Morate da nadogradite PHP ili da premestiti Moodle na veb server sa novijom verzijom PHP-a.</p>';
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
$string['welcomep20'] = 'Ovu stranicu vidite zato što ste uspešno instalirali i pokrenuli <strong>{$a->packname} {$a->packversion}</strong> paket na svom serveru. Čestitamo!';
$string['welcomep30'] = 'Ovo izdanje <strong>{$a->installername}</strong> uključuje aplikacije za kreiranje okruženja u kojem će <strong>Moodle</strong> uspešno funkcionisati, konkretno:';
+1
View File
@@ -31,3 +31,4 @@
defined('MOODLE_INTERNAL') || die();
$string['databasename'] = 'Databasens namn';
$string['welcomep50'] = 'Användningen av alla applikationer i detta paket regleras av sina respektive licenser. Det fullständiga paketet <strong>{$a->installername}</strong> är <a href="http://www.opensource.org/docs/definition_plain.html">Öppen källkod</a> och distribueras under <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a> licensen.';
+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';
+3 -1
View File
@@ -46,7 +46,9 @@ $string['dmlexceptiononinstall'] = '<p>Bir veritabanı hatası oluştu [{$a->err
$string['downloadedfilecheckfailed'] = 'İndirilen dosya kontrolü hatası';
$string['invalidmd5'] = 'Kontrol değişkeni yanlış - yeniden deneyin';
$string['missingrequiredfield'] = 'Gerekli alanlardan bazıları eksik';
$string['remotedownloaderror'] = 'Bileşeni sunucunuza indirirken hata oluştu, lütfen proxy(vekil) ayarlarını kontrol edin. PHP cURL eklentisi şiddetle tavsiye edilir.<br /><br /><a href="{$a->url}">{$a->url}</a><br />dosyasını kendiniz indirmeli ve indirdiğiniz dosyayı sunucunuzundaki "{$a->dest}" klasörüne kaydetmeli ve zip arşivini açmalısınız.';
$string['remotedownloaderror'] = '<p>Bileşeni sunucunuza indirirken hata oluştu, lütfen proxy ayarlarını kontrol edin. PHP cURL eklentisi şiddetle tavsiye edilir.</p>
<p><a href="{$a->url}">{$a->url}</a> dosyasını kendiniz indirmeli ve indirdiğiniz dosyayı sunucunuzundaki "{$a->dest}" klasörüne kaydetmeli ve zip arşivini açmalısınız.
</p>';
$string['wrongdestpath'] = 'Yanlış hedef yolu';
$string['wrongsourcebase'] = 'Yanlış kaynak URL tabanı';
$string['wrongzipfilename'] = 'Yanlış ZIP dosya adı';
+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'] = 'ئۇيغۇرچە';
+52 -19
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 test_geoip() {
global $CFG;
require_once("$CFG->libdir/filelib.php");
require_once("$CFG->dirroot/iplookup/lib.php");
public function setUp() {
if (!PHPUNIT_LONGTEST) {
// this may take a long time
return;
// 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);
}
@@ -70,17 +78,42 @@ class core_iplookup_geoip_testcase extends advanced_testcase {
$this->assertTrue(file_exists($geoipfile));
$CFG->geoipfile = $geoipfile;
}
$result = iplookup_find_location('147.230.16.1');
/**
* 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();
$this->assertEquals('array', gettype($result));
$this->assertEquals('Liberec', $result['city']);
$this->assertEquals(15.0653, $result['longitude'], '', 0.001);
$this->assertEquals(50.7639, $result['latitude'], '', 0.001);
// 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.
$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('Liberec', $result['title'][0]);
$this->assertEquals('Czech Republic', $result['title'][1]);
}
/**
* Data provider for IP lookup test.
*
* @return array
*/
public function ip_provider() {
return [
'IPv4: github.com' => ['192.30.255.112'],
];
}
}
+10 -9
View File
@@ -31,30 +31,31 @@ defined('MOODLE_INTERNAL') || die();
*/
class core_iplookup_geoplugin_testcase extends advanced_testcase {
public function test_geoip() {
public function setUp() {
global $CFG;
require_once("$CFG->libdir/filelib.php");
require_once("$CFG->dirroot/iplookup/lib.php");
if (!PHPUNIT_LONGTEST) {
// we do not want to DDOS their server, right?
return;
$this->markTestSkipped('PHPUNIT_LONGTEST is not defined');
}
$this->resetAfterTest();
$CFG->geoipfile = '';
}
$result = iplookup_find_location('147.230.16.1');
public function test_geoip_ipv4() {
$result = iplookup_find_location('192.30.255.112');
$this->assertEquals('array', gettype($result));
$this->assertEquals('Liberec', $result['city']);
$this->assertEquals(15.0653, $result['longitude'], '', 0.001);
$this->assertEquals(50.7639, $result['latitude'], '', 0.001);
$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);
$this->assertNull($result['error']);
$this->assertEquals('array', gettype($result['title']));
$this->assertEquals('Liberec', $result['title'][0]);
$this->assertEquals('Czech Republic', $result['title'][1]);
$this->assertEquals('San Francisco', $result['title'][0]);
$this->assertEquals('United States', $result['title'][1]);
}
}
+5 -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';
@@ -416,6 +416,7 @@ $string['deleteunconfirmed'] = 'Delete not fully setup users after';
$string['deleteuser'] = 'Delete user';
$string['density'] = 'Density';
$string['denyemailaddresses'] = 'Denied email domains';
$string['devlibdirpresent'] = 'Directories with development libraries such as <em>vendor</em> or <em>node_modules</em> should not be present on public sites. See the <a href="{$a->moreinfourl}">security overview report</a> for more details.';
$string['development'] = 'Development';
$string['devicedetectregex'] = 'Device detection regular expressions';
$string['devicedetectregex_desc'] = '<p>By default, Moodle can detect devices of the type default (desktop PCs, laptops, etc), mobile (phones and small hand held devices), tablet (iPads, Android tablets) and legacy (Internet Explorer 6 users). The theme selector can be used to apply separate themes to all of these. This setting allows regular expressions that allow the detection of extra device types (these take precedence over the default types).</p>
@@ -588,6 +589,7 @@ $string['indexdata'] = 'Index data';
$string['installhijacked'] = 'Installation must be finished from the original IP address, sorry.';
$string['installsessionerror'] = 'Can not initialise PHP session, please verify that your browser accepts cookies.';
$string['intlrecommended'] = 'Intl extension is used to improve internationalization support, such as locale aware sorting.';
$string['intlrequired'] = 'Intl extension is required to improve internationalization support, such as locale aware sorting and international domain names.';
$string['invalidsection'] = 'Invalid section.';
$string['invaliduserchangeme'] = 'Username "changeme" is reserved -- you cannot create an account with it.';
$string['ipblocked'] = 'This site is not available currently.';
@@ -1087,6 +1089,7 @@ $string['unsupporteddbstorageengine'] = 'The database storage engine being used
$string['unsupporteddbtablerowformat'] = 'Your database has tables using Antelope as the file format. You are recommended to convert the tables to the Barracuda file format. See the documentation <a href="https://docs.moodle.org/en/cli">Administration via command line</a> for details of a tool for converting InnoDB tables to Barracuda.';
$string['unsupportedphpversion7'] = 'PHP version 7 is not supported.';
$string['unsupportedphpversion71'] = 'PHP version 7.1 is not supported.';
$string['unsupportedphpversion72'] = 'PHP version 7.2 is not supported.';
$string['unsuspenduser'] = 'Activate user account';
$string['updateaccounts'] = 'Update existing accounts';
$string['updatecomponent'] = 'Update component';
+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';
+2
View File
@@ -164,6 +164,7 @@ $string['manage'] = 'Manage repositories';
$string['manageinstances'] = 'Manage instances';
$string['manageurl'] = 'Manage';
$string['manageuserrepository'] = 'Manage individual repository';
$string['missingsourcekey'] = 'The source key is missing. This key must also be provided to retrieve the file.';
$string['moving'] = 'Moving';
$string['name'] = 'Name';
$string['newfolder'] = 'New folder';
@@ -220,6 +221,7 @@ $string['setmainfile'] = 'Set main file';
$string['setmainfile_help'] = 'If there are multiple files in the folder, the main file is the one that appears on the view page. Other files such as images or videos may be embedded in it. In filemanager the main file is indicated with a title in bold.';
$string['siteinstances'] = 'Repositories instances of the site';
$string['size'] = 'Size';
$string['sourcekeymismatch'] = 'The source url does not match the sourcekey.';
$string['submit'] = 'Submit';
$string['sync'] = 'Sync';
$string['syncfiletimeout'] = 'Sync file timeout';
+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';
+11
View File
@@ -1593,3 +1593,14 @@ function restrict_php_version(&$result, $version) {
function restrict_php_version_71(&$result) {
return restrict_php_version($result, '7.1');
}
/**
* Check if the current PHP version is greater than or equal to
* PHP version 7.2.
*
* @param object $result an environment_results instance
* @return bool result of version check
*/
function restrict_php_version_72(&$result) {
return restrict_php_version($result, '7.2');
}
+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.
+1 -1
View File
@@ -2299,7 +2299,7 @@ class global_navigation extends navigation_node {
$reports = core_component::get_plugin_list('gradereport');
arsort($reports); // User is last, we want to test it first.
$userscourses = enrol_get_users_courses($user->id);
$userscourses = enrol_get_users_courses($user->id, false, '*');
$userscoursesnode = $usernode->add(get_string('courses'));
$count = 0;
+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();
}
}
+10 -7
View File
@@ -152,17 +152,20 @@ function xmldb_feedback_upgrade($oldversion) {
// Related values in feedback_value won't be deleted (they won't be used and can be kept there as a backup).
$sql = "SELECT MAX(id) as maxid, userid, feedback, courseid
FROM {feedback_completed}
WHERE userid <> 0
WHERE userid <> 0 AND anonymous_response = :notanonymous
GROUP BY userid, feedback, courseid
HAVING COUNT(id) > 1";
$params = ['notanonymous' => 2]; // FEEDBACK_ANONYMOUS_NO.
$duplicatedrows = $DB->get_recordset_sql($sql);
$duplicatedrows = $DB->get_recordset_sql($sql, $params);
foreach ($duplicatedrows as $row) {
$DB->delete_records_select('feedback_completed', 'userid = ? AND feedback = ? AND courseid = ? AND id <> ?', array(
$row->userid,
$row->feedback,
$row->courseid,
$row->maxid,
$DB->delete_records_select('feedback_completed', 'userid = ? AND feedback = ? AND courseid = ? AND id <> ?'.
' AND anonymous_response = ?', array(
$row->userid,
$row->feedback,
$row->courseid,
$row->maxid,
2, // FEEDBACK_ANONYMOUS_NO.
));
}
$duplicatedrows->close();
+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;
}
+1 -1
View File
@@ -267,7 +267,7 @@ if (!$students) {
echo '<legend class="ftoggler">'.get_string('send_message', 'feedback').'</legend>';
echo '<div>';
echo '<label for="feedback_subject">'.get_string('subject', 'feedback').'&nbsp;</label>';
echo '<input type="text" id="feedback_subject" size="50" maxlength="255" name="subject" value="'.$subject.'" />';
echo '<input type="text" id="feedback_subject" size="50" maxlength="255" name="subject" value="'.s($subject).'" />';
echo '</div>';
print_textarea(true, 15, 25, 30, 10, "message", $message);
print_string('formathtml');
+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();
}
}
+1 -3
View File
@@ -210,9 +210,7 @@ if (!$result->correctanswer && !$result->noanswer && !$result->isessayquestion &
$url = new moodle_url('/mod/lesson/view.php', array('id'=>$cm->id, 'pageid'=>$result->newpageid));
if ($lesson->review && !$result->correctanswer && !$result->noanswer && !$result->isessayquestion && !$result->maxattemptsreached) {
// When the answer is wrong - the result->newpageid points back to the current question.
$newpageid = $lesson->get_next_page($page->nextpageid);
$url = new moodle_url('/mod/lesson/view.php', array('id'=>$cm->id, 'pageid'=>$newpageid));
// Button to continue the lesson (the page to go is configured by the teacher).
echo $OUTPUT->single_button($url, get_string('reviewquestioncontinue', 'lesson'));
} else {
// Normal continue button
+21
View File
@@ -387,5 +387,26 @@ function xmldb_lesson_upgrade($oldversion) {
// Moodle v3.1.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2016052301) {
// Delete orphaned lesson answer and response files.
$sql = "SELECT DISTINCT f.contextid, f.component, f.filearea, f.itemid
FROM {files} f
LEFT JOIN {lesson_answers} la ON f.itemid = la.id
WHERE component = :component
AND (filearea = :fileareaanswer OR filearea = :filearearesponse)
AND la.id IS NULL";
$orphanedfiles = $DB->get_recordset_sql($sql, array('component' => 'mod_lesson', 'fileareaanswer' => 'page_answers',
'filearearesponse' => 'page_responses'));
$fs = get_file_storage();
foreach ($orphanedfiles as $file) {
$fs->delete_area_files($file->contextid, $file->component, $file->filearea, $file->itemid);
}
$orphanedfiles->close();
upgrade_mod_savepoint(true, 2016052301, 'lesson');
}
return true;
}
+9 -2
View File
@@ -2291,6 +2291,15 @@ abstract class lesson_page extends lesson_base {
$DB->delete_records("lesson_attempts", array("pageid" => $this->properties->id));
$DB->delete_records("lesson_branch", array("pageid" => $this->properties->id));
// Delete files related to answers and responses.
if ($answers = $DB->get_records("lesson_answers", array("pageid" => $this->properties->id))) {
foreach ($answers as $answer) {
$fs->delete_area_files($context->id, 'mod_lesson', 'page_answers', $answer->id);
$fs->delete_area_files($context->id, 'mod_lesson', 'page_responses', $answer->id);
}
}
// ...now delete the answers...
$DB->delete_records("lesson_answers", array("pageid" => $this->properties->id));
// ..and the page itself
@@ -2310,8 +2319,6 @@ abstract class lesson_page extends lesson_base {
// Delete files associated with this page.
$fs->delete_area_files($context->id, 'mod_lesson', 'page_contents', $this->properties->id);
$fs->delete_area_files($context->id, 'mod_lesson', 'page_answers', $this->properties->id);
$fs->delete_area_files($context->id, 'mod_lesson', 'page_responses', $this->properties->id);
// repair the hole in the linkage
if (!$this->properties->prevpageid && !$this->properties->nextpageid) {
@@ -115,49 +115,6 @@ Feature: In a lesson activity, students can not re-attempt a question more than
When I press "Submit"
Then I should see "Maximum number of attempts reached - Moving to next page"
Scenario: Check that we can move past a question we don't want to re-attempt
Given I log in as "teacher1"
And I am on site homepage
And I follow "Course 1"
And I follow "Test lesson name"
And I navigate to "Edit settings" in current page administration
And I expand all fieldsets
And I set the field "Provide option to try a question again" to "Yes"
And I set the field "Maximum number of attempts" to "3"
And I press "Save and display"
And I log out
And I log in as "student1"
And I am on site homepage
And I follow "Course 1"
And I follow "Test lesson name"
And I should see "First page contents"
And I press "Next page"
And I should see "The earth is round"
And I set the following fields to these values:
| False| 1 |
And I press "Submit"
And I should see "Wrong"
When I press "No, I just want to go on to the next question"
Then I should not see "The earth is round"
And I should see "Kermit is a frog"
And I set the following fields to these values:
| False | 1 |
And I press "Submit"
And I should see "Wrong"
And I press "Yes, I'd like to try again"
And I should see "Kermit is a frog"
And I set the following fields to these values:
| False | 1 |
And I press "Submit"
And I should see "Wrong"
And I press "Yes, I'd like to try again"
And I should see "Kermit is a frog"
And I set the following fields to these values:
| False | 1 |
And I press "Submit"
And I should not see "Yes, I'd like to try again"
And I should see "Continue"
@javascript @_bug_phantomjs
Scenario: Check that we can not click back on the browser at the last quiz result page and re-attempt the last question to get full marks
Given I log in as "student1"
+1 -1
View File
@@ -24,7 +24,7 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2016052300; // The current module version (Date: YYYYMMDDXX)
$plugin->version = 2016052301; // The current module version (Date: YYYYMMDDXX)
$plugin->requires = 2016051900; // Requires this Moodle version
$plugin->component = 'mod_lesson'; // Full name of the plugin (used for diagnostics)
$plugin->cron = 0;
+14 -6
View File
@@ -859,7 +859,7 @@ class mod_quiz_external extends external_api {
/**
* Describes a single question structure.
*
* @return external_single_structure the question structure
* @return external_single_structure the question data. Some fields may not be returned depending on the quiz display settings.
* @since Moodle 3.1
*/
private static function question_structure() {
@@ -871,11 +871,16 @@ class mod_quiz_external extends external_api {
'html' => new external_value(PARAM_RAW, 'the question rendered'),
'flagged' => new external_value(PARAM_BOOL, 'whether the question is flagged or not'),
'number' => new external_value(PARAM_INT, 'question ordering number in the quiz', VALUE_OPTIONAL),
'state' => new external_value(PARAM_ALPHA, 'the state where the question is in', VALUE_OPTIONAL),
'state' => new external_value(PARAM_ALPHA, 'the state where the question is in.
It will not be returned if the user cannot see it due to the quiz display correctness settings.',
VALUE_OPTIONAL),
'status' => new external_value(PARAM_RAW, 'current formatted state of the question', VALUE_OPTIONAL),
'mark' => new external_value(PARAM_RAW, 'the mark awarded', VALUE_OPTIONAL),
'maxmark' => new external_value(PARAM_FLOAT, 'the maximum mark possible for this question attempt', VALUE_OPTIONAL),
)
'mark' => new external_value(PARAM_RAW, 'the mark awarded.
It will be returned only if the user is allowed to see it.', VALUE_OPTIONAL),
'maxmark' => new external_value(PARAM_FLOAT, 'the maximum mark possible for this question attempt.
It will be returned only if the user is allowed to see it.', VALUE_OPTIONAL),
),
'The question data. Some fields may not be returned depending on the quiz display settings.'
);
}
@@ -907,7 +912,10 @@ class mod_quiz_external extends external_api {
if ($attemptobj->is_real_question($slot)) {
$question['number'] = $attemptobj->get_question_number($slot);
$question['state'] = (string) $attemptobj->get_question_state($slot);
$showcorrectness = $displayoptions->correctness && $attemptobj->get_question_attempt($slot)->has_marks();
if ($showcorrectness) {
$question['state'] = (string) $attemptobj->get_question_state($slot);
}
$question['status'] = $attemptobj->get_question_status($slot, $displayoptions->correctness);
}
if ($displayoptions->marks >= question_display_options::MAX_ONLY) {
+10 -2
View File
@@ -850,6 +850,9 @@ class mod_quiz_external_testcase extends externallib_advanced_testcase {
// Create a new quiz with one attempt started.
list($quiz, $context, $quizobj, $attempt, $attemptobj) = $this->create_quiz_with_questions(true);
// Set correctness mask so questions state can be fetched only after finishing the attempt.
$DB->set_field('quiz', 'reviewcorrectness', mod_quiz_display_options::IMMEDIATELY_AFTER, array('id' => $quiz->id));
$quizobj = $attemptobj->get_quizobj();
$quizobj->preload_questions();
$quizobj->load_questions();
@@ -868,7 +871,7 @@ class mod_quiz_external_testcase extends externallib_advanced_testcase {
$this->assertEquals(1, $result['questions'][0]['slot']);
$this->assertEquals(1, $result['questions'][0]['number']);
$this->assertEquals('numerical', $result['questions'][0]['type']);
$this->assertEquals('todo', $result['questions'][0]['state']);
$this->assertArrayNotHasKey('state', $result['questions'][0]); // We don't receive the state yet.
$this->assertEquals(get_string('notyetanswered', 'question'), $result['questions'][0]['status']);
$this->assertFalse($result['questions'][0]['flagged']);
$this->assertEquals(0, $result['questions'][0]['page']);
@@ -886,7 +889,7 @@ class mod_quiz_external_testcase extends externallib_advanced_testcase {
$this->assertEquals(2, $result['questions'][0]['slot']);
$this->assertEquals(2, $result['questions'][0]['number']);
$this->assertEquals('numerical', $result['questions'][0]['type']);
$this->assertEquals('todo', $result['questions'][0]['state']);
$this->assertArrayNotHasKey('state', $result['questions'][0]); // We don't receive the state yet.
$this->assertEquals(get_string('notyetanswered', 'question'), $result['questions'][0]['status']);
$this->assertFalse($result['questions'][0]['flagged']);
$this->assertEquals(1, $result['questions'][0]['page']);
@@ -894,6 +897,11 @@ class mod_quiz_external_testcase extends externallib_advanced_testcase {
// Finish previous attempt.
$attemptobj->process_finish(time(), false);
// Now we should receive the question state.
$result = mod_quiz_external::get_attempt_review($attempt->id, 1);
$result = external_api::clean_returnvalue(mod_quiz_external::get_attempt_review_returns(), $result);
$this->assertEquals('gaveup', $result['questions'][0]['state']);
// Change setting and expect two pages.
$quiz->questionsperpage = 4;
$DB->update_record('quiz', $quiz);
@@ -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');

Some files were not shown because too many files have changed in this diff Show More