Compare commits

..

273 Commits

Author SHA1 Message Date
Jake Dallimore 7de0c0f1ad Moodle release 3.6.6 2019-09-06 11:50:42 +08:00
Eloy Lafuente (stronk7) 95abbe12ba weekly release 3.6.5+ 2019-09-05 17:14:37 +02:00
Eloy Lafuente (stronk7) 2e33ec271b Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2019-09-05 17:14:34 +02:00
Eloy Lafuente (stronk7) 2efbb5dcc0 Merge branch 'MDL-66560-36' of https://github.com/lucaboesch/moodle into MOODLE_36_STABLE 2019-09-05 15:58:38 +02:00
Jake Dallimore 8a7f86f387 Merge branch 'MDL-56223-36' of git://github.com/lameze/moodle into MOODLE_36_STABLE 2019-09-05 17:20:50 +08:00
Simey Lameze 0b5aad45af MDL-56223 calendar: fix wrong create_calendar_events WS phpdoc 2019-09-05 17:16:14 +08:00
Simey Lameze aa97b1530f MDL-56223 calendar: show the number of deleted events 2019-09-05 17:16:14 +08:00
Simey Lameze a2a489d1f8 MDL-56223 calendar: skip events updating if nothing has changed 2019-09-05 17:16:14 +08:00
Luca Bösch c04c03594e MDL-66560 import: Format course search UI elements. 2019-09-05 06:39:56 +02:00
Jake Dallimore e3147eec7d Merge branch 'MDL-66551-36' of git://github.com/lameze/moodle into MOODLE_36_STABLE 2019-09-05 11:16:53 +08:00
Simey Lameze 37e178e755 MDL-66551 core_user: remove orphaned calendar subscriptions 2019-09-05 10:59:04 +08:00
Simey Lameze 3ee7064392 MDL-66551 core_user: delete_user() should remove users calendar subs 2019-09-05 10:52:38 +08:00
Andrew Nicols de6225210d Merge branch 'MDL-66391-36' of https://bitbucket.org/isprynt/moodle into MOODLE_36_STABLE 2019-09-05 10:00:27 +08:00
Eloy Lafuente (stronk7) f9dc45fee6 Merge branch 'MDL-66072-36-3' of git://github.com/peterRd/moodle into MOODLE_36_STABLE 2019-09-05 02:48:32 +02:00
Peter d5f387f922 MDL-66072 core: Remove ancillary sharing functions and code 2019-09-05 08:44:36 +08:00
Peter c3ef9e4380 MDL-66072 core: Remove course sharing and related capabilities 2019-09-05 08:44:30 +08:00
Eloy Lafuente (stronk7) 99a75cba2c Merge branch 'MDL-66560-36' of https://github.com/lucaboesch/moodle into MOODLE_36_STABLE 2019-09-05 02:18:04 +02:00
AMOS bot 5000628be5 Automatically generated installer lang files 2019-09-05 00:12:06 +00:00
Luca Bösch 3d348a4638 MDL-66560 import: Format course search UI elements. 2019-09-05 00:41:53 +02:00
Segun Babalola 1d88fac6f6 MDL-66391 core_course: Fix to send correct Ajax parameter for userid 2019-09-04 12:22:36 +01:00
Andrew Nicols 179762bd02 Merge branch 'MDL-66137-36_mod_assign_marking_workflow_incorrect_grade_display' of https://github.com/tomdickman/moodle into MOODLE_36_STABLE 2019-09-04 13:48:18 +08:00
Tom Dickman b51509778b MDL-66137 mod_assign: fixed marking workflow incorrect grade display
Aligned logic between quick grading changes and set marking workflow state changes to accurately
finalise or remove final grade from the gradebook, depending on the marking workflow state if
being used.
2019-09-04 15:08:49 +10:00
Andrew Nicols 245e70eeab Merge branch 'MDL-66554-36' of git://github.com/jleyva/moodle into MOODLE_36_STABLE 2019-09-04 12:41:30 +08:00
Andrew Nicols 98e7475aea Merge branch 'MDL-66500-36-unoconvwarning' of git://github.com/mudrd8mz/moodle into MOODLE_36_STABLE 2019-09-04 12:14:53 +08:00
Ryan Wyllie 6981a6f83b MDL-62284 javascript: prevent nested JS mustache handler calls
Prevent the JS mustache helper from being executed from within
the render call of another mustache helper because it can allow
users to inject JS into the page.
2019-09-04 11:24:05 +08:00
Ryan Wyllie d41890c0f7 MDL-62284 output: prevent nested JS mustache handler calls
Prevent the JS mustache helper from being executed from within
the render call of another mustache helper because it can allow
users to inject JS into the page.
2019-09-04 11:24:05 +08:00
Jake Dallimore 3f3cace28c Merge branch 'MDL-66265-36' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-09-04 11:07:17 +08:00
Andrew Nicols ba4d2dee9a MDL-66265 javascript: More specific overrides in eslintrc 2019-09-04 10:49:13 +08:00
Eloy Lafuente (stronk7) d8cb31ce19 Merge branch 'MDL-66265-36' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-09-04 02:14:28 +02:00
AMOS bot aa0f8fd86d Automatically generated installer lang files 2019-09-04 00:11:18 +00:00
Eloy Lafuente (stronk7) c4b7a43793 Merge branch 'MDL-66532-36' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-09-04 02:01:30 +02:00
Andrew Nicols 98a450e721 MDL-66265 javascript: Add jshint ignore for ES6 files in root dir 2019-09-04 06:53:45 +08:00
Andrew Nicols f8e02a34a7 MDL-66265 javascript: Add basic jshint ignores 2019-09-04 06:53:45 +08:00
Andrew Nicols b8a1748e48 MDL-66265 javascript: Bump jshint version 2019-09-04 06:53:45 +08:00
Andrew Nicols b043d306c3 MDL-66532 javascript: Lock NPM version for NVM 2019-09-04 06:53:44 +08:00
Andrew Nicols dd159713a8 MDL-66532 javascript: Lock NPM version for NVM 2019-09-04 06:45:51 +08:00
Eloy Lafuente (stronk7) 53c8bd1b2f Merge branch 'MDL-63315-m36' of https://github.com/sammarshallou/moodle into MOODLE_36_STABLE 2019-09-04 00:19:33 +02:00
Eloy Lafuente (stronk7) ed903633b3 Merge branch 'MDL-66120-36' of git://github.com/peterRd/moodle into MOODLE_36_STABLE 2019-09-03 12:12:47 +02:00
Andrew Nicols a029dfbc5b Merge branch 'MDL-66434-36' of https://github.com/lucaboesch/moodle into MOODLE_36_STABLE 2019-09-03 12:41:27 +08:00
Andrew Nicols 4aa04de246 Merge branch 'MDL-62161-36' of https://github.com/paulholden/moodle into MOODLE_36_STABLE 2019-09-03 11:50:34 +08:00
Andrew Nicols b1aba64aee Merge branch 'MDL-65042-36' of git://github.com/jleyva/moodle into MOODLE_36_STABLE 2019-09-03 09:29:51 +08:00
AMOS bot 51759ac646 Automatically generated installer lang files 2019-09-03 00:11:42 +00:00
Eloy Lafuente (stronk7) 0e884990f0 Merge branch 'MDL-66457-36' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-09-03 00:55:04 +02:00
sam marshall 7b2442a913 MDL-63315 DB: Postgres - Clear cursors in persistent connection
If there is a PHP fatal error and destructors do not run (this can
happen in out-of-memory errors, and maybe if there is an error in a
previous destructor) then Postgres cursors may be left open.

Usually this does not cause a problem because the connection is
closed anyway, but if using persistent connections, a future
request may reuse the connection with a cursor open. It then gets
errors when it tries to create a new cursor with the same name.

This change closes all cursors at the start of a persistent
connection.
2019-09-02 14:10:58 +01:00
Peter efe8b11186 MDL-66120 block_community: Disable community block and related caps
Disable community block access
2019-09-02 15:57:58 +08:00
Juan Leyva 1dca6b0fcf MDL-66501 tool_mobile: Prevent URLs in custom scheme 2019-09-02 15:29:55 +08:00
Jun Pataleta 64f0c4ceaa MDL-66187 format_singleactivity: Make sure available types is not empty 2019-09-02 05:06:37 +02:00
Andrew Nicols eacdff4e4f MDL-66187 course: Respect :addinstance in single activity format 2019-09-02 05:06:37 +02:00
Simey Lameze 1acf5e5da2 MDL-65749 lib: fix phpmailer file handling 2019-09-02 05:06:37 +02:00
Andrew Nicols 49523e0349 MDL-66181 course: Only assign roles that the user is allowed to assign 2019-09-02 05:06:37 +02:00
Andrew Nicols f63284d2eb MDL-66181 behat: You check checkboxes, not click them 2019-09-02 05:06:37 +02:00
Michael Hawkins 08e8818abe MDL-55451 mod_forum: Limit subscription redirect to internal URLs 2019-09-02 05:06:37 +02:00
David Monllaó 9dce35eae8 MDL-66069 mlbackend_python: Bump to a new version of the package 2019-09-02 05:06:37 +02:00
Andrew Nicols 8c21a3d340 Merge branch 'MDL-66472-36' of https://github.com/Dagefoerde/moodle into MOODLE_36_STABLE 2019-09-02 11:03:58 +08:00
Andrew Nicols 4a7316c071 Merge branch 'MDL-33087-36' of https://github.com/paulholden/moodle into MOODLE_36_STABLE 2019-09-02 10:48:35 +08:00
David Mudrák 1f69f00697 MDL-66504 lang: Use the new strings in the Behat scenario 2019-09-01 12:36:22 +02:00
Helen Foster 7334de1e6c MDL-66504 lang: Import fixed English strings (en_fix)
Significant string changes:

- mobilenotificationsdisabledwarning,tool_mobile - location corrected
- statsreport14,core - 'views/posts' corrected to 'posts/views'
- err_nousers,core_completion - explanation of who completion
- information is displayed for errorcourselisting,block_community - note
  about sunsetting moodle.net
2019-09-01 12:35:25 +02:00
Paul Holden ca1929d390 MDL-62161 user: preserve all selected users between searches. 2019-08-30 14:37:27 +01:00
Paul Holden 0fb84542b5 MDL-33087 tool_capability: correct role override link. 2019-08-30 14:34:41 +01:00
Andrew Nicols 2bfb88591a MDL-66457 behat: simplify selector search 2019-08-30 15:13:07 +08:00
Luca Bösch 46ebab12cf MDL-66434 mod_data: Align 'Field description' field as all other fields. 2019-08-30 07:56:10 +02:00
Jake Dallimore 2baf9a81d8 weekly release 3.6.5+ 2019-08-30 13:12:09 +08:00
Juan Leyva 1da54dc846 MDL-66554 mod_scorm: Set module viewed in WS 2019-08-29 20:46:18 +01:00
Jake Dallimore 0e314a4320 Merge branch 'MDL-66139_36' of https://github.com/stronk7/moodle into MOODLE_36_STABLE 2019-08-29 11:51:56 +08:00
Adrian Greeve 23fe5c9110 Merge branch 'MDL-65975-36' of git://github.com/jleyva/moodle into MOODLE_36_STABLE 2019-08-29 10:20:39 +08:00
Netica Informática 4639c08029 MDL-66139 cachestore_redis: Fix connection problems when port is not set
Due to some changes in Redis 5 php extension Moodle fails to connect via TCP when
no port is set. It's fixed upstream in phpredis repo (version 5.0.0, 5.0.1 and
5.0.2 affected so far), but with this patch we'll send the right port anyway.
2019-08-28 20:59:28 +02:00
Eloy Lafuente (stronk7) 3aa3952340 Merge branch 'MDL-63852-36' of https://github.com/lucaboesch/moodle into MOODLE_36_STABLE 2019-08-28 17:41:20 +02:00
Eloy Lafuente (stronk7) 80d85657b7 Merge branch 'MOODLE_36_STABLE_MDL-65116' of https://github.com/yao9394/moodle into MOODLE_36_STABLE 2019-08-28 16:59:28 +02:00
Adrian Greeve d631bfb4ef Merge branch 'MDL-66230-36' of https://github.com/paulholden/moodle into MOODLE_36_STABLE 2019-08-28 14:57:10 +08:00
Eloy Lafuente (stronk7) 6191d50b8a MDL-66184 core: Update composer to apply for php 7.0.0 as min
With behat extension v3.36.2 we started requiring php 7.0.0
(same requirement than core 3.6.x). This bumps all the components
in the lock file to suit that requirement.

Generated with php 7.0.x.
2019-08-27 00:32:36 +02:00
David Mudrák 2bcad30213 MDL-66500 lang: Do not mark unoconvwarning as deprecated
It has been deprecated by mistake.
2019-08-26 21:31:06 +02:00
Eloy Lafuente (stronk7) a93b0d75ed Merge branch 'MDL-66309-m36' of https://github.com/sammarshallou/moodle into MOODLE_36_STABLE 2019-08-26 20:25:28 +02:00
Eloy Lafuente (stronk7) ec160fed59 Merge branch 'MDL-66312-36' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-08-26 19:42:18 +02:00
Jan Dageförde 7ef1e8818d MDL-66472 forms: Fix regression autocomplete not closing 2019-08-26 17:55:53 +02:00
Eloy Lafuente (stronk7) 5f5e77c4ef weekly release 3.6.5+ 2019-08-23 19:16:28 +02:00
Jun Pataleta a7a2fb253f Merge branch 'MDL-66483_36' of git://github.com/stronk7/moodle into MOODLE_36_STABLE 2019-08-23 20:14:56 +08:00
sam marshall 14ba75116b MDL-66309 block_recentlyaccesseditems: Improve upgrade performance 2019-08-23 11:36:20 +01:00
Eloy Lafuente (stronk7) 07508900e4 MDL-66483 lib: remove recent xmlize dep on setuplib/CFG
This removes the dependency added by MDL-66110 (aiming to fix
a CI job). So we keep things as they were and will fix the
CI job separately.
2019-08-23 11:32:30 +02:00
Luca Bösch 7fd442d168 MDL-63852 behat: Using correct exception class path. 2019-08-23 07:55:04 +02:00
Adrian Greeve b6f9a29a5e weekly release 3.6.5+ 2019-08-23 12:55:26 +08:00
Adrian Greeve f753d02aea Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2019-08-23 12:55:18 +08:00
John Yao dc8bac39e3 MDL-65116 mod_assign : Assignment due date does not update for groups
This commit fixes the assignment due date not showing correctly according to groups selected by users who can view grades
2019-08-23 13:13:34 +10:00
Jun Pataleta 325f268cb1 Merge branch 'MDL-66110-36-fix' of git://github.com/junpataleta/moodle into MOODLE_36_STABLE 2019-08-23 10:21:42 +08:00
Jun Pataleta 46e9a19620 MDL-66110 core: Require setuplib.php once as it's required by xmlize.php 2019-08-23 10:16:15 +08:00
Jun Pataleta 67cf6f02c3 Merge branch 'MDL-66110-36-fix' of git://github.com/junpataleta/moodle into MOODLE_36_STABLE 2019-08-22 16:26:55 +08:00
Jun Pataleta 14404f91ea MDL-66110 dml: Undo table name fix when table name's used as parameter 2019-08-22 16:18:04 +08:00
Ryan Wyllie cdc64ab1dd MDL-66110 dml: use fix_table_name for all mysql table names
Changed all of the places that were manually prefixing the table
name to instead fix the table name with the fix_table_name
function.
2019-08-22 16:18:04 +08:00
Adrian Greeve 955937a856 Merge branch 'MDL-66378-36' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-08-22 09:30:38 +08:00
Andrew Nicols 0ae284c15b MDL-66378 behat: Increase window size for rubric tests 2019-08-22 07:56:19 +08:00
Andrew Nicols 879946be6a MDL-66378 behat: Change screen size to small to work around UI bugs 2019-08-22 07:56:19 +08:00
Adrian Greeve 0287fd6499 Merge branch 'MDL-65443-m36' of https://github.com/NeillM/moodle into MOODLE_36_STABLE 2019-08-21 16:39:57 +08:00
Neill Magill 0d51c25e85 MDL-65443 core: Improve class descriptions for locking events 2019-08-21 09:05:19 +01:00
Jun Pataleta d113822e72 Merge branch 'MDL-66110-36' of https://github.com/ryanwyllie/moodle into MOODLE_36_STABLE 2019-08-21 09:57:23 +08:00
Adrian Greeve 8839000d68 Merge branch 'MDL-66378-36' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-08-21 09:02:39 +08:00
Andrew Nicols ceb89d1fb0 MDL-66378 behat: Correct grammar of resize step 2019-08-21 08:39:51 +08:00
Andrew Nicols 53b41d3a84 MDL-66378 grade: Set window size to large for rubric tests 2019-08-21 08:39:28 +08:00
Andrew Nicols 33c9f1fa48 MDL-66378 behat: All args are required for document.evaluate 2019-08-21 08:24:08 +08:00
AMOS bot c4cf607c19 Automatically generated installer lang files 2019-08-21 00:11:25 +00:00
Neill Magill e8b4c32290 MDL-65443 core: Log when a context is locked or unlocked 2019-08-20 09:33:03 +01:00
Jun Pataleta a3b6b58f19 Merge branch 'MDL-64437-36' of git://github.com/mihailges/moodle into MOODLE_36_STABLE 2019-08-20 14:19:08 +08:00
Adrian Greeve f18c63e584 Merge branch 'MDL-66378-36' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-08-20 14:10:51 +08:00
Jun Pataleta 46f06e7697 Merge branch 'MDL-65507-36' of git://github.com/mihailges/moodle into MOODLE_36_STABLE 2019-08-20 11:57:05 +08:00
Jun Pataleta ac858f44ae Merge branch 'MDL-66248_36' of https://github.com/dvdcastro/moodle into MOODLE_36_STABLE 2019-08-20 10:58:23 +08:00
Adrian Greeve dfba6ffe7f Merge branch 'MDL-65083-36' of git://github.com/bmbrands/moodle into MOODLE_36_STABLE 2019-08-20 10:06:13 +08:00
David Castro 5cfa863adc MDL-66248 mod_forum: Fixes on portofolio command url styling. 2019-08-19 20:56:06 -05:00
Adrian Greeve 904caddecb Merge branch 'MDL-65561-36' of git://github.com/bmbrands/moodle into MOODLE_36_STABLE 2019-08-20 09:38:18 +08:00
AMOS bot d8d1c97ef7 Automatically generated installer lang files 2019-08-20 00:10:51 +00:00
Adrian Greeve f026d258b8 Merge branch 'MDL-65604-36' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-08-19 16:29:21 +08:00
Bas Brands e4854c6653 MDL-65561 themes: user date filters display fixes 2019-08-19 08:25:24 +02:00
Bas Brands 9b36c1408e MDL-65083 theme_boost: update uses of pull-xs-right 2019-08-19 08:22:13 +02:00
Mihail Geshoski 1b8a5338dd MDL-64437 assignment: Fix element overlaping in low screen resolution 2019-08-19 13:32:02 +08:00
Mihail Geshoski 5d64e8eef1 MDL-65507 mod_data: Remove unnecessary record created event 2019-08-19 13:27:36 +08:00
Andrew Nicols 2076f32acb MDL-66378 competency: Add pending promises to competency chooser 2019-08-19 08:16:40 +08:00
Andrew Nicols 28b8712820 MDL-66378 behat: JS does not work with newlines in an xpath 2019-08-19 08:16:40 +08:00
Andrew Nicols 5680713966 MDL-66378 behat: Fix use of before/after selectors 2019-08-19 08:16:40 +08:00
Andrew Nicols f782dcffdc MDL-66378 behat: Backport expand autocomplete step 2019-08-17 16:37:40 +08:00
Andrew Nicols 9e812c35a7 MDL-66378 behat: Add partial named selector for whole autocomplete field 2019-08-17 16:37:40 +08:00
Andrew Nicols 38a64383f1 MDL-66378 behat: Before/after detection should be constrainable
The default before/after detection checks the entire body. Any match of
the text will therefore be found.

Add support for specification of a container for the nodes.
2019-08-17 16:37:40 +08:00
Andrew Nicols 7d84120a0e MDL-66378 behat: Add non-JS fallback for before/after 2019-08-17 16:37:40 +08:00
sam marshall a4dcb6a26a MDL-66378 Behat: Speed up 'before/after' step in Chrome
On some Chrome versions the xpath used for before/after is slow
and (sometimes) uses a lot of memory. This change uses pure
JavaScript to do the before/after calculation, which should always
be fast.
2019-08-17 16:37:40 +08:00
Andrew Nicols 26a36d2595 MDL-66378 behat: Correct invalid uses of selection from dropdown 2019-08-17 16:37:40 +08:00
Andrew Nicols 10b49eabb1 MDL-66378 report_participation: Correct label for target 2019-08-17 16:37:40 +08:00
Andrew Nicols 2b937e35d6 MDL-66378 gradereport_singleview: Add missing label for dropdown 2019-08-17 16:37:40 +08:00
Andrew Nicols d47457b4aa MDL-66378 behat: Update screen sizes to Y2K standards 2019-08-17 10:32:19 +08:00
Andrew Nicols fb7a713f4c MDL-66378 behat: Update dependencies for chrome webdriver fix 2019-08-17 10:32:19 +08:00
Juan Leyva 0cf9600c9b MDL-65042 rating: Fix incorrect image generated for user in rating 2019-08-16 15:41:50 +01:00
Andrew Nicols 55515e15dc MDL-66312 js: Autocomplete promises were inside out
The pending promise should nott be resolved until the changes are
complete.
Previously the resolution of the pendingPromise was triggering the other
changes.
2019-08-16 11:40:15 +08:00
Andrew Nicols d36b3034d0 weekly release 3.6.5+ 2019-08-16 11:06:58 +08:00
Andrew Nicols 9353a72693 Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2019-08-16 11:06:56 +08:00
Juan Leyva c580658cf0 MDL-65975 tool_mobile: Backport features admin should be able to disable 2019-08-15 13:04:33 +01:00
Andrew Nicols f51040346d Merge branch 'MDL-35939-36-fix' of git://github.com/junpataleta/moodle into MOODLE_36_STABLE 2019-08-15 16:10:03 +08:00
Jun Pataleta ee6c9e92ae MDL-35939 mod_quiz: Add quiz attempt generator function 2019-08-15 16:06:13 +08:00
Andrew Nicols ab44453bde Merge branch 'MDL-35939-36' of git://github.com/rezaies/moodle into MOODLE_36_STABLE 2019-08-15 12:04:12 +08:00
Jun Pataleta 6e3a15df95 Merge branch 'm36_MDL-66140_Mitigate_PECL_Solr_issue_Ref_72740' of https://github.com/scara/moodle into MOODLE_36_STABLE 2019-08-15 11:17:50 +08:00
Shamim Rezaie 01a06cb489 MDL-35939 mod_quiz: use descriptive titles for pages 2019-08-15 12:27:05 +10:00
Shamim Rezaie f0143c5a5e MDL-35939 mod_quiz: phpdoc fix 2019-08-15 12:27:05 +10:00
Shamim Rezaie 5dd2654b6f MDL-35939 mod_quiz: new functions to generate title for attempt pages 2019-08-15 12:27:03 +10:00
AMOS bot 350823fe15 Automatically generated installer lang files 2019-08-15 00:13:03 +00:00
Jun Pataleta 7adb08d1ad Merge branch 'MDL-65925-grade-page-broken-for-deleted-submission-MOODLE_36_STABLE' of https://github.com/ilya-catalyst/moodle into MOODLE_36_STABLE 2019-08-14 15:26:29 +08:00
Andrew Nicols 247f3431d5 Merge branch 'patch-3' of https://github.com/aspark21/moodle into MOODLE_36_STABLE 2019-08-14 11:38:21 +08:00
Adrian Greeve 7313f15abc Merge branch 'MDL-52849-36' of git://github.com/peterRd/moodle into MOODLE_36_STABLE 2019-08-14 09:08:37 +08:00
Jun Pataleta 7ea95c10dd Merge branch 'MDL-62034-36' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-08-13 14:20:27 +08:00
Andrew Nicols 06259d40ae MDL-62034 assign: Add hint for user tour reset 2019-08-13 14:13:12 +08:00
Ryan Wyllie 678d682b35 MDL-66110 dml: Fix MySQL v8 compatibility with groups table
MySQL v8 has added "groups" to the reserved word list. That is used
as a table name in Moodle so we have to quote it with backticks in the
SQL so that MySQL knows it's being used as an identifier.
2019-08-13 11:14:24 +08:00
Jun Pataleta 9f4959bd87 Merge branch 'MDL-66104_36' of git://github.com/stronk7/moodle into MOODLE_36_STABLE 2019-08-12 14:51:45 +08:00
Peter 051d6f74e4 MDL-52849 core: Focus reader onto popup with ajax errors 2019-08-12 10:52:18 +08:00
Ilya Tregubov 40b81687d6 MDL-65925 assign: Grade page broken if submission was deleted. 2019-08-12 09:27:26 +10:00
Matteo Scaramuccia c77c2a8a06 MDL-66140 search: Mitigate PECL solr extension regression
Refs:
- https://bugs.php.net/bug.php?id=72740
- https://bugs.php.net/bug.php?id=75631
- https://github.com/php/pecl-search_engine-solr/pull/16
2019-08-11 20:07:52 +02:00
Andrew Nicols 10720c81cd MDL-65604 repository: Kill off missing param errors
The file picker template included an img with a src of "#". When the
template was loaded into the modal, the browser fetches the img src, but
it's immediately removed as that section is only used as an in-place
template. The src tag does not need to be present.
2019-08-11 14:53:09 +08:00
AMOS bot 916ca9c774 Automatically generated installer lang files 2019-08-10 00:11:27 +00:00
Jun Pataleta 0f07f03670 weekly release 3.6.5+ 2019-08-09 16:24:03 +08:00
Jun Pataleta 600b85f83a Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2019-08-09 16:24:01 +08:00
Jun Pataleta 7cfc31d809 Merge branch 'MDL-65679-36-fix' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-08-09 11:39:44 +08:00
Andrew Nicols 5543c95ccd MDL-65679 assignfeedback_editpdf: Adjust z-indexes for editpdf 2019-08-09 08:35:40 +08:00
Victor Deniz Falcon b791a215ff MDL-66272 core_renderer: fix favicon method PHPDoc 2019-08-08 12:47:58 +08:00
Amaia Anabitarte b8846767fe MDL-60636 behat: Fixing modified xpath 2019-08-08 11:58:17 +08:00
Andrew Nicols bcd7c897d1 Merge branch 'MDL-65595-36' of git://github.com/peterRd/moodle into MOODLE_36_STABLE 2019-08-08 10:28:52 +08:00
Jun Pataleta 7e11f3c83c Merge branch 'MDL-57239_36' of https://github.com/timhunt/moodle into MOODLE_36_STABLE 2019-08-08 08:48:05 +08:00
Bas Brands ffbbf7d9f2 MDL-60636 themes: form autocomplete chevron down 3.6 extra fix 2019-08-07 16:11:24 +08:00
Andrew Nicols 2770a205b6 Merge branch 'MDL-66039-36' of git://github.com/bmbrands/moodle into MOODLE_36_STABLE 2019-08-07 15:33:13 +08:00
Jun Pataleta 0b44aeaf9d Merge branch 'MDL-56789-36' of git://github.com/rezaies/moodle into MOODLE_36_STABLE 2019-08-07 13:58:19 +08:00
Shamim Rezaie 0157d682d5 MDL-56789 core: Improve unit tests 2019-08-07 15:36:09 +10:00
Shamim Rezaie ae0e8015c5 MDL-56789 core: Recycle bin warn only if a grade item is being deleted 2019-08-07 15:34:44 +10:00
Sara Arjona 4f91fb9538 Merge branch 'MDL-63198-36' of git://github.com/rezaies/moodle into MOODLE_36_STABLE 2019-08-07 11:08:09 +08:00
Sara Arjona ad4427fc31 Merge branch 'MDL-60636-36' of git://github.com/bmbrands/moodle into MOODLE_36_STABLE 2019-08-07 10:01:07 +08:00
Alistair Spark 553732088e MDL-66071 user: username is required with non-internal auth method 2019-08-07 01:03:03 +02:00
Sara Arjona 3cbf774ef0 Merge branch 'MDL-64598-36' of https://github.com/lucaboesch/moodle into MOODLE_36_STABLE 2019-08-06 15:30:23 +08:00
Andrew Nicols c9d36709fc Merge branch 'MDL-65679-36' of git://github.com/mihailges/moodle into MOODLE_36_STABLE 2019-08-06 13:18:26 +08:00
Andrew Nicols 6b8b1afb50 Merge branch 'MDL-65992-36' of git://github.com/Chocolate-lightning/moodle into MOODLE_36_STABLE 2019-08-06 09:14:22 +08:00
Andrew Nicols 63aa3dc1af Merge branch 'MDL-33884_36' of https://github.com/timhunt/moodle into MOODLE_36_STABLE 2019-08-05 14:34:13 +08:00
Sara Arjona aee7b3c316 Merge branch 'MDL-66281-36' of git://github.com/junpataleta/moodle into MOODLE_36_STABLE 2019-08-05 13:41:17 +08:00
Shamim Rezaie 202c04bbcd MDL-63198 forms: click on scrollbar should not close the suggestions box 2019-08-05 13:17:50 +10:00
Tim Hunt 8a14da2383 MDL-57239 qbehaviour_interactive: fix Try again button when reviewing 2019-08-02 11:46:55 +01:00
Luca Bösch 71eba0cb1d MDL-64598 pix: Adding width/height information to emoji SVG images. 2019-08-02 11:53:44 +02:00
AMOS bot 871454b2dc Automatically generated installer lang files 2019-08-02 00:11:32 +00:00
AMOS bot f8f338c2c8 Automatically generated installer lang files 2019-08-02 00:11:32 +00:00
Mihail Geshoski 2207bea33c MDL-65679 assign: Collapsing comments
The comments should appear above everything else when expanded, and expanding/collapsing comments
should not affect the position of anything else in the page.

All credit goes to Damyon Wiese.
2019-08-02 07:39:14 +08:00
Eloy Lafuente (stronk7) a58897441e MDL-66104 output: HTMLPurifier to allow <nolink> tags everywhere
Before the patch, HTMLPurifier was instructed to handle <nolink>
tags in block mode. That implies that any block tag enclosing it
had to be closed for HTML compliance.

But <noscript> tags are not part of the final output (they are
removed) but just internally used to skip filtering certain areas.

So they can be virtually everywhere, HTMLPurifier just should allow
them without any change, both to parent or children tags.
2019-08-01 17:53:16 +02:00
Eloy Lafuente (stronk7) 0e4e2ce352 weekly release 3.6.5+ 2019-08-01 17:07:02 +02:00
Eloy Lafuente (stronk7) 946e06bbdc Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2019-08-01 17:06:59 +02:00
Shamim Rezaie 36f588f8fb MDL-56789 core: Added unit test for course_modules_pending_deletion 2019-08-01 19:16:37 +10:00
Eloy Lafuente (stronk7) c9b3d8e710 Merge branch 'MDL-50472-36' of git://github.com/Chocolate-lightning/moodle into MOODLE_36_STABLE 2019-08-01 10:12:05 +02:00
Mathew May c8ac8de2c7 MDL-50472 boost: Add maintenance message to the login page. 2019-08-01 14:38:45 +08:00
Sara Arjona c89aaced1a Merge branch 'MDL-42451-36' of git://github.com/Chocolate-lightning/moodle into MOODLE_36_STABLE 2019-08-01 09:53:58 +08:00
Eloy Lafuente (stronk7) 99fb1c8c7b Merge branch 'MDL-50472-36' of git://github.com/Chocolate-lightning/moodle into MOODLE_36_STABLE 2019-08-01 00:28:50 +02:00
Eloy Lafuente (stronk7) 2b22c47ac3 Merge branch 'MDL-57342-36' of git://github.com/Chocolate-lightning/moodle into MOODLE_36_STABLE 2019-07-31 18:56:44 +02:00
Tim Hunt a1cb73feea MDL-33884 question export: raise memory limit
Question exports can be quite big, just like imports can. Therefore, we
should raise memory limits in the same way.

(Of course, eventually we should change the API, so that it writes one
questoin at a time, rather than building the whole export file contents
in RAM first, but that would be a much bigger change, and we need a
quick fix now.)
2019-07-31 16:40:11 +01:00
Mathew May ecbd999ca3 MDL-42451 installation: Add some Bootstrap classes for install 2019-07-31 14:41:01 +08:00
Mathew May 35d3396f21 MDL-65992 travis: Migrate to Xenial distro and default MySQL service 2019-07-31 13:03:15 +08:00
Peter 2ce7e21395 MDL-65595 core: Remove the nowrap from the form's radio template 2019-07-31 08:20:20 +08:00
AMOS bot baa3eec946 Automatically generated installer lang files 2019-07-31 00:09:23 +00:00
Paul Holden 67d288f6c2 MDL-66230 tool_usertours: account for deleted tours in privacy export. 2019-07-30 09:56:55 +01:00
Sara Arjona 22ecbc36c7 Merge branch 'MDL-64195-36' of git://github.com/bmbrands/moodle into MOODLE_36_STABLE 2019-07-30 16:35:05 +08:00
Jun Pataleta 39789fcbd1 MDL-66281 tool_dataprivacy: Set sensitive data processing default value 2019-07-30 13:59:29 +08:00
Sara Arjona b861e09e65 Merge branch 'MDL-63458_36' of https://github.com/rlorenzo/moodle into MOODLE_36_STABLE 2019-07-30 11:59:47 +08:00
Adrian Greeve e974568f89 Merge branch 'MDL-66174-36' of git://github.com/peterRd/moodle into MOODLE_36_STABLE 2019-07-29 14:41:13 +08:00
Mathew May 28a27595e3 MDL-42451 installation: Allow enter key to proceed 2019-07-29 11:07:13 +08:00
Mathew May 7c5d2ebc95 MDL-50472 auth: Add maintenance message to the login page. 2019-07-29 10:51:22 +08:00
Jake Dallimore da6bf80c2f Merge branch 'MDL-65219-36' of https://github.com/ryanwyllie/moodle into MOODLE_36_STABLE 2019-07-26 15:21:53 +08:00
Eloy Lafuente (stronk7) 325b025522 weekly release 3.6.5+ 2019-07-25 13:44:53 +02:00
Adrian Greeve 24a8a6a043 Merge branch 'MDL-65078-36' of git://github.com/peterRd/moodle into MOODLE_36_STABLE 2019-07-24 09:53:55 +08:00
Mathew May 11cfdfb171 MDL-57342 admin: confightml will check if returned data is empty 2019-07-23 13:29:45 +08:00
Eloy Lafuente (stronk7) ac224b87a9 Merge branch 'MDL-65788-36' of git://github.com/Chocolate-lightning/moodle into MOODLE_36_STABLE 2019-07-22 21:33:52 +02:00
Eloy Lafuente (stronk7) 6bc76a5086 Merge branch 'MDL-66132-m36' of https://github.com/sammarshallou/moodle into MOODLE_36_STABLE 2019-07-22 20:40:54 +02:00
Bas Brands b23aa517f8 MDL-64195 theme_bootstrapbase: message drawer position
* prevent hiding the navbar behind the message drawer on small devices
2019-07-22 17:10:25 +02:00
Adrian Greeve 8a2dfa7ea1 Merge branch 'MDL-66136-36' of git://github.com/mihailges/moodle into MOODLE_36_STABLE 2019-07-22 10:43:14 +08:00
Mihail Geshoski d59b0eefac MDL-66136 assign: Verify presence of resources in online text submission 2019-07-22 08:02:57 +08:00
Mihail Geshoski d6c09ba2f3 MDL-66136 assignfeedback_comments: Extend testcase 2019-07-22 08:02:57 +08:00
Eloy Lafuente (stronk7) 62238e0117 Merge branch 'MDL-50733_36' of git://github.com/stronk7/moodle into MOODLE_36_STABLE 2019-07-20 00:25:03 +02:00
Mathew May 5610176e3c MDL-50733 core: Update composer to updated behat-extension 2019-07-19 16:22:25 +02:00
Eloy Lafuente (stronk7) bde0f62364 weekly release 3.6.5+ 2019-07-18 17:11:39 +02:00
Eloy Lafuente (stronk7) 2a7d48cd1a Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2019-07-18 17:11:37 +02:00
Peter d47848dbc4 MDL-66174 mod_assign: Remove the strict widths on the annotation menu 2019-07-18 12:56:11 +08:00
Mathew May 23aae2b6ea MDL-65788 tool_policy: Move accept_policy JS call into an array 2019-07-18 10:48:36 +08:00
Andrew Nicols 7cf1f6d8d5 Merge branch 'MDL-59911-conv_cleanup_check-36' of git://github.com/leonstr/moodle into MOODLE_36_STABLE 2019-07-18 08:25:56 +08:00
Andrew Nicols 2f3ef4c515 Merge branch 'MDL-66163-36' of git://github.com/marinaglancy/moodle into MOODLE_36_STABLE 2019-07-18 08:16:59 +08:00
AMOS bot 93fab635bd Automatically generated installer lang files 2019-07-18 00:09:13 +00:00
Eloy Lafuente (stronk7) e284dc2042 Merge branch 'MDL-66115_36' of https://github.com/dvdcastro/moodle into MOODLE_36_STABLE 2019-07-17 23:10:01 +02:00
Bas Brands 59af2fc881 MDL-60636 themes: form autocomplete chevron down on mobile 2019-07-17 13:40:25 +02:00
Andrew Nicols 4adb26ca32 Merge branch 'MDL-65538-36' of git://github.com/sarjona/moodle into MOODLE_36_STABLE 2019-07-17 10:56:34 +08:00
Bas Brands 493ed38380 MDL-65357 themes: position enrolment icons in course listing 2019-07-17 09:42:29 +08:00
Eloy Lafuente (stronk7) fc22282d3b Merge branch 'MDL-66032-MOODLE_36_STABLE_awarded_badges_criteria' of https://github.com/andrewmadden/moodle into MOODLE_36_STABLE 2019-07-17 01:32:05 +02:00
Eloy Lafuente (stronk7) a6006f5a4b Merge branch 'MDL-65908-36' of git://github.com/peterRd/moodle into MOODLE_36_STABLE 2019-07-17 01:21:26 +02:00
Marina Glancy 9684f897ac MDL-66163 mod_forum: Add component to unittest sql queries
files from other components may exist in the files table
2019-07-16 20:37:09 +03:00
Leon Stringer cce561cdfe MDL-59911 fileconverter_unoconv: Fix: test PDF fails after upgrade
When generating the PDF of unoconv_test.docx this file's previous conversions
are removed from mdl_file_conversion.  But these may also be removed by
\core_files\task\conversion_cleanup_task in which case an error occurs as
delete() is invoked with a NULL id.  Added check for non-NULL id prior to
invoking delete().
2019-07-16 16:23:30 +01:00
Eloy Lafuente (stronk7) c53c3bbe03 Merge branch 'MDL-65555_MOODLE_36_STABLE' of https://github.com/tuanngocnguyen/moodle into MOODLE_36_STABLE 2019-07-16 12:36:38 +02:00
Andrew Nicols fbfbff8046 Merge branch 'MOODLE_36_STABLE_MDL-65517' of https://github.com/yao9394/moodle into MOODLE_36_STABLE 2019-07-16 12:23:38 +08:00
Andrew Nicols 8dc48409ab Merge branch 'MDL-65409-36' of git://github.com/mihailges/moodle into MOODLE_36_STABLE 2019-07-16 11:37:06 +08:00
Nathan Nguyen 5a1de3de31 MDL-65555 mod_lesson: fix group override backup and restore 2019-07-16 12:57:31 +10:00
Nathan Nguyen 6cb12d596f MDL-65555 mod_quiz: fix group override backup and restore 2019-07-16 12:56:23 +10:00
Ryan Wyllie 75d82cfa72 MDL-65219 message: add message/pendingcontactrequests.php page back
We previously had this page when contact requests were first introduced
and unfortunately we created a bunch of notifications that reference
this URL directly which now won't work because the page has been removed.

I've added it back but set it to redirect to the message/index.php page
and load the contact requests page there.
2019-07-16 09:49:54 +08:00
Damyon Wiese b0487262ec MDL-65078 competencies: fix webservice
The webservice list_course_module_competencies calls a function that does not exist.

Thanks to Marie-Eve Lévesque for reporting this issue.
2019-07-16 09:48:16 +08:00
Andrew Madden fab4db0994 MDL-66032 badges: Prevent empty awarded badges criteria being created.
When creating or editing the awarded badges criteria, the select element should be
required to prevent empty criteria from being created. In addition, if there are
already badges created with the empty criteria, there should be not be an exception
thrown when assessing whether the criteria has been completed.
2019-07-16 09:35:23 +10:00
Sara Arjona 8504b17c4a MDL-65538 competency: fix behat errors with firefox
There is a random behat error in 3.7 and master when executing the "Go to
the competency course competencies page." scenario: "Moodle exception: A
required parameter (courseid) was missing More information about this error".
It happens because sometimes the form is sent before the JS and it hasn't
the needed parameters defined. So they have been added as hidden to the
form to avoid the error (which I couldn't reproduce manually).
2019-07-15 14:22:46 +02:00
Eloy Lafuente (stronk7) ae2a7a21cb Merge branch 'MDL-58026-36' of https://github.com/MartinGauk/moodle into MOODLE_36_STABLE 2019-07-15 13:39:05 +02:00
Peter e024a6ca05 MDL-65908 mod_assign: Remove scroll repositioning.
Absolute positioned elements do not require repositioning on scroll as long as
their immediate parent is relatively positioned.
2019-07-15 08:44:28 +08:00
Peter fe8fcea294 MDL-65908 assign: Overflow and positioning updates
Draw all annotation within the drawing canvas instead of the region
2019-07-15 08:42:48 +08:00
Peter d75d48f497 MDL-65908 assign: Revert overflow scroll fix
Revert "MDL-65484 assign: Scrolling overflow CSS"

This reverts commit 5bda066caa.
2019-07-15 08:40:02 +08:00
Mathew May bc68cb69ca MDL-65788 tool_policy: Prevent two modals rendering for guests.
With the Guest registration calling policyactions.js the [data-action="view"]
was having two click handlers set on the inital policy modal trgger.
With this commit we state what we want the click event to be set on.
2019-07-14 18:54:07 +08:00
AMOS bot 9b06a22e03 Automatically generated installer lang files 2019-07-14 00:08:58 +00:00
David Castro a6b048b60b MDL-66115 qtype_ddimageortext: Fixing choice deletion.
Summarising responses fails when question choices have been removed.

AMOS BEGIN
CPY [deletedchoice,qtype_match],[deletedchoice,qtype_ddimageortext]
AMOS END
2019-07-12 14:35:32 -05:00
sam marshall d351dc5a59 MDL-66132 Search: Behat tests should use simpledb, fix mock count
When searching using mock results (the 'global search expects the
query' step), the result count is not correctly set. As a result, the
page incorrectly reports that there are no results and doesn't
correctly show the first page of multi-page results.

Additionally, some of the core Behat tests can now be moved to use
real searching with the simpledb engine, rather than using mock
results at all. This gives better tests.

Unfortunately it was not possible to move all of the core Behat tests
and deprecate the mock step, because some of the tests are related to
the UI for 'special' features searching by user or group, neither of
which are supported by the simpledb engine.
2019-07-12 17:40:16 +01:00
Damyon Wiese 6cbef68ec2 MDL-65409 files: Allow location header
Allow incorrect capitals in location header response.
2019-07-12 08:45:05 +08:00
John Yao c1bcad4ea7 MDL-65517 block_timeline: Hide completed course modules in Timeline
When some activities are manually completed by students, some are still showing in students' timeline.
This commit fix that for module assign,chat,choice,feedback,lesson,quiz,scorm and workshop.
2019-07-12 09:18:43 +10:00
Eloy Lafuente (stronk7) 5701d69f99 weekly release 3.6.5+ 2019-07-11 23:33:45 +02:00
Eloy Lafuente (stronk7) 5755a823e1 Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2019-07-11 23:33:43 +02:00
Bas Brands c0bbdc4c20 MDL-66039 themes: remove duplicate css
* removed duplicate #page { margin-top: 50px };
2019-07-11 14:55:34 +02:00
Jun Pataleta 99f0d38c56 Merge branch 'MDL-65926-MOODLE_36_STABLE_lowercase_username_sql_query' of https://github.com/andrewmadden/moodle into MOODLE_36_STABLE 2019-07-11 11:00:19 +08:00
AMOS bot 602d1c020f Automatically generated installer lang files 2019-07-11 00:09:11 +00:00
Andrew Madden 87bcae7a57 MDL-65926 moodlelib: Convert username to lowercase prior to SQL query
Within a very large project, it was found that searching for a user with their username in the user table using a case insensitive
search was inefficient. Instead it is proposed that the username input is made to be lowercase prior to executing a database query
as the username for each user in the database must be lowercase. This allows for a case sensitive query to find the user data.
Essentially we are moving a case insensitive search for a user from SQL into PHP to increase performance.
2019-07-10 19:56:36 +10:00
Jun Pataleta bee49acf1e Merge branch 'MDL-66012-36' of git://github.com/lameze/moodle into MOODLE_36_STABLE 2019-07-10 12:15:55 +08:00
Simey Lameze 59aae6ab8c MDL-66012 calendar: fix no event message on calendar views
Ahhh Jun. Thanks legend :)
2019-07-10 11:33:32 +08:00
Eloy Lafuente (stronk7) 31b6ef812b Merge branch 'MDL-56835_36-coursetimecreated' of git://github.com/markn86/moodle into MOODLE_36_STABLE 2019-07-10 00:15:10 +02:00
Jun Pataleta 03b29c9b75 Merge branch 'MDL-66081-36' of git://github.com/lameze/moodle into MOODLE_36_STABLE 2019-07-09 17:10:00 +08:00
Andrew Nicols c26796c0e7 Merge branch 'MDL-64258-36' of https://github.com/HuongNV13/moodle into MOODLE_36_STABLE 2019-07-09 14:51:39 +08:00
Andrew Nicols e6d981b3c2 Merge branch 'MDL-65965-36-fix' of git://github.com/junpataleta/moodle into MOODLE_36_STABLE 2019-07-09 11:00:47 +08:00
Jun Pataleta a73230bf10 MDL-65965 behat: Do not fetch grouping IDs for empty grouping idnumbers 2019-07-09 10:49:18 +08:00
Mark Nelson 0b7e375d32 MDL-56835 report_participation: remove unreachable if condition 2019-07-09 09:15:16 +08:00
Mark Nelson 4a8da9b005 MDL-56835 report_participation: initialise action variables 2019-07-09 08:32:20 +08:00
Mark Nelson c241a52e12 MDL-56835 report_participation: use course timecreated as minlog 2019-07-09 08:32:12 +08:00
Matt Porritt fec1ffae54 MDL-56835 report_participation: release session lock 2019-07-09 08:31:47 +08:00
Eloy Lafuente (stronk7) dbcdedffd6 Merge branch 'MDL-66054-36' of git://github.com/rezaies/moodle into MOODLE_36_STABLE 2019-07-09 00:57:36 +02:00
Eloy Lafuente (stronk7) 0242b2596a Merge branch 'MDL-65965-36' of git://github.com/junpataleta/moodle into MOODLE_36_STABLE 2019-07-09 00:55:17 +02:00
Martin Gauk ee3cecc141 MDL-58026 question: fix regrading in progress attempt
Do not convert autosave steps to true steps when regrading.

Thanks Eric Merrill for providing the unit test code.
2019-07-08 09:15:27 +00:00
AMOS bot 719e34fba7 Automatically generated installer lang files 2019-07-08 00:10:18 +00:00
AMOS bot a36a01c543 Automatically generated installer lang files 2019-07-07 00:09:05 +00:00
Simey Lameze 32265ff372 MDL-66081 calendar: fix typo in attribute description 2019-07-05 17:08:13 +08:00
Huong Nguyen 95594d39df MDL-64258 Group: Performance problem on the enrol group members page 2019-07-03 15:29:52 +07:00
Huong Nguyen 7d58ebbb19 MDL-64258 Group: Unit Test for find_users function 2019-07-03 15:29:42 +07:00
Shamim Rezaie 5876688def MDL-66054 behat: typo fix 2019-07-02 04:05:52 +10:00
Nicolas Dunand 029c0fdb85 MDL-63458 core_user: Remove send message if messaging is disabled 2019-06-26 11:29:35 -07:00
Jun Pataleta 5a0a757830 MDL-65965 behat: Map grouping for activity data generator 2019-06-21 15:41:04 +08:00
Jun Pataleta bdd0fce48d MDL-65965 availability: Behat test for activity grouping restriction 2019-06-21 15:41:04 +08:00
299 changed files with 4666 additions and 2368 deletions
+1 -1
View File
@@ -203,7 +203,7 @@
}
},
{
files: ["**/amd/src/*.js"],
files: ["**/amd/src/*.js", "Gruntfile.js"],
// Check AMD with some slightly stricter rules.
rules: {
'no-unused-vars': 'error',
+2
View File
@@ -0,0 +1,2 @@
**/amd/**
/*.js
+1
View File
@@ -0,0 +1 @@
v8.16.1
+6 -7
View File
@@ -11,7 +11,10 @@ notifications:
language: php
dist: trusty
dist: xenial
services:
- mysql
php:
# We only run the highest and lowest supported versions to reduce the load on travis-ci.org.
@@ -20,10 +23,6 @@ php:
addons:
postgresql: "9.6"
packages:
- mysql-server-5.6
- mysql-client-core-5.6
- mysql-client-5.6
# Redis tests are currently failing on php 7.2 due to https://bugs.php.net/bug.php?id=75628
# services:
@@ -78,10 +77,10 @@ install:
then
sudo mkdir /mnt/ramdisk
sudo mount -t tmpfs -o size=1024m tmpfs /mnt/ramdisk
sudo stop mysql
sudo service mysql stop
sudo mv /var/lib/mysql /mnt/ramdisk
sudo ln -s /mnt/ramdisk/mysql /var/lib/mysql
sudo start mysql
sudo service mysql restart
fi
- >
if [ "$DB" = 'pgsql' ];
+1
View File
@@ -24,6 +24,7 @@
* Grunt configuration
*/
/* eslint-env node */
module.exports = function(grunt) {
var path = require('path'),
tasks = {},
@@ -623,7 +623,7 @@ class core_role_define_role_table_advanced extends core_role_capability_table_wi
echo "</label>\n";
}
if ($helpicon) {
echo '<span class="pull-xs-right text-nowrap">'.$helpicon.'</span>';
echo '<span class="float-sm-right text-nowrap">'.$helpicon.'</span>';
}
echo '</div>';
if (isset($this->errors[$name])) {
+1
View File
@@ -9,6 +9,7 @@ Feature: Manage tokens
| username | password | firstname | lastname |
| testuser | testuser | Joe | Bloggs |
| testuser2 | testuser2 | TestFirstname | TestLastname |
And I change window size to "small"
And I log in as "admin"
And I am on site homepage
@@ -20,12 +20,12 @@ Feature: Edit capabilities
And I set the following system permissions of "Teacher" role:
| capability | permission |
| block/mnet_hosts:myaddinstance | Allow |
| moodle/community:add | Inherit |
| moodle/site:messageanyuser | Inherit |
| moodle/grade:managesharedforms | Prevent |
| moodle/course:request | Prohibit |
When I follow "Edit Teacher role"
Then "block/mnet_hosts:myaddinstance" capability has "Allow" permission
And "moodle/community:add" capability has "Not set" permission
And "moodle/site:messageanyuser" capability has "Not set" permission
And "moodle/grade:managesharedforms" capability has "Prevent" permission
And "moodle/course:request" capability has "Prohibit" permission
+11 -9
View File
@@ -114,15 +114,17 @@ class tool_capability_renderer extends plugin_renderer_base {
}
// Start the list item, and print the context name as a link to the place to make changes.
if ($contextid == context_system::instance()->id) {
$url = new moodle_url('/admin/roles/manage.php');
$title = get_string('changeroles', 'tool_capability');
} else {
$url = new moodle_url('/admin/roles/override.php', array('contextid' => $contextid));
$title = get_string('changeoverrides', 'tool_capability');
}
$context = context::instance_by_id($contextid);
$html = $this->output->heading(html_writer::link($url, $context->get_context_name(), array('title' => $title)), 3);
if ($context instanceof context_system) {
$url = new moodle_url('/admin/roles/manage.php');
} else {
$url = new moodle_url('/admin/roles/permissions.php', ['contextid' => $contextid]);
}
$title = get_string('permissionsincontext', 'core_role', $context->get_context_name());
$html = $this->output->heading(html_writer::link($url, $context->get_context_name(), ['title' => $title]), 3);
$html .= html_writer::table($table);
// If there are any child contexts, print them recursively.
if (!empty($contexts[$contextid]->children)) {
@@ -133,4 +135,4 @@ class tool_capability_renderer extends plugin_renderer_base {
return $html;
}
}
}
@@ -440,6 +440,9 @@ class purpose extends persistent {
}
if (!empty($data->sensitivedatareasons) && is_array($data->sensitivedatareasons)) {
$data->sensitivedatareasons = implode(',', $data->sensitivedatareasons);
} else {
// Nothing selected. Set default value of null.
$data->sensitivedatareasons = null;
}
// A single value.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
define(["jquery","core/notification","tool_lp/dialogue","core/str","core/ajax","core/templates"],function(a,b,c,d,e,f){var g=function(b){a(b).on("click",this.configureSettings.bind(this))};return g.prototype._dialogue=null,g.prototype.configureSettings=function(e){var g=a(e.target).closest("a").data("courseid"),h=a(e.target).closest("a").data("pushratingstouserplans"),i={courseid:g,settings:{pushratingstouserplans:h}};e.preventDefault(),f.render("tool_lp/course_competency_settings",i).done(function(a){d.get_string("configurecoursecompetencysettings","tool_lp").done(function(b){this._dialogue=new c(b,a,this.addListeners.bind(this))}.bind(this)).fail(b.exception)}.bind(this)).fail(b.exception)},g.prototype.addListeners=function(){var a=this._find('[data-action="save"]');a.on("click",this.saveSettings.bind(this));var b=this._find('[data-action="cancel"]');b.on("click",this.cancelChanges.bind(this))},g.prototype.cancelChanges=function(a){a.preventDefault(),this._dialogue.close()},g.prototype._find=function(b){return a('[data-region="coursecompetencysettings"]').find(b)},g.prototype.saveSettings=function(a){a.preventDefault();var c=this._find('input[name="pushratingstouserplans"]:checked').val(),d=this._find('input[name="courseid"]').val(),f={pushratingstouserplans:c};e.call([{methodname:"core_competency_update_course_competency_settings",args:{courseid:d,settings:f}}])[0].done(function(){this.refreshCourseCompetenciesPage()}.bind(this)).fail(b.exception)},g.prototype.refreshCourseCompetenciesPage=function(){var c=this._find('input[name="courseid"]').val();e.call([{methodname:"tool_lp_data_for_course_competencies_page",args:{courseid:c}}])[0].done(function(c){f.render("tool_lp/course_competencies_page",c).done(function(b,c){a('[data-region="coursecompetenciespage"]').replaceWith(b),f.runTemplateJS(c),this._dialogue.close()}.bind(this)).fail(b.exception)}.bind(this)).fail(b.exception)},g});
define(["jquery","core/notification","tool_lp/dialogue","core/str","core/ajax","core/templates","core/pending"],function(a,b,c,d,e,f,g){var h=function(b){a(b).on("click",this.configureSettings.bind(this))};return h.prototype._dialogue=null,h.prototype.configureSettings=function(e){var h=new g,i=a(e.target).closest("a").data("courseid"),j=a(e.target).closest("a").data("pushratingstouserplans"),k={courseid:i,settings:{pushratingstouserplans:j}};e.preventDefault(),a.when(d.get_string("configurecoursecompetencysettings","tool_lp"),f.render("tool_lp/course_competency_settings",k)).then(function(a,b){return this._dialogue=new c(a,b[0],this.addListeners.bind(this)),this._dialogue}.bind(this)).then(h.resolve)["catch"](b.exception)},h.prototype.addListeners=function(){var a=this._find('[data-action="save"]');a.on("click",this.saveSettings.bind(this));var b=this._find('[data-action="cancel"]');b.on("click",this.cancelChanges.bind(this))},h.prototype.cancelChanges=function(a){a.preventDefault(),this._dialogue.close()},h.prototype._find=function(b){return a('[data-region="coursecompetencysettings"]').find(b)},h.prototype.saveSettings=function(a){var c=new g;a.preventDefault();var d=this._find('input[name="pushratingstouserplans"]:checked').val(),f=this._find('input[name="courseid"]').val(),h={pushratingstouserplans:d};e.call([{methodname:"core_competency_update_course_competency_settings",args:{courseid:f,settings:h}}])[0].then(function(){return this.refreshCourseCompetenciesPage()}.bind(this)).then(c.resolve)["catch"](b.exception)},h.prototype.refreshCourseCompetenciesPage=function(){var c=this._find('input[name="courseid"]').val(),d=new g;e.call([{methodname:"tool_lp_data_for_course_competencies_page",args:{courseid:c}}])[0].then(function(a){return f.render("tool_lp/course_competencies_page",a)}).then(function(b,c){f.replaceNode(a('[data-region="coursecompetenciespage"]'),b,c),this._dialogue.close()}.bind(this)).then(d.resolve)["catch"](b.exception)},h});
+1 -1
View File
@@ -1 +1 @@
define(["jquery","core/notification","core/templates","tool_lp/dialogue","tool_lp/event_base","core/str"],function(a,b,c,d,e,f){var g=function(a){e.prototype.constructor.apply(this,[]),this._ratingOptions=a};return g.prototype=Object.create(e.prototype),g.prototype._popup=null,g.prototype._ratingOptions=null,g.prototype._afterRender=function(){var b=this._find('[data-action="rate"]'),c=this._find('[name="rating"]'),d=this._find('[name="comment"]');this._find('[data-action="cancel"]').click(function(a){a.preventDefault(),this._trigger("cancelled"),this.close()}.bind(this)),c.change(function(){var c=a(this);c.val()?b.prop("disabled",!1):b.prop("disabled",!0)}).change(),b.click(function(a){a.preventDefault();var b=c.val();b&&(this._trigger("rated",{rating:b,note:d.val()}),this.close())}.bind(this))},g.prototype.close=function(){this._popup.close(),this._popup=null},g.prototype.display=function(){return this._render().then(function(a){return f.get_string("rate","tool_lp").then(function(b){this._popup=new d(b,a,this._afterRender.bind(this))}.bind(this))}.bind(this)).fail(b.exception)},g.prototype._find=function(b){return a(this._popup.getContent()).find(b)},g.prototype._render=function(){var a={cangrade:this._canGrade,ratings:this._ratingOptions};return c.render("tool_lp/competency_grader",a)},g});
define(["jquery","core/notification","core/templates","tool_lp/dialogue","tool_lp/event_base","core/str"],function(a,b,c,d,e,f){var g=function(a){e.prototype.constructor.apply(this,[]),this._ratingOptions=a};return g.prototype=Object.create(e.prototype),g.prototype._popup=null,g.prototype._ratingOptions=null,g.prototype._afterRender=function(){var b=this._find('[data-action="rate"]'),c=this._find('[name="rating"]'),d=this._find('[name="comment"]');this._find('[data-action="cancel"]').click(function(a){a.preventDefault(),this._trigger("cancelled"),this.close()}.bind(this)),c.change(function(){var c=a(this);c.val()?b.prop("disabled",!1):b.prop("disabled",!0)}).change(),b.click(function(a){a.preventDefault();var b=c.val();b&&(this._trigger("rated",{rating:b,note:d.val()}),this.close())}.bind(this))},g.prototype.close=function(){this._popup.close(),this._popup=null},g.prototype.display=function(){return a.when(f.get_string("rate","tool_lp"),this._render()).then(function(a,b){return this._popup=new d(a,b[0],this._afterRender.bind(this)),this._popup}.bind(this))["catch"](b.exception)},g.prototype._find=function(b){return a(this._popup.getContent()).find(b)},g.prototype._render=function(){var a={cangrade:this._canGrade,ratings:this._ratingOptions};return c.render("tool_lp/competency_grader",a)},g});
@@ -1 +1 @@
define(["jquery","core/notification","core/ajax","core/log","tool_lp/grade_dialogue","tool_lp/event_base","tool_lp/scalevalues"],function(a,b,c,d,e,f,g){var h=function(b,c,d,e,g,h,i){f.prototype.constructor.apply(this,[]);var j=a(b);if(!j.length)throw new Error("Could not find the trigger");this._scaleId=c,this._competencyId=d,this._userId=e,this._planId=g,this._courseId=h,this._chooseStr=i,this._setUp(),j.click(function(a){a.preventDefault(),this._dialogue.display()}.bind(this)),this._planId?(this._methodName="core_competency_grade_competency_in_plan",this._args={competencyid:this._competencyId,planid:this._planId}):this._courseId?(this._methodName="core_competency_grade_competency_in_course",this._args={competencyid:this._competencyId,courseid:this._courseId,userid:this._userId}):(this._methodName="core_competency_grade_competency",this._args={userid:this._userId,competencyid:this._competencyId})};return h.prototype=Object.create(f.prototype),h.prototype._setUp=function(){var a=[],d=this,f=g.get_values(d._scaleId);f.done(function(f){a.push({value:"",name:d._chooseStr});for(var g=0;g<f.length;g++){var h=f[g];a.push({value:h.id,name:h.name})}d._dialogue=new e(a),d._dialogue.on("rated",function(a,e){var f=d._args;f.grade=e.rating,f.note=e.note,c.call([{methodname:d._methodName,args:f,done:function(a){d._trigger("competencyupdated",{args:f,evidence:a})},fail:b.exception}])})}).fail(b.exception)},h.prototype._scaleId=null,h.prototype._competencyId=null,h.prototype._userId=null,h.prototype._planId=null,h.prototype._courseId=null,h.prototype._chooseStr=null,h.prototype._dialogue=null,h});
define(["jquery","core/notification","core/ajax","core/log","tool_lp/grade_dialogue","tool_lp/event_base","tool_lp/scalevalues"],function(a,b,c,d,e,f,g){var h=function(b,c,d,e,g,h,i){f.prototype.constructor.apply(this,[]);var j=a(b);if(!j.length)throw new Error("Could not find the trigger");this._scaleId=c,this._competencyId=d,this._userId=e,this._planId=g,this._courseId=h,this._chooseStr=i,this._setUp(),j.click(function(a){a.preventDefault(),this._dialogue.display()}.bind(this)),this._planId?(this._methodName="core_competency_grade_competency_in_plan",this._args={competencyid:this._competencyId,planid:this._planId}):this._courseId?(this._methodName="core_competency_grade_competency_in_course",this._args={competencyid:this._competencyId,courseid:this._courseId,userid:this._userId}):(this._methodName="core_competency_grade_competency",this._args={userid:this._userId,competencyid:this._competencyId})};return h.prototype=Object.create(f.prototype),h.prototype._setUp=function(){var a=[],d=this,f=g.get_values(d._scaleId);f.then(function(b){a.push({value:"",name:d._chooseStr});for(var c=0;c<b.length;c++){var e=b[c];a.push({value:e.id,name:e.name})}return a}).then(function(a){return new e(a)}).then(function(a){return a.on("rated",function(a,e){var f=d._args;f.grade=e.rating,f.note=e.note,c.call([{methodname:d._methodName,args:f,done:function(a){d._trigger("competencyupdated",{args:f,evidence:a})},fail:b.exception}])}),a}).then(function(a){d._dialogue=a}).fail(b.exception)},h.prototype._scaleId=null,h.prototype._competencyId=null,h.prototype._userId=null,h.prototype._planId=null,h.prototype._courseId=null,h.prototype._chooseStr=null,h.prototype._dialogue=null,h});
+28 -15
View File
@@ -27,8 +27,9 @@ define(['jquery',
'core/templates',
'core/str',
'tool_lp/competencypicker',
'tool_lp/dragdrop-reorder'],
function($, notification, ajax, templates, str, Picker, dragdrop) {
'tool_lp/dragdrop-reorder',
'core/pending'],
function($, notification, ajax, templates, str, Picker, dragdrop, Pending) {
/**
* Constructor
@@ -117,6 +118,7 @@ define(['jquery',
* Pick a competency
*
* @method pickCompetency
* @return {Promise}
*/
competencies.prototype.pickCompetency = function() {
var self = this;
@@ -132,6 +134,7 @@ define(['jquery',
self.pickerInstance = new Picker(self.pageContextId, false, pageContextIncludes);
self.pickerInstance.on('save', function(e, data) {
var compIds = data.competencyIds;
var pendingPromise = new Pending();
if (self.itemtype === "course") {
requests = [];
@@ -181,17 +184,20 @@ define(['jquery',
pagerender = 'tool_lp/plan_page';
pageregion = 'plan-page';
}
ajax.call(requests)[requests.length - 1].then(function(context) {
ajax.call(requests)[requests.length - 1]
.then(function(context) {
return templates.render(pagerender, context);
}).then(function(html, js) {
$('[data-region="' + pageregion + '"]').replaceWith(html);
templates.runTemplateJS(js);
})
.then(function(html, js) {
templates.replaceNode($('[data-region="' + pageregion + '"]'), html, js);
return;
}).catch(notification.exception);
})
.then(pendingPromise.resolve)
.catch(notification.exception);
});
}
self.pickerInstance.display();
return self.pickerInstance.display();
};
/**
@@ -302,6 +308,7 @@ define(['jquery',
if (localthis.itemtype == 'course') {
// Course completion rule handling.
$('[data-region="coursecompetenciespage"]').on('change', 'select[data-field="ruleoutcome"]', function(e) {
var pendingPromise = new Pending();
var requests = [];
var pagerender = 'tool_lp/course_competencies_page';
var pageregion = 'coursecompetenciespage';
@@ -314,18 +321,24 @@ define(['jquery',
args: {courseid: localthis.itemid}}
]);
requests[1].done(function(context) {
templates.render(pagerender, context).done(function(html, js) {
$('[data-region="' + pageregion + '"]').replaceWith(html);
templates.runTemplateJS(js);
}).fail(notification.exception);
}).fail(notification.exception);
requests[1].then(function(context) {
return templates.render(pagerender, context);
})
.then(function(html, js) {
return templates.replaceNode($('[data-region="' + pageregion + '"]'), html, js);
})
.then(pendingPromise.resolve)
.catch(notification.exception);
});
}
$('[data-region="actions"] button').click(function(e) {
var pendingPromise = new Pending();
e.preventDefault();
localthis.pickCompetency();
localthis.pickCompetency()
.then(pendingPromise.resolve)
.catch();
});
$('[data-action="delete-competency-link"]').click(function(e) {
e.preventDefault();
+10 -3
View File
@@ -33,8 +33,12 @@ define(['jquery',
'tool_lp/menubar',
'tool_lp/competencypicker',
'tool_lp/competency_outcomes',
'tool_lp/competencyruleconfig'],
function($, url, templates, notification, str, ajax, dragdrop, Ariatree, Dialogue, menubar, Picker, Outcomes, RuleConfig) {
'tool_lp/competencyruleconfig',
'core/pending',
],
function(
$, url, templates, notification, str, ajax, dragdrop, Ariatree, Dialogue, menubar, Picker, Outcomes, RuleConfig, Pending
) {
// Private variables and functions.
/** @var {Object} treeModel - This is an object representing the nodes in the tree. */
@@ -412,6 +416,7 @@ define(['jquery',
if (!pickerInstance) {
pickerInstance = new Picker(pageContextId, relatedTarget.competencyframeworkid);
pickerInstance.on('save', function(e, data) {
var pendingPromise = new Pending();
var compIds = data.competencyIds;
var calls = [];
@@ -436,7 +441,9 @@ define(['jquery',
templates.runTemplateJS(js);
updatedRelatedCompetencies();
return;
}).catch(notification.exception);
})
.then(pendingPromise.resolve)
.catch(notification.exception);
});
}
+8 -2
View File
@@ -31,8 +31,10 @@ define(['jquery',
'core/templates',
'tool_lp/dialogue',
'core/str',
'tool_lp/tree'],
function($, Notification, Ajax, Templates, Dialogue, Str, Tree) {
'tool_lp/tree',
'core/pending'
],
function($, Notification, Ajax, Templates, Dialogue, Str, Tree, Pending) {
/**
* Competency picker class.
@@ -157,6 +159,7 @@ define(['jquery',
// Add listener for add.
self._find('[data-region="competencylinktree"] [data-action="add"]').click(function(e) {
e.preventDefault();
var pendingPromise = new Pending();
if (!self._selectedCompetencies.length) {
return;
}
@@ -168,7 +171,10 @@ define(['jquery',
self._trigger('save', {competencyId: self._selectedCompetencies[0]});
}
// The dialogue here is a YUI dialogue and doesn't support Promises at all.
// However, it is typically synchronous so this shoudl suffice.
self.close();
pendingPromise.resolve();
});
// The list of selected competencies will be modified while looping (because of the listeners above).
@@ -26,8 +26,10 @@ define(['jquery',
'tool_lp/dialogue',
'core/str',
'core/ajax',
'core/templates'],
function($, notification, Dialogue, str, ajax, templates) {
'core/templates',
'core/pending'
],
function($, notification, Dialogue, str, ajax, templates, Pending) {
/**
* Constructor
@@ -48,6 +50,7 @@ define(['jquery',
* @method configureSettings
*/
settingsMod.prototype.configureSettings = function(e) {
var pendingPromise = new Pending();
var courseid = $(e.target).closest('a').data('courseid');
var currentValue = $(e.target).closest('a').data('pushratingstouserplans');
var context = {
@@ -56,16 +59,21 @@ define(['jquery',
};
e.preventDefault();
templates.render('tool_lp/course_competency_settings', context).done(function(html) {
str.get_string('configurecoursecompetencysettings', 'tool_lp').done(function(title) {
this._dialogue = new Dialogue(
title,
html,
this.addListeners.bind(this)
);
}.bind(this)).fail(notification.exception);
}.bind(this)).fail(notification.exception);
$.when(
str.get_string('configurecoursecompetencysettings', 'tool_lp'),
templates.render('tool_lp/course_competency_settings', context)
)
.then(function(title, templateResult) {
this._dialogue = new Dialogue(
title,
templateResult[0],
this.addListeners.bind(this)
);
return this._dialogue;
}.bind(this))
.then(pendingPromise.resolve)
.catch(notification.exception);
};
/**
@@ -108,6 +116,7 @@ define(['jquery',
* @method saveSettings
*/
settingsMod.prototype.saveSettings = function(e) {
var pendingPromise = new Pending();
e.preventDefault();
var newValue = this._find('input[name="pushratingstouserplans"]:checked').val();
@@ -117,9 +126,12 @@ define(['jquery',
ajax.call([
{methodname: 'core_competency_update_course_competency_settings',
args: {courseid: courseId, settings: settings}}
])[0].done(function() {
this.refreshCourseCompetenciesPage();
}.bind(this)).fail(notification.exception);
])[0]
.then(function() {
return this.refreshCourseCompetenciesPage();
}.bind(this))
.then(pendingPromise.resolve)
.catch(notification.exception);
};
@@ -131,18 +143,23 @@ define(['jquery',
*/
settingsMod.prototype.refreshCourseCompetenciesPage = function() {
var courseId = this._find('input[name="courseid"]').val();
var pendingPromise = new Pending();
ajax.call([
{methodname: 'tool_lp_data_for_course_competencies_page',
args: {courseid: courseId}}
])[0].done(function(context) {
templates.render('tool_lp/course_competencies_page', context).done(function(html, js) {
$('[data-region="coursecompetenciespage"]').replaceWith(html);
templates.runTemplateJS(js);
this._dialogue.close();
}.bind(this)).fail(notification.exception);
}.bind(this)).fail(notification.exception);
])[0]
.then(function(context) {
return templates.render('tool_lp/course_competencies_page', context);
})
.then(function(html, js) {
templates.replaceNode($('[data-region="coursecompetenciespage"]'), html, js);
this._dialogue.close();
return;
}.bind(this))
.then(pendingPromise.resolve)
.catch(notification.exception);
};
return /** @alias module:tool_lp/configurecoursecompetencysettings */ settingsMod;
+14 -9
View File
@@ -102,15 +102,20 @@ define(['jquery',
* @return {Promise}
*/
Grade.prototype.display = function() {
return this._render().then(function(html) {
return Str.get_string('rate', 'tool_lp').then(function(title) {
this._popup = new Dialogue(
title,
html,
this._afterRender.bind(this)
);
}.bind(this));
}.bind(this)).fail(Notification.exception);
return $.when(
Str.get_string('rate', 'tool_lp'),
this._render()
)
.then(function(title, templateResult) {
this._popup = new Dialogue(
title,
templateResult[0],
this._afterRender.bind(this)
);
return this._popup;
}.bind(this))
.catch(Notification.exception);
};
/**
@@ -95,7 +95,7 @@ define(['jquery',
self = this;
var promise = ScaleValues.get_values(self._scaleId);
promise.done(function(scalevalues) {
promise.then(function(scalevalues) {
options.push({
value: '',
name: self._chooseStr
@@ -109,8 +109,13 @@ define(['jquery',
});
}
self._dialogue = new GradeDialogue(options);
self._dialogue.on('rated', function(e, data) {
return options;
})
.then(function(options) {
return new GradeDialogue(options);
})
.then(function(dialogue) {
dialogue.on('rated', function(e, data) {
var args = self._args;
args.grade = data.rating;
args.note = data.note;
@@ -123,7 +128,15 @@ define(['jquery',
fail: notification.exception
}]);
});
}).fail(notification.exception);
return dialogue;
})
.then(function(dialogue) {
self._dialogue = dialogue;
return;
})
.fail(notification.exception);
};
/** @type {Number} The scale id for this competency. */
@@ -38,6 +38,9 @@
<div class="pull-xs-right card card-block">
<p>{{{groupselector}}}</p>
<form class="user-competency-course-navigation">
<input type="hidden" name="userid" value="{{userid}}"/>
<input type="hidden" name="competencyid" value="{{competencyid}}"/>
<input type="hidden" name="courseid" value="{{courseid}}"/>
{{#hasusers}}
<span>
<label for="user-nav-{{uniqid}}" class="accesshide">{{#str}}jumptouser, tool_lp{{/str}}</label>
@@ -6,6 +6,7 @@ Feature: Manage competency frameworks
Background:
Given I log in as "admin"
And I change window size to "small"
And I am on site homepage
Scenario: Create a new framework
@@ -6,6 +6,7 @@ Feature: Manage plearning plan templates
Background:
Given I log in as "admin"
And I change window size to "small"
And I am on site homepage
Scenario: Create a new learning plan template
@@ -105,7 +105,7 @@ $string['requirevalidation'] = 'Validate sender address';
$string['name'] = 'Name';
$string['ssl'] = 'SSL (Auto-detect SSL version)';
$string['sslv2'] = 'SSLv2 (Force SSL Version 2)';
$string['sslv3'] = 'SSLv2 (Force SSL Version 3)';
$string['sslv3'] = 'SSLv3 (Force SSL Version 3)';
$string['taskcleanup'] = 'Cleanup of unverified incoming email';
$string['taskpickup'] = 'Incoming email pickup';
$string['tls'] = 'TLS (TLS; started via protocol-level negotiation over unencrypted channel; RECOMMENDED way of initiating secure connection)';
+5
View File
@@ -382,6 +382,8 @@ class api {
$features = array(
'NoDelegate_CoreOffline' => new lang_string('offlineuse', 'tool_mobile'),
'$mmLoginEmailSignup' => new lang_string('startsignup'),
'NoDelegate_CoreComments' => new lang_string('comments'),
'NoDelegate_CoreRating' => new lang_string('ratings', 'rating'),
"$mainmenu" => array(
'$mmSideMenuDelegate_mmCourses' => new lang_string('mycourses'),
'$mmSideMenuDelegate_mmaFrontpage' => new lang_string('sitehome'),
@@ -390,6 +392,7 @@ class api {
'$mmSideMenuDelegate_mmaNotifications' => new lang_string('notifications', 'message'),
'$mmSideMenuDelegate_mmaMessages' => new lang_string('messages', 'message'),
'$mmSideMenuDelegate_mmaCalendar' => new lang_string('calendar', 'calendar'),
'CoreMainMenuDelegate_AddonBlog' => new lang_string('blog', 'blog'),
'$mmSideMenuDelegate_mmaFiles' => new lang_string('files'),
'$mmSideMenuDelegate_website' => new lang_string('webpage'),
'$mmSideMenuDelegate_help' => new lang_string('help'),
@@ -403,6 +406,7 @@ class api {
'$mmCoursesDelegate_mmaNotes' => new lang_string('notes', 'notes'),
'NoDelegate_CoreCourseDownload' => new lang_string('downloadcourse', 'tool_mobile'),
'NoDelegate_CoreCoursesDownload' => new lang_string('downloadcourses', 'tool_mobile'),
'CoreCourseOptionsDelegate_AddonBlog' => new lang_string('blog', 'blog'),
),
"$user" => array(
'$mmUserDelegate_mmaBadges' => new lang_string('badges', 'badges'),
@@ -414,6 +418,7 @@ class api {
'$mmUserDelegate_mmaMessages:blockContact' => new lang_string('blockcontact', 'message'),
'$mmUserDelegate_mmaNotes:addNote' => new lang_string('addnewnote', 'notes'),
'$mmUserDelegate_picture' => new lang_string('userpic'),
'CoreCourseOptionsDelegate_AddonBlog' => new lang_string('blog', 'blog'),
),
"$files" => array(
'files_privatefiles' => new lang_string('privatefiles'),
+1 -1
View File
@@ -81,7 +81,7 @@ $string['mobileappearance'] = 'Mobile appearance';
$string['mobileauthentication'] = 'Mobile authentication';
$string['mobilecssurl'] = 'CSS';
$string['mobilefeatures'] = 'Mobile features';
$string['mobilenotificationsdisabledwarning'] = 'Mobile notifications are not enabled. They should be enabled in Manage message outputs.';
$string['mobilenotificationsdisabledwarning'] = 'Mobile notifications are not enabled. They should be enabled in Notification settings.';
$string['mobilesettings'] = 'Mobile settings';
$string['offlineuse'] = 'Offline use';
$string['pluginname'] = 'Moodle app tools';
+1 -1
View File
@@ -30,7 +30,7 @@ require_once($CFG->libdir . '/externallib.php');
$serviceshortname = required_param('service', PARAM_ALPHANUMEXT);
$passport = required_param('passport', PARAM_RAW); // Passport send from the app to validate the response URL.
$urlscheme = optional_param('urlscheme', 'moodlemobile', PARAM_NOTAGS); // The URL scheme the app supports.
$urlscheme = optional_param('urlscheme', 'moodlemobile', PARAM_ALPHANUM); // The URL scheme the app supports.
$confirmed = optional_param('confirmed', false, PARAM_BOOL); // If we are being redirected after user confirmation.
$oauthsso = optional_param('oauthsso', 0, PARAM_INT); // Id of the OpenID issuer (for OAuth direct SSO).
+1 -1
View File
@@ -63,7 +63,7 @@ if ($hassiteconfig) {
$temp->add(new admin_setting_configtext('tool_mobile/forcedurlscheme',
new lang_string('forcedurlscheme_key', 'tool_mobile'),
new lang_string('forcedurlscheme', 'tool_mobile'), '', PARAM_NOTAGS));
new lang_string('forcedurlscheme', 'tool_mobile'), '', PARAM_ALPHANUM));
$ADMIN->add('mobileapp', $temp);
+1 -1
View File
@@ -1 +1 @@
define(["jquery","core/ajax","core/notification","core/modal_factory","core/modal_events"],function(a,b,c,d,e){var f={VIEW_POLICY:'[data-action="view"]'},g=function(){this.registerEvents()};return g.prototype.registerEvents=function(){a(f.VIEW_POLICY).click(function(f){f.preventDefault();var g=a(this).data("versionid"),h=a(this).data("behalfid"),i={versionid:g,behalfid:h},j={methodname:"tool_policy_get_policy_version",args:i},k=a.Deferred(),l=a.Deferred(),m=d.create({title:k,body:l,large:!0}).then(function(a){return a.getRoot().on(e.hidden,function(){a.destroy()}),a}).then(function(a){return a.show(),a})["catch"](c.exception),n=b.call([j]);a.when(n[0]).then(function(a){if(a.result.policy)return k.resolve(a.result.policy.name),l.resolve(a.result.policy.content),a;throw new Error(a.warnings[0].message)})["catch"](function(a){return m.then(function(a){return a.hide(),a.destroy(),a})["catch"](c.exception),c.addNotification({message:a,type:"error"})})})},{init:function(){return new g}}});
define(["jquery","core/ajax","core/notification","core/modal_factory","core/modal_events"],function(a,b,c,d,e){var f=function(a){this.registerEvents(a)};return f.prototype.registerEvents=function(f){f.on("click",function(f){f.preventDefault();var g=a(this).data("versionid"),h=a(this).data("behalfid"),i={versionid:g,behalfid:h},j={methodname:"tool_policy_get_policy_version",args:i},k=a.Deferred(),l=a.Deferred(),m=d.create({title:k,body:l,large:!0}).then(function(a){return a.getRoot().on(e.hidden,function(){a.destroy()}),a}).then(function(a){return a.show(),a})["catch"](c.exception),n=b.call([j]);a.when(n[0]).then(function(a){if(a.result.policy)return k.resolve(a.result.policy.name),l.resolve(a.result.policy.content),a;throw new Error(a.warnings[0].message)})["catch"](function(a){return m.then(function(a){return a.hide(),a.destroy(),a})["catch"](c.exception),c.addNotification({message:a,type:"error"})})})},{init:function(b){return b=a(b),new f(b)}}});
+7 -15
View File
@@ -29,27 +29,18 @@ define([
'core/modal_events'],
function($, Ajax, Notification, ModalFactory, ModalEvents) {
/**
* List of action selectors.
*
* @type {{VIEW_POLICY: string}}
*/
var ACTIONS = {
VIEW_POLICY: '[data-action="view"]'
};
/**
* PolicyActions class.
*/
var PolicyActions = function() {
this.registerEvents();
var PolicyActions = function(root) {
this.registerEvents(root);
};
/**
* Register event listeners.
*/
PolicyActions.prototype.registerEvents = function() {
$(ACTIONS.VIEW_POLICY).click(function(e) {
PolicyActions.prototype.registerEvents = function(root) {
root.on("click", function(e) {
e.preventDefault();
var versionid = $(this).data('versionid');
@@ -127,8 +118,9 @@ function($, Ajax, Notification, ModalFactory, ModalEvents) {
* @method init
* @return {PolicyActions}
*/
'init': function() {
return new PolicyActions();
'init': function(root) {
root = $(root);
return new PolicyActions(root);
}
};
});
@@ -111,7 +111,7 @@ class accept_policy extends \moodleform {
}
}
$PAGE->requires->js_call_amd('tool_policy/policyactions', 'init');
$PAGE->requires->js_call_amd('tool_policy/policyactions', 'init', ['[data-action="view"]']);
}
/**
@@ -197,4 +197,4 @@ class accept_policy extends \moodleform {
}
}
}
}
}
@@ -58,7 +58,7 @@ require(['jquery', 'tool_policy/jquery-eu-cookie-law-popup', 'tool_policy/policy
"<ul>{{#policies}}" +
"<li>" +
"<a href=\"{{pluginbaseurl}}/view.php?versionid={{id}}{{#returnurl}}&amp;returnurl={{.}}{{/returnurl}}\" " +
" data-action=\"view\" data-versionid=\"{{id}}\" data-behalfid=\"1\" >" +
" data-action=\"view-guest\" data-versionid=\"{{id}}\" data-behalfid=\"1\" >" +
"{{{name}}}" +
"</a>" +
"</li>" +
@@ -81,7 +81,7 @@ require(['jquery', 'tool_policy/jquery-eu-cookie-law-popup', 'tool_policy/policy
{{/haspolicies}}
// Initialise the JS for the modal window which displays the policy versions.
ActionsMod.init();
ActionsMod.init('[data-action="view-guest"]');
});
});
@@ -143,6 +143,6 @@
{{#js}}
// Initialise the JS for the modal window which displays the policy versions.
require(['tool_policy/policyactions'], function(ActionsMod) {
ActionsMod.init();
ActionsMod.init('[data-action="view"]');
});
{{/js}}
@@ -73,6 +73,6 @@
{{#js}}
// Initialise the JS for the modal window which displays the policy versions.
require(['tool_policy/policyactions'], function(ActionsMod) {
ActionsMod.init();
ActionsMod.init('[data-action="view"]');
});
{{/js}}
@@ -77,18 +77,22 @@ class provider implements
}
if ($descriptionidentifier !== null) {
$time = transform::datetime($value);
$tour = \tool_usertours\tour::instance($tourid);
try {
$tour = \tool_usertours\tour::instance($tourid);
$time = transform::datetime($value);
writer::export_user_preference(
'tool_usertours',
$name,
$time,
get_string($descriptionidentifier, 'tool_usertours', (object) [
'name' => $tour->get_name(),
'time' => $time,
])
);
writer::export_user_preference(
'tool_usertours',
$name,
$time,
get_string($descriptionidentifier, 'tool_usertours', (object) [
'name' => $tour->get_name(),
'time' => $time,
])
);
} catch (\dml_missing_record_exception $ex) {
// The tour related to this user preference no longer exists.
}
}
}
}
@@ -112,4 +112,37 @@ class tool_usertours_privacy_testcase extends \core_privacy\tests\provider_testc
$this->assertCount(2, (array) $prefs);
}
/**
* Ensure that export_user_preferences excludes deleted tours.
*/
public function test_export_user_preferences_deleted_tour() {
global $DB;
$this->resetAfterTest();
$this->setAdminUser();
$user = \core_user::get_user_by_username('admin');
$alltours = $DB->get_records('tool_usertours_tours');
$tour1 = tour::instance(array_shift($alltours)->id);
$tour1->mark_user_completed();
$tour2 = tour::instance(array_shift($alltours)->id);
$tour2->mark_user_completed();
$tour2->remove();
$writer = writer::with_context(\context_system::instance());
provider::export_user_preferences($user->id);
$this->assertTrue($writer->has_any_data());
// We should have one preference.
$prefs = $writer->get_user_preferences('tool_usertours');
$this->assertCount(1, (array) $prefs);
// The preference should be related to the first tour.
$this->assertContains($tour1->get_name(), reset($prefs)->description);
}
}
+7
View File
@@ -72,6 +72,8 @@ class login implements renderable, templatable {
public $username;
/** @var string The csrf token to limit login to requests that come from the login form. */
public $logintoken;
/** @var string Maintenance message, if Maintenance is enabled. */
public $maintenance;
/**
* Constructor.
@@ -109,6 +111,10 @@ class login implements renderable, templatable {
$this->instructions = get_string('loginsteps', 'core', 'signup.php');
}
if ($CFG->maintenance_enabled == true && !empty($CFG->maintenance_message)) {
$this->maintenance = $CFG->maintenance_message;
}
// Identity providers.
$this->identityproviders = \auth_plugin_base::get_identity_providers($authsequence);
$this->logintoken = \core\session\manager::get_login_token();
@@ -145,6 +151,7 @@ class login implements renderable, templatable {
$data->signupurl = $this->signupurl->out(false);
$data->username = $this->username;
$data->logintoken = $this->logintoken;
$data->maintenance = format_text($this->maintenance, FORMAT_MOODLE);
return $data;
}
@@ -92,3 +92,25 @@ Feature: availability_grouping
# P1 should show but not B2.
Then I should see "P1" in the "region-main" "region"
And I should not see "P2" in the "region-main" "region"
@javascript
Scenario: Check grouping access restriction message on course homepage
Given the following "groupings" exist:
| name | course | idnumber |
| Grouping A | C1 | GA |
And the following "grouping groups" exist:
| grouping | group |
| GA | GI1 |
And the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode | grouping |
| assign | Test assign | Assign description | C1 | assign1 | 1 | GA |
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I turn editing mode on
And I open "Test assign" actions menu
And I choose "Edit settings" in the open action menu
And I expand all fieldsets
And the field "groupingid" matches value "Grouping A"
And I press "Add group/grouping access restriction"
When I press "Save and return to course"
Then I should see "Not available unless: You belong to a group in Grouping A"
@@ -128,15 +128,6 @@ abstract class backup_check {
// Now, if backup mode is hub or import, check userid has permissions for those modes
// other modes will perform common checks only (backupxxxx capabilities in $typecapstocheck)
switch ($mode) {
case backup::MODE_HUB:
if (!has_capability('moodle/backup:backuptargethub', $coursectx, $userid)) {
$a = new stdclass();
$a->userid = $userid;
$a->courseid = $courseid;
$a->capability = 'moodle/backup:backuptargethub';
throw new backup_controller_exception('backup_user_missing_capability', $a);
}
break;
case backup::MODE_IMPORT:
if (!has_capability('moodle/backup:backuptargetimport', $coursectx, $userid)) {
$a = new stdclass();
@@ -90,15 +90,6 @@ abstract class restore_check {
// Now, if restore mode is hub or import, check userid has permissions for those modes
// other modes will perform common checks only (restorexxxx capabilities in $typecapstocheck)
switch ($mode) {
case backup::MODE_HUB:
if (!has_capability('moodle/restore:restoretargethub', $coursectx, $userid)) {
$a = new stdclass();
$a->userid = $userid;
$a->courseid = $courseid;
$a->capability = 'moodle/restore:restoretargethub';
throw new restore_controller_exception('restore_user_missing_capability', $a);
}
break;
case backup::MODE_IMPORT:
if (!has_capability('moodle/restore:restoretargetimport', $coursectx, $userid)) {
$a = new stdclass();
+6 -4
View File
@@ -375,8 +375,10 @@ class core_backup_renderer extends plugin_renderer_base {
$html .= $this->output->heading(get_string('importdatafrom'), 2, array('class' => 'header'));
$html .= $this->backup_detail_pair(get_string('selectacourse', 'backup'), $this->render($courses));
$attrs = array('type' => 'submit', 'value' => get_string('continue'), 'class' => 'btn btn-primary');
$html .= html_writer::start_tag('div', array('class' => 'mt-3'));
$html .= $this->backup_detail_pair('', html_writer::empty_tag('input', $attrs));
$html .= html_writer::end_tag('div');
$html .= html_writer::end_tag('div');
$html .= html_writer::end_tag('form');
$html .= html_writer::end_tag('div');
return $html;
@@ -704,7 +706,7 @@ class core_backup_renderer extends plugin_renderer_base {
if ($component->get_count() === 0) {
$output .= $this->output->notification(get_string('nomatchingcourses', 'backup'));
$output .= html_writer::start_tag('div', array('class' => 'ics-search'));
$output .= html_writer::start_tag('div', array('class' => 'ics-search form-inline'));
$attrs = array(
'type' => 'text',
'name' => restore_course_search::$VAR_SEARCH,
@@ -716,7 +718,7 @@ class core_backup_renderer extends plugin_renderer_base {
'type' => 'submit',
'name' => 'searchcourses',
'value' => get_string('search'),
'class' => 'btn btn-secondary'
'class' => 'btn btn-secondary ml-1'
);
$output .= html_writer::empty_tag('input', $attrs);
$output .= html_writer::end_tag('div');
@@ -762,7 +764,7 @@ class core_backup_renderer extends plugin_renderer_base {
$output .= html_writer::table($table);
$output .= html_writer::end_tag('div');
$output .= html_writer::start_tag('div', array('class' => 'ics-search'));
$output .= html_writer::start_tag('div', array('class' => 'ics-search form-inline'));
$attrs = array(
'type' => 'text',
'name' => restore_course_search::$VAR_SEARCH,
@@ -773,7 +775,7 @@ class core_backup_renderer extends plugin_renderer_base {
'type' => 'submit',
'name' => 'searchcourses',
'value' => get_string('search'),
'class' => 'btn btn-secondary'
'class' => 'btn btn-secondary ml-1'
);
$output .= html_writer::empty_tag('input', $attrs);
$output .= html_writer::end_tag('div');
+5 -3
View File
@@ -112,7 +112,7 @@ class award_criteria_badge extends award_criteria {
if ($this->id !== 0) {
$selected = array_keys($this->params);
}
$settings = array('multiple' => 'multiple', 'size' => 20, 'class' => 'selectbadge');
$settings = array('multiple' => 'multiple', 'size' => 20, 'class' => 'selectbadge', 'required' => 'required');
$mform->addElement('select', 'badge_badges', get_string('addbadge', 'badges'), $select, $settings);
$mform->addRule('badge_badges', get_string('requiredbadge', 'badges'), 'required');
$mform->addHelpButton('badge_badges', 'addbadge', 'badges');
@@ -243,7 +243,6 @@ class award_criteria_badge extends award_criteria {
if ($this->method == BADGE_CRITERIA_AGGREGATION_ANY) {
// User has received ANY of the required badges.
$join = " LEFT JOIN {badge_issued} bi2 ON bi2.userid = u.id";
$where = "AND (";
$i = 0;
foreach ($this->params as $param) {
if ($i == 0) {
@@ -254,7 +253,10 @@ class award_criteria_badge extends award_criteria {
$params['badgeid'.$i] = $param['badge'];
$i++;
}
$where .= ") ";
// MDL-66032 Do not create expression if there are no badges in criteria.
if (!empty($where)) {
$where = ' AND (' . $where . ') ';
}
return array($join, $where, $params);
} else {
// User has received ALL of the required badges.
+1 -44
View File
@@ -48,54 +48,11 @@ class block_community extends block_list {
}
function get_content() {
global $CFG, $OUTPUT, $USER;
$coursecontext = context::instance_by_id($this->instance->parentcontextid);
if (!has_capability('moodle/community:add', $coursecontext)
or $this->content !== NULL) {
return $this->content;
}
$this->content = new stdClass();
$this->content->items = array();
$this->content->icons = array();
$this->content->footer = '';
if (!isloggedin()) {
return $this->content;
}
$icon = $OUTPUT->pix_icon('i/group', get_string('group'));
$addcourseurl = new moodle_url('/blocks/community/communitycourse.php',
array('add' => true, 'courseid' => $this->page->course->id));
$searchlink = html_writer::tag('a', $icon . get_string('addcourse', 'block_community'),
array('href' => $addcourseurl->out(false)));
$this->content->items[] = $searchlink;
require_once($CFG->dirroot . '/blocks/community/locallib.php');
$communitymanager = new block_community_manager();
$courses = $communitymanager->block_community_get_courses($USER->id);
if ($courses) {
$this->content->items[] = html_writer::empty_tag('hr');
$this->content->icons[] = '';
$this->content->items[] = get_string('mycommunities', 'block_community');
$this->content->icons[] = '';
foreach ($courses as $course) {
//delete link
$deleteicon = $OUTPUT->pix_icon('t/delete', get_string('removecommunitycourse', 'block_community'));
$deleteurl = new moodle_url('/blocks/community/communitycourse.php',
array('remove' => true,
'courseid' => $this->page->course->id,
'communityid' => $course->id, 'sesskey' => sesskey()));
$deleteatag = html_writer::tag('a', $deleteicon, array('href' => $deleteurl));
$courselink = html_writer::tag('a', $course->coursename,
array('href' => $course->courseurl));
$this->content->items[] = $courselink . ' ' . $deleteatag;
$this->content->icons[] = '';
}
}
$this->content->items[] = get_string('functionalityremoved', 'error');
return $this->content;
}
+1 -1
View File
@@ -64,7 +64,7 @@ $string['enroldownload_help'] = 'Some courses listed in the selected hub are bei
Others are course templates provided for you to download and use on your own Moodle site.';
$string['enrollable'] = 'courses I can enrol in';
$string['enrollablecourses'] = 'Enrollable courses';
$string['errorcourselisting'] = 'An error occurred when retrieving the course listing from the selected hub, please try again later. ({$a})';
$string['errorcourselisting'] = 'Please note: It is no longer possible to search for community courses on moodle.net. Previously shared courses for download are now available on archive.moodle.net. See <a href="https://docs.moodle.org/en/Sunsetting_moodle.net">Sunsetting moodle.net</a> for further details.';
$string['errorhublisting'] = 'An error occurred when retrieving the hub listing from Moodle.org, please try again later. ({$a})';
$string['fileinfo'] = 'Language: {$a->lang} - License: {$a->license} - Time updated: {$a->timeupdated}';
$string['hideall'] = 'Hide hubs';
+16 -2
View File
@@ -50,8 +50,22 @@ function xmldb_block_recentlyaccesseditems_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2018120302) {
$sql = "courseid NOT IN (SELECT c.id from {course} c) OR cmid NOT IN (SELECT cm.id from {course_modules} cm)";
$DB->delete_records_select("block_recentlyaccesseditems", $sql);
// Query the items to be deleted as a list of IDs. We cannot delete directly from this as a
// subquery because MySQL does not support delete with subqueries.
$fordeletion = $DB->get_fieldset_sql("
SELECT rai.id
FROM {block_recentlyaccesseditems} rai
LEFT JOIN {course} c ON c.id = rai.courseid
LEFT JOIN {course_modules} cm ON cm.id = rai.cmid
WHERE c.id IS NULL OR cm.id IS NULL");
// Delete the array in chunks of 500 (Oracle does not support more than 1000 parameters,
// let's leave some leeway, there are likely only one chunk anyway).
$chunks = array_chunk($fordeletion, 500);
foreach ($chunks as $chunk) {
$DB->delete_records_list('block_recentlyaccesseditems', 'id', $chunk);
}
upgrade_block_savepoint(true, 2018120302, 'recentlyaccesseditems', false);
}
+1 -1
View File
@@ -83,7 +83,7 @@ function blog_rss_print_link($context, $filtertype, $filterselect = 0, $tagid =
$url = blog_rss_get_url($context->id, $userid, $filtertype, $filterselect, $tagid);
$rsspix = $OUTPUT->pix_icon('i/rss', get_string('rss'), 'core', array('title' => $tooltiptext));
print '<div class="pull-xs-right"><a href="'. $url .'">' . $rsspix . '</a></div>';
print '<div class="float-sm-right"><a href="'. $url .'">' . $rsspix . '</a></div>';
}
/**
+2 -1
View File
@@ -150,7 +150,8 @@ class cachestore_redis extends cache_store implements cache_is_key_aware, cache_
*/
protected function new_redis($server, $prefix = '', $password = '') {
$redis = new Redis();
$port = null;
// Check if it isn't a Unix socket to set default port.
$port = ($server[0] === '/') ? null : 6379;
if (strpos($server, ':')) {
$serverconf = explode(':', $server);
$server = $serverconf[0];
+3 -3
View File
@@ -673,7 +673,7 @@ class core_calendar_external extends external_api {
}
/**
* Delete Calendar events.
* Create calendar events.
*
* @param array $events A list of events to create.
* @return array array of events created.
@@ -1027,8 +1027,8 @@ class core_calendar_external extends external_api {
public static function get_calendar_monthly_view_parameters() {
return new external_function_parameters(
[
'year' => new external_value(PARAM_INT, 'Month to be viewed', VALUE_REQUIRED),
'month' => new external_value(PARAM_INT, 'Year to be viewed', VALUE_REQUIRED),
'year' => new external_value(PARAM_INT, 'Year to be viewed', VALUE_REQUIRED),
'month' => new external_value(PARAM_INT, 'Month to be viewed', VALUE_REQUIRED),
'courseid' => new external_value(PARAM_INT, 'Course being viewed', VALUE_DEFAULT, SITEID, NULL_ALLOWED),
'categoryid' => new external_value(PARAM_INT, 'Category being viewed', VALUE_DEFAULT, null, NULL_ALLOWED),
'includenavigation' => new external_value(
+42 -17
View File
@@ -104,6 +104,11 @@ define('CALENDAR_IMPORT_FROM_FILE', 0);
*/
define('CALENDAR_IMPORT_FROM_URL', 1);
/**
* CALENDAR_IMPORT_EVENT_UPDATED_SKIPPED - imported event was skipped
*/
define('CALENDAR_IMPORT_EVENT_SKIPPED', -1);
/**
* CALENDAR_IMPORT_EVENT_UPDATED - imported event was updated
*/
@@ -2862,11 +2867,23 @@ function calendar_add_icalendar_event($event, $unused = null, $subscriptionid, $
if ($updaterecord = $DB->get_record('event', array('uuid' => $eventrecord->uuid,
'subscriptionid' => $eventrecord->subscriptionid))) {
$eventrecord->id = $updaterecord->id;
$return = CALENDAR_IMPORT_EVENT_UPDATED; // Update.
// Compare iCal event data against the moodle event to see if something has changed.
$result = array_diff((array) $eventrecord, (array) $updaterecord);
// Unset timemodified field because it's always going to be different.
unset($result['timemodified']);
if (count($result)) {
$eventrecord->id = $updaterecord->id;
$return = CALENDAR_IMPORT_EVENT_UPDATED; // Update.
} else {
return CALENDAR_IMPORT_EVENT_SKIPPED;
}
} else {
$return = CALENDAR_IMPORT_EVENT_INSERTED; // Insert.
}
if ($createdevent = \calendar_event::create($eventrecord, false)) {
if (!empty($event->properties['RRULE'])) {
// Repeating events.
@@ -3000,18 +3017,13 @@ function calendar_import_icalendar_events($ical, $unused = null, $subscriptionid
$return = '';
$eventcount = 0;
$updatecount = 0;
$skippedcount = 0;
// Large calendars take a while...
if (!CLI_SCRIPT) {
\core_php_time_limit::raise(300);
}
// Mark all events in a subscription with a zero timestamp.
if (!empty($subscriptionid)) {
$sql = "UPDATE {event} SET timemodified = :time WHERE subscriptionid = :id";
$DB->execute($sql, array('time' => 0, 'id' => $subscriptionid));
}
// Grab the timezone from the iCalendar file to be used later.
if (isset($ical->properties['X-WR-TIMEZONE'][0]->value)) {
$timezone = $ical->properties['X-WR-TIMEZONE'][0]->value;
@@ -3019,8 +3031,9 @@ function calendar_import_icalendar_events($ical, $unused = null, $subscriptionid
$timezone = 'UTC';
}
$return = '';
$icaluuids = [];
foreach ($ical->components['VEVENT'] as $event) {
$icaluuids[] = $event->properties['UID'][0]->value;
$res = calendar_add_icalendar_event($event, null, $subscriptionid, $timezone);
switch ($res) {
case CALENDAR_IMPORT_EVENT_UPDATED:
@@ -3029,6 +3042,9 @@ function calendar_import_icalendar_events($ical, $unused = null, $subscriptionid
case CALENDAR_IMPORT_EVENT_INSERTED:
$eventcount++;
break;
case CALENDAR_IMPORT_EVENT_SKIPPED:
$skippedcount++;
break;
case 0:
$return .= '<p>' . get_string('erroraddingevent', 'calendar') . ': ';
if (empty($event->properties['SUMMARY'])) {
@@ -3041,18 +3057,27 @@ function calendar_import_icalendar_events($ical, $unused = null, $subscriptionid
}
}
$return .= "<p>" . get_string('eventsimported', 'calendar', $eventcount) . "</p> ";
$return .= "<p>" . get_string('eventsupdated', 'calendar', $updatecount) . "</p>";
// Delete remaining zero-marked events since they're not in remote calendar.
if (!empty($subscriptionid)) {
$deletecount = $DB->count_records('event', array('timemodified' => 0, 'subscriptionid' => $subscriptionid));
if (!empty($deletecount)) {
$DB->delete_records('event', array('timemodified' => 0, 'subscriptionid' => $subscriptionid));
$return .= "<p> " . get_string('eventsdeleted', 'calendar') . ": {$deletecount} </p>\n";
$eventsuuids = $DB->get_records_menu('event', ['subscriptionid' => $subscriptionid], '', 'id, uuid');
$icaleventscount = count($icaluuids);
$tobedeleted = [];
if (count($eventsuuids) > $icaleventscount) {
foreach ($eventsuuids as $eventid => $eventuuid) {
if (!in_array($eventuuid, $icaluuids)) {
$tobedeleted[] = $eventid;
}
}
if (!empty($tobedeleted)) {
$DB->delete_records_list('event', 'id', $tobedeleted);
$return .= "<p> " . get_string('eventsdeleted', 'calendar') . ": " . count($tobedeleted) . "</p> ";
}
}
}
$return .= "<p>" . get_string('eventsimported', 'calendar', $eventcount) . "</p> ";
$return .= "<p>" . get_string('eventsskipped', 'calendar', $skippedcount) . "</p> ";
$return .= "<p>" . get_string('eventsupdated', 'calendar', $updatecount) . "</p>";
return $return;
}
+3 -3
View File
@@ -161,7 +161,7 @@ class core_calendar_renderer extends plugin_renderer_base {
$deletelink = null;
}
$commands = html_writer::start_tag('div', array('class' => 'commands pull-xs-right'));
$commands = html_writer::start_tag('div', array('class' => 'commands float-sm-right'));
$commands .= html_writer::start_tag('a', array('href' => $editlink));
$str = get_string('tt_editevent', 'calendar');
$commands .= $this->output->pix_icon('t/edit', $str);
@@ -205,9 +205,9 @@ class core_calendar_renderer extends plugin_renderer_base {
$output .= html_writer::tag('div', $event->courselink);
}
if (!empty($event->time)) {
$output .= html_writer::tag('span', $event->time, array('class' => 'date pull-xs-right m-r-1'));
$output .= html_writer::tag('span', $event->time, array('class' => 'date float-sm-right m-r-1'));
} else {
$attrs = array('class' => 'date pull-xs-right m-r-1');
$attrs = array('class' => 'date float-sm-right m-r-1');
$output .= html_writer::tag('span', calendar_time_representation($event->timestart), $attrs);
}
+5 -1
View File
@@ -46,5 +46,9 @@
{{> core_calendar/header}}
{{> core_calendar/day_navigation }}
{{> core/overlay_loading}}
{{> core_calendar/event_list }}
{{< core_calendar/event_list }}
{{$noeventsmessage}}
{{#str}} daywithnoevents, core_calendar {{/str}}
{{/noeventsmessage}}
{{/core_calendar/event_list}}
</div>
+1 -1
View File
@@ -37,7 +37,7 @@
{{/events}}
{{^events}}
<span class="calendar-information calendar-no-results">
{{#str}}daywithnoevents, calendar{{/str}}
{{$noeventsmessage}}{{/noeventsmessage}}
</span>
{{/events}}
</div>
@@ -34,5 +34,9 @@
<div class="calendarwrapper" data-view="upcoming" data-context-id="{{defaulteventcontext}}" data-courseid="{{courseid}}">
{{> core_calendar/header}}
{{> core/overlay_loading}}
{{> core_calendar/event_list }}
{{< core_calendar/event_list }}
{{$noeventsmessage}}
{{#str}} noupcomingevents, core_calendar {{/str}}
{{/noeventsmessage}}
{{/core_calendar/event_list}}
</div>
+1 -1
View File
@@ -1205,7 +1205,7 @@ class api {
$result = array();
// TODO We could improve the performance of this into one single query.
$coursemodulecompetencies = course_competency::list_course_module_competencies($cm->id);
$coursemodulecompetencies = course_module_competency::list_course_module_competencies($cm->id);
$competencies = course_module_competency::list_competencies($cm->id);
// Build the return values.
+10
View File
@@ -2757,6 +2757,16 @@ class core_competency_api_testcase extends advanced_testcase {
$result = api::list_course_module_competencies_in_course_module($cm->id);
$this->assertEquals($result[0]->get('competencyid'), $c->get('id'));
$this->assertEquals($result[1]->get('competencyid'), $c2->get('id'));
// Now get the course competency and coursemodule competency together.
$result = api::list_course_module_competencies($cm->id);
// Now we should have an array and each element of the array should have a competency and
// a coursemodulecompetency.
foreach ($result as $instance) {
$cmc = $instance['coursemodulecompetency'];
$c = $instance['competency'];
$this->assertEquals($cmc->get('competencyid'), $c->get('id'));
}
}
/**
+1 -1
View File
@@ -13,7 +13,7 @@
"require-dev": {
"phpunit/phpunit": "6.5.*",
"phpunit/dbunit": "3.0.*",
"moodlehq/behat-extension": "3.36.0",
"moodlehq/behat-extension": "3.36.1",
"mikey179/vfsstream": "^1.6",
"instaclick/php-webdriver": "dev-local as 1.x-dev"
}
Generated
+175 -177
View File
@@ -4,46 +4,42 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "5e0abe9c9ff839fb4f477f127ef0b734",
"content-hash": "c5f05bdc99eb03364db93ed9b7f6d17e",
"packages": [],
"packages-dev": [
{
"name": "behat/behat",
"version": "v3.3.1",
"version": "v3.5.0",
"source": {
"type": "git",
"url": "https://github.com/Behat/Behat.git",
"reference": "44a58c1480d6144b2dc2c2bf02b9cef73c83840d"
"reference": "e4bce688be0c2029dc1700e46058d86428c63cab"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Behat/Behat/zipball/44a58c1480d6144b2dc2c2bf02b9cef73c83840d",
"reference": "44a58c1480d6144b2dc2c2bf02b9cef73c83840d",
"url": "https://api.github.com/repos/Behat/Behat/zipball/e4bce688be0c2029dc1700e46058d86428c63cab",
"reference": "e4bce688be0c2029dc1700e46058d86428c63cab",
"shasum": ""
},
"require": {
"behat/gherkin": "^4.4.4",
"behat/gherkin": "^4.5.1",
"behat/transliterator": "^1.2",
"container-interop/container-interop": "^1.1",
"container-interop/container-interop": "^1.2",
"ext-mbstring": "*",
"php": ">=5.3.3",
"psr/container": "^1.0",
"symfony/class-loader": "~2.1||~3.0",
"symfony/config": "~2.3||~3.0",
"symfony/console": "~2.5||~3.0",
"symfony/dependency-injection": "~2.1||~3.0",
"symfony/event-dispatcher": "~2.1||~3.0",
"symfony/translation": "~2.3||~3.0",
"symfony/yaml": "~2.1||~3.0"
"symfony/config": "~2.3||~3.0||~4.0",
"symfony/console": "~2.7.40||^2.8.33||~3.3.15||^3.4.3||^4.0.3",
"symfony/dependency-injection": "~2.1||~3.0||~4.0",
"symfony/event-dispatcher": "~2.1||~3.0||~4.0",
"symfony/translation": "~2.3||~3.0||~4.0",
"symfony/yaml": "~2.1||~3.0||~4.0"
},
"require-dev": {
"herrera-io/box": "~1.6.1",
"phpunit/phpunit": "~4.5",
"symfony/process": "~2.5|~3.0"
},
"suggest": {
"behat/mink-extension": "for integration with Mink testing framework",
"behat/symfony2-extension": "for integration with Symfony2 web framework",
"behat/yii-extension": "for integration with Yii web framework"
"phpunit/phpunit": "^4.8.36|^6.3",
"symfony/process": "~2.5|~3.0|~4.0"
},
"bin": [
"bin/behat"
@@ -51,7 +47,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.2.x-dev"
"dev-master": "3.5.x-dev"
}
},
"autoload": {
@@ -87,7 +83,7 @@
"symfony",
"testing"
],
"time": "2017-05-15T16:49:16+00:00"
"time": "2018-08-10T18:56:51+00:00"
},
{
"name": "behat/gherkin",
@@ -739,33 +735,37 @@
},
{
"name": "guzzlehttp/psr7",
"version": "1.5.2",
"version": "1.6.1",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
"reference": "9f83dded91781a01c63574e387eaa769be769115"
"reference": "239400de7a173fe9901b9ac7c06497751f00727a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/9f83dded91781a01c63574e387eaa769be769115",
"reference": "9f83dded91781a01c63574e387eaa769be769115",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a",
"reference": "239400de7a173fe9901b9ac7c06497751f00727a",
"shasum": ""
},
"require": {
"php": ">=5.4.0",
"psr/http-message": "~1.0",
"ralouphie/getallheaders": "^2.0.5"
"ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
},
"provide": {
"psr/http-message-implementation": "1.0"
},
"require-dev": {
"ext-zlib": "*",
"phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8"
},
"suggest": {
"zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.5-dev"
"dev-master": "1.6-dev"
}
},
"autoload": {
@@ -802,7 +802,7 @@
"uri",
"url"
],
"time": "2018-12-04T20:46:45+00:00"
"time": "2019-07-01T23:21:34+00:00"
},
{
"name": "instaclick/php-webdriver",
@@ -810,12 +810,12 @@
"source": {
"type": "git",
"url": "https://github.com/moodlehq/php-webdriver.git",
"reference": "e311e55bf2c4746db9df72707f3cf1a731ad98aa"
"reference": "3df827208ec104a9716aa8c30741e330da620c1e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/moodlehq/php-webdriver/zipball/e311e55bf2c4746db9df72707f3cf1a731ad98aa",
"reference": "e311e55bf2c4746db9df72707f3cf1a731ad98aa",
"url": "https://api.github.com/repos/moodlehq/php-webdriver/zipball/3df827208ec104a9716aa8c30741e330da620c1e",
"reference": "3df827208ec104a9716aa8c30741e330da620c1e",
"shasum": ""
},
"require": {
@@ -863,27 +863,27 @@
"support": {
"source": "https://github.com/moodlehq/php-webdriver/tree/local"
},
"time": "2019-06-03T22:55:37+00:00"
"time": "2019-08-14T02:10:24+00:00"
},
{
"name": "mikey179/vfsStream",
"version": "v1.6.6",
"name": "mikey179/vfsstream",
"version": "v1.6.7",
"source": {
"type": "git",
"url": "https://github.com/bovigo/vfsStream.git",
"reference": "095238a0711c974ae5b4ebf4c4534a23f3f6c99d"
"reference": "2b544ac3a21bcc4dde5d90c4ae8d06f4319055fb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/bovigo/vfsStream/zipball/095238a0711c974ae5b4ebf4c4534a23f3f6c99d",
"reference": "095238a0711c974ae5b4ebf4c4534a23f3f6c99d",
"url": "https://api.github.com/repos/bovigo/vfsStream/zipball/2b544ac3a21bcc4dde5d90c4ae8d06f4319055fb",
"reference": "2b544ac3a21bcc4dde5d90c4ae8d06f4319055fb",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"require-dev": {
"phpunit/phpunit": "~4.5"
"phpunit/phpunit": "^4.5|^5.0"
},
"type": "library",
"extra": {
@@ -903,35 +903,34 @@
"authors": [
{
"name": "Frank Kleine",
"homepage": "http://frankkleine.de/",
"role": "Developer"
"role": "Developer",
"homepage": "http://frankkleine.de/"
}
],
"description": "Virtual file system to mock the real file system in unit tests.",
"homepage": "http://vfs.bovigo.org/",
"time": "2019-04-08T13:54:32+00:00"
"time": "2019-08-01T01:38:37+00:00"
},
{
"name": "moodlehq/behat-extension",
"version": "v3.36.0",
"version": "v3.36.1",
"source": {
"type": "git",
"url": "https://github.com/moodlehq/moodle-behat-extension.git",
"reference": "ba8c4b8b323e05f7af128604f3f3dc60c953135a"
"reference": "a3c38c2864e7259b1de834218abfe49eecc03417"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/moodlehq/moodle-behat-extension/zipball/ba8c4b8b323e05f7af128604f3f3dc60c953135a",
"reference": "ba8c4b8b323e05f7af128604f3f3dc60c953135a",
"url": "https://api.github.com/repos/moodlehq/moodle-behat-extension/zipball/a3c38c2864e7259b1de834218abfe49eecc03417",
"reference": "a3c38c2864e7259b1de834218abfe49eecc03417",
"shasum": ""
},
"require": {
"behat/behat": "3.3.*",
"behat/behat": "3.5.*",
"behat/mink": "~1.7",
"behat/mink-extension": "~2.2",
"behat/mink-goutte-driver": "~1.2",
"behat/mink-selenium2-driver": "~1.3",
"guzzlehttp/guzzle": "^6.3",
"php": ">=5.4.4",
"symfony/process": "2.8.*"
},
@@ -948,9 +947,9 @@
"authors": [
{
"name": "David Monllaó",
"role": "Developer",
"email": "david.monllao@gmail.com",
"homepage": "http://moodle.com",
"role": "Developer"
"homepage": "http://moodle.com"
}
],
"description": "Moodle behat extension",
@@ -959,7 +958,7 @@
"Behat",
"moodle"
],
"time": "2018-02-04T18:04:02+00:00"
"time": "2019-07-18T08:33:39+00:00"
},
{
"name": "myclabs/deep-copy",
@@ -1044,18 +1043,18 @@
"authors": [
{
"name": "Arne Blankerts",
"email": "arne@blankerts.de",
"role": "Developer"
"role": "Developer",
"email": "arne@blankerts.de"
},
{
"name": "Sebastian Heuer",
"email": "sebastian@phpeople.de",
"role": "Developer"
"role": "Developer",
"email": "sebastian@phpeople.de"
},
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "Developer"
"role": "Developer",
"email": "sebastian@phpunit.de"
}
],
"description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
@@ -1091,18 +1090,18 @@
"authors": [
{
"name": "Arne Blankerts",
"email": "arne@blankerts.de",
"role": "Developer"
"role": "Developer",
"email": "arne@blankerts.de"
},
{
"name": "Sebastian Heuer",
"email": "sebastian@phpeople.de",
"role": "Developer"
"role": "Developer",
"email": "sebastian@phpeople.de"
},
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "Developer"
"role": "Developer",
"email": "sebastian@phpunit.de"
}
],
"description": "Library for handling version information and constraints",
@@ -1262,16 +1261,16 @@
},
{
"name": "phpspec/prophecy",
"version": "1.8.0",
"version": "1.8.1",
"source": {
"type": "git",
"url": "https://github.com/phpspec/prophecy.git",
"reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06"
"reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06",
"reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06",
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/1927e75f4ed19131ec9bcc3b002e07fb1173ee76",
"reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76",
"shasum": ""
},
"require": {
@@ -1292,8 +1291,8 @@
}
},
"autoload": {
"psr-0": {
"Prophecy\\": "src/"
"psr-4": {
"Prophecy\\": "src/Prophecy"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -1321,7 +1320,7 @@
"spy",
"stub"
],
"time": "2018-08-05T17:53:17+00:00"
"time": "2019-06-13T12:50:23+00:00"
},
{
"name": "phpunit/dbunit",
@@ -1426,8 +1425,8 @@
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
"role": "lead",
"email": "sebastian@phpunit.de"
}
],
"description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
@@ -1474,8 +1473,8 @@
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sb@sebastian-bergmann.de",
"role": "lead"
"role": "lead",
"email": "sb@sebastian-bergmann.de"
}
],
"description": "FilterIterator implementation that filters files based on a list of suffixes.",
@@ -1516,8 +1515,8 @@
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
"role": "lead",
"email": "sebastian@phpunit.de"
}
],
"description": "Simple template engine.",
@@ -1565,8 +1564,8 @@
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sb@sebastian-bergmann.de",
"role": "lead"
"role": "lead",
"email": "sb@sebastian-bergmann.de"
}
],
"description": "Utility class for timing",
@@ -1696,8 +1695,8 @@
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
"role": "lead",
"email": "sebastian@phpunit.de"
}
],
"description": "The PHP Unit Testing framework.",
@@ -1917,24 +1916,24 @@
},
{
"name": "ralouphie/getallheaders",
"version": "2.0.5",
"version": "3.0.3",
"source": {
"type": "git",
"url": "https://github.com/ralouphie/getallheaders.git",
"reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa"
"reference": "120b605dfeb996808c31b6477290a714d356e822"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/5601c8a83fbba7ef674a7369456d12f1e0d0eafa",
"reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa",
"url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822",
"reference": "120b605dfeb996808c31b6477290a714d356e822",
"shasum": ""
},
"require": {
"php": ">=5.3"
"php": ">=5.6"
},
"require-dev": {
"phpunit/phpunit": "~3.7.0",
"satooshi/php-coveralls": ">=1.0"
"php-coveralls/php-coveralls": "^2.1",
"phpunit/phpunit": "^5 || ^6.5"
},
"type": "library",
"autoload": {
@@ -1953,7 +1952,7 @@
}
],
"description": "A polyfill for getallheaders.",
"time": "2016-02-11T07:05:27+00:00"
"time": "2019-03-08T08:55:37+00:00"
},
{
"name": "sebastian/code-unit-reverse-lookup",
@@ -2168,16 +2167,16 @@
},
{
"name": "sebastian/exporter",
"version": "3.1.0",
"version": "3.1.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
"reference": "234199f4528de6d12aaa58b612e98f7d36adb937"
"reference": "06a9a5947f47b3029d76118eb5c22802e5869687"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937",
"reference": "234199f4528de6d12aaa58b612e98f7d36adb937",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/06a9a5947f47b3029d76118eb5c22802e5869687",
"reference": "06a9a5947f47b3029d76118eb5c22802e5869687",
"shasum": ""
},
"require": {
@@ -2204,6 +2203,10 @@
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
},
{
"name": "Jeff Welch",
"email": "whatthejeff@gmail.com"
@@ -2212,17 +2215,13 @@
"name": "Volker Dusch",
"email": "github@wallbash.com"
},
{
"name": "Bernhard Schussek",
"email": "bschussek@2bepublished.at"
},
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
},
{
"name": "Adam Harvey",
"email": "aharvey@php.net"
},
{
"name": "Bernhard Schussek",
"email": "bschussek@gmail.com"
}
],
"description": "Provides the functionality to export PHP variables for visualization",
@@ -2231,7 +2230,7 @@
"export",
"exporter"
],
"time": "2017-04-03T13:19:02+00:00"
"time": "2019-08-11T12:43:14+00:00"
},
{
"name": "sebastian/global-state",
@@ -2506,8 +2505,8 @@
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
"role": "lead",
"email": "sebastian@phpunit.de"
}
],
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
@@ -2516,16 +2515,16 @@
},
{
"name": "symfony/browser-kit",
"version": "v3.4.28",
"version": "v3.4.31",
"source": {
"type": "git",
"url": "https://github.com/symfony/browser-kit.git",
"reference": "7f2b0843d5045468225f9a9b27a0cb171ae81828"
"reference": "1a3406a6b9b61b492592a816ca056afcc9e976c0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/browser-kit/zipball/7f2b0843d5045468225f9a9b27a0cb171ae81828",
"reference": "7f2b0843d5045468225f9a9b27a0cb171ae81828",
"url": "https://api.github.com/repos/symfony/browser-kit/zipball/1a3406a6b9b61b492592a816ca056afcc9e976c0",
"reference": "1a3406a6b9b61b492592a816ca056afcc9e976c0",
"shasum": ""
},
"require": {
@@ -2569,20 +2568,20 @@
],
"description": "Symfony BrowserKit Component",
"homepage": "https://symfony.com",
"time": "2019-04-06T19:33:58+00:00"
"time": "2019-08-26T07:52:58+00:00"
},
{
"name": "symfony/class-loader",
"version": "v3.4.28",
"version": "v3.4.31",
"source": {
"type": "git",
"url": "https://github.com/symfony/class-loader.git",
"reference": "4459eef5298dedfb69f771186a580062b8516497"
"reference": "e212b06996819a2bce026a63da03b7182d05a690"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/class-loader/zipball/4459eef5298dedfb69f771186a580062b8516497",
"reference": "4459eef5298dedfb69f771186a580062b8516497",
"url": "https://api.github.com/repos/symfony/class-loader/zipball/e212b06996819a2bce026a63da03b7182d05a690",
"reference": "e212b06996819a2bce026a63da03b7182d05a690",
"shasum": ""
},
"require": {
@@ -2625,20 +2624,20 @@
],
"description": "Symfony ClassLoader Component",
"homepage": "https://symfony.com",
"time": "2019-01-16T09:39:14+00:00"
"time": "2019-08-20T13:31:17+00:00"
},
{
"name": "symfony/config",
"version": "v3.4.28",
"version": "v3.4.31",
"source": {
"type": "git",
"url": "https://github.com/symfony/config.git",
"reference": "177a276c01575253c95cefe0866e3d1b57637fe0"
"reference": "24a60c0d7ad98a0fa5d1f892e9286095a389404f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/config/zipball/177a276c01575253c95cefe0866e3d1b57637fe0",
"reference": "177a276c01575253c95cefe0866e3d1b57637fe0",
"url": "https://api.github.com/repos/symfony/config/zipball/24a60c0d7ad98a0fa5d1f892e9286095a389404f",
"reference": "24a60c0d7ad98a0fa5d1f892e9286095a389404f",
"shasum": ""
},
"require": {
@@ -2689,7 +2688,7 @@
],
"description": "Symfony Config Component",
"homepage": "https://symfony.com",
"time": "2019-02-23T15:06:07+00:00"
"time": "2019-08-26T07:52:57+00:00"
},
{
"name": "symfony/console",
@@ -2761,16 +2760,16 @@
},
{
"name": "symfony/css-selector",
"version": "v3.4.28",
"version": "v3.4.31",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
"reference": "8ca29297c29b64fb3a1a135e71cb25f67f9fdccf"
"reference": "e18c5c4b35e7f17513448a25d02f7af34a4bdb41"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/8ca29297c29b64fb3a1a135e71cb25f67f9fdccf",
"reference": "8ca29297c29b64fb3a1a135e71cb25f67f9fdccf",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/e18c5c4b35e7f17513448a25d02f7af34a4bdb41",
"reference": "e18c5c4b35e7f17513448a25d02f7af34a4bdb41",
"shasum": ""
},
"require": {
@@ -2795,14 +2794,14 @@
"MIT"
],
"authors": [
{
"name": "Jean-François Simon",
"email": "jeanfrancois.simon@sensiolabs.com"
},
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Jean-François Simon",
"email": "jeanfrancois.simon@sensiolabs.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
@@ -2810,20 +2809,20 @@
],
"description": "Symfony CssSelector Component",
"homepage": "https://symfony.com",
"time": "2019-01-16T09:39:14+00:00"
"time": "2019-08-20T13:31:17+00:00"
},
{
"name": "symfony/debug",
"version": "v3.4.28",
"version": "v3.4.31",
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
"reference": "671fc55bd14800668b1d0a3708c3714940e30a8c"
"reference": "0b600300918780001e2821db77bc28b677794486"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/debug/zipball/671fc55bd14800668b1d0a3708c3714940e30a8c",
"reference": "671fc55bd14800668b1d0a3708c3714940e30a8c",
"url": "https://api.github.com/repos/symfony/debug/zipball/0b600300918780001e2821db77bc28b677794486",
"reference": "0b600300918780001e2821db77bc28b677794486",
"shasum": ""
},
"require": {
@@ -2866,7 +2865,7 @@
],
"description": "Symfony Debug Component",
"homepage": "https://symfony.com",
"time": "2019-05-18T13:32:47+00:00"
"time": "2019-08-20T13:31:17+00:00"
},
{
"name": "symfony/dependency-injection",
@@ -2940,16 +2939,16 @@
},
{
"name": "symfony/dom-crawler",
"version": "v3.4.28",
"version": "v3.4.31",
"source": {
"type": "git",
"url": "https://github.com/symfony/dom-crawler.git",
"reference": "d40023c057393fb25f7ca80af2a56ed948c45a09"
"reference": "8558d1bc4554f5cb0b66e50377457967a8969263"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/d40023c057393fb25f7ca80af2a56ed948c45a09",
"reference": "d40023c057393fb25f7ca80af2a56ed948c45a09",
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/8558d1bc4554f5cb0b66e50377457967a8969263",
"reference": "8558d1bc4554f5cb0b66e50377457967a8969263",
"shasum": ""
},
"require": {
@@ -2993,20 +2992,20 @@
],
"description": "Symfony DomCrawler Component",
"homepage": "https://symfony.com",
"time": "2019-02-23T15:06:07+00:00"
"time": "2019-08-26T07:52:58+00:00"
},
{
"name": "symfony/event-dispatcher",
"version": "v3.4.28",
"version": "v3.4.31",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
"reference": "a088aafcefb4eef2520a290ed82e4374092a6dff"
"reference": "3e922c4c3430b9de624e8a285dada5e61e230959"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a088aafcefb4eef2520a290ed82e4374092a6dff",
"reference": "a088aafcefb4eef2520a290ed82e4374092a6dff",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/3e922c4c3430b9de624e8a285dada5e61e230959",
"reference": "3e922c4c3430b9de624e8a285dada5e61e230959",
"shasum": ""
},
"require": {
@@ -3056,20 +3055,20 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
"time": "2019-04-02T08:51:52+00:00"
"time": "2019-08-23T08:05:57+00:00"
},
{
"name": "symfony/filesystem",
"version": "v3.4.28",
"version": "v3.4.31",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
"reference": "acf99758b1df8e9295e6b85aa69f294565c9fedb"
"reference": "00e3a6ddd723b8bcfe4f2a1b6f82b98eeeb51516"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/filesystem/zipball/acf99758b1df8e9295e6b85aa69f294565c9fedb",
"reference": "acf99758b1df8e9295e6b85aa69f294565c9fedb",
"url": "https://api.github.com/repos/symfony/filesystem/zipball/00e3a6ddd723b8bcfe4f2a1b6f82b98eeeb51516",
"reference": "00e3a6ddd723b8bcfe4f2a1b6f82b98eeeb51516",
"shasum": ""
},
"require": {
@@ -3106,20 +3105,20 @@
],
"description": "Symfony Filesystem Component",
"homepage": "https://symfony.com",
"time": "2019-02-04T21:34:32+00:00"
"time": "2019-08-20T13:31:17+00:00"
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.11.0",
"version": "v1.12.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "82ebae02209c21113908c229e9883c419720738a"
"reference": "550ebaac289296ce228a706d0867afc34687e3f4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/82ebae02209c21113908c229e9883c419720738a",
"reference": "82ebae02209c21113908c229e9883c419720738a",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4",
"reference": "550ebaac289296ce228a706d0867afc34687e3f4",
"shasum": ""
},
"require": {
@@ -3131,7 +3130,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.11-dev"
"dev-master": "1.12-dev"
}
},
"autoload": {
@@ -3147,13 +3146,13 @@
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
},
{
"name": "Gert de Pagter",
"email": "BackEndTea@gmail.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for ctype functions",
@@ -3164,20 +3163,20 @@
"polyfill",
"portable"
],
"time": "2019-02-06T07:57:58+00:00"
"time": "2019-08-06T08:03:45+00:00"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.11.0",
"version": "v1.12.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "fe5e94c604826c35a32fa832f35bd036b6799609"
"reference": "b42a2f66e8f1b15ccf25652c3424265923eb4f17"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fe5e94c604826c35a32fa832f35bd036b6799609",
"reference": "fe5e94c604826c35a32fa832f35bd036b6799609",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/b42a2f66e8f1b15ccf25652c3424265923eb4f17",
"reference": "b42a2f66e8f1b15ccf25652c3424265923eb4f17",
"shasum": ""
},
"require": {
@@ -3189,7 +3188,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.11-dev"
"dev-master": "1.12-dev"
}
},
"autoload": {
@@ -3223,7 +3222,7 @@
"portable",
"shim"
],
"time": "2019-02-06T07:57:58+00:00"
"time": "2019-08-06T08:03:45+00:00"
},
{
"name": "symfony/process",
@@ -3396,16 +3395,16 @@
},
{
"name": "theseer/tokenizer",
"version": "1.1.2",
"version": "1.1.3",
"source": {
"type": "git",
"url": "https://github.com/theseer/tokenizer.git",
"reference": "1c42705be2b6c1de5904f8afacef5895cab44bf8"
"reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/theseer/tokenizer/zipball/1c42705be2b6c1de5904f8afacef5895cab44bf8",
"reference": "1c42705be2b6c1de5904f8afacef5895cab44bf8",
"url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9",
"reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9",
"shasum": ""
},
"require": {
@@ -3427,25 +3426,25 @@
"authors": [
{
"name": "Arne Blankerts",
"email": "arne@blankerts.de",
"role": "Developer"
"role": "Developer",
"email": "arne@blankerts.de"
}
],
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
"time": "2019-04-04T09:56:43+00:00"
"time": "2019-06-13T22:48:21+00:00"
},
{
"name": "webmozart/assert",
"version": "1.4.0",
"version": "1.5.0",
"source": {
"type": "git",
"url": "https://github.com/webmozart/assert.git",
"reference": "83e253c8e0be5b0257b881e1827274667c5c17a9"
"reference": "88e6d84706d09a236046d686bbea96f07b3a34f4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9",
"reference": "83e253c8e0be5b0257b881e1827274667c5c17a9",
"url": "https://api.github.com/repos/webmozart/assert/zipball/88e6d84706d09a236046d686bbea96f07b3a34f4",
"reference": "88e6d84706d09a236046d686bbea96f07b3a34f4",
"shasum": ""
},
"require": {
@@ -3453,8 +3452,7 @@
"symfony/polyfill-ctype": "^1.8"
},
"require-dev": {
"phpunit/phpunit": "^4.6",
"sebastian/version": "^1.0.1"
"phpunit/phpunit": "^4.8.36 || ^7.5.13"
},
"type": "library",
"extra": {
@@ -3483,7 +3481,7 @@
"check",
"validate"
],
"time": "2018-12-25T11:19:39+00:00"
"time": "2019-08-24T08:43:50+00:00"
}
],
"aliases": [
+1 -1
View File
@@ -1 +1 @@
define(["jquery","core/ajax"],function(a,b){var c=function(a,c,d,e){var f={classification:a};"undefined"!=typeof c&&(f.limit=c),"undefined"!=typeof d&&(f.offset=d),"undefined"!=typeof e&&(f.sort=e);var g={methodname:"core_course_get_enrolled_courses_by_timeline_classification",args:f};return b.call([g])[0]},d=function(a,c,d,e){var f={};"undefined"!=typeof a&&(f.limit=c),"undefined"!=typeof c&&(f.limit=c),"undefined"!=typeof d&&(f.offset=d),"undefined"!=typeof e&&(f.sort=e);var g={methodname:"core_course_get_recent_courses",args:f};return b.call([g])[0]};return{getEnrolledCoursesByTimelineClassification:c,getLastAccessedCourses:d}});
define(["jquery","core/ajax"],function(a,b){var c=function(a,c,d,e){var f={classification:a};"undefined"!=typeof c&&(f.limit=c),"undefined"!=typeof d&&(f.offset=d),"undefined"!=typeof e&&(f.sort=e);var g={methodname:"core_course_get_enrolled_courses_by_timeline_classification",args:f};return b.call([g])[0]},d=function(a,c,d,e){var f={};"undefined"!=typeof a&&(f.userid=a),"undefined"!=typeof c&&(f.limit=c),"undefined"!=typeof d&&(f.offset=d),"undefined"!=typeof e&&(f.sort=e);var g={methodname:"core_course_get_recent_courses",args:f};return b.call([g])[0]};return{getEnrolledCoursesByTimelineClassification:c,getLastAccessedCourses:d}});
+1 -1
View File
@@ -71,7 +71,7 @@ define(['jquery', 'core/ajax'], function($, Ajax) {
var args = {};
if (typeof userid !== 'undefined') {
args.limit = limit;
args.userid = userid;
}
if (typeof limit !== 'undefined') {
+5 -1
View File
@@ -166,7 +166,11 @@ if ($editform->is_cancelled()) {
if (!empty($CFG->creatornewroleid) and !is_viewing($context, NULL, 'moodle/role:assign') and !is_enrolled($context, NULL, 'moodle/role:assign')) {
// Deal with course creators - enrol them internally with default role.
enrol_try_internal_enrol($course->id, $USER->id, $CFG->creatornewroleid);
if (user_can_assign($context, $CFG->creatornewroleid)) {
enrol_try_internal_enrol($course->id, $USER->id, $CFG->creatornewroleid);
} else {
enrol_try_internal_enrol($course->id, $USER->id);
}
}
// The URL to take them to if they chose save and display.
+37 -1
View File
@@ -36,6 +36,9 @@ class format_singleactivity extends format_base {
/** @var cm_info the current activity. Use get_activity() to retrieve it. */
private $activity = false;
/** @var int The category ID guessed from the form data. */
private $categoryid = false;
/**
* The URL to use for the specified course
*
@@ -145,6 +148,30 @@ class format_singleactivity extends format_base {
*/
public function course_format_options($foreditform = false) {
static $courseformatoptions = false;
$fetchtypes = $courseformatoptions === false;
$fetchtypes = $fetchtypes || ($foreditform && !isset($courseformatoptions['activitytype']['label']));
if ($fetchtypes) {
$availabletypes = $this->get_supported_activities();
if ($this->course) {
// The course exists. Test against the course.
$testcontext = context_course::instance($this->course->id);
} else if ($this->categoryid) {
// The course does not exist yet, but we have a category ID that we can test against.
$testcontext = context_coursecat::instance($this->categoryid);
} else {
// The course does not exist, and we somehow do not have a category. Test capabilities against the system context.
$testcontext = context_system::instance();
}
foreach (array_keys($availabletypes) as $activity) {
$capability = "mod/{$activity}:addinstance";
if (!has_capability($capability, $testcontext)) {
unset($availabletypes[$activity]);
}
}
}
if ($courseformatoptions === false) {
$config = get_config('format_singleactivity');
$courseformatoptions = array(
@@ -153,9 +180,13 @@ class format_singleactivity extends format_base {
'type' => PARAM_TEXT,
),
);
if (!empty($availabletypes) && !isset($availabletypes[$config->activitytype])) {
$courseformatoptions['activitytype']['default'] = array_keys($availabletypes)[0];
}
}
if ($foreditform && !isset($courseformatoptions['activitytype']['label'])) {
$availabletypes = $this->get_supported_activities();
$courseformatoptionsedit = array(
'activitytype' => array(
'label' => new lang_string('activitytype', 'format_singleactivity'),
@@ -183,6 +214,11 @@ class format_singleactivity extends format_base {
*/
public function create_edit_form_elements(&$mform, $forsection = false) {
global $PAGE;
if (!$this->course && $submitvalues = $mform->getSubmitValues()) {
$this->categoryid = $submitvalues['category'];
}
$elements = parent::create_edit_form_elements($mform, $forsection);
if (!$forsection && ($course = $PAGE->course) && !empty($course->format) &&
$course->format !== 'site' && $course->format !== 'singleactivity') {
@@ -0,0 +1,38 @@
@format @format_singleactivity
Feature: Courses can be created in Single Activity mode
In order to create a single activity course
As a manager
I need to create courses and set default values on them
Scenario: Create a course as a custom course creator
Given the following "users" exist:
| username | firstname | lastname | email |
| kevin | Kevin | the | kevin@example.com |
And the following "roles" exist:
| shortname | name | archetype |
| creator | Creator | |
And the following "system role assigns" exist:
| user | role | contextlevel |
| kevin | creator | System |
And I log in as "admin"
And I set the following system permissions of "Creator" role:
| capability | permission |
| moodle/course:create | Allow |
| moodle/course:update | Allow |
| moodle/course:manageactivities | Allow |
| moodle/course:viewparticipants | Allow |
| moodle/role:assign | Allow |
| mod/quiz:addinstance | Allow |
And I log out
And I log in as "kevin"
And I am on site homepage
When I press "Add a new course"
And I set the following fields to these values:
| Course full name | My first course |
| Course short name | myfirstcourse |
| Format | Single activity format |
And I press "Update format"
Then I should see "Quiz" in the "Type of activity" "field"
And I should not see "Forum" in the "Type of activity" "field"
And I press "Save and display"
And I should see "Adding a new Quiz"
+22 -3
View File
@@ -1289,16 +1289,36 @@ function course_module_flag_for_async_deletion($cmid) {
* Checks whether the given course has any course modules scheduled for adhoc deletion.
*
* @param int $courseid the id of the course.
* @param bool $onlygradable whether to check only gradable modules or all modules.
* @return bool true if the course contains any modules pending deletion, false otherwise.
*/
function course_modules_pending_deletion($courseid) {
function course_modules_pending_deletion($courseid, bool $onlygradable = false) : bool {
if (empty($courseid)) {
return false;
}
if ($onlygradable) {
// Fetch modules with grade items.
if (!$coursegradeitems = grade_item::fetch_all(['itemtype' => 'mod', 'courseid' => $courseid])) {
// Return early when there is none.
return false;
}
}
$modinfo = get_fast_modinfo($courseid);
foreach ($modinfo->get_cms() as $module) {
if ($module->deletioninprogress == '1') {
return true;
if ($onlygradable) {
// Check if the module being deleted is in the list of course modules with grade items.
foreach ($coursegradeitems as $coursegradeitem) {
if ($coursegradeitem->itemmodule == $module->modname && $coursegradeitem->iteminstance == $module->instance) {
// The module being deleted is within the gradable modules.
return true;
}
}
} else {
return true;
}
}
}
return false;
@@ -3981,7 +4001,6 @@ function course_get_user_administration_options($course, $context) {
$options->outcomes = !empty($CFG->enableoutcomes) && has_capability('moodle/course:update', $context);
$options->badges = !empty($CFG->enablebadges);
$options->import = has_capability('moodle/restore:restoretargetimport', $context);
$options->publish = has_capability('moodle/course:publish', $context);
$options->reset = has_capability('moodle/course:reset', $context);
$options->roles = has_capability('moodle/role:switchroles', $context);
} else {
-112
View File
@@ -1,112 +0,0 @@
<?php
///////////////////////////////////////////////////////////////////////////
// //
// This file is part of Moodle - http://moodle.org/ //
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
// //
// Moodle is free software: you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation, either version 3 of the License, or //
// (at your option) any later version. //
// //
// Moodle is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. //
// //
///////////////////////////////////////////////////////////////////////////
/**
* This page display the publication backup form
*
* @package course
* @subpackage publish
* @author Jerome Mouneyrac <jerome@mouneyrac.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
* @copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com
*/
define('NO_OUTPUT_BUFFERING', true);
require_once('../../config.php');
require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_plan_builder.class.php');
require_once($CFG->libdir . '/filelib.php');
//retrieve initial page parameters
$id = required_param('id', PARAM_INT);
$hubcourseid = required_param('hubcourseid', PARAM_INT);
//some permissions and parameters checking
$course = $DB->get_record('course', array('id'=>$id), '*', MUST_EXIST);
require_login($course);
if (!has_capability('moodle/course:publish', context_course::instance($id))
or !confirm_sesskey()) {
throw new moodle_exception('nopermission');
}
//page settings
$PAGE->set_url('/course/publish/backup.php');
$PAGE->set_pagelayout('incourse');
$PAGE->set_title(get_string('course') . ': ' . $course->fullname);
$PAGE->set_heading($course->fullname);
//BEGIN backup processing
$backupid = optional_param('backup', false, PARAM_ALPHANUM);
if (!($bc = backup_ui::load_controller($backupid))) {
$bc = new backup_controller(backup::TYPE_1COURSE, $id, backup::FORMAT_MOODLE,
backup::INTERACTIVE_YES, backup::MODE_HUB, $USER->id);
}
$backup = new backup_ui($bc,
array('id' => $id, 'hubcourseid' => $hubcourseid, 'huburl' => HUB_MOODLEORGHUBURL, 'hubname' => 'Moodle.net'));
$backup->process();
if ($backup->get_stage() == backup_ui::STAGE_FINAL) {
$backup->execute();
} else {
$backup->save_controller();
}
if ($backup->get_stage() !== backup_ui::STAGE_COMPLETE) {
$renderer = $PAGE->get_renderer('core', 'backup');
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('publishcourseon', 'hub', 'Moodle.net'), 3, 'main');
if ($backup->enforce_changed_dependencies()) {
debugging('Your settings have been altered due to unmet dependencies', DEBUG_DEVELOPER);
}
echo $renderer->progress_bar($backup->get_progress_bar());
echo $backup->display($renderer);
echo $OUTPUT->footer();
die();
}
//$backupfile = $backup->get_stage_results();
$backupfile = $bc->get_results();
$backupfile = $backupfile['backup_destination'];
//END backup processing
//display the sending file page
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('sendingcourse', 'hub'), 3, 'main');
$renderer = $PAGE->get_renderer('core', 'course');
echo $renderer->sendingbackupinfo($backupfile);
if (ob_get_level()) {
ob_flush();
}
flush();
//send backup file to the hub
\core\hub\publication::upload_course_backup($hubcourseid, $backupfile);
//delete the temp backup file from user_tohub aera
$backupfile->delete();
$bc->destroy();
//Output sending success
echo $renderer->sentbackupinfo($id, HUB_MOODLEORGHUBURL, 'Moodle.net');
echo $OUTPUT->footer();
-36
View File
@@ -1,36 +0,0 @@
<?php
///////////////////////////////////////////////////////////////////////////
// //
// This file is part of Moodle - http://moodle.org/ //
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
// //
// 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/>. //
// //
///////////////////////////////////////////////////////////////////////////
/**
* @package course
* @subpackage publish
* @author Jerome Mouneyrac <jerome@mouneyrac.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
* @copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com
*
* The forms used for course publication
*/
defined('MOODLE_INTERNAL') || die();
debugging('Support for alternative hubs has been removed from Moodle in 3.4. For communication with moodle.net ' .
'see lib/classes/hub/ .', DEBUG_DEVELOPER);
-96
View File
@@ -1,96 +0,0 @@
<?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/>.
/*
* @package course
* @subpackage publish
* @author Jerome Mouneyrac <jerome@mouneyrac.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
* @copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com
*
* The user selects if he wants to publish the course on Moodle.org hub or
* on a specific hub. The site must be registered on a hub to be able to
* publish a course on it.
*/
require('../../config.php');
$courseid = required_param('id', PARAM_INT); // Course id.
$publicationid = optional_param('publicationid', 0, PARAM_INT); // Id of course publication to unpublish.
require_login($courseid);
$shortname = format_string($COURSE->shortname);
$PAGE->set_url('/course/publish/index.php', array('id' => $courseid));
$PAGE->set_pagelayout('incourse');
$PAGE->set_title(get_string('publish', 'core_hub') . ': ' . $COURSE->fullname);
$PAGE->set_heading($COURSE->fullname);
require_capability('moodle/course:publish', context_course::instance($courseid));
// If the site is not registered display an error page.
if (!\core\hub\registration::is_registered()) {
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('publishcourseon', 'hub', 'Moodle.net'), 3, 'main');
echo $OUTPUT->box(get_string('notregisteredonhub', 'hub'));
if (has_capability('moodle/site:config', context_system::instance())) {
echo $OUTPUT->single_button(new moodle_url('/admin/registration/index.php'), get_string('register', 'admin'));
}
echo $OUTPUT->footer();
die();
}
// When hub listing status is requested update statuses of all published courses.
$updatestatusid = optional_param('updatestatusid', false, PARAM_INT);
if (!empty($updatestatusid) && confirm_sesskey()) {
if (core\hub\publication::get_publication($updatestatusid, $courseid)) {
core\hub\publication::request_status_update();
redirect($PAGE->url);
}
}
$renderer = $PAGE->get_renderer('core', 'course');
// Unpublish course.
if ($publication = \core\hub\publication::get_publication($publicationid, $courseid)) {
$confirm = optional_param('confirm', 0, PARAM_BOOL);
if ($confirm && confirm_sesskey()) {
\core\hub\publication::unpublish($publication);
} else {
// Display confirmation page for unpublishing.
$publication = \core\hub\publication::get_publication($publicationid, $courseid, MUST_EXIST);
$publication->courseshortname = format_string($COURSE->shortname);
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('unpublishcourse', 'hub', $shortname), 3, 'main');
echo $renderer->confirmunpublishing($publication);
echo $OUTPUT->footer();
die();
}
}
// List current publications and "Publish" buttons.
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('publishcourse', 'hub', $shortname), 3, 'main');
echo $renderer->publicationselector($courseid);
$publications = \core\hub\publication::get_course_publications($courseid);
if (!empty($publications)) {
echo $OUTPUT->heading(get_string('publishedon', 'hub'), 3, 'main');
echo $renderer->registeredonhublisting($courseid, $publications);
}
echo $OUTPUT->footer();
-189
View File
@@ -1,189 +0,0 @@
<?php
///////////////////////////////////////////////////////////////////////////
// //
// This file is part of Moodle - http://moodle.org/ //
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
// //
// 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/>. //
// //
///////////////////////////////////////////////////////////////////////////
/*
* @package course
* @subpackage publish
* @author Jerome Mouneyrac <jerome@mouneyrac.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
* @copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com
*
* This page display the publication metadata form
*/
require_once('../../config.php');
require_once($CFG->libdir . '/filelib.php');
//check user access capability to this page
$id = required_param('id', PARAM_INT);
$course = $DB->get_record('course', array('id' => $id), '*', MUST_EXIST);
require_login($course);
//page settings
$PAGE->set_url('/course/publish/metadata.php', array('id' => $course->id));
$PAGE->set_pagelayout('incourse');
$PAGE->set_title(get_string('course') . ': ' . $course->fullname);
$PAGE->set_heading($course->fullname);
require_capability('moodle/course:publish', context_course::instance($id));
// Retrieve hub name and hub url.
require_sesskey();
// Set the publication form.
$advertise = optional_param('advertise', false, PARAM_BOOL);
$publicationid = optional_param('publicationid', false, PARAM_INT);
$formparams = array('course' => $course, 'advertise' => $advertise);
if ($publicationid) {
$publication = \core\hub\publication::get_publication($publicationid, $course->id, MUST_EXIST);
$formparams['publication'] = $publication;
$advertise = $formparams['advertise'] = $publication->enrollable;
}
$share = !$advertise;
$coursepublicationform = new \core\hub\course_publication_form('', $formparams);
$fromform = $coursepublicationform->get_data();
if (!empty($fromform)) {
// Retrieve the course information.
$courseinfo = new stdClass();
$courseinfo->fullname = $fromform->name;
$courseinfo->shortname = $fromform->courseshortname;
$courseinfo->description = $fromform->description;
$courseinfo->language = $fromform->language;
$courseinfo->publishername = $fromform->publishername;
$courseinfo->publisheremail = $fromform->publisheremail;
$courseinfo->contributornames = $fromform->contributornames;
$courseinfo->coverage = $fromform->coverage;
$courseinfo->creatorname = $fromform->creatorname;
$courseinfo->licenceshortname = $fromform->licence;
$courseinfo->subject = $fromform->subject;
$courseinfo->audience = $fromform->audience;
$courseinfo->educationallevel = $fromform->educationallevel;
$creatornotes = $fromform->creatornotes;
$courseinfo->creatornotes = $creatornotes['text'];
$courseinfo->creatornotesformat = $creatornotes['format'];
$courseinfo->sitecourseid = $id;
if (!empty($fromform->deletescreenshots)) {
$courseinfo->deletescreenshots = $fromform->deletescreenshots;
}
if ($share) {
$courseinfo->demourl = $fromform->demourl;
$courseinfo->enrollable = false;
} else {
$courseinfo->courseurl = $fromform->courseurl;
$courseinfo->enrollable = true;
}
// Retrieve the outcomes of this course.
require_once($CFG->libdir . '/grade/grade_outcome.php');
$outcomes = grade_outcome::fetch_all_available($id);
if (!empty($outcomes)) {
foreach ($outcomes as $outcome) {
$sentoutcome = new stdClass();
$sentoutcome->fullname = $outcome->fullname;
$courseinfo->outcomes[] = $sentoutcome;
}
}
// Retrieve the content information from the course.
$coursecontext = context_course::instance($course->id);
$courseblocks = \core\hub\publication::get_block_instances_by_context($coursecontext->id);
if (!empty($courseblocks)) {
$blockname = '';
foreach ($courseblocks as $courseblock) {
if ($courseblock->blockname != $blockname) {
if (!empty($blockname)) {
$courseinfo->contents[] = $content;
}
$blockname = $courseblock->blockname;
$content = new stdClass();
$content->moduletype = 'block';
$content->modulename = $courseblock->blockname;
$content->contentcount = 1;
} else {
$content->contentcount = $content->contentcount + 1;
}
}
$courseinfo->contents[] = $content;
}
$activities = get_fast_modinfo($course, $USER->id);
foreach ($activities->instances as $activityname => $activitydetails) {
$content = new stdClass();
$content->moduletype = 'activity';
$content->modulename = $activityname;
$content->contentcount = count($activities->instances[$activityname]);
$courseinfo->contents[] = $content;
}
// Save into screenshots field the references to the screenshot content hash
// (it will be like a unique id from the hub perspective).
if (!empty($fromform->deletescreenshots) or $share) {
$courseinfo->screenshots = 0;
} else {
$courseinfo->screenshots = $fromform->existingscreenshotnumber;
}
$files = [];
if (!empty($fromform->screenshots)) {
$fs = get_file_storage();
$files = $fs->get_area_files(context_user::instance($USER->id)->id, 'user', 'draft', $fromform->screenshots,
'filepath, filename', false);
$files = array_filter($files, function(stored_file $file) {
return $file->is_valid_image();
});
$courseinfo->screenshots += count($files);
}
// PUBLISH ACTION.
$hubcourseid = \core\hub\publication::publish_course($courseinfo, $files);
// Redirect to the backup process page.
if ($share) {
$params = array('sesskey' => sesskey(), 'id' => $id, 'hubcourseid' => $hubcourseid);
$backupprocessurl = new moodle_url("/course/publish/backup.php", $params);
redirect($backupprocessurl);
} else {
// Redirect to the index publis page.
redirect(new moodle_url('/course/publish/index.php', ['id' => $id]),
get_string('coursepublished', 'hub', 'Moodle.net'), null, \core\output\notification::NOTIFY_SUCCESS);
}
}
// OUTPUT SECTION.
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('publishcourseon', 'hub', 'Moodle.net'), 3, 'main');
// Display hub information (logo, name, description).
$renderer = $PAGE->get_renderer('core', 'course');
if ($hubinfo = \core\hub\registration::get_moodlenet_info()) {
echo $renderer->hubinfo($hubinfo);
}
// Display metadata form.
$coursepublicationform->display();
echo $OUTPUT->footer();
-139
View File
@@ -2082,128 +2082,6 @@ class core_course_renderer extends plugin_renderer_base {
return $this->output->render_from_template('core_course/activity_navigation', $data);
}
/**
* Display the selector to advertise or publish a course
* @param int $courseid
*/
public function publicationselector($courseid) {
$text = '';
$advertiseurl = new moodle_url("/course/publish/metadata.php",
array('sesskey' => sesskey(), 'id' => $courseid, 'advertise' => true));
$advertisebutton = new single_button($advertiseurl, get_string('advertise', 'hub'));
$text .= $this->output->render($advertisebutton);
$text .= html_writer::tag('div', get_string('advertisepublication_help', 'hub'),
array('class' => 'publishhelp'));
$text .= html_writer::empty_tag('br'); // TODO Delete.
$uploadurl = new moodle_url("/course/publish/metadata.php",
array('sesskey' => sesskey(), 'id' => $courseid, 'share' => true));
$uploadbutton = new single_button($uploadurl, get_string('share', 'hub'));
$text .= $this->output->render($uploadbutton);
$text .= html_writer::tag('div', get_string('sharepublication_help', 'hub'),
array('class' => 'publishhelp'));
return $text;
}
/**
* Display the listing of hub where a course is registered on
* @param int $courseid
* @param array $publications
*/
public function registeredonhublisting($courseid, $publications) {
global $CFG;
$table = new html_table();
$table->head = array(get_string('type', 'hub'),
get_string('date'), get_string('status', 'hub'), get_string('operation', 'hub'));
$table->size = array('20%', '30%', '%20', '%25');
$brtag = html_writer::empty_tag('br');
foreach ($publications as $publication) {
$params = array('id' => $publication->courseid, 'publicationid' => $publication->id);
$cancelurl = new moodle_url("/course/publish/index.php", $params);
$cancelbutton = new single_button($cancelurl, get_string('removefromhub', 'hub'));
$cancelbutton->class = 'centeredbutton';
$cancelbuttonhtml = $this->output->render($cancelbutton);
if ($publication->enrollable) {
$params = array('sesskey' => sesskey(), 'id' => $publication->courseid, 'publicationid' => $publication->id);
$updateurl = new moodle_url("/course/publish/metadata.php", $params);
$updatebutton = new single_button($updateurl, get_string('update', 'hub'));
$updatebutton->class = 'centeredbutton';
$updatebuttonhtml = $this->output->render($updatebutton);
$operations = $updatebuttonhtml . $brtag . $cancelbuttonhtml;
} else {
$operations = $cancelbuttonhtml;
}
// If the publication check time if bigger than May 2010, it has been checked.
if ($publication->timechecked > 1273127954) {
if ($publication->status == 0) {
$status = get_string('statusunpublished', 'hub');
} else {
$status = get_string('statuspublished', 'hub');
if (!empty($publication->link)) {
$status = html_writer::link($publication->link, $status);
}
}
$status .= $brtag . html_writer::tag('a', get_string('updatestatus', 'hub'),
array('href' => $CFG->wwwroot . '/course/publish/index.php?id='
. $courseid . "&updatestatusid=" . $publication->id
. "&sesskey=" . sesskey())) .
$brtag . get_string('lasttimechecked', 'hub') . ": "
. format_time(time() - $publication->timechecked);
} else {
$status = get_string('neverchecked', 'hub') . $brtag
. html_writer::tag('a', get_string('updatestatus', 'hub'),
array('href' => $CFG->wwwroot . '/course/publish/index.php?id='
. $courseid . "&updatestatusid=" . $publication->id
. "&sesskey=" . sesskey()));
}
// Add button cells.
$cells = array($publication->enrollable ?
get_string('advertised', 'hub') : get_string('shared', 'hub'),
userdate($publication->timepublished,
get_string('strftimedatetimeshort')), $status, $operations);
$row = new html_table_row($cells);
$table->data[] = $row;
}
$contenthtml = html_writer::table($table);
return $contenthtml;
}
/**
* Display unpublishing confirmation page
* @param stdClass $publication
* $publication->courseshortname
* $publication->courseid
* $publication->hubname
* $publication->huburl
* $publication->id
*/
public function confirmunpublishing($publication) {
$optionsyes = array('sesskey' => sesskey(), 'id' => $publication->courseid,
'hubcourseid' => $publication->hubcourseid,
'cancel' => true, 'publicationid' => $publication->id, 'confirm' => true);
$optionsno = array('sesskey' => sesskey(), 'id' => $publication->courseid);
$publication->hubname = html_writer::tag('a', 'Moodle.net',
array('href' => HUB_MOODLEORGHUBURL));
$formcontinue = new single_button(new moodle_url("/course/publish/index.php",
$optionsyes), get_string('unpublish', 'hub'), 'post');
$formcancel = new single_button(new moodle_url("/course/publish/index.php",
$optionsno), get_string('cancel'), 'get');
return $this->output->confirm(get_string('unpublishconfirmation', 'hub', $publication),
$formcontinue, $formcancel);
}
/**
* Display waiting information about backup size during uploading backup process
* @param object $backupfile the backup stored_file
@@ -2217,23 +2095,6 @@ class core_course_renderer extends plugin_renderer_base {
return $html;
}
/**
* Display upload successfull message and a button to the publish index page
* @param int $id the course id
* @return $html string
*/
public function sentbackupinfo($id) {
$html = html_writer::tag('div', get_string('sent', 'hub'),
array('class' => 'courseuploadtextinfo'));
$publishindexurl = new moodle_url('/course/publish/index.php',
array('sesskey' => sesskey(), 'id' => $id,
'published' => true));
$continue = $this->output->render(
new single_button($publishindexurl, get_string('continue')));
$html .= html_writer::tag('div', $continue, array('class' => 'sharecoursecontinue'));
return $html;
}
/**
* Hub information (logo - name - description - link)
* @param object $hubinfo
@@ -68,3 +68,48 @@ Feature: Managers can create courses
| id_enddate_day | 24 |
| id_enddate_month | October |
| id_enddate_year | 2016 |
Scenario: Create a course as a custom course creator
Given the following "users" exist:
| username | firstname | lastname | email |
| kevin | Kevin | the | kevin@example.com |
And the following "roles" exist:
| shortname | name | archetype |
| creator | Creator | |
And the following "system role assigns" exist:
| user | role | contextlevel |
| kevin | creator | System |
And I log in as "admin"
And I set the following system permissions of "Creator" role:
| capability | permission |
| moodle/course:create | Allow |
| moodle/course:manageactivities | Allow |
| moodle/course:viewparticipants | Allow |
| moodle/role:assign | Allow |
And I log out
And I log in as "kevin"
And I am on site homepage
When I press "Add a new course"
And I set the following fields to these values:
| Course full name | My first course |
| Course short name | myfirstcourse |
And I press "Save and display"
And I follow "Participants"
Then I should see "Kevin the"
And I should not see "Teacher"
And I log out
Given I log in as "admin"
And I define the allowed role assignments for the "Creator" role as:
| Teacher | Assignable |
And I log out
And I log in as "kevin"
And I am on site homepage
And I turn editing mode on
When I press "Add a new course"
And I set the following fields to these values:
| Course full name | My second course |
| Course short name | mysecondcourse |
And I press "Save and display"
And I follow "Participants"
Then I should see "Kevin the"
And I should see "Teacher"
+46 -2
View File
@@ -3193,7 +3193,6 @@ class core_course_courselib_testcase extends advanced_testcase {
$this->assertFalse($adminoptions->outcomes);
$this->assertTrue($adminoptions->badges);
$this->assertTrue($adminoptions->import);
$this->assertTrue($adminoptions->publish);
$this->assertTrue($adminoptions->reset);
$this->assertTrue($adminoptions->roles);
}
@@ -3225,7 +3224,6 @@ class core_course_courselib_testcase extends advanced_testcase {
$this->assertFalse($adminoptions->outcomes);
$this->assertTrue($adminoptions->badges);
$this->assertFalse($adminoptions->import);
$this->assertFalse($adminoptions->publish);
$this->assertFalse($adminoptions->reset);
$this->assertFalse($adminoptions->roles);
@@ -5092,4 +5090,50 @@ class core_course_courselib_testcase extends advanced_testcase {
$this->assertCount(3, $result);
$this->assertArrayNotHasKey($courses[0]->id, $result);
}
/**
* Data provider for test_course_modules_pending_deletion.
*
* @return array An array of arrays contain test data
*/
public function provider_course_modules_pending_deletion() {
return [
'Non-gradable activity, check all' => [['forum'], 0, false, true],
'Gradable activity, check all' => [['assign'], 0, false, true],
'Non-gradable activity, check gradables' => [['forum'], 0, true, false],
'Gradable activity, check gradables' => [['assign'], 0, true, true],
'Non-gradable within multiple, check all' => [['quiz', 'forum', 'assign'], 1, false, true],
'Non-gradable within multiple, check gradables' => [['quiz', 'forum', 'assign'], 1, true, false],
'Gradable within multiple, check all' => [['quiz', 'forum', 'assign'], 2, false, true],
'Gradable within multiple, check gradables' => [['quiz', 'forum', 'assign'], 2, true, true],
];
}
/**
* Tests the function course_modules_pending_deletion.
*
* @param string[] $modules A complete list aff all available modules before deletion
* @param int $indextodelete The index of the module in the $modules array that we want to test with
* @param bool $gradable The value to pass to the gradable argument of the course_modules_pending_deletion function
* @param bool $expected The expected result
* @dataProvider provider_course_modules_pending_deletion
*/
public function test_course_modules_pending_deletion(array $modules, int $indextodelete, bool $gradable, bool $expected) {
$this->resetAfterTest();
// Ensure recyclebin is enabled.
set_config('coursebinenable', true, 'tool_recyclebin');
// Create course and modules.
$generator = $this->getDataGenerator();
$course = $generator->create_course();
$moduleinstances = [];
foreach ($modules as $module) {
$moduleinstances[] = $generator->create_module($module, array('course' => $course->id));
}
course_delete_module($moduleinstances[$indextodelete]->cmid, true); // Try to delete the instance asynchronously.
$this->assertEquals($expected, course_modules_pending_deletion($course->id, $gradable));
}
}
+1 -3
View File
@@ -2141,12 +2141,11 @@ class core_course_externallib_testcase extends externallib_advanced_testcase {
$this->assertFalse($adminoptions->outcomes);
$this->assertFalse($adminoptions->badges);
$this->assertFalse($adminoptions->import);
$this->assertFalse($adminoptions->publish);
$this->assertFalse($adminoptions->reset);
$this->assertFalse($adminoptions->roles);
$this->assertFalse($adminoptions->editcompletion);
} else {
$this->assertCount(15, $course['options']);
$this->assertCount(14, $course['options']);
$this->assertFalse($adminoptions->update);
$this->assertFalse($adminoptions->filters);
$this->assertFalse($adminoptions->reports);
@@ -2158,7 +2157,6 @@ class core_course_externallib_testcase extends externallib_advanced_testcase {
$this->assertFalse($adminoptions->outcomes);
$this->assertTrue($adminoptions->badges);
$this->assertFalse($adminoptions->import);
$this->assertFalse($adminoptions->publish);
$this->assertFalse($adminoptions->reset);
$this->assertFalse($adminoptions->roles);
$this->assertFalse($adminoptions->editcompletion);
@@ -124,7 +124,7 @@ class converter implements \core_files\converter_interface {
$uploadurl;
// Google returns a location header with the location for the upload.
foreach ($headers as $header) {
if (strpos($header, 'Location:') === 0) {
if (stripos($header, 'Location:') === 0) {
$uploadurl = trim(substr($header, strpos($header, ':') + 1));
}
}
@@ -194,7 +194,9 @@ class converter implements \core_files\converter_interface {
$conversions = conversion::get_conversions_for_file($testdocx, $format);
foreach ($conversions as $conversion) {
$conversion->delete();
if ($conversion->get('id')) {
$conversion->delete();
}
}
$conversion = new conversion(0, (object) [
@@ -23,6 +23,7 @@ Feature: Converting rubric score to grades
| activity | name | intro | course | idnumber | grade | advancedgradingmethod_submissions |
| assign | Test assignment 1 | Test | C1 | assign1 | <grade> | rubric |
When I log in as "teacher1"
And I change window size to "large"
And I am on "Course 1" course homepage with editing mode on
And I go to "Test assignment 1" advanced grading definition page
And I set the following fields to these values:
@@ -26,6 +26,7 @@ Feature: Rubrics can have levels with negative scores
And the following "activities" exist:
| activity | name | intro | course | idnumber | grade | advancedgradingmethod_submissions |
| assign | Test assignment 1 | Test | C1 | assign1 | 100 | rubric |
And I change window size to "large"
When I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I go to "Test assignment 1" advanced grading definition page
+1 -1
View File
@@ -986,7 +986,7 @@ function print_grade_page_head($courseid, $active_type, $active_plugin=null,
// Put a warning on all gradebook pages if the course has modules currently scheduled for background deletion.
require_once($CFG->dirroot . '/course/lib.php');
if (course_modules_pending_deletion($courseid)) {
if (course_modules_pending_deletion($courseid, true)) {
\core\notification::add(get_string('gradesmoduledeletionpendingwarning', 'grades'),
\core\output\notification::NOTIFY_WARNING);
}
@@ -77,7 +77,7 @@ Feature: A teacher checks the grade history report in a course
| Student 2 | The greatest assignment ever | 50.00 | 70.00 | Teacher 2 |
| Student 2 | Rewarding assignment | 60.00 | 80.00 | Teacher 2 |
# Test filtering by assignment.
And I click on "The greatest assignment ever" "option" in the "#id_itemid" "css_element"
And I set the field "Grade item" to "The greatest assignment ever"
And I press "Submit"
And the following should exist in the "gradereport_history" table:
| First name/Surname | Grade item | Original grade | Revised grade | Grader |
@@ -87,7 +87,7 @@ Feature: A teacher checks the grade history report in a course
| Student 1 | Rewarding assignment | | 60.00 | Teacher 1 |
| Student 1 | Rewarding assignment | 60.00 | 80.00 | Teacher 2 |
# Test filtering by grader.
And I click on "Teacher 1" "option" in the "#id_grader" "css_element"
And I set the field "Grader" to "Teacher 1"
And I press "Submit"
And the following should exist in the "gradereport_history" table:
| First name/Surname | Grade item | Original grade | Revised grade | Grader |
@@ -93,7 +93,8 @@ class dropdown_attribute extends element {
'value' => $option,
'selected' => $selected == $option
];
}, array_keys($options))
}, array_keys($options)),
'label' => get_string('gradefor', 'gradereport_singleview', $this->label),
);
return $OUTPUT->render_from_template('gradereport_singleview/dropdown_attribute', $context);
@@ -17,6 +17,7 @@
{{!
Dropdown attribute.
}}
<label for="{{name}}" class="accesshide">{{label}}</label>
<select id="{{name}}" name="{{name}}" tabindex="1" {{#disabled}}disabled{{/disabled}}>
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
@@ -87,7 +87,7 @@ Feature: We can use Single view
And the field "Grade for james (Student) 1" matches value "12.05"
And the field "Exclude for holly (Student) 2" matches value "1"
And I select "new grade item 1" from the "Select grade item..." singleselect
And I click on "Very good" "option"
And I set the field "Grade for james (Student) 1" to "Very good"
And I press "Save"
Then I should see "Grades were set for 1 items"
And I press "Continue"
@@ -98,7 +98,7 @@ Feature: We can use Single view
And I log in as "teacher2"
And I am on "Course 1" course homepage
Given I navigate to "View > Single view" in the course gradebook
And I click on "Student 4" "option"
And I select "Student 4" from the "Select user..." singleselect
And the "Exclude for Test assignment one" "checkbox" should be disabled
And the "Override for Test assignment one" "checkbox" should be enabled
+24
View File
@@ -372,6 +372,30 @@ body {
background-color: rgb(245, 245, 245);
padding: 8px 15px;
}
.w-100 {
width: 100%!important;
}
.flex-row-reverse {
flex-direction: row-reverse!important;
}
.btn-group, .btn-group-vertical {
position: relative;
display: inline-flex;
vertical-align: middle;
}
.mb-3, .my-3 {
margin-bottom: 1rem!important;
}
.mr-auto, .mx-auto {
margin-right: auto!important;
}
.ml-auto, .mx-auto {
margin-left: auto!important;
}
.ml-1, .mx-1 {
margin-left: .25rem!important;
}
/*
End of MDL-43839 IE9 specific CSS.
*/
+1 -1
View File
@@ -89,7 +89,7 @@ $string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
$string['welcomep20'] = 'Podařilo se vám úspěšně nainstalovat a spustit balíček <strong>{$a->packname} {$a->packversion}</strong>. Gratulujeme!';
$string['welcomep30'] = 'Tato verze <strong>{$a->installername}</strong> obsahuje aplikace k vytvoření prostředí, ve kterém bude provozován váš <strong>Moodle</strong>. Jmenovitě se jedná o:';
$string['welcomep40'] = 'Balíček rovněž obsahuje <strong>Moodle ve verzi {$a->moodlerelease} ({$a->moodleversion})</strong>.';
$string['welcomep50'] = 'Použití všech aplikací v tomto balíčku je vázáno jejich příslušnými licencemi. Kompletní balíček <strong>{$a->installername}</strong> je software s <a href="http://www.opensource.org/docs/definition_plain.html"> otevřeným kódem (open source)</a> a je šířen pod licencí <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a>.';
$string['welcomep50'] = 'Použití všech aplikací v tomto balíčku je vázáno jejich příslušnými licencemi. Kompletní balíček <strong>{$a->installername}</strong> je software s <a href="https://www.opensource.org/docs/definition_plain.html"> otevřeným kódem (open source)</a> a je šířen pod licencí <a href="https://www.gnu.org/copyleft/gpl.html">GPL</a>.';
$string['welcomep60'] = 'Následující stránky vás v několik jednoduchých krocích nastavením <strong>Moodlu</strong> na vašem počítači. Můžete přijmout výchozí nastavení, nebo si je upravit podle svých potřeb.';
$string['welcomep70'] = 'Stisknutím níže uvedeného tlačítka "Další" pokračujte v nastavení vaší instalace Moodlu.';
$string['wwwroot'] = 'Webová adresa';
+1 -1
View File
@@ -88,7 +88,7 @@ $string['welcomep20'] = 'Du ser denne side fordi du har installeret og åbnet pa
Tillykke med det!';
$string['welcomep30'] = 'Denne version af <strong>{$a->installername}</strong> indeholder programmerne til at oprette et miljø, hvori <strong>Moodle</strong> vil operere, nemlig:';
$string['welcomep40'] = 'Pakken indeholder også <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong>.';
$string['welcomep50'] = 'Brugen af programmerne i denne pakke reguleres af deres respektive licenser. Hele <strong>{$a->installername}</strong>-pakken er <a href="http://www.opensource.org/docs/definition_plain.html">open source</a> og distribueret under <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a>-licensen.';
$string['welcomep50'] = 'Brugen af programmerne i denne pakke reguleres af deres respektive licenser. Hele <strong>{$a->installername}</strong>-pakken er <a href="https://www.opensource.org/docs/definition_plain.html">open source</a> og distribueret under <a href="https://www.gnu.org/copyleft/gpl.html">GPL</a>-licensen.';
$string['welcomep60'] = 'De følgende sider vil hjælpe dig gennem nogle nemme trin til konfiguration og opsætning af <strong>Moodle</strong> på din computer. Du kan acceptere standardindstillingerne, eller vælge at ændre dem så de bedre svarer til dine egne behov.';
$string['welcomep70'] = 'Klik på "Næste" herunder for at forsætte opsætningen af <strong>Moodle</strong>.';
$string['wwwroot'] = 'Webadresse';
+1 -1
View File
@@ -40,7 +40,7 @@ $string['cannotsavemd5file'] = 'Αδυναμία αποθήκευσης αρχε
$string['cannotsavezipfile'] = 'Αδυναμία αποθήκευσης συμπιεσμένου αρχείου';
$string['cannotunzipfile'] = 'Αδυναμία αποσυμπίεσης αρχείου';
$string['componentisuptodate'] = 'Το στοιχείο λογισμικού είναι ενημερωμένο.';
$string['dmlexceptiononinstall'] = '<p>Παρουσιάστηκε σφάλμα βάσης δεδομένων [{$a->errorcode}].<br />{$a->debuginfo}</p>';
$string['dmlexceptiononinstall'] = '<p>Παρουσιάστηκε κάποιο σφάλμα βάσης δεδομένων [{$a->errorcode}].<br />{$a->debuginfo}</p>';
$string['downloadedfilecheckfailed'] = 'Αποτυχία ελέγχου αρχείου που έγινε λήψη';
$string['invalidmd5'] = 'Μη έγκυρο md5';
$string['missingrequiredfield'] = 'Κάποιο απαιτούμενο πεδίο λείπει';
+1 -1
View File
@@ -85,7 +85,7 @@ $string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
$string['welcomep20'] = 'Βλέπετε αυτή τη σελίδα γιατί εγκαταστήσατε και ξεκινήσατε με επιτυχία το πακέτο <strong>{$a->packname} {$a->packversion}</strong> στον υπολογιστή σας. Συγχαρητήρια!';
$string['welcomep30'] = 'Αυτή η έκδοση/διανομή <strong>{$a->installername}</strong> περιλαμβάνει τις εφαρμογές για τη δημιουργία ενός περιβάλλοντος μέσα στο οποίο θα λειτουργεί το <strong>Moodle</strong>, ονομαστικά:';
$string['welcomep40'] = 'Το πακέτο περιλαμβάνει επίσης το <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong>.';
$string['welcomep50'] = 'Η χρήση όλων των εφαρμογών σε αυτό το πακέτο υπόκειται στις αντίστοιχες άδειες. Ολόκληρο το πακέτο <strong>{$a->installername}</strong> είναι <a href="http://www.opensource.org/docs/definition_plain.html">λογισμικό ανοικτού κώδικα</a> και διανέμεται με την <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a> άδεια.';
$string['welcomep50'] = 'Η χρήση όλων των εφαρμογών σε αυτό το πακέτο υπόκειται στις αντίστοιχες άδειες. Ολόκληρο το πακέτο <strong>{$a->installername}</strong> είναι <a href="https://www.opensource.org/docs/definition_plain.html">λογισμικό ανοικτού κώδικα</a> και διανέμεται με την <a href="https://www.gnu.org/copyleft/gpl.html">GPL</a> άδεια.';
$string['welcomep60'] = 'Οι παρακάτω σελίδες θα σας καθοδηγήσουν με εύκολα βήματα στην εγκατάσταση και ρύθμιση του <strong>Moodle</strong> στον Η/Υ σας. Μπορείτε να δεχθείτε τις προεπιλεγμένες ρυθμίσεις ή προαιρετικά, να τις τροποποιήσετε ανάλογα με τις ανάγκες σας.';
$string['welcomep70'] = 'Πατήστε το κουμπί «Συνέχεια» για να συνεχίσετε με την εγκατάσταση του <strong>Moodle</strong>.';
$string['wwwroot'] = 'Διεύθυνση ιστού';
+1 -1
View File
@@ -85,7 +85,7 @@ $string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
$string['welcomep20'] = 'Vous voyez cette page, car vous avez installé Moodle correctement et lancé le logiciel <b>{$a->packname} {$a->packversion}</b> sur votre ordinateur. Félicitations !';
$string['welcomep30'] = 'Cette version de <b>{$a->installername}</b> comprend des logiciels qui créent un environnement dans lequel <b>Moodle</b> va fonctionner, à savoir :';
$string['welcomep40'] = 'Ce paquet contient également <b>Moodle {$a->moodlerelease} ({$a->moodleversion})</b>.';
$string['welcomep50'] = 'L\'utilisation de tous les logiciels de ce paquet est soumis à l\'acceptation de leurs licences respectives. Le paquet <b>{$a->installername}</b> est un <a href="http://www.opensource.org/docs/definition_plain.html">logiciel libre</a>. Il est distribué sous licence <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a>.';
$string['welcomep50'] = 'L\'utilisation de tous les logiciels de ce paquetage est soumis à l\'acceptation de leurs licences respectives. Le paquetage complet <strong>{$a->installername}</strong> est un <a href="https://www.opensource.org/docs/definition_plain.html">logiciel libre</a>. Il est distribué sous licence <a href="https://www.gnu.org/copyleft/gpl.html">GPL</a>.';
$string['welcomep60'] = 'Les pages suivantes vous aideront pas à pas à configurer et mettre en place <b>Moodle</b> sur votre ordinateur. Il vous sera possible d\'accepter les réglages par défaut ou, facultativement, de les adapter à vos propres besoins.';
$string['welcomep70'] = 'Cliquer sur le bouton « Suivant » ci-dessous pour continuer l\'installation de <b>Moodle</b>.';
$string['wwwroot'] = 'Adresse web';
@@ -1,4 +1,5 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -14,4 +15,20 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Automatically generated strings for Moodle installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['parentlanguage'] = 'fr';
$string['thislanguage'] = 'Français pour Workplace';
+16
View File
@@ -36,12 +36,28 @@ $string['chooselanguagehead'] = 'Pilih bahasa';
$string['chooselanguagesub'] = 'Silakan pilih bahasa untuk instalasi. Bahasa ini juga akan digunakan sebagai bahasa default untuk situs, meskipun mungkin akan diubah kemudian.';
$string['clialreadyconfigured'] = 'Berkas konfigurasi config.php sudah ada. Silakan gunakan admin /cli/install_database.php untuk menginstal Moodle untuk situs ini.';
$string['clialreadyinstalled'] = 'File konfigurasi config.php sudah ada. Silakan gunakan admin/cli/install_database.php untuk menginstal Moodle untuk situs ini.';
$string['cliinstallheader'] = 'Program pemasangan baris perintah Moodle {$a}';
$string['databasehost'] = 'Host basis data';
$string['databasename'] = 'Nama basis data';
$string['databasetypehead'] = 'Pilih pengandar basis data';
$string['dataroot'] = 'Direktori data';
$string['datarootpermission'] = 'Izin direktori data';
$string['dbprefix'] = 'Prefiks tabel';
$string['dirroot'] = 'Direktori Moodle';
$string['environmenthead'] = 'Memeriksa sistem Anda ...';
$string['environmentsub2'] = 'Setiap rilis Moodle memiliki beberapa persyaratan versi PHP minimum dan sejumlah ekstensi PHP wajib. Pemeriksaan komponen sistem akan dilakukan sebelum pemasangan dan peningkatan versi. Silakan hubungi administrator peladen jika Anda tidak tahu cara mamasang versi baru atau mengaktifkan ekstensi PHP.';
$string['errorsinenvironment'] = 'Pemeriksaan sistem gagal!';
$string['installation'] = 'Instalasi';
$string['langdownloaderror'] = 'Sayangnya bahasa "{$a}" tidak dapat diunduh. Proses instalasi akan dilanjutkan dalam bahasa Inggris.';
$string['memorylimithelp'] = '<p> Batas memori PHP untuk server Anda saat ini diatur ke {$a}. </p> <p> Ini dapat menyebabkan Moodle memiliki masalah memori di kemudian hari, terutama jika Anda memiliki banyak modul yang diaktifkan dan/atau banyak pengguna. </p> <p> Kami menyarankan Anda mengkonfigurasi PHP dengan batas yang lebih tinggi jika memungkinkan, seperti 40M. Ada beberapa cara untuk melakukan ini yang dapat Anda coba: </p>
<ol> <li> Jika Anda bisa, kompilasi ulang PHP dengan <i> --enable-memory-limit </i>. Ini memungkinkan Moodle untuk mengatur batas memori itu sendiri. </li>
<li> Jika Anda memiliki akses ke file php.ini, Anda dapat mengubah pengaturan <b> memory_limit </b> di sana menjadi sekitar 40M. Jika Anda tidak memiliki akses, Anda mungkin dapat meminta administrator untuk melakukan ini untuk Anda. </li>
<li> Pada beberapa server PHP, Anda dapat membuat file .htaccess di direktori Moodle yang berisi baris ini: <blockquote> <div> php_value memory_limit 40M </div> </blockquote> <p> Namun, pada beberapa server ini tidak diizinkan <b> semua </b> halaman PHP tidak berfungsi (Anda akan melihat kesalahan ketika Anda melihat halaman) sehingga Anda Anda harus menghapus file .htaccess. </p> </li> </ol>';
$string['paths'] = 'Jalur';
$string['pathserrcreatedataroot'] = 'Direktori data ({$a->dataroot}) tidak dapat dibuat oleh installer.';
$string['pathshead'] = 'Konfirmasi jalur';
$string['pathsrodataroot'] = 'Direktori data root tidak dapat ditulisi.';
$string['pathsroparentdataroot'] = 'Direktori induk ({$a->parent}) tidak dapat ditulisi. Direktori data ({$a->dataroot}) tidak dapat dibuat oleh installer.';
$string['pathssubadmindir'] = 'Beberapa hosting menggunakan / admin sebagai URL khusus untuk Anda mengakses panel kontrol atau sesuatu. Sayangnya ini bertentangan dengan lokasi standar untuk halaman admin Moodle. Anda dapat memperbaikinya dengan mengganti nama direktori admin di instalasi Anda, dan meletakkan nama baru itu di sini. Misalnya: <em> moodleadmin </em>. Ini akan memperbaiki tautan admin di Moodle.';
$string['pathssubdataroot'] = '<p> Direktori tempat Moodle akan menyimpan semua konten file yang diunggah oleh pengguna. </p> <p> Direktori ini harus dapat dibaca dan ditulis oleh pengguna server web (biasanya \'www-data\', \'nobody\', atau \' apache \'). </p> <p> Itu tidak boleh diakses secara langsung melalui web. </p> <p> Jika direktori saat ini tidak ada, proses instalasi akan berusaha membuatnya. </p>';
$string['pathssubdirroot'] = '<p> Jalur lengkap ke direktori yang berisi kode Moodle. </p>';
+1 -1
View File
@@ -40,6 +40,6 @@ $string['cliunknowoption'] = 'Nieznana opcja:
{$a}
Proszę użyć pomocy.';
$string['cliyesnoprompt'] = 'wpisz y (czyli tak) lub n (czyli nie)';
$string['environmentrequireinstall'] = 'jest niezbędnę, żeby było zainstalowane/włączone';
$string['environmentrequireinstall'] = 'jest niezbędne, aby było zainstalowane i włączone';
$string['environmentrequireversion'] = 'wersja {$a->needed} jest niezbędna a ty używasz wersji {$a->current}';
$string['upgradekeyset'] = 'Zaktualizuj klucz (pozostaw puste jeśli nie jest to skonfigurowane)';
+37
View File
@@ -0,0 +1,37 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Automatically generated strings for Moodle installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['clianswerno'] = 'n';
$string['cliansweryes'] = 'y';
$string['cliincorrectvalueretry'] = 'Valoarea nu este corectă, încercați din nou';
$string['environmentrequireinstall'] = 'trebuie să fie instalat și activat';
$string['environmentrequireversion'] = 'versiunea {$a->needed} este necesară iar dumneavoastră rulați {$a->current}';
+37
View File
@@ -0,0 +1,37 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Automatically generated strings for Moodle installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['language'] = 'Limbă';
$string['moodlelogo'] = 'Logo Moodle';
$string['next'] = 'Următoarea';
$string['previous'] = 'Anterior';
$string['reload'] = 'Reîncarcă';
+1 -1
View File
@@ -87,7 +87,7 @@ $string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
$string['welcomep20'] = 'Ову страницу видите зато што сте успешно инсталирали и покренули <strong>{$a->packname} {$a->packversion}</strong> пакет на свом серверу. Честитамо!';
$string['welcomep30'] = 'Ово издање <strong>{$a->installername}</strong> укључује апликације за креирање окружења у којем ће <strong>Moodle</strong> успешно функционисати, конкретно:';
$string['welcomep40'] = 'Овај пакет обухвата и <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong>.';
$string['welcomep50'] = 'Коришћење свих апликација овог пакета је уређено њиховим лиценцама. Комплетан<strong>{$a->installername}</strong> пакет је <a href="http://www.opensource.org/docs/definition_plain.html">отвореног кода</a> и дистрибуира се под <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a> лиценцом.';
$string['welcomep50'] = 'Коришћење свих апликација овог пакета је уређено њиховим лиценцама. Комплетан<strong>{$a->installername}</strong> пакет је <a href="https://www.opensource.org/docs/definition_plain.html">отвореног кода</a> и дистрибуира се под <a href="https://www.gnu.org/copyleft/gpl.html">GPL</a> лиценцом.';
$string['welcomep60'] = 'Наредне странице ће вас провести кроз неколико једноставних корака током којих ћете конфигурисати и подесити <strong>Moodle</strong> на свом рачунару. Можете прихватити подразумевана подешавања или их, опционо, прилагодити сопственим потребама.';
$string['welcomep70'] = 'Кликните на дугме за наставак да бисте даље подешавали <strong>Moodle</strong>.';
$string['wwwroot'] = 'Веб адреса';
+1 -1
View File
@@ -84,7 +84,7 @@ $string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
$string['welcomep20'] = 'Ovu stranicu vidite zato što ste uspešno instalirali i pokrenuli <strong>{$a->packname} {$a->packversion}</strong> paket na svom serveru. Čestitamo!';
$string['welcomep30'] = 'Ovo izdanje <strong>{$a->installername}</strong> uključuje aplikacije za kreiranje okruženja u kojem će <strong>Moodle</strong> uspešno funkcionisati, konkretno:';
$string['welcomep40'] = 'Ovaj paket obuhvata i <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong>.';
$string['welcomep50'] = 'Korišćenje svih aplikacija ovog paketa je uređeno njihovim licencama. Kompletan<strong>{$a->installername}</strong> paket je <a href="http://www.opensource.org/docs/definition_plain.html">otvorenog koda</a> i distribuira se pod <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a> licencom.';
$string['welcomep50'] = 'Korišćenje svih aplikacija ovog paketa je uređeno njihovim licencama. Kompletan<strong>{$a->installername}</strong> paket je <a href="https://www.opensource.org/docs/definition_plain.html">otvorenog koda</a> i distribuira se pod <a href="https://www.gnu.org/copyleft/gpl.html">GPL</a> licencom.';
$string['welcomep60'] = 'Naredne stranice će vas provesti kroz nekoliko jednostavnih koraka tokom kojih ćete konfigurisati i podesiti <strong>Moodle</strong> na svom računaru. Možete prihvatiti podrazumevana podešavanja ili ih, opciono, prilagoditi sopstvenim potrebama.';
$string['welcomep70'] = 'Kliknite na dugme za nastavak da biste dalje podešavali <strong>Moodle</strong>.';
$string['wwwroot'] = 'Web adresa';
+1
View File
@@ -31,6 +31,7 @@
defined('MOODLE_INTERNAL') || die();
$string['language'] = 'மொழி';
$string['moodlelogo'] = 'Moodle சின்னம்';
$string['next'] = 'அடுத்தது';
$string['previous'] = 'முன்னைய';
$string['reload'] = 'மீள ஏற்றுக';
+34
View File
@@ -0,0 +1,34 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Automatically generated strings for Moodle installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['parentlanguage'] = 'zh_cn';
$string['thislanguage'] = 'Workplace 简体中文版';
+34
View File
@@ -0,0 +1,34 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Automatically generated strings for Moodle installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['parentlanguage'] = 'zh_tw';
$string['thislanguage'] = 'Workplace 繁體中文版';
+2
View File
@@ -29,6 +29,8 @@ $string['accessstatement'] = 'Accessibility statement';
$string['activitynext'] = 'Next activity';
$string['activityprev'] = 'Previous activity';
$string['breadcrumb'] = 'Navigation bar';
$string['eventcontextlocked'] = 'Context frozen';
$string['eventcontextunlocked'] = 'Context unfrozen';
$string['hideblocka'] = 'Hide {$a} block';
$string['showblocka'] = 'Show {$a} block';
$string['sitemap'] = 'Site map';
+4 -4
View File
@@ -202,7 +202,7 @@ $string['configdebugdisplay'] = 'Set to on, the error reporting will go to the H
$string['configdebugpageinfo'] = 'Enable if you want page information printed in page footer.';
$string['configdebugsmtp'] = 'Enable verbose debug information during sending of email messages to SMTP server. For this setting to take effect, the \'Debug messages\' setting must be set to \'Developer\'.';
$string['configdebugvalidators'] = 'Enable if you want to have links to external validator servers in page footer. You may need to create new user with username <em>w3cvalidator</em>, and enable guest access. These changes may allow unauthorized access to server, do not enable on production sites!';
$string['configdefaulthomepage'] = 'This determines the home page for logged in users';
$string['configdefaulthomepage'] = 'This determines the first link in the navigation for logged-in users.';
$string['configdefaultrequestcategory'] = 'Courses requested by users will be automatically placed in this category.';
$string['configdefaultrequestedcategory'] = 'Default category to put courses that were requested into, if they\'re approved.';
$string['configdefaultuserroleid'] = 'All logged in users will be given the capabilities of the role you specify here, at the site level, in ADDITION to any other roles they may have been given. The default is the Authenticated user role. Note that this will not conflict with other roles they have unless you prohibit capabilities, it just ensures that all users have capabilities that are not assignable at the course level (eg post blog entries, manage own calendar, etc).';
@@ -452,7 +452,7 @@ $string['debugvalidators'] = 'Show validator links';
$string['defaultcity'] = 'Default city';
$string['defaultcity_help'] = 'A city entered here will be the default city when creating new user accounts.';
$string['defaultformatnotset'] = 'Error determining default course format. Please check site settings.';
$string['defaulthomepage'] = 'Default home page for users';
$string['defaulthomepage'] = 'Home page for users';
$string['defaultrequestcategory'] = 'Default category for course requests';
$string['defaultsettinginfo'] = 'Default: {$a}';
$string['defaultuserroleid'] = 'Default role for all users';
@@ -993,7 +993,7 @@ $string['quizattemptsupgradedmessage'] = 'In Moodle 2.1 there was a major upgrad
$string['recaptchaprivatekey'] = 'ReCAPTCHA secret key';
$string['recaptchapublickey'] = 'ReCAPTCHA site key';
$string['register'] = 'Register your site';
$string['registermoodlenet'] = '<p>We\'d love to stay in touch and provide you with important things for your Moodle site!</p><p>By registering:</p><ul><li>You\'ll be one of the first to find out about important notifications such as security alerts and new Moodle releases.</li><li>You can access and activate mobile push notifications from your Moodle site through our free <a href="https://download.moodle.org/mobile/">Moodle app</a>.</li><li>You are contributing to our <a href="https://moodle.net/stats/">Moodle statistics</a> of the worldwide community, which help us improve Moodle and our community sites.</li><li>If you wish, your site can be included in the <a href="https://moodle.net/sites/">list of registered Moodle sites</a> in your country.</li></ul>';
$string['registermoodlenet'] = '<p>We\'d love to stay in touch and provide you with important things for your Moodle site!</p><p>By registering:</p><ul><li>You can subscribe to receive notifications of new Moodle releases, security alerts and other important news.</li><li>You can access and activate mobile push notifications from your Moodle site through our free <a href="https://download.moodle.org/mobile/">Moodle app</a>.</li><li>You are contributing to our <a href="https://moodle.net/stats/">Moodle statistics</a> of the worldwide community, which help us improve Moodle and our community sites.</li><li>If you wish, your site can be included in the <a href="https://moodle.net/sites/">list of registered Moodle sites</a> in your country.</li></ul>';
$string['registermoodleorg'] = 'When you register your site';
$string['registermoodleorgli1'] = 'You are added to a low-volume mailing list for important notifications such as security alerts and new releases of Moodle.';
$string['registermoodleorgli2'] = 'Statistics about your site will be added to the {$a} of the worldwide Moodle community.';
@@ -1231,6 +1231,7 @@ $string['unbookmarkthispage'] = 'Unbookmark this page';
$string['unicoderequired'] = 'It is required that you store all your data in Unicode format (UTF-8). New installations must be performed into databases that have their default character set as Unicode. If you are upgrading, you should perform the UTF-8 migration process (see the Admin page).';
$string['uninstallplugin'] = 'Uninstall';
$string['unlockaccount'] = 'Unlock account';
$string['unoconvwarning'] = 'The version of unoconv you have installed is not supported.';
$string['unsettheme'] = 'Unset theme';
$string['unsupported'] = 'Unsupported';
$string['unsupporteddbfileformat'] = 'Your database uses Antelope as the file format. Full UTF-8 support in MySQL and MariaDB requires the Barracuda file format. Please switch to the Barracuda file format. See the documentation <a href="https://docs.moodle.org/en/admin/environment/custom check/mysql full unicode support">MySQL full unicode support</a> for details.';
@@ -1346,7 +1347,6 @@ $string['cacheapplicationhelp'] = 'Cached items are shared among all users and e
// Deprecated since Moodle 3.3.
$string['loginpasswordautocomplete'] = 'Prevent password autocompletion on login form';
$string['loginpasswordautocomplete_help'] = 'If enabled, users are not allowed to save their account password in their browser.';
$string['unoconvwarning'] = 'The version of unoconv you have installed is not supported.';
// Deprecated since Moodle 3.4
$string['moodleorghubname'] = 'Moodle';
$string['hubs'] = 'Hubs';

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