Compare commits

...

204 Commits

Author SHA1 Message Date
Jun Pataleta 9d8ec047be Moodle release 3.11.14 2023-04-22 16:22:30 +08:00
Eloy Lafuente (stronk7) 731ff89794 weekly release 3.11.13+ 2023-04-21 19:19:29 +02:00
Eloy Lafuente (stronk7) a9ca81e8c9 Merge branch 'install_311_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_311_STABLE 2023-04-21 19:19:24 +02:00
Jun Pataleta d3f5a3c2cc Merge branch 'MDL-77927-311' of https://github.com/stevandoMoodle/moodle into MOODLE_311_STABLE 2023-04-21 16:51:20 +08:00
Jun Pataleta 5f8d85fe23 MDL-77927 core: mod_assignment subplugins environment check 2023-04-21 15:57:36 +08:00
AMOS bot 4f793fe59a Automatically generated installer lang files 2023-04-21 00:07:34 +00:00
Paul Holden 3fd0b34805 MDL-77187 mod_wiki: validate external method sort parameters. 2023-04-19 12:54:30 +00:00
Paul Holden eeae907302 Merge branch 'MDL-77960-311' of https://github.com/lameze/moodle into MOODLE_311_STABLE 2023-04-19 13:41:35 +01:00
Paul Holden 767104a1ff Merge branch 'MDL-77944-311' of https://github.com/andrewnicols/moodle into MOODLE_311_STABLE 2023-04-19 13:06:43 +01:00
Simey Lameze 9e0e54e3c0 MDL-77960 behat: make verification steps more specific 2023-04-19 13:33:49 +08:00
Andrew Nicols 8eaed7a7eb weekly release 3.11.13+ 2023-04-18 22:28:21 +08:00
Andrew Nicols a3e3a3f251 Merge branch 'install_311_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_311_STABLE 2023-04-18 22:28:18 +08:00
Andrew Nicols 1b0c425ade Merge branch 'MDL-77829-311' of https://github.com/stevandoMoodle/moodle into MOODLE_311_STABLE 2023-04-18 12:34:17 +08:00
Andrew Nicols 93bfa46f5e MDL-77944 behat: Rename chrome options for w3c support
From Selenium 4.8.0, support for non-w3c browser control has ended.

We only use W3C browser control these days, and this was missed as part
of the move to W3C. All browser options must be vendor-prefixed.
2023-04-18 09:04:24 +08:00
AMOS bot f4e40a3eb8 Automatically generated installer lang files 2023-04-18 00:07:31 +00:00
Sara Arjona b379d31219 weekly release 3.11.13+ 2023-04-14 10:50:19 +02:00
Sara Arjona 05ab49e052 Merge branch 'install_311_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_311_STABLE 2023-04-14 10:50:16 +02:00
AMOS bot 81c5a10527 Automatically generated installer lang files 2023-04-14 00:07:37 +00:00
Sara Arjona ddfd85697f Merge branch 'MDL-73610_311' of https://github.com/stronk7/moodle into MOODLE_311_STABLE 2023-04-12 18:20:03 +02:00
Sara Arjona e2c90dd430 Merge branch 'MDL-77837-311' of https://github.com/andrewnicols/moodle into MOODLE_311_STABLE 2023-04-11 12:13:27 +02:00
Stevani Andolo 83aa818f08 MDL-77829 core: Added environment check for mod_assignment
Decided to add an environment check before uninstalling the
mod_assignment plugin to prevent data lost.
2023-04-10 13:55:55 +08:00
AMOS bot 9ece6979c1 Automatically generated installer lang files 2023-04-07 00:07:26 +00:00
Andrew Nicols 5e6ae141ce MDL-77837 core: Improve usage docs for cron_setup_user 2023-04-06 23:21:29 +08:00
Andrew Nicols eaa34a048b MDL-77837 phpunit: Ensure that the cron user setter is used
When running an adhoc task in a unit test we should use the cron variant
of the set user method to mimic the behaviour of a real cron run.
2023-04-06 23:21:29 +08:00
Andrew Nicols 5837ade0ea MDL-77837 cron: Ensure user is set when running tasks
We should be proactive in ensuring that the environment is clean when
running a task. We already ensure that we have a clean renderer and
other parts of the output chain, but we were not setting a clean user.

This change adds a call to setup the cron user before each task is
actually executed.
2023-04-06 23:21:29 +08:00
Eloy Lafuente (stronk7) cddda7483d MDL-73610 nodejs: Small updates to required packages
The main goal of this issue is to avoid scanners (Dependabot
and friends), reporting about security issues with the current
xmldom 0.6.0 package.

Note that this doesn't affect prod at all, because it's a dev
dependency, hardly exploitable. So it's not a security fix, just
a security_benefit, if something.

So here, we are updating from xmldom 0.6.0 to @xmldom/xmldom 0.8.7
(note that the package was renamed in 0.7.0, so it's the very same)

Also, when proceeding with the changes, it was detected that we
are incorrectly declaring @babel/eslint-parser as a normal dependency
instead of a development one, so we are also fixing that little detail.

The commands executed to get the changes above applied have been:

- nvm use
- npm install @xmldom/xmldom@^0.8.7 --save-dev
- npm uninstall xmldom
- npm install @babel/eslint-parser@^7.17.0 --save-dev

(we haven't run a complete re-install because we only want to modify
the minimum possible at this stage).
2023-04-06 15:00:03 +02:00
Sara Arjona ca59050173 weekly release 3.11.13+ 2023-04-06 14:02:34 +02:00
Sara Arjona 3334ab4821 Merge branch 'install_311_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_311_STABLE 2023-04-06 14:02:29 +02:00
AMOS bot b409a71f4f Automatically generated installer lang files 2023-04-06 00:07:31 +00:00
AMOS bot 49d7941d81 Automatically generated installer lang files 2023-04-05 00:07:34 +00:00
Andrew Nicols c211a5854f Merge branch 'MDL-77584-311' of https://github.com/ewallah/moodle into MOODLE_311_STABLE 2023-04-04 12:08:01 +08:00
AMOS bot cf7c308bcf Automatically generated installer lang files 2023-04-04 00:07:35 +00:00
Paul Holden abc9f31fa3 Merge branch 'MDL-75906-311' of https://github.com/mickhawkins/moodle into MOODLE_311_STABLE 2023-04-03 14:54:06 +01:00
Michael Hawkins 3178ffa04a MDL-75906 core: Updated security.txt expiry 2023-04-03 17:27:56 +08:00
AMOS bot 513bf77347 Automatically generated installer lang files 2023-04-02 00:07:30 +00:00
AMOS bot 48f24504ca Automatically generated installer lang files 2023-04-01 00:07:38 +00:00
Paul Holden e4918f1e1d weekly release 3.11.13+ 2023-03-31 18:12:01 +01:00
Paul Holden 516d111d94 Merge branch 'install_311_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_311_STABLE 2023-03-31 18:11:59 +01:00
AMOS bot fa348c3a04 Automatically generated installer lang files 2023-03-31 00:07:34 +00:00
Sara Arjona 11b53571e6 Merge branch 'MDL-77761-311' of https://github.com/junpataleta/moodle into MOODLE_311_STABLE 2023-03-30 17:53:32 +02:00
Jun Pataleta d1fd4c2660 Merge branch 'MDL-77333_311' of https://github.com/stronk7/moodle into MOODLE_311_STABLE 2023-03-30 19:03:26 +08:00
AMOS bot 9bd8cdae36 Automatically generated installer lang files 2023-03-30 00:07:37 +00:00
Jun Pataleta 54ed5324ac MDL-77761 core_form: Add label for editor format selector 2023-03-28 23:34:02 +08:00
Eloy Lafuente (stronk7) f1095d111e MDL-77333 mod_resource: fixes generator uploading files + tests
MDL-76499 revealed a few problems with resource generators:

1. We were not covering with unit tests the upload of files from disk
   (and here it's where the problem was).
2. There was a little of confusion between disk paths (only needed
   to upload files) and file_area paths (the generator only creates
   or uploads files to the root directory of the file area.
3. It was possible to request the upload of a file to the generator
   without that file effectively existing.

This commit fixes those points  and covers 99% of the generator code.
2023-03-26 11:44:16 +02:00
AMOS bot 4f62cc1df2 Automatically generated installer lang files 2023-03-26 00:07:33 +00:00
Sara Arjona 170be96134 weekly release 3.11.13+ 2023-03-24 13:59:41 +01:00
Jun Pataleta 8fd2717282 Merge branch 'MDL-77669-311' of https://github.com/andrewnicols/moodle into MOODLE_311_STABLE 2023-03-24 11:51:15 +08:00
Paul Holden 51d69fa94b Merge branch 'MDL-77691-311' of https://github.com/roland04/moodle into MOODLE_311_STABLE 2023-03-23 11:43:44 +00:00
Mikel Martín dcce6d99df MDL-77691 behat: Add step to navigate to profile page directly
Co-authored-by: Simey Lameze <simey@moodle.com>
2023-03-23 08:24:52 +01:00
Ilya Tregubov e978042e2a weekly release 3.11.13+ 2023-03-22 09:37:18 +08:00
Ilya Tregubov 939202d95d Merge branch 'install_311_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_311_STABLE 2023-03-22 09:37:16 +08:00
Meirza 23c31f017f MDL-77669 dml: Added extrainfo in the DB options config.
extrainfo is an extra information for the DB driver, e.g. SQL Server,
has additional configuration according to its environment,
which the administrator can specify to alter and override any connection options.

Co-authored-by: LukeCarrier <luke@carrier.im>

This is a backport of MDL-64153.
2023-03-21 08:48:38 +08:00
Sara Arjona 9b3cf25838 Merge branch 'MDL-77574-311' of https://github.com/lameze/moodle into MOODLE_311_STABLE 2023-03-20 17:06:18 +01:00
AMOS bot a034c0a53b Automatically generated installer lang files 2023-03-20 00:07:34 +00:00
AMOS bot d3eea84c50 Automatically generated installer lang files 2023-03-19 00:07:29 +00:00
AMOS bot 455ca43140 Automatically generated installer lang files 2023-03-18 00:07:34 +00:00
Sara Arjona 7d8be2a715 weekly release 3.11.13+ 2023-03-17 17:58:44 +01:00
Sara Arjona cf33bc4411 Merge branch 'install_311_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_311_STABLE 2023-03-17 17:58:37 +01:00
AMOS bot a9d42baf99 Automatically generated installer lang files 2023-03-17 00:07:36 +00:00
info@eWallah.net b073419601 MDL-77584 currencies: Fix outdated ISO 4217 code for Zambian Kwacha
On 2013-01-01 the ZMK code got replaced by the new ZMW code.

AMOS BEGIN
 MOV [ZMK,core_currencies],[ZMW,core_currencies]
AMOS END
2023-03-16 19:53:31 +01:00
Jun Pataleta 3b1ca1610e Merge branch 'MDL-77611_311' of https://github.com/timhunt/moodle into MOODLE_311_STABLE 2023-03-15 10:00:37 +08:00
AMOS bot 2ba187b91b Automatically generated installer lang files 2023-03-15 00:07:32 +00:00
Eloy Lafuente (stronk7) 0249b9f16f weekly release 3.11.13+ 2023-03-14 16:07:49 +01:00
Eloy Lafuente (stronk7) 9a45a3fa3f Merge branch 'install_311_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_311_STABLE 2023-03-14 16:07:45 +01:00
Jun Pataleta 223a90679b Merge branch 'MDL-76680/311' of https://github.com/skodak/moodle into MOODLE_311_STABLE 2023-03-14 11:57:01 +08:00
AMOS bot b7d4a3280c Automatically generated installer lang files 2023-03-14 00:07:34 +00:00
Tim Hunt ac15d110ba MDL-77611 tool_uploaduser: fix phpunit assumptions about profile fields 2023-03-13 13:36:42 +00:00
Simey Lameze 9f1de216a4 MDL-77574 myoverview: wait until next button exists before clicking 2023-03-13 14:18:50 +08:00
AMOS bot 0b083a7f6f Automatically generated installer lang files 2023-03-12 00:07:38 +00:00
Petr Skoda aa0d711a6f MDL-76680 core: disable $USER->ignoresesskey on next page 2023-03-11 10:37:45 +01:00
Jun Pataleta cd71612cf6 Moodle release 3.11.13 2023-03-11 13:10:27 +08:00
Jun Pataleta a4874cb9c5 weekly release 3.11.12+ 2023-03-10 22:10:03 +08:00
Jun Pataleta 90818a22ad Merge branch 'install_311_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_311_STABLE 2023-03-10 22:10:01 +08:00
Ilya Tregubov 28bb2b50d6 Merge branch 'MDL-77429-311-fix' of https://github.com/andrewnicols/moodle into MOODLE_311_STABLE 2023-03-10 14:50:40 +08:00
Andrew Nicols 28d6953d48 MDL-77429 course: Change course date to previous day
When a test runs just after midnight, and the user time zone is not the
same as the server timezone, and the course is created using a generator
(which runs in server time zone) but the UI presented in the user
timezone, the course start time is still in the future.

We need to create the course a day earlier to ensure that the "This
week" indicator is in the correct day.
2023-03-10 14:11:23 +08:00
Jun Pataleta c7b3edf823 Merge branch 'MDL-77458-311' of https://github.com/andrewnicols/moodle into MOODLE_311_STABLE 2023-03-10 12:05:56 +08:00
Andrew Nicols 880e150587 Merge branch 'MDL-77429-311' of https://github.com/andelacruz/moodle into MOODLE_311_STABLE 2023-03-09 22:12:39 +08:00
Andrew Nicols 760a316679 Merge branch 'MDL-77463-311' of https://github.com/andelacruz/moodle into MOODLE_311_STABLE 2023-03-09 22:04:24 +08:00
Jun Pataleta 525f816567 Merge branch 'MDL-77559-311-2' of https://github.com/andrewnicols/moodle into MOODLE_311_STABLE 2023-03-09 15:46:24 +08:00
Angelia Dela Cruz 40b1954431 MDL-77463 Behat: Coverage for assign submission notification to teacher 2023-03-09 12:56:39 +08:00
Angelia Dela Cruz 9f152581f0 MDL-77429 Behat: Add coverage for changing course format as teacher 2023-03-09 10:01:40 +08:00
Andrew Nicols 1a624afb87 MDL-77559 js: Rebuild all JS with Node 16 2023-03-09 08:22:29 +08:00
Andrew Nicols f80a3bce0a MDL-77559 js: Revert "MDL-75012 core: Bump NodeJS version requirements"
This reverts commit fb8fa74655.
2023-03-09 08:21:22 +08:00
Andrew Nicols 4deb1eea56 MDL-77559 js: Revert "MDL-75012 js: Bump standard dependencies"
This reverts commit 811526b0a6.
2023-03-09 08:21:19 +08:00
Andrew Nicols 77c72b0bd7 MDL-77559 js: Revert "MDL-75012 js: Remove grunt-contrib-uglify"
This reverts commit d01eba812b.
2023-03-09 08:21:15 +08:00
Andrew Nicols a15df02640 MDL-77559 js: Revert "MDL-75012 js: Bump stylelint and components"
This reverts commit 9899fc0a0f.
2023-03-09 08:21:12 +08:00
Andrew Nicols e5dd087852 MDL-77559 js: Revert "MDL-75012 js: Update browserslist"
This reverts commit c920bb6db5.
2023-03-09 08:21:07 +08:00
Andrew Nicols f46643fd61 MDL-77559 js: Revert "MDL-75012 js: Bump node-sass"
This reverts commit 173b61bf69.
2023-03-09 08:21:03 +08:00
Andrew Nicols 426e58d35d MDL-77559 js: Revert "MDL-75012 js: Audit fix"
This reverts commit dfea25b3d7.
2023-03-09 08:20:57 +08:00
Andrew Nicols be86e18ff1 MDL-77559 js: Revert "MDL-75012 js: Use our own jsdoc wrapper"
This reverts commit a22e2aa0d7.
2023-03-09 08:20:53 +08:00
Andrew Nicols d33aa94074 MDL-77559 js: Revert "MDL-75012 js: Bump shifter to new version"
This reverts commit 0ebccd5bb4.
2023-03-09 08:20:49 +08:00
Andrew Nicols 47fcb7c012 MDL-77559 js: Revert "MDL-75012 js: Put shifter on a diet"
This reverts commit 8d6e0dc416.
2023-03-09 08:20:45 +08:00
Andrew Nicols 7fd65d8896 MDL-77559 js: Revert "MDL-75012 js: Remove unused babel-preset-minify dependency"
This reverts commit 35ef8a9e40.
2023-03-09 08:20:42 +08:00
Andrew Nicols 4ad6481a77 MDL-77559 js: Revert "MDL-75012 js: Bump Babel dependencies"
This reverts commit 0a95429dce.
2023-03-09 08:19:26 +08:00
AMOS bot 40d01acce6 Automatically generated installer lang files 2023-03-09 00:07:34 +00:00
Ilya Tregubov f5daf410af Merge branch 'MDL-77414-311' of https://github.com/andelacruz/moodle into MOODLE_311_STABLE 2023-03-08 17:06:17 +08:00
Angelia Dela Cruz 40510605e4 MDL-77414 Behat: Coverage for "Require all group members submit" setting 2023-03-08 14:52:46 +08:00
Petr Skoda b436508b24 MDL-77524 filter_algebra: fix error message 2023-03-08 11:27:28 +08:00
Paul Holden 98bbce7011 MDL-75517 report_participation: filter report by viewable roles only. 2023-03-08 10:38:29 +08:00
Michael Hawkins 04d74da325 MDL-77204 mod_wiki: Clean filename in Moodle1 backup 2023-03-08 10:34:18 +08:00
Paul Holden 90c5358680 MDL-77046 availability: validate profile field in condition. 2023-03-08 10:24:37 +08:00
Paul Holden 882b9d67f5 MDL-76809 gradereport_history: pre-filter report userids filter.
Ensure current user is able to access each of the provided userids.
2023-03-08 10:01:32 +08:00
Ilya Tregubov 591ffa267d Merge branch 'MDL-77446-311' of https://github.com/andelacruz/moodle into MOODLE_311_STABLE 2023-03-08 09:20:01 +08:00
AMOS bot 7c10813e02 Automatically generated installer lang files 2023-03-08 00:07:36 +00:00
Petr Skoda a099b1d893 MDL-76645 filter_data: fix link title attribute 2023-03-07 14:49:50 +00:00
Lars Bonczek 39ab1182d9 MDL-75659 core: Don't render component argument twice in mustache pix helper 2023-03-07 14:49:50 +00:00
Angelia Dela Cruz 9e5bf8d4d5 MDL-77446 Behat: Add coverage for changing uploaded file details 2023-03-07 16:14:34 +08:00
AMOS bot fc2ed595d9 Automatically generated installer lang files 2023-03-07 00:07:34 +00:00
Jun Pataleta 86f1bf85c4 Merge branch 'MDL-77428-311' of https://github.com/andelacruz/moodle into MOODLE_311_STABLE 2023-03-03 16:34:50 +08:00
Jake Dallimore 4e858410ea weekly release 3.11.12+ 2023-03-03 11:08:47 +08:00
Jake Dallimore dd581ff3f5 Merge branch 'install_311_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_311_STABLE 2023-03-03 11:08:45 +08:00
Andrew Nicols 1a70b72b41 MDL-77458 core: Add supported php version info to phpcs config 2023-03-02 20:37:52 +08:00
Angelia Dela Cruz c7b2f34748 MDL-77428 Behat: Add coverage for forum post word count 2023-03-02 13:48:47 +08:00
Jun Pataleta ee828d828a Merge branch 'MDL-75012-311-5' of https://github.com/andrewnicols/moodle into MOODLE_311_STABLE 2023-03-02 12:25:04 +08:00
Andrew Nicols 499f651729 MDL-75012 js: Full build of all grunt things 2023-03-02 12:15:25 +08:00
Andrew Nicols 0a95429dce MDL-75012 js: Bump Babel dependencies
Please note that whilst some dependencies have higher versions
available, these are not compatible at this time.
2023-03-02 12:15:25 +08:00
Andrew Nicols 35ef8a9e40 MDL-75012 js: Remove unused babel-preset-minify dependency 2023-03-02 12:15:25 +08:00
Jake Dallimore 51dae0b04e Merge branch 'MDL-77461-311' of https://github.com/andrewnicols/moodle into MOODLE_311_STABLE 2023-03-02 11:43:09 +08:00
Andrew Nicols bc41f92872 MDL-77461 behat: Use get_course_id instead of DB fetch 2023-03-02 11:07:39 +08:00
Jun Pataleta 430b3e7043 Merge branch 'MDL-77413-311' of https://github.com/andelacruz/moodle into MOODLE_311_STABLE 2023-03-02 09:45:42 +08:00
AMOS bot f6debec437 Automatically generated installer lang files 2023-03-02 00:07:38 +00:00
Jun Pataleta c4d91b4e42 Merge branch 'MDL-77417_311' of https://github.com/stronk7/moodle into MOODLE_311_STABLE 2023-03-01 23:53:54 +08:00
Andrew Nicols 98317ff91a Merge branch 'MDL-72727-311' of https://github.com/paulholden/moodle into MOODLE_311_STABLE 2023-03-01 10:47:27 +08:00
AMOS bot 21c5f2d453 Automatically generated installer lang files 2023-03-01 00:07:32 +00:00
Andrew Nicols 42ec6014c4 Merge branch 'MDL-77097_311' of https://github.com/stronk7/moodle into MOODLE_311_STABLE 2023-02-28 22:34:30 +08:00
Angelia Dela Cruz 45b81544c5 MDL-77413 Behat: Minor changes to optimise the existing tests 2023-02-28 17:38:14 +08:00
Angelia Dela Cruz f055b84644 MDL-77413 Behat: Add coverage to verify groups can have a picture 2023-02-28 17:25:04 +08:00
Andrew Nicols 8d6e0dc416 MDL-75012 js: Put shifter on a diet
This commit switches to a new custom version of Shifter which sees it
put on a massive diet.

Many of the standard Shifter features are totally unused by Moodle, but
they add dependency spaghetti. Some of those dependencies will start to
cause us issues as they have not been updated for a very long time, are
no longer maintained, and are no longer compatible with anything
resembling a recent version of NodeJS.
2023-02-28 11:10:32 +08:00
Andrew Nicols 0ebccd5bb4 MDL-75012 js: Bump shifter to new version
This resolves an issue identified in 77083 which identified that GitHub
hashes shouldn't be treated as repeatable.

Whilst GitHub have reverted this change, it's still worth making this
change.
2023-02-28 11:10:32 +08:00
Andrew Nicols a22e2aa0d7 MDL-75012 js: Use our own jsdoc wrapper
grunt-jsdoc is abandoned and only works with an older version of jsdoc.

This is a very simple wrapper around jsdoc itself.
2023-02-28 11:10:32 +08:00
Andrew Nicols dfea25b3d7 MDL-75012 js: Audit fix 2023-02-28 11:10:32 +08:00
Andrew Nicols 173b61bf69 MDL-75012 js: Bump node-sass 2023-02-28 11:10:32 +08:00
Andrew Nicols c920bb6db5 MDL-75012 js: Update browserslist 2023-02-28 11:10:31 +08:00
Andrew Nicols 9899fc0a0f MDL-75012 js: Bump stylelint and components 2023-02-28 10:19:24 +08:00
Andrew Nicols d01eba812b MDL-75012 js: Remove grunt-contrib-uglify
We stopped using this when we updated our processes to support ESMs in
MDL-62497. Removal of the dependency was missed at the time.
2023-02-28 10:19:23 +08:00
Andrew Nicols 811526b0a6 MDL-75012 js: Bump standard dependencies
This change bumps dependencies which have no impact upon the build
process
2023-02-28 10:19:23 +08:00
Andrew Nicols fb8fa74655 MDL-75012 core: Bump NodeJS version requirements 2023-02-28 10:19:23 +08:00
Paul Holden 36e2f7d5a3 MDL-72727 mod_forum: prevent default favourite toggle click event.
Allow the repository call to the web service method to complete before
re-directing, otherwise the call may not complete and/or races against
the page reload causing random Behat errors.
2023-02-27 23:30:43 +00:00
Eloy Lafuente (stronk7) 4fa6354d89 MDL-77417 behat: behat_error_handler meets deprecation error types
Right now, any E_DEPRECATED, E_USER_DEPRECATED error type leads
to exception in behat runs, because the behat error handled is
not aware of them. See MDL-38041 for the initial implementation.

We don't want that to happen and they must behave like other "low"
error types (notices, warnings...), that will be reported in logs
or output, but won't trigger any exception, so the test can continue.

This commit just adds those 2 "new" error types to the handler,
providing the very same behaviour for them than the rest.
2023-02-27 09:38:37 +01:00
Eloy Lafuente (stronk7) 7ed2a79297 MDL-77097 store_mongodb: keep compatibility with PHP 7.4
Replaced 4 occurrences of get_debug_type() by gettype() to keep PHP 7.4 compatibility. Note this
has not been applied to 4.2dev and up because, there, it's safe to use get_debug_type().
2023-02-24 12:39:03 +01:00
Jun Pataleta 65731963bc weekly release 3.11.12+ 2023-02-24 15:43:36 +08:00
Jun Pataleta 63c6f278a7 Merge branch 'install_311_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_311_STABLE 2023-02-24 15:43:33 +08:00
Matt Porritt 474ee8524a MDL-77376 Licensing: Update trademark.txt
Update Trademark policy in TRADEMARK.txt to
be in line with advice from the Moodle HQ
legal team
2023-02-24 12:36:43 +08:00
Andrew Nicols 5956302d76 Merge branch 'MDL-76843_311' of https://github.com/timhunt/moodle into MOODLE_311_STABLE 2023-02-23 11:54:21 +08:00
Andrew Nicols 9121d889f5 Merge branch 'MDL-77271-311' of https://github.com/lameze/moodle into MOODLE_311_STABLE 2023-02-23 11:49:48 +08:00
Tim Hunt af0aee7d2a MDL-76843 questions behat: enhancements requried to test this issue
* New steps to set up certian sorts of broken test data.
* Fix qtype_essay_question::un_summarise_response().
2023-02-22 15:25:32 +00:00
Simey Lameze 76fc2573ce MDL-77271 behat: verify user licence preference is remembered 2023-02-22 09:31:04 +08:00
AMOS bot d611739b3f Automatically generated installer lang files 2023-02-21 00:07:30 +00:00
Ilya Tregubov f638a5bbae weekly release 3.11.12+ 2023-02-17 09:12:33 +08:00
Ilya Tregubov 2079ba1387 Merge branch 'install_311_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_311_STABLE 2023-02-17 09:12:31 +08:00
AMOS bot c12e3b46de Automatically generated installer lang files 2023-02-17 00:07:43 +00:00
Andrew Nicols bdb1aefaad Merge branch 'MDL-76478-password-unmask-MOODLE_311_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_311_STABLE 2023-02-15 23:28:22 +08:00
Ilya Tregubov 6c48aaf4d9 Merge branch 'MDL-75230-311' of https://github.com/andelacruz/moodle into MOODLE_311_STABLE 2023-02-15 16:13:32 +08:00
AMOS bot a745135867 Automatically generated installer lang files 2023-02-15 00:07:42 +00:00
Ilya Tregubov 2674350a47 Merge branch 'MDL-77189-311' of https://github.com/lameze/moodle into MOODLE_311_STABLE 2023-02-13 13:44:38 +08:00
Simey Lameze 16cee3894e MDL-77189 behat: basic coverage for wikimedia repository 2023-02-13 13:24:03 +08:00
Paul Holden 5e943bf6ba weekly release 3.11.12+ 2023-02-10 13:47:41 +00:00
Angelia Dela Cruz 4d29785724 MDL-75230 behat: Lesson Behat tests optimised
Replace steps that manually add Lesson instances via the UI and use
Behat generators. This improves the speed of the Behat test runs.
2023-02-10 17:44:33 +08:00
Andrew Nicols 733b90eef0 Merge branch 'MDL-76499-311' of https://github.com/andelacruz/moodle into MOODLE_311_STABLE 2023-02-09 10:08:00 +08:00
Jun Pataleta 00385e7580 Merge branch 'MDL-74905_311' of https://github.com/stronk7/moodle into MOODLE_311_STABLE 2023-02-08 17:19:11 +08:00
Andrew Nicols 3b757a24eb Merge branch 'MDL-77123-311' of https://github.com/cameron1729/moodle into MOODLE_311_STABLE 2023-02-08 13:01:19 +08:00
Cameron Ball c56edaa116 MDL-77123 message_airnotifier: Don't test configured providers 2023-02-08 09:59:19 +08:00
Paul Holden 6b54bd46f2 Merge branch 'MDL-77078-311' of https://github.com/andelacruz/moodle into MOODLE_311_STABLE 2023-02-06 13:33:09 +00:00
Angelia Dela Cruz 31f13cd315 MDL-76499 behat: Resource Behat tests optimised
Replace steps that manually add resource instances via the UI and use
Behat generators. This improves the speed of the Behat test runs.

Co-authored-by: David Woloszyn <david.woloszyn@moodle.com>
2023-02-06 14:32:10 +08:00
Angelia Dela Cruz a45ccc464b MDL-77078 Behat: Coverage for assignment submission statement 2023-02-06 12:09:54 +08:00
Andrew Nicols 604d8c291f Merge branch 'MDL-76662-311' of https://github.com/paulholden/moodle into MOODLE_311_STABLE 2023-02-04 21:52:43 +08:00
Eloy Lafuente (stronk7) c5fdf320cd MDL-74905 ci: travis and gha, some adjustments
Apply for some of the improvements made for 4.2:
- Use our own moodlehq/mysql-action
- Define the tmpfs size and ensure that binlogs are disabled.
2023-02-03 19:48:15 +01:00
Eloy Lafuente (stronk7) 0fd5993afb MDL-74905 environment: Apply agreed changes:
- PHP 8.0 required.
- Moodle 3.11.8 required (first minor supporting PHP 8.0 officially).
- MySQL 8.0 required.
- MariaDB 10.6.7 required.
- PostgreSQL 13 required.
- php-sodium extension required.
- 64-bit PHP required.
2023-02-03 19:48:15 +01:00
Eloy Lafuente (stronk7) ec56eeb9a9 MDL-74905 environment: 4.2 base information
This is a direct copy of the 4.1 information, to
have all the real changes under control in next commit(s).
2023-02-03 19:48:15 +01:00
Jun Pataleta fa6c77adc7 weekly release 3.11.12+ 2023-02-03 15:43:46 +08:00
Andrew Nicols dca46bcab8 Merge branch 'MDL-75830-311' of https://github.com/andelacruz/moodle into MOODLE_311_STABLE 2023-02-02 11:58:59 +08:00
Andrew Nicols cc045cc27d Merge branch 'MDL-76675_311' of https://github.com/stronk7/moodle into MOODLE_311_STABLE 2023-02-02 11:04:32 +08:00
Andrew Nicols 980a265718 Merge branch 'MDL-75912-311' of https://github.com/andelacruz/moodle into MOODLE_311_STABLE 2023-02-02 09:45:03 +08:00
Angelia Dela Cruz 6ad9dcae1c MDL-75830 behat: Book behat tests optimised
Replace steps that manually add Book instances via the UI and use
Behat generators. This improves the speed of the Behat test runs.
Additionally, performed Behat cleanup and optimisation to affected
files.
2023-02-02 09:01:01 +08:00
Paul Holden 2ebc453c99 Merge branch 'MDL-76658-311' of https://github.com/andelacruz/moodle into MOODLE_311_STABLE 2023-02-01 16:34:45 +00:00
Ilya Tregubov 5cbd545cd3 Merge branch 'MDL-76587-311' of https://github.com/lameze/moodle into MOODLE_311_STABLE 2023-02-01 13:26:58 +08:00
Angelia Dela Cruz e988445521 MDL-75912 behat: Wiki Behat tests optimised
Behat cleanup and optimisation
2023-02-01 11:32:00 +08:00
Angelia Dela Cruz b08f86b258 MDL-75912 behat: Wiki Behat tests now use generators
Replace steps that manually add Wiki instances via the UI and use
Behat generators. This improves the speed of the Behat test runs.
2023-02-01 11:31:20 +08:00
Angelia Dela Cruz 58213db159 MDL-76658 Behat: Coverage for course cohort enrolment groups
Co-authored-by: Simey Lameze <simey@moodle.com>
2023-01-31 19:55:10 +08:00
Simey Lameze c34dc466b6 MDL-76587 behat: make grading page wider to avoid 'out of bounds' fail
This is because on classic theme the navigation block pushes the content
to the right and once behat changes the grades the 'Save changes' button
is no longer visible.
2023-01-31 11:21:20 +08:00
Andrew Nicols 2b7ede20b5 Merge branch 'MDL-77040-311' of https://github.com/paulholden/moodle into MOODLE_311_STABLE 2023-01-30 12:28:34 +08:00
Eloy Lafuente (stronk7) 4c64f49a88 MDL-76675 date: Only test all TZ names with PHPUNIT_LONGTEST enabled
It happens often that some timezone is renamed, split, added to the
IANAs list of timezones (that, for PHP is kept updated by the
php-timezonedb PECL extension).

When the information coming from the extension changes, all the
PHPUnit jobs in the world start failing (that's when CIs update
their PHP images, when devs update their packages, ...).

So, what we are doing here is to move that test that check for
every single string existing to be run only when PHPUNIT_LONGTEST
is enabled. That way only places running all tests will run that
one. And every other run just will skip it.

This corresponds to point 1 & 2 of the issue, lower impact in general
and, still be able to enable the tests to run.
2023-01-27 08:50:18 +01:00
Paul Holden 0baa1aa391 MDL-77040 core: assert types of returned Geoplugin data, not values.
The results we get from these tests are beyond our control, and are
unreliable for use in testing.

See also previous change 215cd2d8 in similar tests.
2023-01-26 13:24:16 +00:00
Paul Holden a9b87fa989 MDL-76662 tool_log: correct supported reports test assertions. 2023-01-26 13:09:02 +00:00
Sara Arjona cdcfb84d18 weekly release 3.11.12+ 2023-01-26 09:59:22 +01:00
Jun Pataleta 52046c52b1 Merge branch 'MDL-76977-311' of https://github.com/paulholden/moodle into MOODLE_311_STABLE 2023-01-25 16:09:47 +08:00
Jun Pataleta 9eccbb590e Merge branch 'MDL-77036-311' of https://github.com/lameze/moodle into MOODLE_311_STABLE 2023-01-25 16:02:02 +08:00
Simey Lameze 2b7f887245 MDL-77036 core_iplookup: update test_ipv4 test expectations 2023-01-25 15:20:58 +08:00
Jun Pataleta 3dd63e8149 Merge branch 'MDL-76639-311' of https://github.com/andelacruz/moodle into MOODLE_311_STABLE 2023-01-24 18:59:09 +08:00
Jun Pataleta 78e5dd6284 Merge branch 'MDL-76652-311' of https://github.com/lameze/moodle into MOODLE_311_STABLE 2023-01-24 18:45:05 +08:00
Jun Pataleta f14dc52adc Merge branch 'MDL-76655-311' of https://github.com/andelacruz/moodle into MOODLE_311_STABLE 2023-01-24 18:26:47 +08:00
Angelia Dela Cruz aab571ca2c MDL-76655 behat: Coverage for workshop grading strategies 2023-01-24 10:08:33 +08:00
Paul Holden eadfbd21e9 MDL-76977 phpunit: ensure unique data provider keys in mustache test. 2023-01-20 17:23:34 +00:00
Ilya Tregubov b5eb437fcd weekly release 3.11.12+ 2023-01-20 09:41:50 +08:00
Ilya Tregubov 16e5b999ce Merge branch 'MDL-76870-311' of https://github.com/lameze/moodle into MOODLE_311_STABLE 2023-01-19 11:16:27 +08:00
Andrew Nicols 7d596ff339 Merge branch 'MDL-76841-311' of https://github.com/paulholden/moodle into MOODLE_311_STABLE 2023-01-19 08:55:45 +08:00
Andrew Nicols d02bcbb963 Merge branch 'MDL-70070-311' of https://github.com/paulholden/moodle into MOODLE_311_STABLE 2023-01-19 08:51:32 +08:00
Paul Holden c01344a0e7 MDL-76841 tool_mobile: improve potential config issues test.
Avoid certificate checking of the default test site (`example.com`),
and update the assertion so we get clearer failures in the future.
2023-01-16 08:30:31 +00:00
Paul Holden e9439d064b MDL-70070 phpunit: correct data provider method names.
They should not be prefixed `test_` because that's how actual
test methods containing assertions are identified by PHPUnit.
2023-01-16 08:28:19 +00:00
Simey Lameze 860bfb6f25 MDL-76870 question: change assertion to assertEqualsCanonicalizing
By using that assertion the arrays will be sorted before comparison
preventing any Oracle sorting related failures.

Credits for the solution go to Tim Hunt!
2023-01-13 18:13:27 +08:00
Angelia Dela Cruz 388c5731fa MDL-76639 behat: Add Behat test coverage for quiz with limited attempts 2023-01-13 16:32:58 +08:00
Simey Lameze e32d27e1ff MDL-76652 behat: use data generator and remove duplicated steps 2023-01-09 10:09:58 +08:00
Simey Lameze 2f826724c8 MDL-76652 behat: add coverage for postwithoutthrottling logic 2023-01-09 10:09:58 +08:00
Brendan Heywood 7f638dac59 MDL-76478 formslib: Fix autocomplete bug of existing passwords 2022-12-08 00:45:58 +11:00
194 changed files with 3034 additions and 1655 deletions
+3 -1
View File
@@ -66,7 +66,7 @@ jobs:
steps:
- name: Setting up DB mysql
if: ${{ matrix.db == 'mysqli' }}
uses: johanmeiring/mysql-action@tmpfs-patch
uses: moodlehq/mysql-action@v1
with:
collation server: utf8mb4_bin
mysql version: 5.7
@@ -74,6 +74,8 @@ jobs:
mysql user: test
mysql password: test
use tmpfs: true
tmpfs size: '1024M'
extra conf: --skip-log-bin
- name: Setting up DB pgsql
if: ${{ matrix.db == 'pgsql' }}
+1 -1
View File
@@ -156,7 +156,7 @@ const getThirdPartyLibsList = relativeTo => {
* @returns {array}
*/
const getThirdPartyPaths = () => {
const DOMParser = require('xmldom').DOMParser;
const DOMParser = require('@xmldom/xmldom').DOMParser;
const fs = require('fs');
const path = require('path');
const xpath = require('xpath');
+3 -1
View File
@@ -81,7 +81,8 @@ install:
sudo service mysql stop
sudo mv /var/lib/mysql /mnt/ramdisk
sudo ln -s /mnt/ramdisk/mysql /var/lib/mysql
sudo service mysql restart
echo -e "[mysqld]\nskip-log-bin" | sudo tee -a /etc/mysql/my.cnf
sudo service mysql start
fi
- >
if [ "$DB" = 'pgsql' ];
@@ -92,6 +93,7 @@ install:
sudo mv /var/lib/postgresql /mnt/ramdisk
sudo ln -s /mnt/ramdisk/postgresql /var/lib/postgresql
sudo service postgresql start 9.6
sh -c 'until pg_isready -p 5432; do echo "Waiting for the DB to be up..."; sleep 2; done'
fi
- >
if [ "$TASK" = 'PHPUNIT' ];
+53 -35
View File
@@ -1,48 +1,66 @@
MOODLE TRADEMARKS POLICY
========================
The word "Moodle" is trademarked in many countries around the world. The word
was originally coined as an acronym: Modular Object-Oriented Dynamic Learning
Environment. The trademark is owned by Martin Dougiamas, Founder and Director
of Moodle.
The Moodle Trademark
--------------------
The law obligates trademark owners to police their marks and prevent the use of
confusingly similar names by third parties. Through this policy wed like to
make it clear how Moodle-related projects, organisations, and people can use
the Moodle trademark. Wed also like to be clear about how use of the word is
restricted when used to promote commercial Moodle services. We do this to
protect the very business model that allows us to continue developing Moodle
for you.
The brand and word "Moodle" has trade mark protection in many countries around
the world. Various Moodle™ trade marks are owned by either Moodle Pty Ltd or
one of its associated entities. The law obligates trade mark owners to police
their trade marks and prevent the use of confusingly similar names by
third parties.
Allowed uses
------------
We have created a more concise and thorough set of Trademark Guidelines
(https://moodle.com/wp-content/uploads/2023/02/Moodle-Trademark-Guidelines-2023-4.pdf)
to help you understand how to comply with Moodle's trade mark requirements.
The Trademark Guidelines will also assist our Moodle Certified Partners and the
community to understand some of the principles that inform Moodle's stance
whenever potential infringement has been detected by us or our community.
The following uses dont require any permission at all:
We need to be clear about use of the word "Moodle" and how we restrict its use
when promoting commercial Moodle™ branded services. The proper use of
trade marks reliably assures consumers about the quality of the associated
products or services and where they have been derived from. Because the
Moodle LMS is made available under the open source GNU General Public License'
that permits you to modify the copyrighted software, the distribution of such
modified software in combination with Moodle trade marks can potentially
mislead others in the community. To be clear, the GNU GPL does not include an
implied right or licence to use Moodle's trade marks.
* Referring to the software or the Moodle project.
* Describing your own Moodle implementation (including within corporate
settings).
We do all this to protect the very business model that allows us to continue
developing various Moodle software solutions for you.
Allowed uses of "Moodle"
------------------------
The following uses don't require any permission at all:
* Referring to the software or the Moodle project as the "Moodle™ software"
or the "Moodle™ project"
* Describing your own implementation of the Moodle™ software platform
(including within corporate settings).
* Describing a Moodle-based community hub.
* Describing some software youve made that integrates with Moodle
(eg a Moodle integration feature on another system).
* Describing certain software you've made that integrates with Moodle
branded software (e.g. a Moodle integration feature on another system).
Restricted uses
---------------
Restricted uses of "Moodle"
---------------------------
The following uses are generally prohibited without explicit and direct
permission being granted to you by Moodle Pty Ltd. We do this to protect the
Moodle project from software and sites which could confuse people. Please
contact us to ask for permission in writing.
Moodle project from software and sites which could confuse people. If in
doubt, reach out for clarification at <trademarks@moodle.com>
* You cant use "Moodle" in the name of your software (including Mobile apps)
* You cant use "Moodle" in your company name
* You cant use "Moodle" in your domain name
* You cant use "Moodle" in advertising-related keywords (such as Adsense)
* You cant use "Moodle" to describe services around Moodle (such as hosting,
training, support, consulting, course creation services, theme development,
customisation, installation, integration and certification). This applies
even if you do not charge for the services. Note that usually only Moodle
Partners have this permission.
For information about the Moodle Partner Certification Mark as well as for how
to contact us, please see <https://moodle.com/trademarks/>.
* You can't use the word "Moodle" or any Moodle logos for commercial purposes
without prior written permission from Moodle HQ.
* You can't use "Moodle" in the name of your software (including Mobile apps).
* You can't use "Moodle" in your company name.
* You can't use "Moodle" in your domain name.
* You can't use "Moodle" in advertising-related keywords (such as Adsense).
* You can't use "Moodle" to describe services around Moodle
(such as hosting, training, support, consulting, course creation services,
theme development, customisation, installation, integration, analytics
and certification) that cause consumers to be confused that you are
associated with Moodle HQ if you are not.
This applies even if you do not charge for the services.
Note that usually only Moodle Partners have this permission.
+189
View File
@@ -3924,4 +3924,193 @@
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="4.2" requires="3.11.8">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mariadb" version="10.6.7" />
<VENDOR name="mysql" version="8.0" />
<VENDOR name="postgres" version="13" />
<VENDOR name="mssql" version="14.0" />
<VENDOR name="oracle" version="19" />
</DATABASE>
<PHP version="8.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="required">
<FEEDBACK>
<ON_ERROR message="mbstringrequired" />
</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="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_EXTENSION name="sodium" level="required"/>
<PHP_EXTENSION name="exif" level="optional"/>
</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_CHECK file="lib/upgradelib.php" function="check_sixtyfour_bits" level="required">
<FEEDBACK>
<ON_ERROR message="sixtyfourbitsrequired" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_max_input_vars" level="optional">
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_admin_dir_usage" level="optional">
<FEEDBACK>
<ON_CHECK message="iscustomadminwarnings" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_xmlrpc_usage" level="optional">
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mod_assignment" level="required">
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
</COMPATIBILITY_MATRIX>
@@ -30,10 +30,9 @@ Feature: Verify that all form fields values can be get and set
| student2 | G2 |
| student3 | G2 |
And the following "activities" exist:
| activity | course | idnumber | name | intro | firstpagetitle | wikimode | visible |
| wiki | C1 | wiki1 | Test this one | Test this one | Test this one | collaborative | 0 |
And I log in as "admin"
And I am on "Course 1" course homepage
| activity | course | idnumber | name | firstpagetitle | wikimode | visible |
| wiki | C1 | wiki1 | Test this one | Test this one | collaborative | 0 |
And I am on the "Course 1" course page logged in as admin
And I navigate to "Reset" in current page administration
# Select (multi-select) - Checking "the select box should contain".
And I expand all fieldsets
@@ -61,16 +60,14 @@ Feature: Verify that all form fields values can be get and set
# Checkbox - Checking "I set the field" and "The field matches value" ticked.
And I set the field "Force format" to "1"
And I press "Save and return to course"
And I am on the "Test this one" "wiki activity" page
And I navigate to "Edit settings" in current page administration
And I am on the "Test this one" "wiki activity editing" page
And I expand all fieldsets
And the field "Force format" matches value "1"
And the field "Force format" does not match value ""
# Checkbox - Checking "I set the field" and "The field matches value" unticked.
And I set the field "Force format" to ""
And I press "Save and return to course"
And I am on the "Test this one" "wiki activity" page
And I navigate to "Edit settings" in current page administration
And I am on the "Test this one" "wiki activity editing" page
And I expand all fieldsets
And the field "Force format" matches value ""
And the field "Force format" does not match value "1"
@@ -78,8 +75,7 @@ Feature: Verify that all form fields values can be get and set
And I set the following fields to these values:
| Force format | 1 |
And I press "Save and return to course"
And I am on the "Test this one" "wiki activity" page
And I navigate to "Edit settings" in current page administration
And I am on the "Test this one" "wiki activity editing" page
And I expand all fieldsets
And the following fields match these values:
| Force format | 1 |
@@ -89,8 +85,7 @@ Feature: Verify that all form fields values can be get and set
And I set the following fields to these values:
| Force format | |
And I press "Save and return to course"
And I am on the "Test this one" "wiki activity" page
And I navigate to "Edit settings" in current page administration
And I am on the "Test this one" "wiki activity editing" page
And I expand all fieldsets
And the following fields match these values:
| Force format | |
@@ -143,10 +138,11 @@ Feature: Verify that all form fields values can be get and set
And I navigate to "Edit settings" in current page administration
And the field "Course ID number" matches value "Course id number"
Scenario: with JS disabled all form fields getters and setters works as expected
@javascript
Scenario: with JS enabled all form fields getters and setters works as expected
Given the following "activities" exist:
| activity | course | name |
| lesson | C1 | Test lesson |
Then I am on "Course 1" course homepage
And I navigate to "Users > Groups" in current page administration
# Select (multi-select & AJAX) - Checking "I set the field" and "select box should contain".
@@ -159,11 +155,8 @@ Feature: Verify that all form fields values can be get and set
And the "members" select box should contain "Student 2 (s2@example.com)"
And the "members" select box should not contain "Student 3 (s3@example.com)"
# Checkbox (AJAX) - Checking "I set the field" and "I set the following fields to these values".
And I am on "Course 1" course homepage
And I add a "Lesson" to section "1"
And I am on the "Test lesson" "lesson activity editing" page
And I set the following fields to these values:
| Name | Test lesson |
| Description | Test lesson description |
| available[enabled] | 1 |
And I set the field "deadline[enabled]" to "1"
# Checkbox (AJAX) - Checking "the field matches value" before saving.
@@ -33,3 +33,27 @@ Feature: Licence manager
And "This is the site default licence" "icon" should exist in the "cc" "table_row"
And "Enable licence" "icon" should not exist in the "cc" "table_row"
And "This is the site default licence" "icon" should not exist in the "public" "table_row"
@javascript @_file_upload
Scenario Outline: User licence preference is remembered depending of setting value
Given the following config values are set as admin:
| sitedefaultlicense | cc |
| rememberuserlicensepref | <rememberuserlicensepref> |
And I log in as "admin"
And I follow "Manage private files..."
And I follow "Add..."
And I follow "Upload a file"
And the field with xpath "//select[@name='license']" matches value "Creative Commons"
And I click on "Close" "button" in the "File picker" "dialogue"
When I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanager as:
| Save as | empty_copy.txt |
| license | Public domain |
And I press "Save changes"
And I follow "Manage private files..."
And I follow "Add..."
Then the field with xpath "//select[@name='license']" matches value "<expectedlicence>"
Examples:
| rememberuserlicensepref | expectedlicence |
| 0 | Creative Commons |
| 1 | Public domain |
@@ -33,8 +33,7 @@ class store_test extends \advanced_testcase {
* Tests log writing.
*
* @param bool $jsonformat True to test with JSON format
* @dataProvider test_log_writing_provider
* @throws moodle_exception
* @dataProvider log_writing_provider
*/
public function test_log_writing(bool $jsonformat) {
global $DB, $CFG;
@@ -252,9 +251,9 @@ class store_test extends \advanced_testcase {
* Returns different JSON format settings so the test can be run with JSON format either on or
* off.
*
* @return [bool] Array of true/false
* @return bool[] Array of true/false
*/
public static function test_log_writing_provider(): array {
public static function log_writing_provider(): array {
return [
[false],
[true]
@@ -311,17 +310,16 @@ class store_test extends \advanced_testcase {
$logmanager = get_log_manager();
$allreports = \core_component::get_plugin_list('report');
$supportedreports = array(
'report_log' => '/report/log',
'report_loglive' => '/report/loglive'
);
// Make sure all supported reports are installed.
$expectedreports = array_keys(array_intersect_key($allreports, $supportedreports));
$reports = $logmanager->get_supported_reports('logstore_database');
$reports = array_keys($reports);
$expectedreports = array_intersect_key([
'log' => 'report_log',
'loglive' => 'report_loglive',
], $allreports);
$supportedreports = $logmanager->get_supported_reports('logstore_database');
foreach ($expectedreports as $expectedreport) {
$this->assertContains($expectedreport, $reports);
$this->assertArrayHasKey($expectedreport, $supportedreports);
}
}
}
@@ -217,20 +217,19 @@ class store_test extends \advanced_testcase {
$logmanager = get_log_manager();
$allreports = \core_component::get_plugin_list('report');
$supportedreports = array(
'report_log' => '/report/log',
'report_loglive' => '/report/loglive',
'report_outline' => '/report/outline',
'report_participation' => '/report/participation',
'report_stats' => '/report/stats'
);
// Make sure all supported reports are installed.
$expectedreports = array_keys(array_intersect_key($allreports, $supportedreports));
$reports = $logmanager->get_supported_reports('logstore_legacy');
$reports = array_keys($reports);
$expectedreports = array_intersect_key([
'log' => 'report_log',
'loglive' => 'report_loglive',
'outline' => 'report_outline',
'participation' => 'report_participation',
'stats' => 'report_stats'
], $allreports);
$supportedreports = $logmanager->get_supported_reports('logstore_legacy');
foreach ($expectedreports as $expectedreport) {
$this->assertContains($expectedreport, $reports);
$this->assertArrayHasKey($expectedreport, $supportedreports);
}
}
@@ -38,8 +38,7 @@ class store_test extends \advanced_testcase {
* Tests log writing.
*
* @param bool $jsonformat True to test with JSON format
* @dataProvider test_log_writing_provider
* @throws moodle_exception
* @dataProvider log_writing_provider
*/
public function test_log_writing(bool $jsonformat) {
global $DB;
@@ -223,9 +222,9 @@ class store_test extends \advanced_testcase {
* Returns different JSON format settings so the test can be run with JSON format either on or
* off.
*
* @return [bool] Array of true/false
* @return bool[] Array of true/false
*/
public static function test_log_writing_provider(): array {
public static function log_writing_provider(): array {
return [
[false],
[true]
@@ -239,20 +238,19 @@ class store_test extends \advanced_testcase {
$logmanager = get_log_manager();
$allreports = \core_component::get_plugin_list('report');
$supportedreports = array(
'report_log' => '/report/log',
'report_loglive' => '/report/loglive',
'report_outline' => '/report/outline',
'report_participation' => '/report/participation',
'report_stats' => '/report/stats'
);
// Make sure all supported reports are installed.
$expectedreports = array_keys(array_intersect_key($allreports, $supportedreports));
$reports = $logmanager->get_supported_reports('logstore_standard');
$reports = array_keys($reports);
$expectedreports = array_intersect_key([
'log' => 'report_log',
'loglive' => 'report_loglive',
'outline' => 'report_outline',
'participation' => 'report_participation',
'stats' => 'report_stats'
], $allreports);
$supportedreports = $logmanager->get_supported_reports('logstore_standard');
foreach ($expectedreports as $expectedreport) {
$this->assertContains($expectedreport, $reports);
$this->assertArrayHasKey($expectedreport, $supportedreports);
}
}
@@ -368,7 +366,7 @@ class store_test extends \advanced_testcase {
* Tests the decode_other function can cope with both JSON and PHP serialized format.
*
* @param mixed $value Value to encode and decode
* @dataProvider test_decode_other_provider
* @dataProvider decode_other_provider
*/
public function test_decode_other($value) {
$this->assertEquals($value, \logstore_standard\log\store::decode_other(serialize($value)));
@@ -387,7 +385,7 @@ class store_test extends \advanced_testcase {
*
* @return array Array of parameters
*/
public function test_decode_other_provider(): array {
public function decode_other_provider(): array {
return [
[['info' => 'd2819896', 'logurl' => 'discuss.php?d=2819896']],
[null],
@@ -400,8 +398,7 @@ class store_test extends \advanced_testcase {
* Checks that backup and restore of log data works correctly.
*
* @param bool $jsonformat True to test with JSON format
* @dataProvider test_log_writing_provider
* @throws moodle_exception
* @dataProvider log_writing_provider
*/
public function test_backup_restore(bool $jsonformat) {
global $DB;
@@ -144,9 +144,7 @@ Feature: Manage plan workflow
| name | user | description | status | reviewer |
| Test-Plan3 | user1 | Description of plan 3 for user 1 | active | manager1 |
| Test-Plan4 | user1 | Description of plan 4 for user 1 | active | manager1 |
And I log in as "manager1"
And I navigate to "Users > Accounts > Browse list of users" in site administration
And I follow "User 1"
And I am on the "user1" "user > profile" page logged in as "manager1"
And I follow "Learning plans"
And I should see "List of learning plans"
And I follow "Learning plans"
@@ -163,9 +161,7 @@ Feature: Manage plan workflow
| name | user | description | status | reviewer |
| Test-Plan3 | user1 | Description of plan 3 for user 1 | active | manager1 |
| Test-Plan4 | user1 | Description of plan 4 for user 1 | active | manager1 |
And I log in as "manager1"
And I navigate to "Users > Accounts > Browse list of users" in site administration
And I follow "User 1"
And I am on the "user1" "user > profile" page logged in as "manager1"
And I follow "Learning plans"
And I should see "List of learning plans"
And I follow "Learning plans"
@@ -185,9 +181,7 @@ Feature: Manage plan workflow
| name | user | description | status | reviewer |
| Test-Plan3 | user1 | Description of plan 3 for user 1 | complete | manager1 |
| Test-Plan4 | user1 | Description of plan 4 for user 1 | complete | manager1 |
And I log in as "manager1"
And I navigate to "Users > Accounts > Browse list of users" in site administration
And I follow "User 1"
And I am on the "user1" "user > profile" page logged in as "manager1"
And I follow "Learning plans"
And I should see "List of learning plans"
And I follow "Learning plans"
+11 -7
View File
@@ -59,22 +59,26 @@ class api_test extends \externallib_advanced_testcase {
*/
public function test_get_potential_config_issues() {
global $CFG;
require_once($CFG->dirroot . '/message/lib.php');
$this->resetAfterTest(true);
$this->setAdminUser();
$CFG->userquota = '73289234723498234723423489273423497234234';
// Set non-SSL wwwroot, to avoid spurious certificate checking.
$CFG->wwwroot = 'http://www.example.com';
$CFG->debugdisplay = 1;
set_config('debugauthdb', 1, 'auth_db');
set_config('debugdb', 1, 'enrol_database');
$expectedissues = array('adodbdebugwarning', 'displayerrorswarning');
// Get potential issues, obtain their keys for comparison.
$issues = api::get_potential_config_issues();
$this->assertCount(count($expectedissues), $issues);
foreach ($issues as $issue) {
$this->assertTrue(in_array($issue[0], $expectedissues));
}
$issuekeys = array_column($issues, 0);
$this->assertEqualsCanonicalizing([
'nohttpsformobilewarning',
'adodbdebugwarning',
'displayerrorswarning',
], $issuekeys);
}
/**
@@ -241,9 +241,7 @@ Feature: Viewing acceptances reports and accepting on behalf of other users
And I set the field "I agree to the This site policy" to "1"
And I press "Next"
And I log out
And I log in as "admin"
And I navigate to "Users > Accounts > Browse list of users" in site administration
And I follow "Manager"
And I am on the "manager" "user > profile" page logged in as "admin"
And I follow "Log in as"
And I press "Continue"
And I navigate to "Users > Privacy and policies > Manage policies" in site administration
@@ -562,9 +562,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign
And the following "users" exist:
| username | firstname | lastname | email |
| user1 | User | 1 | user1@example.com |
When I log in as "admin"
And I navigate to "Users > Accounts > Browse list of users" in site administration
And I follow "User 1"
When I am on the "user1" "user > profile" page logged in as "admin"
And I follow "Log in as"
Then I should see "You are logged in as User 1"
And I press "Continue"
@@ -603,8 +601,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign
And I set the field "I agree to the This site policy" to "1"
And I set the field "I agree to the This privacy policy" to "1"
And I press "Next"
And I navigate to "Users > Accounts > Browse list of users" in site administration
And I follow "User 1"
And I am on the "user1" "user > profile" page
And I follow "Log in as"
Then I should see "You are logged in as User 1"
And I press "Continue"
+2 -1
View File
@@ -143,7 +143,8 @@ class cli_test extends \advanced_testcase {
// Created users have data in the profile fields.
$user1 = \core_user::get_user_by_username('reznort');
$profilefields1 = profile_user_record($user1->id);
$this->assertEquals((object)['superfield' => 'Loves cats'], $profilefields1);
$this->assertObjectHasAttribute('superfield', $profilefields1);
$this->assertEquals('Loves cats', $profilefields1->superfield);
}
/**
@@ -152,14 +152,11 @@ Feature: Apply tour filters to a tour
| fullname | shortname | format | enablecompletion |
| Course 1 | C1 | topics | 1 |
| Course 2 | C2 | topics | 1 |
And the following "activities" exist:
| activity | course | name | firstpagetitle | wikimode |
| wiki | C1 | Test wiki name | First page | collaborative |
And I log in as "admin"
And I am on "Course 1" course homepage with editing mode on
And I add a "Wiki" to section "1" and I fill the form with:
| Wiki name | Test wiki name |
| Description | Test wiki description |
| First page name | First page |
| Wiki mode | Collaborative wiki |
And I am on "Course 2" course homepage
And I am on "Course 2" course homepage with editing mode on
And I add a "Forum" to section "1" and I fill the form with:
| Forum name | Test forum name |
| Forum type | Standard forum for general use |
@@ -378,7 +378,7 @@ class condition_test extends \advanced_testcase {
/**
* Tests the is_available and get_description functions for previous activity option.
*
* @dataProvider test_previous_activity_data
* @dataProvider previous_activity_data
* @param int $grade the current assign grade (0 for none)
* @param int $condition true for complete, false for incomplete
* @param string $mark activity to mark as complete
@@ -467,7 +467,7 @@ class condition_test extends \advanced_testcase {
$this->assertMatchesRegularExpression($description, $information);
}
public function test_previous_activity_data(): array {
public function previous_activity_data(): array {
// Assign grade, condition, activity to complete, activity to test, result, resultnot, description.
return [
'Missing previous activity complete' => [
@@ -559,7 +559,7 @@ class condition_test extends \advanced_testcase {
* Tests the is_available and get_description functions for
* previous activity option in course sections.
*
* @dataProvider test_section_previous_activity_data
* @dataProvider section_previous_activity_data
* @param int $condition condition value
* @param bool $mark if Page 1 must be mark as completed
* @param string $section section to add the availability
@@ -632,7 +632,7 @@ class condition_test extends \advanced_testcase {
}
public function test_section_previous_activity_data(): array {
public function section_previous_activity_data(): array {
return [
// Condition, Activity completion, section to test, result, resultnot, description.
'Completion complete Section with no previous activity' => [
@@ -197,7 +197,12 @@ class condition extends \core_availability\condition {
$this->customfield);
}
} else {
$translatedfieldname = \core_user\fields::get_display_name($this->standardfield);
$standardfields = self::get_standard_profile_fields();
if (array_key_exists($this->standardfield, $standardfields)) {
$translatedfieldname = $standardfields[$this->standardfield];
} else {
$translatedfieldname = get_string('missing', 'availability_profile', $this->standardfield);
}
}
$a = new \stdClass();
// Not safe to call format_string here; use the special function to call it later.
@@ -321,6 +326,27 @@ class condition extends \core_availability\condition {
return $fieldconditionmet;
}
/**
* Return list of standard user profile fields used by the condition
*
* @return string[]
*/
public static function get_standard_profile_fields(): array {
return [
'firstname' => \core_user\fields::get_display_name('firstname'),
'lastname' => \core_user\fields::get_display_name('lastname'),
'email' => \core_user\fields::get_display_name('email'),
'city' => \core_user\fields::get_display_name('city'),
'country' => \core_user\fields::get_display_name('country'),
'idnumber' => \core_user\fields::get_display_name('idnumber'),
'institution' => \core_user\fields::get_display_name('institution'),
'department' => \core_user\fields::get_display_name('department'),
'phone1' => \core_user\fields::get_display_name('phone1'),
'phone2' => \core_user\fields::get_display_name('phone2'),
'address' => \core_user\fields::get_display_name('address'),
];
}
/**
* Gets data about custom profile fields. Cached statically in current
* request.
@@ -472,6 +498,11 @@ class condition extends \core_availability\condition {
$valuefield = 'data';
$default = $customfield->defaultdata;
} else {
$standardfields = self::get_standard_profile_fields();
if (!array_key_exists($this->standardfield, $standardfields)) {
// If the field isn't found, nobody matches.
return [];
}
$values = $DB->get_records_select('user', 'id ' . $sql, $params,
'', 'id, '. $this->standardfield);
$valuefield = $this->standardfield;
@@ -595,6 +626,11 @@ class condition extends \core_availability\condition {
$where = "(ud.data IS NOT NULL AND $condition)";
}
} else {
$standardfields = self::get_standard_profile_fields();
if (!array_key_exists($this->standardfield, $standardfields)) {
// If the field isn't found, nobody matches.
return ['SELECT id FROM {user} WHERE 0 = 1', []];
}
$tablesql = "JOIN {user} u ON u.id = userids.id";
list ($where, $mainparams) = $this->get_condition_sql(
'u.' . $this->standardfield);
@@ -42,20 +42,9 @@ class frontend extends \core_availability\frontend {
protected function get_javascript_init_params($course, \cm_info $cm = null,
\section_info $section = null) {
// Standard user fields.
$standardfields = array(
'firstname' => \core_user\fields::get_display_name('firstname'),
'lastname' => \core_user\fields::get_display_name('lastname'),
'email' => \core_user\fields::get_display_name('email'),
'city' => \core_user\fields::get_display_name('city'),
'country' => \core_user\fields::get_display_name('country'),
'idnumber' => \core_user\fields::get_display_name('idnumber'),
'institution' => \core_user\fields::get_display_name('institution'),
'department' => \core_user\fields::get_display_name('department'),
'phone1' => \core_user\fields::get_display_name('phone1'),
'phone2' => \core_user\fields::get_display_name('phone2'),
'address' => \core_user\fields::get_display_name('address')
);
$standardfields = condition::get_standard_profile_fields();
\core_collator::asort($standardfields);
// Custom fields.
@@ -39,7 +39,7 @@ $string['requires_notendswith'] = 'Your <strong>{$a->field}</strong> does not en
$string['requires_notisequalto'] = 'Your <strong>{$a->field}</strong> is not <strong>{$a->value}</strong>';
$string['requires_notstartswith'] = 'Your <strong>{$a->field}</strong> does not start with <strong>{$a->value}</strong>';
$string['requires_startswith'] = 'Your <strong>{$a->field}</strong> starts with <strong>{$a->value}</strong>';
$string['missing'] = '(Missing custom field: {$a})';
$string['missing'] = '(Missing field: {$a})';
$string['title'] = 'User profile';
$string['op_contains'] = 'contains';
$string['op_doesnotcontain'] = 'doesn\'t contain';
@@ -146,6 +146,7 @@ Feature: My overview block pagination
| student1 | C12 | student |
| student1 | C13 | student |
When I log in as "student1"
And I wait until ".block_myoverview [data-control='next']" "css_element" exists
And I click on "[data-control='next']" "css_element" in the "Course overview" "block"
Then the "class" attribute of ".block_myoverview [data-control='next']" "css_element" should contain "disabled"
And I log out
+7 -10
View File
@@ -15,16 +15,13 @@ Feature: Block appearances
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "activities" exist:
| activity | name | description | course | idnumber | section | template |
| survey | Test survey name | | C1 | survey1 | 1 | 4 |
| book | Test book name | Test book description | C1 | book1 | 1 | |
And I log in as "admin"
And I am on "Course 1" course homepage with editing mode on
And I follow "Test book name"
And I set the following fields to these values:
| Chapter title | Book title |
| Content | Book content test test |
And I press "Save changes"
| activity | name | course | idnumber | section | template |
| survey | Test survey name | C1 | survey1 | 1 | 4 |
| book | Test book name | C1 | book1 | 1 | |
And the following "mod_book > chapter" exists:
| book | Test book name |
| title | Book title |
| content | Book content test test |
And I am on the "Course 1" course page logged in as teacher1
And I turn editing mode on
And I add the "Comments" block
+5 -11
View File
@@ -17,17 +17,11 @@ Feature: Block region moving
And the following "activities" exist:
| activity | name | course | template |
| survey | Test survey name | C1 | 4 |
And I log in as "admin"
And I am on "Course 1" course homepage with editing mode on
And I add a "Book" to section "1" and I fill the form with:
| Name | Test book name |
| Description | Test book description |
And I follow "Test book name"
And I set the following fields to these values:
| Chapter title | Book title |
| Content | Book content test test |
And I press "Save changes"
And I log out
| book | Test book name | C1 | |
And the following "mod_book > chapter" exists:
| book | Test book name |
| title | Book title |
| content | Book content test test |
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add the "Comments" block
@@ -20,7 +20,7 @@ namespace MongoDB\Exception;
use MongoDB\Driver\Exception\InvalidArgumentException as DriverInvalidArgumentException;
use function array_pop;
use function count;
use function get_debug_type;
use function gettype;
use function implode;
use function is_array;
use function sprintf;
@@ -56,6 +56,6 @@ class InvalidArgumentException extends DriverInvalidArgumentException implements
$expectedType = $typeString;
}
return new static(sprintf('Expected %s to have type "%s" but found "%s"', $name, $expectedType, get_debug_type($value)));
return new static(sprintf('Expected %s to have type "%s" but found "%s"', $name, $expectedType, gettype($value)));
}
}
@@ -17,7 +17,7 @@
namespace MongoDB\Exception;
use function get_debug_type;
use function gettype;
use function sprintf;
class ResumeTokenException extends RuntimeException
@@ -30,7 +30,7 @@ class ResumeTokenException extends RuntimeException
*/
public static function invalidType($value)
{
return new static(sprintf('Expected resume token to have type "array or object" but found "%s"', get_debug_type($value)));
return new static(sprintf('Expected resume token to have type "array or object" but found "%s"', gettype($value)));
}
/**
+4
View File
@@ -10,3 +10,7 @@ Import procedure:
- Check the minim php driver version in https://docs.mongodb.com/drivers/php#compatibility and change the value in the "are_requirements_met" method if necessary.
This version (1.8.0) requires PHP mongodb extension >= 1.8.0
Local changes:
- Replaced 4 occurrences of get_debug_type() by gettype() to keep PHP 7.4 compatibility. Note this
has not been applied to 4.2dev and up because, there, it's safe to use get_debug_type().
+5 -5
View File
@@ -2624,7 +2624,7 @@ class externallib_test extends externallib_advanced_testcase {
*
* @return array
*/
public function test_get_calendar_event_by_id_prevent_read_other_users_events_data_provider(): array {
public function get_calendar_event_by_id_prevent_read_other_users_events_data_provider(): array {
$syscontext = \context_system::instance();
$managerrole = 'manager';
return [
@@ -2639,7 +2639,7 @@ class externallib_test extends externallib_advanced_testcase {
* Prevent user from reading other user's event.
*
* @covers \core_calendar_external::get_calendar_event_by_id
* @dataProvider test_get_calendar_event_by_id_prevent_read_other_users_events_data_provider
* @dataProvider get_calendar_event_by_id_prevent_read_other_users_events_data_provider
*
* @param bool $isadminevent Is admin's event
* @param bool $isadmin Is current user admin user
@@ -2695,7 +2695,7 @@ class externallib_test extends externallib_advanced_testcase {
*
* @return array
*/
public function test_edit_or_delete_other_users_events_data_provider(): array {
public function edit_or_delete_other_users_events_data_provider(): array {
$syscontext = \context_system::instance();
$managerrole = 'manager';
return [
@@ -2709,7 +2709,7 @@ class externallib_test extends externallib_advanced_testcase {
/**
* Test the behavior of deleting other users' user events.
*
* @dataProvider test_edit_or_delete_other_users_events_data_provider
* @dataProvider edit_or_delete_other_users_events_data_provider
* @covers \core_calendar_external::delete_calendar_events
* @param bool $isadmin Whether the current user is admin.
* @param bool $isadminevent Whether it's an admin event or not.
@@ -2756,7 +2756,7 @@ class externallib_test extends externallib_advanced_testcase {
/**
* Test the behavior of editing other users' user events
*
* @dataProvider test_edit_or_delete_other_users_events_data_provider
* @dataProvider edit_or_delete_other_users_events_data_provider
* @covers \core_calendar_external::submit_create_update_form
* @param bool $isadmin Whether the current user is admin.
* @param bool $isadminevent Whether it's an admin event or not.
+6 -6
View File
@@ -49,7 +49,7 @@ class std_proxy_test extends \advanced_testcase {
/**
* Test proxying.
*
* @dataProvider test_proxy_testcases()
* @dataProvider proxy_testcases
* @param int $id Object ID.
* @param string $member Object member to retrieve.
* @param mixed $expected Expected value of member.
@@ -65,7 +65,7 @@ class std_proxy_test extends \advanced_testcase {
/**
* Test setting values with a base class.
*
* @dataProvider test_proxy_testcases()
* @dataProvider proxy_testcases
* @param int $id Object ID.
* @param string $member Object member to retrieve.
* @param mixed $storedvalue Value as would be stored externally.
@@ -86,7 +86,7 @@ class std_proxy_test extends \advanced_testcase {
/**
* Test getting a non existant member.
*
* @dataProvider test_get_set_testcases()
* @dataProvider get_set_testcases
* @param int $id ID of the object being proxied.
*/
public function test_get_invalid_member($id) {
@@ -101,7 +101,7 @@ class std_proxy_test extends \advanced_testcase {
/**
* Test get proxied instance.
*
* @dataProvider test_get_set_testcases()
* @dataProvider get_set_testcases
* @param int $id Object ID.
*/
public function test_get_proxied_instance($id) {
@@ -115,7 +115,7 @@ class std_proxy_test extends \advanced_testcase {
/**
* Test cases for proxying test.
*/
public function test_proxy_testcases() {
public function proxy_testcases() {
return [
'Object 1 member 1' => [
1,
@@ -153,7 +153,7 @@ class std_proxy_test extends \advanced_testcase {
/**
* Test cases for getting and setting tests.
*/
public function test_get_set_testcases() {
public function get_set_testcases() {
return [
'Object 1' => [1],
'Object 2' => [5]
+4
View File
@@ -70,6 +70,10 @@ $CFG->dboptions = array(
// can be removed for MySQL (by default it will
// use 'utf8mb4_unicode_ci'. This option should
// be removed for all other databases.
// 'extrainfo' => [], // Extra information for the DB driver, e.g. SQL Server,
// has additional configuration according to its environment,
// which the administrator can specify to alter and
// override any connection options.
// 'fetchbuffersize' => 100000, // On PostgreSQL, this option sets a limit
// on the number of rows that are fetched into
// memory when doing a large recordset query
@@ -14,7 +14,7 @@ Feature: Sections can be edited and deleted in topics format
And the following "activities" exist:
| activity | name | intro | course | idnumber | section |
| assign | Test assignment name | Test assignment description | C1 | assign1 | 0 |
| book | Test book name | Test book description | C1 | book1 | 1 |
| book | Test book name | | C1 | book1 | 1 |
| chat | Test chat name | Test chat description | C1 | chat1 | 4 |
| choice | Test choice name | Test choice description | C1 | choice1 | 5 |
And the following "course enrolments" exist:
@@ -14,7 +14,7 @@ Feature: Sections can be edited and deleted in weeks format
And the following "activities" exist:
| activity | name | intro | course | idnumber | section |
| assign | Test assignment name | Test assignment description | C1 | assign1 | 0 |
| book | Test book name | Test book description | C1 | book1 | 1 |
| book | Test book name | | C1 | book1 | 1 |
| chat | Test chat name | Test chat description | C1 | chat1 | 4 |
| choice | Test choice name | Test choice description | C1 | choice1 | 5 |
And the following "course enrolments" exist:
+80
View File
@@ -0,0 +1,80 @@
@core @core_course
Feature: Teacher can change the course format
In order to change course format
As a teacher
I should be able to edit a course
@javascript
Scenario: Teacher can change the course format
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
# Course format is initially set to Topics format
And the following "courses" exist:
| fullname | shortname | format | startdate |
| Course 1 | C1 | topics | ## 1 day ago ## |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
# Confirm that course format is Topics
When I am on the "Course 1" course page logged in as teacher1
Then I should see "Topic 1"
And I am on the "Course 1" "course editing" page
And I expand all fieldsets
# Fields that appear for Topics format exist
# Also confirm contents of Hidden sections and Course layout select box
And I should see "Hidden sections"
And the "Hidden sections" select box should contain "Hidden sections are shown in collapsed form"
And the "Hidden sections" select box should contain "Hidden sections are completely invisible"
# Hidden sections default value is 0 (Hidden sections are shown in collapsed form)
And the field "Hidden sections" matches value "0"
And I should see "Course layout"
And the "Course layout" select box should contain "Show all sections on one page"
And the "Course layout" select box should contain "Show one section per page"
# Course layout default value is 0 (Show all sections on one page)
And the field "Course layout" matches value "0"
# Set course format to Single activity format
And I set the field "Format" to "Single activity format"
And I expand all fieldsets
# Confirm that fields that appear for Single activity format appears
And I should see "Type of activity"
And I set the field "Type of activity" to "Glossary"
And I press "Save and display"
And I set the field "Name" to "Glossary 1"
And I press "Save and display"
# Confirm that course page displays single activity of type Glossary
And I should see "Browse the glossary using this index"
And I should not see "Topic 1"
And I am on the "Course 1" "course editing" page
And I expand all fieldsets
# Set course format to Weekly format
And I set the field "Format" to "Weekly format"
And I expand all fieldsets
# Confirm that fields that appear for Weekly format appears
# Also confirm contents of Hidden sections and Course layout select box
And I should see "Hidden sections"
And the "Hidden sections" select box should contain "Hidden sections are shown in collapsed form"
And the "Hidden sections" select box should contain "Hidden sections are completely invisible"
# Hidden sections default value is 0 (Hidden sections are shown in collapsed form)
And the field "Hidden sections" matches value "0"
And I should see "Course layout"
And the "Course layout" select box should contain "Show all sections on one page"
And the "Course layout" select box should contain "Show one section per page"
# Course layout default value is 0 (Show all sections on one page)
And the field "Course layout" matches value "0"
And I press "Save and display"
# Confirm that course page displays weekly sections
And I should see "This week"
And I should not see "Browse the glossary using this index"
And I am on the "Course 1" "course editing" page
And I expand all fieldsets
# Set course format to Social format
And I set the field "Format" to "Social format"
# Confirm that fields that appear for Social format appears
And I expand all fieldsets
And I should see "Number of discussions"
And the field "Number of discussions" matches value "10"
And I press "Save and display"
# Confirm that course page displays a forum
And I should see "There are no discussion topics yet in this forum"
And I should not see "This week"
@@ -0,0 +1,81 @@
@enrol @enrol_cohort
Feature: Cohort enrolment management
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher001 | Teacher | 001 | teacher001@example.com |
| s1 | Sandra | Cole | s1@example.com |
| s2 | John | Smith | s2@example.com |
| s4 | Jane | Doe | s4@example.com |
| s3 | Bianca | McAfee | s3@example.com |
| s5 | Abigail | Wyatt | s5@example.com |
And the following "cohorts" exist:
| name | idnumber | visible | Context |
| Alpha1 | A1 | 1 | 3 |
| Beta2 | B1 | 1 | 3 |
And the following "courses" exist:
| fullname | shortname | format | startdate |
| Course 001 | C001 | weeks | ##1 month ago## |
And the following "course enrolments" exist:
| user | course | role | timestart |
| teacher001 | C001 | editingteacher | ##1 month ago## |
And the following "cohort members" exist:
| user | cohort |
| s1 | A1 |
| s2 | A1 |
| s3 | B1 |
| s5 | B1 |
And I am on the "Course 001" course page logged in as teacher001
@javascript
Scenario: Add groups in the course cohort enrolment
When I add "Cohort sync" enrolment method with:
| Cohort | A1 |
| customint2 | -1 |
Then I should see "Cohort sync (Alpha1 - Student)"
And I am on "Course 001" course homepage
And I navigate to "Users > Groups" in current page administration
# Confirm that group was created and corresponding group members are present
And I set the field "groups[]" to "Alpha1 cohort (2)"
And the "members" select box should contain "Sandra Cole (s1@example.com)"
And the "members" select box should contain "John Smith (s2@example.com)"
And I log in as "admin"
And I navigate to "Users > Accounts > Cohorts" in site administration
And I click on "Assign" "link" in the "Alpha1" "table_row"
And I should see "Cohort 'Alpha1' members"
And I should see "Removing users from a cohort may result in unenrolling of users from multiple courses which includes deleting of user settings, grades, group membership and other user information from affected courses."
# Remove user s4 from cohort
And I set the field "removeselect[]" to "John Smith (s2@example.com)"
And I click on "Remove" "button"
# Add user s4 to the cohort.
And I set the field "addselect_searchtext" to "s4"
And I set the field "addselect[]" to "Jane Doe (s4@example.com)"
And I click on "Add" "button"
And the "removeselect[]" select box should contain "Sandra Cole (s1@example.com)"
And the "removeselect[]" select box should contain "Jane Doe (s4@example.com)"
And the "removeselect[]" select box should not contain "John Smith (s2@example.com)"
And I trigger cron
And I am on "Course 001" course homepage
And I navigate to course participants
# Verifies students 1 and 4 are in the cohort and student 2 is not any more.
And the following should exist in the "participants" table:
| First name / Last name | Email address | Roles | Groups |
| Sandra Cole | s1@example.com | Student | Alpha1 cohort |
| Jane Doe | s4@example.com | Student | Alpha1 cohort |
And the following should not exist in the "participants" table:
| First name / Last name | Email address | Roles | Groups |
| John Smith | s2@example.com | Student | Alpha1 cohort |
@javascript
Scenario: Course cohort enrolment creates a new group
When I add "Cohort sync" enrolment method with:
| Cohort | B1 |
And I click on "Edit" "link" in the "Beta2" "table_row"
And I set the field "Add to group" to "Create new group"
And I click on "Save changes" "button"
And I am on "Course 001" course homepage
And I navigate to "Users > Groups" in current page administration
And I set the field "groups[]" to "Beta2 cohort (2)"
Then the "members" select box should contain "Bianca McAfee (s3@example.com)"
And the "members" select box should contain "Abigail Wyatt (s5@example.com)"
@@ -26,9 +26,8 @@ Feature: Add a new custom file type
| Custom description | Moodle rules |
And I press "Save changes"
And I should see "application/x-moodle-rules"
And I log out
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I am on the "Course 1" course page logged in as teacher1
And I turn editing mode on
When I add a "File" to section "1" and I fill the form with:
| Name | Test file |
| Select files | files/tests/fixtures/custom_filetype.mdlr |
+1 -1
View File
@@ -238,7 +238,7 @@ class filter_algebra extends moodle_text_filter {
$DB->insert_record("cache_filters", $texcache, false);
$text = str_replace( $matches[0][$i], filter_algebra_image($filename, $texexp, '', '', $align), $text);
} else {
$text = str_replace( $matches[0][$i],"<b>Undetermined error:</b> ",$text);
$text = str_replace( $matches[0][$i],"<b>Undetermined error:</b> " . $matches[0][$i], $text);
}
} else {
$text = str_replace( $matches[0][$i], filter_algebra_image($filename, $texcache->rawtext), $text);
+1 -1
View File
@@ -123,7 +123,7 @@ class filter_data extends moodle_text_filter {
usort($contents, 'filter_data::sort_entries_by_length');
foreach ($contents as $content) {
$href_tag_begin = '<a class="data autolink dataid'.$content->dataid.'" title="'.$content->content.'" '.
$href_tag_begin = '<a class="data autolink dataid'.$content->dataid.'" title="'.s($content->content).'" '.
'href="'.$CFG->wwwroot.'/mod/data/view.php?d='.$content->dataid.
'&amp;rid='.$content->recordid.'">';
$contentlist[] = new filterobject($content->content, $href_tag_begin, '</a>', false, true);
+4 -11
View File
@@ -14,15 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Provides the {@link filter_mathjaxloader_filter_testcase} class.
*
* @package filter_mathjaxloader
* @category test
* @copyright 2017 David Mudrák <david@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace filter_mathjaxloader;
use filter_mathjaxloader;
@@ -35,6 +26,8 @@ require_once($CFG->dirroot.'/filter/mathjaxloader/filter.php');
/**
* Unit tests for the MathJax loader filter.
*
* @package filter_mathjaxloader
* @category test
* @copyright 2017 David Mudrak <david@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -46,7 +39,7 @@ class filter_test extends \advanced_testcase {
* @param string $moodlelangcode the user's current language
* @param string $mathjaxlangcode the mathjax language to be used for the moodle language
*
* @dataProvider test_map_language_code_expected_mappings
* @dataProvider map_language_code_expected_mappings
*/
public function test_map_language_code($moodlelangcode, $mathjaxlangcode) {
@@ -59,7 +52,7 @@ class filter_test extends \advanced_testcase {
*
* @return array of [moodlelangcode, mathjaxcode] tuples
*/
public function test_map_language_code_expected_mappings() {
public function map_language_code_expected_mappings() {
return [
['cz', 'cs'], // Explicit mapping.
@@ -38,7 +38,7 @@ class filtermath_test extends \advanced_testcase {
* @param string $inputtext The text given by the user.
* @param string $expected The expected output after filtering.
*
* @dataProvider test_math_filtering_inputs
* @dataProvider math_filtering_inputs
*/
public function test_math_filtering($inputtext, $expected) {
$filter = new filter_mathjaxloader(\context_system::instance(), []);
@@ -50,7 +50,7 @@ class filtermath_test extends \advanced_testcase {
*
* @return array of [inputtext, expectedoutput] tuples.
*/
public function test_math_filtering_inputs() {
public function math_filtering_inputs() {
return [
// One inline formula.
['Some inline math \\( y = x^2 \\).',
@@ -43,24 +43,24 @@ Feature: We can change what we are viewing on the grader report
And I click on "Hide" "link" in the "Test assignment name 2" activity
And I am on "Course 1" course homepage
And I navigate to "View > Grader report" in the course gradebook
And I should see "Test assignment name 1"
And I should see "Test assignment name 2"
And I should see "Test assignment name 1" in the "user-grades" "table"
And I should see "Test assignment name 2" in the "user-grades" "table"
And I should see "Manual grade"
And I should see "Course total"
And the following should exist in the "user-grades" table:
| -1- | -4- | -5- | -6- | -7- |
| Student 1 | 80 | 90 | 30 | 170 |
And I click on "Change to aggregates only" "link"
And I should not see "Test assignment name 1"
And I should not see "Test assignment name 2"
And I should not see "Test assignment name 1" in the "user-grades" "table"
And I should not see "Test assignment name 2" in the "user-grades" "table"
And I should not see "Manual grade"
And I should see "Course total"
And the following should exist in the "user-grades" table:
| -1- | -4- |
| Student 1 | 170 |
And I click on "Change to grades only" "link"
And I should see "Test assignment name 1"
And I should see "Test assignment name 2"
And I should see "Test assignment name 1" in the "user-grades" "table"
And I should see "Test assignment name 2" in the "user-grades" "table"
And I should see "Manual grade"
And I should not see "Course total"
And the following should exist in the "user-grades" table:
@@ -68,7 +68,7 @@ Feature: We can change what we are viewing on the grader report
| Student 1 | 80 | 90 | 30 |
@javascript @skip_chrome_zerosize
Scenario: View and minimise the grader report containing hidden activities without the 'moodle/grade:viewhidden' capability
Scenario: Minimise the grader report containing hidden activities without the 'moodle/grade:viewhidden' capability
When I am on "Course 1" course homepage with editing mode on
And I open "Test assignment name 2" actions menu
And I click on "Hide" "link" in the "Test assignment name 2" activity
@@ -81,24 +81,24 @@ Feature: We can change what we are viewing on the grader report
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "View > Grader report" in the course gradebook
And I should see "Test assignment name 1"
And I should see "Test assignment name 2"
And I should see "Test assignment name 1" in the "user-grades" "table"
And I should see "Test assignment name 2" in the "user-grades" "table"
And I should see "Manual grade"
And I should see "Course total"
And the following should exist in the "user-grades" table:
| -1- | -4- | -5- | -6- | -7- |
| Student 1 | 80 | - | 30 | 105.71 |
And I click on "Change to aggregates only" "link"
And I should not see "Test assignment name 1"
And I should not see "Test assignment name 2"
And I should not see "Test assignment name 1" in the "user-grades" "table"
And I should not see "Test assignment name 2" in the "user-grades" "table"
And I should not see "Manual grade"
And I should see "Course total"
And the following should exist in the "user-grades" table:
| -1- | -4- |
| Student 1 | 105.71 |
And I click on "Change to grades only" "link"
And I should see "Test assignment name 1"
And I should see "Test assignment name 2"
And I should see "Test assignment name 1" in the "user-grades" "table"
And I should see "Test assignment name 2" in the "user-grades" "table"
And I should see "Manual grade"
And I should not see "Course total"
And the following should exist in the "user-grades" table:
@@ -27,6 +27,7 @@ namespace gradereport_history\output;
defined('MOODLE_INTERNAL') || die;
require_once($CFG->libdir . '/tablelib.php');
require_once($CFG->dirroot . '/user/lib.php');
/**
* Renderable class for gradehistory report.
@@ -53,6 +54,11 @@ class tablelog extends \table_sql implements \renderable {
*/
protected $filters;
/**
* @var \stdClass[] List of users included in the report (if userids are specified as filters)
*/
protected $users = [];
/**
* @var array A list of grade items present in the course.
*/
@@ -99,7 +105,6 @@ class tablelog extends \table_sql implements \renderable {
$this->courseid = $this->context->instanceid;
$this->pagesize = $perpage;
$this->page = $page;
$this->filters = (object)$filters;
$this->gradeitems = \grade_item::fetch_all(array('courseid' => $this->courseid));
$this->cms = get_fast_modinfo($this->courseid);
$this->useridfield = 'userid';
@@ -108,6 +113,9 @@ class tablelog extends \table_sql implements \renderable {
// Define columns in the table.
$this->define_table_columns();
// Define filters.
$this->define_table_filters((object) $filters);
// Define configs.
$this->define_table_configs($url);
@@ -136,6 +144,36 @@ class tablelog extends \table_sql implements \renderable {
$this->no_sorting('grader');
}
/**
* Define table filters
*
* @param \stdClass $filters
*/
protected function define_table_filters(\stdClass $filters): void {
global $DB;
$this->filters = $filters;
if (!empty($this->filters->userids)) {
$course = get_course($this->courseid);
// Retrieve userids that are part of the filters object, and ensure user can access each of them.
[$userselect, $userparams] = $DB->get_in_or_equal(explode(',', $this->filters->userids), SQL_PARAMS_NAMED);
[$usersort] = users_order_by_sql();
$this->users = array_filter(
$DB->get_records_select('user', "id {$userselect}", $userparams, $usersort),
static function(\stdClass $user) use ($course): bool {
return user_can_view_profile($user, $course);
}
);
// Reset userids to the filtered array of users.
$this->filters->userids = implode(',', array_keys($this->users));
}
}
/**
* Setup the headers for the html table.
*/
@@ -510,20 +548,9 @@ class tablelog extends \table_sql implements \renderable {
/**
* Returns a list of selected users.
*
* @return array returns an array in the format $userid => $userid
* @return \stdClass[] List of user objects
*/
public function get_selected_users() {
global $DB;
$idlist = array();
if (!empty($this->filters->userids)) {
$idlist = explode(',', $this->filters->userids);
list($where, $params) = $DB->get_in_or_equal($idlist);
[$order] = users_order_by_sql();
return $DB->get_records_select('user', "id $where", $params, $order);
}
return $idlist;
public function get_selected_users(): array {
return $this->users;
}
}
+14 -4
View File
@@ -54,6 +54,9 @@ class report_test extends \advanced_testcase {
self::getDataGenerator()->enrol_user($u4->id, $c1->id, 'student');
self::getDataGenerator()->enrol_user($u5->id, $c1->id, 'student');
self::getDataGenerator()->enrol_user($grader1->id, $c2->id, 'teacher');
self::getDataGenerator()->enrol_user($u5->id, $c2->id, 'student');
// Modules.
$c1m1 = $this->getDataGenerator()->create_module('assign', array('course' => $c1));
$c1m2 = $this->getDataGenerator()->create_module('assign', array('course' => $c1));
@@ -126,11 +129,18 @@ class report_test extends \advanced_testcase {
$this->assertEquals(8, $this->get_tablelog_results($c1ctx, array(), true));
$this->assertEquals(13, $this->get_tablelog_results($c2ctx, array(), true));
// Filtering on 1 user.
$this->assertEquals(3, $this->get_tablelog_results($c1ctx, array('userids' => $u1->id), true));
// Filtering on 1 user the current user cannot access should return all records.
$this->assertEquals(8, $this->get_tablelog_results($c1ctx, array('userids' => $u1->id), true));
// Filtering on more users.
$this->assertEquals(4, $this->get_tablelog_results($c1ctx, array('userids' => "$u1->id,$u3->id"), true));
// Filtering on 2 users, only one of whom the current user can access.
$this->assertEquals(1, $this->get_tablelog_results($c1ctx, ['userids' => "$u1->id,$u3->id"], true));
$results = $this->get_tablelog_results($c1ctx, ['userids' => "$u1->id,$u3->id"]);
$this->assertGradeHistoryIds([$grades['c1m1u3']->id], $results);
// Filtering on 2 users, both of whom the current user can access.
$this->assertEquals(3, $this->get_tablelog_results($c1ctx, ['userids' => "$u2->id,$u3->id"], true));
$results = $this->get_tablelog_results($c1ctx, ['userids' => "$u2->id,$u3->id"]);
$this->assertGradeHistoryIds([$grades['c1m1u2']->id, $grades['c1m1u3']->id, $grades['c1m2u2']->id], $results);
// Filtering based on one grade item.
$gi = \grade_item::fetch($giparams + array('iteminstance' => $c1m1->id));
@@ -421,6 +421,8 @@ Feature: We can use calculated grade totals
| Extra credit | 0 |
| Maximum grade | 200 |
| Rescale existing grades | No |
# Change window size to ultra-wide to avoid 'out-of-bounds' random failures.
And I change window size to "5120x2160"
And I give the grade "21.00" to the user "Student 1" for the grade item "Manual item 2"
And I press "Save changes"
And I give the grade "20.00" to the user "Student 1" for the grade item "Manual item 2"
@@ -432,6 +434,8 @@ Feature: We can use calculated grade totals
| Extra credit | 0 |
| Maximum grade | 100 |
| Rescale existing grades | No |
# Change window size to ultra-wide to avoid 'out-of-bounds' random failures.
And I change window size to "5120x2160"
And I give the grade "21.00" to the user "Student 1" for the grade item "Manual item 2"
And I press "Save changes"
And I give the grade "20.00" to the user "Student 1" for the grade item "Manual item 2"
+19 -23
View File
@@ -114,10 +114,11 @@ Feature: We can set the grade to pass value
Scenario: Set a valid grade to pass for workshop activity
Given the following "activities" exist:
| activity | name | course | idnumber |
| workshop | Test Workshop 1 | C1 | workshop1 |
| activity | name | intro | course | section | idnumber |
| workshop | Test Workshop 1 | Test workshop | C1 | 1 | workshop1 |
And I am on "Course 1" course homepage with editing mode on
And I am on the "Test Workshop 1" "workshop activity editing" page
And I follow "Test Workshop 1"
And I navigate to "Edit settings" in current page administration
And I set the following fields to these values:
| grade | 80 |
| Submission grade to pass | 40 |
@@ -136,16 +137,19 @@ Feature: We can set the grade to pass value
And the field "Grade to pass" matches value "10"
And I set the field "Grade to pass" to "15"
And I press "Save changes"
And I am on the "Test Workshop 1" "workshop activity editing" page
And I am on "Course 1" course homepage
And I follow "Test Workshop 1"
And I follow "Edit settings"
And the field "Submission grade to pass" matches value "45"
And the field "Assessment grade to pass" matches value "15"
Scenario: Set an invalid grade to pass for workshop activity
Given the following "activities" exist:
| activity | name | course | idnumber |
| workshop | Test Workshop 1 | C1 | workshop1 |
| activity | name | intro | course | section | idnumber |
| workshop | Test Workshop 1 | Test workshop | C1 | 1 | workshop1 |
And I am on "Course 1" course homepage with editing mode on
And I am on the "Test Workshop 1" "workshop activity editing" page
And I follow "Test Workshop 1"
And I navigate to "Edit settings" in current page administration
And I set the following fields to these values:
| grade | 80 |
| Submission grade to pass | 90 |
@@ -179,11 +183,9 @@ Feature: We can set the grade to pass value
Scenario: Set a valid grade to pass for lesson activity
Given the following "activities" exist:
| activity | name | intro | course | section | idnumber |
| lesson | Test Lesson 1 | Test | C1 | 1 | lesson1 |
And I am on "Course 1" course homepage with editing mode on
And I follow "Test Lesson 1"
And I navigate to "Edit settings" in current page administration
| activity | name | course | idnumber |
| lesson | Test Lesson 1 | C1 | lesson1 |
And I am on the "Test Lesson 1" "lesson activity editing" page
And I set the following fields to these values:
| Grade to pass | 90 |
And I press "Save and return to course"
@@ -194,21 +196,17 @@ Feature: We can set the grade to pass value
Then the field "Grade to pass" matches value "90"
And I set the field "Grade to pass" to "80"
And I press "Save changes"
And I am on "Course 1" course homepage
And I follow "Test Lesson 1"
And I follow "Edit settings"
And I am on the "Test Lesson 1" "lesson activity editing" page
And the field "Grade to pass" matches value "80"
Scenario: Set a valid grade to pass for lesson activity with custom decimal separator
Given the following "activities" exist:
| activity | name | intro | course | section | idnumber |
| lesson | Test Lesson 1 | Test | C1 | 1 | lesson1 |
| activity | name | course | idnumber |
| lesson | Test Lesson 1 | C1 | lesson1 |
And the following "language customisations" exist:
| component | stringid | value |
| core_langconfig | decsep | # |
And I am on "Course 1" course homepage with editing mode on
And I follow "Test Lesson 1"
And I navigate to "Edit settings" in current page administration
And I am on the "Test Lesson 1" "lesson activity editing" page
And I set the following fields to these values:
| Grade to pass | 90#50 |
And I press "Save and return to course"
@@ -219,9 +217,7 @@ Feature: We can set the grade to pass value
Then the field "Grade to pass" matches value "90#50"
And I set the field "Grade to pass" to "80"
And I press "Save changes"
And I am on "Course 1" course homepage
And I follow "Test Lesson 1"
And I follow "Edit settings"
And I am on the "Test Lesson 1" "lesson activity editing" page
And the field "Grade to pass" matches value "80#00"
Scenario: Set a valid grade to pass for database activity
@@ -1,8 +1,8 @@
@core @core_group
Feature: The description of a group can be viewed by students and teachers
In order to view the description of a group
Feature: The description and picture of a group can be viewed by students and teachers
In order to view the description and picture of a group
As a teacher
I need to create groups and add descriptions to them.
I need to create groups and add descriptions and picture to them.
Background:
Given the following "courses" exist:
@@ -19,11 +19,9 @@ Feature: The description of a group can be viewed by students and teachers
| student1 | C1 | student |
| student2 | C1 | student |
@javascript
Scenario: A student can see the group description when visible groups are set. Teachers can see group details.
Given I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Edit settings" in current page administration
@javascript @_file_upload
Scenario: A student can see the group description and picture when visible groups are set. Teachers can see group details.
Given I am on the "Course 1" "course editing" page logged in as "teacher1"
And I set the following fields to these values:
| Group mode | Visible groups |
And I press "Save and display"
@@ -32,6 +30,8 @@ Feature: The description of a group can be viewed by students and teachers
And I set the following fields to these values:
| Group name | Group A |
| Group description | Description for Group A |
# Upload group picture
And I upload "lib/tests/fixtures/gd-logo.png" file to "New picture" filemanager
And I press "Save changes"
And I press "Create group"
And I set the following fields to these values:
@@ -39,11 +39,12 @@ Feature: The description of a group can be viewed by students and teachers
And I press "Save changes"
And I add "Student 1 (student1@example.com)" user to "Group A" group members
And I add "Student 2 (student2@example.com)" user to "Group B" group members
And I am on "Course 1" course homepage
And I navigate to course participants
And I click on "Student 1" "link" in the "participants" "table"
And I click on "Group A" "link"
And I should see "Description for Group A"
# As teacher, confirm that group picture is displayed
And "//img[@class='grouppicture']" "xpath_element" should exist
And ".groupinfobox" "css_element" should exist
And I set the field "type" in the "Filter 1" "fieldset" to "Groups"
And I set the field "Type or select..." in the "Filter 1" "fieldset" to "Group B"
@@ -52,27 +53,23 @@ Feature: The description of a group can be viewed by students and teachers
And I click on "Group B" "link"
And I should see "Student 2" in the "participants" "table"
And ".groupinfobox" "css_element" should not exist
And I log out
When I log in as "student1"
And I am on "Course 1" course homepage
When I am on the "Course 1" course page logged in as student1
And I navigate to course participants
And I click on "Student 1" "link" in the "participants" "table"
And I click on "Group A" "link"
# As student, confirm that group description and picture is displayed
Then I should see "Description for Group A"
And I log out
And I log in as "student2"
And I am on "Course 1" course homepage
And "//img[@class='grouppicture']" "xpath_element" should exist
And I am on the "Course 1" course page logged in as student2
And I navigate to course participants
And I click on "Student 2" "link" in the "participants" "table"
And I click on "Group B" "link"
And I should see "Student 2" in the "participants" "table"
And ".groupinfobox" "css_element" should not exist
@javascript
Scenario: A student can not see the group description when separate groups are set. Teachers can see group details.
Given I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Edit settings" in current page administration
@javascript @_file_upload
Scenario: A student can not see the group description and picture when separate groups are set. Teachers can see group details.
Given I am on the "Course 1" "course editing" page logged in as "teacher1"
And I set the following fields to these values:
| Group mode | Separate groups |
And I press "Save and display"
@@ -81,6 +78,8 @@ Feature: The description of a group can be viewed by students and teachers
And I set the following fields to these values:
| Group name | Group A |
| Group description | Description for Group A |
# Upload group picture
And I upload "lib/tests/fixtures/gd-logo.png" file to "New picture" filemanager
And I press "Save changes"
And I press "Create group"
And I set the following fields to these values:
@@ -88,11 +87,12 @@ Feature: The description of a group can be viewed by students and teachers
And I press "Save changes"
And I add "Student 1 (student1@example.com)" user to "Group A" group members
And I add "Student 2 (student2@example.com)" user to "Group B" group members
And I am on "Course 1" course homepage
And I navigate to course participants
And I click on "Student 1" "link" in the "participants" "table"
And I click on "Group A" "link"
And I should see "Description for Group A"
# As teacher, confirm that group picture is displayed
And "//img[@class='grouppicture']" "xpath_element" should exist
And ".groupinfobox" "css_element" should exist
And I set the field "type" in the "Filter 1" "fieldset" to "Groups"
And I set the field "Type or select..." in the "Filter 1" "fieldset" to "Group B"
@@ -100,18 +100,16 @@ Feature: The description of a group can be viewed by students and teachers
And I click on "Student 2" "link" in the "participants" "table"
And I click on "Group B" "link"
And ".groupinfobox" "css_element" should not exist
And I log out
When I log in as "student1"
And I am on "Course 1" course homepage
When I am on the "Course 1" course page logged in as student1
And I navigate to course participants
And I click on "Student 1" "link" in the "participants" "table"
And I click on "Group A" "link"
And I should see "Student 1" in the "participants" "table"
And I should not see "Description for Group A"
# As student, confirm that group description and picture are not displayed
Then I should not see "Description for Group A"
And "//img[@class='grouppicture']" "xpath_element" should not exist
And ".groupinfobox" "css_element" should not exist
And I log out
And I log in as "student2"
And I am on "Course 1" course homepage
When I am on the "Course 1" course page logged in as student2
And I navigate to course participants
And I click on "Student 2" "link" in the "participants" "table"
And I click on "Group B" "link"
+7 -15
View File
@@ -14,15 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Testing the H5PFrameworkInterface interface implementation.
*
* @package core_h5p
* @category test
* @copyright 2019 Mihail Geshoski <mihail@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace core_h5p;
use core_collator;
@@ -34,6 +25,7 @@ use Moodle\H5PDisplayOptionBehaviour;
* Test class covering the H5PFrameworkInterface interface implementation.
*
* @package core_h5p
* @category test
* @copyright 2019 Mihail Geshoski <mihail@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @runTestsInSeparateProcesses
@@ -638,7 +630,7 @@ class framework_test extends \advanced_testcase {
/**
* Test the behaviour of isPatchedLibrary().
*
* @dataProvider test_isPatchedLibrary_provider
* @dataProvider isPatchedLibrary_provider
* @param array $libraryrecords Array containing data for the library creation
* @param array $testlibrary Array containing the test library data
* @param bool $expected The expectation whether the library is patched or not
@@ -660,7 +652,7 @@ class framework_test extends \advanced_testcase {
*
* @return array
*/
public function test_isPatchedLibrary_provider(): array {
public function isPatchedLibrary_provider(): array {
return [
'Unpatched library. No different versioning' => [
[
@@ -1416,7 +1408,7 @@ class framework_test extends \advanced_testcase {
/**
* Test the behaviour of loadLibrarySemantics().
*
* @dataProvider test_loadLibrarySemantics_provider
* @dataProvider loadLibrarySemantics_provider
* @param array $libraryrecords Array containing data for the library creation
* @param array $testlibrary Array containing the test library data
* @param string $expected The expected semantics value
@@ -1439,7 +1431,7 @@ class framework_test extends \advanced_testcase {
*
* @return array
*/
public function test_loadLibrarySemantics_provider(): array {
public function loadLibrarySemantics_provider(): array {
$semantics = json_encode(
[
@@ -2208,7 +2200,7 @@ class framework_test extends \advanced_testcase {
/**
* Test the behaviour of test_libraryHasUpgrade().
*
* @dataProvider test_libraryHasUpgrade_provider
* @dataProvider libraryHasUpgrade_provider
* @param array $libraryrecords Array containing data for the library creation
* @param array $testlibrary Array containing the test library data
* @param bool $expected The expectation whether the library is patched or not
@@ -2230,7 +2222,7 @@ class framework_test extends \advanced_testcase {
*
* @return array
*/
public function test_libraryHasUpgrade_provider(): array {
public function libraryHasUpgrade_provider(): array {
return [
'Lower major version; Identical lower version' => [
[
+11 -22
View File
@@ -14,23 +14,12 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Test class covering the h5p data generator class.
*
* @package core_h5p
* @category test
* @copyright 2019 Mihail Geshoski <mihail@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace core_h5p;
use core_h5p\local\library\autoloader;
defined('MOODLE_INTERNAL') || die();
/**
* Generator testcase for the core_grading generator.
* Test class covering the h5p data generator class.
*
* @package core_h5p
* @category test
@@ -165,7 +154,7 @@ class generator_test extends \advanced_testcase {
* Test the behaviour of generate_h5p_data(). Test whether library files are created or not
* on filesystem depending what the method defines.
*
* @dataProvider test_generate_h5p_data_files_creation_provider
* @dataProvider generate_h5p_data_files_creation_provider
* @param bool $createlibraryfiles Whether to create library files on the filesystem
* @param bool $expected The expectation whether the files have been created or not
**/
@@ -205,7 +194,7 @@ class generator_test extends \advanced_testcase {
*
* @return array
*/
public function test_generate_h5p_data_files_creation_provider(): array {
public function generate_h5p_data_files_creation_provider(): array {
return [
'Do not create library related files on the filesystem' => [
false,
@@ -261,7 +250,7 @@ class generator_test extends \advanced_testcase {
* Test the behaviour of create_h5p_record(). Test whather the h5p content data is
* properly saved in the database.
*
* @dataProvider test_create_h5p_record_provider
* @dataProvider create_h5p_record_provider
* @param array $h5pdata The h5p content data
* @param \stdClass $expected The expected saved data
**/
@@ -287,7 +276,7 @@ class generator_test extends \advanced_testcase {
*
* @return array
*/
public function test_create_h5p_record_provider(): array {
public function create_h5p_record_provider(): array {
$createdjsoncontent = json_encode(
array(
'text' => '<p>Created dummy text<\/p>\n',
@@ -384,7 +373,7 @@ class generator_test extends \advanced_testcase {
* Test the behaviour of create_contents_libraries_record(). Test whether the contents libraries
* are properly saved in the database.
*
* @dataProvider test_create_contents_libraries_record_provider
* @dataProvider create_contents_libraries_record_provider
* @param array $contentslibrariestdata The h5p contents libraries data.
* @param \stdClass $expected The expected saved data.
**/
@@ -408,7 +397,7 @@ class generator_test extends \advanced_testcase {
*
* @return array
*/
public function test_create_contents_libraries_record_provider(): array {
public function create_contents_libraries_record_provider(): array {
return [
'Create h5p content library with set dependency type' => [
[
@@ -444,7 +433,7 @@ class generator_test extends \advanced_testcase {
* Test the behaviour of create_library_dependency_record(). Test whether the contents libraries
* are properly saved in the database.
*
* @dataProvider test_create_library_dependency_record_provider
* @dataProvider create_library_dependency_record_provider
* @param array $librarydependencydata The library dependency data.
* @param \stdClass $expected The expected saved data.
**/
@@ -468,7 +457,7 @@ class generator_test extends \advanced_testcase {
*
* @return array
*/
public function test_create_library_dependency_record_provider(): array {
public function create_library_dependency_record_provider(): array {
return [
'Create h5p library dependency with set dependency type' => [
[
@@ -499,7 +488,7 @@ class generator_test extends \advanced_testcase {
/**
* Test the behaviour of create_content_file(). Test whether a file belonging to a content is created.
*
* @dataProvider test_create_content_file_provider
* @dataProvider create_content_file_provider
* @param array $filedata Data from the file to be created.
* @param array $expecteddata Data expected.Data from the file to be created.
*/
@@ -534,7 +523,7 @@ class generator_test extends \advanced_testcase {
*
* @return array
**/
public function test_create_content_file_provider(): array {
public function create_content_file_provider(): array {
return [
'Create file in content with id 4' => [
[
+3
View File
@@ -35,3 +35,6 @@ $string['cliincorrectvalueerror'] = 'Eraro, malĝusta valoro "{$a->value}" por
$string['cliincorrectvalueretry'] = 'Malĝusta valoro, bonvolu reprovi';
$string['clitypevalue'] = 'tajpvaloro';
$string['clitypevaluedefault'] = 'tajpvaloro, tajpu Enigklavon por uzi defaŭltan valoron ({$a})';
$string['cliunknowoption'] = 'Nerekonata opcio:
{$a}
Bonvolu uzi --helpopcion.';
+1
View File
@@ -30,6 +30,7 @@
defined('MOODLE_INTERNAL') || die();
$string['language'] = 'Lingvo';
$string['moodlelogo'] = 'Moodle emblemo';
$string['next'] = 'Poste';
$string['previous'] = 'Antaŭa';
$string['reload'] = 'Reŝarĝi';
+6 -1
View File
@@ -29,6 +29,9 @@
defined('MOODLE_INTERNAL') || die();
$string['cannotcreatedboninstall'] = '<p>Tietokantaa ei voi luoda.</p>
<p>Määritettyä tietokantaa ei ole olemassa, eikä kyseisellä käyttäjällä ole oikeutta luoda tietokantaa.</p>
<p>Sivuston järjestelmänvalvojan tulee tarkistaa tietokannan määritykset.</p>';
$string['cannotcreatelangdir'] = 'Kielihakemistoa ei voida luoda';
$string['cannotcreatetempdir'] = 'Temp-hakemistoa ei voitu luoda';
$string['cannotdownloadcomponents'] = 'Komponentteja ei voitu ladata';
@@ -38,10 +41,12 @@ $string['cannotsavemd5file'] = 'MD5-tiedostoa ei voitu tallentaa';
$string['cannotsavezipfile'] = 'Zip-tiedostoa ei voitu tallentaa';
$string['cannotunzipfile'] = 'Zip-tiedostoa ei voitu purkaa';
$string['componentisuptodate'] = 'Komponentti on ajan tasalla';
$string['dmlexceptiononinstall'] = '<p>Tapahtui tietokantavirhe [{$a->errorcode}].<br />{$a->debuginfo}</p>';
$string['downloadedfilecheckfailed'] = 'Ladatun tiedoston tarkistus epäonnistui';
$string['invalidmd5'] = 'Tarkistusmuuttuja oli väärin - yritä uudelleen';
$string['missingrequiredfield'] = 'Joitakin vaadituista kentistä puuttuu';
$string['remotedownloaderror'] = 'Komponentin lataaminen palvelimelle epäonnistui, ole hyvä ja varmista välityspalvelimen asetukset, PHP cURL -laajennus on suositeltu.<br /><br />Sinun täytyy ladata <a href="{$a->url}">{$a->url}</a> -tiedosto manuaalisesti, kopioi se kohteeseen "{$a->dest}" serverilläsi ja pura se sinne.';
$string['remotedownloaderror'] = '<p>Komponentin lataaminen palvelimellesi epäonnistui. Tarkista välityspalvelimen asetukset: PHP cURL -laajennus on erittäin suositeltavaa.</p>
<p>Sinun on ladattava <a href="{$a->url}">{$a->url}</a>-tiedosto manuaalisesti, kopioitava se palvelimellesi kohteeseen "{$a->dest}" ja purettava se sinne.</p>';
$string['wrongdestpath'] = 'Virheellinen kohdekansio';
$string['wrongsourcebase'] = 'Väärä lähteen web-osoitteen kanta';
$string['wrongzipfilename'] = 'Virheellinen zip-tiedoston nimi';
+33
View File
@@ -0,0 +1,33 @@
<?php
// This file is part of Moodle - https://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 <https://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'] = 'fr_ca';
$string['thislanguage'] = 'Francais Canada Épicène';
+34
View File
@@ -0,0 +1,34 @@
<?php
// This file is part of Moodle - https://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 <https://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'] = 'Langue';
$string['next'] = 'Suivant';
$string['previous'] = 'Précédent';
+1 -1
View File
@@ -41,4 +41,4 @@ $string['cliunknowoption'] = 'אפשרויות לא מוכרות :
אנא השתמש באפשרות העזרה.';
$string['cliyesnoprompt'] = 'רשום y (שפרושו כן) או n (שפרושו לא)';
$string['environmentrequireinstall'] = 'נדרש להתקין ולאפשר הרחבה זו';
$string['environmentrequireversion'] = 'גרסה {$a->needed} נדרשת אך הגרסה הנוכחית היא {$a->current}';
$string['environmentrequireversion'] = 'גרסה {$a->needed} נדרשת. הגרסה הנוכחית היא {$a->current}';
+3 -2
View File
@@ -39,5 +39,6 @@ $string['cliunknowoption'] = 'Танихгүй сонголтууд:
{$a}
Тусламж хэсгийг сонгоно уу.';
$string['cliyesnoprompt'] = 'y (гэвэл Тийм) n (гэвэл Үгүй)';
$string['environmentrequireinstall'] = 'суусан/идэвхжсэн байх ёстой';
$string['environmentrequireversion'] = 'та {$a->current} хувилбар ашиглаж байна {$a->needed} хувилбарыг ашиглагх ёстой';
$string['environmentrequireinstall'] = 'суулгаж идэвхжүүлсэн байх ёстой';
$string['environmentrequireversion'] = 'та {$a->current} хувилбарыг ашиглаж байгаа ба {$a->needed} хувилбарыг ашиглах ёстой';
$string['upgradekeyset'] = 'Шинэчлэх түлхүүр (тохируулах бол хоосон орхино)';
+21 -15
View File
@@ -29,18 +29,24 @@
defined('MOODLE_INTERNAL') || die();
$string['cannotcreatelangdir'] = 'lang хавтсыг үүсгэх боломжгүй.';
$string['cannotcreatetempdir'] = 'temp директор үүсгэж чадахгүй байна';
$string['cannotdownloadcomponents'] = 'Компонент татаж чадахгүй байна.';
$string['cannotdownloadzipfile'] = 'Zip файл татаж чадахгүй байна';
$string['cannotfindcomponent'] = 'Компонент олж чадахгүй байна';
$string['cannotsavemd5file'] = 'md5 файл хадгалж чадахгүй байна.';
$string['cannotsavezipfile'] = 'Zip файл хадгалж чадахгүй байна.';
$string['cannotunzipfile'] = 'Файл unzip хийж чадахгүй байна.';
$string['componentisuptodate'] = 'Компонент сүүлийн хувилбар байна.';
$string['downloadedfilecheckfailed'] = 'Татаж авсан файлыг шалгах үйл ажиллагаа бүтсэнгүй.';
$string['invalidmd5'] = 'Буруу md5';
$string['missingrequiredfield'] = 'Зарим шаардлагатай талбар орхигдсон байна.';
$string['wrongdestpath'] = 'Буруу очих зам байна. .';
$string['wrongsourcebase'] = 'Буруу хаягийн мэдээлэл байна.';
$string['wrongzipfilename'] = 'Буруу архивласан файлын нэр байна.';
$string['cannotcreatedboninstall'] = '<p>Өгөгдлийн санг үүсгэх боломжгүй.</p>
<p>Тодорхойлсон өгөгдлийн сан байхгүй, тухайн хэрэглэгч өгөгдлийн сан үүсгэх зөвшөөрөлгүй байна.</p>
<p>Сайтын администратор нь өгөгдлийн сангийн тохиргоог шалгах шаардлагатай.</p>';
$string['cannotcreatelangdir'] = 'Хэлний лавлахыг үүсгэх боломжгүй';
$string['cannotcreatetempdir'] = 'Завсрын лавлахыг үүсгэх боломжгүй';
$string['cannotdownloadcomponents'] = 'Бүрэлдэхүүн хэсгийг татаж авах боломжгүй';
$string['cannotdownloadzipfile'] = 'ZIP файлыг татаж авах боломжгүй байна';
$string['cannotfindcomponent'] = 'Бүрэлдэхүүн хэсгийг олж чадсангүй';
$string['cannotsavemd5file'] = 'md5 файлыг хадгалах боломжгүй';
$string['cannotsavezipfile'] = 'ZIP файлыг хадгалах боломжгүй';
$string['cannotunzipfile'] = 'Файлын архивыг задлах боломжгүй';
$string['componentisuptodate'] = 'Бүрэлдэхүүн хэсгийг шинэчилсэн';
$string['dmlexceptiononinstall'] = '<p>Өгөгдлийн сангийн алдаа гарлаа [{$a->errorcode}].<br />{$a->debuginfo}</p>';
$string['downloadedfilecheckfailed'] = 'Татаж авсан файлыг шалгаж чадсангүй';
$string['invalidmd5'] = 'Шалгах хувьсагч буруу байсан - дахин оролдоно уу';
$string['missingrequiredfield'] = 'Зарим шаардлагатай талбар байхгүй байна';
$string['remotedownloaderror'] = '<p>Серверт бүрэлдэхүүн хэсгийг татаж авч чадсангүй. Прокси тохиргоог шалгана уу; PHP cURL өргөтгөлийг ашиглахыг зөвлөж байна.</p>
<p>Та <a href="{$a->url}">{$a->url}</a> файлыг гараар татан авч серверийнхээ "{$a->dest}" руу хуулж, задлах шаардлагатай.</p>';
$string['wrongdestpath'] = 'Зам буруу байна';
$string['wrongsourcebase'] = 'Эх сурвалжийн URL хаягийн суурь буруу байна';
$string['wrongzipfilename'] = 'ZIP файлын нэр буруу байна';
+59 -29
View File
@@ -29,38 +29,68 @@
defined('MOODLE_INTERNAL') || die();
$string['admindirname'] = 'Админ директор';
$string['availablelangs'] = 'Боломжит хэлний багцууд';
$string['chooselanguagehead'] = 'Хэлээ сонго';
$string['chooselanguagesub'] = 'Зөвхөн суулгах үед ашиглагдах хэлээ сонго. Та дараа нь сайтны болон хэрэглэгчийн хэлийг сонгож болно.';
$string['dataroot'] = 'Өгөгдлийн директор';
$string['dbprefix'] = 'Хүснэгтний угтвар';
$string['dirroot'] = 'Моодл хавтас';
$string['environmenthead'] = 'Таны орчиныг шалгаж байна ...';
$string['installation'] = 'Суулгах';
$string['langdownloaderror'] = 'Харамсалтай нь "{$a}" хэл суусангүй. Суулгах үйл ажиллагаа Англи хэл дээр үргэлжлэх болно.';
$string['memorylimithelp'] = '<p>Таны серверийн PHP санах ойн хязгаар нь {$a} гэж тохируулсан байна.</p>
$string['admindirname'] = 'Админ лавлах';
$string['availablelangs'] = 'Боломжит хэлний багц';
$string['chooselanguagehead'] = 'Хэл сонгох';
$string['chooselanguagesub'] = 'Суулгах хэлээ сонгоно уу. Энэ хэлийг сайтын өгөгдмөл хэл болгон ашиглах боловч дараа нь өөрчилж болно.';
$string['clialreadyconfigured'] = 'config.php тохиргооны файл байна. Энэ сайтад Moodle системийг суулгахын тулд admin/cli/install_database.php ашиглана уу.';
$string['clialreadyinstalled'] = 'config.php тохиргооны файл байна. Энэ сайтад Moodle системийг шинэчлэхийн тулд admin/cli/install_database.php ашиглана уу.';
$string['cliinstallheader'] = 'Moodle {$a} командын мөр суулгах програм';
$string['clitablesexist'] = 'Өгөгдлийн сангийн хүснэгтүүд байна; CLI суурилуултыг үргэлжлүүлэх боломжгүй.';
$string['databasehost'] = 'Өгөгдлийн сангийн хост';
$string['databasename'] = 'Өгөгдлийн сангийн нэр';
$string['databasetypehead'] = 'Өгөгдлийн сангийн драйвер сонгох';
$string['dataroot'] = 'Өгөгдлийн лавлах';
$string['datarootpermission'] = 'Өгөгдлийн лавлахын зөвшөөрөл';
$string['dbprefix'] = 'Хүснэгтийн угтвар';
$string['dirroot'] = 'Moodle лавлах';
$string['environmenthead'] = 'Таны орчныг шалгаж байна ...';
$string['environmentsub2'] = 'Moodle системийн хувилбар бүр нь PHP хувилбарын хамгийн наад захын шаардлагыг хангаж, PHP гол гол өргөтгөлтэй байдаг.
Суурилуулах, шинэчлэхээс өмнө орчны бүрэн шалгалтыг хийдэг. Шинэ хувилбар суулгах эсвэл PHP өргөтгөлийг хэрхэн идэвхжүүлэхийг мэдэхгүй байгаа бол серверийн админтай холбогдоно уу.';
$string['errorsinenvironment'] = 'Орчны шалгалт амжилтгүй боллоо!';
$string['installation'] = 'Суурилуулалт';
$string['langdownloaderror'] = 'Харамсалтай нь "{$a}" хэлийг татаж авч чадсангүй. Суулгах үйл явц англи хэл дээр үргэлжилнэ.';
$string['memorylimithelp'] = '<p>Таны серверийн PHP санах ойн хязгаарлалтыг {$a} гэж тохируулсан байна.</p>
<p>Энэ нь Моодл сүүлд санах ойн асуудлууд ялангуяа олон модуль ба/эсвэл олон хэрэглэгч идэвхжүүлсэн үед учирч болзошгүй. </p>
<p>Энэ нь Moodle системд хожим санах ойн асуудал, ялангуяа олон модулийг идэвхжүүлсэн ба/буюу олон хэрэглэгчтэй үед үүсгэж болзошгүй.</p>
<p>Бид танд зөвлөхөд РНР-гээ боломжит дээд хязгаартайгаар жишээ нь 16М болгож тохируул. Үүний тулд хэд хэдэн арга байна: </p>
<p>Бид танд PHP-г боломжтой бол 40M гэх мэт өндөр хязгаартайгаар тохируулахыг зөвлөж байна.
Үүнд хэд хэдэн арга байдаг ба тэдгээрийг ашиглаж болно:</p>
<ol>
<li>Хэрвээ та PHP-г <i>--enable-memory-limit</i>-тай дахин хөрвүүлэх боломжтой бол. Энэ нь Моодлийг санах ойн хязгаарыг өөрөө тогтоох боломжтой болгоно. </li>
<li>Хэрвээ та php.ini файлдаа хандаж чадвал, <b>memory_limit</b> гэсэн тохиргоог 16M гэх мэтээр өөрчилж болно. Хэрвээ хандалт байхгүй бол админаараа үүнийг хийлгэнэ үү.</li>
<li>Зарим PHP сервер дээр Моодл хавтсан дотроо дараах мөр агуулсан .htaccess файл үүсгэж болно: <p><blockquote>php_value memory_limit 16M</blockquote></p>
<p>Зарим сервер дээр энэ нь <b>бүх</b> PHP хуудсуудыг ажиллахгүй болгоно (та хуудаснууд руу орох юм бол алдааг нь харах болно). Тиймээс .htaccess файлыг устгах хэрэгтэй болно.</p></li>
<li>Хэрэв боломжтой бол PHP-г <i>--enable-memory-limit</i> ашиглан дахин хөрвүүлээрэй.
Энэ нь Moodle системд санах ойн хязгаарыг өөрөө тохируулах боломжийг олгоно.</li>
<li>Хэрэв та өөрийн php.ini файлд хандах эрхтэй бол <b>memory_limit</b> тохиргоог 40M гэх зэргээр өөрчлөх боломжтой. Хандах эрхгүй бол администратортоо хандаж болно.</li>
<li>Зарим PHP серверт дараах мөрийг агуулсан Moodle санд .htaccess файлыг үүсгэж болно: <blockquote><div>php_value memory_limit 40M</div></blockquote>
<p>Гэвч зарим серверт энэ нь <b>бүх</b> PHP хуудас ажиллахаас сэргийлдэг (хуудсыг харахад алдаа гарах болно) тул та .htaccess файлыг устгах шаардлагатай.</p> </li>
</ol>';
$string['paths'] = 'Замууд';
$string['pathserrcreatedataroot'] = 'Суурилуулагч нь өгөгдлийн лавлахыг ({$a->dataroot}) үүсгэх боломжгүй';
$string['pathshead'] = 'Замыг баталгаажуулах';
$string['pathsrodataroot'] = 'Dataroot лавлах нь бичилт хийх боломжгүй.';
$string['pathsroparentdataroot'] = 'Үндсэн лавлах ({$a->parent}) нь бичилт хийх боломжгүй. Суурилуулагч нь өгөгдлийн санг ({$a->dataroot}) үүсгэх боломжгүй.';
$string['pathssubadmindir'] = 'Маш цөөн веб хост /админыг хянах самбар эсвэл өөр зүйлд нэвтрэхийн тулд тусгай URL болгон ашигладаг. Харамсалтай нь энэ нь Moodle админ хуудасны стандарт байршилтай зөрчилддөг. Та үүнийг засах боломжтой
Суурилуулалтад админ лавлахын нэрийг өөрчилж, энд шинэ нэрийг оруулах замаар засаж болно. Жишээ нь: <em>moodleadmin</em>. Энэ нь Moodle дээрх админ холбоосыг засах болно.';
$string['pathssubdataroot'] = '<p>Moodle нь хэрэглэгчийн байршуулсан бүх файлын агуулгыг хадгалах лавлах.</p>
<p>Энэ лавлах нь веб серверийн хэрэглэгч (ихэвчлэн \'www-data\', \'nobody\' эсвэл \'apache\') унших, бичих боломжтой байх ёстой.</p>
<p>Энэ нь вебээр шууд хандах боломжгүй байх ёстой.</p>
<p>Одоогоор лавлах байхгүй бол үүнийг суурилуулах процесс үүсгэх болно.</p>';
$string['pathssubdirroot'] = '<p>Moodle код агуулсан лавлахад хандах бүрэн зам.</p>';
$string['pathssubwwwroot'] = '<p>Moodle системд хандах бүрэн хаяг, өөрөөр хэлбэл хэрэглэгч Moodle системд хандахын тулд хөтчийн хаягийн мөрөнд оруулах хаяг.</p>
<p>Олон хаяг ашиглан Moodle системд хандах боломжгүй. Таны сайтад олон хаягаар хандах боломжтой бол хамгийн хялбарыг сонгож, бусад хаяг руугаа байнгын дахин чиглүүлэлт хийхээр тохируулна уу.</p>
<p>Таны сайтад интернэт, дотоод сүлжээнээс (заримдаа интранэт гэж нэрлэдэг) нэвтрэх боломжтой бол энд нийтийн хаягийг ашиглана уу.</p>
<p>Одоогийн хаяг буруу байвал хөтчийн хаягийн мөрөнд байгаа URL хаягийг өөрчлөөд суурилуулалтыг дахин эхлүүлнэ үү.</p>';
$string['pathsunsecuredataroot'] = 'Dataroot байршил аюулгүй биш байна';
$string['pathswrongadmindir'] = 'Админ лавлах байхгүй байна';
$string['phpextension'] = '{$a} PHP өргөтгөл';
$string['phpversion'] = 'РНР хувилбар';
$string['phpversionhelp'] = '<p>Mooдл нь РНР хувилбарын хамгийн багадаа 4.3.0 эсвэл 5.1.0 байхыг шаарддаг (5.0.x нь алдаануудтай).</p>
<p>Та одоо {$a} хувилбар ажиллуулж байна</p>
<p>Та PHP-гээ шинэчлэх эсвэл PHP-ийн шинэ хувилбар бүхий хост руу шилжүүл!<br/>
(5.0.x тохиолдолд доошоо 4.4.x хувилбар руу орж болно)</p>';
$string['phpversionhelp'] = '<p>Moodle системд хамгийн багадаа 5.6.5 эсвэл 7.1 PHP хувилбар шаардлагатай (7.0.x нь системийн зарим хязгаарлалттай).</p>
<p>Та одоогоор {$a} хувилбарыг ажиллуулж байна.</p>
<p>Та PHP-г шинэчлэх эсвэл шинэ PHP хувилбартай хостод шилжих шаардлагатай.</p>';
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
$string['welcomep20'] = 'Та <strong>{$a->packname} {$a->packversion}</strong> багцыг компьютер дээрээ амжилттай суулгаж ажиллуулсан тул энэ хуудсыг харж байна. Баяр хүргэе!';
$string['welcomep30'] = '<strong>{$a->installername}</strong> -ний энэ хувилбар нь <strong>Mooдл</strong> ажиллах орчныг үүсгэх програмууд агуулсан, тэдгээр нь:';
$string['welcomep40'] = 'Энэ багц нь мөн <strong>Mooдл {$a->moodlerelease} ({$a->moodleversion})</strong>-г агуулсан.';
$string['welcomep50'] = 'Энэ багц доторх бүх програмууд нь өөрсдийн лизенцтэй. Бүрэн <strong>{$a->installername}</strong> багц нь
<a href="http://www.opensource.org/docs/definition_plain.html">open source</a> бөгөөд <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a> -ийн лизенцийн дор түгээгддэг.';
$string['welcomep60'] = араагийн хуудсууд нь компьютер дээрээ <strong>Mooдл</strong> тохируулах тааруулах энгийн алхмуудыг агуулсан байгаа. Та анхны утгын тохиргоонуудыг хүлээн авч болно, эсвэл өөрийн хэрэгцээнд нийцүүлэн өөрчилж болно.';
$string['welcomep70'] = '<strong>Mooдлээ</strong> тохируулахын тулд доорх “Үргэлжлүүлэх” товчин дээр дарж цааж явна уу.';
$string['wwwroot'] = 'Вэб хаяг';
$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="https://www.opensource.org/docs/definition_plain.html">нээлттэй эх сурвалж</a> бөгөөд <a href="https://www.gnu.org/copyleft/gpl.html">GPL</a> лиценз дор түгээгддэг.';
$string['welcomep60'] = 'Дараах хуудсууд нь таны компьютерт <strong>Moodle</strong> системийг тохируулах, тохируулахад хялбар алхмыг хийх болно. Та өгөгдмөл тохиргоог хүлээн зөвшөөрөх эсвэл өөрийн хэрэгцээнд тохируулан өөрчилж болно.';
$string['welcomep70'] = оорх "Дараах" товчийг дарж <strong>Moodle</strong> системийн тохиргоог үргэлжлүүлнэ үү.';
$string['wwwroot'] = 'Веб хаяг';
+1 -1
View File
@@ -30,7 +30,7 @@
defined('MOODLE_INTERNAL') || die();
$string['language'] = 'Хэл';
$string['moodlelogo'] = 'Мүүдл лого';
$string['moodlelogo'] = 'Moodle лого';
$string['next'] = 'Дараагийн';
$string['previous'] = 'Өмнөх';
$string['reload'] = 'Дахин ачаалах';
+7 -7
View File
@@ -32,7 +32,7 @@ defined('MOODLE_INTERNAL') || die();
$string['admindirname'] = 'Pasta de administração';
$string['availablelangs'] = 'Pacotes linguísticos disponíveis';
$string['chooselanguagehead'] = 'Selecione um idioma';
$string['chooselanguagesub'] = 'Selecione o idioma a utilizar durante a instalação. Poderá depois selecionar outro(s) idioma(s) para o site e para os utilizadores.';
$string['chooselanguagesub'] = 'Selecione o idioma a utilizar durante a instalação. O idioma escolhido será definido como o predefinido mas poderá depois selecionar outro(s) idioma(s) para o site e para os utilizadores.';
$string['clialreadyconfigured'] = 'O ficheiro config.php já existe. Use \'admin/cli/install_database.php\' para instalar o Moodle para este site.';
$string['clialreadyinstalled'] = 'O ficheiro config.php já existe, use admin/cli/install_database.php para atualizar o Moodle para este site.';
$string['cliinstallheader'] = 'Programa para instalação do Moodle <b>{$a}</b> através da linha de comandos';
@@ -40,8 +40,8 @@ $string['clitablesexist'] = 'A instalação através da linha de comandos (CLI)
$string['databasehost'] = 'Servidor da base de dados';
$string['databasename'] = 'Nome da base de dados';
$string['databasetypehead'] = 'Escolha o <i>driver</i> da base de dados';
$string['dataroot'] = 'Pasta de dados';
$string['datarootpermission'] = 'Permissões da pasta de dados';
$string['dataroot'] = 'Pasta dos dados';
$string['datarootpermission'] = 'Permissões da pasta dos dados';
$string['dbprefix'] = 'Prefixo das tabelas';
$string['dirroot'] = 'Pasta do Moodle';
$string['environmenthead'] = 'A verificar sistema...';
@@ -51,18 +51,18 @@ $string['installation'] = 'Instalação';
$string['langdownloaderror'] = 'Não foi possível descarregar o idioma \'<b>{$a}</b>\' . O processo de instalação continuará em Inglês.';
$string['memorylimithelp'] = '<p>O limite de memória para o PHP definido atualmente no servidor é <b>{$a}</b>.</p><p>Um número elevado de módulos em utilização ou de utilizadores registados pode fazer com que o Moodle apresente problemas de falta de memória.</p><p>É recomendado que o PHP seja configurado com um limite de memória de pelo menos 40MB. Esta configuração pode ser definida de diversas formas:</p><ol><li>Compilação do PHP com o parâmetro <b>--enable-memory-limit</b>. Esta definição permitirá ao próprio Moodle definir o valor a utilizar.</li><li>Alteração do parâmetro <b>memory_limit</b> no ficheiro de configuração do PHP para um valor igual ou superior a 40MB.</li><li>Criação de um ficheiro <b>.htaccess</b> na raiz da pasta do Moodle com a linha <b>php_value memory_limit 40M</b><p><strong>Atenção</strong>: Em alguns servidores esta configuração impedirá o funcionamento de <b>todas</b> as páginas PHP. Nestes casos, não poderá ser utilizado o ficheiro <b>.htaccess</b>.</p></li></ol>';
$string['paths'] = 'Caminhos';
$string['pathserrcreatedataroot'] = 'O programa de instalação não conseguiu criar a pasta de dados <b>{$a->dataroot}</b>.';
$string['pathserrcreatedataroot'] = 'O programa de instalação não conseguiu criar a pasta dos dados <b>{$a->dataroot}</b>.';
$string['pathshead'] = 'Confirmar caminhos';
$string['pathsrodataroot'] = 'A pasta de dados não tem permissões de escrita.';
$string['pathsrodataroot'] = 'A pasta dos dados é só de leitura (não permite escrita).';
$string['pathsroparentdataroot'] = 'A pasta ascendente <b>{$a->parent}</b> não tem permissões de escrita. O programa de instalação não conseguiu criar a pasta <b>{$a->dataroot}</b>.';
$string['pathssubadmindir'] = 'Alguns servidores Web utilizam a pasta <strong>admin</strong> em URLs especiais de acesso a funcionalidades especiais, como é o caso de painéis de controlo. Algumas situações podem criar conflitos com a localização normal das páginas de administração do Moodle. Estes problemas podem ser resolvidos renomeando a pasta <strong>admin</strong> na instalação do Moodle e indicando aqui o novo nome a utilizar. Exemplo:<br /><br /><b>moodleadmin</b><br /><br />Esta ação resolverá os problemas de acesso das hiperligações para as funcionalidades de administração do Moodle.';
$string['pathssubdataroot'] = '<p>Pasta onde o Moodle irá armazenar todo o conteúdo de ficheiros enviados pelos utilizadores.</p>
<p>Esta pasta deve ser legível e gravável pelo utilizador do servidor web (geralmente \'www-data\', \'nobody\', ou \'apache\').</p>
<p>O utilizador do Moodle no servidor web (normalmente <b>nobody</b>, <b>apache</b> ou <b>www-data</b>) deve ter permissão de <b>leitura</b> e <b>escrita</b> nessa pasta.
<p>Não deve ser acessível diretamente através da web.</p>
<p>Se a pasta não existir, o processo de instalação tentará criá-la.</p>';
$string['pathssubdirroot'] = 'Caminho completo para a pasta que contém o código Moodle.';
$string['pathssubwwwroot'] = 'Endereço web completo de acesso ao Moodle. Não é possível aceder ao Moodle usando mais do que um endereço. Se o site tiver mais do que um endereço público, devem ser configurados redirecionamentos permanentes em todos eles, à exceção deste. Se o site pode ser acedido a partir da Internet e de Intranet, use o endereço público aqui. Se o endereço atual não está correto, altere o endereço indicado na barra de endereço do seu navegador e reinicie a instalação.';
$string['pathsunsecuredataroot'] = 'A localização da pasta de dados não é segura';
$string['pathsunsecuredataroot'] = 'A localização da pasta dos dados não é segura.';
$string['pathswrongadmindir'] = 'A pasta <b>admin</b> não existe';
$string['phpextension'] = 'Extensão <b>{$a}</b> do PHP';
$string['phpversion'] = 'Versão do PHP';
+1 -1
View File
@@ -73,7 +73,7 @@ $string['pathssubdataroot'] = '<p>Um diretório em que Moodle armazenará todo o
<p>Este diretório deve ser legível e gravável pelo usuário do servidor web (geralmente "www-data \',\' nobody \', ou\' apache\'). </p>
<p>Não deve ser diretamente acessível através da web. </p>
<p>Se o diretório não existir atualmente, o processo de instalação tentará criá-lo. </p>';
$string['pathssubdirroot'] = '<p>Caminho completo do diretório para instalação do Moddle.</p>';
$string['pathssubdirroot'] = '<p>Caminho completo do diretório para instalação do Moodle.</p>';
$string['pathssubwwwroot'] = '<p>O endereço completo em que Moodle pode ser acessado ou seja, o endereço que os usuários vão digitar na barra de endereços do seu navegador para acessar Moodle. </p>
<p>Não é possível acessar Moodle usando múltiplos endereços. Se o seu site é acessível através de múltiplos endereços, em seguida, escolher o mais fácil e configurar um redirecionamento permanente para cada um dos outros endereços. </p>
<p>Se o seu site é acessível tanto a partir da Internet e, a partir de uma rede interna (às vezes chamado de Intranet), em seguida, use o endereço público aqui. </p>
+32
View File
@@ -0,0 +1,32 @@
<?php
// This file is part of Moodle - https://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 <https://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'] = 'Kichwa - Cañar Highland';
+1 -1
View File
@@ -30,4 +30,4 @@
defined('MOODLE_INTERNAL') || die();
$string['thisdirection'] = 'rtl';
$string['thislanguage'] = 'سنڌي';
$string['thislanguage'] = 'سنڌي';
+33
View File
@@ -0,0 +1,33 @@
<?php
// This file is part of Moodle - https://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 <https://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'] = 'sv';
$string['thislanguage'] = 'Svenska för Workplace';
+44
View File
@@ -0,0 +1,44 @@
<?php
// This file is part of Moodle - https://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 <https://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'] = 't';
$string['cliincorrectvalueerror'] = 'Błōnd, niynŏleżny wert "{$a->value}" dlŏ "{$a->option}"';
$string['cliincorrectvalueretry'] = 'Niynŏleżny wert, sprōbuj zaś';
$string['clitypevalue'] = 'wert zorty';
$string['clitypevaluedefault'] = 'Zorta wertu, naciś Ynter, coby użyć wertu wychodnyj ({$a})';
$string['cliunknowoption'] = 'Niyznōme ôpcyje:
{$a}
Proszã użyć ôpcyje --help.';
$string['cliyesnoprompt'] = 'wpisz y (to znaczy tak) abo n (to znaczy niy)';
$string['environmentrequireinstall'] = 'je zdatne, coby było zainstalowane i włōnczōne';
$string['environmentrequireversion'] = 'wymŏganŏ je wersyjŏ {$a->needed}, a ty używŏsz wersyje {$a->current}';
$string['upgradekeyset'] = 'Zaktualizuj klucz (ôstŏw prōzne jeźli niy ma to skōnfigurowane)';
+33
View File
@@ -0,0 +1,33 @@
<?php
// This file is part of Moodle - https://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 <https://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'] = 'Ślōnski';
+14 -15
View File
@@ -32,11 +32,11 @@ defined('MOODLE_INTERNAL') || die();
$string['admindirname'] = 'Yönetici dizini';
$string['availablelangs'] = 'Kullanılabilir dil paketleri';
$string['chooselanguagehead'] = 'Dil seçin';
$string['chooselanguagesub'] = 'Lütfen, SADECE kurulum için bir dil seçin. Site ve kullanıcı dillerini sonraki ekranda seçebilirsiniz.';
$string['clialreadyconfigured'] = 'config.php halihazırda mevcut, lütfen eğer bu siteyi yüklemek istiyorsanız şu dizini kullanın: admin/cli/install_database.php';
$string['chooselanguagesub'] = 'Lütfen kurulum için bir dil seçin. Bu dil aynı zamanda site için varsayılan dil olarak kullanılacaktır, ancak daha sonra değiştirilebilir.';
$string['clialreadyconfigured'] = 'config.php yapılandırma dosyası zaten mevcut. Bu siteye Moodle yüklemek için lütfen admin/cli/install_database.php dosyasını kullanın.';
$string['clialreadyinstalled'] = 'Config.php zaten var. Sitenizi güncellemek istiyorsanız bu adresi kullanın: admin/cli/install_database.php';
$string['cliinstallheader'] = 'Moodle {$a} komut satırı kurulum programı';
$string['clitablesexist'] = 'Veritabanı tabloları zaten var. CLI kurulumu devam edemez.';
$string['clitablesexist'] = 'Veritabanı tabloları zaten mevcut; CLI kurulumu devam edemiyor.';
$string['databasehost'] = 'Veritabanı sunucusu';
$string['databasename'] = 'Veritabanı adı';
$string['databasetypehead'] = 'Veritabanı sürücüsü seçin';
@@ -49,17 +49,16 @@ $string['environmentsub2'] = 'Her Moodle dağıtımı, bazı PHP versiyon gereks
$string['errorsinenvironment'] = 'Ortam kontrolu başarısız oldu!';
$string['installation'] = 'Kurulum';
$string['langdownloaderror'] = 'Maalesef "{$a}" dil paketi kurulamadı. Kuruluma İngilizce olarak devam edilecek.';
$string['memorylimithelp'] = '<p>Sunucunuz için PHP bellek limiti şu anda {$a} olarak ayarlanmış durumda.</p>
$string['memorylimithelp'] = '<p>Sunucunuz için PHP bellek sınırı şu anda {$a} olarak ayarlanmıştır.</p>
<p>Özellikle bir çok modülü etkinleştirilmiş ve/veya çok fazla kullanıcınız
varsa bu durum daha sonra bazı bellek sorunlarına sebep olabilir.</p>
<p>Mümkünse size PHP\'e daha yüksek limitli bir bellek ayarı yapmanızı,
örneğin, 40M, öneriyoruz. İşte bunu yapabilmeniz için size bir kaç yol:</p>
<p>PHP\'yi mümkünse 40M gibi daha yüksek bir limitle yapılandırmanızı öneririz.
Bunu yapmanın birkaç yolunu bulabilirsiniz:</p>
<ol>
<li>Bunu yapmaya yetkiliyseniz, PHP\'yi <i>--enable-memory-limit</i> ile yeniden derleyin.
Bu, Moodle\'nın kendi kendine bellek limitini ayarlasına izin verecek.</li>
Bu, Moodle\'nın kendi kendine bellek limitini ayarlasına izin verecektir.</li>
<li>php.ini dosyasına erişim hakkınız varsa, <b>memory_limit</b> ayarını 40M gibi
bir ayarla değiştirin. Erişim hakkınız yoksa, bunu sistem yöneticinizden sizin
@@ -92,14 +91,14 @@ $string['pathsunsecuredataroot'] = 'Veri yolu güvenli değil';
$string['pathswrongadmindir'] = 'Yönetici klasörü yok';
$string['phpextension'] = '{$a} PHP eklentisi';
$string['phpversion'] = 'PHP sürümü';
$string['phpversionhelp'] = '<p>Moodle, PHP sürümünün en az 4.3.0 veya 5.1.0 olmasını gerektirir (5.0.x sürümünde çok fazla hata var).</p>
<p>Şu anda çalışan sürüm: {$a}</p>
<p>PHP\'yi güncellemeli veya PHP\'nin yeni sürümünü kullananan bir hostinge taşınmalısınız!</p>';
$string['phpversionhelp'] = '<p>Moodle en az 5.6.5 veya 7.1 PHP sürümü gerektirir (7.0.x bazı motor sınırlamalarına sahiptir).</p>
<p>Şu anda {$a} sürümünü çalıştırıyorsunuz.</p>
<p>PHP\'yi yükseltmeli veya daha yeni bir PHP sürümüne sahip bir ana bilgisayara geçmelisiniz.</p>';
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
$string['welcomep20'] = 'Bilgisayarınıza <strong>{$a->packname} {$a->packversion}</strong> paketini başarıyla kurdunuz. Tebrikler!';
$string['welcomep30'] = '<strong>{$a->installername}</strong>\'nin bu sürümü <strong>Moodle</strong>\'da bir ortam oluşturmak için uygulamaları içerir:';
$string['welcomep20'] = 'Bu sayfayı <strong>{$a->packname} {$a->packversion}</strong> paketini ilgisayarınıza başarıyla kurduğunuz için görüyorsunuz. Tebrikler!';
$string['welcomep30'] = '<strong> {$a-> installername} </strong>\'in bu sürümü, <strong> Moodle </strong>\'ın çalışacağı bir ortam oluşturmak için uygulamaları içerir:';
$string['welcomep40'] = 'Bu paket <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong> sürümünü de içerir.';
$string['welcomep50'] = 'Bu paketteki tüm uygulamaların kullanımı her biri kendine ait olan lisanslar tarafından yönetilir. <strong>{$a->installername}</strong> paketinin tamamı <a href="http://www.opensource.org/docs/definition_plain.html">açık kaynak</a> kodludur ve <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a> lisansı altında dağıtılır.';
$string['welcomep60'] = 'Aşağıdaki sayfalar <strong>Moodle</strong>ın kurulumu ve yapılandırılması için size basitçe yol gösterecektir. Varsayılan ayarları kabul edebilir veya ihtiyaçlarınıza göre bunları değiştirebilirsiniz.';
$string['welcomep50'] = 'Bu paketteki tüm uygulamaların kullanımı ilgili lisanslarına tabidir. Eksiksiz <strong>{$a->installername}</strong> paketi <a href="https://www.opensource.org/docs/definition_plain.html">açık kaynak</a>\'tır ve altında dağıtılır <a href="https://www.gnu.org/copyleft/gpl.html">GPL</a> lisansı.';
$string['welcomep60'] = 'Aşağıdaki sayfalar, bilgisayarınızda <strong> Moodle </strong>\'ı yapılandırmak ve kurmak için izlemeniz gereken bazı kolay adımlarla sizi yönlendirecektir. Varsayılan ayarları kabul edebilir veya isteğe bağlı olarak kendi ihtiyacınıza göre değiştirebilirsiniz';
$string['welcomep70'] = '<strong>Moodle</strong> kurulumu için aşağıdaki "İleri" tuşuna basın.';
$string['wwwroot'] = 'Web adresi';
+40
View File
@@ -0,0 +1,40 @@
<?php
// This file is part of Moodle - https://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 <https://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['cliincorrectvalueerror'] = 'خرابی، "{$a->option}" کے لیے غلط قدر "{$a->value}"';
$string['cliincorrectvalueretry'] = 'غلط قدر، براہ کرم دوبارہ کوشش کریں';
$string['clitypevalue'] = 'قسم کی قدر';
$string['clitypevaluedefault'] = 'قدر ٹائپ کریں، طے شدہ قدر استعمال کرنے کے لیے داخل دبائیں ({$a})';
$string['cliunknowoption'] = 'غیر تسلیم شدہ اختیارات: {$a} براہ کرم --help آپشن استعمال کریں۔';
$string['cliyesnoprompt'] = 'ٹائپ کریں y (یعنی ہاں) یا n (یعنی نہیں)';
$string['environmentrequireinstall'] = 'انسٹال اور فعال ہونا ضروری ہے';
$string['environmentrequireversion'] = 'ورژن {$a->needed} درکار ہے اور آپ {$a->current} چلا رہے ہیں';
$string['upgradekeyset'] = 'اپ گریڈ کلید (اسے سیٹ نہ کرنے کے لیے خالی چھوڑ دیں)';
+49
View File
@@ -0,0 +1,49 @@
<?php
// This file is part of Moodle - https://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 <https://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>ڈیٹا بیس نہیں بنا سکتا۔</p> <p>مخصوص ڈیٹا بیس موجود نہیں ہے اور دیے گئے صارف کو ڈیٹا بیس بنانے کی اجازت نہیں ہے۔</p> <p>سائٹ ایڈمنسٹریٹر کو ڈیٹا بیس کنفیگریشن کی تصدیق کرنی چاہیے۔< </p>';
$string['cannotcreatelangdir'] = 'lang ڈائریکٹری نہیں بن سکتی';
$string['cannotcreatetempdir'] = 'عارضی ڈائریکٹری نہیں بن سکتی';
$string['cannotdownloadcomponents'] = 'اجزاء کو ڈاؤن لوڈ نہیں کیا جا سکتا';
$string['cannotdownloadzipfile'] = 'ZIP فائل ڈاؤن لوڈ نہیں ہو سکتی';
$string['cannotfindcomponent'] = 'جزو نہیں مل سکتا';
$string['cannotsavemd5file'] = 'md5 فائل کو محفوظ نہیں کیا جا سکتا';
$string['cannotsavezipfile'] = 'ZIP فائل کو محفوظ نہیں کیا جا سکتا';
$string['cannotunzipfile'] = 'فائل کو ان زپ نہیں کیا جا سکتا';
$string['componentisuptodate'] = 'جزو اپ ٹو ڈیٹ ہے';
$string['dmlexceptiononinstall'] = '<p>ڈیٹا بیس میں خرابی پیدا ہوگئی ہے [{$a->errorcode}]۔<br />{$a->debuginfo}</p>';
$string['downloadedfilecheckfailed'] = 'ڈاؤن لوڈ فائل کی جانچ ناکام ہوگئی';
$string['invalidmd5'] = 'چیک متغیر غلط تھا - دوبارہ کوشش کریں';
$string['missingrequiredfield'] = 'کچھ مطلوبہ فیلڈ غائب ہے';
$string['remotedownloaderror'] = '<p>آپ کے سرور پر جزو کا ڈاؤن لوڈ ناکام ہو گیا۔ براہ کرم پراکسی ترتیبات کی تصدیق کریں۔ PHP cURL ایکسٹینشن کی انتہائی سفارش کی جاتی ہے۔ آپ کے سرور میں "{$a->dest}" اور اسے وہاں کھول دیں۔</p>';
$string['wrongdestpath'] = 'غلط منزل کا راستہ';
$string['wrongsourcebase'] = 'غلط سورس یو آر ایل کی بنیاد';
$string['wrongzipfilename'] = 'غلط ZIP فائل کا نام';
+42 -1
View File
@@ -29,4 +29,45 @@
defined('MOODLE_INTERNAL') || die();
$string['availablelangs'] = 'دستیاب زبانوں کے بنڈل';
$string['admindirname'] = 'ایڈمن ڈائرکٹری';
$string['availablelangs'] = 'دستیاب لینگویج پیک';
$string['chooselanguagehead'] = 'ایک زبان کا انتخاب کریں';
$string['chooselanguagesub'] = 'براہ کرم انسٹالیشن کے لیے ایک زبان کا انتخاب کریں۔ اس زبان کو سائٹ کے لیے ڈیفالٹ زبان کے طور پر بھی استعمال کیا جائے گا، حالانکہ اسے بعد میں تبدیل کیا جا سکتا ہے۔';
$string['clialreadyconfigured'] = 'کنفیگریشن فائل config.php پہلے سے موجود ہے۔ اس سائٹ کے لیے Moodle انسٹال کرنے کے لیے براہ کرم admin/cli/install_database.php استعمال کریں۔';
$string['clialreadyinstalled'] = 'کنفیگریشن فائل config.php پہلے سے موجود ہے۔ اس سائٹ کے لیے Moodle کو اپ گریڈ کرنے کے لیے براہ کرم admin/cli/install_database.php استعمال کریں۔';
$string['cliinstallheader'] = 'موڈل {$a} کمانڈ لائن انسٹالیشن پروگرام';
$string['clitablesexist'] = 'ڈیٹا بیس کی میزیں پہلے سے موجود ہیں؛ CLI کی تنصیب جاری نہیں رہ سکتی۔';
$string['databasehost'] = 'ڈیٹا بیس میزبان';
$string['databasename'] = 'ڈیٹا بیس نام';
$string['databasetypehead'] = 'ڈیٹا بیس ڈرائیور کا انتخاب کریں';
$string['dataroot'] = 'ڈیٹا ڈائریکٹری';
$string['datarootpermission'] = 'ڈیٹا ڈائریکٹریز کی اجازت';
$string['dbprefix'] = 'جدولوں کا سابقہ';
$string['dirroot'] = 'موڈل ڈائرکٹری';
$string['environmenthead'] = 'اپنے ماحول کی جانچ کر رہا ہے۔۔۔';
$string['environmentsub2'] = 'ہر موڈل ریلیز میں کچھ کم از کم پی ایچ پی ورژن کی ضرورت اور متعدد لازمی پی ایچ پی ایکسٹینشنز ہوتے ہیں۔ ہر انسٹال اور اپ گریڈ سے پہلے ماحول کی مکمل جانچ کی جاتی ہے۔ اگر آپ نیا ورژن انسٹال کرنا یا پی ایچ پی ایکسٹینشنز کو فعال کرنا نہیں جانتے ہیں تو براہ کرم سرور ایڈمنسٹریٹر سے رابطہ کریں۔';
$string['errorsinenvironment'] = 'ماحولیات کی جانچ ناکام!';
$string['installation'] = 'تنصیب';
$string['langdownloaderror'] = 'بدقسمتی سے زبان "{$a}" ڈاؤن لوڈ نہیں ہو سکی۔ تنصیب کا عمل انگریزی میں جاری رہے گا۔';
$string['memorylimithelp'] = '<p>آپ کے سرور کے لیے PHP میموری کی حد فی الحال {$a} پر سیٹ ہے۔</p> <p>اس کی وجہ سے Moodle کو بعد میں میموری کے مسائل کا سامنا کرنا پڑ سکتا ہے، خاص طور پر اگر آپ کے پاس بہت سارے ماڈیولز فعال ہیں اور/یا بہت سارے صارف۔ ایسا کرنے کے کئی طریقے ہیں جنہیں آپ آزما سکتے ہیں:</p> <ol> <li>اگر آپ قابل ہیں تو، پی ایچ پی کو <i>--enable-memory-limit</i> کے ساتھ دوبارہ مرتب کریں۔ یہ موڈل کو میموری کی حد خود سیٹ کرنے کی اجازت دے گا۔</li> <li>اگر آپ کو اپنی php.ini فائل تک رسائی حاصل ہے، تو آپ وہاں کی <b>memory_limit</b> سیٹنگ کو 40M جیسی چیز میں تبدیل کر سکتے ہیں۔ اگر آپ کے پاس رسائی نہیں ہے تو آپ اپنے منتظم سے اپنے لیے ایسا کرنے کے لیے کہہ سکتے ہیں۔</li> <li>کچھ پی ایچ پی سرورز پر آپ موڈل ڈائرکٹری میں ایک .htaccess فائل بنا سکتے ہیں جس میں یہ لائن ہے: <blockquote> <div>php_value memory_limit 40M</div></blockquote> <p>تاہم، کچھ سرورز پر یہ <b>تمام</b> پی ایچ پی صفحات کو کام کرنے سے روک دے گا (صفحات کو دیکھتے وقت آپ کو غلطیاں نظر آئیں گی) تاکہ آپ کو .htaccess فائل کو ہٹانا پڑے گا۔</p></li></ol>';
$string['paths'] = 'راستے';
$string['pathserrcreatedataroot'] = 'ڈیٹا ڈائرکٹری ({$a->dataroot}) انسٹالر کے ذریعے نہیں بنائی جا سکتی۔';
$string['pathshead'] = 'راستوں کی تصدیق کریں';
$string['pathsrodataroot'] = 'Dataroot ڈائریکٹری قابل تحریر نہیں ہے۔';
$string['pathsroparentdataroot'] = 'پیرنٹ ڈائرکٹری ({$a->parent}) قابل تحریر نہیں ہے۔ ڈیٹا ڈائرکٹری ({$a->dataroot}) انسٹالر کے ذریعے نہیں بنائی جا سکتی۔';
$string['pathssubadmindir'] = 'بہت کم ویب ہوسٹس /admin کو بطور خاص یو آر ایل استعمال کرتے ہیں تاکہ آپ کنٹرول پینل یا کسی اور چیز تک رسائی حاصل کر سکیں۔ بدقسمتی سے یہ موڈل ایڈمن پیجز کے معیاری مقام سے متصادم ہے۔ آپ اسے اپنی انسٹالیشن میں ایڈمن ڈائرکٹری کا نام بدل کر، اور اس نئے نام کو یہاں رکھ کر ٹھیک کر سکتے ہیں۔ مثال کے طور پر: <em>moodleadmin</em>۔ یہ Moodle میں ایڈمن لنکس کو ٹھیک کر دے گا۔';
$string['pathssubdataroot'] = '<p>ایک ڈائرکٹری جہاں Moodle صارفین کی طرف سے اپ لوڈ کردہ تمام فائل مواد کو اسٹور کرے گا۔</p> <p>یہ ڈائرکٹری ویب سرور صارف (عام طور پر \'www-data\'، \'nobody\'، یا \'کے ذریعے پڑھنے اور لکھنے کے قابل دونوں ہونی چاہیے۔ apache\')۔</p> <p>یہ ویب پر براہ راست قابل رسائی نہیں ہونا چاہیے۔</p> <p>اگر ڈائرکٹری فی الحال موجود نہیں ہے تو انسٹالیشن کا عمل اسے بنانے کی کوشش کرے گا۔</p>';
$string['pathssubdirroot'] = '<p>موڈل کوڈ پر مشتمل ڈائریکٹری کا مکمل راستہ۔</p>';
$string['pathssubwwwroot'] = '<p>مکمل پتہ جہاں Moodle تک رسائی حاصل کی جائے گی یعنی وہ ایڈریس جسے صارفین Moodle تک رسائی کے لیے اپنے براؤزر کے ایڈریس بار میں داخل کریں گے۔</p> <p>متعدد پتوں کا استعمال کرتے ہوئے Moodle تک رسائی ممکن نہیں ہے۔ اگر آپ کی سائٹ ایک سے زیادہ پتوں کے ذریعے قابل رسائی ہے تو پھر سب سے آسان کا انتخاب کریں اور دوسرے پتے میں سے ہر ایک کے لیے مستقل ری ڈائریکٹ سیٹ کریں۔</p> <p>اگر آپ کی سائٹ انٹرنیٹ اور اندرونی نیٹ ورک دونوں سے قابل رسائی ہے (کبھی کبھی ایک انٹرانیٹ کہا جاتا ہے)، پھر یہاں عوامی پتہ استعمال کریں۔</p> <p>اگر موجودہ پتہ درست نہیں ہے، تو براہ کرم اپنے براؤزر کے ایڈریس بار میں URL کو تبدیل کریں اور انسٹالیشن دوبارہ شروع کریں۔</p>';
$string['pathsunsecuredataroot'] = 'Dataroot مقام محفوظ نہیں ہے';
$string['pathswrongadmindir'] = 'ایڈمن ڈائرکٹری موجود نہیں ہے';
$string['phpextension'] = '{$a} پی ایچ پی کی توسیع';
$string['phpversion'] = 'پی ایچ پی ورژن';
$string['phpversionhelp'] = '<p>موڈل کو کم از کم 5.6.5 یا 7.1 کا پی ایچ پی ورژن درکار ہے (7.0.x میں انجن کی کچھ حدود ہیں)۔</p> <p>آپ فی الحال ورژن {$a} چلا رہے ہیں۔</p> <p> آپ کو پی ایچ پی کو اپ گریڈ کرنا ہوگا یا پی ایچ پی کے نئے ورژن کے ساتھ میزبان پر جانا ہوگا۔</p>';
$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="https://www.opensource.org/docs/definition_plain.html">اوپن سورس</a> ہے اور اس کے تحت تقسیم کیا گیا ہے۔ <a href="https://www.gnu.org/copyleft/gpl.html">GPL</a> لائسنس۔';
$string['welcomep60'] = 'مندرجہ ذیل صفحات آپ کو اپنے کمپیوٹر پر <strong>Moodle</strong> کو ترتیب دینے اور ترتیب دینے کے لیے کچھ آسان اقدامات کی پیروی کرنے کی رہنمائی کریں گے۔ آپ پہلے سے طے شدہ ترتیبات کو قبول کر سکتے ہیں یا اختیاری طور پر، اپنی ضروریات کے مطابق ان میں ترمیم کر سکتے ہیں۔';
$string['welcomep70'] = '<strong>Moodle</strong> کے سیٹ اپ کے ساتھ جاری رکھنے کے لیے نیچے "اگلا" بٹن پر کلک کریں۔';
$string['wwwroot'] = 'ویب سائٹ کا پتہ';
+1
View File
@@ -30,6 +30,7 @@
defined('MOODLE_INTERNAL') || die();
$string['language'] = 'زبان';
$string['moodlelogo'] = 'موڈل لوگو';
$string['next'] = 'اگلے';
$string['previous'] = 'پچھلا';
$string['reload'] = 'دوبارہ لوڈ کریں';
+30 -20
View File
@@ -26,39 +26,49 @@ namespace core;
*/
class geoplugin_test extends \advanced_testcase {
public function setUp(): void {
/**
* Load required test libraries
*/
public static function setUpBeforeClass(): void {
global $CFG;
require_once("$CFG->libdir/filelib.php");
require_once("$CFG->dirroot/iplookup/lib.php");
require_once("{$CFG->dirroot}/iplookup/lib.php");
}
/**
* In order to execute this test PHPUNIT_LONGTEST should be defined as true in phpunit.xml or directly in config.php
*/
public function setUp(): void {
if (!PHPUNIT_LONGTEST) {
// we do not want to DDOS their server, right?
$this->markTestSkipped('PHPUNIT_LONGTEST is not defined');
}
$this->resetAfterTest();
$CFG->geoipfile = '';
}
public function test_ipv4() {
/**
* Test IPv4 address
*
* @covers ::iplookup_find_location
*/
public function test_ipv4(): void {
$result = iplookup_find_location('50.0.184.0');
$this->assertEquals('array', gettype($result));
$this->assertEquals('San Francisco', $result['city']);
$this->assertEqualsWithDelta(-122.3933, $result['longitude'], 0.1, 'Coordinates are out of accepted tolerance');
$this->assertEqualsWithDelta(37.7697, $result['latitude'], 0.1, 'Coordinates are out of accepted tolerance');
$this->assertIsArray($result);
$this->assertIsFloat($result['latitude']);
$this->assertIsFloat($result['longitude']);
$this->assertIsString($result['city']);
$this->assertIsString($result['country']);
$this->assertIsArray($result['title']);
$this->assertIsString($result['title'][0]);
$this->assertIsString($result['title'][1]);
$this->assertNull($result['error']);
$this->assertEquals('array', gettype($result['title']));
$this->assertEquals('San Francisco', $result['title'][0]);
$this->assertEquals('United States', $result['title'][1]);
}
public function test_geoip_ipv6() {
/**
* Test IPv6 address (unsupported by Geoplugin)
*
* @covers ::iplookup_find_location
*/
public function test_ipv6(): void {
$result = iplookup_find_location('2a01:8900:2:3:8c6c:c0db:3d33:9ce6');
$this->assertNotNull($result['error']);
$this->assertEquals($result['error'], get_string('invalidipformat', 'error'));
}
}
+3 -1
View File
@@ -1233,6 +1233,7 @@ $string['sitepolicyhandlerplugin'] = '{$a->name} ({$a->component})';
$string['sitepolicyguest'] = 'Site policy URL for guests';
$string['sitepolicyguest_help'] = 'The URL of the site policy that all guests must see and agree to before accessing the site. Note that this setting will only have an effect if the site policy handler is set to default (core).';
$string['sitesectionhelp'] = 'If selected, a topic section will be displayed on the site\'s front page.';
$string['sixtyfourbitsrequired'] = 'It has been detected that your site is not using a 64-bit PHP version. You are required to upgrade your system (operating system, PHP...) before installing this Moodle version.';
$string['sixtyfourbitswarning'] = 'It has been detected that your site is not using a 64-bit PHP version. It is recommended that you upgrade your site to ensure future compatibility.';
$string['slasharguments'] = 'Use slash arguments';
$string['slashargumentswarning'] = 'It is recommended that the use of slash arguments is enabled. In future it will be required. For more details, see the documentation <a href="https://docs.moodle.org/en/admin/environment/slasharguments">Using slash arguments</a>.';
@@ -1512,7 +1513,8 @@ $string['xmlrpcmnetenabled'] = 'It has been detected that the Moodle Networking
$string['xmlrpcwebserviceenabled'] = 'It has been detected that the XML-RPC Web Service protocol is enabled on your site. This feature relies on the PHP XML-RPC extension which is no longer maintained by PHP.';
$string['yuicomboloading'] = 'YUI combo loading';
$string['ziprequired'] = 'The Zip PHP extension is now required by Moodle, info-ZIP binaries or PclZip library are not used anymore.';
$string['modassignmentinuse'] = 'Your site is still using the Assignment 2.2 plugin. Before upgrading you must 1) backup any Assignment 2.2 activities that you want to keep and restore them as Assignment activities, and 2) delete all Assignment 2.2 data from the database.';
$string['modassignmentsubpluginsexist'] = 'Assignment 2.2. subplugins may be present. The mod/assignment folder and all of its subplugins need to be removed before upgrading.';
$string['caching'] = 'Caching';
$string['cachesettings'] = 'Cache settings';
+1 -1
View File
@@ -180,5 +180,5 @@ $string['XOF'] = 'CFA Franc BCEAO';
$string['XPF'] = 'CFP Franc';
$string['YER'] = 'Yemeni Rial';
$string['ZAR'] = 'South African Rand';
$string['ZMK'] = 'Zambian Kwacha';
$string['ZMW'] = 'Zambian Kwacha';
$string['ZWL'] = 'Zimbabwe Dollar';
+1
View File
@@ -53,6 +53,7 @@ $string['cutpastemozilla'] = 'Unfortunately, you cannot currently use normal key
$string['delete'] = 'Delete';
$string['editors'] = 'Text editors';
$string['editorsettings'] = 'Manage editors';
$string['editorxformat'] = '{$a} format';
$string['enterurlfirst'] = 'You have to enter an URL first';
$string['filebrowser'] = 'File Browser';
$string['findwhat'] = 'Find';
+14 -4
View File
@@ -666,7 +666,7 @@ class behat_config_util {
[
'capabilities' => [
'extra_capabilities' => [
'chromeOptions' => [
'goog:chromeOptions' => [
'args' => [
'unlimited-storage',
'disable-web-security',
@@ -678,6 +678,16 @@ class behat_config_util {
$values
);
// Selenium no longer supports non-w3c browser control.
// Rename chromeOptions to goog:chromeOptions, which is the W3C variant of this.
if (array_key_exists('chromeOptions', $values['capabilities']['extra_capabilities'])) {
$values['capabilities']['extra_capabilities']['goog:chromeOptions'] = array_merge_recursive(
$values['capabilities']['extra_capabilities']['goog:chromeOptions'],
$values['capabilities']['extra_capabilities']['chromeOptions'],
);
unset($values['capabilities']['extra_capabilities']['chromeOptions']);
}
// If the mobile app is enabled, check its version and add appropriate tags.
if ($mobiletags = $this->get_mobile_version_tags()) {
if (!empty($values['tags'])) {
@@ -687,13 +697,13 @@ class behat_config_util {
}
}
$values['capabilities']['extra_capabilities']['chromeOptions']['args'] = array_map(function($arg): string {
$values['capabilities']['extra_capabilities']['goog:chromeOptions']['args'] = array_map(function($arg): string {
if (substr($arg, 0, 2) === '--') {
return substr($arg, 2);
}
return $arg;
}, $values['capabilities']['extra_capabilities']['chromeOptions']['args']);
sort($values['capabilities']['extra_capabilities']['chromeOptions']['args']);
}, $values['capabilities']['extra_capabilities']['goog:chromeOptions']['args']);
sort($values['capabilities']['extra_capabilities']['goog:chromeOptions']['args']);
}
// Fill tags information.
+26
View File
@@ -1685,4 +1685,30 @@ EOF;
return !empty($matches);
}
/**
* Get the user id from an identifier.
*
* The user username and email fields are checked.
*
* @param string $identifier The user's username or email.
* @return int|null The user id or null if not found.
*/
protected function get_user_id_by_identifier(string $identifier): ?int {
global $DB;
$sql = <<<EOF
SELECT id
FROM {user}
WHERE username = :username
OR email = :email
EOF;
$result = $DB->get_field_sql($sql, [
'username' => $identifier,
'email' => $identifier,
]);
return $result ?: null;
}
}
+1 -1
View File
@@ -137,7 +137,7 @@ function behat_error_handler($errno, $errstr, $errfile, $errline) {
// set to DEVELOPER and will always include E_NOTICE,E_USER_NOTICE... as part of E_ALL, if the current
// error_reporting() value does not include one of those levels is because it has been forced through
// the moodle code (see fix_utf8() for example) in that cases we respect the forced error level value.
$respect = array(E_NOTICE, E_USER_NOTICE, E_STRICT, E_WARNING, E_USER_WARNING);
$respect = array(E_NOTICE, E_USER_NOTICE, E_STRICT, E_WARNING, E_USER_WARNING, E_DEPRECATED, E_USER_DEPRECATED);
foreach ($respect as $respectable) {
// If the current value does not include this kind of errors and the reported error is
@@ -68,7 +68,6 @@ class mustache_pix_helper {
if (!$component) {
$component = '';
}
$component = $helper->render($component);
$text = strtok("");
// Allow mustache tags in the last argument.
$text = trim($helper->render($text));
+8
View File
@@ -247,6 +247,10 @@ function cron_run_inner_scheduled_task(\core\task\task_base $task) {
$predbqueries = null;
$predbqueries = $DB->perf_get_queries();
$pretime = microtime(1);
// Ensure that we have a clean session with the correct cron user.
cron_setup_user();
try {
get_mailer('buffer');
cron_prepare_core_renderer();
@@ -333,6 +337,10 @@ function cron_run_inner_adhoc_task(\core\task\adhoc_task $task) {
}
cron_setup_user($user);
} else {
// No user specified, ensure that we have a clean session with the correct cron user.
cron_setup_user();
}
try {
+4 -4
View File
@@ -2266,7 +2266,7 @@ class ddl_test extends \database_driver_testcase {
*
* @return array The type-value pair fixture.
*/
public function test_get_enc_quoted_provider() {
public function get_enc_quoted_provider() {
return array(
// Reserved: some examples from SQL-92.
[true, 'from'],
@@ -2280,7 +2280,7 @@ class ddl_test extends \database_driver_testcase {
/**
* This is a test for sql_generator::getEncQuoted().
*
* @dataProvider test_get_enc_quoted_provider
* @dataProvider get_enc_quoted_provider
* @param bool $reserved Whether the column name is reserved or not.
* @param string $columnname The column name to be quoted, according to the value of $reserved.
**/
@@ -2315,7 +2315,7 @@ class ddl_test extends \database_driver_testcase {
*
* @return array The type-old-new tuple fixture.
*/
public function test_sql_generator_get_rename_field_sql_provider() {
public function sql_generator_get_rename_field_sql_provider() {
return array(
// Reserved: an example from SQL-92.
// Both names should be reserved.
@@ -2328,7 +2328,7 @@ class ddl_test extends \database_driver_testcase {
/**
* This is a unit test for sql_generator::getRenameFieldSQL().
*
* @dataProvider test_sql_generator_get_rename_field_sql_provider
* @dataProvider sql_generator_get_rename_field_sql_provider
* @param bool $reserved Whether the column name is reserved or not.
* @param string $oldcolumnname The column name to be renamed.
* @param string $newcolumnname The new column name.
+17 -10
View File
@@ -208,21 +208,28 @@ class sqlsrv_native_moodle_database extends moodle_database {
$this->store_settings($dbhost, $dbuser, $dbpass, $dbname, $prefix, $dboptions);
$options = [
'UID' => $this->dbuser,
'PWD' => $this->dbpass,
'Database' => $this->dbname,
'CharacterSet' => 'UTF-8',
'MultipleActiveResultSets' => true,
'ConnectionPooling' => !empty($this->dboptions['dbpersist']),
'ReturnDatesAsStrings' => true,
];
$dbhost = $this->dbhost;
if (!empty($dboptions['dbport'])) {
$dbhost .= ',' . $dboptions['dbport'];
}
$this->sqlsrv = sqlsrv_connect($dbhost, array
(
'UID' => $this->dbuser,
'PWD' => $this->dbpass,
'Database' => $this->dbname,
'CharacterSet' => 'UTF-8',
'MultipleActiveResultSets' => true,
'ConnectionPooling' => !empty($this->dboptions['dbpersist']),
'ReturnDatesAsStrings' => true,
));
// The sqlsrv_connect() has a lot of connection options to be used.
// Users can add any supported options with the 'extrainfo' key in the dboptions.
if (isset($this->dboptions['extrainfo'])) {
$options = array_merge($options, $this->dboptions['extrainfo']);
}
$this->sqlsrv = sqlsrv_connect($dbhost, $options);
if ($this->sqlsrv === false) {
$this->sqlsrv = null;
+1 -1
View File
@@ -21,7 +21,7 @@ Feature: Atto Autosave
And I click on "Save changes" "button"
And I am on "Course 1" course homepage
And I navigate to "Edit settings" in current page administration
And I set the field with xpath "//select[@name='summary_editor[format]']" to "1"
And I set the field "Course summary format" to "1"
And I click on "Save and display" "button"
And I log out
+1
View File
@@ -444,6 +444,7 @@ class MoodleQuickForm_editor extends HTML_QuickForm_element implements templatab
$context['id'] = $id;
$context['value'] = $text;
$context['format'] = $format;
$context['formatlabel'] = get_string('editorxformat', 'editor', $this->_label);
if (!is_null($this->getAttribute('onblur')) && !is_null($this->getAttribute('onchange'))) {
$context['changelistener'] = true;
+11 -6
View File
@@ -54,14 +54,19 @@ class MoodleQuickForm_password extends HTML_QuickForm_password implements templa
*/
public function __construct($elementName=null, $elementLabel=null, $attributes=null) {
global $CFG;
// no standard mform in moodle should allow autocomplete of passwords
// No standard mform in moodle should allow autocomplete of passwords.
if (empty($attributes)) {
$attributes = array('autocomplete'=>'off');
} else if (is_array($attributes)) {
$attributes['autocomplete'] = 'off';
} else {
$attributes = ['autocomplete' => 'new-password'];
} else if (is_array($attributes) && empty($attributes['autocomplete'])) {
$attributes['autocomplete'] = 'new-password';
} else if (is_array($attributes) && $attributes['autocomplete'] === 'off') {
// A value of 'off' is ignored in all modern browsers and password
// managers and should be new-password instead.
$attributes['autocomplete'] = 'new-password';
} else if (is_string($attributes)) {
if (strpos($attributes, 'autocomplete') === false) {
$attributes .= ' autocomplete="off" ';
$attributes .= ' autocomplete="new-password" ';
}
}
-10
View File
@@ -52,16 +52,6 @@ class MoodleQuickForm_passwordunmask extends MoodleQuickForm_password {
* or an associative array
*/
public function __construct($elementName=null, $elementLabel=null, $attributes=null) {
// no standard mform in moodle should allow autocomplete of passwords
if (empty($attributes)) {
$attributes = array('autocomplete'=>'off');
} else if (is_array($attributes)) {
$attributes['autocomplete'] = 'off';
} else {
if (strpos($attributes, 'autocomplete') === false) {
$attributes .= ' autocomplete="off" ';
}
}
$this->_persistantFreeze = true;
parent::__construct($elementName, $elementLabel, $attributes);
@@ -35,6 +35,7 @@
</div>
<div>
{{#hasformats}}
<label for="menu{{name}}format" class="sr-only">{{formatlabel}}</label>
<select name="{{name}}[format]" id="menu{{name}}format" class="custom-select">
{{#formats}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{text}}</option>
@@ -59,7 +59,7 @@
{{# error }}
autofocus aria-describedby="{{ element.iderror }}"
{{/ error }}
{{{ attributes }}}
{{{ element.attributes }}}
>
</span>
{{^ element.frozen }}
@@ -20,7 +20,6 @@ Feature: Using the lesson activities which support point scale
| course | C1 |
| activity | lesson |
| name | Test lesson name |
| intro | Test forum description |
| idnumber | lesson1 |
@javascript
@@ -37,11 +36,9 @@ Feature: Using the lesson activities which support point scale
| id_enableotheranswers | 1 |
| id_jumpto_6 | Next page |
And I press "Save page"
And I log out
And I am on the "Test lesson name" "lesson activity" page logged in as student1
And I set the field "Your answer" to "5"
And I press "Submit"
And I log out
And I am on the "Test lesson name" "lesson activity editing" page logged in as teacher1
And I expand all fieldsets
Then the "Maximum grade" "field" should be disabled
+1 -1
View File
@@ -733,7 +733,7 @@ abstract class advanced_testcase extends base_testcase {
}
cron_prepare_core_renderer();
$this->setUser($user);
cron_setup_user($user);
$task->execute();
\core\task\manager::adhoc_task_complete($task);
+54
View File
@@ -23,8 +23,13 @@ namespace core;
* @category test
* @copyright 2012 Petr Skoda {@link http://skodak.org}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @coversDefaultClass \advanced_testcase
*/
class advanced_test extends \advanced_testcase {
public static function setUpBeforeClass(): void {
global $CFG;
require_once(__DIR__ . '/fixtures/adhoc_test_task.php');
}
public function test_debugging() {
global $CFG;
@@ -697,4 +702,53 @@ class advanced_test extends \advanced_testcase {
self::resetAllData(false);
self::assertFalse(\core_useragent::get_user_agent_string(), 'It should not be set again, data was reset.');
}
/**
* @covers ::runAdhocTasks
*/
public function test_runadhoctasks_no_tasks_queued(): void {
$this->runAdhocTasks();
$this->expectOutputRegex('/^$/');
}
/**
* @covers ::runAdhocTasks
*/
public function test_runadhoctasks_tasks_queued(): void {
$this->resetAfterTest(true);
$admin = get_admin();
\core\task\manager::queue_adhoc_task(new \core_phpunit\adhoc_test_task());
$this->runAdhocTasks();
$this->expectOutputRegex("/Task was run as {$admin->id}/");
}
/**
* @covers ::runAdhocTasks
*/
public function test_runadhoctasks_with_existing_user_change(): void {
$this->resetAfterTest(true);
$admin = get_admin();
$this->setGuestUser();
\core\task\manager::queue_adhoc_task(new \core_phpunit\adhoc_test_task());
$this->runAdhocTasks();
$this->expectOutputRegex("/Task was run as {$admin->id}/");
}
/**
* @covers ::runAdhocTasks
*/
public function test_runadhoctasks_with_existing_user_change_and_specified(): void {
global $USER;
$this->resetAfterTest(true);
$user = $this->getDataGenerator()->create_user();
$this->setGuestUser();
$task = new \core_phpunit\adhoc_test_task();
$task->set_userid($user->id);
\core\task\manager::queue_adhoc_task($task);
$this->runAdhocTasks();
$this->expectOutputRegex("/Task was run as {$user->id}/");
}
}
+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/>.
namespace core_phpunit;
/**
* Fixtures for task tests.
*
* @package core
* @category phpunit
* @copyright 2023 Andrew Lyons <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class adhoc_test_task extends \core\task\adhoc_task {
/**
* Execute.
*/
public function execute() {
global $USER;
mtrace("Task was run as {$USER->id}");
}
}
+5 -1
View File
@@ -170,7 +170,11 @@ function get_moodle_cookie() {
/**
* Sets up current user and course environment (lang, etc.) in cron.
* Do not use outside of cron script!
* Note: This function is intended only for use in:
* - the cron runner scripts
* - individual tasks which extend the adhoc_task and scheduled_task classes
* - unit tests related to tasks
* - other parts of the cron/task system
*
* @param stdClass $user full user object, null means default cron user (admin),
* value 'reset' means reset internal static caches.
+2
View File
@@ -806,6 +806,8 @@ if (empty($CFG->sessiontimeoutwarning)) {
$CFG->sessiontimeoutwarning = 20 * 60;
}
\core\session\manager::start();
// Prevent ignoresesskey hack from getting carried over to a next page.
unset($USER->ignoresesskey);
// Set default content type and encoding, developers are still required to use
// echo $OUTPUT->header() everywhere, anything that gets set later should override these headers.
+4 -9
View File
@@ -734,8 +734,6 @@ class behat_navigation extends behat_base {
* @throws Exception with a meaningful error message if the specified page cannot be found.
*/
protected function resolve_core_page_instance_url(string $type, string $identifier): moodle_url {
global $DB;
$type = strtolower($type);
switch ($type) {
@@ -819,9 +817,8 @@ class behat_navigation extends behat_base {
* @return void
*/
public function i_am_on_course_homepage($coursefullname) {
global $DB;
$course = $DB->get_record("course", array("fullname" => $coursefullname), 'id', MUST_EXIST);
$url = new moodle_url('/course/view.php', ['id' => $course->id]);
$courseid = $this->get_course_id($coursefullname);
$url = new moodle_url('/course/view.php', ['id' => $courseid]);
$this->execute('behat_general::i_visit', [$url]);
}
@@ -834,10 +831,8 @@ class behat_navigation extends behat_base {
* @return void
*/
public function i_am_on_course_homepage_with_editing_mode_on($coursefullname) {
global $DB;
$course = $DB->get_record("course", array("fullname" => $coursefullname), 'id', MUST_EXIST);
$url = new moodle_url('/course/view.php', ['id' => $course->id]);
$courseid = $this->get_course_id($coursefullname);
$url = new moodle_url('/course/view.php', ['id' => $courseid]);
if ($this->running_javascript() && $sesskey = $this->get_sesskey()) {
// Javascript is running so it is possible to grab the session ket and jump straight to editing mode.
+18 -1
View File
@@ -166,7 +166,18 @@ class core_date_testcase extends advanced_testcase {
}
}
public function test_timezone_lang_strings() {
/**
* We are only checking lang strings existence here, not code.
*
* @coversNothing
*/
public function test_timezone_all_lang_strings() {
// We only run this test when PHPUNIT_LONGTEST is enabled, test_get_localised_timezone()
// is already checking the names of a few, hopefully stable enough to be run always.
if (!PHPUNIT_LONGTEST) {
$this->markTestSkipped('PHPUNIT_LONGTEST is not defined');
}
$phpzones = DateTimeZone::listIdentifiers();
$manager = get_string_manager();
foreach ($phpzones as $tz) {
@@ -183,6 +194,12 @@ class core_date_testcase extends advanced_testcase {
$result = core_date::get_localised_timezone('Pacific/Auckland');
$this->assertSame('Pacific/Auckland', $result);
$result = core_date::get_localised_timezone('Europe/Madrid');
$this->assertSame('Europe/Madrid', $result);
$result = core_date::get_localised_timezone('America/New_York');
$this->assertSame('America/New_York', $result);
$result = core_date::get_localised_timezone('99');
$this->assertSame('Server timezone (Pacific/Auckland)', $result);
@@ -22,8 +22,10 @@ namespace core\output;
* @package core
* @copyright 2019 Ryan Wyllie <ryan@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @covers \core\output\mustache_helper_collection
*/
class mustache_helper_collection_test extends \advanced_testcase {
/**
* Test cases to confirm that disallowed helpers are stripped from the source
* text by the helper before being passed to other another helper. This prevents
@@ -66,7 +68,7 @@ class mustache_helper_collection_test extends \advanced_testcase {
'input' => 'core, {{#js}} some nasty JS {{/js}}, test',
'expected' => 'core, {{}}, test'
],
'single disallowed 3' => [
'single disallowed 4' => [
'disallowed' => ['js'],
'input' => 'core, {{#ok}} this is ok {{/ok}}, {{#js}} some nasty JS {{/js}}',
'expected' => 'core, {{#ok}} this is ok {{/ok}}, {{}}'
@@ -111,7 +113,7 @@ class mustache_helper_collection_test extends \advanced_testcase {
'input' => '{{#foo}} blah {{/foo}}, {{#js}} js {{/js}}, {{#foo}} blah {{/foo}}',
'expected' => '{{}}'
],
'multiple disallowed 4' => [
'multiple disallowed 5' => [
'disallowed' => ['js', 'foo'],
'input' => 'core, move, {{#js}} JS {{#foo}} blah {{/foo}} {{/js}}',
'expected' => 'core, move, {{}}'
@@ -134,7 +134,7 @@ TBC;
/**
* Data provider for the test_load function.
*/
public function test_load_test_cases() {
public function load_test_cases() {
$cache = [
'core' => [
'test' => '{{! a comment }}The rest of the template'
@@ -163,7 +163,7 @@ TBC;
/**
* Test the load function.
*
* @dataProvider test_load_test_cases()
* @dataProvider load_test_cases
* @param mustache_template_source_loader $loader The loader
* @param string $component The moodle component
* @param string $name The template name
@@ -177,7 +177,7 @@ TBC;
/**
* Data provider for the load_with_dependencies function.
*/
public function test_load_with_dependencies_test_cases() {
public function load_with_dependencies_test_cases() {
// Create a bunch of templates that include one another in various ways. There is
// multiple instances of recursive inclusions to test that the code doensn't get
// stuck in an infinite loop.
@@ -330,7 +330,7 @@ TBC;
/**
* Test the load_with_dependencies function.
*
* @dataProvider test_load_with_dependencies_test_cases()
* @dataProvider load_with_dependencies_test_cases
* @param mustache_template_source_loader $loader The loader
* @param string $component The moodle component
* @param string $name The template name
@@ -344,7 +344,7 @@ TBC;
/**
* Data provider for the test_load function.
*/
public function test_scan_template_source_for_dependencies_test_cases() {
public function scan_template_source_for_dependencies_test_cases() {
$foo = '{{! a comment }}{{> core/bar }}{{< test/bop }}{{/ test/bop}}{{#str}} help, core {{/str}}';
$bar = '{{! a comment }}{{> core/baz }}';
$baz = '{{! a comment }}{{#str}} hide, core {{/str}}';
@@ -488,7 +488,7 @@ TEMPLATE;
/**
* Test the scan_template_source_for_dependencies function.
*
* @dataProvider test_scan_template_source_for_dependencies_test_cases()
* @dataProvider scan_template_source_for_dependencies_test_cases()
* @param mustache_template_source_loader $loader The loader
* @param string $source The template to test
* @param string $expected The expected output
+9 -16
View File
@@ -14,6 +14,13 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
declare(strict_types = 1);
namespace core\plugininfo;
use testable_core_plugin_manager;
use testable_plugininfo_base;
/**
* Unit tests for plugin base class.
*
@@ -21,20 +28,6 @@
* @copyright 2019 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
declare(strict_types = 1);
namespace core\plugininfo;
defined('MOODLE_INTERNAL') || die();
use core_plugin_manager;
use testable_core_plugin_manager;
use testable_plugininfo_base;
/**
* Tests of the basic API of the plugin manager.
*/
class base_test extends \advanced_testcase {
/**
@@ -172,7 +165,7 @@ class base_test extends \advanced_testcase {
* Test the load_disk_version function to check that it handles a range of correct supported and incompatible field
* definitions.
*
* @dataProvider test_load_disk_version_branch_supports_provider
* @dataProvider load_disk_version_branch_supports_provider
* @param array|null $supported Supported versions to inject
* @param string|int|null $incompatible Incompatible version to inject.
* @param int $version Version to test
@@ -204,7 +197,7 @@ class base_test extends \advanced_testcase {
*
* @return array
*/
public function test_load_disk_version_branch_supports_provider(): array {
public function load_disk_version_branch_supports_provider(): array {
return [
'Range, branch in support, lowest' => [
'supported' => [29, 31],
+2 -2
View File
@@ -29,7 +29,7 @@ require_once(__DIR__ . '/../fixtures/task_fixtures.php');
*/
class manager_test extends \advanced_testcase {
public function test_ensure_adhoc_task_qos_provider() {
public function ensure_adhoc_task_qos_provider() {
return [
[
[],
@@ -173,7 +173,7 @@ class manager_test extends \advanced_testcase {
/**
* Test that the Quality of Service reordering works.
*
* @dataProvider test_ensure_adhoc_task_qos_provider
* @dataProvider ensure_adhoc_task_qos_provider
*
* @param array $input array of tasks
* @param array $expected array of reordered tasks
+23
View File
@@ -1526,4 +1526,27 @@ class upgradelib_test extends advanced_testcase {
$this->assertEquals('admin_dir_usage', $result->getInfo());
$this->assertFalse($result->getStatus());
}
/**
* Test the check_mod_assignment check if mod_assignment is still used.
*
* @covers ::check_mod_assignment
* @return void
*/
public function test_check_mod_assignment_is_used(): void {
global $DB;
$this->resetAfterTest();
$result = new environment_results('custom_checks');
if ($DB->get_manager()->table_exists('assignment')) {
$DB->insert_record('assignment', (object)['name' => 'test_assign', 'intro' => 'test_assign_intro']);
$this->assertNotNull(check_mod_assignment($result));
$this->assertEquals('Assignment 2.2 is in use', $result->getInfo());
$this->assertFalse($result->getStatus());
} else {
$this->assertTrue($result->getStatus());
}
}
}
+5
View File
@@ -1,6 +1,11 @@
This files describes API changes in core libraries and APIs,
information provided here is intended especially for developers.
=== 3.11.14 ===
* Added 'extrainfo' in the DB options config. Its extra information for the DB driver, e.g. SQL Server,
has additional configuration according to its environment, which the administrator can specify to alter and
override any connection options.
=== 3.11.11 ===
* New DML driver methods `$DB->sql_regex_get_word_beginning_boundary_marker` and `$DB->sql_regex_get_word_end_boundary_marker`
for managing word boundary markers in a database driver supporting regex syntax when searching.
+26
View File
@@ -2778,3 +2778,29 @@ function check_xmlrpc_usage(environment_results $result): ?environment_results {
return null;
}
/**
* Check whether the mod_assignment is currently being used.
*
* @param environment_results $result
* @return environment_results|null
*/
function check_mod_assignment(environment_results $result): ?environment_results {
global $DB, $CFG;
// Check the number of records.
if ($DB->get_manager()->table_exists('assignment') && $DB->count_records('assignment') > 0) {
$result->setInfo('Assignment 2.2 is in use');
$result->setFeedbackStr('modassignmentinuse');
return $result;
}
// Check for mod_assignment subplugins.
if (is_dir($CFG->dirroot . '/mod/assignment/type')) {
$result->setInfo('Assignment 2.2 subplugins present');
$result->setFeedbackStr('modassignmentsubpluginsexist');
return $result;
}
return null;
}

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