Compare commits

..

320 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) 70fa678586 Moodle release 3.2.2 2017-03-11 22:16:10 +01:00
AMOS bot 0c6de97371 Automatically generated installer lang files 2017-03-12 00:04:17 +08:00
AMOS bot 63981e5a82 Automatically generated installer lang files 2017-03-12 00:04:17 +08:00
Eloy Lafuente (stronk7) 6a0dfc60d6 weekly release 3.2.1+ 2017-03-10 20:59:59 +01:00
Eloy Lafuente (stronk7) 38c4435a37 Merge branch 'install_32_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_32_STABLE 2017-03-10 20:59:55 +01:00
Damyon Wiese 3cc4e2f725 MDL-57596 forms: CLEANHTML in persistent forms
Add special handling for text fields with the CLEANHTML type. This should
be used when students and teachers can edit the same field (you can't trust those students).

Applies cleaning on submitted data, and on data stored in the DB before it is put back in an editing form.
2017-03-10 18:07:55 +00:00
Marina Glancy ca3cbbc233 MDL-58010 user: allow to update only whitelisted user preferences 2017-03-10 18:07:54 +00:00
Andrew Nicols 7d196ef3b3 Merge branch 'wip-mdl-57940-m32' of https://github.com/rajeshtaneja/moodle into MOODLE_32_STABLE 2017-03-10 18:07:53 +00:00
Eloy Lafuente (stronk7) 069b9d5820 Merge branch 'MDL-58123-32' of git://github.com/junpataleta/moodle into MOODLE_32_STABLE 2017-03-10 18:07:53 +00:00
Dan Poltawski 454a3d34d5 Merge branch 'MDL-58035_32' of git://github.com/timhunt/moodle into MOODLE_32_STABLE 2017-03-10 18:07:52 +00:00
Ankit Agarwal db3a985faf MDL-56526 userlib: Do not allow not loggedin users if forceloginforprofile is set 2017-03-10 18:07:52 +00:00
Ankit Agarwal c535520966 MDL-56526 globalsearch: Fix bug in phpdocs 2017-03-10 18:07:51 +00:00
David Mudrák e35ad40de1 MDL-57597 competency: Fix serving of prior learning evidence files
For security reasons, all files submitted by students must be disposed
as attachments, not inline contents.
2017-03-10 18:07:51 +00:00
AMOS bot 436acc27fe Automatically generated installer lang files 2017-03-10 00:04:27 +08:00
Dan Poltawski 73fd6f2928 Merge branch 'MDL-57990-32' of git://github.com/crazyserver/moodle into MOODLE_32_STABLE 2017-03-07 13:59:15 -03:00
AMOS bot 84e17f59c5 Automatically generated installer lang files 2017-03-08 00:05:55 +08:00
Eloy Lafuente (stronk7) 63464df041 Merge branch 'MDL-58064-32-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_32_STABLE 2017-03-07 16:37:36 +01:00
Dan Poltawski 17c82085fc Merge branch 'wip-mdl-58056-m32' of https://github.com/rajeshtaneja/moodle into MOODLE_32_STABLE 2017-03-07 11:08:23 -03:00
Dan Poltawski 5e3ce67f37 Merge branch 'MDL-57361-32' of git://github.com/jleyva/moodle into MOODLE_32_STABLE 2017-03-07 11:07:46 -03:00
Tim Hunt ec02a34e1f MDL-58035 tool_templatelibrary: fix unit test using removed base theme 2017-03-07 13:35:34 +00:00
Tim Hunt 1e1e1b8229 MDL-58035 lib: log when the expected theme cannot be initialised 2017-03-07 13:35:32 +00:00
David Monllao f7af2c5fc7 Merge branch 'MDL-58106_32' of git://github.com/timhunt/moodle into MOODLE_32_STABLE 2017-03-07 13:38:18 +01:00
David Monllao 92194c1c8d Merge branch 'wip-mdl-58091-m32' of https://github.com/rajeshtaneja/moodle into MOODLE_32_STABLE 2017-03-07 13:16:03 +01:00
David Mudrák 7bbe8a1c76 MDL-58064 lang: Clarify the PHP 7.x limitations
These are related to SQL*Server support only and affect all PHP 7
versions, not just 7.0.x. Credit goes to Eloy Lafuente for spotting
this.
2017-03-07 13:00:46 +01:00
Dan Poltawski 22ee65c275 MDL-58040 blocks: add upgrade.txt note 2017-03-07 08:34:54 -03:00
Dan Poltawski 9354f9de64 Merge branch 'MDL-58040_32' of git://github.com/timhunt/moodle into MOODLE_32_STABLE 2017-03-07 08:34:48 -03:00
David Monllao 04d2305788 Merge branch 'wip-MDL-57485-32' of git://github.com/abgreeve/moodle into MOODLE_32_STABLE 2017-03-07 12:16:48 +01:00
David Monllao e21e294072 Merge branch 'MDL-58057-32' of https://github.com/snake/moodle into MOODLE_32_STABLE 2017-03-07 12:09:35 +01:00
Dan Poltawski 19b7ac05ad Merge branch 'MDL-55859-32' of git://github.com/ankitagarwal/moodle into MOODLE_32_STABLE 2017-03-07 07:02:31 -03:00
Dan Poltawski 4294bbd50f Merge branch 'MDL-58052_behat_get_session_user_MOODLE_32_STABLE' of https://github.com/gthomas2/moodle into MOODLE_32_STABLE 2017-03-07 06:54:34 -03:00
Adrian Greeve b1ffb73177 MDL-57485 themes: Set images to default display type.
Imported images in atto would no longer hold a URL
tag around it. display: block was the culprit.
2017-03-07 17:33:23 +08:00
Ankit Agarwal cde1ac3eea MDL-57362 assign: Fix permission checks 2017-03-07 13:04:01 +05:30
Jake Dallimore 059759aab9 MDL-58057 core_files: properly trim curl whitelist config when fetching 2017-03-07 09:49:50 +08:00
Dan Poltawski 188d41ccc9 Merge branch 'MDL-57362-32' of git://github.com/ankitagarwal/moodle into MOODLE_32_STABLE 2017-03-06 10:18:30 -03:00
gthomas2 0b5f9f6e60 MDL-58052 behat: user session function - use to edit current profile 2017-03-03 12:29:47 +00:00
Pau Ferrer Ocaña fa60a11522 MDL-57990 course: Add sortorder as public field 2017-03-03 11:52:10 +01:00
Eloy Lafuente (stronk7) 29cdf58116 weekly release 3.2.1+ 2017-03-03 10:33:52 +01:00
Eloy Lafuente (stronk7) 3db24b8015 Merge branch 'install_32_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_32_STABLE 2017-03-03 10:33:47 +01:00
Tim Hunt b21b210f41 MDL-58106 random Q restore: avoid MySQL performance issues 2017-03-02 19:40:53 +00:00
Ankit Agarwal 79482e3fe8 MDL-55859 assign_editpdf: cleanup htmlfile in case of errors 2017-03-02 21:16:37 +05:30
Cameron Ball 3935371599 MDL-57321 theme_boost: Remove extra quotation mark 2017-03-02 16:05:55 +08:00
Jun Pataleta 14026572ae MDL-58123 mod_lesson: Fix lesson table name in refresh_events DB query 2017-03-02 10:55:42 +08:00
Eloy Lafuente (stronk7) ee66d63054 Merge branch 'MDL-57321-32' of git://github.com/cameron1729/moodle into MOODLE_32_STABLE 2017-03-02 00:01:47 +01:00
Juan Leyva af2d6085cd MDL-57361 auth_email: Force policy agreed on sign-up 2017-03-01 18:20:59 +01:00
Cameron Ball e615d70923 MDL-57321 theme_boost: Remove duplicate aria-labelledby attribute 2017-03-01 11:37:29 +08:00
Cameron Ball ae8388d51c MDL-57321 theme_boost: Fix improperly nested ul elements in footer 2017-03-01 11:37:28 +08:00
Cameron Ball 962e3eb662 MDL-57321 theme_boost: Use div instead of span for dropdown items 2017-03-01 11:37:28 +08:00
Cameron Ball 4c586b025e MDL-57321 theme_boost: Consistently apply attributes on elements 2017-03-01 11:37:28 +08:00
Andrew Nicols 8612c8aa3e Merge branch 'MDL-58072_32_tabtree_mustache' of https://github.com/mchurchward/moodle into MOODLE_32_STABLE 2017-03-01 11:10:18 +08:00
Eloy Lafuente (stronk7) a7db91030b Merge branch 'wip-MDL-48228-32' of git://github.com/abgreeve/moodle into MOODLE_32_STABLE 2017-03-01 02:57:16 +01:00
Adrian Greeve d807d3c603 MDL-48228 database: Unit test addition and update. 2017-03-01 09:05:40 +08:00
Adrian Greeve 8f61b909e8 MDL-48228 database: Make utf8mb4 the default character set for mysql.
Thanks to Jetha Chan for providing the initial patch that this is
based on.
2017-03-01 09:05:40 +08:00
Eloy Lafuente (stronk7) e44ce23c9f Merge branch 'MDL-58071-32' of git://github.com/jleyva/moodle into MOODLE_32_STABLE 2017-02-28 23:00:42 +01:00
Eloy Lafuente (stronk7) 6c87b08240 Merge branch 'MDL-55762-32' of git://github.com/ankitagarwal/moodle into MOODLE_32_STABLE 2017-02-28 20:40:51 +01:00
David Monllao 9afdc8fc12 MDL-51833 docs: Move upgrade note under 3.2.2 2017-02-28 11:32:39 +01:00
David Monllao e30a500fb9 Merge branch 'wip-MDL-51833-32' of git://github.com/abgreeve/moodle into MOODLE_32_STABLE 2017-02-28 11:31:09 +01:00
Ankit Agarwal 121d3e0d29 MDL-57362 assignlib: Fix minor bug in phpdocs 2017-02-28 10:34:41 +05:30
Ankit Agarwal 5b7356cdde MDL-57362 assignlib: Check for sep groups edge case 2017-02-28 10:34:41 +05:30
Andrew Nicols 169d972bf6 Merge branch 'MDL-58038-32' of https://github.com/snake/moodle into MOODLE_32_STABLE 2017-02-28 12:25:43 +08:00
Rajesh Taneja 4fef0dadf0 MDL-58091 behat: Added missing @_file_upload tag 2017-02-28 11:22:38 +08:00
Andrew Nicols 96a0d1bc7a Merge branch 'MDL-35980-32' of git://github.com/snake/moodle into MOODLE_32_STABLE 2017-02-28 10:34:00 +08:00
Jake Dallimore 01c2ca76c0 MDL-35980 behat: fix link text in submission_comments feature 2017-02-28 10:24:53 +08:00
Andrew Nicols 46c68c1b42 MDL-55547 tool_monitor: Coding style fixes 2017-02-28 09:42:44 +08:00
Andrew Nicols e65f6a7e40 Merge branch 'wip-MDL-55547-32' of git://github.com/marinaglancy/moodle into MOODLE_32_STABLE 2017-02-28 09:42:39 +08:00
Eloy Lafuente (stronk7) 800da1b13d Merge branch 'MDL-58041_32' of https://github.com/sam-moodle/moodle into MOODLE_32_STABLE 2017-02-28 02:35:20 +01:00
Eloy Lafuente (stronk7) a53008f1f0 Merge branch 'MDL-57524_M32' of https://github.com/nadavkav/moodle into MOODLE_32_STABLE 2017-02-28 01:40:54 +01:00
Eloy Lafuente (stronk7) f1a117b86b Merge branch 'MDL-58030_32' of git://github.com/aolley/moodle into MOODLE_32_STABLE 2017-02-27 22:47:22 +01:00
Helen Foster bcbd4140a1 MDL-58064 lang: Merge English strings from the en_fix language pack 2017-02-27 10:20:17 +01:00
Rajesh Taneja c99c5a436e MDL-57940 behat: Allow behat parallel run to start with delay
Behat parallel run if executed together
then selenium might fail to launch browser
and timeout. It would be nice to have a
custom delay between the start of each process
2017-02-27 16:16:06 +08:00
Andrew Nicols b7d36bdbaf Merge branch 'MDL-50719-fast-locks-MOODLE_32_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_32_STABLE 2017-02-27 13:47:02 +08:00
Andrew Nicols c21f12e786 Merge branch 'MDL-35980-32' of git://github.com/snake/moodle into MOODLE_32_STABLE 2017-02-27 12:20:02 +08:00
Ankit Agarwal 2dd1bb44c2 MDL-55762 assignpdf: Handle errored pages better 2017-02-27 09:27:23 +05:30
Ankit Agarwal 63de9b5cdb MDL-55762 assignpdf: Fix bug in phpdocs 2017-02-27 09:27:23 +05:30
Andrew Nicols 24a00cadec Merge branch 'MDL-58032-32' of git://github.com/ankitagarwal/moodle into MOODLE_32_STABLE 2017-02-27 11:51:13 +08:00
Adrian Greeve 3f709d3272 MDL-51833 tool_monitor: Improve access check for monitor. 2017-02-27 09:00:54 +08:00
Nadav Kavalerchik def32a798d MDL-57524 theme_boost: Fix ignored input size on admin pages 2017-02-24 21:51:43 +02:00
Juan Leyva b63524492f MDL-58071 user: Return usernotfullysetup exception in WS
If there is an empty required custom user profile field, Web Services
should return the usernotfullysetup exception instead ignoring it.
The mobile app already handles this exception for core fields
redirecting the user to web in order to fill the missing field.
2017-02-24 20:17:19 +01:00
Mike Churchward 46f0136a5a MDL-58072 theme_boost: Added quotes to title; removed extra spaces. 2017-02-24 11:10:56 -05:00
Brendan Heywood 83dbc72f38 MDL-50719 cron: Fixed parallel task lock contention issues 2017-02-24 13:19:12 +11:00
Jake Dallimore c6911cefb4 MDL-56364 javascript: Prevent bad prototype chains in core dialogue
The DIALOGUE object was using Y.clone to copy the input config, messing
up the prototype chains for any objects in the config param. Really,
this doesn't need to clone the config, so I've refactored to avoid doing
so. Also moved some of the other attribute init and setup calls to the
appropriate places (initializer and modifyAttrs).
2017-02-24 08:27:44 +08:00
Jake Dallimore dfbdf40af9 MDL-35980 comment: add comment info to delete button for screen readers
For each delete button in the comments widget, make the spoken text a
string containing the name of the poster and the datetime.
2017-02-24 08:16:38 +08:00
Jake Dallimore 3e0fb6862e MDL-58038 email: make sure all allowedemaildomain entries are respected
Fixes a bug with exploding the config var, in which trailing carriage
returns were causing string matches to fail.
2017-02-24 08:07:59 +08:00
AMOS bot 0e8eba7e1f Automatically generated installer lang files 2017-02-24 00:07:41 +08:00
David Monllao d0209e611f weekly release 3.2.1+ 2017-02-23 08:07:49 +01:00
David Monllao ec9ed6d067 Merge branch 'install_32_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_32_STABLE 2017-02-23 08:07:48 +01:00
Rajesh Taneja 3e340aba45 MDL-58056 behat: Ensure form element exists
Before getting form field, ensure node is
visible. Else it may fail to get form
field
2017-02-23 14:45:43 +08:00
Rajesh Taneja de80be59bb MDL-58056 behat: Catch webdriver exception if element removed
While checking for element visibility, ensure
that element is there in dom
2017-02-23 14:45:43 +08:00
AMOS bot 310172571b Automatically generated installer lang files 2017-02-23 00:05:42 +08:00
David Monllao a550b70a94 MDL-58014 messaging: Note about behavioural change in message_count_unread_messages 2017-02-22 09:47:12 +01:00
Ankit Agarwal 3cd6842501 MDL-58032 core_user: Fix case when acting user is a visitor 2017-02-22 09:55:58 +05:30
Rajesh Taneja f17c1aadb3 MDL-57765 behat: Allow exact selectors to be used
In Blocks with boost theme selector to
find block with name is partial match
it might fail in some cases. It would
be nice to use exact match to avoid
unexpected failures
2017-02-21 23:57:37 +01:00
Sam Chaffee 043dffdd34 MDL-58041 tool_monitor: Fix event monitor subscription behat failures 2017-02-21 11:24:17 -07:00
Tim Hunt 6fef2ab3db MDL-58040 blocklib: never use global in block manager class
This switches everything to ->page, including coverting static method to real one.
2017-02-21 15:19:55 +00:00
Adam Olley 9ffcf8a3e9 MDL-58030 gradingform_guide: Init $commentchooser before use
The initialisation of $commentschooser was moved into an IF condition,
whilst still using it outside of that IF conditions scope. As such, if
there are no comments to choose from, the variable is never init'd but
it still goes to use it, emitting a PHP notice.
2017-02-21 14:36:49 +10:30
Eloy Lafuente (stronk7) 56b8f8c8be Merge branch 'wip-MDL-57113-MOODLE_32_STABLE' of https://github.com/kwiliarty/moodle into MOODLE_32_STABLE 2017-02-21 01:00:53 +01:00
Eloy Lafuente (stronk7) fede68a0ac Merge branch 'wip-mdl-56616-m32' of https://github.com/rajeshtaneja/moodle into MOODLE_32_STABLE 2017-02-21 00:58:13 +01:00
Eloy Lafuente (stronk7) 6588079c5d Merge branch 'MDL-55867_m32v1' of https://github.com/sbourget/moodle into MOODLE_32_STABLE 2017-02-21 00:53:21 +01:00
Eloy Lafuente (stronk7) f7e4c3627c Merge branch 'MDL-56206_32-text-enrolled-users-page-aligned' of https://github.com/lucaboesch/moodle into MOODLE_32_STABLE 2017-02-20 19:26:35 +01:00
David Monllao 6c3f7e0ae6 Merge branch 'MDL-57576-32-updatefeedbackfile' of git://github.com/roperto/moodle into MOODLE_32_STABLE 2017-02-20 12:27:33 +01:00
Dan Poltawski 89d948d86b Merge branch 'MDL-57962-32' of git://github.com/dpalou/moodle into MOODLE_32_STABLE 2017-02-20 11:19:17 +00:00
David Monllao e1dcad3d13 Merge branch 'MDL-57795-32' of https://github.com/snake/moodle into MOODLE_32_STABLE 2017-02-20 10:28:23 +01:00
David Monllao 07d000c51e Merge branch 'MDL-57801-32' of https://github.com/lucisgit/moodle into MOODLE_32_STABLE 2017-02-20 10:10:15 +01:00
David Monllao 636e7a13b6 Merge branch 'MDL-58014_32' of git://github.com/markn86/moodle into MOODLE_32_STABLE 2017-02-20 09:34:43 +01:00
David Monllao a57bdfa055 Merge branch 'MDL-56679-32' of git://github.com/junpataleta/moodle into MOODLE_32_STABLE 2017-02-20 09:20:26 +01:00
David Monllao 80a57cf924 Merge branch 'MDL-57274-32' of https://github.com/snake/moodle into MOODLE_32_STABLE 2017-02-20 09:07:25 +01:00
David Monllao 059d6ffd9f Merge branch 'MDL-50729-32' of git://github.com/ankitagarwal/moodle into MOODLE_32_STABLE 2017-02-20 08:27:07 +01:00
Mark Nelson fd13953a8a MDL-58014 core_message: fixed unread message count 2017-02-20 13:59:33 +08:00
Marina Glancy 488e115027 MDL-55547 tool_monitor: fix exceptions when course was deleted
Delete subscriptions when course is deleted
2017-02-20 12:16:27 +08:00
Jake Dallimore 72e3ff3c15 MDL-57274 upgrade: fix curl security notices during upgrade/install
Handles the case where $CFG->curlsecurityxxx vars don't yet exist
during install or upgrade by treating not set the same as empty.
2017-02-20 08:56:47 +08:00
Jake Dallimore bd4f6ce186 MDL-57795 mod_assign: fix for filters killing review pane when grading
Fixes a bug in which the review pane was destroyed if the user selected
a combination of filters resulting in no matched users. Now, the pane
is just hidden in such cases, and displayed again if subsequent filter
changes return one or more users.
2017-02-20 08:53:00 +08:00
Dan Poltawski 5416d932d7 Merge branch 'MDL-57967_32' of git://github.com/markn86/moodle into MOODLE_32_STABLE 2017-02-19 19:44:51 +00:00
Matteo Scaramuccia 27e719e709 MDL-57379 Files: Improved file argument evaluation.
get_file_argument() is responsible to extract the relative path
of the file to be served by a specific Moodle component
like a theme or a module.
Some modules like scorm and imscp require slasharguments support
and they force it when creating the URLs to serve their files.
It should honor the slasharguments setting but this could break
those instances where existing hard-coded links still make usage of
the "old" format, the one when slasharguments is set to No i.e. '?file='.

Its logic has been improved by looking at when the URL is related to
serving a plug-in file in a "forced" slasharguments way of serving it
i.e. using '/pluginfile.php/' and not '/pluginfile.php?'.
2017-02-19 18:44:48 +00:00
Tony Butler b577d34861 MDL-57801 core_filestorage: Delete temp file if disk space runs out 2017-02-16 12:46:46 +00:00
Tony Butler dcd27d9cee MDL-57801 core_filestorage: Verify hash of temp file before committing
This addresses an edge scenario on NFS filesystems with no space
remaining, where subsequent uploads fail silently while zero byte files
are saved to the pool (and for some reason the filesize check passes).
2017-02-16 12:46:46 +00:00
Gergely Kún 863dcb14a8 MDL-56679 core: Initialise $SESSION if necessary 2017-02-16 16:19:42 +08:00
Dan Poltawski 1a754e8446 weekly release 3.2.1+ 2017-02-16 08:14:54 +00:00
Dan Poltawski 95e9f4cc02 Merge branch 'install_32_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_32_STABLE 2017-02-16 08:14:48 +00:00
Mark Nelson bac13609ca MDL-57967 core_message: do not process conversations from deleted users 2017-02-16 13:03:02 +08:00
Rajesh Taneja df90a44f3f MDL-57030 behat: Save run status after execution 2017-02-15 10:38:43 +01:00
Eloy Lafuente (stronk7) 23fd4f3afc Merge branch 'MDL-53991_m32v4' of https://github.com/sbourget/moodle into MOODLE_32_STABLE 2017-02-14 18:16:24 +01:00
Eloy Lafuente (stronk7) 9b39a92170 Merge branch 'wip-mdl-57030-m32' of https://github.com/rajeshtaneja/moodle into MOODLE_32_STABLE 2017-02-14 16:53:59 +01:00
David Monllao 69c5e60f8c MDL-56122 editpdf: Fix ghostscript checking 2017-02-14 13:45:39 +01:00
Brendan Heywood cc36a37ea4 MDL-57810 lib: Disable nginx buffers when not required 2017-02-14 11:36:01 +00:00
Dani Palou 2678ee4e81 MDL-57962 forum: Allow creating new discussions with groupid -1 2017-02-14 10:44:00 +01:00
David Monllao 5a9f3039a7 Merge branch 'MDL-56122-32' of https://github.com/lucisgit/moodle into MOODLE_32_STABLE 2017-02-14 09:53:39 +01:00
Ankit Agarwal 667784420f MDL-50729 gradelib: Regrade event should be assigned to system 2017-02-14 11:40:54 +05:30
Ankit Agarwal f628e0ecf6 MDL-50729 events: Add user constants to events base class 2017-02-14 11:40:54 +05:30
Damyon Wiese 9ae3b89cc5 MDL-57766 assign: Put back the manual marker filter
I removed too much from gradingtable.php in the last patch.
2017-02-14 10:19:15 +08:00
Eloy Lafuente (stronk7) 098a875e4e Merge branch 'MDL-57868-32' of git://github.com/jleyva/moodle into MOODLE_32_STABLE 2017-02-13 23:42:46 +01:00
Eloy Lafuente (stronk7) 9d64f4f078 Merge branch 'MDL-57708-32' of git://github.com/merrill-oakland/moodle into MOODLE_32_STABLE 2017-02-13 23:33:00 +01:00
Tony Butler 5fac573391 MDL-56122 assignfeedback_editpdf: Add test assertions for pdf generation 2017-02-13 17:30:15 +00:00
Tony Butler def9c15904 MDL-56122 assignfeedback_editpdf: Regenerate PDF & page images if blank 2017-02-13 17:30:15 +00:00
Dan Poltawski d4e9fe521e Merge branch 'MDL-56841_32' of https://github.com/andrewhancox/moodle into MOODLE_32_STABLE 2017-02-13 16:39:39 +00:00
B Krishnan Iyer 343cdba46b MDL-57354 output: Render continue button as a primary button. 2017-02-13 15:50:43 +00:00
Davo Smith aca74d0d74 MDL-57752 session: fix check_security() session termination 2017-02-13 13:54:43 +00:00
Dan Poltawski ce01dbab40 Merge branch 'MDL-57768-webservice-config-error-MOODLE_32_STABLE' of https://github.com/ilya-catalyst/moodle into MOODLE_32_STABLE 2017-02-13 13:31:04 +00:00
David Monllao 21cf201536 Merge branch 'MDL-57766-32' of git://github.com/damyon/moodle into MOODLE_32_STABLE 2017-02-13 09:44:25 +01:00
David Monllao dfefe26665 Merge branch 'wip-MDL-50770-32' of git://github.com/marinaglancy/moodle into MOODLE_32_STABLE 2017-02-13 09:15:08 +01:00
Rajesh Taneja de70bc556c MDL-56616 theme_boost: Fix style for performance info 2017-02-13 14:39:23 +08:00
AMOS bot 7b06a12ef3 Automatically generated installer lang files 2017-02-11 00:11:46 +08:00
Ilya Tregubov a415eb505e MDL-57768 webservice: Delete manual setting of config in test 2017-02-10 11:48:44 +11:00
Damyon Wiese 54a20ea8fc MDL-57766 mod_assign: Marker allocation fixes
Marking allocation was only ever applied in the view for the grading table. It should
have been added to the list_participants function because that is used by webservices and
the new grading UI.
2017-02-09 17:15:10 +08:00
David Monllao a1740aad65 weekly release 3.2.1+ 2017-02-09 08:00:10 +01:00
David Monllao 3680b1efa0 Merge branch 'install_32_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_32_STABLE 2017-02-09 08:00:09 +01:00
Ryan Wyllie b90c2e2627 MDL-57370 message: add unread count to conversation tests 2017-02-09 13:46:31 +08:00
Ryan Wyllie 5c53893f97 MDL-57370 message: improve message union sql 2017-02-09 13:46:30 +08:00
Rajesh Taneja 3049c086a3 MDL-57030 behat: Added option to automatically rerun failures 2017-02-09 07:16:00 +08:00
Eric Merrill c644b03f02 MDL-57708 assign: Fix display of overridden submissions 2017-02-08 14:54:11 -05:00
David Monllao 7693409caa Merge branch 'wip-MDL-57316-32' of git://github.com/marinaglancy/moodle into MOODLE_32_STABLE 2017-02-08 13:11:40 +01:00
Dan Poltawski eac59c38f8 Merge branch 'MDL-57370-32-int-fix-1' of git://github.com/ryanwyllie/moodle into MOODLE_32_STABLE 2017-02-08 09:14:22 +00:00
Dan Poltawski cd6612b079 MDL-57370 messaging: fix mesed up versions
(Again, I didn't have a good day yesterday...)
2017-02-08 09:08:02 +00:00
Ryan Wyllie 7d88829470 MDL-57370 message: fix duplicate ids 2017-02-08 07:43:14 +00:00
Rajesh Taneja 9fde80dfa0 MDL-56954 behat: Fixed string to pass behat
colon is not concatenated to Search courses string
2017-02-08 12:19:26 +08:00
Damyon Wiese e787fa6ab4 MDL-57009 javascript: Fix "failed to prefetch"
The scanForPartials in amd/src/templates.js function is not handling
nested sections (the list of tokens is a tree not a flat list).
2017-02-08 11:17:39 +08:00
Marina Glancy 24cfd4c7d8 MDL-57316 media: create different instances for different pages 2017-02-08 10:17:18 +08:00
AMOS bot de33f85405 Automatically generated installer lang files 2017-02-08 00:09:21 +08:00
Damyon Wiese 57e38e1d12 MDL-57009 javascript: Reject on all errors
Not all error paths were resulting in a reject() call to fail a promise.
2017-02-07 12:37:10 +00:00
Damyon Wiese ddbf8c29ae MDL-57009 javascript: Always use when.apply
Or it does not really wait for the promises.
2017-02-07 12:37:02 +00:00
Dan Poltawski f265312fcf Merge branch 'MDL-57009-32' of git://github.com/damyon/moodle into MOODLE_32_STABLE 2017-02-07 12:36:27 +00:00
Dan Poltawski 7dc6674cc4 MDL-57370 upgrade: fix versions 2017-02-07 10:49:49 +00:00
Dan Poltawski c1b9c51914 Merge branch 'MDL-57370-32' of git://github.com/ryanwyllie/moodle into MOODLE_32_STABLE 2017-02-07 10:25:27 +00:00
Luca Bösch 14da7f58a4 MDL-56206 themes: Text on Enrolled users page well aligned
Helps to align the table row content.
2017-02-07 07:19:37 +01:00
Eloy Lafuente (stronk7) 18221902bc Merge branch 'MDL-56954-32' of git://github.com/lameze/moodle into MOODLE_32_STABLE 2017-02-07 06:35:08 +01:00
Ryan Wyllie 7d9ee66a2f MDL-57370 message: change indexes on message tables 2017-02-07 01:44:39 +00:00
John Okely de60425a16 MDL-57316 media: Setup media plugins in media_manager::instance() 2017-02-07 09:43:49 +08:00
John Okely 4eb3f8d9b7 MDL-57316 videojs: Add behat tests for lesson, url and resource 2017-02-07 09:43:48 +08:00
Ryan Wyllie 994e94bf76 MDL-57370 message: unit tests for get_conversations 2017-02-07 01:43:33 +00:00
Ryan Wyllie 2f9f8b5903 MDL-57370 message: remove joins from get_conversations
I have broken up the single query that was doing multiple joins on the
messaging and user tables. It no longer does any joins and will instead
query each data set individually.

This may cost more in terms of PHP processing but it will mean that
standard database tunings should be able to handle larger data sets.

For example this function was taking a long time to run on moodle.org
and was causing the MySQL join buffer to overflow.
2017-02-07 01:43:32 +00:00
Eloy Lafuente (stronk7) 3923610e6c Merge branch 'wip-mdl-57851-m32' of https://github.com/rajeshtaneja/moodle into MOODLE_32_STABLE 2017-02-07 01:26:21 +01:00
Eloy Lafuente (stronk7) 0913eb3c2a Merge branch 'wip-mdl-57853-m32' of https://github.com/rajeshtaneja/moodle into MOODLE_32_STABLE 2017-02-06 21:55:05 +01:00
AMOS bot f5b50e0472 Automatically generated installer lang files 2017-02-07 00:05:29 +08:00
Eloy Lafuente (stronk7) 09261027b6 Merge branch 'MDL-53349-32' of https://github.com/xow/moodle into MOODLE_32_STABLE 2017-02-06 16:09:46 +01:00
Dan Poltawski e0c4e6496f Merge branch 'MDL-57660-32' of git://github.com/junpataleta/moodle into MOODLE_32_STABLE 2017-02-06 13:47:29 +00:00
Dan Poltawski 672ce4c6cd Merge branch 'MDL-57587_32' of git://github.com/timhunt/moodle into MOODLE_32_STABLE 2017-02-06 11:04:00 +00:00
Juan Leyva 13a2a8344c MDL-57868 mod_feedback: Fix incorrect query parameters order
get_records_menu call get_records using the same params ordering, it is
causing a duplicated value error for the first column
2017-02-06 11:32:33 +01:00
David Monllao 8184f47d6c Merge branch 'MDL-57777-m32' of https://github.com/micaherne/moodle into MOODLE_32_STABLE 2017-02-06 09:41:52 +01:00
Rajesh Taneja 7a7320af90 MDL-57853 phpunit: Remove use of setExpectedException 2017-02-06 11:45:45 +08:00
Stephen Bourget 70fd9fbb39 MDL-55867 block_activity_results: Sort activities alphabetically. 2017-02-05 21:30:01 -05:00
Rajesh Taneja e16448d3f1 MDL-57851 behat: Add some more wait for scenario to pass
On slow machine with phnatomjs profile
this scenario keeps failing. Add some more
wait to ensure the page is stable and next
step can be executed
2017-02-03 12:54:45 +08:00
AMOS bot 2b4eb2cb71 Automatically generated installer lang files 2017-02-03 00:04:16 +08:00
Andrew Hancox ed798679bb MDL-56841 mod_folder: Display edit and download buttons inline 2017-02-02 15:17:00 +00:00
Simey Lameze 299dcca1b1 MDL-56954 theme_boost: apply bs4 styles to course management page 2017-02-02 15:52:51 +08:00
Andrew Nicols c16c53d137 weekly release 3.2.1+ 2017-02-02 11:32:16 +08:00
Andrew Nicols 52723e1e3f Merge branch 'MDL-57630-m32' of https://github.com/micaherne/moodle into MOODLE_32_STABLE 2017-02-02 09:19:08 +08:00
Rajesh Taneja 0bcbd5b205 MDL-54628 behat: Rerun command now include replace option passed 2017-02-02 08:21:31 +08:00
Nadav Kavalerchik ec319d13df MDL-53349 Autocomplete: Support multi lingual COMMA keycode (44) 2017-02-01 16:30:23 +08:00
Ankit Agarwal 0c4422af0b MDL-57300 lti: Make tool provider page more readable 2017-02-01 11:51:32 +05:30
Ankit Agarwal 40dcbac3d6 MDL-57027 accesslib: Improve perf of sql 2017-02-01 13:06:03 +08:00
Petr Skoda 62eb5ef8eb MDL-57027 fix get_users_by_capability()
Change-Id: I98dc88784dfa0293f88a19c3d36e7a46a3f52672
2017-02-01 13:06:02 +08:00
Eloy Lafuente (stronk7) 434e8abac8 Merge branch 'MDL-57592-32' of https://github.com/mwehr/moodle into MOODLE_32_STABLE 2017-02-01 13:06:01 +08:00
Dan Poltawski 28add18d9b Merge branch 'MDL-57588_32' of git://github.com/timhunt/moodle into MOODLE_32_STABLE 2017-02-01 13:06:01 +08:00
Dan Poltawski f9220d8138 Merge branch 'wip-mdl-54628-m32' of https://github.com/rajeshtaneja/moodle into MOODLE_32_STABLE 2017-02-01 13:06:00 +08:00
Dan Poltawski 32237b8308 Merge branch 'MDL-57300-32' of git://github.com/ankitagarwal/moodle into MOODLE_32_STABLE 2017-02-01 13:06:00 +08:00
Dan Poltawski c2ae90c553 Merge branch 'MDL-57728_m32v1' of https://github.com/sbourget/moodle into MOODLE_32_STABLE 2017-02-01 13:05:59 +08:00
Michael Aherne 7035e0f5b5 MDL-57777 rss: Return 404 when context not found. 2017-01-31 09:31:31 +00:00
Andrew Nicols 6a3777f90c Merge branch 'wip-MDL-57785-32' of git://github.com/amygroshek/moodle into MOODLE_32_STABLE 2017-01-31 12:21:37 +08:00
Andrew Nicols de7a6ff47e Merge branch 'MDL-35978-32-blockfix' of https://github.com/snake/moodle into MOODLE_32_STABLE 2017-01-31 11:51:17 +08:00
Jake Dallimore 46e26a1b69 MDL-35978 comments: fix for comments block which has no toggler 2017-01-31 11:33:02 +08:00
Andrew Nicols 0db0a63e50 Merge branch 'MDL-57296-32' of git://github.com/ankitagarwal/moodle into MOODLE_32_STABLE 2017-01-31 08:54:47 +08:00
wehr 120798e85f MDL-57592 assignment: Adds filtering of assignment name in grader view 2017-01-30 18:25:17 +01:00
Tim Hunt 4679634e36 MDL-57588 questions: regrading should not lose flags 2017-01-30 14:32:16 +00:00
Dan Poltawski 1c0462deb3 Merge branch 'wip-MDL-57782-32' of git://github.com/marinaglancy/moodle into MOODLE_32_STABLE 2017-01-30 10:08:28 +00:00
Dan Poltawski 7dc8cc1ab6 Merge branch 'MDL-35978-32' of https://github.com/snake/moodle into MOODLE_32_STABLE 2017-01-30 09:54:13 +00:00
Dan Poltawski 170cd579ff Merge branch 'MDL-36233-32' of git://github.com/lameze/moodle into MOODLE_32_STABLE 2017-01-30 09:34:54 +00:00
Ankit Agarwal 6c83de1d51 MDL-57296 gradelib: Fix get_hidding_effect for grade_type_none items 2017-01-30 13:49:57 +05:30
Ankit Agarwal 0ef42d5f6d MDL-57296 gradebook: Fix issue with gradebook while collapsing grades 2017-01-30 13:49:57 +05:30
Mike Churchward ffc60d23b4 MDL-36233 mod_assign: fixed submission time comparison sql and test. 2017-01-30 09:26:39 +08:00
Rajesh Taneja 4f5a6ca40e MDL-54628 behat: Set behat dir for each run under behat_dataroot
Before this patch behat_dataroot for parallel runs
were created at same level as ->behat_dataroot
After this patch, it will be created 1 level under
->behat_dataroot with BEHAT_PARALLEL_SITE_NAME
prefix and run number as suffix. This will allow
common files as test enabled and parallel run info
to be saved in parent directory and access it easily.
2017-01-30 09:23:58 +08:00
Rajesh Taneja a669c6b21e MDL-54628 behat: Show parallel run command with proper rerun option 2017-01-30 09:23:58 +08:00
Kevin Wiliarty e7734513b8 MDL-57113 boost: min-width for region-main in grade views 2017-01-28 11:47:13 -05:00
Amy Groshek 44b4f83298 MDL-57785 scorm: Prevents SCORM nav refresh when nav not shown.
This improvement prevents refresh of SCORM 1.2 navigation menu
when the navigation menu is not displayed.
2017-01-27 09:12:45 -06:00
Marina Glancy 49053808a2 MDL-57782 enrol_self: fix check when email needs to be sent
Thanks to Leandro for providing a fix
2017-01-27 14:25:17 +08:00
Helson Castro 8ea5d72218 MDL-57568 forms: Added missing include for button element. 2017-01-27 14:01:16 +08:00
Jake Dallimore e33b7b342a MDL-35978 comments: expandable comments announce change when toggled
Added role and aria-expanded attributes to the toggler link and added
a key handler for the space and enter keys.
2017-01-27 13:07:12 +08:00
Jun Pataleta f33a8d4eee MDL-57660 mod_forum: Preserve forum ID selection after form submission 2017-01-27 10:09:54 +08:00
Eloy Lafuente (stronk7) 6a4a1d812c weekly release 3.2.1+ 2017-01-27 00:28:06 +01:00
Eloy Lafuente (stronk7) c94dce9c89 Merge branch 'install_32_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_32_STABLE 2017-01-27 00:28:01 +01:00
Tim Hunt a551ea0210 MDL-57587 question file access: fix regression caused by MDL-53744 2017-01-26 18:54:28 +00:00
Michael Aherne 72b489ef65 MDL-57777 rss: Return 404 when context not found. 2017-01-26 10:51:47 +00:00
Eloy Lafuente (stronk7) 827d93f88a Merge branch 'MDL-55915_32' of https://github.com/rezaies/moodle into MOODLE_32_STABLE 2017-01-24 22:11:41 +01:00
AMOS bot 884f4d3ec3 Automatically generated installer lang files 2017-01-25 00:04:42 +08:00
Ankit Agarwal a072271853 MDL-57300 lti: Rename lti2 as registration url
AMOS BEGIN
CPY [registrationurl,mod_lti],[registrationurl,enrol_lti]
AMOS END
2017-01-24 16:41:04 +05:30
Ankit Agarwal 95c794075a MDL-57300 lti: Fix incorrect variable types in docs 2017-01-24 16:41:04 +05:30
Dan Poltawski 890f84cdb2 Merge branch 'MDL-57639-32' of git://github.com/andrewnicols/moodle into MOODLE_32_STABLE 2017-01-24 10:11:29 +00:00
Dan Poltawski b4e1bbef47 Merge branch 'MDL-57667-32' of https://github.com/snake/moodle into MOODLE_32_STABLE 2017-01-24 09:40:57 +00:00
Andrew Nicols 678d051bee Merge branch 'm32_MDL-46782' of git://github.com/danmarsden/moodle into MOODLE_32_STABLE 2017-01-24 10:44:03 +08:00
Dan Marsden c83ef7e25b MDL-46782 mod_scorm: fix completion test, remove redundant test. 2017-01-24 13:06:57 +13:00
Dan Poltawski 1ee447d3a4 Merge branch 'wip_32_mdl-50625_ldap_better_check_paged_results_support' of https://github.com/iarenaza/moodle into MOODLE_32_STABLE 2017-01-23 16:21:02 +00:00
Dan Poltawski 217d523d43 Merge branch 'wip-MDL-57511-32' of git://github.com/Beedell/moodle into MOODLE_32_STABLE 2017-01-23 15:39:57 +00:00
Dan Poltawski 76cebe50cb Merge branch 'MDL-57415_m32v1' of https://github.com/sbourget/moodle into MOODLE_32_STABLE 2017-01-23 12:24:11 +00:00
Dan Poltawski 7dfc04ff98 Merge branch 'MDL-57287-32' of git://github.com/snake/moodle into MOODLE_32_STABLE 2017-01-23 12:19:23 +00:00
Dan Poltawski ff037d9698 Merge branch 'mdl57668-moodle32' of https://github.com/tlock/moodle into MOODLE_32_STABLE 2017-01-23 12:05:33 +00:00
Dan Poltawski 39dc183d9f Merge branch 'wip-mdl-57700-m32' of https://github.com/rajeshtaneja/moodle into MOODLE_32_STABLE 2017-01-23 11:59:11 +00:00
Dan Poltawski f7ddcd23f8 Merge branch 'MDL-57677-32-usermodified' of git://github.com/mudrd8mz/moodle into MOODLE_32_STABLE 2017-01-23 09:48:12 +00:00
Dan Poltawski 92f57f8397 Merge branch 'm32_MDL-46782' of git://github.com/danmarsden/moodle into MOODLE_32_STABLE 2017-01-23 09:28:31 +00:00
Dan Poltawski 98f246ae97 Merge branch 'MDL-57737-32' of git://github.com/crazyserver/moodle into MOODLE_32_STABLE 2017-01-23 09:26:56 +00:00
Pau Ferrer Ocaña f9e7ee4534 MDL-57737 glossary: Add entry description accepts HTML 2017-01-20 13:26:02 +01:00
Shamim Rezaie b14507a31f MDL-55915 enrol_manual: let fullname()know if user has viewfullnames cap
fullname() relies on its second parameter to determine wheter it should use fullnamedisplay or alternativefullnameformat.
We need to check for moodle/site:viewfullnames capability and pass true as the second parameter to fullname() whereever
the user has this capability.
2017-01-20 19:31:08 +11:00
Shamim Rezaie 4436b9e9dd MDL-55915 core_user: let fullname() know if user has viewfullnames cap
Added $viewfullnames property to the user_selector_base class so anyone using a child class of this class can
let it know if user has viewfullnames capability or not.
2017-01-20 19:30:21 +11:00
Shamim Rezaie 2568183232 MDL-55915 Gradebook: let fullname() know if user has viewfullnames cap
Instruct fullname() to format names on the gradebook grader report with alternativefullnameformat when user
has moodle/site:viewfullnames capability.
2017-01-20 19:28:36 +11:00
Shamim Rezaie bcca23f9c5 MDL-55915 mod_assign: let fullname() know if user has viewfullnames cap
Instruct fullname() to format names on the assignment grading page with alternativefullnameformat when user
has moodle/site:viewfullnames capability.
2017-01-20 19:26:33 +11:00
Rajesh Taneja bab24efe70 MDL-57700 behat: Fixed undefined RuntimeException 2017-01-20 11:05:10 +08:00
Jake Dallimore 45a46ecbd8 MDL-57667 theme: change base layout for boost to columns2
Ensures capability errors are displayed on a page with full navigation.
2017-01-20 08:48:38 +08:00
Stephen Bourget 64cfe467f8 MDL-57728 theme: Fix text display when using tabs 2017-01-19 11:32:52 -05:00
AMOS bot 48f0ebcd49 Automatically generated installer lang files 2017-01-20 00:07:16 +08:00
John Beedell 6537c557b5 MDL-57511 Quiz: Attempts report shows non-unique debugging 2017-01-19 14:44:16 +00:00
Iñaki Arenaza 225e039e73 MDL-50625 auth_ldap: Better check for paged results support
There is at least one LDAP server (Sun Directory Server) that doesn't
support Paged Results extension, even if it supports LDAP version 3. So
checking just for LDAP version is not enough.

If possible, we check the supportedControl attribute of the LDAP rootDSE
and see if the paged results control is available. This needs an LDAP
connection, which might not be possible to establish before we configure
some essential LDAP settings (server, bind user, password, etc.). Thus
we try to establish the connection and check the supportedControl
attribute. But if we fail, we perform only basic checks that are less
accurate and err on the side of cautiousness.
2017-01-19 10:58:13 +01:00
Andrew Nicols c8dddb5ccb MDL-57639 mod_forum: Update to use correct variable name
This addresses a regression where unnecessary attributes were removed
from the old variable. This one was missed.
2017-01-19 13:47:45 +08:00
Andrew Nicols 3e276d6efa weekly release 3.2.1+ 2017-01-19 12:17:57 +08:00
Andrew Nicols adf2ea6166 Merge branch 'install_32_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_32_STABLE 2017-01-19 12:17:56 +08:00
Andrew Nicols fd90d0e925 MDL-57613 enrol_lti: Correct location of upgrade step 2017-01-19 07:56:17 +08:00
Tim Lock 58a4ce4774 MDL-57668 mod_assign: Fix optional_param() form processing 2017-01-19 08:08:07 +10:30
Stephen Bourget b44972cc8b MDL-57415 user: Add missing bootstrap classes to participants page 2017-01-18 10:38:33 -05:00
Dan Poltawski 655570df00 MDL-57604 mod_assign: fix empty case in user selector
Sadly the js arguments object gives an arguments.length of 1 when
no arguments are passed, so we have to explicitly check for it.
2017-01-18 09:59:33 +01:00
Dan Marsden dbf70dec42 MDL-46782 mod_scorm: Load first incomplete sco on re-entry. 2017-01-18 21:03:52 +13:00
Rajesh Taneja c40ed5f6ff MDL-45821 behat: navigate back to scorm to avoid scroll
On Exiting scrom activity, it goes back to course
and scrolls to section. On slow machines next step
fails. To avoid such case navigate to home screen
and then follow next step.
2017-01-18 13:03:07 +08:00
Andrew Nicols 2827c7f997 Merge branch 'MDL-57634-m32' of https://github.com/micaherne/moodle into MOODLE_32_STABLE 2017-01-18 12:38:14 +08:00
Andrew Nicols 2259fb5f36 Merge branch 'wip_MDL-57590_32_forum_search' of https://github.com/mchurchward/moodle into MOODLE_32_STABLE 2017-01-18 08:38:10 +08:00
Dan Poltawski 6dc7039af9 MDL-57604 mod_assign: Adding some missing stuff in 32_STABLE
In order to keep 31, 32 and master the same.
2017-01-18 01:04:48 +01:00
Eloy Lafuente (stronk7) ee7b977a8b Merge branch 'MDL-57604-32' of git://github.com/danpoltawski/moodle into MOODLE_32_STABLE 2017-01-18 00:17:11 +01:00
Eloy Lafuente (stronk7) f4841f394c Merge branch 'wip-MDL-57608-32-3' of git://github.com/marinaglancy/moodle into MOODLE_32_STABLE 2017-01-17 20:46:19 +01:00
David Mudrák 6973e38a91 MDL-57677 mod_forum: Fix wrong user displayed as the last post's author
In the recent issue MDL-56225, we started to record the current user as
the usermodified in the forum_discussions table when updating a forum
post. It made sense but it was a mistake.

Even if the current user really modifies the discussion by updating the
post, the field usermodified has actually been always interpreted and
displayed as the last post' author. Not as the last user who touched the
discussion.

This patch reverts that particular change to the previous behaviour and
adds explicit unit test for it.
2017-01-17 19:39:40 +01:00
AMOS bot c1b158b569 Automatically generated installer lang files 2017-01-18 00:07:24 +08:00
Dan Poltawski 21a8a95869 Merge branch 'wip-mdl-57669-m32' of https://github.com/rajeshtaneja/moodle into MOODLE_32_STABLE 2017-01-17 10:28:52 +00:00
sam marshall 359914c8f6 MDL-57515 Resource: 'not very efficient' with a large number of files
Fixes bug where the resource module loads metadata for all files while
building course modinfo, even though it only needs the first file.
(This causes problems if you have ~10k files.)
2017-01-17 10:22:13 +00:00
Jake Dallimore 95208fe135 MDL-57287 themes: fix buttons in default dashboard page header
This fix modifies styling for pages having no navbar, such as the
dashboard, site home and default dashboard pages and fixes an overlap
problem with the buttons and context header.
2017-01-17 15:55:39 +08:00
Rajesh Taneja df428648ee MDL-57669 behat: Exit with error code if step undefined 2017-01-17 10:32:47 +08:00
Dan Poltawski 9148905e9a Merge branch 'MDL-57368-32-2' of https://github.com/snake/moodle into MOODLE_32_STABLE 2017-01-16 16:19:57 +00:00
Dan Poltawski 64df3fed13 Merge branch 'MDL-57613-32' of https://github.com/xow/moodle into MOODLE_32_STABLE 2017-01-16 16:17:16 +00:00
Mike Churchward ed4aaea57b MDL-57590 mod_forum: fixed search form with forumid and actionurl. 2017-01-16 11:16:27 -05:00
AMOS bot 163fc8588d Automatically generated installer lang files 2017-01-17 00:08:10 +08:00
Dan Poltawski 39e34b9586 Merge branch 'MDL-57452_behat_completion_fix_master_MOODLE_32_STABLE' of https://github.com/gthomas2/moodle into MOODLE_32_STABLE 2017-01-16 13:34:09 +00:00
Dan Poltawski 5c63ab7ee8 Merge branch 'MDL-57601-m32' of https://github.com/sammarshallou/moodle into MOODLE_32_STABLE 2017-01-16 12:23:06 +00:00
Dan Poltawski 3e3068cd11 Merge branch 'MDL-57374_m32' of https://github.com/dasistwas/moodle into MOODLE_32_STABLE 2017-01-16 12:10:51 +00:00
Dan Poltawski a27dde0ba7 Merge branch 'MDL-57554-32' of git://github.com/crazyserver/moodle into MOODLE_32_STABLE 2017-01-16 11:17:59 +00:00
Dan Poltawski b92400a49f Merge branch 'm32_MDL-45821' of git://github.com/danmarsden/moodle into MOODLE_32_STABLE 2017-01-16 09:17:50 +00:00
Dan Poltawski a477c8b752 Merge branch 'wip-MDL-56271-32' of git://github.com/marinaglancy/moodle into MOODLE_32_STABLE 2017-01-16 08:01:23 +00:00
Pau Ferrer Ocaña 7f52d5c740 MDL-57554 forum: Mark as read on view_forum_discussion calls 2017-01-13 09:27:06 +01:00
John Okely f52bdbb885 MDL-57613 enrol_lti: Allow longer nonces 2017-01-13 11:22:19 +08:00
David Bogner 7c519588f1 MDL-57374 editor: Pasting plain text in Atto removes all styles/classes 2017-01-12 18:00:37 +01:00
AMOS bot 7345917de4 Automatically generated installer lang files 2017-01-13 00:05:19 +08:00
Stephen Bourget 8a71b10a68 MDL-53991 calendar: fix repeating events on course import 2017-01-12 09:40:38 -05:00
Michael Aherne 18907a51d5 MDL-57634 messaging: Ensure test uses a configured plugin 2017-01-12 12:31:56 +00:00
gthomas2 11d04ffe8a MDL-57452 behat: Make completion check work with manual completion input 2017-01-12 11:38:59 +00:00
Dan Poltawski 5e1014a76e weekly release 3.2.1+ 2017-01-12 07:42:37 +00:00
Dan Poltawski 6e497e6e7d Merge branch 'install_32_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_32_STABLE 2017-01-12 07:42:36 +00:00
Jake Dallimore 66a4a376ee MDL-57368 mod_feeback: fix drag and drop question reordering in boost 2017-01-12 11:37:43 +08:00
Jake Dallimore 3563244314 MDL-57368 templates: add example context to core_form/element-template 2017-01-12 11:37:34 +08:00
Dan Poltawski bf02dc9819 MDL-57608 media_videojs: lazily load videojs on demand
The videojs javascript is over 1MB of javascript which we don't need to
load on every page, now that we only require it demand, the js can be
lazily loaded when its needed, which keeps the first.js smaller and more
likely to stay in browser cache.
2017-01-12 10:56:06 +08:00
Dan Poltawski 8e8c066448 MDL-57608 media_videojs: fix third party locations 2017-01-12 10:56:06 +08:00
Marina Glancy 67f83d9279 MDL-57608 media_videojs: load youtube module only when requested 2017-01-12 10:56:06 +08:00
Michael Aherne bcd1915dd0 MDL-57630 messaging: Pass unit test with third-party plugins 2017-01-11 16:39:31 +00:00
Eloy Lafuente (stronk7) 992ffccfd2 Merge branch 'wip-mdl-57595-m32' of https://github.com/rajeshtaneja/moodle into MOODLE_32_STABLE 2017-01-11 02:29:56 +01:00
Dan Poltawski 97fd5a9841 Merge branch 'MDL-57480-32' of https://github.com/snake/moodle into MOODLE_32_STABLE 2017-01-10 08:40:12 +00:00
Marina Glancy 6b47a070e7 MDL-56271 mod_feedback: recaptcha was not working 2017-01-10 14:08:26 +08:00
David Monllao b4cfb7d733 Merge branch 'MDL-57385-32-2' of git://github.com/junpataleta/moodle into MOODLE_32_STABLE 2017-01-10 05:27:11 +01:00
Marina Glancy a9fa51024f MDL-50770 blocks: copy sitewide blocks positions when cloning dashboards 2017-01-10 11:40:27 +08:00
Jun Pataleta 2eec6ffc6c MDL-57385 core: Set page layouts of non-mydashboard pages to standard
The following pages are using the "mydashboard" page layout:
* User preferences > Badges > Manage badges
* User preferences > Badges > Backpack settings
* User preferences > Repositories > Manage instances
* Private files
However, the "mydashboard" page layout should only be used for the user's
dashboard page. Changing these to use the "standard" page layout.
2017-01-10 09:46:18 +08:00
Rajesh Taneja 3f1574f849 MDL-57595 behat: Added redirect and wait to ensure next step pass 2017-01-10 08:45:43 +08:00
Jake Dallimore 40b78a23e9 MDL-57480 core_course: make drag and drop fire a dom updated event
When adding media via drag and drop, the notifyFilterContentUpdated
event should be called after the item is added to the DOM. This allows
things like videojs for example, to process the new content.
2017-01-10 07:47:18 +08:00
Dan Poltawski fb5655b5c2 MDL-57604 mod_assign: fix incorrect user being selector from chooser
Previously there was a logic bug where by if some students were filtered
from the list, the label for another student could be attached to the
'filered' student.

This fix reworks the promises a bit so we render the student summary and
then build an row with the explict user id, rather than itterating through
the array later.

I also remove the storing of the initial promise in a varible because
this is an easy way to introduce a bug (not waiting for the .then()
chained promise)
2017-01-09 20:28:01 +00:00
sam marshall 405dcba6f3 MDL-57601 Grade report: Error for ungraded quiz without view hidden
If a course contains an ungraded quiz (max grade set to 0), and there
is a user account which can view the grader reports but does not have
permission to view hidden grades, they will get errors.
2017-01-09 17:14:44 +00:00
Dan Poltawski 7f32c5a447 Merge branch 'MDL-57427_m32' of https://github.com/jrchamp/moodle into MOODLE_32_STABLE 2017-01-09 16:26:18 +00:00
AMOS bot ec3eeb7ace Automatically generated installer lang files 2017-01-10 00:04:55 +08:00
Jonathan Champ 1af3d13bf3 MDL-57427 cache: Use perfdebug only when enabled 2017-01-09 10:18:41 -05:00
David Monllao 84122523ba Merge branch 'wip-mdl-55042-m32' of https://github.com/rajeshtaneja/moodle into MOODLE_32_STABLE 2017-01-09 12:56:12 +01:00
godric 382c069e52 MDL-40132 lib: Using compare rule results in fatal error.
In getValidationScript function variable $element can be an array or object.
Function attempt get non-existing attributes.
To avoid this we should check before accessing.
2017-01-09 10:30:03 +00:00
Dan Poltawski 3f58a36504 Merge branch 'wip-mdl-56211-m32' of https://github.com/rajeshtaneja/moodle into MOODLE_32_STABLE 2017-01-09 09:58:42 +00:00
Dan Poltawski 9e41e4e8ea Merge branch 'MDL-57373-32' of git://github.com/ankitagarwal/moodle into MOODLE_32_STABLE 2017-01-09 09:42:17 +00:00
Dan Poltawski 7523d99558 Merge branch 'MDL-53367_32' of https://github.com/juancs/moodle into MOODLE_32_STABLE 2017-01-09 08:27:56 +00:00
Dan Marsden 9a375bdf6c MDL-45821 mod_scorm: Check lesson_status correctly for multi-sco. 2017-01-09 20:08:10 +13:00
Rajesh Taneja 2fd5ceadb5 MDL-56211 behat: Add suite name to faildump path
If suite is not default then add suite name
to end of faildump file name
2017-01-06 09:20:10 +08:00
Daniel Thee Roperto a204d7d921 MDL-57576 assignment: Overwrite feedback file if it has the same name. 2017-01-05 15:32:51 +11:00
Damyon Wiese bf345fc4ca MDL-57009 javascript: cibot nagging 2017-01-05 09:36:09 +08:00
Damyon Wiese 2722404791 MDL-57009 javascript: Dont rely on async ajax
Recursively pre-scan mustache templates to extract the list of blocks and partials. Then
we can pre-fetch them all and don't have to rely on jquery async ajax (which is deprecated).

This is part of a refactoring of the promises code in the templates module to prevent duplicate requests.
2017-01-05 09:36:09 +08:00
Damyon Wiese 256f820dfd MDL-57009 js: Do not fetch the same template twice
Also clean up promises use of done vs then.
2017-01-05 09:36:09 +08:00
Damyon Wiese 173f5515e3 MDL-57009 js: Skip ajax request for same string
This is done by caching the first promise generated to fetch a string.
2017-01-05 09:36:09 +08:00
Rajesh Taneja 926d5a53ff MDL-55042 phpunit: Get sorted sections
Sometimes db doesn't return records in order
So enusre it is in order so that last record
doesn't have section equal 0. As section 0
can't be deleted.
2017-01-03 10:00:05 +08:00
Ankit Agarwal 88c0fcb03f MDL-57373 navigation: Fix course names in flat nav 2016-12-27 12:21:02 +05:30
Juan Segarra Montesinos 972304f4cb MDL-53367 mod_forum: Subscribe current users when importing a forum
Subscribes currently enrolled users when importing a forum with
automatic subscription enabled.
2016-12-20 08:55:34 +01:00
345 changed files with 5635 additions and 1387 deletions
+2 -1
View File
@@ -56,7 +56,8 @@ lib/amd/src/chartjs-lazy.js
lib/maxmind/GeoIp2/
lib/maxmind/MaxMind/
lib/ltiprovider/
media/player/videojs/amd/src/
media/player/videojs/amd/src/video-lazy.js
media/player/videojs/amd/src/Youtube-lazy.js
media/player/videojs/videojs/
mod/assign/feedback/editpdf/fpdi/
repository/s3/S3.php
+2 -1
View File
@@ -57,7 +57,8 @@ lib/amd/src/chartjs-lazy.js
lib/maxmind/GeoIp2/
lib/maxmind/MaxMind/
lib/ltiprovider/
media/player/videojs/amd/src/
media/player/videojs/amd/src/video-lazy.js
media/player/videojs/amd/src/Youtube-lazy.js
media/player/videojs/videojs/
mod/assign/feedback/editpdf/fpdi/
repository/s3/S3.php
+3 -1
View File
@@ -134,11 +134,13 @@ before_script:
sed -i \
-e "s%= 'pgsql'%= 'mysqli'%" \
-e "s%= 'username'%= 'travis'%" \
-e "s%=> 'utf8mb4_unicode_ci'%=> 'utf8mb4_bin'%" \
config.php;
mysql -u root -e 'SET GLOBAL innodb_file_format=barracuda;' ;
mysql -u root -e 'SET GLOBAL innodb_file_per_table=ON;' ;
mysql -e 'CREATE DATABASE travis_ci_test DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_bin;' ;
mysql -u root -e 'SET GLOBAL innodb_large_prefix=ON;' ;
mysql -e 'CREATE DATABASE travis_ci_test DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_bin;' ;
fi
fi
+86 -5
View File
@@ -64,6 +64,71 @@ if (!empty($options['collation'])) {
cli_error("Error: collation '$collation' is not available on this server!");
}
$collationinfo = explode('_', $collation);
$charset = reset($collationinfo);
$engine = strtolower($DB->get_dbengine());
// Do checks for utf8mb4.
if (strpos($collation, 'utf8mb4') === 0) {
// Do we have the right engine?
if ($engine !== 'innodb' && $engine !== 'xtradb') {
cli_error("Error: '$collation' requires InnoDB or XtraDB set as the engine.");
}
// Are we using Barracuda?
if ($DB->get_row_format() != 'Barracuda') {
// Try setting it here.
try {
$DB->execute("SET GLOBAL innodb_file_format=Barracuda");
} catch (dml_exception $e) {
cli_error("Error: '$collation' requires the file format to be set to Barracuda.
An attempt was made to change the format, but it failed. Please try doing this manually.");
}
echo "GLOBAL SETTING: innodb_file_format changed to Barracuda\n";
}
// Is one file per table being used?
if (!$DB->is_file_per_table_enabled()) {
try {
$DB->execute("SET GLOBAL innodb_file_per_table=1");
} catch (dml_exception $e) {
cli_error("Error: '$collation' requires the setting 'innodb_file_per_table' be set to 'ON'.
An attempt was made to change the format, but it failed. Please try doing this manually.");
}
echo "GLOBAL SETTING: innodb_file_per_table changed to 1\n";
}
// Is large prefix set?
if (!$DB->is_large_prefix_enabled()) {
try {
$DB->execute("SET GLOBAL innodb_large_prefix=1");
} catch (dml_exception $e) {
cli_error("Error: '$collation' requires the setting 'innodb_large_prefix' be set to 'ON'.
An attempt was made to change the format, but it failed. Please try doing this manually.");
}
echo "GLOBAL SETTING: innodb_large_prefix changed to 1\n";
}
}
$sql = "SHOW VARIABLES LIKE 'collation_database'";
if (!$dbcollation = $DB->get_record_sql($sql)) {
cli_error("Error: Could not access collation information on the database.");
}
$sql = "SHOW VARIABLES LIKE 'character_set_database'";
if (!$dbcharset = $DB->get_record_sql($sql)) {
cli_error("Error: Could not access character set information on the database.");
}
if ($dbcollation->value !== $collation || $dbcharset->value !== $charset) {
// Try to convert the DB.
echo "Converting database to '$collation' for $CFG->wwwroot:\n";
$sql = "ALTER DATABASE $CFG->dbname DEFAULT CHARACTER SET $charset DEFAULT COLLATE = $collation";
try {
$DB->change_database_structure($sql);
} catch (exception $e) {
cli_error("Error: Tried to alter the database with no success. Please try manually changing the database
to the new collation and character set and then run this script again.");
}
echo "DATABASE CONVERTED\n";
}
echo "Converting tables and columns to '$collation' for $CFG->wwwroot:\n";
$prefix = $DB->get_prefix();
$prefix = str_replace('_', '\\_', $prefix);
@@ -80,7 +145,7 @@ if (!empty($options['collation'])) {
$skipped++;
} else {
$DB->change_database_structure("ALTER TABLE $table->name DEFAULT COLLATE = $collation");
$DB->change_database_structure("ALTER TABLE $table->name DEFAULT CHARACTER SET $charset DEFAULT COLLATE = $collation");
echo "CONVERTED\n";
$converted++;
}
@@ -96,18 +161,32 @@ if (!empty($options['collation'])) {
continue;
}
// Check for utf8mb4 collation.
$rowformat = $DB->get_row_format_sql($engine, $collation);
if ($column->type === 'tinytext' or $column->type === 'mediumtext' or $column->type === 'text' or $column->type === 'longtext') {
$notnull = ($column->null === 'NO') ? 'NOT NULL' : 'NULL';
$default = (!is_null($column->default) and $column->default !== '') ? "DEFAULT '$column->default'" : '';
// primary, unique and inc are not supported for texts
$sql = "ALTER TABLE $table->name MODIFY COLUMN $column->field $column->type COLLATE $collation $notnull $default";
$sql = "ALTER TABLE $table->name
MODIFY COLUMN $column->field $column->type
CHARACTER SET $charset
COLLATE $collation $notnull $default";
$DB->change_database_structure($sql);
} else if (strpos($column->type, 'varchar') === 0) {
$notnull = ($column->null === 'NO') ? 'NOT NULL' : 'NULL';
$default = !is_null($column->default) ? "DEFAULT '$column->default'" : '';
// primary, unique and inc are not supported for texts
$sql = "ALTER TABLE $table->name MODIFY COLUMN $column->field $column->type COLLATE $collation $notnull $default";
if ($rowformat != '') {
$sql = "ALTER TABLE $table->name $rowformat";
$DB->change_database_structure($sql);
}
$sql = "ALTER TABLE $table->name
MODIFY COLUMN $column->field $column->type
CHARACTER SET $charset
COLLATE $collation $notnull $default";
$DB->change_database_structure($sql);
} else {
echo "ERROR (unknown column type: $column->type)\n";
@@ -180,7 +259,9 @@ function mysql_get_collations() {
global $DB;
$collations = array();
$sql = "SHOW COLLATION WHERE Collation LIKE 'utf8\_%' AND Charset = 'utf8'";
$sql = "SHOW COLLATION
WHERE Collation LIKE 'utf8\_%' AND Charset = 'utf8'
OR Collation LIKE 'utf8mb4\_%' AND Charset = 'utf8mb4'";
$rs = $DB->get_recordset_sql($sql);
foreach ($rs as $collation) {
$collations[$collation->collation] = $collation->collation;
+30
View File
@@ -1723,6 +1723,21 @@
<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_CHECKS>
</MOODLE>
<MOODLE version="3.2" requires="2.7">
@@ -1873,6 +1888,21 @@
<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_CHECKS>
</MOODLE>
</COMPATIBILITY_MATRIX>
+1 -1
View File
@@ -38,5 +38,5 @@
}
}}
<div class="form-text defaultsnext">
<input type="text" name="{{name}}" value="{{value}}" size="{{size}}" id="{{id}}" class="{{#forceltr}}text-ltr{{/forceltr}}" {{#attributes}} {{name}}="{{value}}"{{/attributes}}>
<input type="text" name="{{name}}" value="{{value}}" size="{{size}}" id="{{id}}" class="{{#forceltr}}text-ltr{{/forceltr}}"{{#attributes}} {{name}}="{{value}}"{{/attributes}}>
</div>
+225 -89
View File
@@ -54,6 +54,8 @@ list($options, $unrecognised) = cli_get_params(
'fromrun' => 1,
'torun' => 0,
'single-run' => false,
'rerun' => 0,
'auto-rerun' => 0,
),
array(
'h' => 'help',
@@ -77,6 +79,8 @@ Options:
--replace Replace args string with run process number, useful for output.
--fromrun Execute run starting from (Used for parallel runs on different vms)
--torun Execute run till (Used for parallel runs on different vms)
--rerun Re-run scenarios that failed during last execution.
--auto-rerun Automatically re-run scenarios that failed during last execution.
-h, --help Print out this help
@@ -91,11 +95,31 @@ if (!empty($options['help'])) {
exit(0);
}
$parallelrun = behat_config_manager::get_parallel_test_runs($options['fromrun']);
$parallelrun = behat_config_manager::get_behat_run_config_value('parallel');
// Default torun is maximum parallel runs.
if (empty($options['torun'])) {
$options['torun'] = $parallelrun;
// Check if the options provided are valid to run behat.
if ($parallelrun === false) {
// Parallel run should not have fromrun or torun options greater than 1.
if (($options['fromrun'] > 1) || ($options['torun'] > 1)) {
echo "Test site is not initialized for parallel run." . PHP_EOL;
exit(1);
}
} else {
// Ensure fromrun is within limits of initialized test site.
if (!empty($options['fromrun']) && ($options['fromrun'] > $parallelrun)) {
echo "From run (" . $options['fromrun'] . ") is more than site with parallel runs (" . $parallelrun . ")" . PHP_EOL;
exit(1);
}
// Default torun is maximum parallel runs and should be less than equal to parallelruns.
if (empty($options['torun'])) {
$options['torun'] = $parallelrun;
} else {
if ($options['torun'] > $parallelrun) {
echo "To run (" . $options['torun'] . ") is more than site with parallel runs (" . $parallelrun . ")" . PHP_EOL;
exit(1);
}
}
}
// Capture signals and ensure we clean symlinks.
@@ -127,7 +151,7 @@ if ($options['profile']) {
exit(1);
}
$extraopts[] = '--profile="' . $profile . '"';
$extraopts['profile'] = '--profile="' . $profile . '"';
// By default, profile tags will be used.
if (!empty($CFG->behat_config[$profile]['filters']['tags'])) {
$tags = $CFG->behat_config[$profile]['filters']['tags'];
@@ -137,117 +161,205 @@ if ($options['profile']) {
// Command line tags have precedence (std behat behavior).
if ($options['tags']) {
$tags = $options['tags'];
$extraopts[] = '--tags="' . $tags . '"';
$extraopts['tags'] = '--tags="' . $tags . '"';
}
// Add suite option if specified.
if ($options['suite']) {
$extraopts[] = '--suite="' . $options['suite'] . '"';
$extraopts['suite'] = '--suite="' . $options['suite'] . '"';
}
// Feature should be added to last, for behat command.
if ($options['feature']) {
$extraopts[] = $options['feature'];
$extraopts['feature'] = $options['feature'];
// Only run 1 process as process.
// Feature file is picked from absolute path provided, so no need to check for behat.yml.
$options['torun'] = $options['fromrun'];
}
// Set of options to pass to behat.
$extraopts = implode(' ', $extraopts);
$extraoptstr = implode(' ', $extraopts);
// If empty parallelrun then just check with user if it's a run single behat test.
// If rerun is passed then ensure we just run the failed processes.
$lastfailedstatus = 0;
$lasttorun = $options['torun'];
$lastfromrun = $options['fromrun'];
if ($options['rerun']) {
// Get last combined failed status.
$lastfailedstatus = behat_config_manager::get_behat_run_config_value('lastcombinedfailedstatus');
$lasttorun = behat_config_manager::get_behat_run_config_value('lasttorun');
$lastfromrun = behat_config_manager::get_behat_run_config_value('lastfromrun');
if ($lastfailedstatus !== false) {
$extraoptstr .= ' --rerun';
}
// If torun is less than last torun, then just set this to min last to run and similar for fromrun.
if ($options['torun'] < $lasttorun) {
$options['torun'];
}
if ($options['fromrun'] > $lastfromrun) {
$options['fromrun'];
}
unset($options['rerun']);
}
$cmds = array();
$exitcodes = array();
$status = 0;
$verbose = empty($options['verbose']) ? false : true;
// Execute behat run commands.
if (empty($parallelrun)) {
$cwd = getcwd();
chdir(__DIR__);
$runtestscommand = behat_command::get_behat_command(false, false, true);
$runtestscommand .= ' --config ' . behat_config_manager::get_behat_cli_config_filepath();
$runtestscommand .= ' ' . $extraopts;
$runtestscommand .= ' ' . $extraoptstr;
$cmds['singlerun'] = $runtestscommand;
echo "Running single behat site:" . PHP_EOL;
passthru("php $runtestscommand", $code);
passthru("php $runtestscommand", $status);
$exitcodes['singlerun'] = $status;
chdir($cwd);
exit($code);
}
} else {
$cmds = array();
echo "Running " . ($options['torun'] - $options['fromrun'] + 1) . " parallel behat sites:" . PHP_EOL;
echo "Running " . ($options['torun'] - $options['fromrun'] + 1) . " parallel behat sites:" . PHP_EOL;
for ($i = $options['fromrun']; $i <= $options['torun']; $i++) {
$CFG->behatrunprocess = $i;
for ($i = $options['fromrun']; $i <= $options['torun']; $i++) {
$lastfailed = 1 & $lastfailedstatus >> ($i - 1);
// Options parameters to be added to each run.
$myopts = !empty($options['replace']) ? str_replace($options['replace'], $i, $extraopts) : $extraopts;
// Bypass if not failed in last run.
if ($lastfailedstatus && !$lastfailed && ($i <= $lasttorun) && ($i >= $lastfromrun)) {
continue;
}
$behatcommand = behat_command::get_behat_command(false, false, true);
$behatconfigpath = behat_config_manager::get_behat_cli_config_filepath($i);
$CFG->behatrunprocess = $i;
// Command to execute behat run.
$cmds[BEHAT_PARALLEL_SITE_NAME . $i] = $behatcommand . ' --config ' . $behatconfigpath . " " . $myopts;
echo "[" . BEHAT_PARALLEL_SITE_NAME . $i . "] " . $cmds[BEHAT_PARALLEL_SITE_NAME . $i] . PHP_EOL;
}
// Options parameters to be added to each run.
$myopts = !empty($options['replace']) ? str_replace($options['replace'], $i, $extraoptstr) : $extraoptstr;
if (empty($cmds)) {
echo "No commands to execute " . PHP_EOL;
exit(1);
}
$behatcommand = behat_command::get_behat_command(false, false, true);
$behatconfigpath = behat_config_manager::get_behat_cli_config_filepath($i);
// Create site symlink if necessary.
if (!behat_config_manager::create_parallel_site_links($options['fromrun'], $options['torun'])) {
echo "Check permissions. If on windows, make sure you are running this command as admin" . PHP_EOL;
exit(1);
}
// Execute all commands, relative to moodle root directory.
$processes = cli_execute_parallel($cmds, __DIR__ . "/../../../../");
$stoponfail = empty($options['stop-on-failure']) ? false : true;
// Print header.
print_process_start_info($processes);
// Print combined run o/p from processes.
$exitcodes = print_combined_run_output($processes, $stoponfail);
$time = round(microtime(true) - $time, 1);
echo "Finished in " . gmdate("G\h i\m s\s", $time) . PHP_EOL . PHP_EOL;
ksort($exitcodes);
// Print exit info from each run.
// Status bits contains pass/fail status of parallel runs.
$status = 0;
$processcounter = 0;
foreach ($exitcodes as $exitcode) {
if ($exitcode) {
$status |= (1 << $processcounter);
}
$processcounter++;
}
// Run finished. Show exit code and output from individual process.
$verbose = empty($options['verbose']) ? false : true;
$verbose = $verbose || !empty($status);
// Show exit code from each process, if any process failed.
if ($verbose) {
// Echo exit codes.
echo "Exit codes for each behat run: " . PHP_EOL;
foreach ($exitcodes as $run => $exitcode) {
echo $run . ": " . $exitcode . PHP_EOL;
// Command to execute behat run.
$cmds[BEHAT_PARALLEL_SITE_NAME . $i] = $behatcommand . ' --config ' . $behatconfigpath . " " . $myopts;
echo "[" . BEHAT_PARALLEL_SITE_NAME . $i . "] " . $cmds[BEHAT_PARALLEL_SITE_NAME . $i] . PHP_EOL;
}
// Show failed re-run commands.
if ($status) {
echo "To re-run failed processes, you can use following commands:" . PHP_EOL;
foreach ($cmds as $name => $cmd) {
if (!empty($exitcodes[$name])) {
echo "[" . $name . "] " . $cmd . PHP_EOL;
if (empty($cmds)) {
echo "No commands to execute " . PHP_EOL;
exit(1);
}
// Create site symlink if necessary.
if (!behat_config_manager::create_parallel_site_links($options['fromrun'], $options['torun'])) {
echo "Check permissions. If on windows, make sure you are running this command as admin" . PHP_EOL;
exit(1);
}
// Save torun and from run, so it can be used to detect if it was executed in last run.
behat_config_manager::set_behat_run_config_value('lasttorun', $options['torun']);
behat_config_manager::set_behat_run_config_value('lastfromrun', $options['fromrun']);
// Keep no delay by default, between each parallel, let user decide.
if (!defined('BEHAT_PARALLEL_START_DELAY')) {
define('BEHAT_PARALLEL_START_DELAY', 0);
}
// Execute all commands, relative to moodle root directory.
$processes = cli_execute_parallel($cmds, __DIR__ . "/../../../../", BEHAT_PARALLEL_START_DELAY);
$stoponfail = empty($options['stop-on-failure']) ? false : true;
// Print header.
print_process_start_info($processes);
// Print combined run o/p from processes.
$exitcodes = print_combined_run_output($processes, $stoponfail);
// Time to finish run.
$time = round(microtime(true) - $time, 1);
echo "Finished in " . gmdate("G\h i\m s\s", $time) . PHP_EOL . PHP_EOL;
ksort($exitcodes);
// Print exit info from each run.
// Status bits contains pass/fail status of parallel runs.
foreach ($exitcodes as $name => $exitcode) {
if ($exitcode) {
$runno = str_replace(BEHAT_PARALLEL_SITE_NAME, '', $name);
$status |= (1 << ($runno - 1));
}
}
// Print each process information.
print_each_process_info($processes, $verbose, $status);
}
// Save final exit code containing which run failed.
behat_config_manager::set_behat_run_config_value('lastcombinedfailedstatus', $status);
// Show exit code from each process, if any process failed and how to rerun failed process.
if ($verbose || $status) {
// Check if status of last run is failure and rerun is suggested.
if (!empty($options['auto-rerun']) && $status) {
// Rerun for the number of tries passed.
for ($i = 0; $i < $options['auto-rerun']; $i++) {
// Run individual commands, to avoid parallel failures.
foreach ($exitcodes as $behatrunname => $exitcode) {
// If not failed in last run, then skip.
if ($exitcode == 0) {
continue;
}
// This was a failure.
echo "*** Re-running behat run: $behatrunname ***" . PHP_EOL;
if ($verbose) {
echo "Executing: " . $cmds[$behatrunname] . " --rerun" . PHP_EOL;
}
passthru("php $cmds[$behatrunname] --rerun", $rerunstatus);
// Update exit code.
$exitcodes[$behatrunname] = $rerunstatus;
}
}
// Update status after auto-rerun finished.
foreach ($exitcodes as $name => $exitcode) {
if ($exitcode) {
if (!empty($parallelrun)) {
$runno = str_replace(BEHAT_PARALLEL_SITE_NAME, '', $name);
} else {
$runno = 1;
}
$status |= (1 << ($runno - 1));
}
}
}
// Show final o/p with re-run commands.
if ($status) {
if (!empty($parallelrun)) {
// Echo exit codes.
echo "Exit codes for each behat run: " . PHP_EOL;
foreach ($exitcodes as $run => $exitcode) {
echo $run . ": " . $exitcode . PHP_EOL;
}
unset($extraopts['fromrun']);
unset($extraopts['torun']);
if (!empty($options['replace'])) {
$extraopts['replace'] = '--replace="' . $options['replace'] . '"';
}
}
echo "To re-run failed processes, you can use following command:" . PHP_EOL;
$extraopts['rerun'] = '--rerun';
$extraoptstr = implode(' ', $extraopts);
echo behat_command::get_behat_command(true, true, true) . " " . $extraoptstr . PHP_EOL;
}
echo PHP_EOL;
}
print_each_process_info($processes, $verbose);
// Remove site symlink if necessary.
behat_config_manager::drop_parallel_site_links();
@@ -364,23 +476,47 @@ function print_combined_run_output($processes, $stoponfail = false) {
* @param array $processes list of processes to loop though.
* @param bool $verbose Show verbose output for each process.
*/
function print_each_process_info($processes, $verbose = false) {
function print_each_process_info($processes, $verbose = false, $status = 0) {
foreach ($processes as $name => $process) {
echo "**************** [" . $name . "] ****************" . PHP_EOL;
if ($verbose) {
echo $process->getOutput();
echo $process->getErrorOutput();
} else {
$op = explode(PHP_EOL, $process->getOutput());
foreach ($op as $line) {
// Don't print progress .
if (trim($line) && (strpos($line, '.') !== 0) && (strpos($line, 'Moodle ') !== 0) &&
(strpos($line, 'Server OS ') !== 0) && (strpos($line, 'Started at ') !== 0) &&
(strpos($line, 'Browser specific fixes ') !== 0)) {
echo $line . PHP_EOL;
}
} else if ($status) {
// Only show failed o/p.
$runno = str_replace(BEHAT_PARALLEL_SITE_NAME, '', $name);
if ((1 << ($runno - 1)) & $status) {
echo $process->getOutput();
echo $process->getErrorOutput();
} else {
echo get_status_lines_from_run_op($process);
}
} else {
echo get_status_lines_from_run_op($process);
}
echo PHP_EOL;
}
}
/**
* Extract status information from behat o/p and return.
* @param Symfony\Component\Process\Process $process
* @return string
*/
function get_status_lines_from_run_op(Symfony\Component\Process\Process $process) {
$statusstr = '';
$op = explode(PHP_EOL, $process->getOutput());
foreach ($op as $line) {
// Don't print progress .
if (trim($line) && (strpos($line, '.') !== 0) && (strpos($line, 'Moodle ') !== 0) &&
(strpos($line, 'Server OS ') !== 0) && (strpos($line, 'Started at ') !== 0) &&
(strpos($line, 'Browser specific fixes ') !== 0)) {
$statusstr .= $line . PHP_EOL;
}
}
return $statusstr;
}
+42 -6
View File
@@ -36,11 +36,7 @@ define('NO_OUTPUT_BUFFERING', true);
define('IGNORE_COMPONENT_CACHE', true);
define('ABORT_AFTER_CONFIG', true);
require_once(__DIR__ . '/../../../../config.php');
require_once(__DIR__ . '/../../../../lib/clilib.php');
require_once(__DIR__ . '/../../../../lib/behat/lib.php');
require_once(__DIR__ . '/../../../../lib/behat/classes/behat_command.php');
require_once(__DIR__ . '/../../../../lib/behat/classes/behat_config_manager.php');
// CLI options.
list($options, $unrecognized) = cli_get_params(
@@ -103,14 +99,26 @@ if (!empty($options['help'])) {
$cwd = getcwd();
// If Behat parallel site is being initiliased, then define a param to be used to ignore single run install.
if (!empty($options['parallel'])) {
define('BEHAT_PARALLEL_UTIL', true);
}
require_once(__DIR__ . '/../../../../config.php');
require_once(__DIR__ . '/../../../../lib/behat/lib.php');
require_once(__DIR__ . '/../../../../lib/behat/classes/behat_command.php');
require_once(__DIR__ . '/../../../../lib/behat/classes/behat_config_manager.php');
// For drop option check if parallel site.
if ((empty($options['parallel'])) && ($options['drop']) || $options['updatesteps']) {
// Get parallel run info from first run.
$options['parallel'] = behat_config_manager::get_parallel_test_runs($options['fromrun']);
$options['parallel'] = behat_config_manager::get_behat_run_config_value('parallel');
}
// If not a parallel site then open single run.
if (empty($options['parallel'])) {
// Set run config value for single run.
behat_config_manager::set_behat_run_config_value('singlerun', 1);
chdir(__DIR__);
// Check if behat is initialised, if not exit.
passthru("php util_single_run.php --diag", $status);
@@ -147,6 +155,21 @@ if ($options['diag'] || $options['enable'] || $options['disable']) {
$status = (bool)$status || (bool)$exitcode;
}
// Remove run config file.
$behatrunconfigfile = behat_config_manager::get_behat_run_config_file_path();
if (file_exists($behatrunconfigfile)) {
if (!unlink($behatrunconfigfile)) {
behat_error(BEHAT_EXITCODE_PERMISSIONS, 'Can not delete behat run config file');
}
}
// Remove test file path.
if (file_exists(behat_util::get_test_file_path())) {
if (!unlink(behat_util::get_test_file_path())) {
behat_error(BEHAT_EXITCODE_PERMISSIONS, 'Can not delete test file enable info');
}
}
} else if ($options['install']) {
// This is intensive compared to behat itself so run them in chunk if option maxruns not set.
if ($options['maxruns']) {
@@ -233,6 +256,19 @@ if ($options['install']) {
} else if ($options['enable']) {
echo "Acceptance tests environment enabled on $CFG->behat_wwwroot, to run the tests use:" . PHP_EOL;
echo behat_command::get_behat_command(true, true);
// Save fromrun and to run information.
if (isset($options['fromrun'])) {
behat_config_manager::set_behat_run_config_value('fromrun', $options['fromrun']);
}
if (isset($options['torun'])) {
behat_config_manager::set_behat_run_config_value('torun', $options['torun']);
}
if (isset($options['parallel'])) {
behat_config_manager::set_behat_run_config_value('parallel', $options['parallel']);
}
echo PHP_EOL;
} else if ($options['disable']) {
+3 -6
View File
@@ -143,7 +143,7 @@ if ($options['run']) {
$run = $options['run'];
// If parallel option is not passed, then try get it form config.
if (!$options['parallel']) {
$parallel = behat_config_manager::get_parallel_test_runs();
$parallel = behat_config_manager::get_behat_run_config_value('parallel');
} else {
$parallel = $options['parallel'];
}
@@ -176,10 +176,7 @@ if ($options['install']) {
} else if ($options['enable']) {
if (!empty($parallel)) {
// Save parallel site info for enable and install options.
$filepath = behat_config_manager::get_parallel_test_file_path();
if (!file_put_contents($filepath, $parallel)) {
behat_error(BEHAT_EXITCODE_PERMISSIONS, 'File ' . $filepath . ' can not be created');
}
behat_config_manager::set_behat_run_config_value('behatsiteenabled', 1);
}
// Enable test mode.
@@ -200,7 +197,7 @@ if ($options['install']) {
}
} else if ($options['disable']) {
behat_util::stop_test_mode();
behat_util::stop_test_mode($run);
// This is only displayed once for parallel install.
if (empty($run)) {
mtrace("Acceptance tests environment disabled");
@@ -7,8 +7,7 @@ Feature: Forms manipulation
@javascript
Scenario: Basic forms manipulation
Given I log in as "admin"
And I follow "Preferences" in the user menu
And I click on "Edit profile" "link" in the "region-main" "region"
And I open my profile in edit mode
When I set the field "First name" to "Field value"
And I set the field "Select a country" to "Japan"
And I set the field "New password" to "TestPass"
@@ -10,8 +10,7 @@ Feature: Transform steps arguments
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And I log in as "admin"
And I follow "Preferences" in the user menu
And I click on "Edit profile" "link" in the "region-main" "region"
And I open my profile in edit mode
Scenario: Use nasty strings on steps arguments
When I set the field "Surname" to "$NASTYSTRING1"
+1 -1
View File
@@ -99,7 +99,7 @@ class competency extends persistent {
// Description.
$mform->addElement('editor', 'description',
get_string('description', 'tool_lp'), array('rows' => 4));
$mform->setType('description', PARAM_RAW);
$mform->setType('description', PARAM_CLEANHTML);
// ID number.
$mform->addElement('text', 'idnumber', get_string('idnumber', 'tool_lp'), 'maxlength="100"');
$mform->setType('idnumber', PARAM_RAW);
@@ -62,7 +62,7 @@ class competency_framework extends persistent {
// Description.
$mform->addElement('editor', 'description',
get_string('description', 'tool_lp'), array('rows' => 4));
$mform->setType('description', PARAM_RAW);
$mform->setType('description', PARAM_CLEANHTML);
// ID number.
$mform->addElement('text', 'idnumber', get_string('idnumber', 'tool_lp'), 'maxlength="100"');
$mform->setType('idnumber', PARAM_RAW);
@@ -184,8 +184,14 @@ abstract class persistent extends moodleform {
$data = $this->get_persistent()->to_record();
$class = static::$persistentclass;
$properties = $class::get_formatted_properties();
$allproperties = $class::properties_definition();
foreach ($data as $field => $value) {
// Clean data if it is to be displayed in a form.
if (isset($allproperties[$field]['type'])) {
$data->$field = clean_param($data->$field, $allproperties[$field]['type']);
}
// Convert formatted properties.
if (isset($properties[$field])) {
$data->$field = array(
+1 -1
View File
@@ -59,7 +59,7 @@ class plan extends persistent {
$mform->addRule('name', get_string('maximumchars', '', 100), 'maxlength', 100, 'client');
// Description.
$mform->addElement('editor', 'description', get_string('plandescription', 'tool_lp'), array('rows' => 4));
$mform->setType('description', PARAM_RAW);
$mform->setType('description', PARAM_CLEANHTML);
$mform->addElement('date_time_selector', 'duedate', get_string('duedate', 'tool_lp'), array('optional' => true));
$mform->addHelpButton('duedate', 'duedate', 'tool_lp');
+1 -1
View File
@@ -58,7 +58,7 @@ class template extends persistent {
// Description.
$mform->addElement('editor', 'description',
get_string('description', 'tool_lp'), array('rows' => 4));
$mform->setType('description', PARAM_RAW);
$mform->setType('description', PARAM_CLEANHTML);
$mform->addElement('selectyesno', 'visible',
get_string('visible', 'tool_lp'));
$mform->addElement('date_time_selector',
+1 -1
View File
@@ -54,7 +54,7 @@ class user_evidence extends persistent {
$mform->addRule('name', get_string('maximumchars', '', 100), 'maxlength', 100, 'client');
// Description.
$mform->addElement('editor', 'description', get_string('userevidencedescription', 'tool_lp'), array('rows' => 10));
$mform->setType('description', PARAM_RAW);
$mform->setType('description', PARAM_CLEANHTML);
$mform->addElement('url', 'url', get_string('userevidenceurl', 'tool_lp'), array('size' => '60'), array('usefilepicker' => false));
$mform->setType('url', PARAM_RAW_TRIMMED); // Can not use PARAM_URL, it silently converts bad URLs to ''.
@@ -93,7 +93,7 @@ require(['core/str'], function(Str) {
{ key: 'comments', component: 'moodle' },
{ key: 'commentscount', component: 'moodle' },
{ key: 'commentsrequirelogin', component: 'moodle' },
{ key: 'deletecomment', component: 'moodle' },
{ key: 'deletecommentbyon', component: 'moodle' },
]).then(function() {
// Kick off when strings are loaded.
Y.use('core_comment', function(Y) {
+1 -1
View File
@@ -46,4 +46,4 @@ $string['pluginname'] = 'Moodle Mobile tools';
$string['smartappbanners'] = 'Smart App Banners (iOS only)';
$string['pluginnotenabledorconfigured'] = 'Plugin not enabled or configured.';
$string['typeoflogin'] = 'Type of login';
$string['typeoflogin_desc'] = 'Choose the type of login.';
$string['typeoflogin_desc'] = 'If the site uses a SSO authentication method, then select via a browser window or via an embedded browser. An embedded browser provides a better user experience, though it doesn\'t work with all SSO plugins. If using SSO, autologinguests should be disabled.';
@@ -53,10 +53,13 @@ class eventobservers {
* @param \core\event\course_deleted $event The course deleted event.
*/
public static function course_deleted(\core\event\course_deleted $event) {
// Delete rules defined inside this course and associated subscriptions.
$rules = rule_manager::get_rules_by_courseid($event->courseid, 0, 0, false);
foreach ($rules as $rule) {
rule_manager::delete_rule($rule->id, $event->get_context());
}
// Delete remaining subscriptions inside this course (from site-wide rules).
subscription_manager::remove_all_subscriptions_in_course($event->get_context());
}
/**
+6 -2
View File
@@ -176,8 +176,12 @@ class subscription {
if (empty($courseid)) {
return get_string('site');
} else {
$course = get_course($courseid);
return format_string($course->fullname, true, array('context' => $context));
try {
$course = get_course($courseid);
return format_string($course->fullname, true, array('context' => $context));
} catch (\dml_exception $e) {
return '-';
}
}
}
@@ -118,9 +118,10 @@ class subscription_manager {
// If successful trigger a subscription_deleted event.
if ($success) {
if (!empty($subscription->courseid)) {
if (!empty($subscription->courseid) &&
($coursecontext = \context_course::instance($subscription->courseid, IGNORE_MISSING))) {
$courseid = $subscription->courseid;
$context = \context_course::instance($subscription->courseid);
$context = $coursecontext;
} else {
$courseid = 0;
$context = \context_system::instance();
@@ -222,6 +223,31 @@ class subscription_manager {
return $success;
}
/**
* Delete all subscriptions in a course.
*
* This is called after a course was deleted, context no longer exists but we kept the object
*
* @param \context_course $coursecontext the context of the course
*/
public static function remove_all_subscriptions_in_course($coursecontext) {
global $DB;
// Store all the subscriptions we have to delete.
if ($subscriptions = $DB->get_records('tool_monitor_subscriptions', ['courseid' => $coursecontext->instanceid])) {
// Delete subscriptions in bulk.
$DB->delete_records('tool_monitor_subscriptions', ['courseid' => $coursecontext->instanceid]);
// Trigger events one by one.
foreach ($subscriptions as $subscription) {
$params = ['objectid' => $subscription->id, 'context' => $coursecontext];
$event = \tool_monitor\event\subscription_deleted::create($params);
$event->add_record_snapshot('tool_monitor_subscriptions', $subscription);
$event->trigger();
}
}
}
/**
* Get a subscription instance for an given subscription id.
*
+17
View File
@@ -80,5 +80,22 @@ function xmldb_tool_monitor_upgrade($oldversion) {
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2016120501) {
// Delete "orphaned" subscriptions.
$sql = "SELECT DISTINCT s.courseid
FROM {tool_monitor_subscriptions} s
LEFT OUTER JOIN {course} c ON c.id = s.courseid
WHERE s.courseid <> 0 and c.id IS NULL";
$deletedcourses = $DB->get_field_sql($sql);
if ($deletedcourses) {
list($sql, $params) = $DB->get_in_or_equal($deletedcourses);
$DB->execute("DELETE FROM {tool_monitor_subscriptions} WHERE courseid " . $sql, $params);
}
// Monitor savepoint reached.
upgrade_plugin_savepoint(true, 2016120501, 'tool', 'monitor');
}
return true;
}
+1 -1
View File
@@ -41,7 +41,7 @@ if (empty($courseid)) {
// check system level capability.
if (!has_capability('tool/monitor:subscribe', $context)) {
// If not system level then check to see if they have access to any course level rules.
if (tool_monitor_get_user_courses()){
if (tool_monitor_can_subscribe()) {
// Make them choose a course.
$choose = true;
} else {
+27 -3
View File
@@ -75,12 +75,20 @@ function tool_monitor_extend_navigation_frontpage($navigation, $course, $context
* @param context $coursecontext The context of the course
*/
function tool_monitor_extend_navigation_user_settings($navigation, $user, $usercontext, $course, $coursecontext) {
global $USER, $SITE;
global $USER, $PAGE;
// Don't bother doing needless calculations unless we are on the relevant pages.
$onpreferencepage = $PAGE->url->compare(new moodle_url('/user/preferences.php'), URL_MATCH_BASE);
$onmonitorpage = $PAGE->url->compare(new moodle_url('/admin/tool/monitor/index.php'), URL_MATCH_BASE);
if (!$onpreferencepage && !$onmonitorpage) {
return null;
}
// Don't show the setting if the event monitor isn't turned on. No access to other peoples subscriptions.
if (get_config('tool_monitor', 'enablemonitor') && $USER->id == $user->id) {
// Now let's check to see if the user has any courses / site rules that they can subscribe to.
if ($courses = tool_monitor_get_user_courses()) {
// We skip doing a check here if we are on the event monitor page as the check is done internally on that page.
if ($onmonitorpage || tool_monitor_can_subscribe()) {
$url = new moodle_url('/admin/tool/monitor/index.php');
$subsnode = navigation_node::create(get_string('managesubscriptions', 'tool_monitor'), $url,
navigation_node::TYPE_SETTING, null, 'monitor', new pix_icon('i/settings', ''));
@@ -92,6 +100,19 @@ function tool_monitor_extend_navigation_user_settings($navigation, $user, $userc
}
}
/**
* Check if the user has the capacity to subscribe to an event monitor anywhere.
*
* @return bool True if a capability in a course is found. False otherwise.
*/
function tool_monitor_can_subscribe() {
if (has_capability('tool/monitor:subscribe', context_system::instance())) {
return true;
}
$courses = get_user_capability_course('tool/monitor:subscribe', null, true, '', '', 1);
return empty($courses) ? false : true;
}
/**
* Get a list of courses and also include 'Site' for site wide rules.
*
@@ -103,8 +124,11 @@ function tool_monitor_get_user_courses() {
if (has_capability('tool/monitor:subscribe', context_system::instance())) {
$options[0] = get_string('site');
}
if ($courses = get_user_capability_course('tool/monitor:subscribe', null, true, 'fullname, visible', $orderby)) {
$fields = 'fullname, visible, ctxid, ctxpath, ctxdepth, ctxlevel, ctxinstance';
if ($courses = get_user_capability_course('tool/monitor:subscribe', null, true, $fields, $orderby)) {
foreach ($courses as $course) {
context_helper::preload_from_record($course);
$coursectx = context_course::instance($course->id);
if ($course->visible || has_capability('moodle/course:viewhiddencourses', $coursectx)) {
$options[$course->id] = format_string($course->fullname, true, array('context' => $coursectx));
@@ -103,7 +103,7 @@ Feature: tool_monitor_subscriptions
Given I log in as "admin"
And I follow "Preferences" in the user menu
And I click on "Notification preferences" "link" in the "#page-content" "css_element"
And I click on ".preference-state" "css_element" in the "Notifications of rule subscriptions" "table_row"
And I click on "//td[@data-processor-name='popup']//label[@class='preference-state']" "xpath_element" in the "Notifications of rule subscriptions" "table_row"
And I wait until the page is ready
And I follow "Preferences" in the user menu
And I follow "Event monitoring"
@@ -124,7 +124,7 @@ Feature: tool_monitor_subscriptions
Given I log in as "teacher1"
And I follow "Preferences" in the user menu
And I click on "Notification preferences" "link" in the "#page-content" "css_element"
And I click on ".preference-state" "css_element" in the "Notifications of rule subscriptions" "table_row"
And I click on "//td[@data-processor-name='popup']//label[@class='preference-state']" "xpath_element" in the "Notifications of rule subscriptions" "table_row"
And I wait until the page is ready
And I follow "Preferences" in the user menu
And I follow "Event monitoring"
+1 -1
View File
@@ -26,6 +26,6 @@
defined('MOODLE_INTERNAL') || die;
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX).
$plugin->version = 2016120501; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2016112900; // Requires this Moodle version.
$plugin->component = 'tool_monitor'; // Full name of the plugin (used for diagnostics).
@@ -70,7 +70,7 @@ class tool_templatelibrary_external_testcase extends externallib_advanced_testca
$originaltheme = $CFG->theme;
// Change the theme to 'base' because it overrides these templates.
$CFG->theme = 'base';
$CFG->theme = 'boost';
$template = external::load_canonical_template('core', 'notification_error');
+1 -1
View File
@@ -118,7 +118,7 @@ class tool_usertours_manager_testcase extends advanced_testcase {
$rcm = $rc->getMethod($function);
$rcm->setAccessible(true);
$this->setExpectedException('moodle_exception', 'A required parameter (sesskey) was missing');
$this->expectException('moodle_exception');
$rcm->invokeArgs($manager, $arguments);
}
+24 -2
View File
@@ -99,9 +99,31 @@ if (!isset($config->removeuser)) {
$yesno = array( get_string('no'), get_string('yes') );
$disabled = '';
if (!ldap_paged_results_supported($config->ldap_version)) {
$pagedresultssupported = false;
if ($config->host_url !== '') {
/**
* We try to connect each and every time we open the config, because we want to set the Page
* Size setting as enabled or disabled depending on the configured LDAP server supporting
* pagination or not, and to notify the user about it. If the user changed the LDAP server (or
* the LDAP protocol version) last time, it might happen that paged results are no longer
* available and we want to show that to the user the next time she goes to the settings page.
*/
try {
$ldapconn = $this->ldap_connect();
$pagedresultssupported = ldap_paged_results_supported($config->ldap_version, $ldapconn);
} catch (Exception $e) {
// If we couldn't connect and get the supported options, we can only assume we don't support paged results.
$pagedresultssupported = false;
}
}
/* Make sure we only disable the paged result size setting and show the notification about it if
* there is a configured server that we tried to contact. Othersiwe, if someone's LDAP server does
* support paged results, they won't be able to turn it on the first time they set it up (because
* the field will be disabled).
*/
if (($config->host_url !== '') && (!$pagedresultssupported)) {
$disabled = ' disabled="disabled"';
echo $OUTPUT->notification(get_string('pagedresultsnotsupp', 'auth_ldap'));
echo $OUTPUT->notification(get_string('pagedresultsnotsupp', 'auth_ldap'), \core\output\notification::NOTIFY_INFO);
}
?>
+4
View File
@@ -286,6 +286,10 @@ class auth_email_external extends external_api {
// Validate the data sent.
$data = $params;
$data['email2'] = $data['email'];
// Force policy agreed if a site policy is set. The client is responsible of implementing the interface check.
if (!empty($CFG->sitepolicy)) {
$data['policyagreed'] = 1;
}
unset($data['recaptcharesponse']);
unset($data['customprofilefields']);
// Add profile fields data.
+2 -2
View File
@@ -695,7 +695,7 @@ class auth_plugin_ldap extends auth_plugin_base {
array_push($contexts, $this->config->create_context);
}
$ldap_pagedresults = ldap_paged_results_supported($this->config->ldap_version);
$ldap_pagedresults = ldap_paged_results_supported($this->config->ldap_version, $ldapconnection);
$ldap_cookie = '';
foreach ($contexts as $context) {
$context = trim($context);
@@ -1540,7 +1540,7 @@ class auth_plugin_ldap extends auth_plugin_base {
}
$ldap_cookie = '';
$ldap_pagedresults = ldap_paged_results_supported($this->config->ldap_version);
$ldap_pagedresults = ldap_paged_results_supported($this->config->ldap_version, $ldapconnection);
foreach ($contexts as $context) {
$context = trim($context);
if (empty($context)) {
+24 -2
View File
@@ -117,9 +117,31 @@ $fastpathoptions = array(AUTH_NTLM_FASTPATH_YESFORM => get_string('auth_ntlmsso_
AUTH_NTLM_FASTPATH_ATTEMPT => get_string('auth_ntlmsso_ie_fastpath_attempt', 'auth_ldap'));
$disabled = '';
if (!ldap_paged_results_supported($config->ldap_version)) {
$pagedresultssupported = false;
if ($config->host_url !== '') {
/**
* We try to connect each and every time we open the config, because we want to set the Page
* Size setting as enabled or disabled depending on the configured LDAP server supporting
* pagination or not, and to notify the user about it. If the user changed the LDAP server (or
* the LDAP protocol version) last time, it might happen that paged results are no longer
* available and we want to show that to the user the next time she goes to the settings page.
*/
try {
$ldapconn = $this->ldap_connect();
$pagedresultssupported = ldap_paged_results_supported($config->ldap_version, $ldapconn);
} catch (Exception $e) {
// If we couldn't connect and get the supported options, we can only assume we don't support paged results.
$pagedresultssupported = false;
}
}
/* Make sure we only disable the paged result size setting and show the notification about it if
* there is a configured server that we tried to contact. Othersiwe, if someone's LDAP server does
* support paged results, they won't be able to turn it on the first time they set it up (because
* the field will be disabled).
*/
if (($config->host_url !== '') && (!$pagedresultssupported)) {
$disabled = ' disabled="disabled"';
echo $OUTPUT->notification(get_string('pagedresultsnotsupp', 'auth_ldap'));
echo $OUTPUT->notification(get_string('pagedresultsnotsupp', 'auth_ldap'), \core\output\notification::NOTIFY_INFO);
}
?>
+1 -1
View File
@@ -132,7 +132,7 @@ $string['ntlmsso_attempting'] = 'Attempting Single Sign On via NTLM...';
$string['ntlmsso_failed'] = 'Auto-login failed, try the normal login page...';
$string['ntlmsso_isdisabled'] = 'NTLM SSO is disabled.';
$string['ntlmsso_unknowntype'] = 'Unknown ntlmsso type!';
$string['pagedresultsnotsupp'] = 'LDAP paged results not supported (either your PHP version lacks support or you have configured Moodle to use LDAP protocol version 2)';
$string['pagedresultsnotsupp'] = 'LDAP paged results not supported (either your PHP version lacks support, you have configured Moodle to use LDAP protocol version 2 or Moodle cannot contact your LDAP server to see if paged support is available.)';
$string['pagesize'] = 'Make sure this value is smaller than your LDAP server result set size limit (the maximum number of entries that can be returned in a single query)';
$string['pagesize_key'] = 'Page size';
$string['pluginname'] = 'LDAP server';
+12 -3
View File
@@ -2670,7 +2670,7 @@ class restore_calendarevents_structure_step extends restore_structure_step {
'courseid' => $this->get_courseid(),
'groupid' => $data->groupid,
'userid' => $data->userid,
'repeatid' => $data->repeatid,
'repeatid' => $this->get_mappingid('event', $data->repeatid),
'modulename' => $data->modulename,
'eventtype' => $data->eventtype,
'timestart' => $this->apply_date_offset($data->timestart),
@@ -2688,18 +2688,27 @@ class restore_calendarevents_structure_step extends restore_structure_step {
FROM {event}
WHERE " . $DB->sql_compare_text('name', 255) . " = " . $DB->sql_compare_text('?', 255) . "
AND courseid = ?
AND repeatid = ?
AND modulename = ?
AND timestart = ?
AND timeduration = ?
AND " . $DB->sql_compare_text('description', 255) . " = " . $DB->sql_compare_text('?', 255);
$arg = array ($params['name'], $params['courseid'], $params['repeatid'], $params['modulename'], $params['timestart'], $params['timeduration'], $params['description']);
$arg = array ($params['name'], $params['courseid'], $params['modulename'], $params['timestart'], $params['timeduration'], $params['description']);
$result = $DB->record_exists_sql($sql, $arg);
if (empty($result)) {
$newitemid = $DB->insert_record('event', $params);
$this->set_mapping('event', $oldid, $newitemid);
$this->set_mapping('event_description', $oldid, $newitemid, $restorefiles);
}
// With repeating events, each event has the repeatid pointed at the first occurrence.
// Since the repeatid will be empty when the first occurrence is restored,
// Get the repeatid from the second occurrence of the repeating event and use that to update the first occurrence.
// Then keep a list of repeatids so we only perform this update once.
static $repeatids = array();
if (!empty($params['repeatid']) && !in_array($params['repeatid'], $repeatids)) {
// This entry is repeated so the repeatid field must be set.
$DB->set_field('event', 'repeatid', $params['repeatid'], array('id' => $params['repeatid']));
$repeatids[] = $params['repeatid'];
}
}
protected function after_execute() {
+1 -1
View File
@@ -519,7 +519,7 @@ class core_backup_renderer extends plugin_renderer_base {
$method = 'get';
}
$url->param('sesskey', sesskey());
$button = new single_button($url, get_string('continue'), $method);
$button = new single_button($url, get_string('continue'), $method, true);
$button->class = 'continuebutton';
return $this->render($button);
}
+1 -1
View File
@@ -50,7 +50,7 @@ $PAGE->set_context($context);
$title = get_string('backpackdetails', 'badges');
$PAGE->set_title($title);
$PAGE->set_heading(fullname($USER));
$PAGE->set_pagelayout('mydashboard');
$PAGE->set_pagelayout('standard');
$backpack = $DB->get_record('badge_backpack', array('userid' => $USER->id));
$badgescache = cache::make('core', 'externalbadges');
+1 -1
View File
@@ -89,7 +89,7 @@ $PAGE->set_context($context);
$title = get_string('badges', 'badges');
$PAGE->set_title($title);
$PAGE->set_heading(fullname($USER));
$PAGE->set_pagelayout('mydashboard');
$PAGE->set_pagelayout('standard');
// Include JS files for backpack support.
badges_setup_backpack_js();
+3 -2
View File
@@ -26,6 +26,7 @@
require_once(__DIR__ . '/../config.php');
require_once('preferences_form.php');
require_once($CFG->dirroot.'/user/editlib.php');
$url = new moodle_url('/badges/preferences.php');
@@ -42,8 +43,8 @@ $mform = new badges_preferences_form();
$mform->set_data(array('badgeprivacysetting' => get_user_preferences('badgeprivacysetting')));
if (!$mform->is_cancelled() && $data = $mform->get_data()) {
$setting = $data->badgeprivacysetting;
set_user_preference('badgeprivacysetting', $setting);
useredit_update_user_preference(['id' => $USER->id,
'preference_badgeprivacysetting' => $data->badgeprivacysetting]);
}
if ($mform->is_cancelled()) {
+1 -3
View File
@@ -30,9 +30,7 @@ Feature: Award badges
And I should not see "Criteria for this badge have not been set up yet."
And I press "Enable access"
And I press "Continue"
And I click on "Admin User" "link"
And I choose "Profile" in the open action menu
And I click on "Edit profile" "link" in the "region-main" "region"
And I open my profile in edit mode
And I expand all fieldsets
And I set the field "Phone" to "123456789"
And I press "Update profile"
+1
View File
@@ -52,6 +52,7 @@ class block_activity_results_edit_form extends block_edit_form {
$sql = 'SELECT id, itemname FROM {grade_items} WHERE courseid = ? and itemtype = ? and (gradetype = ? or gradetype = ?)';
$params = array($this->page->course->id, 'mod', GRADE_TYPE_VALUE, GRADE_TYPE_SCALE);
$activities = $DB->get_records_sql_menu($sql, $params);
core_collator::asort($activities);
if (empty($activities)) {
$mform->addElement('static', 'noactivitieswarning', get_string('config_select_activity', 'block_activity_results'),
+1 -1
View File
@@ -86,7 +86,7 @@ function block_course_overview_get_myorder() {
// If preference was not found, look in the old location and convert if found.
$order = array();
if ($value = get_user_preferences('course_overview_course_order')) {
$order = unserialize($value);
$order = unserialize_array($value);
block_course_overview_update_myorder($order);
unset_user_preference('course_overview_course_order');
}
+4
View File
@@ -1,6 +1,10 @@
This files describes API changes in /blocks/* - activity modules,
information provided here is intended especially for developers.
=== 3.2.2 ===
* block_manager::get_required_by_theme_block_types() is no longer static.
=== 3.1 ===
* The collapsed class was removed from the navigation block to make it compatible with aria.
+3 -1
View File
@@ -27,6 +27,7 @@
require_once('../config.php');
require_once($CFG->dirroot.'/blog/lib.php');
require_once('preferences_form.php');
require_once($CFG->dirroot.'/user/editlib.php');
$courseid = optional_param('courseid', SITEID, PARAM_INT);
$modid = optional_param('modid', null, PARAM_INT);
@@ -81,7 +82,8 @@ if (!$mform->is_cancelled() && $data = $mform->get_data()) {
if ($pagesize < 1) {
print_error('invalidpagesize');
}
set_user_preference('blogpagesize', $pagesize);
useredit_update_user_preference(['id' => $USER->id,
'preference_blogpagesize' => $pagesize]);
}
if ($mform->is_cancelled()) {
+1 -1
View File
@@ -213,7 +213,7 @@ class cache implements cache_loader {
$this->definition = $definition;
$this->store = $store;
$this->storetype = get_class($store);
$this->perfdebug = !empty($CFG->perfdebug);
$this->perfdebug = (!empty($CFG->perfdebug) and $CFG->perfdebug > 7);
if ($loader instanceof cache_loader) {
$this->loader = $loader;
// Mark the loader as a sub (chained) loader.
+53
View File
@@ -2172,4 +2172,57 @@ class core_cache_testcase extends advanced_testcase {
$this->assertEquals(0, $endstats[$requestid]['stores']['cachestore_static']['sets'] -
$startstats[$requestid]['stores']['cachestore_static']['sets']);
}
public function test_performance_debug_off() {
global $CFG;
$this->resetAfterTest(true);
$CFG->perfdebug = 7;
$instance = cache_config_testing::instance();
$applicationid = 'phpunit/applicationperfoff';
$instance->phpunit_add_definition($applicationid, array(
'mode' => cache_store::MODE_APPLICATION,
'component' => 'phpunit',
'area' => 'applicationperfoff'
));
$sessionid = 'phpunit/sessionperfoff';
$instance->phpunit_add_definition($sessionid, array(
'mode' => cache_store::MODE_SESSION,
'component' => 'phpunit',
'area' => 'sessionperfoff'
));
$requestid = 'phpunit/requestperfoff';
$instance->phpunit_add_definition($requestid, array(
'mode' => cache_store::MODE_REQUEST,
'component' => 'phpunit',
'area' => 'requestperfoff'
));
$application = cache::make('phpunit', 'applicationperfoff');
$session = cache::make('phpunit', 'sessionperfoff');
$request = cache::make('phpunit', 'requestperfoff');
// Check that no stats are recorded for these definitions yet.
$stats = cache_helper::get_stats();
$this->assertArrayNotHasKey($applicationid, $stats);
$this->assertArrayNotHasKey($sessionid, $stats);
$this->assertArrayNotHasKey($requestid, $stats);
// Trigger cache misses, cache sets and cache hits.
$this->assertFalse($application->get('missMe'));
$this->assertTrue($application->set('setMe', 1));
$this->assertEquals(1, $application->get('setMe'));
$this->assertFalse($session->get('missMe'));
$this->assertTrue($session->set('setMe', 3));
$this->assertEquals(3, $session->get('setMe'));
$this->assertFalse($request->get('missMe'));
$this->assertTrue($request->set('setMe', 4));
$this->assertEquals(4, $request->get('setMe'));
// Check that no stats are being recorded for these definitions.
$endstats = cache_helper::get_stats();
$this->assertArrayNotHasKey($applicationid, $endstats);
$this->assertArrayNotHasKey($sessionid, $endstats);
$this->assertArrayNotHasKey($requestid, $endstats);
}
}
+22
View File
@@ -3346,3 +3346,25 @@ function calendar_get_calendar_context($subscription) {
}
return $context;
}
/**
* Implements callback user_preferences, whitelists preferences that users are allowed to update directly
*
* Used in {@see core_user::fill_preferences_cache()}, see also {@see useredit_update_user_preference()}
*
* @return array
*/
function core_calendar_user_preferences() {
$preferences = [];
$preferences['calendar_timeformat'] = array('type' => PARAM_NOTAGS, 'null' => NULL_NOT_ALLOWED, 'default' => '0',
'choices' => array('0', CALENDAR_TF_12, CALENDAR_TF_24)
);
$preferences['calendar_startwday'] = array('type' => PARAM_INT, 'null' => NULL_NOT_ALLOWED, 'default' => 0,
'choices' => array(0, 1, 2, 3, 4, 5, 6));
$preferences['calendar_maxevents'] = array('type' => PARAM_INT, 'choices' => range(1, 20));
$preferences['calendar_lookahead'] = array('type' => PARAM_INT, 'null' => NULL_NOT_ALLOWED, 'default' => 365,
'choices' => array(365, 270, 180, 150, 120, 90, 60, 30, 21, 14, 7, 6, 5, 4, 3, 2, 1));
$preferences['calendar_persistflt'] = array('type' => PARAM_INT, 'null' => NULL_NOT_ALLOWED, 'default' => 0,
'choices' => array(0, 1));
return $preferences;
}
+24 -1
View File
@@ -57,6 +57,12 @@ M.core_comment = {
this.view(0);
return false;
}, this);
// Also handle space/enter key.
handle.on('key', function(e) {
e.preventDefault();
this.view(0);
return false;
}, '13,32', this);
}
scope.toggle_textarea(false);
},
@@ -186,7 +192,17 @@ M.core_comment = {
val = val.replace('___name___', list[i].fullname);
}
if (list[i]['delete']||newcmt) {
list[i].content = '<div class="comment-delete"><a href="#" id ="comment-delete-'+this.client_id+'-'+list[i].id+'" title="'+M.util.get_string('deletecomment', 'moodle')+'"><img alt="" src="'+M.util.image_url('t/delete', 'core')+'" /></a></div>' + list[i].content;
var tokens = {
user: list[i].fullname,
time: list[i].time
};
var deleteStr = Y.Escape.html(M.util.get_string('deletecommentbyon', 'moodle', tokens));
list[i].content = '<div class="comment-delete">' +
'<a href="#" role="button" id ="comment-delete-' + this.client_id + '-' + list[i].id + '"' +
' title="' + deleteStr + '">' +
'<img alt="' + deleteStr + '" src="' + M.util.image_url('t/delete', 'core') + '" />' +
'</a>' +
'</div>' + list[i].content;
}
val = val.replace('___time___', list[i].time);
val = val.replace('___picture___', list[i].avatar);
@@ -335,6 +351,7 @@ M.core_comment = {
);
},
view: function(page) {
var commenttoggler = Y.one('#comment-link-' + this.client_id);
var container = Y.one('#comment-ctrl-'+this.client_id);
var ta = Y.one('#dlg-content-'+this.client_id);
var img = Y.one('#comment-img-'+this.client_id);
@@ -351,6 +368,9 @@ M.core_comment = {
if (img) {
img.set('src', M.util.image_url('t/expanded', 'core'));
}
if (commenttoggler) {
commenttoggler.setAttribute('aria-expanded', 'true');
}
} else {
// hide
container.setStyle('display', 'none');
@@ -364,6 +384,9 @@ M.core_comment = {
if (ta) {
ta.set('value','');
}
if (commenttoggler) {
commenttoggler.setAttribute('aria-expanded', 'false');
}
}
if (ta) {
//toggle_textarea.apply(ta, [false]);
+8 -2
View File
@@ -263,7 +263,7 @@ class comment {
'comments',
'commentscount',
'commentsrequirelogin',
'deletecomment',
'deletecommentbyon',
),
'moodle'
);
@@ -460,7 +460,13 @@ class comment {
} else {
$collapsedimage= 't/collapsed';
}
$html .= html_writer::start_tag('a', array('class' => 'comment-link', 'id' => 'comment-link-'.$this->cid, 'href' => '#'));
$html .= html_writer::start_tag('a', array(
'class' => 'comment-link',
'id' => 'comment-link-'.$this->cid,
'href' => '#',
'role' => 'button',
'aria-expanded' => 'false')
);
$html .= html_writer::empty_tag('img', array('id' => 'comment-img-'.$this->cid, 'src' => $OUTPUT->pix_url($collapsedimage), 'alt' => $this->linktext, 'title' => $this->linktext));
$html .= html_writer::tag('span', $this->linktext.' '.$countstring, array('id' => 'comment-link-text-'.$this->cid));
$html .= html_writer::end_tag('a');
+1 -1
View File
@@ -68,7 +68,7 @@ class competency extends persistent {
),
'description' => array(
'default' => '',
'type' => PARAM_RAW
'type' => PARAM_CLEANHTML
),
'descriptionformat' => array(
'choices' => array(FORMAT_HTML, FORMAT_MOODLE, FORMAT_PLAIN, FORMAT_MARKDOWN),
+1 -1
View File
@@ -90,7 +90,7 @@ class competency_framework extends persistent {
'type' => PARAM_RAW
),
'description' => array(
'type' => PARAM_RAW,
'type' => PARAM_CLEANHTML,
'default' => ''
),
'descriptionformat' => array(
+3 -2
View File
@@ -334,7 +334,8 @@ abstract class exporter {
*/
final protected static function get_format_field($definitions, $property) {
$formatproperty = $property . 'format';
if ($definitions[$property]['type'] == PARAM_RAW && isset($definitions[$formatproperty])
if (($definitions[$property]['type'] == PARAM_RAW || $definitions[$property]['type'] == PARAM_CLEANHTML)
&& isset($definitions[$formatproperty])
&& $definitions[$formatproperty]['type'] == PARAM_INT) {
return $formatproperty;
}
@@ -451,7 +452,7 @@ abstract class exporter {
// This is a nested array of more properties.
$thisvalue = self::get_read_structure_from_properties($type, $proprequired, $propdefault);
} else {
if ($definition['type'] == PARAM_TEXT) {
if ($definition['type'] == PARAM_TEXT || $definition['type'] == PARAM_CLEANHTML) {
// PARAM_TEXT always becomes PARAM_RAW because filters may be applied.
$type = PARAM_RAW;
}
+6 -1
View File
@@ -248,7 +248,8 @@ abstract class persistent {
$formatted = array();
foreach ($properties as $property => $definition) {
$propertyformat = $property . 'format';
if ($definition['type'] == PARAM_RAW && array_key_exists($propertyformat, $properties)
if (($definition['type'] == PARAM_RAW || $definition['type'] == PARAM_CLEANHTML)
&& array_key_exists($propertyformat, $properties)
&& $properties[$propertyformat]['type'] == PARAM_INT) {
$formatted[$property] = $propertyformat;
}
@@ -616,6 +617,10 @@ abstract class persistent {
// Validate_param() does not like false with PARAM_BOOL, better to convert it to int.
$value = 0;
}
if ($definition['type'] === PARAM_CLEANHTML) {
// We silently clean for this type. It may introduce changes even to valid data.
$value = clean_param($value, PARAM_CLEANHTML);
}
validate_param($value, $definition['type'], $definition['null']);
} catch (invalid_parameter_exception $e) {
$errors[$property] = static::get_property_error_message($property);
+1 -1
View File
@@ -71,7 +71,7 @@ class plan extends persistent {
'type' => PARAM_TEXT,
),
'description' => array(
'type' => PARAM_RAW,
'type' => PARAM_CLEANHTML,
'default' => ''
),
'descriptionformat' => array(
+1 -1
View File
@@ -53,7 +53,7 @@ class template extends persistent {
),
'description' => array(
'default' => '',
'type' => PARAM_RAW,
'type' => PARAM_CLEANHTML,
),
'descriptionformat' => array(
'choices' => array(FORMAT_HTML, FORMAT_MOODLE, FORMAT_PLAIN, FORMAT_MARKDOWN),
+1 -1
View File
@@ -53,7 +53,7 @@ class user_evidence extends persistent {
'type' => PARAM_TEXT
),
'description' => array(
'type' => PARAM_RAW,
'type' => PARAM_CLEANHTML,
'default' => '',
),
'descriptionformat' => array(
+1
View File
@@ -290,6 +290,7 @@ function core_competency_pluginfile($course, $cm, $context, $filearea, $args, $f
if ($filearea == 'userevidence' && $context->contextlevel == CONTEXT_USER) {
if (user_evidence::can_read_user($context->instanceid)) {
$file = $fs->get_file($context->id, 'core_competency', $filearea, $itemid, $filepath, $filename);
$forcedownload = true;
}
}
+4 -2
View File
@@ -121,13 +121,14 @@ class behat_completion extends behat_base {
public function activity_marked_as_complete($activityname, $activitytype, $completiontype) {
if ($completiontype == "manual") {
$imgalttext = get_string("completion-alt-manual-y", 'core_completion', $activityname);
$xpathtocheck = "//input[@type='image'][contains(@alt, '$imgalttext')]";
} else {
$imgalttext = get_string("completion-alt-auto-y", 'core_completion', $activityname);
$xpathtocheck = "//img[contains(@alt, '$imgalttext')]";
}
$activityxpath = "//li[contains(concat(' ', @class, ' '), ' modtype_" . strtolower($activitytype) . " ')]";
$activityxpath .= "[descendant::*[contains(text(), '" . $activityname . "')]]";
$xpathtocheck = "//img[contains(@alt, '$imgalttext')]";
$this->execute("behat_general::should_exist_in_the",
array($xpathtocheck, "xpath_element", $activityxpath, "xpath_element")
);
@@ -142,13 +143,14 @@ class behat_completion extends behat_base {
public function activity_marked_as_not_complete($activityname, $activitytype, $completiontype) {
if ($completiontype == "manual") {
$imgalttext = get_string("completion-alt-manual-n", 'core_completion', $activityname);
$xpathtocheck = "//input[@type='image'][contains(@alt, '$imgalttext')]";
} else {
$imgalttext = get_string("completion-alt-auto-n", 'core_completion', $activityname);
$xpathtocheck = "//img[contains(@alt, '$imgalttext')]";
}
$activityxpath = "//li[contains(concat(' ', @class, ' '), ' modtype_" . strtolower($activitytype) . " ')]";
$activityxpath .= "[descendant::*[contains(text(), '" . $activityname . "')]]";
$xpathtocheck = "//img[contains(@alt, '$imgalttext')]";
$this->execute("behat_general::should_exist_in_the",
array($xpathtocheck, "xpath_element", $activityxpath, "xpath_element")
);
@@ -25,15 +25,16 @@ Feature: Allow students to manually mark an activity as complete
And I set the following fields to these values:
| Enable completion tracking | Yes |
And I press "Save and display"
When I add a "Forum" to section "1" and I fill the form with:
And I add a "Forum" to section "1" and I fill the form with:
| Forum name | Test forum name |
| Description | Test forum description |
Then "Student First" user has not completed "Test forum name" activity
And "Student First" user has not completed "Test forum name" activity
And I log out
And I log in as "student1"
And I am on site homepage
And I follow "Course 1"
And I press "Mark as complete: Test forum name"
When I press "Mark as complete: Test forum name"
Then the "Test forum name" "forum" activity with "manual" completion should be marked as complete
And I log out
And I log in as "teacher1"
And I am on site homepage
+1 -1
View File
@@ -7,6 +7,6 @@
"require-dev": {
"phpunit/phpunit": "5.5.*",
"phpunit/dbUnit": "1.4.*",
"moodlehq/behat-extension": "3.32.4"
"moodlehq/behat-extension": "3.32.5"
}
}
Generated
+209 -195
View File
File diff suppressed because it is too large Load Diff
+7
View File
@@ -63,6 +63,13 @@ $CFG->dboptions = array(
// support advanced options on connection.
// If you set those in the database then
// the advanced settings will not be sent.
'dbcollation' => 'utf8mb4_unicode_ci', // MySQL has partial and full UTF-8
// support. If you wish to use partial UTF-8
// (three bytes) then set this option to
// 'utf8_unicode_ci', otherwise this option
// can be removed for MySQL (by default it will
// use 'utf8mb4_unicode_ci'. This option should
// be removed for all other databases.
);
+26 -21
View File
@@ -422,7 +422,7 @@ class core_course_management_renderer extends plugin_renderer_base {
'resortcategoriesby',
'name',
false,
array('aria-label' => get_string('selectcategorysortby'))
array('aria-label' => get_string('selectcategorysortby'), 'class' => 'm-t-1')
)
);
$form .= html_writer::div(
@@ -441,15 +441,16 @@ class core_course_management_renderer extends plugin_renderer_base {
'resortcoursesby',
'fullname',
false,
array('aria-label' => get_string('selectcoursesortby'))
array('aria-label' => get_string('selectcoursesortby'), 'class' => 'm-t-1')
)
);
$form .= html_writer::empty_tag('input', array('type' => 'submit', 'name' => 'bulksort', 'value' => get_string('sort')));
$form .= html_writer::empty_tag('input', array('type' => 'submit', 'name' => 'bulksort',
'value' => get_string('sort'), 'class' => 'btn btn-secondary m-y-1'));
$form .= html_writer::end_div();
$html .= html_writer::start_div('detail-pair row yui3-g');
$html .= html_writer::div(html_writer::span(get_string('sorting')), 'pair-key span3 yui3-u-1-4');
$html .= html_writer::div($form, 'pair-value span9 yui3-u-3-4');
$html .= html_writer::start_div('detail-pair row yui3-g m-y-1');
$html .= html_writer::div(html_writer::span(get_string('sorting')), 'pair-key span3 col-md-3 yui3-u-1-4');
$html .= html_writer::div($form, 'pair-value span9 col-md-9 yui3-u-3-4');
$html .= html_writer::end_div();
}
if (coursecat::can_change_parent_any()) {
@@ -463,9 +464,10 @@ class core_course_management_renderer extends plugin_renderer_base {
'movecategoriesto',
'',
array('' => 'choosedots'),
array('aria-labelledby' => 'moveselectedcategoriesto')
array('aria-labelledby' => 'moveselectedcategoriesto', 'class' => 'm-r-1')
);
$submit = array('type' => 'submit', 'name' => 'bulkmovecategories', 'value' => get_string('move'));
$submit = array('type' => 'submit', 'name' => 'bulkmovecategories', 'value' => get_string('move'),
'class' => 'btn btn-secondary');
$html .= $this->detail_pair(
html_writer::span(get_string('moveselectedcategoriesto'), '', array('id' => 'moveselectedcategoriesto')),
$select . html_writer::empty_tag('input', $submit)
@@ -780,9 +782,10 @@ class core_course_management_renderer extends plugin_renderer_base {
'movecoursesto',
'',
array('' => 'choosedots'),
array('aria-labelledby' => 'moveselectedcoursesto')
array('aria-labelledby' => 'moveselectedcoursesto', 'class' => 'm-r-1')
);
$submit = array('type' => 'submit', 'name' => 'bulkmovecourses', 'value' => get_string('move'));
$submit = array('type' => 'submit', 'name' => 'bulkmovecourses', 'value' => get_string('move'),
'class' => 'btn btn-secondary');
$html .= $this->detail_pair(
html_writer::span(get_string('moveselectedcoursesto'), '', array('id' => 'moveselectedcoursesto')),
$select . html_writer::empty_tag('input', $submit)
@@ -808,7 +811,8 @@ class core_course_management_renderer extends plugin_renderer_base {
array('' => 'choosedots'),
array('aria-labelledby' => 'moveselectedcoursesto')
);
$submit = array('type' => 'submit', 'name' => 'bulkmovecourses', 'value' => get_string('move'));
$submit = array('type' => 'submit', 'name' => 'bulkmovecourses', 'value' => get_string('move'),
'class' => 'btn btn-secondary');
$html .= $this->detail_pair(
html_writer::span(get_string('moveselectedcoursesto'), '', array('id' => 'moveselectedcoursesto')),
$select . html_writer::empty_tag('input', $submit)
@@ -847,8 +851,8 @@ class core_course_management_renderer extends plugin_renderer_base {
*/
protected function detail_pair($key, $value, $class ='') {
$html = html_writer::start_div('detail-pair row yui3-g '.preg_replace('#[^a-zA-Z0-9_\-]#', '-', $class));
$html .= html_writer::div(html_writer::span($key), 'pair-key span3 yui3-u-1-4');
$html .= html_writer::div(html_writer::span($value), 'pair-value span9 yui3-u-3-4');
$html .= html_writer::div(html_writer::span($key), 'pair-key span3 col-md-3 yui3-u-1-4');
$html .= html_writer::div(html_writer::span($value), 'pair-value span9 col-md-9 m-b-1 yui3-u-3-4');
$html .= html_writer::end_div();
return $html;
}
@@ -946,7 +950,7 @@ class core_course_management_renderer extends plugin_renderer_base {
public function grid_column_start($size, $id = null, $class = null) {
// Calculate Bootstrap grid sizing.
$bootstrapclass = 'span'.$size;
$bootstrapclass = 'span'.$size.' col-md-'.$size;
// Calculate YUI grid sizing.
if ($size === 12) {
@@ -1322,13 +1326,14 @@ class core_course_management_renderer extends plugin_renderer_base {
$strsearchcourses = get_string("searchcourses");
$searchurl = new moodle_url('/course/management.php');
$output = html_writer::start_tag('form', array('id' => $formid, 'action' => $searchurl, 'method' => 'get'));
$output .= html_writer::start_tag('fieldset', array('class' => 'coursesearchbox invisiblefieldset'));
$output .= html_writer::tag('label', $strsearchcourses.': ', array('for' => $inputid));
$output .= html_writer::empty_tag('input', array('type' => 'text', 'id' => $inputid,
'size' => $inputsize, 'name' => 'search', 'value' => s($value)));
$output .= html_writer::empty_tag('input', array('type' => 'submit',
'value' => get_string('go')));
$output = html_writer::start_tag('form', array('id' => $formid, 'action' => $searchurl, 'method' => 'get',
'class' => 'form-inline'));
$output .= html_writer::start_tag('fieldset', array('class' => 'coursesearchbox invisiblefieldset m-y-1'));
$output .= html_writer::tag('label', $strsearchcourses, array('for' => $inputid));
$output .= html_writer::empty_tag('input', array('type' => 'text', 'id' => $inputid, 'size' => $inputsize,
'name' => 'search', 'value' => s($value), 'class' => 'form-control m-x-1'));
$output .= html_writer::empty_tag('input', array('type' => 'submit', 'value' => get_string('go'),
'class' => 'btn btn-secondary'));
$output .= html_writer::end_tag('fieldset');
$output .= html_writer::end_tag('form');
+4
View File
@@ -774,6 +774,10 @@ M.course_dndupload = {
resel.li.outerHTML = unescape(resel.li.outerHTML);
}
self.add_editing(result.elementid);
// Fire the content updated event.
require(['core/event', 'jquery'], function(event, $) {
event.notifyFilterContentUpdated($(result.fullcontent));
});
} else {
// Error - remove the dummy element
resel.parent.removeChild(resel.li);
+2 -1
View File
@@ -2241,6 +2241,7 @@ class core_course_external extends external_api {
$coursereturns['overviewfiles'] = $files;
$coursereturns['contacts'] = $coursecontacts;
$coursereturns['enrollmentmethods'] = $enroltypes;
$coursereturns['sortorder'] = $course->sortorder;
return $coursereturns;
}
@@ -2983,7 +2984,7 @@ class core_course_external extends external_api {
// Return information for any user that can access the course.
$coursefields = array('format', 'showgrades', 'newsitems', 'startdate', 'maxbytes', 'showreports', 'visible',
'groupmode', 'groupmodeforce', 'defaultgroupingid', 'enablecompletion', 'completionnotify', 'lang', 'theme',
'sortorder', 'marker');
'marker');
// Information for managers only.
if ($canupdatecourse) {
+2 -2
View File
@@ -21,7 +21,7 @@ Feature: Courses can be searched for and moved in bulk.
Scenario: Search courses finds correct results
Given I log in as "admin"
And I go to the courses management page
When I set the field "Search courses:" to "Biology"
When I set the field "Search courses" to "Biology"
And I press "Go"
Then I should see "Biology Y1"
And I should see "Biology Y2"
@@ -32,7 +32,7 @@ Feature: Courses can be searched for and moved in bulk.
Scenario: Search courses and move results in bulk
Given I log in as "admin"
And I go to the courses management page
And I set the field "Search courses:" to "Biology"
And I set the field "Search courses" to "Biology"
And I press "Go"
When I select course "Biology Y1" in the management interface
And I select course "Biology Y2" in the management interface
@@ -42,8 +42,7 @@ Feature: Browse course list and return back from enrolment page
And I press "Save changes"
And I log out
When I log in as "user2"
And I follow "Preferences" in the user menu
And I click on "Edit profile" "link" in the "region-main" "region"
And I open my profile in edit mode
And I expand "Courses" node
And I expand "Sample category" node
And I follow "Course 1"
+1 -1
View File
@@ -2019,7 +2019,7 @@ class core_course_courselib_testcase extends advanced_testcase {
// Create the course with sections.
$course = $this->getDataGenerator()->create_course(array('numsections' => 10), array('createsections' => true));
$sections = $DB->get_records('course_sections', array('course' => $course->id));
$sections = $DB->get_records('course_sections', array('course' => $course->id), 'section');
$coursecontext = context_course::instance($course->id);
$section = array_pop($sections);
course_delete_section($course, $section);
+2 -2
View File
@@ -2063,14 +2063,14 @@ class core_course_externallib_testcase extends externallib_advanced_testcase {
$result = external_api::clean_returnvalue(core_course_external::get_courses_by_field_returns(), $result);
$this->assertCount(2, $result['courses']);
$this->assertCount(28, $result['courses'][0]); // Site course.
$this->assertCount(12, $result['courses'][1]); // Only public information, not enrolled.
$this->assertCount(13, $result['courses'][1]); // Only public information, not enrolled.
$result = core_course_external::get_courses_by_field('id', $course1->id);
$result = external_api::clean_returnvalue(core_course_external::get_courses_by_field_returns(), $result);
$this->assertCount(1, $result['courses']);
$this->assertEquals($course1->id, $result['courses'][0]['id']);
// Expect to receive all the files that a authenticated can see.
$this->assertCount(12, $result['courses'][0]);
$this->assertCount(13, $result['courses'][0]);
// Course 2 is not visible.
$result = core_course_external::get_courses_by_field('id', $course2->id);
+8 -8
View File
@@ -385,7 +385,7 @@ class helper {
* Returns the url to launch the lti tool.
*
* @param int $toolid the id of the shared tool
* @return moodle_url the url to launch the tool
* @return \moodle_url the url to launch the tool
* @since Moodle 3.2
*/
public static function get_launch_url($toolid) {
@@ -395,7 +395,7 @@ class helper {
/**
* Returns the name of the lti enrolment instance, or the name of the course/module being shared.
*
* @param stdClass $tool The lti tool
* @param \stdClass $tool The lti tool
* @return string The name of the tool
* @since Moodle 3.2
*/
@@ -415,7 +415,7 @@ class helper {
/**
* Returns a description of the course or module that this lti instance points to.
*
* @param stdClass $tool The lti tool
* @param \stdClass $tool The lti tool
* @return string A description of the tool
* @since Moodle 3.2
*/
@@ -438,8 +438,8 @@ class helper {
/**
* Returns the icon of the tool.
*
* @param stdClass $tool The lti tool
* @return moodle_url A url to the icon of the tool
* @param \stdClass $tool The lti tool
* @return \moodle_url A url to the icon of the tool
* @since Moodle 3.2
*/
public static function get_icon($tool) {
@@ -453,7 +453,7 @@ class helper {
* If you have slash arguments enabled, this will be a nice url ending in cartridge.xml.
* If not it will be a php page with some parameters passed.
*
* @param stdClass $tool The lti tool
* @param \stdClass $tool The lti tool
* @return string The url to the cartridge representing the tool
* @since Moodle 3.2
*/
@@ -482,7 +482,7 @@ class helper {
* If you have slash arguments enabled, this will be a nice url ending in cartridge.xml.
* If not it will be a php page with some parameters passed.
*
* @param stdClass $tool The lti tool
* @param \stdClass $tool The lti tool
* @return string The url to the cartridge representing the tool
*/
public static function get_proxy_url($tool) {
@@ -616,7 +616,7 @@ class helper {
* Traverses a recursive associative array, setting the properties of the corresponding
* xpath element.
*
* @param DOMXPath $xpath The xpath with the xml to modify
* @param \DOMXPath $xpath The xpath with the xml to modify
* @param array $parameters The array of xpaths to search through
* @param string $prefix The current xpath prefix (gets longer the deeper into the array you go)
* @return void
+19 -15
View File
@@ -69,14 +69,14 @@ class manage_table extends \table_sql {
$this->define_columns(array(
'name',
'lti1',
'lti2',
'launch',
'registration',
'edit'
));
$this->define_headers(array(
get_string('name'),
get_string('lti1', 'enrol_lti'),
get_string('lti2', 'enrol_lti'),
get_string('launchdetails', 'enrol_lti'),
get_string('registrationurl', 'enrol_lti'),
get_string('edit')
));
$this->collapsible(false);
@@ -87,6 +87,11 @@ class manage_table extends \table_sql {
$this->ltienabled = enrol_is_enabled('lti');
$this->canconfig = has_capability('moodle/course:enrolconfig', \context_course::instance($courseid));
$this->courseid = $courseid;
// Set help icons.
$launchicon = new \help_icon('launchdetails', 'enrol_lti');
$regicon = new \help_icon('registrationurl', 'enrol_lti');
$this->define_help_for_headers(['1' => $launchicon, '2' => $regicon]);
}
/**
@@ -102,25 +107,25 @@ class manage_table extends \table_sql {
}
/**
* Generate the LTI1 column.
* Generate the launch column.
*
* @param \stdClass $tool instance data.
* @return string
*/
public function col_lti1($tool) {
public function col_launch($tool) {
global $OUTPUT;
$url = helper::get_cartridge_url($tool);
$toolurllabel = get_string('toolurl', 'enrol_lti');
$toolurl = $url;
$cartridgeurllabel = get_string('cartridgeurl', 'enrol_lti');
$cartridgeurl = $url;
$secretlabel = get_string('secret', 'enrol_lti');
$secret = $tool->secret;
$data = [
"rows" => [
[ "label" => $toolurllabel, "text" => $toolurl, "id" => "toolurl" ],
[ "label" => $secretlabel, "text" => $secret, "id" => "secret" ],
[ "label" => $cartridgeurllabel, "text" => $cartridgeurl, "id" => "cartridgeurl", "hidelabel" => false ],
[ "label" => $secretlabel, "text" => $secret, "id" => "secret", "hidelabel" => false ],
]
];
@@ -129,22 +134,22 @@ class manage_table extends \table_sql {
}
/**
* Generate the LTI2 column.
* Generate the Registration column.
*
* @param \stdClass $tool instance data.
* @return string
*/
public function col_lti2($tool) {
public function col_registration($tool) {
global $OUTPUT;
$url = helper::get_proxy_url($tool);
$toolurllabel = get_string('toolurl', 'enrol_lti');
$toolurllabel = get_string("registrationurl", "enrol_lti");
$toolurl = $url;
$data = [
"rows" => [
[ "label" => $toolurllabel, "text" => $toolurl, "id" => "toolurl" ],
[ "label" => $toolurllabel, "text" => $toolurl, "id" => "toolurl" , "hidelabel" => true],
]
];
@@ -152,7 +157,6 @@ class manage_table extends \table_sql {
return $return;
}
/**
* Generate the edit column.
*
+1 -1
View File
@@ -116,7 +116,7 @@
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="11" NOTNULL="true" SEQUENCE="true"/>
<FIELD NAME="consumerid" TYPE="int" LENGTH="11" NOTNULL="true" SEQUENCE="false"/>
<FIELD NAME="value" TYPE="char" LENGTH="32" NOTNULL="true" SEQUENCE="false"/>
<FIELD NAME="value" TYPE="char" LENGTH="64" NOTNULL="true" SEQUENCE="false"/>
<FIELD NAME="expires" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
</FIELDS>
<KEYS>
+13
View File
@@ -245,5 +245,18 @@ function xmldb_enrol_lti_upgrade($oldversion) {
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2016120501) {
// Changing precision of field value on table enrol_lti_lti2_nonce to (64).
$table = new xmldb_table('enrol_lti_lti2_nonce');
$field = new xmldb_field('value', XMLDB_TYPE_CHAR, '64', null, XMLDB_NOTNULL, null, null, 'consumerid');
// Launch change of precision for field value.
$dbman->change_field_precision($table, $field);
// Lti savepoint reached.
upgrade_plugin_savepoint(true, 2016120501, 'enrol', 'lti');
}
return true;
}
+3 -1
View File
@@ -99,7 +99,9 @@ if ($action) {
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('toolsprovided', 'enrol_lti'));
echo "<p>" . get_string('toolsprovided_help', 'enrol_lti') . "</p>";
echo "<p>" .get_string('toolsprovided_help', 'enrol_lti') . "</p>";
echo "<p class=helplink>" . $OUTPUT->doc_link('enrol/lti/index',
get_string('morehelp')) ."</p>";
if (\enrol_lti\helper::count_lti_tools(array('courseid' => $courseid)) > 0) {
$table = new \enrol_lti\manage_table($courseid);
+1 -1
View File
@@ -1 +1 @@
cartridgeurl,enrol_lti
+5 -4
View File
@@ -55,14 +55,16 @@ $string['membersyncmodeenrolandunenrol'] = 'Enrol new and unenrol missing users'
$string['membersyncmodeenrolnew'] = 'Enrol new users';
$string['membersyncmodeunenrolmissing'] = 'Unenrol missing users';
$string['notoolsprovided'] = 'No tools provided';
$string['lti1'] = 'LTI 1';
$string['lti2'] = 'LTI 2';
$string['launchdetails'] = 'Launch details';
$string['launchdetails_help'] = 'A cartridge URL (also called configuration URL) plus secret are required for configuring the tool.';
$string['lti:config'] = 'Configure \'Publish as LTI tool\' instances';
$string['lti:unenrol'] = 'Unenrol users from the course';
$string['opentool'] = 'Open tool';
$string['pluginname'] = 'Publish as LTI tool';
$string['pluginname_desc'] = 'The \'Publish as LTI tool\' plugin, together with the LTI authentication plugin, allows remote users to access selected courses and activities. In other words, Moodle functions as an LTI tool provider.';
$string['registration'] = 'Published tool registration';
$string['registrationurl'] = 'Registration URL';
$string['registrationurl_help'] = 'If a registration URL (also called proxy URL) is used, then the tool is automatically configured.';
$string['remotesystem'] = 'Remote system';
$string['requirecompletion'] = 'Require course or activity completion prior to grade synchronisation';
$string['returnurlnotset'] = 'Return URL was not set.';
@@ -77,9 +79,8 @@ $string['successfulregistration'] = 'Successful registration';
$string['tasksyncgrades'] = 'Publish as LTI tool grade sync';
$string['tasksyncmembers'] = 'Publish as LTI tool users sync';
$string['toolsprovided'] = 'Published tools';
$string['toolsprovided_help'] = 'This is the information you need to paste into any system to add these tools. In other systems the Tool URL may be referred to as a configuration URL or a web link.';
$string['toolsprovided_help'] = 'A tool may be shared with another site by providing either launch details or a registration URL.';
$string['tooltobeprovided'] = 'Tool to be published';
$string['toolurl'] = 'Tool URL';
$string['userdefaultvalues'] = 'User default values';
// Deprecated since Moodle 3.2.
$string['cartridgeurl'] = 'Cartridge URL';
+8 -4
View File
@@ -26,7 +26,7 @@
* none
Context variables required for this template:
* rows An array of objects with label, text and id
* rows An array of objects with label, hidelabel, text and id
Example context (json):
{
@@ -34,19 +34,23 @@
{
"label": "Tool URL",
"text": "http://example.com/",
"id": "toolurl"
"id": "toolurl",
"hidelabel": false
},
{
"label": "Secret",
"text": "ABCDEF1234567890",
"id": "secret"
"id": "secret",
"hidelabel": true
}
]
}
}}
{{#rows}}
<div>
<label style="display: inline-block; width: 5em" {{#id}}for={{#quote}}{{{id}}}-{{{uniqid}}}{{/quote}}{{/id}}>{{label}}</label>
<label style="display: inline-block; width: 5em"
{{#id}}for={{#quote}}{{{id}}}-{{{uniqid}}}{{/quote}}{{/id}} {{#hidelabel}}
class="accesshide"{{/hidelabel}}>{{label}}</label>
<div style="display: inline-block">{{> core/copy_box }}</div>
</div>
{{/rows}}
+1 -1
View File
@@ -516,7 +516,7 @@ class enrol_lti_helper_testcase extends advanced_testcase {
$document->load(realpath(__DIR__ . '/fixtures/input.xml'));
$xpath = new \DOMXpath($document);
$this->setExpectedException("coding_exception");
$this->expectException('coding_exception');
$function->invokeArgs(null, [$xpath, $parameters]);
}
+1 -1
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX).
$plugin->version = 2016120501; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2016112900; // Requires this Moodle version (3.1)
$plugin->component = 'enrol_lti'; // Full name of the plugin (used for diagnostics).
+2 -1
View File
@@ -80,9 +80,10 @@ switch ($action) {
} else {
$useroptions['link'] = false;
}
$viewfullnames = has_capability('moodle/site:viewfullnames', $context);
foreach ($outcome->response['users'] as &$user) {
$user->picture = $OUTPUT->user_picture($user, $useroptions);
$user->fullname = fullname($user);
$user->fullname = fullname($user, $viewfullnames);
$fieldvalues = array();
foreach ($extrafields as $field) {
$fieldvalues[] = s($user->{$field});
+3
View File
@@ -37,6 +37,7 @@ $context = context_course::instance($course->id, MUST_EXIST);
require_login($course);
$canenrol = has_capability('enrol/manual:enrol', $context);
$canunenrol = has_capability('enrol/manual:unenrol', $context);
$viewfullnames = has_capability('moodle/site:viewfullnames', $context);
// Note: manage capability not used here because it is used for editing
// of existing enrolments which is not possible here.
@@ -74,7 +75,9 @@ navigation_node::override_active_url(new moodle_url('/enrol/users.php', array('i
$options = array('enrolid' => $enrolid, 'accesscontext' => $context);
$potentialuserselector = new enrol_manual_potential_participant('addselect', $options);
$potentialuserselector->viewfullnames = $viewfullnames;
$currentuserselector = new enrol_manual_current_participant('removeselect', $options);
$currentuserselector->viewfullnames = $viewfullnames;
// Build the list of options for the enrolment period dropdown.
$unlimitedperiod = get_string('unlimited');
+1 -1
View File
@@ -173,7 +173,7 @@ class enrol_self_plugin extends enrol_plugin {
}
}
// Send welcome message.
if ($instance->customint4 !== ENROL_DO_NOT_SEND_EMAIL) {
if ($instance->customint4 != ENROL_DO_NOT_SEND_EMAIL) {
$this->email_welcome_message($instance, $USER);
}
}
+2 -2
View File
@@ -57,8 +57,8 @@ class filter_mediaplugin extends moodle_text_filter {
}
$jsinitialised = true;
$mediamanager = core_media_manager::instance();
$mediamanager->setup($page);
// Set up the media manager so that media plugins requiring JS are initialised.
$mediamanager = core_media_manager::instance($page);
}
public function filter($text, array $options = array()) {
+1
View File
@@ -236,6 +236,7 @@ class gradingform_guide_renderer extends plugin_renderer_base {
$input = html_writer::tag('textarea', s($currentremark), $remarkparams);
// Show the frequently-used comments chooser only if there are defined entries.
$commentchooser = '';
if (!empty($comments)) {
// Frequently used comments chooser.
$chooserbuttonid = 'criteria-' . $criterion['id'] . '-commentchooser';
+50 -6
View File
@@ -45,6 +45,13 @@ class grade_report_grader extends grade_report {
*/
private $allgrades;
/**
* Contains all grade items expect GRADE_TYPE_NONE.
*
* @var array $allgradeitems
*/
private $allgradeitems;
/**
* Array of errors for bulk grades updating.
* @var array $gradeserror
@@ -183,6 +190,7 @@ class grade_report_grader extends grade_report {
array_unshift($mygroups, $this->currentgroup);
}
}
$viewfullnames = has_capability('moodle/site:viewfullnames', $this->context);
// always initialize all arrays
$queue = array();
@@ -288,7 +296,7 @@ class grade_report_grader extends grade_report {
$userfields = 'id, ' . get_all_user_name_fields(true);
$user = $DB->get_record('user', array('id' => $userid), $userfields);
$gradestr = new stdClass();
$gradestr->username = fullname($user);
$gradestr->username = fullname($user, $viewfullnames);
$gradestr->itemname = $gradeitem->get_name();
$warnings[] = get_string($errorstr, 'grades', $gradestr);
if ($skip) {
@@ -519,6 +527,22 @@ class grade_report_grader extends grade_report {
return $this->users;
}
/**
* Load all grade items.
*/
protected function get_allgradeitems() {
if (!empty($this->allgradeitems)) {
return $this->allgradeitems;
}
$allgradeitems = grade_item::fetch_all(array('courseid' => $this->courseid));
// But hang on - don't include ones which are set to not show the grade at all.
$this->allgradeitems = array_filter($allgradeitems, function($item) {
return $item->gradetype != GRADE_TYPE_NONE;
});
return $this->allgradeitems;
}
/**
* we supply the userids in this query, and get all the grades
* pulls out all the grades, this does not need to worry about paging
@@ -542,11 +566,16 @@ class grade_report_grader extends grade_report {
WHERE g.itemid = gi.id AND gi.courseid = :courseid {$this->userselect}";
$userids = array_keys($this->users);
$allgradeitems = $this->get_allgradeitems();
if ($grades = $DB->get_records_sql($sql, $params)) {
foreach ($grades as $graderec) {
$grade = new grade_grade($graderec, false);
$this->allgrades[$graderec->userid][$graderec->itemid] = $grade;
if (!empty($allgradeitems[$graderec->itemid])) {
// Note: Filter out grades which have a grade type of GRADE_TYPE_NONE.
// Only grades without this type are present in $allgradeitems.
$this->allgrades[$graderec->userid][$graderec->itemid] = $grade;
}
if (in_array($graderec->userid, $userids) and array_key_exists($graderec->itemid, $this->gtree->get_items())) { // some items may not be present!!
$this->grades[$graderec->userid][$graderec->itemid] = $grade;
$this->grades[$graderec->userid][$graderec->itemid]->grade_item = $this->gtree->get_item($graderec->itemid); // db caching
@@ -567,6 +596,18 @@ class grade_report_grader extends grade_report {
}
}
}
// Pre fill grades for any remaining items which might be collapsed.
foreach ($userids as $userid) {
foreach ($allgradeitems as $itemid => $gradeitem) {
if (!isset($this->allgrades[$userid][$itemid])) {
$this->allgrades[$userid][$itemid] = new grade_grade();
$this->allgrades[$userid][$itemid]->itemid = $itemid;
$this->allgrades[$userid][$itemid]->userid = $userid;
$this->allgrades[$userid][$itemid]->grade_item = $gradeitem;
}
}
}
}
/**
@@ -611,6 +652,7 @@ class grade_report_grader extends grade_report {
'moodle/grade:edit'), $this->context);
}
$hasuserreportcell = $canseeuserreport || $canseesingleview;
$viewfullnames = has_capability('moodle/site:viewfullnames', $this->context);
$strfeedback = $this->get_lang_string("feedback");
$strgrade = $this->get_lang_string('grade');
@@ -682,7 +724,7 @@ class grade_report_grader extends grade_report {
$usercell->text = $OUTPUT->user_picture($user, array('visibletoscreenreaders' => false));
}
$fullname = fullname($user);
$fullname = fullname($user, $viewfullnames);
$usercell->text .= html_writer::link(new moodle_url('/user/view.php', array('id' => $user->id, 'course' => $this->course->id)), $fullname, array(
'class' => 'username',
));
@@ -781,6 +823,8 @@ class grade_report_grader extends grade_report {
$strexcludedgrades = get_string('excluded', 'grades');
$strerror = get_string('error');
$viewfullnames = has_capability('moodle/site:viewfullnames', $this->context);
foreach ($this->gtree->get_levels() as $key => $row) {
$headingrow = new html_table_row();
$headingrow->attributes['class'] = 'heading_name_row';
@@ -918,7 +962,7 @@ class grade_report_grader extends grade_report {
// grade items (in case one has been hidden) as the course total shown needs to be adjusted for this particular
// user.
if (!$this->canviewhidden) {
$allgradeitems = grade_item::fetch_all(array('courseid' => $this->courseid));
$allgradeitems = $this->get_allgradeitems();
}
foreach ($this->users as $userid => $user) {
@@ -937,7 +981,7 @@ class grade_report_grader extends grade_report {
$itemrow = new html_table_row();
$itemrow->id = 'user_'.$userid;
$fullname = fullname($user);
$fullname = fullname($user, $viewfullnames);
$jsarguments['users'][$userid] = $fullname;
foreach ($this->gtree->items as $itemid => $unused) {
@@ -1730,7 +1774,7 @@ class grade_report_grader extends grade_report {
// Try looking for old location of user setting that used to store all courses in one serialized user preference.
if (($oldcollapsedpref = get_user_preferences('grade_report_grader_collapsed_categories')) !== null) {
if ($collapsedall = @unserialize($oldcollapsedpref)) {
if ($collapsedall = unserialize_array($oldcollapsedpref)) {
// We found the old-style preference, filter out only categories that belong to this course and update the prefs.
$collapsed = static::filter_collapsed_categories($courseid, $collapsedall);
if (!empty($collapsed['aggregatesonly']) || !empty($collapsed['gradesonly'])) {
@@ -12,6 +12,7 @@ Feature: We can change what we are viewing on the grader report
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 1 | student2@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
@@ -94,6 +95,9 @@ Feature: We can change what we are viewing on the grader report
| capability | permission |
| moodle/grade:viewhidden | Prevent |
And I log out
And the following "course enrolments" exist:
| user | course | role |
| student2 | C1 | student |
And I log in as "teacher1"
And I follow "Course 1"
And I navigate to "View > Grader report" in the course gradebook
+68
View File
@@ -230,6 +230,74 @@ class core_grade_report_graderlib_testcase extends advanced_testcase {
$this->assertEquals(count($toobigvalue['gradesonly']) - 1, count($report1->collapsed['gradesonly']));
}
/**
* Tests the get_right_rows function with one 'normal' and one 'ungraded' quiz.
*
* Previously, with an ungraded quiz (which results in a grade item with type GRADETYPE_NONE)
* there was a bug in get_right_rows in some situations.
*/
public function test_get_right_rows() {
global $USER, $DB;
$this->resetAfterTest(true);
// Create manager and student on a course.
$generator = $this->getDataGenerator();
$manager = $generator->create_user();
$student = $generator->create_user();
$course = $generator->create_course();
$generator->enrol_user($manager->id, $course->id, 'manager');
$generator->enrol_user($student->id, $course->id, 'student');
// Create a couple of quizzes on the course.
$normalquiz = $generator->create_module('quiz', array('course' => $course->id,
'name' => 'NormalQuiz'));
$ungradedquiz = $generator->create_module('quiz', array('course' => $course->id,
'name' => 'UngradedQuiz'));
// Set the grade for the second one to 0 (note, you have to do this after creating it,
// otherwise it doesn't create an ungraded grade item).
$ungradedquiz->instance = $ungradedquiz->id;
quiz_set_grade(0, $ungradedquiz);
// Set current user.
$this->setUser($manager);
$USER->gradeediting[$course->id] = false;
// Get the report.
$report = $this->create_report($course);
$report->load_users();
$report->load_final_grades();
$result = $report->get_right_rows(false);
// There should be 3 rows (2 header rows, plus the grades for the first user).
$this->assertCount(3, $result);
// The second row should contain 2 cells - one for the graded quiz and course total.
$this->assertCount(2, $result[1]->cells);
$this->assertContains('NormalQuiz', $result[1]->cells[0]->text);
$this->assertContains('Course total', $result[1]->cells[1]->text);
// User row should contain grade values '-'.
$this->assertCount(2, $result[2]->cells);
$this->assertContains('>-<', $result[2]->cells[0]->text);
$this->assertContains('>-<', $result[2]->cells[1]->text);
// Supposing the user cannot view hidden grades, this shouldn't make any difference (due
// to a bug, it previously did).
$context = context_course::instance($course->id);
$managerroleid = $DB->get_field('role', 'id', array('shortname' => 'manager'));
assign_capability('moodle/grade:viewhidden', CAP_PROHIBIT, $managerroleid, $context->id, true);
$context->mark_dirty();
$this->assertFalse(has_capability('moodle/grade:viewhidden', $context));
// Recreate the report. Confirm it returns successfully still.
$report = $this->create_report($course);
$report->load_users();
$report->load_final_grades();
$result = $report->get_right_rows(false);
$this->assertCount(3, $result);
}
private function create_grade_category($course) {
static $cnt = 0;
$cnt++;
+1
View File
@@ -42,3 +42,4 @@ $string['cliunknowoption'] = 'অচেনা অপশন:
$string['cliyesnoprompt'] = 'y (মানে হ্যাঁ) বা n (মানে না) টাইপ করুন';
$string['environmentrequireinstall'] = 'অবশ্যই ইনস্টল ও সক্রিয় করতে হবে';
$string['environmentrequireversion'] = '{$a->needed} সংস্করণ আবশ্যক এবং আপনি {$a->current} চালাচ্ছেন';
$string['upgradekeyset'] = 'আপগ্রেড কুঞ্জিকা (এটি সেট না করতে খালি রাখুন)';
+33
View File
@@ -0,0 +1,33 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Automatically generated strings for Moodle installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['thislanguage'] = 'Èʋegbe';
+3 -4
View File
@@ -90,10 +90,9 @@ $string['pathsunsecuredataroot'] = 'Dataroot location is not secure';
$string['pathswrongadmindir'] = 'Admin directory does not exist';
$string['phpextension'] = '{$a} PHP extension';
$string['phpversion'] = 'PHP version';
$string['phpversionhelp'] = '<p>Moodle requires a PHP version of at least 4.3.0 or 5.1.0 (5.0.x has a number of known problems).</p>
<p>You are currently running version {$a}</p>
<p>You must upgrade PHP or move to a host with a newer version of PHP!<br />
(In case of 5.0.x you could also downgrade to 4.4.x version)</p>';
$string['phpversionhelp'] = '<p>Moodle requires a PHP version of at least 5.6.5 (7.x has some engine limitations).</p>
<p>You are currently running version {$a}.</p>
<p>You must upgrade PHP or move to a host with a newer version of PHP.</p>';
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
$string['welcomep20'] = 'You are seeing this page because you have successfully installed and
launched the <strong>{$a->packname} {$a->packversion}</strong> package in your computer. Congratulations!';
+34
View File
@@ -0,0 +1,34 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Automatically generated strings for Moodle installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['thisdirection'] = 'ltr';
$string['thislanguage'] = 'English US - K12';
+2 -2
View File
@@ -44,8 +44,8 @@ $string['dmlexceptiononinstall'] = '<p>Ocurrió un error en la BasedeDatos[{$a->
$string['downloadedfilecheckfailed'] = 'Ha fallado la comprobación del archivo descargado';
$string['invalidmd5'] = 'La variable de verificación MD5 es incorrecta no es valida - trate nuevamente';
$string['missingrequiredfield'] = 'Falta algún campo necesario';
$string['remotedownloaderror'] = '<p>Falló la descarga del componente a su servidor. Se recomienda ampliamente verificar los ajustes del proxy, extensión PHP cURL.</p>
<p>Debe descargar el<a href="{$a->url}">{$a->url}</a> archivo manualmente, copiarlo en "{$a->dest}" en su servidor y descomprimirlo allí.</p>';
$string['remotedownloaderror'] = '<p>Falló la descarga del componente a su servidor. Por favor verifique los ajustes del proxy, la extensión PHP cURL.está altamente recomendada.</p>
<p>Debe descargar el archivo <a href="{$a->url}">{$a->url}</a> manualmente, copiarlo a "{$a->dest}" en su servidor y descomprimirlo allí.</p>';
$string['wrongdestpath'] = 'Ruta de destino errónea.';
$string['wrongsourcebase'] = 'Base de fuente de URL errónea.';
$string['wrongzipfilename'] = 'Nombre de archivo ZIP erróneo.';
+2 -3
View File
@@ -85,10 +85,9 @@ $string['pathsunsecuredataroot'] = 'La ubicación de dataroot no es segura';
$string['pathswrongadmindir'] = 'El directorio admin no existe';
$string['phpextension'] = 'Extensión PHP {$a}';
$string['phpversion'] = 'Versión PHP';
$string['phpversionhelp'] = '<p>Moodle requiere al menos una versión de PHP 4.3.0 o 5.1.0 ((5.0.x tiene una serie de problemas conocidos).</p>
$string['phpversionhelp'] = '<p>Moodle requiere una versión de PHP de al menos 5.6.5 (7.x tiene algunas limitaciones del motor).</p>
<p>En este momento está ejecutando la versión {$a}</p>
<p>¡Debe actualizar PHP o trasladarse a otro servidor con una versión más reciente de PHP!<br />
(En caso de 5.0.x podría también revertir a la versión 4.4.x)</p>';
<p>Usted debe actualizar PHP o trasladarse a otro servidor con una versión más reciente de PHP!<br />';
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
$string['welcomep20'] = 'Si está viendo esta página es porque ha podido instalar y ejecutar exitosamente el paquete <strong>{$a->packname} {$a->packversion}</strong> en su computadora. !Enhorabuena!';
$string['welcomep30'] = 'Esta versión de <strong>{$a->installername}</strong> incluye las aplicaciones necesarias para que <strong>Moodle</strong> funcione en su computadora, principalmente:';
+1 -1
View File
@@ -31,4 +31,4 @@
defined('MOODLE_INTERNAL') || die();
$string['parentlanguage'] = 'es_mx';
$string['thislanguage'] = 'Español - México - kids';
$string['thislanguage'] = 'Español de México para niños';
+3 -3
View File
@@ -41,8 +41,8 @@ $string['cannotunzipfile'] = 'Ei saa lahti pakkida faili.';
$string['componentisuptodate'] = 'Komponent on ajakohane';
$string['downloadedfilecheckfailed'] = 'Alla laetud faili kontroll ebaõnnestus.';
$string['invalidmd5'] = 'Vigane md5';
$string['missingrequiredfield'] = 'Mõned nõutud väljad on puudu';
$string['missingrequiredfield'] = 'Mõni nõutav väli on puudu';
$string['remotedownloaderror'] = 'Komponendi alla tõmbamine serverisse ebaõnnestus, palun kontrolli proksi seadeid, PHP cURL laiendus on tungivalt soovitatav.<br /><br />Sa pead tõmbama <a href="{$a->url}">{$a->url}</a> faili käsitsi, kopeerima selle "{$a->dest}" oma serveris ja pakkima lahti sinna.';
$string['wrongdestpath'] = 'Vale sihtrada';
$string['wrongdestpath'] = 'Vale sihtkohatee';
$string['wrongsourcebase'] = 'Vale allika URL\'i baas.';
$string['wrongzipfilename'] = 'Vale ZIP failinimi';
$string['wrongzipfilename'] = 'Vale ZIP-faili nimi';
+16 -16
View File
@@ -32,23 +32,23 @@ defined('MOODLE_INTERNAL') || die();
$string['admindirname'] = 'Administreerimiskataloog';
$string['availablelangs'] = 'Saadaval keelte nimekiri';
$string['chooselanguagehead'] = 'Keele valik';
$string['chooselanguagehead'] = 'Valige keel';
$string['chooselanguagesub'] = 'Palun vali keel, mida kasutatakse AINULT installeerimise käigus. Hiljem saab valida õpikeskkonna ja kasutajate keelt.';
$string['clialreadyinstalled'] = 'Fail config.php juba eksisteerib, palun kasuta admin/cli/upgrade.php kui soovid uuendada oma saiti.';
$string['cliinstallheader'] = 'Moodle {$a} käsurea põhine installeerimise programm';
$string['cliinstallheader'] = 'Moodlei {$a} käsureapõhine installiprogramm';
$string['databasehost'] = 'Andmebaasi host';
$string['databasename'] = 'Andmebaasi nimi';
$string['databasetypehead'] = 'Vali andmebaasi draiver';
$string['databasetypehead'] = 'Valige andmebaasi draiver';
$string['dataroot'] = 'Andmete kataloog';
$string['datarootpermission'] = 'Andmete kataloogide õigus';
$string['datarootpermission'] = 'Andmekataloogide õigus';
$string['dbprefix'] = 'Tabeli eesliide';
$string['dirroot'] = 'Moodle kataloog';
$string['environmenthead'] = 'Keskkonna kontrollimine...';
$string['environmentsub2'] = 'Iga Moodle väljalaskel on oma minimaalne PHP versiooni nõue ja kohustuslikud PHP laiendused.
Täielik keskkonna kontroll tehakse enne iga installeerimist ja uuendamist. Palun võta ühendust serveri administraatoriga, kui sa ei sa kuidas installeerida või võimaldada PHP laiendusi.';
$string['errorsinenvironment'] = 'Keskkonna sobivuse kontroll ebaõnnestus!';
$string['installation'] = 'Installeerimine';
$string['langdownloaderror'] = 'Kahjuks keelt "{$a}" ei paigaldatud. Paigaldamine jätkub inglise keeles.';
$string['errorsinenvironment'] = 'Keskkonna sobivuse kontroll nurjus.';
$string['installation'] = 'Installimine';
$string['langdownloaderror'] = 'Keelt "{$a}" ei saanud alla laadida. Installimine jätkub inglise keeles.';
$string['memorylimithelp'] = '<p>PHP mälu limiit sinu serveri jaoks on hetkel {$a}.</p>
<p>See võib hiljem tekitada Moodle\'il mäluprobleeme, eriti kui sul on palju mooduleid ja/või kasutajaid.
</p>
@@ -60,11 +60,11 @@ See lubab Moodle\'il ise mälu limiiti määrata.</li>
<li>Mõnedes PHP serverites saad luua Moodle kataloogi .htaccess faili, mis sisaldab seda rida:<p><blockquote>php_value memory_limit 16M</blockquote></p>
<p>Kuigi mõnedes serverites tõkestab see <b>kõigi</b> PHP lehekülgede tööd (sa näed veateateid, kui vaatad lehti), nii et pead eemaldama .htaccess faili.</p></li>
</ol>';
$string['paths'] = 'Rajad';
$string['paths'] = 'Teed';
$string['pathserrcreatedataroot'] = 'Andmete kataloogi ({$a->dataroot}) ei saa installeerija luua.';
$string['pathshead'] = 'Radade kinnitused';
$string['pathsrodataroot'] = 'Andmete juurkataloog (Dataroot) ei ole kirjutatav.';
$string['pathsroparentdataroot'] = 'Ülemkataloog ({$a->parent}) ei ole kirjutatav. Installeerija ei saanud andmete kataloogi ({$a->dataroot}) luua.';
$string['pathshead'] = 'Kinnita teed';
$string['pathsrodataroot'] = 'Andmete juurkataloog ei võimalda kirjutust.';
$string['pathsroparentdataroot'] = 'Ülemkataloog ({$a->parent}) ei võimalda kirjutust. Installiprogramm ei saanud andmete kataloogi ({$a->dataroot}) luua.';
$string['pathssubadmindir'] = 'Väga vähesed veebihostid kasutavad /admin spetsiaalse URL-na, et pääseda ligi kontrollpaneelile või millegile sarnasele. Kahjuks on see konfliktis Moodle administreerimislehtedega. Sa saad olukorda parandada, kui nimetad kataloogi admin ümber oma üaigalduses ning kirjutad selle uue nime siia. Näiteks: <em>moodleadmin</em>. See parandab administreerimisliidese lingid Moodle\'s.';
$string['pathssubdataroot'] = 'Sa pead näitama koha, kuhu Moodle saaks salvestada üles laetud failid. See kataloog peab olema loetav JA KIRJUTATAV veebiserveri kasutaja poolt (tavaliselt \'nobody\' or \'apache\'), samas see kataloog ei tohiks olla ligipääsetav otse veebi kaudu. Kui kataloogi ei eksisteeri, siis installeerija püüab selle ise luua.';
$string['pathssubdirroot'] = 'Täistee Moodle paigalduse kataloogile.';
@@ -73,9 +73,9 @@ Ei ole võimalik kasutada mitmest kohast kohast ligipääsu.
Kui Su sait omab mitut avalikku aadress, siis pead seadistama ümbersuunamised kõikidelt teistest aadressidelt.
Kui Su sait on ligipääsetav nii Internetist kui intranetist (sisevõrgust), siis kasuta Interneti ehk avalikku aadressi ja seadista DNS sellisellt, et intraneti kasutajad kasutaksid ka avalikku aadressi.
Kui aadress pole korrektne, siis palun muuda URL oma brauseris, et taasalustada installeerimist erineva väärtusega.';
$string['pathsunsecuredataroot'] = 'Andmete juurkataloogi asukoht pole turvamine';
$string['pathswrongadmindir'] = 'Admin kataloogi ei eksisteeri';
$string['phpextension'] = '{$a} PHP laiendus';
$string['pathsunsecuredataroot'] = 'Andmete juurkataloogi asukoht pole turvaline';
$string['pathswrongadmindir'] = 'Halduskataloogi pole olemas';
$string['phpextension'] = '{$a} PHP-laiendus';
$string['phpversion'] = 'PHP versioon';
$string['phpversionhelp'] = '<p>Moodle vajab vähemalt PHP versiooni 4.1.0</p>
<p>Sinu jooksev versioon on {$a}</p>
@@ -83,8 +83,8 @@ $string['phpversionhelp'] = '<p>Moodle vajab vähemalt PHP versiooni 4.1.0</p>
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
$string['welcomep20'] = 'Sa näed seda lehte, sest oled edukalt installeerinud ja käivitanud <strong>{$a->packname} {$a->packversion}</strong> paketi Sinu arvutis. Õnnitleme!';
$string['welcomep30'] = 'See <strong>{$a->installername}</strong> väljalase rakendusi loomaks keskkonda, millel <strong>Moodle</strong> hakkab will operate, namely:';
$string['welcomep40'] = 'Pakett sisaldab ka <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong>.';
$string['welcomep40'] = 'Pakett sisaldab ka järgmist: <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong>.';
$string['welcomep50'] = 'Kasutamaks kõiki selle rakendusi selles paketis on kaetud nende vastavad litsentsid. Täielik <strong>{$a->installername}</strong> pakett on <a href="http://www.opensource.org/docs/definition_plain.html">avatud lähtekoodil</a> ja jaotatud <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a> litsentsi alusel.';
$string['welcomep60'] = 'Järgnevatel lehtedel juhitakse sind läbi mõnede lihtsate sammude seadistamaks ja seadmaks üles <strong>Moodle</strong> oma arvutis. Sa võid nõustuda vaikeväärtustega või fakultatiivselt täiendada vastavalt oma vajadustele.';
$string['welcomep70'] = 'Vajuta "Järgmine" nuppu all jätkamaks <strong>Moodle</strong> paigaldamisega.';
$string['welcomep70'] = '<strong>Moodle\\i</strong> installi jätkamiseks klõpsake nuppu Edasi.';
$string['wwwroot'] = 'Veebiaadress';
+1 -1
View File
@@ -32,4 +32,4 @@ defined('MOODLE_INTERNAL') || die();
$string['parentlanguage'] = '';
$string['thisdirection'] = 'ltr';
$string['thislanguage'] = 'Eesti';
$string['thislanguage'] = 'inglise';
+3 -2
View File
@@ -41,9 +41,10 @@ $string['cannotunzipfile'] = 'Ezin da fitxategia deskonprimatu';
$string['componentisuptodate'] = 'Osagaia eguneratu da';
$string['dmlexceptiononinstall'] = '<p>Datu-basearen errorea gertatu da [{$a->errorcode}].<br />{$a->debuginfo}</p>';
$string['downloadedfilecheckfailed'] = 'Jaitsitako fitxategiaren konprobazioak kale egin du.';
$string['invalidmd5'] = 'md5 ez da baliagarria';
$string['invalidmd5'] = 'Kontrolerako aldagaia gaizki zegoen - saiatu berriz ere';
$string['missingrequiredfield'] = 'Beharrezko eremuren bat falta da.';
$string['remotedownloaderror'] = 'Errorea osagaia zure zerbitzarian jaistean, mesedez egiaztatu proxy-ezarpenak, PHP cURL luzapea erabat gomendatzen da.<br/><br /> <a href="*{$a->url}*">*{$a->url}*</a> fitxategia eskuz jaitsi beharko zenuke, zure zerbitzariko "*{$a->dest}*" -ra kopiatu eta bertan deskonprimatu.';
$string['remotedownloaderror'] = '<p>Errorea osagaia zure zerbitzarian jaistean, mesedez egiaztatu proxy-ezarpenak, PHP cURL luzapena erabat gomendatzen da.</p>
<p> <a href="{$a->url}">{$a->url}</a> fitxategia eskuz jaitsi beharko zenuke, zure zerbitzariko "{$a->dest}"-ra kopiatu eta bertan deskonprimatu.</p>';
$string['wrongdestpath'] = 'Bide desegokia';
$string['wrongsourcebase'] = 'URL iturriaren oinarri akastuna';
$string['wrongzipfilename'] = 'ZIP fitxategiaren izen desegokia';
+26 -13
View File
@@ -34,23 +34,27 @@ $string['admindirname'] = 'Admin direktorioa';
$string['availablelangs'] = 'Hizkuntza-pakete eskuragarriak';
$string['chooselanguagehead'] = 'Aukeratu hizkuntza bat';
$string['chooselanguagesub'] = 'Mesedez, aukeratu instalaziorako hizkuntza bat. Hizkuntza hori erabiliko da gunearen berezko hizkuntza gisa, baina aurrerago alda daiteke.';
$string['clialreadyconfigured'] = 'File config.php fitxategia badago, mesedez erabili admin/cli/install_database.php gune hau instalatu nahi baduzu.';
$string['clialreadyinstalled'] = 'File config.php fitxategia badago, mesedez erabili admin/cli/upgrade.php zure gunea eguneratu nahi baduzu.';
$string['clialreadyconfigured'] = 'Dagoeneko badago config.php konfigurazio-fitxategia. Mesedez erabili admin/cli/install_database.php Moodle gune honetan instalatu nahi baduzu.';
$string['clialreadyinstalled'] = 'Dagoeneko badago config.php konfigurazio-fitxategia. Mesedez erabili admin/cli/upgrade.php zure Moodle gunea eguneratu nahi baduzu.';
$string['cliinstallheader'] = 'Moodle {$a} komando-lerro bidezko instalaziorako programa';
$string['databasehost'] = 'Datu-basearen ostalaria';
$string['databasename'] = 'Datu-basearen izena';
$string['databasetypehead'] = 'Aukeratu datu-base kontrolatzailea';
$string['dataroot'] = 'Datu-direktorioa';
$string['datarootpermission'] = 'Datu-direktorioen baimena';
$string['dbprefix'] = 'Taulen aurrizkia';
$string['dirroot'] = 'Moodle direktorioa';
$string['environmenthead'] = 'Zure ingurunea egiaztatzen...';
$string['errorsinenvironment'] = 'Kale egin du ingurunearen egiaztatzeak!';
$string['environmentsub2'] = 'Moodle-ko bertsio bakoitzak PHPko gutxieneko bertsioa eta derrigorrez instalatu beharreko PHP luzapen batzuk ditu. Ingurunearen azterketa oso bat egiten da instalazioa eta eguneraketa bakoitza egin aurretik. Mesedez, jarri harremanetan zerbitzariaren kudeatzailearekin ez badakizu bertsio berria edo PHP luzapenak nola instalatu.';
$string['errorsinenvironment'] = 'Huts egin du ingurunearen egiaztatzeak!';
$string['installation'] = 'Instalazioa';
$string['langdownloaderror'] = '"{$a}" hizkuntza ezin izan da instalatu. Instalazio-prozesuak ingelesez jarraituko du.';
$string['memorylimithelp'] = '<p>Zure zerbitzarian PHP memoria-muga {$a} da.</p>
$string['langdownloaderror'] = 'Zoritxarrez "{$a}" hizkuntza ezin izan da jaitsi. Instalazio-prozesuak ingelesez jarraituko du.';
$string['memorylimithelp'] = '<p>Zure zerbitzarian PHP memoria-muga {$a} da une honetan.</p>
<p>Aurrerago honek Moodle-ri arazoak sor diezaizkioke, bereziki modulu edo/eta erabiltzaile asko badituzu.</p>
<p>Aurrerago honek Moodle-ri arazoak sor diezaizkioke,
bereziki modulu edo/eta erabiltzaile asko badituzu.</p>
<p>PHP muga altuenarekin konfiguratzea aholkatzen dizugu, ad. 40M.
<p>PHP memoria-muga ahal bezain altu konfiguratzea aholkatzen dizugu, ad. 40M.
Hori egiteko modu asko daude:</p>
<ol>
<li>Ahal baduzu, PHP <i>--enable-memory-limit</i>-ekin berriz konpilatu.
@@ -58,8 +62,8 @@ Horrek Moodle-k berak memoria-muga ezartzea ahalbidetzen du.</li>
<li>php.ini fitxategirako sarbidea baduzu,<b>memory_limit</b> ezarpena alda dezakezu
40Mra, adibidez. Sarbiderik ez baduzu, zure administratzaileari egin dezala eska diezaiokezu.</li>
<li>PHP zerbitzari batzuetan Moodle-ren direktorioan beheko lerro hau daukan .htaccess fitxategia sor dezakezu:
<p><blockquote>php_value memory_limit 40M</blockquote></p>
<p>Hala ere, zerbitzari batzuetan horrek PHP orri <b>GUZTIEK</b> ez funtzionatzea ekar dezake
<blockquote><div>php_value memory_limit 40M</div></blockquote>
<p>Hala ere, zerbitzari batzuetan horrek PHP orri <b>guztiek</b> ez funtzionatzea ekar dezake
(orriak ikustean erroreak ere ikusiko dituzu). Kasu horretan, .htaccess fitxategia ezabatu beharko duzu.</p></li>
</ol>';
$string['paths'] = 'Bideak';
@@ -67,8 +71,18 @@ $string['pathserrcreatedataroot'] = 'Instalatzaileak ezin du datu-direktorioa ({
$string['pathshead'] = 'Egiaztatu bideak';
$string['pathsrodataroot'] = 'Dataroot direktorioa ez da idazteko modukoa.';
$string['pathsroparentdataroot'] = 'Goragoko direktorioa ({$a->parent}) ez da idazteko modukoa. Instalatzaileak ezin du datu-direktorioa ({$a->dataroot}) sortu.';
$string['pathssubadmindir'] = 'Web ostalari gutxi batzuk /admin URL berezi gisa erabiltzen dute kontrol-panel edo antzekora sarbidea emateko. Zoritxarrez, honek Moodle-ren kudeatze-orrien berezko kokapenarekin gatazka sortzen du. Hau konpondu dezakezu zure instalazioko admin karpeta berrizendatuz, eta izen berria hemen sartuta. Adibidez <em>moodleadmin</em>. Honek Moodle-ko admin estekak konponduko du.';
$string['pathssubdataroot'] = '<p>Moodle-k erabiltzaileek igotako fitxategien edukiak bilduko dituen direktorio bat.</p>
<p>Direktorio honetan web-zerbitzariaren erabiltzaileak irakurtzeko eta idazteko baimena izan beharko ditu (normalean \'www-data\', \'nobody\', edo \'apache\').</p>
<p>Ez litzateke web bidez eskuragarri egon beharko.</p>
<p>Direktorioa existitzen ez bada, instalazioan sortzeko saiakera egingo da.</p>';
$string['pathssubdirroot'] = '<p>Moodle-ko kodea daukan direktorioaren helbide osoa.</p>';
$string['pathssubwwwroot'] = '<p>Moodle eskuragarri egongo den helbide osoa, hau da, erabiltzaileek Moodle-n sartzeko nabigatzaileareko helbide barran idatziko duten helbidea</p>
<p>Moodle ezin da hainbat helbidetatik eskuragarri egon. Zure gunea hainbat helbidetatik eskuragarri badago errazena aukeratu eta bertara beste helbideetatik behin-betiko berbideraketak konfiguratu itzazu.</p>
<p>Zure gunea Internetetik eta barne-sare batetik eskuragarri badago (batzuetan Intranet deitutakoa), hemen helbide publikoa erabili ezazu.</p>
<p>Oraingo helbidea egokia ez bada, mesedez aldatu ezazu URLa zure nabigatzailean eta instalazioa berriz abiatu ezazu.</p>';
$string['pathsunsecuredataroot'] = 'Dataroot-en kokapena ez da segurua';
$string['pathswrongadmindir'] = 'Kudeaketa direktorioa ez da existitzen';
$string['pathswrongadmindir'] = 'Admin direktorioa ez da existitzen';
$string['phpextension'] = '{$a} PHP luzapena';
$string['phpversion'] = 'PHP bertsioa';
$string['phpversionhelp'] = '<p>Moodle-k gutxienez PHP 4.3.0 edo 5.1.0 (5.0.x errore batzuk ditu). </p>
@@ -76,8 +90,7 @@ $string['phpversionhelp'] = '<p>Moodle-k gutxienez PHP 4.3.0 edo 5.1.0 (5.0.x er
<p>PHP eguneratu edo PHP bertsio berriagoa duen zerbitzari batera jo</p>
<p>5.0.x baduzu, nahi izanez gero, 4.4.x. bertsiora jaitsi dezakezu</p>';
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
$string['welcomep20'] = 'Orri hau ikusten baduzu <strong>{$a->packname} {$a->packversion}</strong> paketea
zure ordenadorean instalatu ahal izan duzu. Zorionak!';
$string['welcomep20'] = 'Orri hau ikusten baduzu <strong>{$a->packname} {$a->packversion}</strong> paketea zure ordenagailuan instalatu ahal izan duzu. Zorionak!';
$string['welcomep30'] = '<strong>{$a->installername}</strong>ren bertsio honek <strong>Moodle</strong>k
zure ordenadorean funtzionatzeko behar diren aplikazioak dauzka,
bereziki:';
@@ -87,7 +100,7 @@ $string['welcomep50'] = 'Paketeko aplikazio guztien erabilpena dagozkien lizentz
<a href="http://www.opensource.org/docs/definition_plain.html">kode irekia</a> dauka eta
<a href="http://www.gnu.org/copyleft/gpl.html">GPL</a> lizentziapean banatzen da.';
$string['welcomep60'] = 'Datozen orriek urrats erraz batzuen bidez gidatuko zaituzte
<strong>Moodle</strong> zure ordenadorean instalatu eta konfiguratzeko. Aholkatzen diren lehentsitako baloreak
<strong>Moodle</strong> zure ordenagailuan instalatu eta konfiguratzeko. Aholkatzen diren lehentsitako baloreak
mantendu edo, nahi izanez gero, alda ditzakezu zure beharrei erantzun diezaieten.';
$string['welcomep70'] = '"Hurrengoa" botoia sakatu <strong>Moodle</strong>ren konfigurazioarekin jarraitzeko.';
$string['wwwroot'] = 'Web helbidea';
+12
View File
@@ -30,5 +30,17 @@
defined('MOODLE_INTERNAL') || die();
$string['cannotcreatedboninstall'] = '<p>پایگاه داده نتوانست ساخته شود.</p>
<p>پایگاه دادهٔ تعیین شده وجود ندارد و کاربر ارائه‌شده هم مجوز ساختن پایگاه داده را ندارد.</p>
<p>مدیر سایت باید پیکربندی پایگاه داده را بررسی کند.</p>';
$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['dmlexceptiononinstall'] = '<p>یک خطای پایگاه داده رخ داد [{$a->errorcode}].<br />{$a->debuginfo}</p>';
$string['missingrequiredfield'] = 'بعضی از فیلدهای ضروری خالی است';

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