Compare commits

..

808 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) 6ccbbe5936 Moodle release 2.1.10 2013-01-11 22:18:31 +01:00
Eloy Lafuente (stronk7) 50faa1482d weekly release 2.1.9+ 2013-01-11 12:30:21 +01:00
Eloy Lafuente (stronk7) 150c0b7e2c Merge branch 'install_21_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_21_STABLE 2013-01-11 12:17:20 +01:00
David Mudrák 4eeece1f92 MDL-37467 Do not provide blog posts via RSS when blogging is disabled 2013-01-10 18:18:26 +01:00
David Mudrák fd91456383 MDL-36977 Be more picky when it comes to migrating files in moodle1 backups 2013-01-08 08:57:04 +08:00
David Mudrák 4a27bde150 MDL-36977 Add more unit tests for moodle1 backup conversion 2013-01-08 08:55:27 +08:00
AMOS bot d1c98147e4 Automatically generated installer lang files 2013-01-01 00:43:03 +00:00
Eloy Lafuente (stronk7) 65d6ca257c weekly release 2.1.9+ 2012-12-30 01:03:34 +01:00
Petr Škoda 9803d8fc3c MDL-37283 import tinymce spellchecker 2.0.6.1 2012-12-24 10:37:05 +08:00
Eloy Lafuente (stronk7) 7e71b80f1e weekly release 2.1.9+ 2012-12-20 21:10:22 +01:00
Eloy Lafuente (stronk7) db6243d0a1 Merge branch 'install_21_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_21_STABLE 2012-12-20 20:57:56 +01:00
AMOS bot ec17e70103 Automatically generated installer lang files 2012-12-20 00:40:41 +00:00
AMOS bot c26a6747c6 Automatically generated installer lang files 2012-12-19 00:42:04 +00:00
Paul Nicholls f94bb9ebd4 MDL-27619: Prevent teachers from turning course Outcomes into site-wide ones
Similar to the issue which allowed teachers to create site-wide scales by editing a course-specific scale (MDL-24682), teachers could also promote a course-specific scale to a site-wide (standard) by editing it.  As with MDL-24682, removing the course ID check (leaving just the capability check) prevents this unauthorised creation of site-wide (standard) outcomes.
2012-12-18 09:43:30 +13:00
Eloy Lafuente (stronk7) 85fc893630 weekly release 2.1.9+ 2012-12-08 02:53:27 +01:00
AMOS bot e076bc63a5 Automatically generated installer lang files 2012-12-01 00:43:10 +00:00
Eloy Lafuente (stronk7) cc07dee0d0 weekly release 2.1.9+ 2012-11-30 13:23:40 +01:00
Dan Poltawski d8b662d5e2 weekly release 2.1.9+ 2012-11-23 15:18:15 +08:00
Dan Poltawski e5f91ef230 Merge branch 'install_21_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_21_STABLE 2012-11-23 15:16:01 +08:00
AMOS bot e8138a566d Automatically generated installer lang files 2012-11-22 09:05:27 +00:00
Adrian Greeve 640acd9907 MDL-36668 - mod/data: Removed duplicate data_content join in simple searches.
Thanks to Patrick Pollet (patrick.pollet@insa-lyon.fr) for his patch
2012-11-19 10:15:45 +08:00
Dan Poltawski f24293bf1a weekly release 2.1.9+ 2012-11-16 15:38:21 +08:00
AMOS bot 2cc726280f Automatically generated installer lang files 2012-11-10 00:36:27 +00:00
Eloy Lafuente (stronk7) eef69e4122 Moodle release 2.1.9 2012-11-09 19:33:29 +01:00
Eloy Lafuente (stronk7) 5339ba2cf9 MDL-25948 upgrade: Avoid overlaping with weeklies 2012-11-09 18:59:40 +01:00
Eloy Lafuente (stronk7) 828bb475ac Merge branch 'MDL-25948_m21' of git://github.com/markn86/moodle into MOODLE_21_STABLE 2012-11-09 18:58:33 +01:00
Mark Nelson 7ea26a73c4 MDL-25948 upgrade: Check that field does not match defaults before editing. 2012-11-09 19:02:15 +08:00
Dan Poltawski c04de02282 weekly release 2.1.8+ 2012-11-09 17:59:51 +08:00
Dan Poltawski 176a06e4e6 Merge branch 'install_21_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_21_STABLE 2012-11-09 17:54:52 +08:00
Mark Nelson 2c53094c6f MDL-33791 Portfolio: Fixed security issue with passing file paths. 2012-11-08 00:28:22 +01:00
Adrian Greeve 4cf9360fca MDL-35558 mod_data: Show only own entries while there are required pending. 2012-11-07 19:55:23 +01:00
Dan Poltawski 546667e238 Merge branch 'MDL-36346_21' of git://github.com/pauln/moodle into MOODLE_21_STABLE 2012-11-07 09:28:44 +08:00
Paul Nicholls 7972bc0491 MDL-36346 - YUI2 SWF vulnerability, part 2 2012-11-07 13:45:34 +13:00
AMOS bot 6a57ed2001 Automatically generated installer lang files 2012-11-07 00:36:34 +00:00
Rossiani Wijaya c62a20c42b Backport MDL-29872 to 21_STABLE 2012-11-06 12:58:03 +01:00
Dan Poltawski ee02183dce Merge branch 'MDL-36346_21' of git://github.com/pauln/moodle into MOODLE_21_STABLE 2012-11-06 16:35:35 +08:00
Paul Nicholls 299e51924e MDL-36346 - YUI2 SWF vulnerability 2012-11-06 14:36:29 +13:00
Dan Poltawski 7837711783 Merge branch 'w42_MDL-35469_m21_geckover' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2012-11-02 12:07:26 +08:00
Mark Nelson 4326153883 MDL-25948 upgrade: Fixing issues with upgrade from < 1.7 to 2.x. 2012-11-01 17:49:04 +08:00
Dan Poltawski c22a3558d3 weekly release 2.1.8+ 2012-11-01 14:18:17 +08:00
AMOS bot 226735fec1 Automatically generated installer lang files 2012-11-01 00:36:41 +00:00
AMOS bot fc1414d856 Automatically generated installer lang files 2012-10-27 00:34:40 +00:00
AMOS bot eada616a76 Automatically generated installer lang files 2012-10-20 00:34:55 +00:00
AMOS bot af3889cc3f Automatically generated installer lang files 2012-10-19 00:35:18 +00:00
Aparup Banerjee 9fa159e2b4 weekly release 2.1.8+ 2012-10-18 19:49:39 +08:00
AMOS bot 46bd05ecc8 Automatically generated installer lang files 2012-10-18 00:34:58 +00:00
AMOS bot 08947f22ab Automatically generated installer lang files 2012-10-15 00:35:00 +00:00
Eloy Lafuente (stronk7) 95932f640a weekly release 2.1.8+ 2012-10-15 00:19:13 +02:00
Eloy Lafuente (stronk7) f772bb2b97 Merge branch 'install_21_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_21_STABLE 2012-10-15 00:08:04 +02:00
AMOS bot 339579a5ac Automatically generated installer lang files 2012-10-10 00:34:22 +00:00
Petr Škoda 14859c7c2f MDL-35469 fix Gecko based browser checks
The problem is that latest firefox versions stopped using dates because they lost the meaning over the time.
2012-10-09 15:51:45 +02:00
AMOS bot a7aa062d70 Automatically generated installer lang files 2012-10-09 00:34:44 +00:00
Adrian Greeve cfddc821c0 MDL-34448 - mod/data - Fixing separate groups viewing all entries. 2012-10-08 15:14:20 +08:00
AMOS bot 160bd39347 Automatically generated installer lang files 2012-10-06 00:34:04 +00:00
Eloy Lafuente (stronk7) a8d671999f weekly release 2.1.8+ 2012-10-05 13:36:51 +02:00
AMOS bot 53d871beac Automatically generated installer lang files 2012-10-04 00:35:03 +00:00
AMOS bot ae04014f6b Automatically generated installer lang files 2012-09-29 00:34:21 +00:00
Dan Poltawski 62aecff9da weekly release 2.1.8+ 2012-09-27 18:49:43 +08:00
Dan Poltawski 53f164b797 Merge branch 'install_21_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_21_STABLE 2012-09-27 18:48:22 +08:00
Dan Poltawski b81913ccc6 Merge branch 'MDL-35207-workshop-attachments-upgrade_21' of git://github.com/mudrd8mz/moodle into MOODLE_21_STABLE 2012-09-24 16:48:46 +08:00
David Mudrák ca2d4d39a2 MDL-35207 Fix 1.9 > 2.x upgrade of workshop submission attachments
Attachments of submission with non-linear ids in 1.9 database were not
upgraded correctly due to old id and new id mismatch. Credit goes to
Juan Segarra Montesinos for spotting the problem and suggesting a patch.
2012-09-22 23:37:26 +02:00
AMOS bot 2387735808 Automatically generated installer lang files 2012-09-21 00:34:55 +00:00
Dan Poltawski 22eb7f13e4 weekly release 2.1.8+ 2012-09-20 14:12:00 +08:00
AMOS bot 413cba10cc Automatically generated installer lang files 2012-09-19 00:34:27 +00:00
Eloy Lafuente (stronk7) 7dcbb60c76 weekly release 2.1.8+ 2012-09-14 19:08:53 +02:00
AMOS bot 1e2cf5ad50 Automatically generated installer lang files 2012-09-13 00:34:36 +00:00
Eloy Lafuente (stronk7) 445b4dd368 Moodle 2.1.8 release 2012-09-09 16:20:21 +02:00
AMOS bot 9865cbfb60 Merge branch 'MOODLE_21_STABLE' into install_21_STABLE 2012-09-08 00:34:49 +00:00
Eloy Lafuente (stronk7) c95a67cd94 weekly release 2.1.7+ 2012-09-07 02:37:18 +02:00
AMOS bot 3875f26ebf Automatically generated installer lang files 2012-09-07 00:35:14 +00:00
AMOS bot 9963023979 Automatically generated installer lang files 2012-09-02 00:32:48 +00:00
Eloy Lafuente (stronk7) 68763aef2d weekly release 2.1.7+ 2012-08-31 11:34:10 +02:00
AMOS bot c7c5b77888 Automatically generated installer lang files 2012-08-27 00:32:50 +00:00
Eloy Lafuente (stronk7) bf43fdd447 weekly release 2.1.7+ 2012-08-23 19:24:11 +02:00
AMOS bot ae11b8c080 Automatically generated installer lang files 2012-08-19 00:31:39 +00:00
AMOS bot 7cab4616f5 Automatically generated installer lang files 2012-08-17 00:31:53 +00:00
Eloy Lafuente (stronk7) ea7f6fb4b1 weekly release 2.1.7+ 2012-08-16 17:24:31 +02:00
AMOS bot b857de59ab Automatically generated installer lang files 2012-08-15 00:31:35 +00:00
AMOS bot d36658a989 Automatically generated installer lang files 2012-08-11 00:31:33 +00:00
AMOS bot c97f7de664 Automatically generated installer lang files 2012-08-10 00:31:50 +00:00
Eloy Lafuente (stronk7) b24f1eb290 weekly release 2.1.7+ 2012-08-09 20:50:23 +02:00
Eloy Lafuente (stronk7) f231685050 Merge branch 'install_21_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_21_STABLE 2012-08-09 20:46:52 +02:00
AMOS bot 8ec4354542 Automatically generated installer lang files 2012-08-09 00:31:40 +00:00
AMOS bot 1c8fe24234 Automatically generated installer lang files 2012-08-07 00:31:58 +00:00
AMOS bot 9900a3df74 Automatically generated installer lang files 2012-08-04 00:32:02 +00:00
AMOS bot e78c8c9054 Automatically generated installer lang files 2012-08-03 11:45:31 +02:00
Petr Škoda 2d2cce8bd2 MDL-34585 fix broken blog file access control 2012-08-02 10:00:04 +02:00
Dan Poltawski 8f7756b0e2 weekly release 2.1.7+ 2012-08-02 14:40:31 +08:00
Petr Škoda d4c83ae4fb MDL-34368 fix another validuntil condition 2012-08-01 15:07:26 +08:00
Nathan Mares c090fe60c7 MDL-34368: Fix broken query in so tokens are correctly checked against the linked service 2012-07-30 15:49:59 +08:00
Dan Poltawski 5b6f73f488 Merge branch 'MDL-34507-21' of git://github.com/FMCorz/moodle into MOODLE_21_STABLE 2012-07-30 14:05:38 +08:00
Dan Poltawski e60c472ccb Merge branch 'MDL-34519_21_course_reset_patch' of git://github.com/rlorenzo/moodle into MOODLE_21_STABLE 2012-07-30 11:58:13 +08:00
Frederic Massart 76c590c0aa MDL-34507 Filepicker: Repositories with specific filetypes are displayed when expected 2012-07-27 09:32:54 +08:00
Aparup Banerjee 60dce6a2c1 weekly release 2.1.7+ 2012-07-26 14:31:09 +08:00
Aparup Banerjee 56f9e59241 Merge branch 'install_21_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_21_STABLE 2012-07-26 14:04:26 +08:00
AMOS bot 6f3c243bb8 Automatically generated installer lang files 2012-07-26 00:31:46 +00:00
Rex Lorenzo e74681c8b2 MDL-34519 - Course reset not protected by proper capability 2012-07-24 12:05:24 -07:00
Aparup Banerjee b693256a99 Merge branch 'wip-mdl-33159-m21' of git://github.com/rajeshtaneja/moodle into MOODLE_21_STABLE 2012-07-24 11:18:59 +08:00
AMOS bot 77fa678ef2 Automatically generated installer lang files 2012-07-24 00:32:11 +00:00
Derick Turner 6819bed8da MDL-33159 course: Fix for site wide restricted modules not being selected by default 2012-07-20 12:36:41 +08:00
Dan Marsden f3ab1e0c8f MDL-34233 SCORM backup - change to using set_source_sql to preserve order of records in backup. 2012-07-19 19:41:07 +12:00
Dan Poltawski 33faa0d19d weekly release 2.1.7+ 2012-07-19 13:47:59 +08:00
Dan Poltawski af08d144c9 Merge branch 'install_21_STABLE' of git://github.com/amosbot/moodle into MOODLE_21_STABLE 2012-07-19 13:42:39 +08:00
Rossiani Wijaya 5127b43eec MDL-33575 choice module: add label to checkbox element when privacy of results is set to publish full results 2012-07-17 10:09:37 +08:00
AMOS bot fc07639e9b Automatically generated installer lang files 2012-07-17 00:31:56 +00:00
AMOS bot bc9e603b3f Automatically generated installer lang files 2012-07-13 00:32:34 +00:00
Dan Poltawski 27a7bb1a0d weekly release 2.1.7+ 2012-07-12 16:03:10 +08:00
Dan Poltawski aea7288f77 Merge branch 'install_21_STABLE' of git://github.com/amosbot/moodle into MOODLE_21_STABLE 2012-07-12 15:50:50 +08:00
Sam Hemelryk 18889e0e78 Revert "MDL-33575 choice module: add label to checkbox element when privacy of results is set to publish full results"
This reverts commit b66a680956.
2012-07-12 18:21:53 +12:00
AMOS bot 3df96ad21b Automatically generated installer lang files 2012-07-12 00:32:33 +00:00
AMOS bot dc01f95fb4 Automatically generated installer lang files 2012-07-10 20:33:26 +02:00
Sam Hemelryk c54cd379ac Merge branch 'MDL-29470-21' of git://github.com/FMCorz/moodle into MOODLE_21_STABLE 2012-07-10 12:09:06 +12:00
Charles Fulton bdeeadb3c3 MDL-27800 admin: make front page restore link consistent
Conflicts:

	admin/settings/frontpage.php
2012-07-10 11:33:58 +12:00
Frederic Massart e1abf003ee MDL-29470 Backup: fixed unexpected next automated backup date 2012-07-09 13:50:08 +08:00
Sam Hemelryk b66a680956 MDL-33575 choice module: add label to checkbox element when privacy of results is set to publish full results 2012-07-09 10:56:36 +12:00
Sam Hemelryk 5c89dd5d18 Merge branch 'MDL-30816_m21' of git://github.com/rwijaya/moodle into MOODLE_21_STABLE 2012-07-09 10:28:26 +12:00
Sam Hemelryk 67fb1b666e Merge branch 'MDL-33514-21' of git://github.com/danpoltawski/moodle into MOODLE_21_STABLE 2012-07-09 10:21:47 +12:00
AMOS bot 6311d4de60 Automatically generated installer lang files 2012-07-07 00:31:30 +00:00
Sam Hemelryk 870d485024 Moodle 2.1.7 release 2012-07-06 11:29:00 +12:00
Sam Hemelryk 44708a5568 weekly release 2.1.6+ 2012-07-06 10:07:16 +12:00
Sam Hemelryk 0ac34abbfb Merge branch 'install_21_STABLE' of git://github.com/amosbot/moodle into MOODLE_21_STABLE 2012-07-06 09:49:24 +12:00
Rossiani Wijaya eace33059c MDL-30816 Choice module: add format_string() for choice name. 2012-07-05 12:23:45 +08:00
Rossiani Wijaya e626145ef6 MDL-30816 choice module: fixed accessibility for responses table and make it easier for screenreader to read it 2012-07-05 12:23:31 +08:00
Eloy Lafuente (stronk7) 97f5b526e6 Merge branch 'MDL-34145_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2012-07-05 03:41:51 +02:00
AMOS bot 0abafc0622 Automatically generated installer lang files 2012-07-05 00:31:20 +00:00
Sam Hemelryk 48d0a91018 MDL-33770 webservices: Fixed error with core_group_create_groups when no enrolment key provided 2012-07-05 09:22:44 +12:00
Eloy Lafuente (stronk7) adb1b0afb4 MDL-32062 question engine: fix simpletests broken by the change. 2012-07-04 17:17:39 +02:00
AMOS bot ec68dac0fd Automatically generated installer lang files 2012-07-04 00:32:06 +00:00
Sam Hemelryk 7d7f36787b Merge branch 'MDL-32062_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2012-07-04 09:53:32 +12:00
Charles Fulton d27076d09e MDL-32851 resource: skip resources with invalid files 2012-07-04 09:43:21 +12:00
sam marshall 4dbc9b75d2 MDL-33466: Group restriction should hide activity even with 'show availability' option
This is a modified version of fix by Luke Tucker at NetSpot - thanks.
2012-07-04 09:38:16 +12:00
Jonathan Harker f0da446c56 MDL-27125 better manage file handles when downloading multiple files.
Based on Dongsheng Cai's branch: s11_MDL-27125_curl_file_handler_master
2012-07-04 09:33:22 +12:00
Sam Hemelryk 17a759cf61 Merge branch 'wip-MDL-33749-MOODLE_21_STABLE' of https://github.com/kwiliarty/moodle into MOODLE_21_STABLE 2012-07-04 08:41:26 +12:00
Kevin Wiliarty 78dd6d4813 MDL-33749 follow redirects for URL downloader 2012-07-03 16:22:21 -04:00
Dan Poltawski d65a100e88 Merge branch 'MDL-30903-21' of git://github.com/FMCorz/moodle into MOODLE_21_STABLE 2012-07-03 11:51:46 +08:00
Dan Poltawski 7e31c3b1c3 Merge branch 'MDL-30883_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2012-07-03 11:02:23 +08:00
Sam Hemelryk 30cab618e1 Merge branch 'wip-MDL-33957-stable21' of git://github.com/phalacee/moodle into MOODLE_21_STABLE 2012-07-03 14:57:14 +12:00
AMOS bot 1b82db6d0d Automatically generated installer lang files 2012-07-03 00:31:36 +00:00
Sam Hemelryk 75aa150051 Merge branch 'MOODLE_21_STABLE-MDL-33770' of git://github.com/mouneyrac/moodle into MOODLE_21_STABLE 2012-07-03 11:47:58 +12:00
Frederic Massart ee9bd0e350 MDL-33796 Glossary: removed unused missing string 2012-07-03 01:08:09 +02:00
Dan Poltawski f7b1660aa6 MDL-9214 - improve comment for custom login instructions 2012-07-03 10:47:36 +12:00
Dan Poltawski b97702e584 MDL-32286 - fix ambigious english string 2012-07-03 10:43:07 +12:00
Matthew G. Switlik 5de876ba81 MDL-28151 resource: prevent cropping of large images
Conflicts:

	theme/base/style/core.css
2012-07-03 10:16:04 +12:00
Eloy Lafuente (stronk7) 8162a1308a Merge branch 'MDL-23813_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2012-07-02 23:54:02 +02:00
Aparup Banerjee 33406a758c MDL-23254 Authentication : used httpswwwroot as root url during authentication procedure where $PAGE->https_required() is specified. 2012-07-03 09:42:51 +12:00
Dan Poltawski 44181e8a24 MDL-34081 dml: mssql driver was using case insensitve sql 2012-07-02 21:09:09 +02:00
Tim Hunt 9eb2207168 MDL-23813 glossary filter: add missing YUI dependency
Fix found by Huy Hoang. I am just making a commit.
2012-07-02 17:48:20 +01:00
Tim Hunt 3aa0f88b6e MDL-34145 postgres driver: fix get_tables perf on <= 9.0
The query of the information_schema view seems to be painfully slow on
older versions of postgres (2000ms instead of 20ms). Therefore, it is
worth detecting that case, and using a more postgres specific feedback.
This is particularly important for 2.3+ unit tests.

Thanks to Petr Skoda for his help with this.
2012-07-02 16:24:10 +01:00
Dan Poltawski d3c8f933df MDL-31802 - navigation: add a comment about session reduction 2012-07-02 17:29:30 +08:00
Dan Poltawski a3039b2085 Merge branch 'MDL-31802_21' of git://github.com/aolley/moodle into MOODLE_21_STABLE 2012-07-02 17:25:14 +08:00
Dan Poltawski 0a6a6a9cde Merge branch 'w27_MDL-34045_m21_idnumber' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2012-07-02 16:34:38 +08:00
Dan Poltawski 5edb51d072 Merge branch 'MDL-33924_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2012-07-02 16:19:37 +08:00
Dan Poltawski 1f4a068537 Merge branch 'MDL-33780_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2012-07-02 16:07:51 +08:00
Dan Poltawski a0ca809653 Merge branch 'MDL-30008-21' of git://github.com/FMCorz/moodle into MOODLE_21_STABLE 2012-07-02 15:43:49 +08:00
Dan Poltawski e059f69d3f Merge branch 'MDL-9073-21' of github.com:FMCorz/moodle into MOODLE_21_STABLE 2012-07-02 15:34:39 +08:00
Dan Poltawski 706c814d8c Merge branch 'MDL-31987_assignment_m21' of git://github.com/rwijaya/moodle into MOODLE_21_STABLE 2012-07-02 15:13:05 +08:00
Rossiani Wijaya d0c33d06a3 MDL-31987 Assignment module: fixed upgrade version 2012-07-02 14:58:33 +08:00
Dan Poltawski f2d59e46eb MDL-31987 Assignment module: fix sql for postgres. 2012-07-02 14:57:02 +08:00
Rossiani Wijaya 22c1e3f385 MDL-31987 Assignment module: Assignment count submissions correctly.
For advanced upload assignment, store file count of each submission
into assignment_submissions.numfiles

When counting submissions, if the assignment is open and tracking
drafts, only submissions which has send for marking are counted.
Otherwise, submissions which has numfiles > 0 are counted.

Also change a hardcoded 'submitted' to ASSIGNMENT_STATUS_SUBMITTED.

This patch was originally written by: Sunner Sun <sunner@gmail.com>.

I made some modifation to fixed count_real_submissions() query (ref: MDL-32207) in /mod/assignment/type/upload/assignment.class.php file
2012-07-02 14:57:02 +08:00
Dan Poltawski 722efe6e5b Merge branch 'MDL-27842-m21' of git://github.com/ankitagarwal/moodle into MOODLE_21_STABLE 2012-07-02 11:27:42 +08:00
Sam Hemelryk 40f00ad784 Merge branch 'MDL-33932_21' of git://github.com/grabs/moodle into MOODLE_21_STABLE 2012-07-02 14:31:32 +12:00
Sam Hemelryk 45181b1553 Merge branch 'MDL-33627_21' of git://github.com/grabs/moodle into MOODLE_21_STABLE 2012-07-02 14:05:42 +12:00
Eloy Lafuente (stronk7) ec7a8c38d9 weekly release 2.1.6+ 2012-07-02 00:51:36 +02:00
Eloy Lafuente (stronk7) 18df418a50 Merge branch 'install_21_STABLE' of git://github.com/amosbot/moodle into MOODLE_21_STABLE 2012-07-02 00:45:26 +02:00
Sam Hemelryk e2f3b1eea1 Merge branch 'MDL-34044-21' of git://github.com/srynot4sale/moodle into MOODLE_21_STABLE 2012-07-02 08:22:10 +12:00
Eloy Lafuente (stronk7) 555769489a Merge branch 'MDL-32249c-21' of github.com:srynot4sale/moodle into MOODLE_21_STABLE 2012-07-01 02:15:41 +02:00
Sun Zhigang c27a49324e MDL-31201 wiki: fix a hardcoded string 2012-06-30 22:01:57 +02:00
Petr Škoda 92979a841d MDL-34045 fix invalid idnumber field type in cohort form 2012-06-30 07:52:26 +02:00
Ankit Agarwal 05ddbc3143 MDL-27842 calendar: Remove the use of deprecated function calendar_print_event from delete.php 2012-06-29 15:03:13 +08:00
Adam Olley bded2e91a0 MDL-31802: Remove section summaries from navigation_cache 2012-06-28 11:08:57 +09:30
AMOS bot b532610c2f Automatically generated installer lang files 2012-06-28 00:31:34 +00:00
Tim Hunt 76ef65f45d MDL-33924 quiz: incorrect foreign key definition.
Thanks to Jean-Michel Vedrine for spotting this.≈
2012-06-27 08:03:04 +01:00
Aaron Barnes 7d82a37b49 MDL-34044 completion: Fix regression caused by MDL-26626 2012-06-27 12:03:21 +12:00
Tim Hunt 2f82ac596b MDL-32062 question engine: fix re-grading attempts from 2.0
The code to upgrade attempts from before Moodle 2.0 to 2.1 created
attempt data that was not exactly the same as a new attempt created in
2.1+. This did not matter very much - revew and the quiz reports all
worked OK - but it broke on re-grade.

These changes detect the problem data in the re-grade code, an apply a
work-around so that the re-grade gives the correct result.
2012-06-26 09:58:32 +01:00
Tim Hunt 81200053af MDL-33780 question import: strip UTF8 BOM
Previously, if there was a byte-order mark at the start of the file, the
import would just break, which was silly. Much better to just strip it
off.
2012-06-26 09:52:09 +01:00
Tim Hunt bd874d2a0e MDL-30883 question flags: aria attributes for accessibility
Also, update code to use html_writer.

Conflicts:

	theme/base/style/question.css
2012-06-26 09:51:24 +01:00
Aaron Barnes 676910acbd MDL-32249 completion: Make grade criteria more consistent
Also, round course grades and remove hardcoded string.

Note: This patch also removes the ability to update the course grade
from the completion interface
2012-06-26 14:03:23 +12:00
AMOS bot bb44b2c9d0 Automatically generated installer lang files 2012-06-26 00:31:35 +00:00
AMOS bot b53489190d Merge branch 'MOODLE_21_STABLE' into install_21_STABLE 2012-06-26 00:31:34 +00:00
Andreas Grabs 99b1eb1755 MDL-33932_21 - added array_unique() 2012-06-25 21:52:27 +02:00
Andreas Grabs 4e2841b795 MDL-33627 - feedback block now show all feedbacks 2012-06-25 21:52:24 +02:00
Dan Poltawski 3546266a6b Merge branch 'MDL-33984_21' of git://github.com/stronk7/moodle into MOODLE_21_STABLE 2012-06-25 21:58:20 +08:00
Eloy Lafuente (stronk7) d81704f632 MDL-33984 mysql: take rid of old unicode & mysql 4.1 message on error. 2012-06-25 15:50:13 +02:00
Dan Poltawski e13939dc77 Merge branch 'MDL-33984_21' of git://github.com/stronk7/moodle into MOODLE_21_STABLE 2012-06-25 18:47:20 +08:00
Eloy Lafuente (stronk7) 40bde9dfa6 MDL-33984 mysql - raise min version to 5.1.33.
Because of http://bugs.mysql.com/bug.php?id=42758 and other benefits.
2012-06-25 12:34:43 +02:00
AMOS bot 7b25272f43 Automatically generated installer lang files 2012-06-25 00:31:49 +00:00
Eloy Lafuente (stronk7) bce307ee77 Merge branch 'w25_MDL-33733_m21_unzipstorage' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2012-06-25 01:23:07 +02:00
Eloy Lafuente (stronk7) 66aece01f9 weekly release 2.1.6+ 2012-06-24 18:34:09 +02:00
Eloy Lafuente (stronk7) d332e9f012 Merge branch 'install_21_STABLE' of git://github.com/amosbot/moodle into MOODLE_21_STABLE 2012-06-24 18:29:11 +02:00
Jason Fowler 7114045d8d MDL-33957 - Installation - Fixing field lengths so they are long enough for data entry, and don't distort page rendering 2012-06-22 10:57:53 +08:00
AMOS bot da0655ebdf Automatically generated installer lang files 2012-06-22 00:31:30 +00:00
Sam Hemelryk a4c4e43a5f Merge branch 'MDL-27675_21' of git://github.com/grabs/moodle into MOODLE_21_STABLE 2012-06-21 11:36:42 +12:00
Sam Hemelryk d25f6b8104 Merge branch 'MDL-33808-21' of git://github.com/danpoltawski/moodle into MOODLE_21_STABLE 2012-06-21 10:06:24 +12:00
Aparup Banerjee 236534f192 Merge branch 'wip-MDL-33811-m21' of git://github.com/samhemelryk/moodle into MOODLE_21_STABLE 2012-06-20 17:18:46 +08:00
Frederic Massart 837e89e1d3 MDL-9073 Glossary: uncategorised entries are printable 2012-06-20 12:28:09 +08:00
Jason Fowler 4018a4b4a7 MDL-32290 - Repositories - Fixing missing slash from the URL path 2012-06-20 10:42:22 +08:00
AMOS bot 5e0a9e2bf9 Automatically generated installer lang files 2012-06-20 00:31:24 +00:00
Dan Poltawski 420b76d61e MDL-3971 - mod_forum: contain () in span 2012-06-20 11:40:56 +12:00
Jason Fowler 820e356a5e MDL-32990 - Repositories - Updating Box.net API calls to use HTTPS 2012-06-19 15:09:12 +08:00
Dan Poltawski 6ceafdb00a MDL-33808 - format title on the repository instance screen 2012-06-19 12:10:26 +08:00
Dan Poltawski 4a35940233 MDL-33808 - incorrect cleaning of repository names 2012-06-19 11:28:01 +08:00
AMOS bot 70243720e9 Automatically generated installer lang files 2012-06-19 00:31:23 +00:00
Sam Hemelryk b6c63cfcc6 MDL-33811 Fixed left over debugging code preventing proper setting of YUI gallery version 2012-06-19 11:26:57 +12:00
Tim Hunt 74919fa156 MDL-26892 questions: images lost during upgrade.
This affects questions shared in the system or course category areas of
the question bank.

Thanks to Chris Edwards for working out what was going wrong.
2012-06-18 21:41:26 +08:00
Dan Poltawski 1cdcf60ed3 Merge branch 'wip-MDL-33603-MOODLE_21_STABLE' of git://github.com/abgreeve/moodle into MOODLE_21_STABLE 2012-06-18 15:07:52 +08:00
Dan Poltawski 47e26d45f7 Merge branch 'wip-mdl-33607-m21' of git://github.com/rajeshtaneja/moodle into MOODLE_21_STABLE 2012-06-18 14:34:43 +08:00
Adrian Greeve 7040ab6e30 MDL-33603 - data - added another sql query to allow links to records to work. 2012-06-18 10:27:14 +08:00
Petr Skoda 5f828fa036 MDL-33733 fix broken zip_packer->extract_to_storage() when extracting from stored_file 2012-06-17 23:01:31 +02:00
AMOS bot ed2410c954 Automatically generated installer lang files 2012-06-16 00:31:37 +00:00
Eloy Lafuente (stronk7) 4557b47df1 weekly release 2.1.6+ 2012-06-15 20:27:26 +02:00
Rajesh Taneja 840818cce4 MDl-33607 wiki-2: check subwiki before fetching it from db 2012-06-15 16:59:33 +08:00
Jerome Mouneyrac 463e194c85 MDL-33770 Web service: create_groups should not require enrolmentkey
Conflicts:

	group/externallib.php
2012-06-15 15:20:33 +08:00
Dan Poltawski 19b1f96f1f Merge branch 'MDL-33035-m21' of git://github.com/sunner/moodle into MOODLE_21_STABLE 2012-06-14 12:29:27 +08:00
Frederic Massart 795fd70584 MDL-30008 Filepicker: correctly handles allowed file types 2012-06-14 10:03:28 +08:00
Dan Poltawski 05fc59ef64 Merge branch 'MDL-33581-MOODLE_21_STABLE' of git://github.com/mouneyrac/moodle into MOODLE_21_STABLE 2012-06-13 17:45:44 +08:00
Eloy Lafuente (stronk7) 82aab8024b MDL-33682 backup: keep old behavior, aka, use section number on empty section name. 2012-06-13 00:57:36 +02:00
Eloy Lafuente (stronk7) 50c5d7ae6d Merge branch 'MDL-33682_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2012-06-13 00:57:26 +02:00
Eloy Lafuente (stronk7) e9637ea9ce Merge branch 'MDL-33681_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2012-06-13 00:07:23 +02:00
Tim Hunt 4ee86612fe MDL-33682 backup: cope with sections called '0'
It was not previously possible to have a section called 0 because of
bugs in the standard course formats, but we hit this with the OU course
format. You got an exception because backup settings tested to see if
their lable was empty, which means a section name of '0' was fatal.
Should work now.
2012-06-12 18:06:02 +01:00
Tim Hunt d375d718ac MDL-33681 course: cannot have a section called '0'.
No reason to prevent this. It is just a matter of doing a proper test,
rather than the sloppy PHP !empty().
2012-06-12 18:05:53 +01:00
Eloy Lafuente (stronk7) 417f9d311b Merge branch 'w24_MDL-33670_m21_ofadmin' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2012-06-12 10:07:15 +02:00
Petr Skoda ea1cb30ce7 MDL-33670 fix recent fatal typo in user_get_user_details()
Credit goes to Sunner Sun.
2012-06-12 09:59:11 +02:00
Aparup Banerjee 9a36598bac Merge branch 'm21_MDL-33515' of git://github.com/danmarsden/moodle into MOODLE_21_STABLE 2012-06-12 11:28:11 +08:00
Eloy Lafuente (stronk7) 4776262f05 weekly release 2.1.6+ 2012-06-12 02:59:09 +02:00
Eloy Lafuente (stronk7) 5fbd62c254 Merge branch 'install_21_STABLE' of git://github.com/amosbot/moodle into MOODLE_21_STABLE 2012-06-12 02:55:35 +02:00
Aparup Banerjee b10a487334 Merge branch 'MDL-33548_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2012-06-11 13:56:03 +08:00
Eloy Lafuente (stronk7) 294e7ff363 MDL-33455 restore: process grade_grades only if user matches.
Note this has been applied both to individual activities grade_grades
and to general ones.
2012-06-11 11:15:05 +08:00
Dan Poltawski dbb729e9d3 MDL-33514 - rss: also exclude suspended users feeds
Thanks Petr!
2012-06-11 10:27:34 +08:00
Dan Marsden 3720463fc4 MDL-33515 SCORM - attempts grading setting is confusing - last attempt is really last completed attempt. 2012-06-08 20:36:20 +12:00
Jerome Mouneyrac d9ecbdc715 MDL-33581 missing parameter defaults for some external functions 2012-06-08 12:08:45 +08:00
Eloy Lafuente (stronk7) 34025ea1c2 Merge branch 'w23_MDL-33583_m21_keepall' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2012-06-08 01:57:04 +02:00
Petr Skoda 8fbbd40394 MDL-30725 save automated external only backups directly to ext storage, do not pollute file pool
This solution is based on code by Tony Levi, thanks!
2012-06-08 01:47:23 +02:00
Sam Hemelryk 54e24c11a5 Merge branch 'MDL-32325-21' of git://github.com/FMCorz/moodle into MOODLE_21_STABLE 2012-06-08 10:20:31 +12:00
Eloy Lafuente (stronk7) 9987a9e079 Merge branch 'MDL-32985_integration_21' of git://github.com/merrill-oakland/moodle into MOODLE_21_STABLE 2012-06-08 00:05:24 +02:00
Dan Poltawski 965481f7fb Merge branch 'MDL-33532_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2012-06-07 22:23:56 +08:00
Tim Hunt 40035f042d MDL-33532 quiz editing: let uses enter locale floats.
So, for example, Croatian users can set the maximum grade to 65,5.

Conflicts:

	mod/quiz/edit.php
2012-06-07 12:59:46 +01:00
Petr Skoda ff5aed23a4 MDL-33583 really keep all automated backup files when told to do so 2012-06-07 11:14:05 +02:00
Andreas Grabs a6f4aa1a94 MDL-27675 - Feedback module abuses data_submitted 2012-06-06 23:16:03 +02:00
Tim Hunt 239ca19682 MDL-33548 quiz manual grading: check the grade is in range.
To do this nicely, I refactored some code out of the quiz manual grading
report.
2012-06-06 20:25:10 +01:00
Eric Merrill bfe1d30444 MDL-32985 cron: Fixing related problem with setting of lastnotifyfailure
Because of a flaw in the logic, lastnotifyfailure was not set unless
there was a failure. This means that after 1 hour of no failures, the
function would execute every cron cycle, which has a pretty high cost
on large sites.
2012-06-06 12:16:40 -04:00
Dan Poltawski 331de0b546 MDL-33514 - rss: only retrieve RSS feeds for valid users 2012-06-06 23:38:00 +08:00
Frederic Massart 7a150b25cb MDL-32325 Glossary: Entrylist print version is XHTML compliant 2012-06-06 13:16:38 +08:00
Sam Hemelryk c2cf907f3f Merge branch 'wip-mdl-33090-m21' of git://github.com/rajeshtaneja/moodle into MOODLE_21_STABLE 2012-06-06 15:24:03 +12:00
Tim Hunt 5cf725b9b4 MDL-33119 quiz complete report: fix placeholders in attempt string. 2012-06-06 10:32:26 +08:00
AMOS bot eafc011e08 Automatically generated installer lang files 2012-06-06 00:31:34 +00:00
Sam Hemelryk bed0c7a63e Merge branch 'MDL-30837-21' of https://github.com/FMCorz/moodle into MOODLE_21_STABLE 2012-06-06 10:59:34 +12:00
Sam Hemelryk d099f4fd0e MDL-31520 user-ws: Optimised if statement for email access by moving admin check to the start 2012-06-06 10:38:20 +12:00
Sam Hemelryk 4c3a1c6f8a Merge branch 'MDL-31520-MOODLE_21_STABLE' of git://github.com/fabiomsouto/moodle into MOODLE_21_STABLE 2012-06-06 10:37:48 +12:00
Sam Hemelryk 8ad117cca8 Merge branch 'MDL-31823_21' of git://github.com/dmonllao/moodle into MOODLE_21_STABLE 2012-06-06 10:13:32 +12:00
Sam Hemelryk 7d4c5ac5ab Merge branch 'MDL-33441-21' of git://github.com/danpoltawski/moodle into MOODLE_21_STABLE 2012-06-06 10:09:45 +12:00
Sam Hemelryk ded3134c37 Merge branch 'MDL-33487-21' of git://github.com/danpoltawski/moodle into MOODLE_21_STABLE 2012-06-06 10:05:57 +12:00
Sam Hemelryk 4471c79c07 MDL-26277: Fixed whitespace post integration 2012-06-06 09:14:02 +12:00
Sam Hemelryk bc1f0e0b40 Merge branch 'MDL-26277-21' of https://github.com/mackensen/moodle into MOODLE_21_STABLE 2012-06-06 09:07:07 +12:00
Dan Poltawski 446bf5b9f4 MDL-33441 course/lib.php prevent fatal error when no visible categories 2012-06-05 16:41:43 +08:00
Aparup Banerjee 97f8f66cc3 Merge branch 'wip-mdl-33455-m21' of git://github.com/rajeshtaneja/moodle into MOODLE_21_STABLE 2012-06-05 15:16:14 +08:00
Koen Roggemans bea1f152ae MDL-29103 web service strings improvement
Conflicts:

	lang/en/admin.php
2012-06-05 12:47:02 +08:00
Ankit Agarwal e4624f6e6c MDL-33401 blocks: Allow managers to have block:edit capability by default 2012-06-05 12:35:21 +08:00
Tim Barker 6945d524c8 MDL-33476 repositories: Added instructions to assist with setting up Dropbox keys 2012-06-05 12:16:25 +08:00
Dan Poltawski 296d5c07d8 Merge branch 'MDL-30880_feedback_property_21' of git://github.com/andyjdavis/moodle into MOODLE_21_STABLE 2012-06-05 11:58:49 +08:00
Rajesh Taneja 756765a2ed MDL-33455 gradebook: Grade will not be inserted for unknown user 2012-06-05 11:22:38 +08:00
Dan Poltawski 044c0ce868 MDL-31460 mod_forum: fix trailing whitespace 2012-06-05 09:35:51 +08:00
Dan Poltawski f83ecb3721 Merge branch 'MDL-31460_unsubscribe_21' of git://github.com/andyjdavis/moodle into MOODLE_21_STABLE 2012-06-05 09:35:47 +08:00
Rex Lorenzo fbf39e40e6 MDL-33090 admin: Missing strings in XMLDB editor - added in missing strings 2012-06-05 09:29:00 +08:00
Frederic Massart 4ebf4efde8 MDL-30837 Accessibility: removed navigation icons default alt text 2012-06-05 09:20:11 +08:00
Eloy Lafuente (stronk7) 1f0856d6bf Merge branch 'MDL-32649_ratings_sort_21' of git://github.com/andyjdavis/moodle into MOODLE_21_STABLE 2012-06-05 02:23:55 +02:00
Eloy Lafuente (stronk7) ceb3ce58a9 MDL-32985 cron: prevent notices on "new" sites. 2012-06-05 02:17:16 +02:00
Eloy Lafuente (stronk7) 335a24ea72 Merge branch 'MDL-32985_m21' of git://github.com/merrill-oakland/moodle into MOODLE_21_STABLE 2012-06-05 02:03:06 +02:00
David Monllaó 92bf1836d0 MDL-31823 - Remote hosts users created via mnet enrolments marked as confirmed 2012-06-04 10:38:59 +02:00
Dan Poltawski ca409b9b44 Merge branch 'MDL-29173_calc_21' of git://github.com/andyjdavis/moodle into MOODLE_21_STABLE 2012-06-04 16:22:20 +08:00
AMOS bot 81ded23742 Automatically generated installer lang files 2012-06-02 00:31:41 +00:00
Dan Poltawski 365f666cbf MDL-33487 - mod_forum: incorrect param ordering
Thanks to Garret Gengler for spotting it.
2012-06-01 23:36:01 +08:00
Eloy Lafuente (stronk7) a6dfc10bb0 weekly release 2.1.6+ 2012-06-01 09:48:10 +02:00
Eloy Lafuente (stronk7) 4a7f742d2e Merge branch 'install_21_STABLE' of git://github.com/amosbot/moodle into MOODLE_21_STABLE 2012-06-01 09:43:36 +02:00
Andrew Davis 043af1f6b2 MDL-30880 grade: added a check for the feedback property existing before it is used 2012-06-01 10:44:35 +07:00
Dan Poltawski 4a126d26cf Merge branch 'MDL-33434_21' of git://github.com/stronk7/moodle into MOODLE_21_STABLE 2012-05-31 16:59:44 +08:00
Aparup Banerjee 323d76708b Merge branch 'MDL-33040-MOODLE_21_STABLE-1' of git://git.luns.net.uk/moodle into MOODLE_21_STABLE 2012-05-31 15:21:03 +08:00
Aparup Banerjee 3a2d363542 Merge branch 'MDL-33140_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2012-05-31 14:15:59 +08:00
Frederic Massart 854682fb17 MDL-33398 Cron: fix wrong variable type in completion criterias 2012-05-31 12:50:57 +08:00
Eloy Lafuente (stronk7) 87ba4ff25a MDL-33434 mssql: Improve handling of returned ids on insert.
This commit moves from the batch SCOPE_IDENTITY() way to return
the inserted ids to the OUTPUT alternative (supported and
recommended since 2005). Also the handling of possible return
values is improved, with all the alternatives leading to expected results.
2012-05-31 01:49:48 +02:00
Eloy Lafuente (stronk7) a906556554 MDL-33434 dml: define expected results when unique constraint is violated on insert. 2012-05-31 01:49:44 +02:00
Tim Hunt c0ed22f6c7 MDL-33140 quiz browser security: block copy/paste more 2012-05-30 14:50:15 -06:00
Sam Hemelryk 24b464d9f7 Revert "Merge branch 'MDL-27675_21_wip' of git://github.com/grabs/moodle into MOODLE_21_STABLE"
This reverts commit 9c96488ed9, reversing
changes made to b22884274f.
2012-05-30 16:36:43 +12:00
Dan Poltawski 01ab2bb505 Merge branch 'MDL-33398b-21' of git://github.com/srynot4sale/moodle into MOODLE_21_STABLE 2012-05-30 11:36:04 +08:00
Aaron Barnes 28e0b61cd0 MDL-33398 completion: Fix coding error (should be arrays not objects) 2012-05-30 13:35:49 +12:00
AMOS bot db01641ec0 Automatically generated installer lang files 2012-05-30 00:31:27 +00:00
Andrew Davis 196b3fd27f MDL-29173 grade: altered the definiton of round() and added some more unit tests 2012-05-29 16:35:18 +07:00
Dan Poltawski e3d8f34ad6 Merge branch 'MDL-30905-21' of git://github.com/FMCorz/moodle into MOODLE_21_STABLE 2012-05-29 16:20:44 +08:00
Dan Poltawski e2eaa0bae4 Merge branch 'wip-mdl-33102-m21' of git://github.com/rajeshtaneja/moodle into MOODLE_21_STABLE 2012-05-29 16:11:14 +08:00
Dan Poltawski 5013a713eb Merge branch 'MDL-30888-21' of git://github.com/FMCorz/moodle into MOODLE_21_STABLE 2012-05-29 15:12:49 +08:00
Dan Poltawski 573a933e42 Merge branch 'MDL-33212-m21' of git://github.com/sammarshallou/moodle into MOODLE_21_STABLE 2012-05-29 15:11:07 +08:00
Andrew Davis 6be00a7a49 MDL-31460 mod_forum: added some controls to mod/forum/unsubscribeall.php to prevent the removal of subscriptions the user shouldnt be able to delete 2012-05-29 08:28:39 +07:00
sam marshall 054d245a2c MDL-33212 Course page: Eye icon should override other conditions 2012-05-28 16:27:37 +01:00
Dan Poltawski ae3f09e6cd Revert "MDL-33212 Course page: Eye icon should override other conditions"
This reverts commit 805366d987.
2012-05-28 16:58:39 +08:00
Dan Poltawski 1cbf87e8db Merge branch 'MDL-33352-MOODLE_21_STABLE' of git://github.com/mouneyrac/moodle into MOODLE_21_STABLE 2012-05-28 16:05:11 +08:00
Dan Poltawski 382b95d292 Merge branch 'MDL-33212-m21' of git://github.com/sammarshallou/moodle into MOODLE_21_STABLE 2012-05-28 16:03:19 +08:00
Dan Poltawski 29010d3e53 Merge branch 'MDL-31393_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2012-05-28 15:24:40 +08:00
Dan Poltawski b269d8f988 Merge branch 'wip-MDL-32199-MOODLE_21_STABLE' of git://github.com/abgreeve/moodle into MOODLE_21_STABLE 2012-05-28 15:19:03 +08:00
Charles Fulton c4f5ec20db MDL-33194 forum: correct number of parameters for get_record() 2012-05-28 14:59:28 +08:00
Jerome Mouneyrac ec48562601 MDL-33352 fix regression, textlib functions are not static in 2.1 2012-05-28 14:39:37 +08:00
Dan Poltawski 093e1ce8df Merge branch 'm21_MDL-27368' of git://github.com/danmarsden/moodle into MOODLE_21_STABLE 2012-05-28 14:33:05 +08:00
Adrian Greeve ef518ff137 MDL-32199 - forum - Ensure that forum RSS feeds don't leak posts and discussions.
Alteration to the code to hide the body of the post / discussion

rebase conflict resolution
2012-05-28 13:07:02 +08:00
Dan Poltawski ff166d1157 Revert "MDL-29173 grade: altered the definiton of round() in /lib/evalmath/evalmath.class.php"
Breaking unit tests.

This reverts commit 4be0947bbe.
2012-05-28 12:38:42 +08:00
Dan Poltawski c02287f333 Merge branch 'MDL-29173_calc_21' of git://github.com/andyjdavis/moodle into MOODLE_21_STABLE 2012-05-28 12:16:41 +08:00
Sam Hemelryk 27ee2b6737 Merge branch 'MDL-33364_21' of git://github.com/stronk7/moodle into MOODLE_21_STABLE 2012-05-28 13:51:01 +12:00
Sam Hemelryk f991601b63 MDL-27675 mod_feedback: Tidy up of phpdocs and scope within feedback mod
Conflicts:

	mod/feedback/item/feedback_item_class.php
	mod/feedback/item/label/lib.php
	mod/feedback/item/multichoice/lib.php
2012-05-28 13:42:27 +12:00
Eloy Lafuente (stronk7) f3593fc2cb MDL-33364 automated backup: return and log each course result correctly 2012-05-28 02:50:35 +02:00
Sam Hemelryk 9c96488ed9 Merge branch 'MDL-27675_21_wip' of git://github.com/grabs/moodle into MOODLE_21_STABLE 2012-05-28 11:44:07 +12:00
Sam Hemelryk b22884274f Merge branch 'MDL-33191_M21' of git://github.com/lazydaisy/moodle into MOODLE_21_STABLE 2012-05-28 11:21:45 +12:00
Sam Hemelryk ab833c6ee4 Merge branch 'MDL-33325-m21' of git://github.com/ankitagarwal/moodle into MOODLE_21_STABLE 2012-05-28 10:52:03 +12:00
Andreas Grabs d6fe3f01e0 MDL-27675 - Feedback module abuses data_submitted 2012-05-28 00:29:58 +02:00
Andreas Grabs 82c62bd30a MDL-27675 - Feedback module abuses data_submitted 2012-05-28 00:29:58 +02:00
Dan Marsden fb0814ac14 MDL-27368 Clean up invalid course completion records
keep oldest timestamps from all records
2012-05-28 09:06:41 +12:00
Eloy Lafuente (stronk7) ba459c4dde weekly release 2.1.6+ 2012-05-25 12:49:51 +02:00
Eloy Lafuente (stronk7) c1ca7fdccc Merge branch 'install_21_STABLE' of git://github.com/amosbot/moodle into MOODLE_21_STABLE 2012-05-25 12:45:01 +02:00
Frederic Massart 0c8f156ece MDL-30905 Accessibility: recent activity list is XHTML compliant 2012-05-25 15:10:07 +08:00
Dan Poltawski 4e98691587 Merge branch 'MDL-29924-21' of git://github.com/FMCorz/moodle into MOODLE_21_STABLE 2012-05-25 11:14:48 +08:00
Dan Poltawski ed2417a4cd MDL-28557 - calendar: fix trivial whitespace issue 2012-05-25 11:09:26 +08:00
Dan Poltawski 497288882a Merge branch 'MDL-28557-21' of git://github.com/bostelm/moodle into MOODLE_21_STABLE 2012-05-25 11:09:21 +08:00
Jerome Mouneyrac b108e75ce3 MDL-33028 display debuginfo when server die at developer mode 2012-05-25 10:23:12 +08:00
Ankit Agarwal b284426dd1 MDL-33325 folder: 'set as main file' option removed, from filepicker when editing a file in a folder resource 2012-05-25 09:39:10 +08:00
AMOS bot 884972f915 Automatically generated installer lang files 2012-05-25 00:31:28 +00:00
Andrew Robert Nicols 9dde62c4e8 MDL-33040 Validate dates correctly on log page 2012-05-24 09:42:28 +01:00
Andrew Robert Nicols 1da1b02592 MDL-33186 Ensure that the comment textarea exists before toggling it 2012-05-24 15:54:09 +08:00
Aparup Banerjee bd0802e56b MDL-33318 lib : code style fix 2012-05-24 15:45:10 +08:00
Aparup Banerjee 65a312fa32 Merge branch 'm21_MDL-33318' of git://github.com/danmarsden/moodle into MOODLE_21_STABLE 2012-05-24 15:45:03 +08:00
Dan Marsden ffb830f58e MDL-33318 use $CFG->admin in path correctly - thanks to Clarence Prudhoe for report/fix 2012-05-24 14:10:11 +12:00
Frederic Massart 9eb160461d MDL-30903 Accessibility: user profile page uses table headers 2012-05-24 10:09:41 +08:00
Frederic Massart ee97268a42 MDL-30888 Accessibility: small calendars summary does not display 'Data table' 2012-05-24 09:23:21 +08:00
AMOS bot f3edfb06a7 Automatically generated installer lang files 2012-05-24 00:31:42 +00:00
Sam Hemelryk ebbf509960 Merge branch 'MDL-32203c-21' of git://github.com/srynot4sale/moodle into MOODLE_21_STABLE 2012-05-24 11:23:59 +12:00
Sam Hemelryk e09266d176 Merge branch 'MDL-26562-21' of git://github.com/vadimonus/moodle into MOODLE_21_STABLE 2012-05-24 10:56:06 +12:00
sam marshall 805366d987 MDL-33212 Course page: Eye icon should override other conditions
Conflicts:

	lib/conditionlib.php
2012-05-23 13:55:10 +01:00
Dan Poltawski 6645da5bce Merge branch 'wip-mdl-32155-m21' of git://github.com/rajeshtaneja/moodle into MOODLE_21_STABLE 2012-05-23 13:28:14 +08:00
Rajesh Taneja 38d13c23f1 MDL-32155 blocks: User can't access file, if block is hidden or doesn't have block:view capability 2012-05-23 13:14:02 +08:00
Andrew Davis 940e243547 MDL-32649 rating: fixed the sorting in /rating/index.php 2012-05-23 08:37:09 +07:00
Mary Evans e6ef6bb1b6 MDL-33191 theme_magazine: changes to magazine/config.php fixes $THEME->layouts for Base & Standard 2012-05-22 17:18:27 +01:00
Sun Zhigang 84bfd60a03 MDL-33035 workshop: typo in strings 2012-05-22 19:27:19 +08:00
Dan Poltawski 6e4bb45785 Merge branch 'w21_MDL-32564_m21_timezonecontext' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2012-05-22 13:34:29 +08:00
Petr Skoda f7d185baf3 MDL-32564 fix admin/timezone.php page setup 2012-05-22 07:32:13 +02:00
Sam Hemelryk d7bce7db81 Merge branch 'MDL-32204-mnet-auth_21' of git://github.com/mudrd8mz/moodle into MOODLE_21_STABLE 2012-05-22 14:49:07 +12:00
Kordan 18d4b57b69 MDL-33055 theme_formal_white: changed "general" to "standard" in $theme->layouts array index 2012-05-22 14:31:33 +12:00
Rajesh Taneja 0e1d75cff7 MDL-33102 blogs: userid will be added during blog visibility upgrade 2012-05-22 10:06:56 +08:00
Andrew Davis 98fcf93146 MDL-29173 grade: altered the definiton of round() in /lib/evalmath/evalmath.class.php 2012-05-22 08:39:39 +07:00
Fábio Souto 660b8d0b66 Allow admin to consult user email address 2012-05-21 10:38:00 +01:00
Vadim Dvorovenko a64c75d059 MDL-26562
Signed-off-by: Vadim Dvorovenko <vadimon@mail.ru>
2012-05-20 19:46:17 +07:00
Eloy Lafuente (stronk7) 2ddb941b0a weekly release 2.1.6+ 2012-05-19 12:22:40 +02:00
Eloy Lafuente (stronk7) b571be75c5 Merge branch 'install_21_STABLE' of git://github.com/amosbot/moodle into MOODLE_21_STABLE 2012-05-19 12:17:43 +02:00
AMOS bot 8b1dd6905e Automatically generated installer lang files 2012-05-19 00:31:50 +00:00
Adrian Greeve d02908d323 MDL-32126 replaced _order with sortorder to make sorting work in oracle 2012-05-18 11:26:03 +02:00
sam marshall f654ae9d8e MDL-32535 Completion lang string incorrect use, text 2012-05-18 10:28:57 +08:00
AMOS bot ccb462b076 Automatically generated installer lang files 2012-05-18 00:31:55 +00:00
Rajesh Taneja 5f40997e4b MDL-32866 filemanager: Fixed Page url typo 2012-05-17 16:48:45 +08:00
Frederic Massart 96a4e2efa5 MDL-29924 Glossary: Entry attachments displayed in Moodle dialogue 2012-05-17 15:17:18 +08:00
Petr Skoda e98a486834 MDL-32967 add diagnostic strings for missing Microsoft drivers for SQL Server 2012-05-17 14:31:10 +08:00
Dan Poltawski 2aa58eb6ce Merge branch 'MDL-31814_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2012-05-17 14:11:32 +08:00
Juho Viitasalo 2e61a814c3 MDL-31850 wiki: extra whitespace removed from form 2012-05-17 14:49:25 +12:00
Sam Hemelryk e76f4039b9 Merge branch 'MDL-29399_M21' of git://github.com/lazydaisy/moodle into MOODLE_21_STABLE 2012-05-17 14:42:10 +12:00
Sam Hemelryk 2dfeb89f48 Merge branch 'm21_MDL-32794' of git://github.com/danmarsden/moodle into MOODLE_21_STABLE 2012-05-17 12:27:17 +12:00
Aparup Banerjee 3cf17d040e Merge branch 'MDL-32633_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2012-05-16 16:06:23 +08:00
Aparup Banerjee d9e1178030 Merge branch 'wip-MDL-32991-MOODLE_21_STABLE' of git://github.com/abgreeve/moodle into MOODLE_21_STABLE 2012-05-16 14:11:20 +08:00
AMOS bot c6f2c53f8d Automatically generated installer lang files 2012-05-16 00:31:40 +00:00
Henning Bostelmann a2ec78a369 MDL-28557 Calendar filters: show all group events in course to teacher 2012-05-15 22:26:19 +01:00
Sam Hemelryk 25f8be6e70 Merge branch 'MDL-31458-21' of git://github.com/danpoltawski/moodle into MOODLE_21_STABLE 2012-05-16 09:11:59 +12:00
Wiktor Wandachowicz 47f1ee8e6f MDL-32204 MNet: set auth method to mnet for users enrolled remotely 2012-05-15 15:37:54 +02:00
Aparup Banerjee 6030656b88 Merge branch 'MDL-32861-21' of https://github.com/mackensen/moodle into MOODLE_21_STABLE 2012-05-15 16:18:53 +08:00
Aparup Banerjee 336c4263e9 Merge branch 'MDL-25695-21' of https://github.com/mackensen/moodle into MOODLE_21_STABLE 2012-05-15 11:09:13 +08:00
Adrian Greeve 1c8dbf72b9 MDL-32991 - data - Fix to the context call in the preset page 2012-05-15 09:37:20 +08:00
Dan Marsden 8254d87d66 MDL-32794 SCORM prevent items in tree that have no navigation from triggering a navigation change. 2012-05-15 09:37:24 +12:00
Eric Merrill 33641c3873 MDL-32985 cron: don't execute notify_login_failures unnecessarily 2012-05-14 11:42:20 -04:00
Dan Poltawski 0375701522 MDL-32714 workshop - fix broken unit tests
Using a quick and dirty recordset mock. Thanks to Eloy for the
brainpower.
2012-05-14 22:19:03 +08:00
Dan Poltawski 53ce4f035e Merge branch 'MDL-32863_21' of git://github.com/jonof/moodle into MOODLE_21_STABLE 2012-05-14 20:49:19 +08:00
Dan Poltawski 6e49419bda Merge branch 'MDL-31719_M21' of git://github.com/lazydaisy/moodle into MOODLE_21_STABLE 2012-05-14 15:53:30 +08:00
Dan Poltawski 5701bc74a0 Merge branch 'MDL-24401_m21' of git://github.com/rwijaya/moodle into MOODLE_21_STABLE 2012-05-14 14:12:46 +08:00
Dan Poltawski 821e713503 Merge branch 'w20_MDL-32915_m21_chatdiv' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2012-05-14 14:06:59 +08:00
Dan Poltawski 51c048b088 Merge branch 'wip-MDL-32872-m21' of git://github.com/samhemelryk/moodle into MOODLE_21_STABLE 2012-05-14 14:01:08 +08:00
Dan Poltawski 5f70593f94 Merge branch 'wip-MDL-32611-m21' of git://github.com/samhemelryk/moodle into MOODLE_21_STABLE 2012-05-14 13:13:11 +08:00
Jonathon Fowler 790f68fd92 MDL-32863 question: fix for Oracle ambiguous column error 2012-05-14 12:53:29 +10:00
Dan Poltawski ac6f7b2c96 Merge branch 'MDL-32714-rubric_21' of git://github.com/mudrd8mz/moodle into MOODLE_21_STABLE 2012-05-14 10:42:00 +08:00
Andrew Robert Nicols 2fe83e04d9 MDL-32340 Improve performance of calendar selection 2012-05-14 14:09:20 +12:00
Adrian Greeve d4d88ffd73 MDL-32126 - data - backport of advanced search re-write 2012-05-14 08:33:18 +08:00
Sam Hemelryk 2fd2edb032 MDL-32611 editcategory: Fixed up navigation error. 2012-05-14 09:17:12 +12:00
Sam Hemelryk 7f51f30e2e MDL-32872 tool_roles: Fixed up navigation on user roles page 2012-05-14 08:53:49 +12:00
Mary Evans 0cd4a6158d MDL-29399 theme_boxxie: fixes page-mod-assignment-view when editing 2012-05-13 17:03:56 +01:00
Mary Evans 2198d7f43c MDL-31719 lang/en/admin.php: changes text in $string['configallowthemechangeonurl'] to make less ambiguous 2012-05-13 15:24:45 +01:00
Petr Skoda 6244096bee MDL-32915 fix bogus open div in basic chat ui 2012-05-13 10:26:24 +02:00
David Mudrak 6e7e184571 MDL-32714 workshop: fixed SQL to load assessment form fields
Obvious problems emerged once there were some records in the
workshopform_rubric table with no workshopform_rubric_levels. As l.id
(empty in that case) was used as the key of the returned array, they all
were collapsed into a single one.
2012-05-12 10:26:36 +02:00
Eloy Lafuente (stronk7) efac2d2ad4 Moodle release 2.1.6 2012-05-12 03:24:26 +02:00
Petr Skoda e06065b4f8 MDL-31558 add missing mimetype to send_temp_file()
backported from master
2012-05-11 22:05:07 +02:00
Tim Hunt 45cadecc2a MDL-32633 quiz editing: recreate grade item when max changed from 0 2012-05-11 20:10:40 +01:00
Eloy Lafuente (stronk7) 6866d7f6a5 weekly release 2.1.5+ 2012-05-11 12:16:48 +02:00
Eloy Lafuente (stronk7) 3478ce9bdc Merge branch 'install_21_STABLE' of git://github.com/amosbot/moodle into MOODLE_21_STABLE 2012-05-11 12:10:56 +02:00
Dan Poltawski f8bed0f642 MDL-31458 forum: email subjects containing ampersand are sent as &amp; 2012-05-11 15:30:56 +08:00
Sam Hemelryk d3da2883ce MDL-31763 mod_data: Fixed array iteration reference issue 2012-05-10 17:31:35 +12:00
Sam Hemelryk 9c0f9c588e Merge branch 'wip-MDL-31763-MOODLE_21_STABLE' of git://github.com/abgreeve/moodle into MOODLE_21_STABLE 2012-05-10 15:14:19 +12:00
Adrian Greeve 25aa12e229 MDL-31763 - data - users can only override their own presets unless they have manage presets permission. 2012-05-10 10:27:03 +08:00
AMOS bot 2e63ba58fc Automatically generated installer lang files 2012-05-10 00:31:49 +00:00
Eloy Lafuente (stronk7) 7b84d2886a Merge branch 'install_21_STABLE' of git://github.com/amosbot/moodle into MOODLE_21_STABLE 2012-05-09 19:32:26 +02:00
Tim Hunt 6fe7f2f198 MDL-31393 qtype_essay upgrade: save old question_answers.feebdack 2012-05-09 15:13:29 +01:00
Charles Fulton 36a8da6e85 MDL-32861 filemanager: respect course upload limit 2012-05-09 05:07:49 -07:00
Dan Poltawski 230235e3e0 Merge branch 'wip-mdl-31498-m21' of git://github.com/rajeshtaneja/moodle into MOODLE_21_STABLE 2012-05-09 17:46:30 +08:00
Rossiani Wijaya 57284445ea MDL-24401: fixed string for adding content page 2012-05-09 14:34:07 +08:00
Andrew Davis dfe26d0ba3 MDL-31488 admin: made admin_externalpage_setup() try to guess the reason why the requested section couldnt be found 2012-05-09 11:59:32 +08:00
Petr Skoda 81ef1b474f MDL-32735 add missing message provider info for unmaintained enrol_authorize
Conflicts:

	enrol/authorize/version.php
2012-05-09 10:32:03 +08:00
Petr Skoda e52bc3f593 MDL-32775 fix invalid url in mediaplugin CSS 2012-05-09 10:23:51 +08:00
Sam Hemelryk 4997ac9e2f Merge branch 'MDL-18095-MOODLE_21_STABLE-1' of git://git.luns.net.uk/moodle into MOODLE_21_STABLE 2012-05-09 11:31:24 +12:00
Ruslan Kabalin 613b57021d MDL-18095 gradebook: Make sure grade override flag is cleared whenever required
The check for feedback and grade equality between recorded values and the current
form ones before removing override flag is not really required.
2012-05-08 12:05:51 +01:00
Frederic Massart c8caabdb1c MDL-32718 Fixed typo in column name 2012-05-08 15:55:46 +08:00
Sam Hemelryk f44480cccc Merge branch 'MDL-32670_21' of git://github.com/rlorenzo/moodle into MOODLE_21_STABLE 2012-05-08 18:06:43 +12:00
Sam Hemelryk 8296031c1f Merge branch 'MDL-31671-m21' of git://github.com/ankitagarwal/moodle into MOODLE_21_STABLE 2012-05-08 17:41:44 +12:00
Dan Poltawski ad520779df Merge branch 'w19_MDL-31691_m21_cohortidnumber' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2012-05-08 12:40:45 +08:00
Dan Poltawski 3a6dc00d2a Merge branch 'MDL-32718-sql-typo_21' of git://github.com/mudrd8mz/moodle into MOODLE_21_STABLE 2012-05-08 12:36:11 +08:00
AMOS bot 3cd76fea5d Automatically generated installer lang files 2012-05-08 00:31:49 +00:00
David Mudrak cffd4c5b3f MDL-32718 fixing an SQL typo in workshop_get_recent_mod_activity() 2012-05-07 10:05:44 +02:00
Dan Poltawski 62e7fe190e Merge branch 'MDL-18335_m21' of git://github.com/rwijaya/moodle into MOODLE_21_STABLE 2012-05-07 15:32:38 +08:00
Ankit Agarwal 78f8349245 MDL-31671 calendar: update_event hook should be triggered when updating event 2012-05-07 15:15:28 +08:00
Ankit Agarwal 9f786f7408 MDL-31671 calendar: Fixing error when trying to delete parent of a repeated event series 2012-05-07 15:08:04 +08:00
Dan Poltawski 436ce722e8 Revert "MDL-32379: Fix memory leak in session_set_user"
This reverts commit 22dc32042a.
2012-05-07 14:41:12 +08:00
Dan Poltawski 427ef2ef69 Merge branch 'MDL-32684_M21' of git://github.com/lazydaisy/moodle into MOODLE_21_STABLE 2012-05-07 13:04:06 +08:00
Dan Poltawski 68a2b1febf Merge branch 'MDL-32430_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2012-05-07 12:48:31 +08:00
Davo Smith 9da363fbc7 MDL-32698 Question - Fixed typos in load_question_attempt 2012-05-07 12:06:31 +08:00
Charles Fulton e8a2fa86aa MDL-26277 grade import: validate file pointer before reading 2012-05-06 20:33:26 -07:00
Dan Poltawski 787a484a60 Merge branch 'mdl32379_21' of git://github.com/tlevi/moodle into MOODLE_21_STABLE 2012-05-07 11:29:15 +08:00
Petr Skoda b8f242d889 MDL-31691 treat cohort idnumbers as plain text 2012-05-06 21:38:46 +02:00
Tim Hunt c3574e4f10 MDL-31814 question bank: fix possible error with sort columns. 2012-05-04 17:30:21 +01:00
Tim Hunt 6881ed5d82 MDL-32430 quiz calendar events: fix pluginfile URLs in the description. 2012-05-04 15:24:27 +01:00
Eloy Lafuente (stronk7) 6791b08315 weekly release 2.1.5+ 2012-05-04 13:12:26 +02:00
Eloy Lafuente (stronk7) c0502c170c Merge branch 'install_21_STABLE' of git://github.com/amosbot/moodle into MOODLE_21_STABLE 2012-05-04 13:07:14 +02:00
Aaron Barnes 4ef74c4834 MDL-32203 completion: Fix issues with data object where clauses 2012-05-04 15:05:48 +12:00
Dan Poltawski 7986556d6b MDL-32693 webservice: fix typo in URL 2012-05-03 18:23:05 +02:00
Marina Glancy ca984069b8 MDL-32416: Picasa repository now returns path, also fixed album title retrieval 2012-05-03 11:34:34 +08:00
Rex Lorenzo 9ae37470fa MDL-32670 mod/chat: also added missing call to ->set_heading in report.php 2012-05-02 19:09:26 -07:00
AMOS bot 768bdc8d70 Automatically generated installer lang files 2012-05-03 00:31:35 +00:00
Eloy Lafuente (stronk7) 39d59639e3 MDL-32234 Library: usergetdate tests moved to assertIdentical()
(to check both type and value)
2012-05-03 00:51:10 +02:00
Eloy Lafuente (stronk7) 668f04282a Merge branch 'wip-mdl-32234-m21' of git://github.com/rajeshtaneja/moodle into MOODLE_21_STABLE 2012-05-03 00:46:39 +02:00
Rajesh Taneja 66653a52b0 MDL-31498 formslib: repeat_elements will now set default for group elements 2012-05-02 17:15:16 +08:00
Aparup Banerjee dbcfd4f152 Merge branch 'MDL-28657-21' of https://github.com/mackensen/moodle into MOODLE_21_STABLE 2012-05-02 13:55:58 +08:00
Sam Hemelryk b702373a4d Merge branch 'MDL-31762-MOODLE_21_STABLE' of git://github.com/mouneyrac/moodle into MOODLE_21_STABLE 2012-05-02 17:51:03 +12:00
Mary Evans 53f2606205 MDL-32684 lib/pagelib: adds break; statements to theme order in lib/pagelib.php 2012-05-02 01:49:44 +01:00
Dan Poltawski 22ec5e8876 Merge branch 'MDL-32181_21' of https://github.com/ppichet/moodle into MOODLE_21_STABLE 2012-05-01 10:47:09 +08:00
Sam Hemelryk ba5f2ec663 Merge branch 'MDL-28955_M21' of git://github.com/lazydaisy/moodle into MOODLE_21_STABLE 2012-05-01 13:16:54 +12:00
Sam Hemelryk b7ea6c69d7 MDL-32012 Fixed white space 2012-05-01 12:38:57 +12:00
Sam Hemelryk 7299a9e288 Merge branch 'MDL-32012_m21' of git://github.com/merrill-oakland/moodle into MOODLE_21_STABLE 2012-05-01 12:37:21 +12:00
Sam Hemelryk 817d9328ae Merge branch 'MDL-29264_zindex_21' of git://github.com/andyjdavis/moodle into MOODLE_21_STABLE 2012-05-01 08:23:45 +12:00
Rossiani Wijaya 7bd8e21ec4 MDL-18335 calendar event: fixed role capability checking to create new event 2012-04-30 17:32:59 +08:00
Tim Hunt bb1042480f MDL-32357 Try to fix unread post notification for blog-style forums.
I know that showing unread posts is not 100% blog-style, but I think
it is useful functionality, therefore, I chose to fix it, rather than,
say, disable it completely.

I think this fix will only affect blog-style forums since
forum_print_latest_discussions is only called with mode 'plain' in
three places:
1. Blog-style forums - the case we want to fix,
2. Site news forum, and
3. Social course format.

In all cases, having read tracking work properly seems like the
right thing to do.
2012-04-30 14:30:05 +08:00
Rajesh Taneja 7cdb2e4575 MDL-32234 Library: usergetdate return different values when timezone is set
usergetdate should return consistent values for different timezone. There are
two return path
1. If timezone is servertime, it returns getdate
2. If timezone other then servertime, it use gmstrftime, which returns string and
   values with leading zero.
In second case, leading zero's are removed and values are type casted. One major fix
is with yday, getdate returns 0 through 365, whereas %j returns 001 through 366. This
has been fixed as well.
2012-04-30 10:53:24 +08:00
Sam Hemelryk d8317f0a40 Merge branch 'm21_MDL-32597' of git://github.com/danmarsden/moodle into MOODLE_21_STABLE 2012-04-30 13:21:45 +12:00
Sam Hemelryk dd3dc2e2e3 Merge branch 'MDL-28735-m21' of git://github.com/ankitagarwal/moodle into MOODLE_21_STABLE 2012-04-30 13:14:54 +12:00
Sam Hemelryk dd6776c92b Merge branch 'MDL-26523_grader_21' of git://github.com/andyjdavis/moodle into MOODLE_21_STABLE 2012-04-30 12:46:28 +12:00
Andrew Davis d04cc1ea24 MDL-31429 enrol: added db/messages.php for enrolment plugins and added some smarts to messaging so it won't display message settings for disabled enrolment plugins 2012-04-30 12:36:22 +12:00
Chris Follin 8da0b77ccb MDL-31429 enrol: Add missing string for PayPal enrolment messages.
Signed-off-by: Andrew Davis <andrew@moodle.com>
2012-04-30 12:34:02 +12:00
Aparup Banerjee bd774e7aeb MDL-19391 Database : fixed icon size 2012-04-30 12:21:35 +12:00
Sam Hemelryk 3b9d358d9d MDL-31510 grader report: Fixed whitespace 2012-04-30 12:13:14 +12:00
Sam Hemelryk 60aaa96f61 Merge branch 'MDL-31510_group_activities_21' of git://github.com/andyjdavis/moodle into MOODLE_21_STABLE 2012-04-30 12:11:05 +12:00
Sam Hemelryk 8374754563 Merge branch 'MDL-32238-m21' of git://github.com/ankitagarwal/moodle into MOODLE_21_STABLE 2012-04-30 12:02:42 +12:00
Sam Hemelryk 45bfe330ea Merge branch 'MDL-32624_21_wip' of git://github.com/grabs/moodle into MOODLE_21_STABLE 2012-04-30 11:57:18 +12:00
Mary Evans 221ded5477 MDL-28955 theme_nimble: added css rules to display horizontal/vertical-menu-submenu-indicator 2012-04-28 02:52:12 +01:00
Rex Lorenzo 0ffce4b7ae MDL-32670 mod/chat: added missing call to $PAGE->set_heading 2012-04-27 16:09:29 -07:00
Eric Merrill bf2d7c1823 MDL-32012 resource: flaw in restore from moodle 1.9 backups 2012-04-27 16:17:23 -04:00
ppichet 62aaf94f49 MDL-32181 question/calculatedmulti validate multianswers
restructuring the validation function of edit_calculatedmulti_form.php
correcting attempt
2012-04-27 14:36:18 -04:00
Eloy Lafuente (stronk7) eddceb69c7 weekly release 2.1.5+ 2012-04-27 12:48:40 +02:00
Eloy Lafuente (stronk7) 7649be6ea0 Merge branch 'install_21_STABLE' of git://github.com/amosbot/moodle into MOODLE_21_STABLE 2012-04-27 12:41:35 +02:00
Eloy Lafuente (stronk7) a65e24917f Revert "MDL-32249 completion: Round course grades and remove hardcoded string"
This reverts commit 2e67e5ecbb.
2012-04-27 12:07:23 +02:00
Andrew Davis 99a3b8215b MDL-29264 course: removed the z-index from course css for course completion elements 2012-04-27 11:11:50 +07:00
Andrew Davis 4fab8e528d MDL-26523 grade: fixed a called to addHelpButton() that was asking for a non-existent string 2012-04-27 09:19:43 +07:00
Andrew Davis 52de453351 MDL-31510 grade: made the user report observe $cm->uservisible so that activities not available to a student because of groups do not appear on their user report 2012-04-26 17:01:45 +07:00
Marina Glancy 607b4fa3e2 MDL-32417: Fixed regression in original (cherrypick) backport 2012-04-26 10:27:50 +02:00
Eloy Lafuente (stronk7) 862f48225d Merge branch 'MDL-19263-21' of https://github.com/mackensen/moodle into MOODLE_21_STABLE 2012-04-26 02:59:35 +02:00
Eloy Lafuente (stronk7) 538d482927 Merge branch 'MDL-32630-workshop-calendar_21' of git://github.com/mudrd8mz/moodle into MOODLE_21_STABLE 2012-04-26 02:21:22 +02:00
David Mudrak 8683c24f73 MDL-32630 workshop_calendar_update() does not check for calendar permissions
As discussed in MDL-32631, calendar_event::update() should not do
capability checks at all. Until that issue is fixed, we just explicitly
declare that no capability checks should be done.

The function workshop_calendar_update() is executed when adding or
updating a workshop instance (where permissions to modify the instance
were already checked and are sufficient) and in the upgrade code (where
no check should be performed anyway).
2012-04-25 16:05:42 +02:00
Eloy Lafuente (stronk7) 7a48124d69 Merge branch 'MDL-32192_copy_string_21' of git://github.com/andyjdavis/moodle into MOODLE_21_STABLE 2012-04-25 13:08:19 +02:00
Marina Glancy 7546de2e7a MDL-32417: Fixed pagination bug in Flickr search results, also return thumbnail sizes 2012-04-25 03:43:16 +02:00
Eloy Lafuente (stronk7) 9a2bb1ee2c Merge branch 'wip-MDL-28941-m21' of git://github.com/samhemelryk/moodle into MOODLE_21_STABLE 2012-04-25 03:35:21 +02:00
Eloy Lafuente (stronk7) 19cc130565 MDL-32490 Offline assignment: phpdocs and whitespace fixes 2012-04-25 02:42:12 +02:00
Henning Bostelmann 72d890d2d2 MDL-32490 Offline assignment: do not display lateness information 2012-04-25 02:42:04 +02:00
AMOS bot 793d2bf940 Automatically generated installer lang files 2012-04-25 00:31:41 +00:00
Eloy Lafuente (stronk7) b2313c434f Merge branch 'MDL-32082_messaging_readability_21' of git://github.com/andyjdavis/moodle into MOODLE_21_STABLE 2012-04-25 01:57:28 +02:00
Eloy Lafuente (stronk7) 4790c88e85 Merge branch 'wip-MDL-30478-MOODLE_21_STABLE' of git://github.com/abgreeve/moodle into MOODLE_21_STABLE 2012-04-25 01:13:22 +02:00
Eloy Lafuente (stronk7) a52b49b925 Merge branch 'MDL-31548-m21' of git://github.com/ankitagarwal/moodle into MOODLE_21_STABLE 2012-04-24 23:30:38 +02:00
Andreas Grabs d9e544b78c MDL-32624 - initialbars disappears 2012-04-24 21:22:25 +02:00
Eloy Lafuente (stronk7) b38f551820 MDL-31914 db fix - cannot use table aliases on DELETE statements. Credit goes to Andrew Nicols (LUNS). 2012-04-24 13:10:20 +02:00
Eloy Lafuente (stronk7) 04cc6a1ba1 Merge branch 'MDL-32249-21' of github.com:srynot4sale/moodle into MOODLE_21_STABLE 2012-04-24 13:10:08 +02:00
Eloy Lafuente (stronk7) 4ca8983287 MDL-32102 Course completion - bump to 2011070105.08 (07 was already in use) 2012-04-24 12:38:30 +02:00
Andrew Robert Nicols 25d11fe956 MDL-31914 Ensure that completion criteria are deleted when removing a course module 2012-04-24 12:35:53 +02:00
Dan Poltawski 43b542b616 Merge branch 'm21_MDL-32102' of git://github.com/danmarsden/moodle into MOODLE_21_STABLE 2012-04-24 15:17:56 +08:00
Jerome Mouneyrac 69dcda25e5 MDL-31762 username should be lowercase and check against PARAM_USERNAME when creating/updating user by web service 2012-04-24 15:04:01 +08:00
Ankit Agarwal 8477740c30 MDL-32238 course: Timemodifed should be updated when a course's visible status is toggled from the category page 2012-04-24 13:41:16 +08:00
Dan Poltawski 42657ab7ec Merge branch 'w17_MDL-32427_m21_protocols' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2012-04-24 10:27:27 +08:00
Ankit Agarwal f91b7ae26b MDL-28735 calendar: Fixing issues with course selection dropdown 2012-04-24 09:38:49 +08:00
Andrew Robert Nicols 5f73b066b5 MDL-32454 Fix issues highlighted by strict warnings in MNet code 2012-04-24 01:54:50 +02:00
Andrew Robert Nicols 238c24d44c MDL-32514 Remove onclick for the group delete button 2012-04-24 01:43:17 +02:00
Dan Marsden 4e9fcf1eb2 MDL-32597 typo in path to version.php file for local plugins 2012-04-24 11:14:11 +12:00
Eloy Lafuente (stronk7) 02c71f990f Merge branch 'MDL-28176-21' of git://github.com/danpoltawski/moodle into MOODLE_21_STABLE 2012-04-24 00:31:18 +02:00
Eloy Lafuente (stronk7) db472efd13 Merge branch 'MDL-32134-21' of git://github.com/danpoltawski/moodle into MOODLE_21_STABLE 2012-04-24 00:09:05 +02:00
Eloy Lafuente (stronk7) c168d35af5 Merge branch 'wip-MDL-26500-21' of git://github.com/danpoltawski/moodle into MOODLE_21_STABLE 2012-04-24 00:04:51 +02:00
Eloy Lafuente (stronk7) 030fc2d27c MDL-29262 simpletest: fix forgotten mock objects to avoid strict notices 2012-04-23 16:30:01 +02:00
Dan Poltawski 2211bba995 Merge branch 'MDL-32431-m21' of git://github.com/ankitagarwal/moodle into MOODLE_21_STABLE 2012-04-23 17:11:07 +08:00
Dan Poltawski d5fabf0b1f Merge branch 'w17_MDL-32477_m21_cloneperm' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2012-04-23 16:35:39 +08:00
Petr Skoda 8f8bda7343 MDL-32427 fix suport for extra schemes in links in HTML Purifier 2012-04-23 10:31:16 +02:00
Dan Poltawski 537005082b Merge branch 'w17_MDL-31553_m21_clitimeout' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2012-04-23 15:25:56 +08:00
Petr Skoda f40bce2565 MDL-31553 do not timeout CLI upgrade scripts
Credit goes to Michael Aherne.
2012-04-23 08:55:05 +02:00
Dan Poltawski d4ccd2ceeb Merge branch 'MDL-32104-m21' of git://github.com/ankitagarwal/moodle into MOODLE_21_STABLE 2012-04-23 12:50:17 +08:00
Dan Poltawski 24504b499b Merge branch 'MDL-29262_21' of git://github.com/stronk7/moodle into MOODLE_21_STABLE 2012-04-23 12:43:30 +08:00
Andrew Robert Nicols 943c29e5b0 MDL-32459 Adjust order of remote enrolment help text to suit form order 2012-04-23 10:44:20 +08:00
Iñaki Arenaza b378542397 MDL-16646 auth/cas CAS configuration page mis-spellings
Signed-off-by: Iñaki Arenaza <iarenaza@mondragon.edu>
2012-04-23 10:34:09 +08:00
Dan Poltawski fd40df6f92 Merge branch 'MDL-23647_M21' of git://github.com/lazydaisy/moodle into MOODLE_21_STABLE 2012-04-23 10:27:56 +08:00
Chris Follin c623274478 MDL-32492 auth/cas: respect https login links 2012-04-23 09:50:29 +08:00
Aaron Barnes 2e67e5ecbb MDL-32249 completion: Round course grades and remove hardcoded string 2012-04-23 12:23:22 +12:00
Dan Marsden af6e993c9d MDL-32102 Course completion - only restore user completion if not adding to existing course 2012-04-23 11:34:13 +12:00
Eloy Lafuente (stronk7) b981c8706e MDL-29262 restore: Clean controller obj form DB once finished ok 2012-04-23 00:42:01 +02:00
Eloy Lafuente (stronk7) 931eace3c3 MDL-29262 backup: Clean controller obj form DB once finished ok 2012-04-23 00:41:56 +02:00
Eloy Lafuente (stronk7) 6642887953 MDL-29262 backup: new setting to control the ttl of backup logs
Add one new backup setting, moving from the general CFG->loglifetime,
to be able to delete backup logged information often.

Conflicts:

	admin/settings/courses.php
	version.php

Conflicts:

	lib/cronlib.php
	version.php
2012-04-23 00:40:11 +02:00
Andrew Davis 24ca82df7e MDL-32191 grade:renamed a mis-spelled string name
AMOS BEGIN
 CPY [invalidgradeitmeid,error],[invalidgradeitemid,error]
AMOS END
2012-04-21 11:50:22 +07:00
Andrew Davis 8b196107ba MDL-32082 message: added a function to make user checks more readable 2012-04-21 11:21:46 +07:00
Charles Fulton e9eb08bef7 MDL-25695 wiki: enable anchor tags 2012-04-20 12:52:05 -07:00
Charles Fulton ea89f29bbe MDL-28657 backup: make automated backup filenames site admin-configurable 2012-04-20 08:54:59 -07:00
Charles Fulton 4ef25d16cb MDL-19263 assignment: only notify users enrolled in course 2012-04-20 06:16:15 -07:00
Tim Hunt f89e86f135 MDL-32519 completio: Fix spelling of Enrolled. 2012-04-20 10:27:20 +01:00
Eloy Lafuente (stronk7) 9a800e2c9e MDL-26979 css - clean whitespace introduced by previous commit 2012-04-20 13:28:03 +12:00
Sam Hemelryk 0547b7e742 MDL-26979 custommenu Improved the custom menu CSS in base and all other core themes
* The custom menu now requires the YUI module directly rather than in its initialisation
* Improved the CSS in base so that it was more precise and more easily overrideable
* Reviewed the CSS for all core themes improving and removing !important from rules
2012-04-20 13:28:03 +12:00
Ankit Agarwal 93b0225ece MDL-32104 forum: Fixing issue with logs during restore 2012-04-20 08:55:26 +08:00
Ankit Agarwal 084c07f599 MDL-31548 enrollments: Introducing new api enrol_get_all_users_courses() that returns all user courses without any checks 2012-04-20 08:53:51 +08:00
Ankit Agarwal 79cbfaa114 MDL-32431 backup: Adding the feature to support backing up and restoring calendar events 2012-04-20 08:52:51 +08:00
AMOS bot 09dfc08f79 Automatically generated installer lang files 2012-04-20 00:32:33 +00:00
Adrian Greeve 4174535ac9 MDL-30478 - wiki - Fixing up group problems when viewing and creating wiki pages.
Thanks to Matt Kolb for his contribution.
2012-04-20 07:33:55 +08:00
Petr Skoda b3f60ef696 MDL-32477 allow cloning of plugin permissions from core
Please note it is discouraged to clone from different plugin type because the upgrade order is not guaranteed.
2012-04-19 22:12:21 +02:00
Dan Poltawski bd44a3bc02 weekly release 2.1.5+ 2012-04-19 17:49:33 +08:00
Dan Poltawski c003806b56 Merge branch 'install_21_STABLE' of git://github.com/amosbot/moodle into MOODLE_21_STABLE 2012-04-19 17:39:34 +08:00
Andrew Robert Nicols 6475153231 MDL-32061 Use old lesson_answer ID and correct when restoring lesson attempts 2012-04-18 02:44:40 +02:00
Eloy Lafuente (stronk7) 721c418985 Merge branch 'w16_MDL-30242_m21_session' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2012-04-17 22:39:36 +02:00
Jerome Mouneyrac 993debdbe3 MDL-30225 Creating new web service tokens create error 2012-04-17 18:54:11 +08:00
Dan Poltawski 0fcd56e671 MDL-26500 blog: Rewrite pluginfile urls in RSS 2012-04-17 17:48:42 +08:00
Dan Poltawski 15824fadc2 MDL-26500 mod/glossary: Rewrite pluginfile urls in RSS 2012-04-17 17:48:42 +08:00
Dan Poltawski 2dd1e4c422 MDL-26500 mod/forum: Rewrite pluginfile urls in RSS 2012-04-17 17:48:42 +08:00
Dan Poltawski d89ebccf65 Merge branch 'MDL-25660-workshop-calendar_21' of git://github.com/mudrd8mz/moodle into MOODLE_21_STABLE 2012-04-17 16:08:27 +08:00
Dan Poltawski 157459a20a MDL-28176 lang - rephrase conditional access description 2012-04-17 13:38:14 +08:00
Dan Poltawski 252979a787 MDL-32134 lang: Add missing PNG string 2012-04-17 11:30:06 +08:00
AMOS bot d5f9cfcf8d Automatically generated installer lang files 2012-04-17 00:31:55 +00:00
Dan Poltawski 8a2b5c4525 Merge branch 'w16_MDL-32437_m21_tablename' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2012-04-16 20:50:29 +08:00
Dan Poltawski dd9841f926 Merge branch 'MDL-32358_21' of https://github.com/ppichet/moodle into MOODLE_21_STABLE 2012-04-16 14:31:26 +08:00
Jerome Mouneyrac 4b8da40c6a MDL-31694 Fix XSS security issue with service name accepting javascript 2012-04-16 14:27:54 +08:00
Dan Poltawski bde399dcef Merge branch 'wip-MDL-32393-m21' of git://github.com/samhemelryk/moodle into MOODLE_21_STABLE 2012-04-16 13:29:12 +08:00
Dan Poltawski c175e01ec0 MDL-32443 queupgradehelper cli: fix path & whitespace 2012-04-16 13:23:29 +08:00
Dan Poltawski c046a3fb88 Merge branch 'MDL-32443_m21' of git://github.com/merrill-oakland/moodle into MOODLE_21_STABLE 2012-04-16 13:14:48 +08:00
Sam Hemelryk b83306c0ce Merge branch 'MDL-32385_M21' of git://github.com/lazydaisy/moodle into MOODLE_21_STABLE 2012-04-16 17:06:03 +12:00
Dan Poltawski a9b7100432 Merge branch 'MDL-32404_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2012-04-16 13:01:59 +08:00
Sam Hemelryk f2994d7338 Merge branch 'MDL-32444_M21' of git://github.com/lazydaisy/moodle into MOODLE_21_STABLE 2012-04-16 15:59:24 +12:00
Eric Merrill 5e76b4a49b MDL-32443 qeupgradehelper: Add cli tool to execute qeupgrade helper 2012-04-15 23:56:13 -04:00
Sam Hemelryk 93deef3cd3 MDL-32353 fixed up very minor whitespace 2012-04-16 15:22:47 +12:00
Sam Hemelryk f0c351f763 Merge branch 'MDL-32353_m21' of git://github.com/merrill-oakland/moodle into MOODLE_21_STABLE 2012-04-16 15:09:21 +12:00
Dan Poltawski 8876dd31d8 Merge branch 'MDL-32442_m21' of git://github.com/merrill-oakland/moodle into MOODLE_21_STABLE 2012-04-16 10:51:53 +08:00
ppichet 8886f0ace0 MDL-32358 : numerical question: validation messages errors
The selected unit parameter is added answer paramter when renderer call
 $question->get_validation_error() so that it mimics the
is_complete_response(array $response) structure.
2012-04-15 22:21:41 -04:00
Sam Hemelryk 50ff77d26a Merge branch 'm21_MDL-32388' of git://github.com/danmarsden/moodle into MOODLE_21_STABLE 2012-04-16 12:23:02 +12:00
Sam Hemelryk 0eeb0874cc Merge branch 'MDL-30819_grader_col_highlight_21' of git://github.com/andyjdavis/moodle into MOODLE_21_STABLE 2012-04-16 11:45:29 +12:00
Mary Evans 2ee94c2d37 MDL-23647 theme_anomaly: Removed margin + added padding to current week main content to give it more definition. 2012-04-16 00:38:58 +01:00
Sam Hemelryk 6535721ceb Merge branch 'MDL-30955_forum_ratings_21' of git://github.com/andyjdavis/moodle into MOODLE_21_STABLE 2012-04-16 11:34:18 +12:00
Sam Hemelryk a38d62efd8 Merge branch 'MDL-32316_21_wip' of git://github.com/grabs/moodle into MOODLE_21_STABLE 2012-04-16 11:00:16 +12:00
Sam Hemelryk 84aabeae85 Merge branch 'MDL-27547-MOODLE_21_STABLE' of git://github.com/mouneyrac/moodle into MOODLE_21_STABLE 2012-04-16 10:46:37 +12:00
Petr Skoda f0aecedec6 MDL-32437 fix invalid gradebook query sql 2012-04-15 14:26:58 +02:00
Mary Evans 52bb0934be MDL-32444 theme_afterburner: adds 5px margin to the left of #loginbtn, input, button, select in /style/afterburner_styles.css 2012-04-15 01:48:07 +01:00
Eric Merrill 75831af99e MDL-32442 questionupgrade: error in SQL from postgres systems 2012-04-14 11:15:42 -04:00
Tim Hunt 57fe307821 MDL-32404 question export: missing error message when exporting an empty category. 2012-04-14 15:52:50 +01:00
Mary Evans fcb0c7f267 MDL-32385 theme_base: adds line-height:normal in style/course.css for section summary 2012-04-14 15:02:35 +01:00
AMOS bot 7d5af125b9 Automatically generated installer lang files 2012-04-14 00:32:00 +00:00
David Mudrak f58b7c2f4a MDL-25660 workshop removes its calendar events on instance deletion 2012-04-13 13:11:45 +02:00
David Mudrak 3108a0f862 MDL-25660 recreate all workshop calendar events
Due to complex workshop upgrade path from 1.9 and missing calendar events
support in 2.x, the only safe way to get rid of potentially invalid
calendar events (such as those reported in MDL-26687) is to remove all
current workshop events and recreate them from scratch.
2012-04-13 05:08:20 +02:00
David Mudrak 5f05ebc40f MDL-25660 workshop registers events in the calendar 2012-04-13 05:00:42 +02:00
Eric Merrill 14d8d5ab0e MDL-32353 backup: Flaw in settings logic for user info and anonymise 2012-04-12 10:01:57 -04:00
Eloy Lafuente (stronk7) dfd6a609e0 MDL-30026 dml - fix sqlsrv support for session locks 2012-04-12 10:27:29 +02:00
Eloy Lafuente (stronk7) a16230a69b MDL-30026 improve session lock - stronger detection for oracle 2012-04-12 10:27:29 +02:00
Eloy Lafuente (stronk7) 54b0eec73d MDL-30026 improve session lock - mssql workaround for bug with scalar returned values 2012-04-12 10:27:29 +02:00
Eloy Lafuente (stronk7) adb6cdbe93 MDL-30026 improve session lock - unit tests & minor comment fixup 2012-04-12 10:27:29 +02:00
Petr Skoda a6ecee4ca0 MDL-30026 improve session lock acquire timeouts and other minor cleanup
This is partially based on original patch by Tony Levi.
2012-04-12 10:27:28 +02:00
Dan Poltawski 8e35d0aef8 weekly release 2.1.5+ 2012-04-12 13:26:04 +08:00
Dan Poltawski 6d73da4a16 Merge branch 'install_21_STABLE' of git://github.com/amosbot/moodle into MOODLE_21_STABLE 2012-04-12 13:00:09 +08:00
Andrew Davis 211bb241de MDL-30955 rating: corrected /rating/index.php as it was determining the maximum rating incorrectly for custom scales 2012-04-12 10:19:22 +07:00
Andrew Davis 2a2a8302b5 MDL-30819 grade: fixed column highlighting on the grader report 2012-04-12 10:14:25 +07:00
AMOS bot bf5ff54adb Automatically generated installer lang files 2012-04-12 00:31:31 +00:00
Dan Marsden 133e7f3dd8 MDL-32388 SCORM: Fix chrome pop-ups 2012-04-11 21:07:31 +12:00
Jerome Mouneyrac a49c98f859 MDL-27547 When deleting a local plugin containing a built-in service, the built-in service is not deleted 2012-04-11 15:04:35 +08:00
Sam Hemelryk fad527952b Revert "MDL-30843 and MDL-30842 - accessibility compliance: Add <label> for form input text and select tag"
This reverts commit 0add004b0e.
2012-04-11 17:20:49 +12:00
Dan Poltawski d08845f37a Merge branch 'MDL-32217_21' of git://github.com/ppichet/moodle into MOODLE_21_STABLE 2012-04-11 09:27:46 +08:00
Sam Hemelryk 5c2a2f209d MDL-32393 navigation: Fixed up issue when rendering action_link instances for the navigation 2012-04-11 10:57:21 +12:00
Sam Hemelryk e17f0d3b1e MDL-32124 mod_feedback: Cleanup post-integration of unused var 2012-04-10 17:24:30 +12:00
Sam Hemelryk 365e69b47d Merge branch 'MDL-32124_21_wip' of git://github.com/grabs/moodle into MOODLE_21_STABLE 2012-04-10 17:11:49 +12:00
Tony Levi 3e86502dba MDL-32379: Fix memory leak in session_set_user
session_set_user mistakingly sets the session user to be a reference to the passed object.

This is a problem when alot of data is attached to the session user object,
as any process holding a list of these users will use more memory each time it changes user.
2012-04-10 14:10:04 +09:30
Jason Fowler 5cd936cb57 MDL-27427 - Blog - Adding ability to delete entries from external blogs 2012-04-10 12:05:42 +08:00
Dan Poltawski 4c9d3738db Merge branch 'wip-mdl-30051-m21' of git://github.com/rajeshtaneja/moodle into MOODLE_21_STABLE 2012-04-10 11:06:17 +08:00
Sam Hemelryk ea7170945c Merge branch 'MDL-30843_b_m21' of git://github.com/rwijaya/moodle into MOODLE_21_STABLE 2012-04-10 11:01:27 +12:00
Sam Hemelryk 56e270e11e Merge branch 'wip-mdl-32270-m21' of git://github.com/rajeshtaneja/moodle into MOODLE_21_STABLE 2012-04-10 10:53:12 +12:00
Andreas Grabs c5c7879f8b MDL-32316 feedback: fix tem type label does honor trusted text 2012-04-10 00:29:29 +02:00
Hugh Davenport 4d6bcdad3e MDL-32308 Fix error when testing id of guest user 2012-04-09 19:06:30 +02:00
AMOS bot 4f7d9dee7c Automatically generated installer lang files 2012-04-09 00:31:32 +00:00
ppichet ff4d87739d MDL-32217_21 Setting options->unitgradingtype
Signed-off-by: ppichet <pichet.pierre@uqam.ca>
2012-04-07 19:15:39 -04:00
Andreas Grabs 53dcf63488 MDL-32124 - mails to non respondents are sent as plain text with html-tags 2012-04-07 17:33:35 +02:00
Aparup Banerjee 4b3ee4fc55 weekly release 2.1.5+ 2012-04-05 16:45:43 +08:00
Aparup Banerjee a0e75f0360 Merge branch 'install_21_STABLE' of git://github.com/amosbot/moodle into MOODLE_21_STABLE 2012-04-05 16:20:03 +08:00
Aparup Banerjee 69d0176923 Merge branch 'wip-MDL-31631-m21' of git://github.com/samhemelryk/moodle into MOODLE_21_STABLE 2012-04-04 13:41:04 +08:00
Sam Hemelryk ed1163b512 MDL-31631 navigation: Removed caching of activities and sections arrays in favour of relying on cminfo caching 2012-04-04 17:29:04 +12:00
Eloy Lafuente (stronk7) 80a9e2aab9 Merge branch 'MDL-32240_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2012-04-04 00:12:02 +02:00
Eloy Lafuente (stronk7) 471b1c8b30 Merge branch 'wip-MDL-29678-m21' of git://github.com/samhemelryk/moodle into MOODLE_21_STABLE 2012-04-03 23:53:09 +02:00
Eloy Lafuente (stronk7) ee72fe8881 Merge branch 'wip-MDL-32018-m21' of git://github.com/samhemelryk/moodle into MOODLE_21_STABLE 2012-04-03 21:06:28 +02:00
Aparup Banerjee e8f075bf74 MDL-32141 lib : update thirdpartylibs.xml to TinyMCE 3.4.9 2012-04-03 17:40:16 +08:00
Aparup Banerjee e496f11da2 Merge branch 'w14_MDL-32141_m21_tinymce' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2012-04-03 17:34:54 +08:00
Aparup Banerjee a0bf1073c5 Merge branch 'wip-MDL-30784-stable21' of git://github.com/phalacee/moodle into MOODLE_21_STABLE 2012-04-03 17:01:02 +08:00
Marina Glancy 7e7fbf62af MDL-32171: add 'Manage' link to Picasa repository
Conflicts:

	repository/picasa/lib.php
2012-04-03 13:21:48 +08:00
Dan Poltawski 3eaee3a914 Merge branch 'wip-mdl-30904-m21' of git://github.com/rajeshtaneja/moodle into MOODLE_21_STABLE 2012-04-03 11:39:28 +08:00
Rajesh Taneja d5830dd0be MDL-32270 Library: ->defaulthomepage is checked before used 2012-04-03 11:31:31 +08:00
Dan Poltawski a76a53a6e1 Merge branch 'MDL-32220_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2012-04-03 11:11:30 +08:00
Sam Hemelryk 3e14545d2d Merge branch 'wip-mdl-32150-m21' of git://github.com/rajeshtaneja/moodle into MOODLE_21_STABLE 2012-04-03 10:32:33 +12:00
Davo Smith a006cb40cb MDL-32213 Question upgrade now correctly handles non-core manually-graded question types 2012-04-02 17:00:36 +08:00
Dan Poltawski 7d7331bd76 Merge branch 'MDL-32039_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2012-04-02 11:51:44 +08:00
Andreas Grabs 21cadefea3 MDL-31768 - it is not possible to add a picture to the thanks page in feedback 2012-04-02 11:32:25 +08:00
M Kassaei 2d8d02481a MDL-32214 quiz regrading: with many attempts, PHP runs out of memory 2012-04-02 11:03:53 +08:00
Sam Hemelryk 6931d54085 Merge branch 'MDL-32239_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2012-04-02 14:31:01 +12:00
Dan Poltawski 58b4ff5039 Merge branch 'wip-MDL-32264-m21' of git://github.com/samhemelryk/moodle into MOODLE_21_STABLE 2012-04-02 10:16:31 +08:00
Rajesh Taneja 1180f2d49e MDL-32150 Libraries: checkbox controller will not check or uncheck freezed checkboxes 2012-04-02 10:14:31 +08:00
Dan Poltawski 5e84c2e01a Merge branch 'MDL-32246_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2012-04-02 10:06:40 +08:00
Dan Poltawski 9807bef7c7 Merge branch 'MDL-32201_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2012-04-02 09:42:59 +08:00
Sam Hemelryk 50cc39f950 Merge branch 'MDL-32258-data-cron_21_STABLE' of git://github.com/mudrd8mz/moodle into MOODLE_21_STABLE 2012-04-02 11:24:16 +12:00
Kanika Goyal a2e76551f0 MDL-31908 Glossary: entry list format- printable version does not show content 2012-04-02 11:21:13 +12:00
Sam Hemelryk c185ac18f5 Merge branch 'MDL-32289_M21' of git://github.com/lazydaisy/moodle into MOODLE_21_STABLE 2012-04-02 10:15:41 +12:00
Mary Evans 5023419f65 MDL-32289 theme_afterburner: added lang menu to frontpage layout in config.php 2012-04-01 01:09:36 +01:00
Mary Evans 31489a451c MDL-32262 theme_afterburner: fixed missing comma in afterburner_styles.css 2012-04-01 00:42:58 +01:00
Rossiani Wijaya 0add004b0e MDL-30843 and MDL-30842 - accessibility compliance: Add <label> for form input text and select tag 2012-03-30 17:13:50 +08:00
Rajesh Taneja 8f343c64f6 MDL-30051 cron: login error sql is now cross db 2012-03-30 16:55:23 +08:00
Petr Skoda 5405de127b MDL-32141 back port latest TinyMCE 3.4.9 2012-03-30 08:47:45 +02:00
Rajesh Taneja 22e4bd4255 MDL-32150 Libraries: checkall and uncheckall will not select disabled or readonly checkboxes 2012-03-30 13:05:20 +08:00
Rajesh Taneja c7f8a543d4 MDL-30904 Calendar: Event links are descriptive with hidden event name, for screen readers 2012-03-30 13:02:32 +08:00
AMOS bot f2e6b400b9 Automatically generated installer lang files 2012-03-30 00:33:15 +00:00
Jason Fowler f674eb81ca MDL-30784 - lib - Patch provided by Jason Hardin to provide detection for Android Tablets to allow the theme engine to provide the tablet theme 2012-03-30 08:24:55 +08:00
Sam Hemelryk 8491ee245b MDL-29678 lib: Require login now overrides to false for AJAX scripts 2012-03-30 10:24:02 +13:00
Sam Hemelryk a897a251d1 MDL-29678 navigation: Navigation AJAX require_login calls no longer set wantsurl or redirect 2012-03-30 10:24:02 +13:00
Sam Hemelryk 00568190ce MDL-32018 mod_wiki: Fixed up whitespace after peer-review 2012-03-30 10:21:38 +13:00
Sam Hemelryk 2ab3134607 MDL-32018 mod_wiki: Fixed formatting of the page title so that is is consistent and secure 2012-03-30 10:21:38 +13:00
Sam Hemelryk 4e05e64e95 MDL-32018 mod_wiki: Improved form definitions to ensure they consistent and secure 2012-03-30 10:21:38 +13:00
Sam Hemelryk 5fab70437e MDL-32264 theme_standard: Fixed multi-day calendar event border issue 2012-03-30 10:19:58 +13:00
Tim Hunt 9fd2278e17 MDL-32039 qeupgradehelper: fix typos in the lang strings
Conflicts:

	admin/tool/qeupgradehelper/lang/en/tool_qeupgradehelper.php
2012-03-29 22:02:00 +01:00
Tim Hunt 5b662f33e2 MDL-32201 question export: use qformat_xml::write_answer in base class
Without this, images in answers were not being written to the export
file for questions using extra_answer_fields.
2012-03-29 15:20:36 +01:00
David Mudrak 9f6c79e420 MDL-32258 database module does not have any data_cron() function to execute 2012-03-29 16:04:36 +02:00
Tim Hunt 016660ca42 MDL-32240 quiz editing: check permissions questions are added.
We also check permissions when removing questions from the quiz, so that
we do not let users make mistakes they cannot immediately undo.

Conflicts:

	mod/quiz/editlib.php
2012-03-29 15:02:26 +01:00
Tim Hunt 0f83dd10a1 MDL-32239 question bank: wrong cap checks editing/viewing quesitions
None of these problems affect the default roles. They only occur when
the permissions have been edited to allow restricted subsets of the
question capabilities.

In some cases, things that the restriced subset of capabilities should
have allowed were blocked by errors. In other cases, users were allowed
to do more than they should bave been due to failures to check the
right capabilities in the right places.

For full details, see the bug report.

Two of the bugs were previously reported separately as MDL-26395 and
MDL-27232.
2012-03-29 15:02:22 +01:00
Tim Hunt 1fdd74081c MDL-32246 question export: should cope with unrecognised qtypes.
If a question is of an unrecognised type, then we just omit it from the export.
2012-03-29 14:08:52 +01:00
Tim Hunt 64f4979eeb MDL-32220 question import: files sometimes stored in the wrong context.
Sadly, this involves a small API change, but I don't believe anyone was
using the argument I had to remove (because we were sometimes passing a
wrong value, and there is not way to compute the right value at that
point in the code.)

Also sadly, the code to compute the context we are importing into is now
rather spaghetti-like, but it works.

Conflicts:

	question/format/examview/format.php
	question/format/learnwise/format.php
	question/format/webct/format.php

Conflicts:

	question/format/upgrade.txt
2012-03-29 14:08:13 +01:00
Eloy Lafuente (stronk7) c54172b3c2 weekly release 2.1.5+ 2012-03-29 13:24:28 +02:00
Eloy Lafuente (stronk7) 539eb194b1 Merge branch 'install_21_STABLE' of git://github.com/amosbot/moodle into MOODLE_21_STABLE 2012-03-29 13:20:25 +02:00
Dan Poltawski 570359909f Revert "MDL-31914 Ensure that completion criteria are deleted when removing a course module"
This reverts commit a8a076708e.
2012-03-29 15:56:31 +08:00
AMOS bot 9ea53a18b6 Automatically generated installer lang files 2012-03-29 00:31:53 +00:00
Dan Poltawski a16f0a3cad MDL-31775 lesson: fix undefined variable warnings 2012-03-27 20:01:46 +08:00
Andrew Robert Nicols a8a076708e MDL-31914 Ensure that completion criteria are deleted when removing a course module
Conflicts:

	lib/db/upgrade.php
	version.php

Conflicts:

	version.php
2012-03-27 10:31:34 +02:00
Aparup Banerjee 3d06074953 Merge branch 'wip-MDL-32106-MOODLE_21_STABLE' of git://github.com/marinaglancy/moodle into MOODLE_21_STABLE 2012-03-27 10:10:31 +08:00
Tim Lock 77c5c20554 MDL-31869: Searching for users in messaging with multiple roles generates a warning 2012-03-27 10:00:38 +08:00
Sam Hemelryk c4d72072dc Merge branch 'MDL-22510-m21' of git://github.com/ankitagarwal/moodle into MOODLE_21_STABLE 2012-03-27 11:02:53 +13:00
Sam Hemelryk 88ead1b9ff Merge branch 'm21_MDL-32147' of git://github.com/danmarsden/moodle into MOODLE_21_STABLE 2012-03-27 09:50:19 +13:00
Dan Poltawski 38dbeec003 Merge branch 'MDL-31775_m21' of git://github.com/rwijaya/moodle into MOODLE_21_STABLE 2012-03-26 14:42:07 +08:00
Dan Poltawski 8b2aff422f Merge branch 'MDL-32172_m21' of git://github.com/rwijaya/moodle into MOODLE_21_STABLE 2012-03-26 12:22:42 +08:00
Kanika Goyal fa913a3ae8 MDL-31856, if choice not open, responses inconsistently displayed 2012-03-26 12:11:44 +08:00
Dan Poltawski d6e3be6d79 Merge branch 'MDL-27710_m21' of git://github.com/rwijaya/moodle into MOODLE_21_STABLE 2012-03-26 11:26:48 +08:00
Marina Glancy 1d0ac183a0 MDL-32106: fixed JS bug - when html element did not exist the script stopped 2012-03-26 10:49:49 +08:00
Ankit Agarwal 4d8cb115cc MDL-22510 libraries: Set wantsurl only when $setwantsurltome is set in
require_login
2012-03-26 08:57:55 +08:00
Iurii Kucherov 94c2ba853e MDL-31513 rename 'Edit service' to 'Save changes' 2012-03-26 12:12:13 +13:00
Andrew Robert Nicols 81e33e74e0 MDL-32142 Add missing langstring for section backups 2012-03-26 12:01:54 +13:00
Sam Hemelryk 8a4aa94daf Merge branch 'wip-mdl-29331-m21' of git://github.com/rajeshtaneja/moodle into MOODLE_21_STABLE 2012-03-26 11:57:20 +13:00
Rajesh Taneja a8f7ec4571 MDL-31903 course: Title on highlight and hide icon should be only added in ie 2012-03-26 11:46:14 +13:00
Rajesh Taneja 65df3cd2cb MDL-31903 course: Highlight icon will get iniatlised properly 2012-03-26 11:46:13 +13:00
Rajesh Taneja 690cf46b0c MDL-31903 course: update patch to fix course highlight icon and title toggle 2012-03-26 11:46:13 +13:00
Juho Viitasalo c62eeedab7 MDL-31903 course: Fixed course highlight icon and title toggle 2012-03-26 11:46:13 +13:00
Dan Poltawski 05d8d4abe5 MDL-29400 assignment: Require a file to be uploaded in form
Don't display 'File uploaded successfully' when no file uploaded for
both upload and uploadsingle
2012-03-26 11:19:52 +13:00
Ruslan Kabalin fa13450de9 MDL-32026 messaging: Fix non-existing variable in the error output
Conflicts:

	lib/messagelib.php
2012-03-26 11:15:15 +13:00
Mary Evans 425a72f6db MDL-30019 theme_fusion: fix for mod-assignment-submission page by reducing font-size and page wapper padding 2012-03-25 08:26:08 +01:00
Rossiani Wijaya 08b69b29bc MDL-32172 Lesson Module: add variable initialization for 2012-03-23 15:40:44 +08:00
Sam Hemelryk a7899ca45f weekly release 2.1.5+ 2012-03-23 12:18:20 +13:00
Sam Hemelryk 0982968a37 Merge branch 'install_21_STABLE' of git://github.com/amosbot/moodle into MOODLE_21_STABLE 2012-03-23 12:10:44 +13:00
Dan Marsden d23a6b06a8 MDL-32147 - use correct 404 for server type 2012-03-23 09:58:52 +13:00
Dan Marsden 5d2930d9dd MDL-32147 SCORM improve performance of 404s for files inside SCORM packages. 2012-03-23 09:45:09 +13:00
Sam Hemelryk 912ec1fd85 MDL-31528 categories: Fixed up typo and function call 2012-03-22 09:45:10 +13:00
Andrew Davis 989e8b7f0b MDL-31818 grade: removed some broken code to do with overriding students per page, added a post variable so the page isnt lost when submitting grades 2012-03-21 14:24:19 +08:00
Sam Hemelryk 2eaa6c2667 MDL-31528 category: Fixed use of lang_string class 2012-03-21 14:29:15 +13:00
Sam Hemelryk a7dedc5efe Merge branch 'wip-mdl-31640-m21' of git://github.com/rajeshtaneja/moodle into MOODLE_21_STABLE 2012-03-21 09:50:20 +13:00
Sam Hemelryk 7ad20028b0 Merge branch 'MDL-28952-m21' of git://github.com/ankitagarwal/moodle into MOODLE_21_STABLE 2012-03-21 09:29:03 +13:00
Sam Hemelryk e5f9484e46 Merge branch 'MDL-32065-MOODLE_21_STABLE-1' of git://git.luns.net.uk/moodle into MOODLE_21_STABLE 2012-03-21 09:24:38 +13:00
Dan Poltawski f5fd808c7a Merge branch 'MDL-31266_m21' of git://github.com/rwijaya/moodle into MOODLE_21_STABLE 2012-03-20 21:55:58 +08:00
Rossiani Wijaya 5577a1a913 MDL-31775 Lesson Module: fixed start at last page seen bug 2012-03-20 17:37:24 +08:00
Aparup Banerjee 3bc6e06fc3 MDL-29848 glossary: fixed whitespace 2012-03-20 16:12:41 +08:00
Aparup Banerjee c8f95660ff Merge branch 'MDL-29848-21' of https://github.com/mackensen/moodle into MOODLE_21_STABLE 2012-03-20 16:12:31 +08:00
Rossiani Wijaya 1bca1284f2 MDL-27710 lesson module: add the following jump options: unseen branch page, random page and random branch 2012-03-20 15:20:48 +08:00
Rajesh Taneja da5f9221ea MDL-29331 Users: Participants list with user_details now show check box for bluk operation 2012-03-20 11:51:22 +08:00
Ankit Agarwal db378febc2 MDL-28592 blocks: changing the arguments to moodle_url::out() 2012-03-20 10:59:41 +08:00
Aparup Banerjee 49e45d069b Merge branch 'wip-MDL-31528-m21' of git://github.com/samhemelryk/moodle into MOODLE_21_STABLE 2012-03-20 10:10:44 +08:00
Sam Hemelryk 404958a0c4 Merge branch 'wip-MDL-32036-MOODLE_21_STABLE' of git://github.com/marinaglancy/moodle into MOODLE_21_STABLE 2012-03-20 13:41:11 +13:00
Marina Glancy 97e990c983 MDL-32036: Repositories wikimedia and youtube lack paging
repositories wikimedia and youtube:
- save last search in
- process parameter 'page'
- remove buttons 'Refresh', 'Search' and 'Logout' since they don't have meaning
filepicker:
- allow unknown number of pages (['pages'] = -1), show one 'Next' page after the current (both JS and non-JS modes)
repository wikimedia:
- add non-AJAX search form to make it work with JS disabled
2012-03-20 08:39:36 +08:00
Sam Hemelryk fa93616a23 Merge branch 'wip-MDL-32037-MOODLE_21_STABLE' of git://github.com/marinaglancy/moodle into MOODLE_21_STABLE 2012-03-20 13:33:08 +13:00
Sam Hemelryk a11492d7e8 Merge branch 'w12_MDL-32071_m21_dbfamily' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2012-03-20 11:39:43 +13:00
Sam Hemelryk d29f6ebcd3 Merge branch 'w12_MDL-32079_m21_folderrev' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2012-03-20 11:34:01 +13:00
M Kassaei 8fafe29890 MDL-32053 question: Question bank table displayed inconsistently 2012-03-20 11:01:27 +13:00
M Kassaei 8cac5c0cca MDL-32048 mod_quiz: Question bank select/deselect all shows strange behaviour in IE 2012-03-20 10:56:06 +13:00
Sam Hemelryk 2aab431486 Merge branch 'MDL-32064_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2012-03-20 10:37:20 +13:00
Andrew Robert Nicols 9f1495aabc MDL-32065 Allow feedback images to be themed 2012-03-19 10:24:35 +00:00
Sam Hemelryk 2849965662 Merge branch 'MDL-32084_M21' of git://github.com/lazydaisy/moodle into MOODLE_21_STABLE 2012-03-19 20:38:05 +13:00
Sam Hemelryk 9231ed5d79 Merge branch 'w12_MDL-32090_m21_groupui' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2012-03-19 20:33:31 +13:00
Petr Skoda c1608f405d MDL-27553 admin: Fixed override bug 2012-03-19 20:21:57 +13:00
Petr Skoda 1e02608aa0 MDL-31703 allow serving of JavaScript from unsupported '/' dirroot 2012-03-19 20:16:55 +13:00
Sam Hemelryk 265724046d Merge branch 'wip-mdl-26674-m21' of git://github.com/rajeshtaneja/moodle into MOODLE_21_STABLE 2012-03-19 20:06:20 +13:00
Sam Hemelryk 84b0900175 MDL-31528 navigation: Fixed up missing break and optimised category.php 2012-03-19 19:32:48 +13:00
Sam Hemelryk 7a8c221fc7 MDL-31984 Fixed whitespace during integration 2012-03-19 19:12:02 +13:00
Sam Hemelryk ed85611715 Merge branch 'MDL-31984_theme_renderer_file_debugging' of git://github.com/ualberta-eclass/moodle into MOODLE_21_STABLE 2012-03-19 19:10:59 +13:00
Rajesh Taneja b99ec3eabb MDL-31640 course: removed extra error message and using require_capability 2012-03-19 13:08:54 +08:00
Rajesh Taneja f9374e570a MDL-31640 course: Move to, edit and search functionality in search.php is fixed with proper permission check 2012-03-19 13:08:50 +08:00
Rajesh Taneja fe8d2efe52 MDL-26674 wiki2.0: cleaned wiki event logging patch 2012-03-19 11:22:03 +08:00
Diane Villemure f3463229bd MDL-26674 wiki2.0: Fixed wiki activity log 2012-03-19 11:21:57 +08:00
Sam Hemelryk 70a63a726d Merge branch 'm21_MDL-32055' of git://github.com/danmarsden/moodle into MOODLE_21_STABLE 2012-03-19 15:53:56 +13:00
Sam Hemelryk 9ac6d34dbd Merge branch 'wip-MDL-27064-stable21' of git://github.com/phalacee/moodle into MOODLE_21_STABLE 2012-03-19 15:48:37 +13:00
Andrew Robert Nicols 0f08848ca4 MDL-32004 Set the defaultrequestcategory correctly when deleting/creating the default category 2012-03-19 14:38:53 +13:00
Sam Hemelryk b7fa2f9153 Merge branch 'MDL-28187_messaging_nav_21' of git://github.com/andyjdavis/moodle into MOODLE_21_STABLE 2012-03-19 14:14:08 +13:00
Sam Hemelryk 5a7722e046 Merge branch 'MDL-31835_recent_conversations_21' of git://github.com/andyjdavis/moodle into MOODLE_21_STABLE 2012-03-19 14:06:43 +13:00
Sam Hemelryk d0690afbc3 Merge branch 'MDL-30890_m21' of git://github.com/rwijaya/moodle into MOODLE_21_STABLE 2012-03-19 10:27:01 +13:00
Mary Evans 4247b7d472 MDL-32084 theme_fusion: removed default tagline in frontpage.php and changed configtextarea to configtext in settings.php 2012-03-17 21:59:05 +00:00
Andrew Davis 9d014d75f4 MDL-28187 message: fixed up $PAGE->set_url() in /message/index.php so the nav highlighted properly 2012-03-17 11:59:37 +07:00
AMOS bot ddcb36bd92 Automatically generated installer lang files 2012-03-17 00:31:47 +00:00
Petr Skoda d42aaae5a6 MDL-32090 fix invalid group members url
Credit goes to Jean-Philippe Gaudreau.
2012-03-16 20:12:52 +01:00
Tim Hunt 73848c608d MDL-32064 quiz navigation: JS form submit must fire submit event handlers. 2012-03-16 15:01:07 +00:00
Petr Skoda 6bdb01ccf0 MDL-32071 fix incorrect get_dbfamily() call 2012-03-16 10:32:32 +01:00
Petr Skoda 2c7a06ec8a MDL-32071 fix fatal problems in experimental forum_usetextsearches 2012-03-16 10:32:25 +01:00
Petr Skoda 16b879e79f MDL-32079 folder revision must be incremented after any file change 2012-03-16 10:12:09 +01:00
Ankit Agarwal 33e8e9e709 MDL-28952 blocks: Fixing the extra escaping issue with profile links 2012-03-16 15:47:13 +08:00
Andrew Davis 4e1dd694d3 MDL-31835 message: added a view conversation type link after each conversation on the recent conversation screen 2012-03-16 13:28:27 +07:00
Sam Hemelryk fff39dcfc1 MDL-31528 navigation: Tidied up page for viewing and managing categories 2012-03-16 10:35:46 +13:00
Sam Hemelryk ba23ddb67a MDL-31528 navigation: Fixed up navbar generation when editing categories 2012-03-16 10:35:46 +13:00
Sam Hemelryk ac7b47e656 MDL-31528 navigation: Fixed up generation for category contexts 2012-03-16 10:35:46 +13:00
Tim Hunt 8e30abf5e6 MDL-31594 question manual grading: did not handle comma as decimal. 2012-03-15 18:52:18 +00:00
Eloy Lafuente (stronk7) 3c4111ee68 weekly release 2.1.5+ 2012-03-15 11:47:37 +01:00
Eloy Lafuente (stronk7) 197cd28771 Merge branch 'install_21_STABLE' of git://github.com/amosbot/moodle into MOODLE_21_STABLE 2012-03-15 11:42:18 +01:00
Rossiani Wijaya e77f635b84 MDL-30890 accessibility compliance: add summary to calendar table 2012-03-15 17:12:00 +08:00
Jason Fowler 9a47738c45 MDL-27064 - Blog - Changing the link text for different levels of blog entries 2012-03-15 08:54:09 +08:00
AMOS bot 4970d12920 Automatically generated installer lang files 2012-03-15 00:31:56 +00:00
Charles Fulton 2199fb263f MDL-26243 calendar: display correct number of repeated events 2012-03-15 00:45:14 +01:00
Dan Marsden d588f8c74c MDL-32055 fix typo with flash player check 2012-03-15 09:20:15 +13:00
Eloy Lafuente (stronk7) 5d332d4a5d MDL-28972 formslib: whitespace fixes 2012-03-14 18:11:35 +01:00
Marina Glancy cbd6ad13e0 MDL-32037: MDL-32037: After displaying error message filepicker could not send proper request to server
We need to make sure that code executed on error does not create more requests and
especially does not create the same request that resulted with error. So now by default
filepicker will clear the right side of the window if repository_ajax.php returned an
error.
Also fixed an 'invalidsesskey' error string.
2012-03-14 13:16:17 +08:00
Sam Hemelryk 3d9dff0f22 Merge branch 'wip-mdl-28972-m21' of git://github.com/rajeshtaneja/moodle into MOODLE_21_STABLE 2012-03-14 14:39:51 +13:00
Davo Smith 4850ab676c MDL-31853 Fix pagelayout problem with admin_externalpage_setup 2012-03-14 09:25:09 +08:00
Davo Smith 9086379bb7 MDL-29147 Quickform fixed insertElementBefore to ignore duplicate unnamed elements 2012-03-14 11:54:47 +13:00
Sam Hemelryk 40ba373443 Merge branch 'MDL-29440-21_STABLE' of git://github.com/danpoltawski/moodle into MOODLE_21_STABLE 2012-03-14 11:30:21 +13:00
Ankit Agarwal e2835a5232 MDL-28998 libraries: Using default value of 0 for userid during login 2012-03-14 10:47:36 +13:00
Eloy Lafuente (stronk7) b434431b38 Merge branch 'MDL-31981_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2012-03-13 18:09:36 +01:00
Andrew Davis 0149696274 MDL-31834 message: fixed up some not quite correct usage of moodle/site:readallmessages 2012-03-13 16:50:07 +01:00
Eloy Lafuente (stronk7) 651cf35cbe Merge branch 'wip-MDL-31175-m21' of git://github.com/samhemelryk/moodle into MOODLE_21_STABLE 2012-03-13 16:17:14 +01:00
Aparup Banerjee a5d7e18abe Merge branch 'wip-mdl-27862-m21' of git://github.com/rajeshtaneja/moodle into MOODLE_21_STABLE 2012-03-13 15:30:48 +08:00
Rossiani Wijaya 5816961bde MDL-31266 Lesson module: Improve feedback so that the responses are concatenated instead of overwritten 2012-03-13 14:58:09 +08:00
Aparup Banerjee 361492a806 Merge branch 'wip-mdl-30817-m21' of git://github.com/rajeshtaneja/moodle into MOODLE_21_STABLE 2012-03-13 11:52:42 +08:00
Aparup Banerjee e785ca696e Merge branch 'MDL-30867_m21' of git://github.com/rwijaya/moodle into MOODLE_21_STABLE 2012-03-13 11:32:44 +08:00
Aparup Banerjee e92ca9dbc8 MDL-31008 Themes : fixed css code style 2012-03-13 11:00:43 +08:00
Mary Evans b713f5c2a0 MDL-31008 themes: (base theme) reversed MDL-26712 by making dimmed objects grey and added new rule for dimmed activity label text to give 50% transparancy instead 2012-03-13 10:59:20 +08:00
Davo Smith 7456f0b8a4 MDL-31935 Fixed restore backup link in course search 2012-03-13 10:02:03 +08:00
Ruslan Kabalin 1a19ad3866 MDL-31808 Upload assignment: fix user feedback display
Conflicts:

	mod/assignment/type/upload/assignment.class.php
2012-03-13 14:18:19 +13:00
Ruslan Kabalin 0b50793e41 MDL-31917 Improve assigment submission usability
Say 'View' if assignment has been graded via gradebook and changing
grades via submissions interface is not possible.
2012-03-13 14:05:13 +13:00
Ruslan Kabalin 08fb6ca3f1 MDL-31919 Fix assignment overview output to respect gradebook grading.
Currenly, if assigment has been graded in gradebook only, in the assigment
overview it is listed as not graded.
2012-03-13 14:01:00 +13:00
Sam Hemelryk 63f4993e4a Merge branch 'w11_MDL-27457_m21_enrolnorecover' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2012-03-13 11:59:44 +13:00
Sam Hemelryk 449fd68024 Merge branch 'MDL-30298_M21' of git://github.com/lazydaisy/moodle into MOODLE_21_STABLE 2012-03-13 11:56:27 +13:00
Sam Hemelryk 421a8533c5 Merge branch 'MDL-31702_21' of git://github.com/timhunt/moodle into MOODLE_21_STABLE 2012-03-13 10:33:16 +13:00
Eloy Lafuente (stronk7) 8135ecf6e1 Merge branch 'w11_MDL-31956_m21_paypal' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2012-03-12 21:37:18 +01:00
Michael Aherne 4c4c7197f0 MDL-31979 Typo in config-dist.php 2012-03-12 20:19:02 +01:00
Brian Jorgensen 5ceb78283c MDL-31984: add debugging message if theme renderer file is missnamed 2012-03-12 12:38:53 -06:00
Eloy Lafuente (stronk7) 41c65d7d8e Merge branch 'w11_MDL-31595_m21_enrolme' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2012-03-12 18:01:21 +01:00
Petr Skoda 96b421fd91 MDL-31595 improve enrol link comments 2012-03-12 16:49:43 +01:00
Eloy Lafuente (stronk7) 833af94c19 Merge branch 'w11_MDL-31815_m21_confirmemail' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2012-03-12 16:34:28 +01:00
Eloy Lafuente (stronk7) 3bc7584619 Merge branch 'w11_MDL-31534_m21_pageinitroot' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2012-03-12 15:49:41 +01:00
Petr Skoda 373b8fbdb5 MDL-31534 init PAGE before require_login() 2012-03-12 13:59:44 +01:00
Eloy Lafuente (stronk7) 2d2dfae5e9 Merge branch 'w11_MDL-31494_m21_adodblink' of git://github.com/skodak/moodle into MOODLE_21_STABLE 2012-03-12 13:38:51 +01:00
Mary Evans fc2d52bd34 MDL-30298 coursereport_progress: adds outer wrapper with class no-overflow to report table so as to enable horizontal scroll bar 2012-03-12 10:52:54 +00:00
Sam Hemelryk 06a31cb7b8 Merge branch 'wip-MDL-27087-stable21' of git://github.com/phalacee/moodle into MOODLE_21_STABLE 2012-03-12 17:34:23 +13:00
Sam Hemelryk e2094c3b93 MDL-27304 mod_wiki: Fixed up phpdocs for globals 2012-03-12 17:20:54 +13:00
Sam Hemelryk 81dc3b5fd5 Merge branch 'MDL-27304-21' of https://github.com/mackensen/moodle into MOODLE_21_STABLE 2012-03-12 17:05:12 +13:00
Charles Fulton 79795cd631 MDL-31664 fix invalid boolean to string comparison 2012-03-12 17:02:32 +13:00
Rajesh Taneja 62b3a99a0d MDL-28972 formslib: orignalvalue is considered and checkboxes are updated depending on orignalvalue of controller 2012-03-12 11:52:43 +08:00
Rajesh Taneja 2961a37027 MDL-28972 formslib: Checkbox controller will use yui to select and unselect checkboxes 2012-03-12 11:52:36 +08:00
Rajesh Taneja d383e08886 MDL-27862 Themes: Device name first letter is capital and font is made similar to theme name font 2012-03-12 10:19:45 +08:00
Rajesh Taneja ad3635a365 MDL-27862 Themes: clear theme cache button will redirect to the page on which it was pressed 2012-03-12 10:19:45 +08:00
Rajesh Taneja c6a49f7b24 MDL-27862 Themes: replaced disabled use theme button with unset theme button 2012-03-12 10:19:45 +08:00
Rajesh Taneja 2942426ff4 MDL-27862 Themes: Added button to un-select theme for devices, except default device 2012-03-12 10:19:45 +08:00
Rajesh Taneja 960838e0f1 MDL-27862 Themes: Strings updated on theme selection pages 2012-03-12 10:19:45 +08:00
Sam Hemelryk 5c3f517142 Merge branch 'MDL-28998-m21' of git://github.com/ankitagarwal/moodle into MOODLE_21_STABLE 2012-03-12 15:18:13 +13:00
Rajesh Taneja aadf8518c4 MDL-30817 activity_completion: Fixed title and alt string (on checkbox) to have module name prefixed 2012-03-12 10:17:33 +08:00
Andrew Robert Nicols 45c413e29e MDL-31811 Add/Correct checks on activity read-only periods 2012-03-12 15:15:43 +13:00
Andrew Robert Nicols e033345948 MDL-31877 Correct get_users exception 2012-03-12 14:57:25 +13:00
Andrew Robert Nicols 739af42c9c MDL-31918 Use cached module info for activity completion report 2012-03-12 14:55:16 +13:00
Dan Poltawski c55be07e8a MDL-29440 calendar: iCal export don't allow html in description export 2012-03-12 09:53:03 +08:00
Sam Hemelryk 256e3edf0e Merge branch 'MDL-31923-MOODLE_21_STABLE-1' of git://git.luns.net.uk/moodle into MOODLE_21_STABLE 2012-03-12 14:32:45 +13:00
Sam Hemelryk df3a3b45da Merge branch 'MDL-31841_feedback_align_21' of git://github.com/andyjdavis/moodle into MOODLE_21_STABLE 2012-03-12 14:22:02 +13:00
Sam Hemelryk 06dd9ad0d8 Merge branch 'wip-MDL-30906-MOODLE_21_STABLE' of git://github.com/abgreeve/moodle into MOODLE_21_STABLE 2012-03-12 14:19:42 +13:00
Jason Fowler 7faf219bce MDL-27087 - Resizing the 'roles' icon on blocks to bring it into line with the other icons 2012-03-12 08:36:32 +08:00
Sam Hemelryk 61e14418d0 MDL-31175 backup: Fixed undefined in register_dependency 2012-03-12 09:43:06 +13:00
Mary Evans 319ecdb58a MDL-30298 coursereport_completion: adds outer wrapper with class no-overflow to report table so as to enable horizontal scroll 2012-03-11 15:35:12 +00:00
Mary Evans 6066f65817 MDL-30298 theme_binarius: adds horizontal scroll to report layout 2012-03-11 01:39:22 +00:00
Petr Skoda 214da1654e MDL-31956 fix enrol string components
Credit goes to Mark Nelson
2012-03-10 13:02:22 +01:00
Petr Skoda 1668cd75f2 MDL-31494 fix link to adodb driver docs
target="_bank" is valid again in html5, it does help a lot here no matter what legacy accessibility guides say…
2012-03-10 11:06:01 +01:00
Petr Skoda 906950a195 MDL-31815 encode dots in confirm url which helps email clients with url highlighting 2012-03-10 10:47:56 +01:00
Petr Skoda 9be109005b MDL-27457 fix JS error on enrol when grade history disabled 2012-03-10 10:02:43 +01:00
Petr Skoda 112ecf68ba MDL-31595 do not show enrolee link to guest account 2012-03-10 09:42:08 +01:00
Tim Hunt 09a54762b2 MDL-31981 shortanswer qtype does not handle \* in correct response. 2012-03-09 19:01:57 +00:00
Tim Hunt 98d2e58d19 MDL-31702 quiz: clarify error message that has been confusing people. 2012-03-09 15:30:16 +00:00
Rossiani Wijaya 8af9ec6cb9 MDL-30867 Lesson module: fix lesson essay question formtting to be consistent with user selection 2012-03-09 17:39:15 +08:00
Ankit Agarwal ae3251111c MDL-28998 libraries: Adding validation to customisable profile fields during signup 2012-03-09 14:55:41 +08:00
Charles Fulton f2630cfd2c MDL-27304 wiki: link to user's course profile 2012-03-08 05:08:23 -08:00
Andrew Robert Nicols a645b79113 MDL-31923 Correctly respect hiddenfields and capabilities 2012-03-08 10:22:55 +00:00
Andrew Davis e5ecd739ed MDL-31841 grade: prevented the feedback column on the user report from being centered 2012-03-08 15:23:51 +07:00
Adrian Greeve e9313673bb MDL-30906 - course - Changed the <hx> tags to follow a sequential order 2012-03-06 14:56:55 +08:00
Charles Fulton 936adcdbde MDL-29848 glossary: get proper context for comments on exported entry 2012-03-02 07:50:06 -08:00
1184 changed files with 38786 additions and 31497 deletions
+1 -1
View File
@@ -99,7 +99,7 @@ function bloglevelupgrade_entries($blogentries, $forum, $cm, $groupid=-1) {
$discussion->groupid = $groupid;
$message = '';
$discussionid = forum_add_discussion($discussion, null, $message);
$discussionid = forum_add_discussion($discussion, null, $message, $blogentry->userid);
// Copy file attachment records
$fs = get_file_storage();
+4 -20
View File
@@ -214,11 +214,7 @@
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mysql" version="5.0.25">
<FEEDBACK>
<ON_ERROR message="mysql416required" />
</FEEDBACK>
</VENDOR>
<VENDOR name="mysql" version="5.0.25" />
<VENDOR name="postgres" version="8.3" />
<VENDOR name="mssql" version="9.0" />
<VENDOR name="odbc_mssql" version="9.0" />
@@ -335,11 +331,7 @@
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mysql" version="5.0.25">
<FEEDBACK>
<ON_ERROR message="mysql416required" />
</FEEDBACK>
</VENDOR>
<VENDOR name="mysql" version="5.0.25" />
<VENDOR name="postgres" version="8.3" />
<VENDOR name="mssql" version="9.0" />
<VENDOR name="odbc_mssql" version="9.0" />
@@ -449,11 +441,7 @@
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mysql" version="5.0.25">
<FEEDBACK>
<ON_ERROR message="mysql416required" />
</FEEDBACK>
</VENDOR>
<VENDOR name="mysql" version="5.0.25" />
<VENDOR name="postgres" version="8.3" />
<VENDOR name="mssql" version="9.0" />
<VENDOR name="odbc_mssql" version="9.0" />
@@ -563,11 +551,7 @@
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mysql" version="5.0.25">
<FEEDBACK>
<ON_ERROR message="mysql416required" />
</FEEDBACK>
</VENDOR>
<VENDOR name="mysql" version="5.1.33" />
<VENDOR name="postgres" version="8.3" />
<VENDOR name="mssql" version="9.0" />
<VENDOR name="odbc_mssql" version="9.0" />
+2 -2
View File
@@ -50,7 +50,7 @@ class mnet_simple_host_form extends moodleform {
$this->add_action_buttons(false, get_string('addhost', 'mnet'));
}
function validation($data) {
function validation($data, $files) {
global $DB;
$wwwroot = $data['wwwroot'];
@@ -154,7 +154,7 @@ class mnet_review_host_form extends moodleform {
$this->add_action_buttons(false);
}
function validation($data) {
function validation($data, $files) {
$errors = array();
if ($data['oldpublickey'] == $data['public_key']) {
return;
+11 -2
View File
@@ -39,6 +39,15 @@ class mnet_profile_form extends moodleform {
global $CFG;
$mform =& $this->_form;
$mnetprofileimportfields = '';
if (isset($CFG->mnetprofileimportfields)) {
$mnetprofileimportfields = str_replace(',', ', ', $CFG->mnetprofileimportfields);
}
$mnetprofileexportfields = '';
if (isset($CFG->mnetprofileexportfields)) {
$mnetprofileexportfields = str_replace(',', ', ', $CFG->mnetprofileexportfields);
}
$mform->addElement('hidden', 'hostid', $this->_customdata['hostid']);
$fields = mnet_profile_field_options();
@@ -49,7 +58,7 @@ class mnet_profile_form extends moodleform {
$select = $mform->addElement('select', 'importfields', get_string('importfields', 'mnet'), $fields['optional']);
$select->setMultiple(true);
$mform->addElement('checkbox', 'importdefault', get_string('leavedefault', 'mnet'), str_replace(',', ', ', $CFG->mnetprofileimportfields));
$mform->addElement('checkbox', 'importdefault', get_string('leavedefault', 'mnet'), $mnetprofileimportfields);
// Fields to export ----------------------------------------------------
$mform->addElement('header', 'export', get_string('exportfields', 'mnet'));
@@ -57,7 +66,7 @@ class mnet_profile_form extends moodleform {
$select = $mform->addElement('select', 'exportfields', get_string('exportfields', 'mnet'), $fields['optional']);
$select->setMultiple(true);
$mform->addElement('checkbox', 'exportdefault', get_string('leavedefault', 'mnet'), str_replace(',', ', ', $CFG->mnetprofileexportfields));
$mform->addElement('checkbox', 'exportdefault', get_string('leavedefault', 'mnet'), $mnetprofileexportfields);
$this->add_action_buttons();
}
+1 -1
View File
@@ -36,7 +36,7 @@ class mnet_services_form extends moodleform {
function definition() {
$mform =& $this->_form;
$mnet_peer =& $this->_customdata['peer'];
$myservices =& mnet_get_service_info($mnet_peer);
$myservices = mnet_get_service_info($mnet_peer);
$mform->addElement('hidden', 'hostid', $mnet_peer->id);
+3 -1
View File
@@ -50,8 +50,10 @@ if ($course) {
// security first
require_login($course, false, $cm);
$safeoverridesonly = false;
if (!has_capability('moodle/role:override', $context)) {
require_capability('moodle/role:safeoverride', $context);
$safeoverridesonly = true;
}
$PAGE->set_url($url);
$PAGE->set_context($context);
@@ -119,7 +121,7 @@ if (empty($overridableroles[$roleid])) {
}
// If we are actually overriding a role, create the table object, and save changes if appropriate.
$overridestable = new override_permissions_table_advanced($context, $roleid, false);
$overridestable = new override_permissions_table_advanced($context, $roleid, $safeoverridesonly);
$overridestable->read_submitted_permissions();
if (optional_param('savechanges', false, PARAM_BOOL) && confirm_sesskey()) {
+11 -5
View File
@@ -54,6 +54,17 @@ if (!$canview) {
print_error('nopermissions', 'error', '', get_string('checkpermissions', 'role'));
}
if ($userid != $USER->id) {
// If its not the current user we need to extend the navigation for that user to ensure
// their navigation is loaded and this page found upon it.
$PAGE->navigation->extend_for_user($user);
}
if ($course->id != $SITE->id || $userid != $USER->id) {
// If we're within a course OR if we're viewing another user then we need to include the
// settings base on the navigation to ensure that the navbar will contain the users name.
$PAGE->navbar->includesettingsbase = true;
}
/// Now get the role assignments for this user.
$sql = "SELECT
ra.id, ra.userid, ra.contextid, ra.roleid, ra.component, ra.itemid,
@@ -119,14 +130,9 @@ $title = get_string('xroleassignments', 'role', $fullname);
$PAGE->set_title($title);
if ($courseid != SITEID) {
$PAGE->set_heading($fullname);
if (has_capability('moodle/course:viewparticipants', $coursecontext)) {
$PAGE->navbar->add(get_string('participants'),new moodle_url('/user/index.php', array('id'=>$courseid)));
}
} else {
$PAGE->set_heading($course->fullname);
}
$PAGE->navbar->add($fullname, new moodle_url("$CFG->wwwroot/user/view.php", array('id'=>$userid,'course'=>$courseid)));
$PAGE->navbar->add($straction);
echo $OUTPUT->header();
echo $OUTPUT->heading($title, 3);
echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthnormal');
+27 -3
View File
@@ -92,8 +92,29 @@ if ($hassiteconfig
// Add a category for backups
$ADMIN->add('courses', new admin_category('backups', get_string('backups','admin')));
// Create a page for general backup defaults
// Create a page for general backups configuration and defaults.
$temp = new admin_settingpage('backupgeneralsettings', get_string('generalbackdefaults', 'backup'), 'moodle/backup:backupcourse');
// General configuration section.
$temp->add(new admin_setting_configselect('backup/loglifetime', get_string('loglifetime', 'backup'), get_string('configloglifetime', 'backup'), 30, array(
1 => get_string('numdays', '', 1),
2 => get_string('numdays', '', 2),
3 => get_string('numdays', '', 3),
5 => get_string('numdays', '', 5),
7 => get_string('numdays', '', 7),
10 => get_string('numdays', '', 10),
14 => get_string('numdays', '', 14),
20 => get_string('numdays', '', 20),
30 => get_string('numdays', '', 30),
60 => get_string('numdays', '', 60),
90 => get_string('numdays', '', 90),
120 => get_string('numdays', '', 120),
180 => get_string('numdays', '', 180),
365 => get_string('numdays', '', 365)
)));
// General defaults section.
$temp->add(new admin_setting_heading('generalsettings', get_string('generalsettings', 'backup'), ''));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_users', get_string('generalusers','backup'), get_string('configgeneralusers','backup'), array('value'=>1, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_anonymize', get_string('generalanonymize','backup'), get_string('configgeneralanonymize','backup'), array('value'=>0, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_role_assignments', get_string('generalroleassignments','backup'), get_string('configgeneralroleassignments','backup'), array('value'=>1, 'locked'=>0)));
@@ -106,8 +127,10 @@ if ($hassiteconfig
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_histories', get_string('generalhistories','backup'), get_string('configgeneralhistories','backup'), array('value'=>0, 'locked'=>0)));
$ADMIN->add('backups', $temp);
/// "backups" settingpage
// Create a page for automated backups configuration and defaults.
$temp = new admin_settingpage('automated', get_string('automatedsetup','backup'), 'moodle/backup:backupcourse');
// Automated configuration section.
$temp->add(new admin_setting_configselect('backup/backup_auto_active', get_string('active'), get_string('autoactivedescription', 'backup'), 0, array(
0 => get_string('autoactivedisabled', 'backup'),
1 => get_string('autoactiveenabled', 'backup'),
@@ -138,8 +161,9 @@ if ($hassiteconfig
400 => '400',
500 => '500');
$temp->add(new admin_setting_configselect('backup/backup_auto_keep', get_string('keep'), get_string('backupkeephelp'), 1, $keepoptoins));
$temp->add(new admin_setting_configcheckbox('backup/backup_shortname', get_string('backup_shortname', 'admin'), get_string('backup_shortnamehelp', 'admin'), 0));
// Automated defaults section.
$temp->add(new admin_setting_heading('automatedsettings', get_string('automatedsettings','backup'), ''));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_users', get_string('generalusers', 'backup'), get_string('configgeneralusers', 'backup'), 1));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_role_assignments', get_string('generalroleassignments','backup'), get_string('configgeneralroleassignments','backup'), 1));
+1 -1
View File
@@ -77,7 +77,7 @@ if (!during_initial_install()) { //do not use during installation
$ADMIN->add('frontpage', new admin_externalpage('frontpagebackup', get_string('frontpagebackup', 'admin'), $CFG->wwwroot.'/backup/backup.php?id='.SITEID, 'moodle/backup:backupcourse', false, $frontpagecontext));
$ADMIN->add('frontpage', new admin_externalpage('frontpagerestore', get_string('frontpagerestore', 'admin'), $CFG->wwwroot.'/files/index.php?id='.SITEID.'&amp;wdir=/backupdata', 'moodle/restore:restorecourse', false, $frontpagecontext));
$ADMIN->add('frontpage', new admin_externalpage('frontpagerestore', get_string('frontpagerestore', 'admin'), $CFG->wwwroot.'/backup/restorefile.php?contextid='.$frontpagecontext->id, 'moodle/restore:restorecourse', false, $frontpagecontext));
$questioncapabilities = array(
'moodle/question:add',
+3 -1
View File
@@ -9,6 +9,9 @@
$zone = clean_param($zone, PARAM_PATH);
}
$PAGE->set_url('/admin/timezone.php');
$PAGE->set_context(get_context_instance(CONTEXT_SYSTEM));
require_login();
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM));
@@ -18,7 +21,6 @@
$strusers = get_string("users");
$strall = get_string("all");
$PAGE->set_url('/admin/timezone.php');
$PAGE->set_title($strtimezone);
$PAGE->set_heading($strtimezone);
$PAGE->navbar->add($strtimezone);
+2 -1
View File
@@ -63,6 +63,7 @@ class external_service_form extends moodleform {
$mform->addElement('text', 'name', get_string('name'));
$mform->addRule('name', get_string('required'), 'required', null, 'client');
$mform->setType('name', PARAM_TEXT);
$mform->addElement('advcheckbox', 'enabled', get_string('enabled', 'webservice'));
$mform->addElement('advcheckbox', 'restrictedusers',
get_string('restrictedusers', 'webservice'));
@@ -107,7 +108,7 @@ class external_service_form extends moodleform {
$mform->setType('id', PARAM_INT);
if (!empty($service->id)) {
$buttonlabel = get_string('editaservice', 'webservice');
$buttonlabel = get_string('savechanges');
} else {
$buttonlabel = get_string('addaservice', 'webservice');
}
+1 -1
View File
@@ -36,7 +36,7 @@ $confirm = optional_param('confirm', 0, PARAM_BOOL);
admin_externalpage_setup('externalservicefunctions');
//define nav bar
$PAGE->set_url('/' . $CFG->admin . '/websevice/service_functions.php', array('id' => $serviceid));
$PAGE->set_url('/' . $CFG->admin . '/webservice/service_functions.php', array('id' => $serviceid));
$node = $PAGE->settingsnav->find('externalservices', navigation_node::TYPE_SETTING);
if ($node) {
$node->make_active();
+2 -2
View File
@@ -1,11 +1,11 @@
<div class="loginbox clearfix">
<div class="loginpanel">
<div>
<a href="<?php echo $CFG->wwwroot.'/login/index.php?authCAS=CAS';?>"><?php print_string('accesCAS', 'auth_cas');?></a>
<a href="<?php echo get_login_url() . '?authCAS=CAS';?>"><?php print_string('accesCAS', 'auth_cas');?></a>
</div>
<br/>
<div>
<a href="<?php echo $CFG->wwwroot.'/login/index.php?authCAS=NOCAS';?>"><?php print_string('accesNOCAS', 'auth_cas');?></a>
<a href="<?php echo get_login_url() . '?authCAS=NOCAS';?>"><?php print_string('accesNOCAS', 'auth_cas');?></a>
</div>
</div>
</div>
+8 -8
View File
@@ -30,8 +30,8 @@ $string['auth_cas_baseuri'] = 'URI of the server (nothing if no baseUri)<br />Fo
$string['auth_cas_baseuri_key'] = 'Base URI';
$string['auth_cas_broken_password'] = 'You cannot proceed without changing your password, however there is no available page for changing it. Please contact your Moodle Administrator.';
$string['auth_cas_cantconnect'] = 'LDAP part of CAS-module cannot connect to server: {$a}';
$string['auth_cas_casversion'] = 'Version';
$string['auth_cas_certificate_check'] = 'Turn this to \'yes\' if you want to validate the server certificate';
$string['auth_cas_casversion'] = 'CAS protocol version';
$string['auth_cas_certificate_check'] = 'Select \'yes\' if you want to validate the server certificate';
$string['auth_cas_certificate_path_empty'] = 'If you turn on Server validation, you need to specify a certificate path';
$string['auth_cas_certificate_check_key'] = 'Server validation';
$string['auth_cas_certificate_path'] = 'Path of the CA chain file (PEM Format) to validate the server certificate';
@@ -44,22 +44,22 @@ $string['auth_cas_hostname'] = 'Hostname of the CAS server <br />eg: host.domain
$string['auth_cas_hostname_key'] = 'Hostname';
$string['auth_cas_changepasswordurl'] = 'Password-change URL';
$string['auth_cas_invalidcaslogin'] = 'Sorry, your login has failed - you could not be authorised';
$string['auth_cas_language'] = 'Selected language';
$string['auth_cas_language'] = 'Select language for authentication pages';
$string['auth_cas_language_key'] = 'Language';
$string['auth_cas_logincas'] = 'Secure connection access';
$string['auth_cas_logoutcas'] = 'Turn this to \'yes\' if you want to logout from CAS when you disconnect from Moodle';
$string['auth_cas_logoutcas_key'] = 'Logout CAS';
$string['auth_cas_multiauth'] = 'Turn this to \'yes\' if you want to have multi-authentication (CAS + other authentication)';
$string['auth_cas_logoutcas'] = 'Select \'yes\' if you want to logout from CAS when you disconnect from Moodle';
$string['auth_cas_logoutcas_key'] = 'CAS logout option';
$string['auth_cas_multiauth'] = 'Select \'yes\' if you want to have multi-authentication (CAS + other authentication)';
$string['auth_cas_multiauth_key'] = 'Multi-authentication';
$string['auth_casnotinstalled'] = 'Cannot use CAS authentication. The PHP LDAP module is not installed.';
$string['auth_cas_port'] = 'Port of the CAS server';
$string['auth_cas_port_key'] = 'Port';
$string['auth_cas_proxycas'] = 'Turn this to \'yes\' if you use CASin proxy-mode';
$string['auth_cas_proxycas'] = 'Select \'yes\' if you use CAS in proxy-mode';
$string['auth_cas_proxycas_key'] = 'Proxy mode';
$string['auth_cas_server_settings'] = 'CAS server configuration';
$string['auth_cas_text'] = 'Secure connection';
$string['auth_cas_use_cas'] = 'Use CAS';
$string['auth_cas_version'] = 'Version of CAS';
$string['auth_cas_version'] = 'CAS protocol version to use';
$string['CASform'] = 'Authentication choice';
$string['noldapserver'] = 'No LDAP server configured for CAS! Syncing disabled.';
$string['pluginname'] = 'CAS server (SSO)';
+1 -1
View File
@@ -57,7 +57,7 @@ $string['auth_dbsybasequoting'] = 'Use sybase quotes';
$string['auth_dbsybasequotinghelp'] = 'Sybase style single quote escaping - needed for Oracle, MS SQL and some other databases. Do not use for MySQL!';
$string['auth_dbtable'] = 'Name of the table in the database';
$string['auth_dbtable_key'] = 'Table';
$string['auth_dbtype'] = 'The database type (See the <a href="../lib/adodb/readme.htm#drivers">ADOdb documentation</a> for details)';
$string['auth_dbtype'] = 'The database type (See the <a href="http://phplens.com/adodb/supported.databases.html" target="_blank">ADOdb documentation</a> for details)';
$string['auth_dbtype_key'] = 'Database';
$string['auth_dbupdatinguser'] = 'Updating user {$a->name} id {$a->id}';
$string['auth_dbuser'] = 'Username with read access to the database';
+3 -2
View File
@@ -33,8 +33,9 @@ $PAGE->set_title("$site->fullname: $loginsite");
$PAGE->set_heading($site->fullname);
echo $OUTPUT->header();
// $PAGE->https_required() up above takes care of what $CFG->httpswwwroot should be.
$msg = '<p>'.get_string('ntlmsso_attempting', 'auth_ldap').'</p>'
. '<img width="1", height="1" '
. ' src="' . $CFG->wwwroot . '/auth/ldap/ntlmsso_magic.php?sesskey='
. ' src="' . $CFG->httpswwwroot . '/auth/ldap/ntlmsso_magic.php?sesskey='
. $sesskey . '" />';
redirect($CFG->wwwroot . '/auth/ldap/ntlmsso_finish.php', $msg, 3);
redirect($CFG->httpswwwroot . '/auth/ldap/ntlmsso_finish.php', $msg, 3);
+2 -1
View File
@@ -29,7 +29,8 @@ $file = $CFG->dirroot.'/pix/spacer.gif';
if ($authplugin->ntlmsso_magic($sesskey) && file_exists($file)) {
if (!empty($authplugin->config->ntlmsso_ie_fastpath)) {
if (check_browser_version('MSIE')) {
redirect($CFG->wwwroot.'/auth/ldap/ntlmsso_finish.php');
// $PAGE->https_required() up above takes care of what $CFG->httpswwwroot should be.
redirect($CFG->httpswwwroot.'/auth/ldap/ntlmsso_finish.php');
}
}
+4 -4
View File
@@ -44,17 +44,17 @@ $PAGE->https_required();
// Redirect to SessionInitiator with entityID as argument
if (isset($IdPs[$selectedIdP][1]) && !empty($IdPs[$selectedIdP][1])) {
// For Shibbolet 1.x Service Providers
header('Location: '.$IdPs[$selectedIdP][1].'?providerId='. urlencode($selectedIdP) .'&target='. urlencode($CFG->wwwroot.'/auth/shibboleth/index.php'));
header('Location: '.$IdPs[$selectedIdP][1].'?providerId='. urlencode($selectedIdP) .'&target='. urlencode($CFG->httpswwwroot.'/auth/shibboleth/index.php'));
// For Shibbolet 2.x Service Providers
// header('Location: '.$IdPs[$selectedIdP][1].'?entityID='. urlencode($selectedIdP) .'&target='. urlencode($CFG->wwwroot.'/auth/shibboleth/index.php'));
// header('Location: '.$IdPs[$selectedIdP][1].'?entityID='. urlencode($selectedIdP) .'&target='. urlencode($CFG->httpswwwroot.'/auth/shibboleth/index.php'));
} else {
// For Shibbolet 1.x Service Providers
header('Location: /Shibboleth.sso?providerId='. urlencode($selectedIdP) .'&target='. urlencode($CFG->wwwroot.'/auth/shibboleth/index.php'));
header('Location: /Shibboleth.sso?providerId='. urlencode($selectedIdP) .'&target='. urlencode($CFG->httpswwwroot.'/auth/shibboleth/index.php'));
// For Shibboleth 2.x Service Providers
// header('Location: /Shibboleth.sso/DS?entityID='. urlencode($selectedIdP) .'&target='. urlencode($CFG->wwwroot.'/auth/shibboleth/index.php'));
// header('Location: /Shibboleth.sso/DS?entityID='. urlencode($selectedIdP) .'&target='. urlencode($CFG->httpswwwroot.'/auth/shibboleth/index.php'));
}
} elseif (isset($_POST['idp']) && !isset($IdPs[$_POST['idp']])) {
$errormsg = get_string('auth_shibboleth_errormsg', 'auth_shibboleth');
+1 -1
View File
@@ -62,7 +62,7 @@ switch ($type) {
case backup::TYPE_1SECTION :
$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
require_capability('moodle/backup:backupsection', $coursecontext);
if (!empty($section->name)) {
if ((string)$section->name !== '') {
$sectionname = format_string($section->name, true, array('context' => $coursecontext));
$heading = get_string('backupsection', 'backup', $sectionname);
$PAGE->navbar->add($sectionname);
+21 -8
View File
@@ -170,17 +170,22 @@ class backup_controller extends backup implements loggable {
}
public function set_status($status) {
$this->log('setting controller status to', backup::LOG_DEBUG, $status);
// TODO: Check it's a correct status
$this->status = $status;
// Ensure that, once set to backup::STATUS_AWAITING, controller is stored in DB
// Note: never save_controller() after STATUS_EXECUTING or the whole controller,
// Note: never save_controller() with the object info after STATUS_EXECUTING or the whole controller,
// containing all the steps will be sent to DB. 100% (monster) useless.
$this->log('setting controller status to', backup::LOG_DEBUG, $status);
// TODO: Check it's a correct status.
$this->status = $status;
// Ensure that, once set to backup::STATUS_AWAITING, controller is stored in DB.
if ($status == backup::STATUS_AWAITING) {
$this->save_controller();
$tbc = self::load_controller($this->backupid);
$this->logger = $tbc->logger; // wakeup loggers
$tbc->destroy(); // Clean temp controller structures
} else if ($status == backup::STATUS_FINISHED_OK) {
// If the operation has ended without error (backup::STATUS_FINISHED_OK)
// proceed by cleaning the object from database. MDL-29262.
$this->save_controller(false, true);
}
}
@@ -312,12 +317,20 @@ class backup_controller extends backup implements loggable {
backup_helper::log($message, $level, $a, $depth, $display, $this->logger);
}
public function save_controller() {
/**
* Save controller information
*
* @param bool $includeobj to decide if the object itself must be updated (true) or no (false)
* @param bool $cleanobj to decide if the object itself must be cleaned (true) or no (false)
*/
public function save_controller($includeobj = true, $cleanobj = false) {
// Going to save controller to persistent storage, calculate checksum for later checks and save it
// TODO: flag the controller as NA. Any operation on it should be forbidden util loaded back
$this->log('saving controller to db', backup::LOG_DEBUG);
$this->checksum = $this->calculate_checksum();
backup_controller_dbops::save_controller($this, $this->checksum);
if ($includeobj ) { // Only calculate checksum if we are going to include the object.
$this->checksum = $this->calculate_checksum();
}
backup_controller_dbops::save_controller($this, $this->checksum, $includeobj, $cleanobj);
}
public static function load_controller($backupid) {
+21 -8
View File
@@ -166,17 +166,22 @@ class restore_controller extends backup implements loggable {
}
public function set_status($status) {
$this->log('setting controller status to', backup::LOG_DEBUG, $status);
// TODO: Check it's a correct status
$this->status = $status;
// Ensure that, once set to backup::STATUS_AWAITING | STATUS_NEED_PRECHECK, controller is stored in DB
// Note: never save_controller() after STATUS_EXECUTING or the whole controller,
// Note: never save_controller() with the object info after STATUS_EXECUTING or the whole controller,
// containing all the steps will be sent to DB. 100% (monster) useless.
$this->log('setting controller status to', backup::LOG_DEBUG, $status);
// TODO: Check it's a correct status.
$this->status = $status;
// Ensure that, once set to backup::STATUS_AWAITING | STATUS_NEED_PRECHECK, controller is stored in DB.
if ($status == backup::STATUS_AWAITING || $status == backup::STATUS_NEED_PRECHECK) {
$this->save_controller();
$tbc = self::load_controller($this->restoreid);
$this->logger = $tbc->logger; // wakeup loggers
$tbc->destroy(); // Clean temp controller structures
} else if ($status == backup::STATUS_FINISHED_OK) {
// If the operation has ended without error (backup::STATUS_FINISHED_OK)
// proceed by cleaning the object from database. MDL-29262.
$this->save_controller(false, true);
}
}
@@ -363,12 +368,20 @@ class restore_controller extends backup implements loggable {
backup_helper::log($message, $level, $a, $depth, $display, $this->logger);
}
public function save_controller() {
/**
* Save controller information
*
* @param bool $includeobj to decide if the object itself must be updated (true) or no (false)
* @param bool $cleanobj to decide if the object itself must be cleaned (true) or no (false)
*/
public function save_controller($includeobj = true, $cleanobj = false) {
// Going to save controller to persistent storage, calculate checksum for later checks and save it
// TODO: flag the controller as NA. Any operation on it should be forbidden util loaded back
$this->log('saving controller to db', backup::LOG_DEBUG);
$this->checksum = $this->calculate_checksum();
restore_controller_dbops::save_controller($this, $this->checksum);
if ($includeobj ) { // Only calculate checksum if we are going to include the object.
$this->checksum = $this->calculate_checksum();
}
restore_controller_dbops::save_controller($this, $this->checksum, $includeobj, $cleanobj);
}
public static function load_controller($restoreid) {
@@ -161,7 +161,7 @@ class backup_controller_test extends UnitTestCase {
*/
class mock_backup_controller extends backup_controller {
public function save_controller() {
parent::save_controller();
public function save_controller($includeobj = true, $cleanobj = false) {
parent::save_controller($includeobj, $cleanobj);
}
}
+8 -1
View File
@@ -640,7 +640,10 @@ class moodle1_converter extends base_converter {
return $files;
}
foreach ($matches[2] as $match) {
$files[] = str_replace(array('$@FILEPHP@$', '$@SLASH@$', '$@FORCEDOWNLOAD@$'), array('', '/', ''), $match);
$file = str_replace(array('$@FILEPHP@$', '$@SLASH@$', '$@FORCEDOWNLOAD@$'), array('', '/', ''), $match);
if ($file === clean_param($file, PARAM_PATH)) {
$files[] = rawurldecode($file);
}
}
return array_unique($files);
@@ -1205,6 +1208,10 @@ class moodle1_file_manager implements loggable {
$sourcefullpath = $this->basepath.'/'.$sourcepath;
if ($sourcefullpath !== clean_param($sourcefullpath, PARAM_PATH)) {
throw new moodle1_convert_exception('file_invalid_path', $sourcefullpath);
}
if (!is_readable($sourcefullpath)) {
throw new moodle1_convert_exception('file_not_readable', $sourcefullpath);
}
@@ -260,6 +260,15 @@ class moodle1_converter_test extends UnitTestCase {
$fileids = $fileman->get_fileids();
$this->assertIsA($fileids, 'array');
$this->assertEqual(0, count($fileids));
// try to migrate an invalid file
$fileman->itemid = 1;
$thrown = false;
try {
$fileman->migrate_file('/../../../../../../../../../../../../../../etc/passwd');
} catch (moodle1_convert_exception $e) {
$thrown = true;
}
$this->assertTrue($thrown);
// migrate a single file
$fileman->itemid = 4;
$fileman->migrate_file('moddata/unittest/4/icon.gif');
@@ -421,6 +430,8 @@ class moodle1_converter_test extends UnitTestCase {
$text = 'This is a text containing links to file.php
as it is parsed from the backup file. <br /><br /><img border="0" width="110" vspace="0" hspace="0" height="92" title="News" alt="News" src="$@FILEPHP@$$@SLASH@$pics$@SLASH@$news.gif" /><a href="$@FILEPHP@$$@SLASH@$pics$@SLASH@$news.gif$@FORCEDOWNLOAD@$">download image</a><br />
<div><a href=\'$@FILEPHP@$/../../../../../../../../../../../../../../../etc/passwd\'>download passwords</a></div>
<div><a href=\'$@FILEPHP@$$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$etc$@SLASH@$shadow\'>download shadows</a></div>
<br /><a href=\'$@FILEPHP@$$@SLASH@$MANUAL.DOC$@FORCEDOWNLOAD@$\'>download manual</a><br />';
$files = moodle1_converter::find_referenced_files($text);
@@ -432,6 +443,8 @@ as it is parsed from the backup file. <br /><br /><img border="0" width="110" vs
$text = moodle1_converter::rewrite_filephp_usage($text, array('/pics/news.gif', '/another/file/notused.txt'), $files);
$this->assertEqual($text, 'This is a text containing links to file.php
as it is parsed from the backup file. <br /><br /><img border="0" width="110" vspace="0" hspace="0" height="92" title="News" alt="News" src="@@PLUGINFILE@@/pics/news.gif" /><a href="@@PLUGINFILE@@/pics/news.gif?forcedownload=1">download image</a><br />
<div><a href=\'$@FILEPHP@$/../../../../../../../../../../../../../../../etc/passwd\'>download passwords</a></div>
<div><a href=\'$@FILEPHP@$$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$..$@SLASH@$etc$@SLASH@$shadow\'>download shadows</a></div>
<br /><a href=\'$@FILEPHP@$$@SLASH@$MANUAL.DOC$@FORCEDOWNLOAD@$\'>download manual</a><br />');
}
@@ -142,6 +142,11 @@ abstract class backup_activity_task extends backup_task {
$this->add_step(new backup_activity_logs_structure_step('activity_logs', 'logs.xml'));
}
// Generate the calendar events file (conditionally)
if ($this->get_setting_value('calendarevents')) {
$this->add_step(new backup_calendarevents_structure_step('activity_calendar', 'calendar.xml'));
}
// Fetch all the activity grade items and put them to backup_ids
$this->add_step(new backup_activity_grade_items_to_ids('fetch_activity_grade_items'));
@@ -103,6 +103,11 @@ class backup_course_task extends backup_task {
$this->add_step(new backup_comments_structure_step('course_comments', 'comments.xml'));
}
// Generate the calender events file (conditionally)
if ($this->get_setting_value('calendarevents')) {
$this->add_step(new backup_calendarevents_structure_step('course_calendar', 'calendar.xml'));
}
// Generate the logs file (conditionally)
if ($this->get_setting_value('logs')) {
$this->add_step(new backup_course_logs_structure_step('course_logs', 'logs.xml'));
@@ -90,6 +90,12 @@ class backup_root_task extends backup_task {
$this->add_setting($comments);
$users->add_dependency($comments);
// Define calendar events (dependent of users)
$events = new backup_calendarevents_setting('calendarevents', base_setting::IS_BOOLEAN, true);
$events->set_ui(new backup_setting_ui_checkbox($events, get_string('rootsettingcalendarevents', 'backup')));
$this->add_setting($events);
$users->add_dependency($events);
// Define completion (dependent of users)
$completion = new backup_userscompletion_setting('userscompletion', base_setting::IS_BOOLEAN, true);
$completion->set_ui(new backup_setting_ui_checkbox($completion, get_string('rootsettinguserscompletion', 'backup')));
+7
View File
@@ -89,6 +89,13 @@ class backup_logs_setting extends backup_anonymize_setting {}
*/
class backup_comments_setting extends backup_anonymize_setting {}
/**
* root setting to control if backup will include
* calender events or no (any level), depends of @backup_users_setting
* exactly in the same way than @backup_anonymize_setting so we extend from it
*/
class backup_calendarevents_setting extends backup_anonymize_setting {}
/**
* root setting to control if backup will include
* users completion data or no (any level), depends of @backup_users_setting
+42
View File
@@ -763,6 +763,48 @@ class backup_comments_structure_step extends backup_structure_step {
}
}
/**
* structure step in charge of constructing the calender.xml file for all the events found
* in a given context
*/
class backup_calendarevents_structure_step extends backup_structure_step {
protected function define_structure() {
// Define each element separated
$events = new backup_nested_element('events');
$event = new backup_nested_element('event', array('id'), array(
'name', 'description', 'format', 'courseid', 'groupid', 'userid',
'repeatid', 'modulename', 'instance', 'eventtype', 'timestart',
'timeduration', 'visible', 'uuid', 'sequence', 'timemodified'));
// Build the tree
$events->add_child($event);
// Define sources
if ($this->name == 'course_calendar') {
$calendar_items_sql ="SELECT * FROM {event}
WHERE courseid = :courseid
AND (eventtype = 'course' OR eventtype = 'group')";
$calendar_items_params = array('courseid'=>backup::VAR_COURSEID);
$event->set_source_sql($calendar_items_sql, $calendar_items_params);
} else {
$event->set_source_table('event', array('courseid' => backup::VAR_COURSEID, 'instance' => backup::VAR_ACTIVITYID, 'modulename' => backup::VAR_MODNAME));
}
// Define id annotations
$event->annotate_ids('user', 'userid');
$event->annotate_ids('group', 'groupid');
$event->annotate_files('calendar', 'event_description', 'id');
// Return the root element (events)
return $events;
}
}
/**
* structure step in charge of constructing the gradebook.xml file for all the gradebook config in the course
* NOTE: the backup of the grade items themselves is handled by backup_activity_grades_structure_step
@@ -147,6 +147,11 @@ abstract class restore_activity_task extends restore_task {
$this->add_step(new restore_comments_structure_step('activity_comments', 'comments.xml'));
}
// Calendar events (conditionally)
if ($this->get_setting_value('calendarevents')) {
$this->add_step(new restore_calendarevents_structure_step('activity_calendar', 'calendar.xml'));
}
// Grades (module-related, rest of gradebook is restored later if possible: cats, calculations...)
$this->add_step(new restore_activity_grades_structure_step('activity_grades', 'grades.xml'));
@@ -84,6 +84,11 @@ class restore_course_task extends restore_task {
$this->add_step(new restore_comments_structure_step('course_comments', 'comments.xml'));
}
// Calendar events (conditionally)
if ($this->get_setting_value('calendarevents')) {
$this->add_step(new restore_calendarevents_structure_step('course_calendar', 'calendar.xml'));
}
// At the end, mark it as built
$this->built = true;
}
+5 -2
View File
@@ -55,8 +55,11 @@ class restore_final_task extends restore_task {
$this->add_step(new restore_gradebook_structure_step('gradebook_step','gradebook.xml'));
}
// Course completion
$this->add_step(new restore_course_completion_structure_step('course_completion', 'completion.xml'));
// Course completion, executed conditionally if restoring to new course
if ($this->get_target() !== backup::TARGET_CURRENT_ADDING &&
$this->get_target() !== backup::TARGET_EXISTING_ADDING) {
$this->add_step(new restore_course_completion_structure_step('course_completion', 'completion.xml'));
}
// Review all the module_availability records in backup_ids in order
// to match them with existing modules / grade items.
@@ -166,6 +166,19 @@ class restore_root_task extends restore_task {
$this->add_setting($comments);
$users->add_dependency($comments);
// Define Calendar events (dependent of users)
$defaultvalue = false; // Safer default
$changeable = false;
if (isset($rootsettings['calendarevents']) && $rootsettings['calendarevents']) { // Only enabled when available
$defaultvalue = true;
$changeable = true;
}
$events = new restore_calendarevents_setting('calendarevents', base_setting::IS_BOOLEAN, $defaultvalue);
$events->set_ui(new backup_setting_ui_checkbox($events, get_string('rootsettingcalendarevents', 'backup')));
$events->get_ui()->set_changeable($changeable);
$this->add_setting($events);
$users->add_dependency($events);
// Define completion (dependent of users)
$defaultvalue = false; // Safer default
$changeable = false;
+7
View File
@@ -58,6 +58,13 @@ class restore_activities_setting extends restore_generic_setting {}
*/
class restore_comments_setting extends restore_role_assignments_setting {}
/**
* root setting to control if restore will create
* events or no, depends of @restore_users_setting
* exactly in the same way than @restore_role_assignments_setting so we extend from it
*/
class restore_calendarevents_setting extends restore_role_assignments_setting {}
/**
* root setting to control if restore will create
* completion info or no, depends of @restore_users_setting
+101 -21
View File
@@ -206,21 +206,25 @@ class restore_gradebook_structure_step extends restore_structure_step {
global $DB;
$data = (object)$data;
$oldid = $data->id;
$olduserid = $data->userid;
$data->itemid = $this->get_new_parentid('grade_item');
$data->userid = $this->get_mappingid('user', $data->userid, NULL);
$data->usermodified = $this->get_mappingid('user', $data->usermodified, NULL);
$data->locktime = $this->apply_date_offset($data->locktime);
// TODO: Ask, all the rest of locktime/exported... work with time... to be rolled?
$data->overridden = $this->apply_date_offset($data->overridden);
$data->timecreated = $this->apply_date_offset($data->timecreated);
$data->timemodified = $this->apply_date_offset($data->timemodified);
$data->userid = $this->get_mappingid('user', $data->userid, null);
if (!empty($data->userid)) {
$data->usermodified = $this->get_mappingid('user', $data->usermodified, null);
$data->locktime = $this->apply_date_offset($data->locktime);
// TODO: Ask, all the rest of locktime/exported... work with time... to be rolled?
$data->overridden = $this->apply_date_offset($data->overridden);
$data->timecreated = $this->apply_date_offset($data->timecreated);
$data->timemodified = $this->apply_date_offset($data->timemodified);
$newitemid = $DB->insert_record('grade_grades', $data);
//$this->set_mapping('grade_grade', $oldid, $newitemid);
$newitemid = $DB->insert_record('grade_grades', $data);
} else {
debugging("Mapped user id not found for user id '{$olduserid}', grade item id '{$data->itemid}'");
}
}
protected function process_grade_category($data) {
global $DB;
@@ -1023,7 +1027,7 @@ class restore_section_structure_step extends restore_structure_step {
// Section exists, update non-empty information
} else {
$section->id = $secrec->id;
if (empty($secrec->name)) {
if ((string)$secrec->name === '') {
$section->name = $data->name;
}
if (empty($secrec->summary)) {
@@ -1512,6 +1516,76 @@ class restore_comments_structure_step extends restore_structure_step {
}
}
/**
* This structure steps restores the calendar events
*/
class restore_calendarevents_structure_step extends restore_structure_step {
protected function define_structure() {
$paths = array();
$paths[] = new restore_path_element('calendarevents', '/events/event');
return $paths;
}
public function process_calendarevents($data) {
global $DB;
$data = (object)$data;
$oldid = $data->id;
$restorefiles = true; // We'll restore the files
// Find the userid and the groupid associated with the event. Return if not found.
$data->userid = $this->get_mappingid('user', $data->userid);
if ($data->userid === false) {
return;
}
if (!empty($data->groupid)) {
$data->groupid = $this->get_mappingid('group', $data->groupid);
if ($data->groupid === false) {
return;
}
}
$params = array(
'name' => $data->name,
'description' => $data->description,
'format' => $data->format,
'courseid' => $this->get_courseid(),
'groupid' => $data->groupid,
'userid' => $data->userid,
'repeatid' => $data->repeatid,
'modulename' => $data->modulename,
'eventtype' => $data->eventtype,
'timestart' => $this->apply_date_offset($data->timestart),
'timeduration' => $data->timeduration,
'visible' => $data->visible,
'uuid' => $data->uuid,
'sequence' => $data->sequence,
'timemodified' => $this->apply_date_offset($data->timemodified));
if ($this->name == 'activity_calendar') {
$params['instance'] = $this->task->get_activityid();
} else {
$params['instance'] = 0;
}
$sql = 'SELECT id FROM {event} WHERE name = ? AND courseid = ? AND
repeatid = ? AND modulename = ? AND timestart = ? AND timeduration =?
AND ' . $DB->sql_compare_text('description', 255) . ' = ' . $DB->sql_compare_text('?', 255);
$arg = array ($params['name'], $params['courseid'], $params['repeatid'], $params['modulename'], $params['timestart'], $params['timeduration'], $params['description']);
$result = $DB->record_exists_sql($sql, $arg);
if (empty($result)) {
$newitemid = $DB->insert_record('event', $params);
$this->set_mapping('event_description', $oldid, $newitemid, $restorefiles);
}
}
protected function after_execute() {
// Add related files
$this->add_related_files('calendar', 'event_description', 'event_description');
}
}
class restore_course_completion_structure_step extends restore_structure_step {
/**
@@ -1970,18 +2044,24 @@ class restore_activity_grades_structure_step extends restore_structure_step {
protected function process_grade_grade($data) {
$data = (object)($data);
$olduserid = $data->userid;
unset($data->id);
$data->itemid = $this->get_new_parentid('grade_item');
$data->userid = $this->get_mappingid('user', $data->userid);
$data->usermodified = $this->get_mappingid('user', $data->usermodified);
$data->rawscaleid = $this->get_mappingid('scale', $data->rawscaleid);
// TODO: Ask, all the rest of locktime/exported... work with time... to be rolled?
$data->overridden = $this->apply_date_offset($data->overridden);
$grade = new grade_grade($data, false);
$grade->insert('restore');
// no need to save any grade_grade mapping
$data->itemid = $this->get_new_parentid('grade_item');
$data->userid = $this->get_mappingid('user', $data->userid, null);
if (!empty($data->userid)) {
$data->usermodified = $this->get_mappingid('user', $data->usermodified, null);
$data->rawscaleid = $this->get_mappingid('scale', $data->rawscaleid);
// TODO: Ask, all the rest of locktime/exported... work with time... to be rolled?
$data->overridden = $this->apply_date_offset($data->overridden);
$grade = new grade_grade($data, false);
$grade->insert('restore');
// no need to save any grade_grade mapping
} else {
debugging("Mapped user id not found for user id '{$olduserid}', grade item id '{$data->itemid}'");
}
}
/**
+13 -6
View File
@@ -168,9 +168,9 @@ abstract class backup_check {
$hasusercap = has_capability('moodle/backup:userinfo', $coursectx, $userid);
// If setting is enabled but user lacks permission
if (!$hasusercap && $prevvalue) { // If user has not the capability and setting is enabled
if (!$hasusercap) { // If user has not the capability
// Now analyse if we are allowed to apply changes or must stop with exception
if (!$apply) { // Cannot apply changes, throw exception
if (!$apply && $prevvalue) { // Cannot apply changes and the value is set, throw exception
$a = new stdclass();
$a->setting = 'users';
$a->value = $prevvalue;
@@ -178,7 +178,12 @@ abstract class backup_check {
throw new backup_controller_exception('backup_setting_value_wrong_for_capability', $a);
} else { // Can apply changes
$userssetting->set_value(false); // Set the value to false
// If it is already false, we don't want to try and set it again, because if it is
// already locked, and exception will occur. The side benifit is if it is true and locked
// we will get an exception...
if ($prevvalue) {
$userssetting->set_value(false); // Set the value to false
}
$userssetting->set_status(base_setting::LOCKED_BY_PERMISSION);// Set the status to locked by perm
}
}
@@ -191,9 +196,9 @@ abstract class backup_check {
$hasanoncap = has_capability('moodle/backup:anonymise', $coursectx, $userid);
// If setting is enabled but user lacks permission
if (!$hasanoncap && $prevvalue) { // If user has not the capability and setting is enabled
if (!$hasanoncap) { // If user has not the capability
// Now analyse if we are allowed to apply changes or must stop with exception
if (!$apply) { // Cannot apply changes, throw exception
if (!$apply && $prevvalue) { // Cannot apply changes and the value is set, throw exception
$a = new stdclass();
$a->setting = 'anonymize';
$a->value = $prevvalue;
@@ -201,7 +206,9 @@ abstract class backup_check {
throw new backup_controller_exception('backup_setting_value_wrong_for_capability', $a);
} else { // Can apply changes
$anonsetting->set_value(false); // Set the value to false
if ($prevvalue) { // If we try and set it back to false and it has already been locked, error will occur
$anonsetting->set_value(false); // Set the value to false
}
$anonsetting->set_status(base_setting::LOCKED_BY_PERMISSION);// Set the status to locked by perm
}
}
@@ -32,16 +32,30 @@
*/
abstract class backup_controller_dbops extends backup_dbops {
public static function save_controller($controller, $checksum) {
/**
* Send one backup controller to DB
*
* @param backup_controller $controller controller to send to DB
* @param string $checksum hash of the controller to be checked
* @param bool $includeobj to decide if the object itself must be updated (true) or no (false)
* @param bool $cleanobj to decide if the object itself must be cleaned (true) or no (false)
* @return int id of the controller record in the DB
* @throws backup_controller_exception|backup_dbops_exception
*/
public static function save_controller($controller, $checksum, $includeobj = true, $cleanobj = false) {
global $DB;
// Check we are going to save one backup_controller
if (! $controller instanceof backup_controller) {
throw new backup_controller_exception('backup_controller_expected');
}
// Check checksum is ok. Sounds silly but it isn't ;-)
if (!$controller->is_checksum_correct($checksum)) {
// Check checksum is ok. Only if we are including object info. Sounds silly but it isn't ;-).
if ($includeobj and !$controller->is_checksum_correct($checksum)) {
throw new backup_dbops_exception('backup_controller_dbops_saving_checksum_mismatch');
}
// Cannot request to $includeobj and $cleanobj at the same time.
if ($includeobj and $cleanobj) {
throw new backup_dbops_exception('backup_controller_dbops_saving_cannot_include_and_delete');
}
// Get all the columns
$rec = new stdclass();
$rec->backupid = $controller->get_backupid();
@@ -57,7 +71,11 @@ abstract class backup_controller_dbops extends backup_dbops {
$rec->executiontime= $controller->get_executiontime();
$rec->checksum = $checksum;
// Serialize information
$rec->controller = base64_encode(serialize($controller));
if ($includeobj) {
$rec->controller = base64_encode(serialize($controller));
} else if ($cleanobj) {
$rec->controller = '';
}
// Send it to DB
if ($recexists = $DB->get_record('backup_controllers', array('backupid' => $rec->backupid))) {
$rec->id = $recexists->id;
@@ -32,16 +32,30 @@
*/
abstract class restore_controller_dbops extends restore_dbops {
public static function save_controller($controller, $checksum) {
/**
* Send one restore controller to DB
*
* @param restore_controller $controller controller to send to DB
* @param string $checksum hash of the controller to be checked
* @param bool $includeobj to decide if the object itself must be updated (true) or no (false)
* @param bool $cleanobj to decide if the object itself must be cleaned (true) or no (false)
* @return int id of the controller record in the DB
* @throws backup_controller_exception|restore_dbops_exception
*/
public static function save_controller($controller, $checksum, $includeobj = true, $cleanobj = false) {
global $DB;
// Check we are going to save one backup_controller
if (! $controller instanceof restore_controller) {
throw new backup_controller_exception('restore_controller_expected');
}
// Check checksum is ok. Sounds silly but it isn't ;-)
if (!$controller->is_checksum_correct($checksum)) {
// Check checksum is ok. Only if we are including object info. Sounds silly but it isn't ;-).
if ($includeobj and !$controller->is_checksum_correct($checksum)) {
throw new restore_dbops_exception('restore_controller_dbops_saving_checksum_mismatch');
}
// Cannot request to $includeobj and $cleanobj at the same time.
if ($includeobj and $cleanobj) {
throw new restore_dbops_exception('restore_controller_dbops_saving_cannot_include_and_delete');
}
// Get all the columns
$rec = new stdclass();
$rec->backupid = $controller->get_restoreid();
@@ -57,7 +71,11 @@ abstract class restore_controller_dbops extends restore_dbops {
$rec->executiontime= $controller->get_executiontime();
$rec->checksum = $checksum;
// Serialize information
$rec->controller = base64_encode(serialize($controller));
if ($includeobj) {
$rec->controller = base64_encode(serialize($controller));
} else if ($cleanobj) {
$rec->controller = '';
}
// Send it to DB
if ($recexists = $DB->get_record('backup_controllers', array('backupid' => $rec->backupid))) {
$rec->id = $recexists->id;
@@ -139,7 +139,7 @@ abstract class backup_factory {
throw new backup_task_exception('section_task_section_not_found', $sectionid);
}
return new backup_section_task(empty($section->name) ? $section->section : $section->name, $sectionid);
return new backup_section_task((string)$section->name === '' ? $section->section : $section->name, $sectionid);
}
/**
+26 -17
View File
@@ -281,23 +281,25 @@ abstract class backup_cron_automated_helper {
$midnight = usergetmidnight($now, $timezone);
$date = usergetdate($now, $timezone);
//Get number of days (from today) to execute backups
$automateddays = substr($config->backup_auto_weekdays,$date['wday']) . $config->backup_auto_weekdays;
$daysfromtoday = strpos($automateddays, "1");
// Get number of days (from today) to execute backups
$automateddays = substr($config->backup_auto_weekdays, $date['wday']) . $config->backup_auto_weekdays;
$daysfromtoday = strpos($automateddays, "1", 1);
// If we can't find the next day, we set it to tomorrow
if (empty($daysfromtoday)) {
$daysfromtoday = 1;
}
//If some day has been found
// If some day has been found
if ($daysfromtoday !== false) {
//Calculate distance
$dist = ($daysfromtoday * 86400) + //Days distance
($config->backup_auto_hour * 3600) + //Hours distance
($config->backup_auto_minute * 60); //Minutes distance
// Calculate distance
$dist = ($daysfromtoday * 86400) + // Days distance
($config->backup_auto_hour * 3600) + // Hours distance
($config->backup_auto_minute * 60); // Minutes distance
$result = $midnight + $dist;
}
//If that time is past, call the function recursively to obtain the next valid day
// If that time is past, call the function recursively to obtain the next valid day
if ($result > 0 && $result < time()) {
$result = self::calculate_next_automated_backup($timezone, $result);
}
@@ -315,6 +317,7 @@ abstract class backup_cron_automated_helper {
*/
public static function launch_automated_backup($course, $starttime, $userid) {
$outcome = true;
$config = get_config('backup');
$bc = new backup_controller(backup::TYPE_1COURSE, $course->id, backup::FORMAT_MOODLE, backup::INTERACTIVE_NO, backup::MODE_AUTOMATED, $userid);
@@ -347,32 +350,33 @@ abstract class backup_cron_automated_helper {
$bc->set_status(backup::STATUS_AWAITING);
$outcome = $bc->execute_plan();
$bc->execute_plan();
$results = $bc->get_results();
$file = $results['backup_destination'];
$file = $results['backup_destination']; // may be empty if file already moved to target location
$dir = $config->backup_auto_destination;
$storage = (int)$config->backup_auto_storage;
if (!file_exists($dir) || !is_dir($dir) || !is_writable($dir)) {
$dir = null;
}
if (!empty($dir) && $storage !== 0) {
$filename = backup_plan_dbops::get_default_backup_filename($format, $type, $course->id, $users, $anonymised, true);
if ($file && !empty($dir) && $storage !== 0) {
$filename = backup_plan_dbops::get_default_backup_filename($format, $type, $course->id, $users, $anonymised, !$config->backup_shortname);
$outcome = $file->copy_content_to($dir.'/'.$filename);
if ($outcome && $storage === 1) {
$file->delete();
}
}
$outcome = true;
} catch (backup_exception $e) {
$bc->log('backup_auto_failed_on_course', backup::LOG_WARNING, $course->shortname);
} catch (moodle_exception $e) {
$bc->log('backup_auto_failed_on_course', backup::LOG_ERROR, $course->shortname); // Log error header.
$bc->log('Exception: ' . $e->errorcode, backup::LOG_ERROR, $e->a, 1); // Log original exception problem.
$bc->log('Debug: ' . $e->debuginfo, backup::LOG_DEBUG, null, 1); // Log original debug information.
$outcome = false;
}
$bc->destroy();
unset($bc);
return true;
return $outcome;
}
/**
@@ -459,6 +463,11 @@ abstract class backup_cron_automated_helper {
$storage = $config->backup_auto_storage;
$dir = $config->backup_auto_destination;
if ($keep == 0) {
// means keep all backup files
return true;
}
$backupword = str_replace(' ', '_', moodle_strtolower(get_string('backupfilename')));
$backupword = trim(clean_filename($backupword), '_');
+39 -2
View File
@@ -176,8 +176,17 @@ abstract class backup_helper {
/**
* Given one backupid and the (FS) final generated file, perform its final storage
* into Moodle file storage. For stored files it returns the complete file_info object
*
* Note: the $filepath is deleted if the backup file is created successfully
*
* @param int $backupid
* @param string $filepath zip file containing the backup
* @return stored_file if created, null otherwise
*
* @throws moodle_exception in case of any problems
*/
static public function store_backup_file($backupid, $filepath) {
global $CFG;
// First of all, get some information from the backup_controller to help us decide
list($dinfo, $cinfo, $sinfo) = backup_controller_dbops::get_moodle_backup_information($backupid);
@@ -191,6 +200,7 @@ abstract class backup_helper {
$userid = $dinfo[0]->userid; // User->id executing the backup
$id = $dinfo[0]->id; // Id of activity/section/course (depends of type)
$courseid = $dinfo[0]->courseid; // Id of the course
$format = $dinfo[0]->format; // Type of backup file
// Quick hack. If for any reason, filename is blank, fix it here.
// TODO: This hack will be out once MDL-22142 - P26 gets fixed
@@ -200,7 +210,13 @@ abstract class backup_helper {
// Backups of type IMPORT aren't stored ever
if ($backupmode == backup::MODE_IMPORT) {
return false;
return null;
}
if (!is_readable($filepath)) {
// we have a problem if zip file does not exist
throw new coding_exception('backup_helper::store_backup_file() expects valid $filepath parameter');
}
// Calculate file storage options of id being backup
@@ -232,6 +248,25 @@ abstract class backup_helper {
if ($backupmode == backup::MODE_AUTOMATED) {
// Automated backups have there own special area!
$filearea = 'automated';
// If we're keeping the backup only in a chosen path, just move it there now
// this saves copying from filepool to here later and filling trashdir.
$config = get_config('backup');
$dir = $config->backup_auto_destination;
if ($config->backup_auto_storage == 1 and $dir and is_dir($dir) and is_writable($dir)) {
$filedest = $dir.'/'.backup_plan_dbops::get_default_backup_filename($format, $backuptype, $courseid, $hasusers, $isannon, !$config->backup_shortname);
// first try to move the file, if it is not possible copy and delete instead
if (@rename($filepath, $filedest)) {
return null;
}
umask(0000);
if (copy($filepath, $filedest)) {
@chmod($filedest, $CFG->filepermissions); // may fail because the permissions may not make sense outside of dataroot
unlink($filepath);
return null;
}
// bad luck, try to deal with the file the old way - keep backup in file area if we can not copy to ext system
}
}
// Backups of type HUB (by definition never have user info)
@@ -275,7 +310,9 @@ abstract class backup_helper {
$sf = $fs->get_file_by_hash($pathnamehash);
$sf->delete();
}
return $fs->create_file_from_pathname($fr, $filepath);
$file = $fs->create_file_from_pathname($fr, $filepath);
unlink($filepath);
return $file;
}
/**
+1 -1
View File
@@ -294,7 +294,7 @@ abstract class base_setting {
if ($this->is_circular_reference($dependency->get_dependent_setting())) {
$a = new stdclass();
$a->alreadydependent = $this->name;
$a->main = $dependentsetting->get_name();
$a->main = $dependency->get_dependent_setting()->get_name();
throw new base_setting_exception('setting_circular_reference', $a);
}
$this->dependencies[$dependency->get_dependent_setting()->get_name()] = $dependency;
@@ -32,10 +32,12 @@ require_once($CFG->dirroot . '/backup/util/interfaces/checksumable.class.php');
require_once($CFG->dirroot . '/backup/backup.class.php');
require_once($CFG->dirroot . '/backup/util/settings/base_setting.class.php');
require_once($CFG->dirroot . '/backup/util/settings/backup_setting.class.php');
require_once($CFG->dirroot . '/backup/util/settings/setting_dependency.class.php');
require_once($CFG->dirroot . '/backup/util/settings/root/root_backup_setting.class.php');
require_once($CFG->dirroot . '/backup/util/settings/activity/activity_backup_setting.class.php');
require_once($CFG->dirroot . '/backup/util/settings/section/section_backup_setting.class.php');
require_once($CFG->dirroot . '/backup/util/settings/course/course_backup_setting.class.php');
require_once($CFG->dirroot . '/backup/util/ui/backup_ui_setting.class.php');
/*
* setting tests (all)
@@ -209,6 +211,21 @@ class setting_test extends UnitTestCase {
$this->assertEqual($e->a->alreadydependent, 'test4');
}
$bs1 = new mock_base_setting('test1', base_setting::IS_INTEGER, null);
$bs2 = new mock_base_setting('test2', base_setting::IS_INTEGER, null);
$bs1->register_dependency(new setting_dependency_disabledif_empty($bs1, $bs2));
try {
// $bs1 is already dependent on $bs2 so this should fail.
$bs2->register_dependency(new setting_dependency_disabledif_empty($bs2, $bs1));
$this->assertTrue(false, 'base_setting_exception expected');
} catch (exception $e) {
$this->assertTrue($e instanceof base_setting_exception);
$this->assertEqual($e->errorcode, 'setting_circular_reference');
$this->assertTrue($e->a instanceof stdclass);
$this->assertEqual($e->a->main, 'test1');
$this->assertEqual($e->a->alreadydependent, 'test2');
}
// Create 3 settings and observe between them, last one must
// automatically inherit all the settings defined in the main one
$bs1 = new mock_base_setting('test1', base_setting::IS_INTEGER, null);
+1 -1
View File
@@ -129,7 +129,7 @@ class base_setting_ui {
* @param string $label
*/
public function set_label($label) {
if (empty($label) || $label !== clean_param($label, PARAM_TEXT)) {
if ((string)$label === '' || $label !== clean_param($label, PARAM_TEXT)) {
throw new base_setting_ui_exception('setting_invalid_ui_label');
}
$this->label = $label;
@@ -168,7 +168,7 @@ class block_completionstatus extends block_base {
$a = new stdClass();
$a->first = $prerequisites_complete;
$a->second = count($prerequisites);
$shtml .= get_string('firstofsecond', 'block_completionstatus', $a);
$phtml .= get_string('firstofsecond', 'block_completionstatus', $a);
$phtml .= '</td></tr>';
$shtml = $phtml . $shtml;
+9 -9
View File
@@ -4,7 +4,7 @@ if (is_file($CFG->dirroot.'/mod/feedback/lib.php')) {
define('FEEDBACK_BLOCK_LIB_IS_OK', true);
}
class block_feedback extends block_base {
class block_feedback extends block_list {
function init() {
$this->title = get_string('feedback', 'block_feedback');
@@ -21,10 +21,13 @@ class block_feedback extends block_base {
return $this->content;
}
$this->content = new stdClass;
$this->content->items = array();
$this->content->icons = array();
$this->content->footer = '';
if (!defined('FEEDBACK_BLOCK_LIB_IS_OK')) {
$this->content = new stdClass;
$this->content->text = get_string('missing_feedback_module', 'block_feedback');
$this->content->footer = '';
$this->content->items = array(get_string('missing_feedback_module', 'block_feedback'));
return $this->content;
}
@@ -33,9 +36,7 @@ class block_feedback extends block_base {
$courseid = SITEID;
}
$this->content = new stdClass;
$this->content->text = '';
$this->content->footer = '';
$icon = '<img src="'.$OUTPUT->pix_url('icon', 'feedback') . '" class="icon" alt="" />';
if (empty($this->instance->pageid)) {
@@ -47,8 +48,7 @@ class block_feedback extends block_base {
foreach ($feedbacks as $feedback) {
$url = new moodle_url($baseurl);
$url->params(array('id'=>$feedback->cmid, 'courseid'=>$courseid));
$icon = '<img src="'.$OUTPUT->pix_url('icon', 'feedback') . '" class="icon" alt="" />&nbsp;';
$this->content->text = ' <a href="'.$url->out().'">'.$icon.$feedback->name.'</a>';
$this->content->items[] = '<a href="'.$url->out().'">'.$icon.$feedback->name.'</a>';
}
}
+10 -3
View File
@@ -292,9 +292,16 @@ class blog_entry {
$contentcell->text .= $OUTPUT->container_start('commands');
if (blog_user_can_edit_entry($this) && empty($this->uniquehash)) {
$contentcell->text .= html_writer::link(new moodle_url('/blog/edit.php', array('action' => 'edit', 'entryid' => $this->id)), $stredit) . ' | ';
$contentcell->text .= html_writer::link(new moodle_url('/blog/edit.php', array('action' => 'delete', 'entryid' => $this->id)), $strdelete) . ' | ';
if (blog_user_can_edit_entry($this)) {
if (empty($this->uniquehash)) {
//External blog entries should not be edited
$contentcell->text .= html_writer::link(new moodle_url('/blog/edit.php',
array('action' => 'edit', 'entryid' => $this->id)),
$stredit) . ' | ';
}
$contentcell->text .= html_writer::link(new moodle_url('/blog/edit.php',
array('action' => 'delete', 'entryid' => $this->id)),
$strdelete) . ' | ';
}
$contentcell->text .= html_writer::link(new moodle_url('/blog/index.php', array('entryid' => $this->id)), get_string('permalink', 'blog'));
+8 -1
View File
@@ -104,6 +104,11 @@ function blog_rss_get_params($filters) {
function blog_rss_get_feed($context, $args) {
global $CFG, $SITE, $DB;
if (empty($CFG->bloglevel)) {
debugging('Blogging disabled on this site, RSS feeds are not available');
return null;
}
if (empty($CFG->enablerssfeeds)) {
debugging('Sorry, RSS feeds are disabled on this site');
return '';
@@ -164,7 +169,9 @@ function blog_rss_get_feed($context, $args) {
$item->title = $blog_entry->subject;
$item->pubdate = $blog_entry->lastmodified;
$item->link = $CFG->wwwroot.'/blog/index.php?entryid='.$blog_entry->id;
$item->description = format_text($blog_entry->summary, $blog_entry->format);
$summary = file_rewrite_pluginfile_urls($blog_entry->summary, 'pluginfile.php',
$sitecontext->id, 'blog', 'post', $blog_entry->id);
$item->description = format_text($summary, $blog_entry->format);
if ( !empty($CFG->usetags) && ($blogtags = tag_get_tags_array('post', $blog_entry->id)) ) {
if ($blogtags) {
$item->tags = $blogtags;
+4 -1
View File
@@ -121,7 +121,10 @@ echo $OUTPUT->box_end();
// Print the event so that people can visually confirm they have the correct event
$event->time = calendar_format_event_time($event, time(), null, false);
calendar_print_event($event, false);
$renderer = $PAGE->get_renderer('core_calendar');
echo $renderer->start_layout();
echo $renderer->event($event);
echo $renderer->complete_layout();
echo $OUTPUT->box_end();
echo $OUTPUT->footer();
+5 -3
View File
@@ -133,14 +133,16 @@ class event_form extends moodleform {
$mform->setDefault('repeats', 1);
$mform->disabledIf('repeats','repeat','notchecked');
} else if ($repeatedevents > 0) {
} else if ($repeatedevents) {
$mform->addElement('hidden', 'repeatid');
$mform->setType('repeatid', PARAM_INT);
$mform->addElement('header', 'repeatedevents', get_string('repeatedevents', 'calendar'));
$mform->addElement('checkbox', 'repeateditall', null, get_string('repeateditall', 'calendar', $repeatedevents), 'repeat');
$mform->setDefault('repeateditall', 'checked');
$mform->addElement('radio', 'repeateditall', null, get_string('repeateditall', 'calendar', $this->_customdata->event->eventrepeats), 1);
$mform->addElement('radio', 'repeateditall', null, get_string('repeateditthis', 'calendar'), 0);
$mform->setDefault('repeateditall', 1);
}
+1 -1
View File
@@ -152,7 +152,7 @@ foreach($events as $event) {
$ev = new iCalendar_event;
$ev->add_property('uid', $event->id.'@'.$hostaddress);
$ev->add_property('summary', $event->name);
$ev->add_property('description', $event->description);
$ev->add_property('description', clean_param($event->description, PARAM_NOTAGS));
$ev->add_property('class', 'PUBLIC'); // PUBLIC / PRIVATE / CONFIDENTIAL
$ev->add_property('last-modified', Bennu::timestamp_to_datetime($event->timemodified));
$ev->add_property('dtstamp', Bennu::timestamp_to_datetime()); // now
+51 -23
View File
@@ -209,7 +209,6 @@ function calendar_get_mini($courses, $groups, $users, $cal_month = false, $cal_y
$days_title = calendar_get_days();
$summary = get_string('calendarheading', 'calendar', userdate(make_timestamp($y, $m), get_string('strftimemonthyear')));
$summary = get_string('tabledata', 'access', $summary);
$content .= '<table class="minicalendar calendartable" summary="'.$summary.'">'; // Begin table
$content .= '<tr class="weekdays">'; // Header row: day names
@@ -1237,6 +1236,10 @@ function calendar_set_filters(array $courseeventsfrom, $ignorefilters = false) {
$user = false;
$group = false;
// capabilities that allow seeing group events from all groups
// TODO: rewrite so that moodle/calendar:manageentries is not necessary here
$allgroupscaps = array('moodle/site:accessallgroups', 'moodle/calendar:manageentries');
$isloggedin = isloggedin();
if ($ignorefilters || calendar_show_event_type(CALENDAR_EVENT_COURSE)) {
@@ -1262,26 +1265,35 @@ function calendar_set_filters(array $courseeventsfrom, $ignorefilters = false) {
if (!empty($courseeventsfrom) && (calendar_show_event_type(CALENDAR_EVENT_GROUP) || $ignorefilters)) {
if (!empty($CFG->calendar_adminseesall) && has_capability('moodle/calendar:manageentries', get_system_context())) {
$group = true;
} else if ($isloggedin) {
$groupids = array();
// We already have the courses to examine in $courses
// For each course...
foreach ($courseeventsfrom as $courseid => $course) {
// If the user is an editing teacher in there,
if (!empty($USER->groupmember[$course->id])) {
// We've already cached the users groups for this course so we can just use that
$groupids = array_merge($groupids, $USER->groupmember[$course->id]);
} else if (($course->groupmode != NOGROUPS || !$course->groupmodeforce) && has_capability('moodle/calendar:manageentries', get_context_instance(CONTEXT_COURSE, $course->id))) {
// If this course has groups, show events from all of them
$coursegroups = groups_get_user_groups($course->id, $USER->id);
$groupids = array_merge($groupids, $coursegroups['0']);
}
if (count($courseeventsfrom)==1) {
$course = reset($courseeventsfrom);
if (has_any_capability($allgroupscaps, get_context_instance(CONTEXT_COURSE, $course->id))) {
$coursegroups = groups_get_all_groups($course->id, 0, 0, 'g.id');
$group = array_keys($coursegroups);
}
if (!empty($groupids)) {
$group = $groupids;
}
if ($group === false) {
if (!empty($CFG->calendar_adminseesall) && has_any_capability($allgroupscaps, get_system_context())) {
$group = true;
} else if ($isloggedin) {
$groupids = array();
// We already have the courses to examine in $courses
// For each course...
foreach ($courseeventsfrom as $courseid => $course) {
// If the user is an editing teacher in there,
if (!empty($USER->groupmember[$course->id])) {
// We've already cached the users groups for this course so we can just use that
$groupids = array_merge($groupids, $USER->groupmember[$course->id]);
} else if ($course->groupmode != NOGROUPS || !$course->groupmodeforce) {
// If this course has groups, show events from all of those related to the current user
$coursegroups = groups_get_user_groups($course->id, $USER->id);
$groupids = array_merge($groupids, $coursegroups['0']);
}
}
if (!empty($groupids)) {
$group = $groupids;
}
}
}
}
@@ -1351,10 +1363,11 @@ function calendar_get_default_courses() {
$courses = array();
if (!empty($CFG->calendar_adminseesall) && has_capability('moodle/calendar:manageentries', get_context_instance(CONTEXT_SYSTEM))) {
list ($select, $join) = context_instance_preload_sql('c.id', CONTEXT_COURSE, 'ctx');
$sql = "SELECT DISTINCT c.* $select
$sql = "SELECT c.* $select
FROM {course} c
JOIN {event} e ON e.courseid = c.id
$join";
$join
WHERE EXISTS (SELECT 1 FROM {event} e WHERE e.courseid = c.id)
";
$courses = $DB->get_records_sql($sql, null, 0, 20);
foreach ($courses as $course) {
context_instance_preload($course);
@@ -1552,6 +1565,7 @@ function calendar_get_allowed_types(&$allowed, $course = null) {
}
if ($course->id != SITEID) {
$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
$allowed->user = has_capability('moodle/calendar:manageownentries', $coursecontext);
if (has_capability('moodle/calendar:manageentries', $coursecontext)) {
$allowed->courses = array($course->id => 1);
@@ -2087,6 +2101,20 @@ class calendar_event {
// Delete the event
$DB->delete_records('event', array('id'=>$this->properties->id));
// If we are deleting parent of a repeated event series, promote the next event in the series as parent
if (($this->properties->id == $this->properties->repeatid) && !$deleterepeated) {
$newparent = $DB->get_field_sql("SELECT id from {event} where repeatid = ? order by id ASC", array($this->properties->id), IGNORE_MULTIPLE);
if (!empty($newparent)) {
$DB->execute("UPDATE {event} SET repeatid = ? WHERE repeatid = ?", array($newparent, $this->properties->id));
// Get all records where the repeatid is the same as the event being removed
$events = $DB->get_records('event', array('repeatid' => $newparent));
// For each of the returned events trigger the event_update hook.
foreach ($events as $event) {
self::calendar_event_hook('update_event', array($event, false));
}
}
}
// If the editor context hasn't already been set then set it now
if ($this->editorcontext === null) {
$this->editorcontext = $this->properties->context;
+17 -9
View File
@@ -135,7 +135,9 @@ class core_calendar_renderer extends plugin_renderer_base {
* @return string
*/
public function fake_block_filters($courseid, $day, $month, $year, $view, $courses) {
return html_writer::tag('div', calendar_filter_controls($this->page->url), array('class'=>'calendar_filters filters'));
$returnurl = $this->page->url;
$returnurl->param('course', $courseid);
return html_writer::tag('div', calendar_filter_controls($returnurl), array('class'=>'calendar_filters filters'));
}
/**
@@ -413,6 +415,8 @@ class core_calendar_renderer extends plugin_renderer_base {
$table = new html_table();
$table->attributes = array('class'=>'calendarmonth calendartable');
$time = make_timestamp($calendar->year, $calendar->month);
$table->summary = get_string('calendarheading', 'calendar', userdate($time, get_string('strftimemonthyear')));
$table->data = array();
$header = new html_table_row();
@@ -579,22 +583,24 @@ class core_calendar_renderer extends plugin_renderer_base {
// Global events
$link = new moodle_url(CALENDAR_URL.'set.php', array('var' => 'showglobal', 'return' => base64_encode($returnurl->out(false)), 'sesskey'=>sesskey()));
$strglobalevents = get_string('globalevents', 'calendar');
if (calendar_show_event_type(CALENDAR_EVENT_GLOBAL)) {
$output .= html_writer::tag('td', '', array('class'=>'calendar_event_global', 'style'=>'width:8px;'));
$output .= html_writer::tag('td', html_writer::tag('strong', get_string('globalevents', 'calendar')).' '.get_string('shown', 'calendar').' ('.html_writer::link($link, get_string('clickhide', 'calendar')).')');
$output .= html_writer::tag('td', html_writer::tag('strong', $strglobalevents).' '.get_string('shown', 'calendar').' ('.html_writer::link($link, get_string('clickhide', 'calendar').'<span class="accesshide">'.$strglobalevents.'</span>').')');
} else {
$output .= html_writer::tag('td', '', array('style'=>'width:8px;'));
$output .= html_writer::tag('td', html_writer::tag('strong', get_string('globalevents', 'calendar')).' '.get_string('hidden', 'calendar').' ('.html_writer::link($link, get_string('clickshow', 'calendar')).')');
$output .= html_writer::tag('td', html_writer::tag('strong', $strglobalevents).' '.get_string('hidden', 'calendar').' ('.html_writer::link($link, get_string('clickshow', 'calendar').'<span class="accesshide">'.$strglobalevents.'</span>').')');
}
// Course events
$link = new moodle_url(CALENDAR_URL.'set.php', array('var'=>'showcourses', 'return' => base64_encode($returnurl->out(false)), 'sesskey'=>sesskey()));
$strcourseevents = get_string('courseevents', 'calendar');
if (calendar_show_event_type(CALENDAR_EVENT_COURSE)) {
$output .= html_writer::tag('td', '', array('class'=>'calendar_event_course', 'style'=>'width:8px;'));
$output .= html_writer::tag('td', html_writer::tag('strong', get_string('courseevents', 'calendar')).' '.get_string('shown', 'calendar').' ('.html_writer::link($link, get_string('clickhide', 'calendar')).')');
$output .= html_writer::tag('td', html_writer::tag('strong', $strcourseevents).' '.get_string('shown', 'calendar').' ('.html_writer::link($link, get_string('clickhide', 'calendar').'<span class="accesshide">'.$strcourseevents.'</span>').')');
} else {
$output .= html_writer::tag('td', '', array('style'=>'width:8px;'));
$output .= html_writer::tag('td', html_writer::tag('strong', get_string('courseevents', 'calendar')).' '.get_string('hidden', 'calendar').' ('.html_writer::link($link, get_string('clickshow', 'calendar')).')');
$output .= html_writer::tag('td', html_writer::tag('strong', $strcourseevents).' '.get_string('hidden', 'calendar').' ('.html_writer::link($link, get_string('clickshow', 'calendar').'<span class="accesshide">'.$strcourseevents.'</span>').')');
}
$output .= html_writer::end_tag('tr');
@@ -602,21 +608,23 @@ class core_calendar_renderer extends plugin_renderer_base {
$output .= html_writer::start_tag('tr');
// Group events
$link = new moodle_url(CALENDAR_URL.'set.php', array('var'=>'showgroups', 'return' => base64_encode($returnurl->out(false)), 'sesskey'=>sesskey()));
$strgroupevents = get_string('groupevents', 'calendar');
if (calendar_show_event_type(CALENDAR_EVENT_GROUP)) {
$output .= html_writer::tag('td', '', array('class'=>'calendar_event_group', 'style'=>'width:8px;'));
$output .= html_writer::tag('td', html_writer::tag('strong', get_string('groupevents', 'calendar')).' '.get_string('shown', 'calendar').' ('.html_writer::link($link, get_string('clickhide', 'calendar')).')');
$output .= html_writer::tag('td', html_writer::tag('strong', $strgroupevents).' '.get_string('shown', 'calendar').' ('.html_writer::link($link, get_string('clickhide', 'calendar').'<span class="accesshide">'.$strgroupevents.'</span>').')');
} else {
$output .= html_writer::tag('td', '', array('style'=>'width:8px;'));
$output .= html_writer::tag('td', html_writer::tag('strong', get_string('groupevents', 'calendar')).' '.get_string('hidden', 'calendar').' ('.html_writer::link($link, get_string('clickshow', 'calendar')).')');
$output .= html_writer::tag('td', html_writer::tag('strong', $strgroupevents).' '.get_string('hidden', 'calendar').' ('.html_writer::link($link, get_string('clickshow', 'calendar').'<span class="accesshide">'.$strgroupevents.'</span>').')');
}
// User events
$link = new moodle_url(CALENDAR_URL.'set.php', array('var'=>'showuser', 'return' => base64_encode($returnurl->out(false)), 'sesskey'=>sesskey()));
$struserevents = get_string('userevents', 'calendar');
if (calendar_show_event_type(CALENDAR_EVENT_USER)) {
$output .= html_writer::tag('td', '', array('class'=>'calendar_event_user', 'style'=>'width:8px;'));
$output .= html_writer::tag('td', html_writer::tag('strong', get_string('userevents', 'calendar')).' '.get_string('shown', 'calendar').' ('.html_writer::link($link, get_string('clickhide', 'calendar')).')');
$output .= html_writer::tag('td', html_writer::tag('strong', $struserevents).' '.get_string('shown', 'calendar').' ('.html_writer::link($link, get_string('clickhide', 'calendar').'<span class="accesshide">'.$struserevents.'</span>').')');
} else {
$output .= html_writer::tag('td', '', array('style'=>'width:8px;'));
$output .= html_writer::tag('td', html_writer::tag('strong', get_string('userevents', 'calendar')).' '.get_string('hidden', 'calendar').' ('.html_writer::link($link, get_string('clickshow', 'calendar')).')');
$output .= html_writer::tag('td', html_writer::tag('strong', $struserevents).' '.get_string('hidden', 'calendar').' ('.html_writer::link($link, get_string('clickshow', 'calendar').'<span class="accesshide">'.$struserevents.'</span>').')');
}
$output .= html_writer::end_tag('tr');
}
+7 -2
View File
@@ -45,8 +45,13 @@ require_sesskey();
$var = required_param('var', PARAM_ALPHA);
$return = clean_param(base64_decode(required_param('return', PARAM_RAW)), PARAM_URL);
$url = new moodle_url('/calendar/set.php', array('return'=>base64_encode($return),'var'=>$var, 'sesskey'=>sesskey()));
$courseid = optional_param('id', -1, PARAM_INT);
if ($courseid != -1) {
$return = new moodle_url($return, array('course' => $courseid));
} else {
$return = new moodle_url($return);
}
$url = new moodle_url('/calendar/set.php', array('return'=>base64_encode($return->out(false)), 'course' => $courseid, 'var'=>$var, 'sesskey'=>sesskey()));
$PAGE->set_url($url);
$PAGE->set_context(get_context_instance(CONTEXT_SYSTEM));
+1 -1
View File
@@ -127,7 +127,7 @@ switch($view) {
echo $renderer->show_day($calendar);
break;
case 'month':
echo $renderer->show_month_detailed($calendar);
echo $renderer->show_month_detailed($calendar, $url);
break;
case 'upcoming':
$defaultlookahead = CALENDAR_DEFAULT_UPCOMING_LOOKAHEAD;
+1 -1
View File
@@ -49,7 +49,7 @@ class cohort_edit_form extends moodleform {
$mform->addElement('select', 'contextid', get_string('context', 'role'), $options);
$mform->addElement('text', 'idnumber', get_string('idnumber', 'cohort'), 'maxlength="254" size="50"');
$mform->setType('name', PARAM_RAW);
$mform->setType('idnumber', PARAM_RAW); // idnumbers are plain text, must not be changed
$mform->addElement('editor', 'description_editor', get_string('description', 'cohort'), null, $editoroptions);
$mform->setType('description_editor', PARAM_RAW);
+1 -1
View File
@@ -76,7 +76,7 @@ $data = array();
foreach($cohorts as $cohort) {
$line = array();
$line[] = format_string($cohort->name);
$line[] = $cohort->idnumber;
$line[] = s($cohort->idnumber); // plain text
$line[] = format_text($cohort->description, $cohort->descriptionformat);
$line[] = $DB->count_records('cohort_members', array('cohortid'=>$cohort->id));
+3
View File
@@ -385,6 +385,9 @@ bodyContent: '<div class="comment-delete-confirm"><a href="#" id="confirmdelete-
},
toggle_textarea: function(focus) {
var t = Y.one('#dlg-content-'+this.client_id);
if (!t) {
return false;
}
if (focus) {
if (t.get('value') == M.str.moodle.addcomment) {
t.set('value', '');
+1 -1
View File
@@ -569,7 +569,7 @@ class comment {
$c->format = $u->cformat;
$c->timecreated = $u->ctimecreated;
$url = new moodle_url('/user/view.php', array('id'=>$u->id, 'course'=>$this->courseid));
$c->profileurl = $url->out();
$c->profileurl = $url->out(false);
$c->fullname = fullname($u);
$c->time = userdate($c->timecreated, get_string('strftimerecent', 'langconfig'));
$c->content = format_text($c->content, $c->format, $formatoptions);
+1 -1
View File
@@ -377,7 +377,7 @@ $CFG->admin = 'admin';
// memory limit to something higher.
// The value for the settings should be a valid PHP memory value. e.g. 512M, 1G
//
// $CFG->extramemorylimit = 1G;
// $CFG->extramemorylimit = '1G';
//
//=========================================================================
// 8. SETTINGS FOR DEVELOPMENT SERVERS - not intended for production use!!!
+406 -397
View File
@@ -1,444 +1,453 @@
<?php
// Displays the top level category or all courses
// In editing mode, allows the admin to edit a category,
// and rearrange courses
// 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/>.
require_once("../config.php");
require_once("lib.php");
/**
* Displays the top level category or all courses
* In editing mode, allows the admin to edit a category,
* and rearrange courses
*
* @package core
* @subpackage course
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$id = required_param('id', PARAM_INT); // Category id
$page = optional_param('page', 0, PARAM_INT); // which page to show
$perpage = optional_param('perpage', $CFG->coursesperpage, PARAM_INT); // how many per page
$categoryedit = optional_param('categoryedit', -1, PARAM_BOOL);
$hide = optional_param('hide', 0, PARAM_INT);
$show = optional_param('show', 0, PARAM_INT);
$moveup = optional_param('moveup', 0, PARAM_INT);
$movedown = optional_param('movedown', 0, PARAM_INT);
$moveto = optional_param('moveto', 0, PARAM_INT);
$resort = optional_param('resort', 0, PARAM_BOOL);
require_once("../config.php");
require_once($CFG->dirroot.'/course/lib.php');
$site = get_site();
$id = required_param('id', PARAM_INT); // Category id
$page = optional_param('page', 0, PARAM_INT); // which page to show
$perpage = optional_param('perpage', $CFG->coursesperpage, PARAM_INT); // how many per page
$categoryedit = optional_param('categoryedit', -1, PARAM_BOOL);
$hide = optional_param('hide', 0, PARAM_INT);
$show = optional_param('show', 0, PARAM_INT);
$moveup = optional_param('moveup', 0, PARAM_INT);
$movedown = optional_param('movedown', 0, PARAM_INT);
$moveto = optional_param('moveto', 0, PARAM_INT);
$resort = optional_param('resort', 0, PARAM_BOOL);
$sesskey = optional_param('sesskey', '', PARAM_RAW);
if (empty($id)) {
print_error("unknowcategory");
if (empty($id)) {
print_error("unknowcategory");
}
$PAGE->set_category_by_id($id);
$PAGE->set_url(new moodle_url('/course/category.php', array('id' => $id)));
// This is sure to be the category context
$context = $PAGE->context;
// And the object has been loaded for us no need for another DB call
$category = $PAGE->category;
$canedit = can_edit_in_category($category->id);
if ($canedit) {
if ($categoryedit !== -1) {
$USER->editing = $categoryedit;
}
$PAGE->set_category_by_id($id);
$urlparams = array('id' => $id);
if ($page) {
$urlparams['page'] = $page;
}
if ($perpage) {
$urlparams['perpage'] = $perpage;
}
$PAGE->set_url(new moodle_url('/course/category.php', array('id' => $id)));
navigation_node::override_active_url($PAGE->url);
$context = $PAGE->context;
$category = $PAGE->category;
$canedit = can_edit_in_category($category->id);
if ($canedit) {
if ($categoryedit !== -1) {
$USER->editing = $categoryedit;
}
require_login();
$editingon = $PAGE->user_is_editing();
} else {
if ($CFG->forcelogin) {
require_login();
$editingon = $PAGE->user_is_editing();
} else {
if ($CFG->forcelogin) {
require_login();
}
$editingon = false;
}
if (!$category->visible) {
require_capability('moodle/category:viewhiddencategories', $context);
}
$canmanage = has_capability('moodle/category:manage', $context);
$sesskeyprovided = !empty($sesskey) && confirm_sesskey($sesskey);
// Process any category actions.
if ($canmanage && $resort && $sesskeyprovided) {
// Resort the category if requested
if ($courses = get_courses($category->id, "fullname ASC", 'c.id,c.fullname,c.sortorder')) {
$i = 1;
foreach ($courses as $course) {
$DB->set_field('course', 'sortorder', $category->sortorder+$i, array('id'=>$course->id));
$i++;
}
$editingon = false;
fix_course_sortorder(); // should not be needed
}
}
if (!$category->visible) {
require_capability('moodle/category:viewhiddencategories', $context);
}
// Process any course actions.
if ($editingon && $sesskeyprovided) {
// Process any category actions.
if (has_capability('moodle/category:manage', $context)) {
/// Resort the category if requested
if ($resort and confirm_sesskey()) {
if ($courses = get_courses($category->id, "fullname ASC", 'c.id,c.fullname,c.sortorder')) {
$i = 1;
foreach ($courses as $course) {
$DB->set_field('course', 'sortorder', $category->sortorder+$i, array('id'=>$course->id));
$i++;
}
fix_course_sortorder(); // should not be needed
}
// Move a specified course to a new category
if (!empty($moveto) and $data = data_submitted()) {
// Some courses are being moved
// user must have category update in both cats to perform this
require_capability('moodle/category:manage', $context);
require_capability('moodle/category:manage', get_context_instance(CONTEXT_COURSECAT, $moveto));
if (!$destcategory = $DB->get_record('course_categories', array('id' => $data->moveto))) {
print_error('cannotfindcategory', '', '', $data->moveto);
}
}
// Process any course actions.
if ($editingon) {
/// Move a specified course to a new category
if (!empty($moveto) and $data = data_submitted() and confirm_sesskey()) { // Some courses are being moved
// user must have category update in both cats to perform this
require_capability('moodle/category:manage', $context);
require_capability('moodle/category:manage', get_context_instance(CONTEXT_COURSECAT, $moveto));
$courses = array();
foreach ($data as $key => $value) {
if (preg_match('/^c\d+$/', $key)) {
$courseid = substr($key, 1);
array_push($courses, $courseid);
if (!$destcategory = $DB->get_record('course_categories', array('id' => $data->moveto))) {
print_error('cannotfindcategory', '', '', $data->moveto);
}
$courses = array();
foreach ($data as $key => $value) {
if (preg_match('/^c\d+$/', $key)) {
$courseid = substr($key, 1);
array_push($courses, $courseid);
// check this course's category
if ($movingcourse = $DB->get_record('course', array('id'=>$courseid))) {
if ($movingcourse->category != $id ) {
print_error('coursedoesnotbelongtocategory');
}
} else {
print_error('cannotfindcourse');
// check this course's category
if ($movingcourse = $DB->get_record('course', array('id'=>$courseid))) {
if ($movingcourse->category != $id ) {
print_error('coursedoesnotbelongtocategory');
}
} else {
print_error('cannotfindcourse');
}
}
move_courses($courses, $data->moveto);
}
/// Hide or show a course
if ((!empty($hide) or !empty($show)) and confirm_sesskey()) {
if (!empty($hide)) {
$course = $DB->get_record('course', array('id' => $hide));
$visible = 0;
} else {
$course = $DB->get_record('course', array('id' => $show));
$visible = 1;
}
if ($course) {
$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
require_capability('moodle/course:visibility', $coursecontext);
$DB->set_field('course', 'visible', $visible, array('id' => $course->id));
$DB->set_field('course', 'visibleold', $visible, array('id' => $course->id)); // we set the old flag when user manually changes visibility of course
}
}
/// Move a course up or down
if ((!empty($moveup) or !empty($movedown)) and confirm_sesskey()) {
require_capability('moodle/category:manage', $context);
// Ensure the course order has continuous ordering
fix_course_sortorder();
$swapcourse = NULL;
if (!empty($moveup)) {
if ($movecourse = $DB->get_record('course', array('id' => $moveup))) {
$swapcourse = $DB->get_record('course', array('sortorder' => $movecourse->sortorder - 1));
}
} else {
if ($movecourse = $DB->get_record('course', array('id' => $movedown))) {
$swapcourse = $DB->get_record('course', array('sortorder' => $movecourse->sortorder + 1));
}
}
if ($swapcourse and $movecourse) {
// check course's category
if ($movecourse->category != $id) {
print_error('coursedoesnotbelongtocategory');
}
$DB->set_field('course', 'sortorder', $swapcourse->sortorder, array('id' => $movecourse->id));
$DB->set_field('course', 'sortorder', $movecourse->sortorder, array('id' => $swapcourse->id));
}
}
} // End of editing stuff
// Print headings
$numcategories = $DB->count_records('course_categories');
$stradministration = get_string('administration');
$strcategories = get_string('categories');
$strcategory = get_string('category');
$strcourses = get_string('courses');
if ($editingon && can_edit_in_category()) {
// Integrate into the admin tree only if the user can edit categories at the top level,
// otherwise the admin block does not appear to this user, and you get an error.
require_once($CFG->libdir . '/adminlib.php');
admin_externalpage_setup('coursemgmt', '', $urlparams, $CFG->wwwroot . '/course/category.php');
$PAGE->set_context($context); // Ensure that we are actually showing blocks etc for the cat context
$settingsnode = $PAGE->settingsnav->find_active_node();
if ($settingsnode) {
$settingsnode->make_inactive();
$settingsnode->force_open();
$PAGE->navbar->add($settingsnode->text, $settingsnode->action);
}
echo $OUTPUT->header();
} else {
$PAGE->set_title("$site->shortname: $category->name");
$PAGE->set_heading($site->fullname);
$PAGE->set_button(print_course_search('', true, 'navbar'));
$PAGE->set_pagelayout('coursecategory');
echo $OUTPUT->header();
move_courses($courses, $data->moveto);
}
// Hide or show a course
if (!empty($hide) or !empty($show)) {
if (!empty($hide)) {
$course = $DB->get_record('course', array('id' => $hide));
$visible = 0;
} else {
$course = $DB->get_record('course', array('id' => $show));
$visible = 1;
}
if ($course) {
$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
require_capability('moodle/course:visibility', $coursecontext);
// Set the visibility of the course. we set the old flag when user manually changes visibility of course.
$DB->update_record('course', array('id' => $course->id, 'visible' => $visible, 'visibleold' => $visible, 'timemodified' => time()));
}
}
// Move a course up or down
if (!empty($moveup) or !empty($movedown)) {
require_capability('moodle/category:manage', $context);
// Ensure the course order has continuous ordering
fix_course_sortorder();
$swapcourse = NULL;
if (!empty($moveup)) {
if ($movecourse = $DB->get_record('course', array('id' => $moveup))) {
$swapcourse = $DB->get_record('course', array('sortorder' => $movecourse->sortorder - 1));
}
} else {
if ($movecourse = $DB->get_record('course', array('id' => $movedown))) {
$swapcourse = $DB->get_record('course', array('sortorder' => $movecourse->sortorder + 1));
}
}
if ($swapcourse and $movecourse) {
// check course's category
if ($movecourse->category != $id) {
print_error('coursedoesnotbelongtocategory');
}
$DB->set_field('course', 'sortorder', $swapcourse->sortorder, array('id' => $movecourse->id));
$DB->set_field('course', 'sortorder', $movecourse->sortorder, array('id' => $swapcourse->id));
}
}
} // End of editing stuff
// Prepare the standard URL params for this page. We'll need them later.
$urlparams = array('id' => $id);
if ($page) {
$urlparams['page'] = $page;
}
if ($perpage) {
$urlparams['perpage'] = $perpage;
}
// Begin output
if ($editingon && can_edit_in_category()) {
// Integrate into the admin tree only if the user can edit categories at the top level,
// otherwise the admin block does not appear to this user, and you get an error.
require_once($CFG->libdir . '/adminlib.php');
admin_externalpage_setup('coursemgmt', '', $urlparams, $CFG->wwwroot . '/course/category.php');
$PAGE->set_context($context); // Ensure that we are actually showing blocks etc for the cat context
$settingsnode = $PAGE->settingsnav->find_active_node();
if ($settingsnode) {
$settingsnode->make_inactive();
$settingsnode->force_open();
$PAGE->navbar->add($settingsnode->text, $settingsnode->action);
}
echo $OUTPUT->header();
} else {
$site = get_site();
$PAGE->set_title("$site->shortname: $category->name");
$PAGE->set_heading($site->fullname);
$PAGE->set_button(print_course_search('', true, 'navbar'));
$PAGE->set_pagelayout('coursecategory');
echo $OUTPUT->header();
}
/// Print the category selector
$displaylist = array();
$notused = array();
make_categories_list($displaylist, $notused);
$displaylist = array();
$notused = array();
make_categories_list($displaylist, $notused);
echo '<div class="categorypicker">';
$select = new single_select(new moodle_url('category.php'), 'id', $displaylist, $category->id, null, 'switchcategory');
$select->set_label($strcategories.':');
echo $OUTPUT->render($select);
echo '</div>';
echo '<div class="categorypicker">';
$select = new single_select(new moodle_url('/course/category.php'), 'id', $displaylist, $category->id, null, 'switchcategory');
$select->set_label(get_string('categories').':');
echo $OUTPUT->render($select);
echo '</div>';
/// Print current category description
if (!$editingon && $category->description) {
echo $OUTPUT->box_start();
$options = new stdClass;
$options->noclean = true;
$options->para = false;
$options->overflowdiv = true;
if (!isset($category->descriptionformat)) {
$category->descriptionformat = FORMAT_MOODLE;
}
$text = file_rewrite_pluginfile_urls($category->description, 'pluginfile.php', $context->id, 'coursecat', 'description', null);
echo format_text($text, $category->descriptionformat, $options);
echo $OUTPUT->box_end();
if (!$editingon && $category->description) {
echo $OUTPUT->box_start();
$options = new stdClass;
$options->noclean = true;
$options->para = false;
$options->overflowdiv = true;
if (!isset($category->descriptionformat)) {
$category->descriptionformat = FORMAT_MOODLE;
}
$text = file_rewrite_pluginfile_urls($category->description, 'pluginfile.php', $context->id, 'coursecat', 'description', null);
echo format_text($text, $category->descriptionformat, $options);
echo $OUTPUT->box_end();
}
if ($editingon && $canmanage) {
echo $OUTPUT->container_start('buttons');
// Print button to update this category
$url = new moodle_url('/course/editcategory.php', array('id' => $category->id));
echo $OUTPUT->single_button($url, get_string('editcategorythis'), 'get');
// Print button for creating new categories
$url = new moodle_url('/course/editcategory.php', array('parent' => $category->id));
echo $OUTPUT->single_button($url, get_string('addsubcategory'), 'get');
echo $OUTPUT->container_end();
}
// Print out all the sub-categories
// In order to view hidden subcategories the user must have the viewhiddencategories
// capability in the current category.
if (has_capability('moodle/category:viewhiddencategories', $context)) {
$categorywhere = '';
} else {
$categorywhere = 'AND cc.visible = 1';
}
// We're going to preload the context for the subcategory as we know that we
// need it later on for formatting.
list($ctxselect, $ctxjoin) = context_instance_preload_sql('cc.id', CONTEXT_COURSECAT, 'ctx');
$sql = "SELECT cc.* $ctxselect
FROM {course_categories} cc
$ctxjoin
WHERE cc.parent = :parentid
$categorywhere
ORDER BY cc.sortorder ASC";
$subcategories = $DB->get_recordset_sql($sql, array('parentid' => $category->id));
// Prepare a table to display the sub categories.
$table = new html_table;
$table->attributes = array('border' => '0', 'cellspacing' => '2', 'cellpadding' => '4', 'class' => 'generalbox boxaligncenter category_subcategories');
$table->head = array(get_string('subcategories'));
$table->data = array();
$baseurl = new moodle_url('/course/category.php');
foreach ($subcategories as $subcategory) {
// Preload the context we will need it to format the category name shortly.
context_instance_preload($subcategory);
$context = get_context_instance(CONTEXT_COURSECAT, $subcategory->id);
// Prepare the things we need to create a link to the subcategory
$attributes = $subcategory->visible ? array() : array('class' => 'dimmed');
$text = format_string($subcategory->name, true, array('context' => $context));
// Add the subcategory to the table
$baseurl->param('id', $subcategory->id);
$table->data[] = array(html_writer::link($baseurl, $text, $attributes));
}
$subcategorieswereshown = (count($table->data) > 0);
if ($subcategorieswereshown) {
echo html_writer::table($table);
}
// Print out all the courses
$courses = get_courses_page($category->id, 'c.sortorder ASC',
'c.id,c.sortorder,c.shortname,c.fullname,c.summary,c.visible',
$totalcount, $page*$perpage, $perpage);
$numcourses = count($courses);
if (!$courses) {
if (empty($subcategorieswereshown)) {
echo $OUTPUT->heading(get_string("nocoursesyet"));
}
if ($editingon && has_capability('moodle/category:manage', $context)) {
echo $OUTPUT->container_start('buttons');
} else if ($numcourses <= COURSE_MAX_SUMMARIES_PER_PAGE and !$page and !$editingon) {
echo $OUTPUT->box_start('courseboxes');
print_courses($category);
echo $OUTPUT->box_end();
// Print button to update this category
$options = array('id' => $category->id);
echo $OUTPUT->single_button(new moodle_url('/course/editcategory.php', $options), get_string('editcategorythis'), 'get');
// Print button for creating new categories
$options = array('parent' => $category->id);
echo $OUTPUT->single_button(new moodle_url('/course/editcategory.php', $options), get_string('addsubcategory'), 'get');
echo $OUTPUT->container_end();
}
/// Print out all the sub-categories
if ($subcategories = $DB->get_records('course_categories', array('parent' => $category->id), 'sortorder ASC')) {
$firstentry = true;
foreach ($subcategories as $subcategory) {
if ($subcategory->visible || has_capability('moodle/category:viewhiddencategories', $context)) {
$subcategorieswereshown = true;
if ($firstentry) {
echo '<table border="0" cellspacing="2" cellpadding="4" class="generalbox boxaligncenter">';
echo '<tr><th scope="col">'.get_string('subcategories').'</th></tr>';
echo '<tr><td style="white-space: nowrap">';
$firstentry = false;
}
$catlinkcss = $subcategory->visible ? '' : ' class="dimmed" ';
echo '<a '.$catlinkcss.' href="category.php?id='.$subcategory->id.'">'.
format_string($subcategory->name, true, array('context' => get_context_instance(CONTEXT_COURSECAT, $subcategory->id))).'</a><br />';
}
}
if (!$firstentry) {
echo '</td></tr></table>';
echo '<br />';
}
}
/// Print out all the courses
$courses = get_courses_page($category->id, 'c.sortorder ASC',
'c.id,c.sortorder,c.shortname,c.fullname,c.summary,c.visible',
$totalcount, $page*$perpage, $perpage);
$numcourses = count($courses);
if (!$courses) {
if (empty($subcategorieswereshown)) {
echo $OUTPUT->heading(get_string("nocoursesyet"));
}
} else if ($numcourses <= COURSE_MAX_SUMMARIES_PER_PAGE and !$page and !$editingon) {
echo $OUTPUT->box_start('courseboxes');
print_courses($category);
echo $OUTPUT->box_end();
} else {
echo $OUTPUT->paging_bar($totalcount, $page, $perpage, "/course/category.php?id=$category->id&perpage=$perpage");
echo '<form id="movecourses" action="category.php" method="post"><div>';
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
echo '<table border="0" cellspacing="2" cellpadding="4" class="generalbox boxaligncenter"><tr>';
echo '<th class="header" scope="col">'.get_string('courses').'</th>';
if ($editingon) {
echo '<th class="header" scope="col">'.get_string('edit').'</th>';
echo '<th class="header" scope="col">'.get_string('select').'</th>';
} else {
echo $OUTPUT->paging_bar($totalcount, $page, $perpage, "/course/category.php?id=$category->id&perpage=$perpage");
echo '<th class="header" scope="col">&nbsp;</th>';
}
echo '</tr>';
$strcourses = get_string('courses');
$strselect = get_string('select');
$stredit = get_string('edit');
$strdelete = get_string('delete');
$strbackup = get_string('backup');
$strrestore = get_string('restore');
$strmoveup = get_string('moveup');
$strmovedown = get_string('movedown');
$strupdate = get_string('update');
$strhide = get_string('hide');
$strshow = get_string('show');
$strsummary = get_string('summary');
$strsettings = get_string('settings');
$count = 0;
$abletomovecourses = false; // for now
echo '<form id="movecourses" action="category.php" method="post"><div>';
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
echo '<table border="0" cellspacing="2" cellpadding="4" class="generalbox boxaligncenter"><tr>';
echo '<th class="header" scope="col">'.$strcourses.'</th>';
if ($editingon) {
echo '<th class="header" scope="col">'.$stredit.'</th>';
echo '<th class="header" scope="col">'.$strselect.'</th>';
// Checking if we are at the first or at the last page, to allow courses to
// be moved up and down beyond the paging border
if ($totalcount > $perpage) {
$atfirstpage = ($page == 0);
if ($perpage > 0) {
$atlastpage = (($page + 1) == ceil($totalcount / $perpage));
} else {
echo '<th class="header" scope="col">&nbsp;</th>';
}
echo '</tr>';
$count = 0;
$abletomovecourses = false; // for now
// Checking if we are at the first or at the last page, to allow courses to
// be moved up and down beyond the paging border
if ($totalcount > $perpage) {
$atfirstpage = ($page == 0);
if ($perpage > 0) {
$atlastpage = (($page + 1) == ceil($totalcount / $perpage));
} else {
$atlastpage = true;
}
} else {
$atfirstpage = true;
$atlastpage = true;
}
} else {
$atfirstpage = true;
$atlastpage = true;
}
foreach ($courses as $acourse) {
$coursecontext = get_context_instance(CONTEXT_COURSE, $acourse->id);
$baseurl = new moodle_url('/course/category.php', $urlparams + array('sesskey' => sesskey()));
foreach ($courses as $acourse) {
$coursecontext = get_context_instance(CONTEXT_COURSE, $acourse->id);
$count++;
$up = ($count > 1 || !$atfirstpage);
$down = ($count < $numcourses || !$atlastpage);
$count++;
$up = ($count > 1 || !$atfirstpage);
$down = ($count < $numcourses || !$atlastpage);
$linkcss = $acourse->visible ? '' : ' class="dimmed" ';
echo '<tr>';
echo '<td><a '.$linkcss.' href="view.php?id='.$acourse->id.'">'. format_string($acourse->fullname) .'</a></td>';
if ($editingon) {
echo '<td>';
if (has_capability('moodle/course:update', $coursecontext)) {
echo $OUTPUT->action_icon(new moodle_url('/course/edit.php',
array('id' => $acourse->id, 'category' => $id, 'returnto' => 'category')),
new pix_icon('t/edit', $strsettings));
}
// role assignment link
if (has_capability('moodle/course:enrolreview', $coursecontext)) {
echo $OUTPUT->action_icon(new moodle_url('/enrol/users.php', array('id' => $acourse->id)),
new pix_icon('i/users', get_string('enrolledusers', 'enrol')));
}
if (can_delete_course($acourse->id)) {
echo $OUTPUT->action_icon(new moodle_url('/course/delete.php', array('id' => $acourse->id)),
new pix_icon('t/delete', $strdelete));
}
// MDL-8885, users with no capability to view hidden courses, should not be able to lock themselves out
if (has_capability('moodle/course:visibility', $coursecontext) && has_capability('moodle/course:viewhiddencourses', $coursecontext)) {
if (!empty($acourse->visible)) {
echo $OUTPUT->action_icon(new moodle_url('/course/category.php',
array('id' => $category->id, 'page' => $page, 'perpage' => $perpage,
'hide' => $acourse->id, 'sesskey' => sesskey())),
new pix_icon('t/hide', $strhide));
} else {
echo $OUTPUT->action_icon(new moodle_url('/course/category.php',
array('id' => $category->id, 'page' => $page, 'perpage' => $perpage,
'show' => $acourse->id, 'sesskey' => sesskey())),
new pix_icon('t/show', $strshow));
}
}
if (has_capability('moodle/backup:backupcourse', $coursecontext)) {
echo $OUTPUT->action_icon(new moodle_url('/backup/backup.php', array('id' => $acourse->id)),
new pix_icon('t/backup', $strbackup));
}
if (has_capability('moodle/restore:restorecourse', $coursecontext)) {
echo $OUTPUT->action_icon(new moodle_url('/backup/restorefile.php', array('contextid' => $coursecontext->id)),
new pix_icon('t/restore', $strrestore));
}
if (has_capability('moodle/category:manage', $context)) {
if ($up) {
echo $OUTPUT->action_icon(new moodle_url('/course/category.php',
array('id' => $category->id, 'page' => $page, 'perpage' => $perpage,
'moveup' => $acourse->id, 'sesskey' => sesskey())),
new pix_icon('t/up', $strmoveup));
}
if ($down) {
echo $OUTPUT->action_icon(new moodle_url('/course/category.php',
array('id' => $category->id, 'page' => $page, 'perpage' => $perpage,
'movedown' => $acourse->id, 'sesskey' => sesskey())),
new pix_icon('t/down', $strmovedown));
}
$abletomovecourses = true;
}
echo '</td>';
echo '<td align="center">';
echo '<input type="checkbox" name="c'.$acourse->id.'" />';
echo '</td>';
} else {
echo '<td align="right">';
// print enrol info
if ($icons = enrol_get_course_info_icons($acourse)) {
foreach ($icons as $pix_icon) {
echo $OUTPUT->render($pix_icon);
}
}
if (!empty($acourse->summary)) {
$link = new moodle_url("/course/info.php?id=$acourse->id");
echo $OUTPUT->action_link($link, '<img alt="'.get_string('info').'" class="icon" src="'.$OUTPUT->pix_url('i/info') . '" />',
new popup_action('click', $link, 'courseinfo'), array('title'=>$strsummary));
}
echo "</td>";
$linkcss = $acourse->visible ? '' : ' class="dimmed" ';
echo '<tr>';
echo '<td><a '.$linkcss.' href="view.php?id='.$acourse->id.'">'. format_string($acourse->fullname) .'</a></td>';
if ($editingon) {
echo '<td>';
if (has_capability('moodle/course:update', $coursecontext)) {
$url = new moodle_url('/course/edit.php', array('id' => $acourse->id, 'category' => $id, 'returnto' => 'category'));
echo $OUTPUT->action_icon($url, new pix_icon('t/edit', get_string('settings')));
}
echo "</tr>";
// role assignment link
if (has_capability('moodle/course:enrolreview', $coursecontext)) {
$url = new moodle_url('/enrol/users.php', array('id' => $acourse->id));
echo $OUTPUT->action_icon($url, new pix_icon('i/users', get_string('enrolledusers', 'enrol')));
}
if (can_delete_course($acourse->id)) {
$url = new moodle_url('/course/delete.php', array('id' => $acourse->id));
echo $OUTPUT->action_icon($url, new pix_icon('t/delete', get_string('delete')));
}
// MDL-8885, users with no capability to view hidden courses, should not be able to lock themselves out
if (has_capability('moodle/course:visibility', $coursecontext) && has_capability('moodle/course:viewhiddencourses', $coursecontext)) {
if (!empty($acourse->visible)) {
$url = new moodle_url($baseurl, array('hide' => $acourse->id));
echo $OUTPUT->action_icon($url, new pix_icon('t/hide', get_string('hide')));
} else {
$url = new moodle_url($baseurl, array('show' => $acourse->id));
echo $OUTPUT->action_icon($url, new pix_icon('t/show', get_string('show')));
}
}
if (has_capability('moodle/backup:backupcourse', $coursecontext)) {
$url = new moodle_url('/backup/backup.php', array('id' => $acourse->id));
echo $OUTPUT->action_icon($url, new pix_icon('t/backup', get_string('backup')));
}
if (has_capability('moodle/restore:restorecourse', $coursecontext)) {
$url = new moodle_url('/backup/restorefile.php', array('contextid' => $coursecontext->id));
echo $OUTPUT->action_icon($url, new pix_icon('t/restore', get_string('restore')));
}
if ($canmanage) {
if ($up) {
$url = new moodle_url($baseurl, array('moveup' => $acourse->id));
echo $OUTPUT->action_icon($url, new pix_icon('t/up', get_string('moveup')));
}
if ($down) {
$url = new moodle_url($baseurl, array('movedown' => $acourse->id));
echo $OUTPUT->action_icon($url, new pix_icon('t/down', get_string('movedown')));
}
$abletomovecourses = true;
}
echo '</td>';
echo '<td align="center">';
echo '<input type="checkbox" name="c'.$acourse->id.'" />';
echo '</td>';
} else {
echo '<td align="right">';
// print enrol info
if ($icons = enrol_get_course_info_icons($acourse)) {
foreach ($icons as $pix_icon) {
echo $OUTPUT->render($pix_icon);
}
}
if (!empty($acourse->summary)) {
$url = new moodle_url("/course/info.php?id=$acourse->id");
echo $OUTPUT->action_link($url, '<img alt="'.get_string('info').'" class="icon" src="'.$OUTPUT->pix_url('i/info') . '" />',
new popup_action('click', $url, 'courseinfo'), array('title'=>get_string('summary')));
}
echo "</td>";
}
if ($abletomovecourses) {
$movetocategories = array();
$notused = array();
make_categories_list($movetocategories, $notused, 'moodle/category:manage');
$movetocategories[$category->id] = get_string('moveselectedcoursesto');
echo '<tr><td colspan="3" align="right">';
echo html_writer::select($movetocategories, 'moveto', $category->id, null, array('id'=>'movetoid'));
$PAGE->requires->js_init_call('M.util.init_select_autosubmit', array('movecourses', 'movetoid', false));
echo '<input type="hidden" name="id" value="'.$category->id.'" />';
echo '</td></tr>';
}
echo '</table>';
echo '</div></form>';
echo '<br />';
echo "</tr>";
}
echo '<div class="buttons">';
if (has_capability('moodle/category:manage', $context) and $numcourses > 1) {
/// Print button to re-sort courses by name
unset($options);
$options['id'] = $category->id;
$options['resort'] = 'name';
$options['sesskey'] = sesskey();
echo $OUTPUT->single_button(new moodle_url('category.php', $options), get_string('resortcoursesbyname'), 'get');
if ($abletomovecourses) {
$movetocategories = array();
$notused = array();
make_categories_list($movetocategories, $notused, 'moodle/category:manage');
$movetocategories[$category->id] = get_string('moveselectedcoursesto');
echo '<tr><td colspan="3" align="right">';
echo html_writer::select($movetocategories, 'moveto', $category->id, null, array('id'=>'movetoid'));
$PAGE->requires->js_init_call('M.util.init_select_autosubmit', array('movecourses', 'movetoid', false));
echo '<input type="hidden" name="id" value="'.$category->id.'" />';
echo '</td></tr>';
}
if (has_capability('moodle/course:create', $context)) {
/// Print button to create a new course
unset($options);
$options['category'] = $category->id;
$options['returnto'] = 'category';
echo $OUTPUT->single_button(new moodle_url('edit.php', $options), get_string('addnewcourse'), 'get');
}
echo '</table>';
echo '</div></form>';
echo '<br />';
}
if (!empty($CFG->enablecourserequests) && $category->id == $CFG->defaultrequestcategory) {
print_course_request_buttons(get_context_instance(CONTEXT_SYSTEM));
}
echo '</div>';
echo '<div class="buttons">';
if ($canmanage and $numcourses > 1) {
// Print button to re-sort courses by name
$url = new moodle_url('/course/category.php', array('id' => $category->id, 'resort' => 'name', 'sesskey' => sesskey()));
echo $OUTPUT->single_button($url, get_string('resortcoursesbyname'), 'get');
}
print_course_search();
if (has_capability('moodle/course:create', $context)) {
// Print button to create a new course
$url = new moodle_url('/course/edit.php', array('category' => $category->id, 'returnto' => 'category'));
echo $OUTPUT->single_button($url, get_string('addnewcourse'), 'get');
}
echo $OUTPUT->footer();
if (!empty($CFG->enablecourserequests) && $category->id == $CFG->defaultrequestcategory) {
print_course_request_buttons(get_context_instance(CONTEXT_SYSTEM));
}
echo '</div>';
print_course_search();
echo $OUTPUT->footer();
+14 -6
View File
@@ -18,17 +18,21 @@ M.core_completion.init = function(Y) {
} else {
var current = args.state.get('value');
var modulename = args.modulename.get('value');
if (current == 1) {
var altstr = M.str.completion['completion-alt-manual-y'].replace('{$a}', modulename);
var titlestr = M.str.completion['completion-title-manual-y'].replace('{$a}', modulename);
args.state.set('value', 0);
args.image.set('src', M.util.image_url('i/completion-manual-y', 'moodle'));
args.image.set('alt', M.str.completion['completion-alt-manual-y']);
args.image.set('title', M.str.completion['completion-title-manual-y']);
args.image.set('alt', altstr);
args.image.set('title', titlestr);
} else {
var altstr = M.str.completion['completion-alt-manual-n'].replace('{$a}', modulename);
var titlestr = M.str.completion['completion-title-manual-n'].replace('{$a}', modulename);
args.state.set('value', 1);
args.image.set('src', M.util.image_url('i/completion-manual-n', 'moodle'));
args.image.set('alt', M.str.completion['completion-alt-manual-n']);
args.image.set('title', M.str.completion['completion-title-manual-n']);
args.image.set('alt', altstr);
args.image.set('title', titlestr);
}
}
@@ -48,6 +52,7 @@ M.core_completion.init = function(Y) {
var completionstate = 0;
var state = null;
var image = null;
var modulename = null;
var inputs = Y.Node.getDOMNode(form).getElementsByTagName('input');
for (var i=0; i<inputs.length; i++) {
@@ -59,6 +64,9 @@ M.core_completion.init = function(Y) {
completionstate = inputs[i].value;
state = Y.one(inputs[i]);
break;
case 'modulename':
modulename = Y.one(inputs[i]);
break;
}
if (inputs[i].type == 'image') {
image = Y.one(inputs[i]);
@@ -76,7 +84,7 @@ M.core_completion.init = function(Y) {
success: handle_success,
failure: handle_failure
},
arguments: {state: state, image: image, ajax: ajax}
arguments: {state: state, image: image, ajax: ajax, modulename: modulename}
};
Y.use('io', function(Y) {
+18 -26
View File
@@ -103,56 +103,48 @@ if ($form->is_cancelled()){
// Handle aggregation methods
// Overall aggregation
$aggregation = new completion_aggregation();
$aggregation->course = $data->id;
$aggregation->criteriatype = null;
$aggdata = array(
'course' => $data->id,
'criteriatype' => null
);
$aggregation = new completion_aggregation($aggdata);
$aggregation->setMethod($data->overall_aggregation);
$aggregation->insert();
$aggregation->save();
// Activity aggregation
if (empty($data->activity_aggregation)) {
$data->activity_aggregation = 0;
}
$aggregation = new completion_aggregation();
$aggregation->course = $data->id;
$aggregation->criteriatype = COMPLETION_CRITERIA_TYPE_ACTIVITY;
$aggdata['criteriatype'] = COMPLETION_CRITERIA_TYPE_ACTIVITY;
$aggregation = new completion_aggregation($aggdata);
$aggregation->setMethod($data->activity_aggregation);
$aggregation->insert();
$aggregation->save();
// Course aggregation
if (empty($data->course_aggregation)) {
$data->course_aggregation = 0;
}
$aggregation = new completion_aggregation();
$aggregation->course = $data->id;
$aggregation->criteriatype = COMPLETION_CRITERIA_TYPE_COURSE;
$aggdata['criteriatype'] = COMPLETION_CRITERIA_TYPE_COURSE;
$aggregation = new completion_aggregation($aggdata);
$aggregation->setMethod($data->course_aggregation);
$aggregation->insert();
$aggregation->save();
// Role aggregation
if (empty($data->role_aggregation)) {
$data->role_aggregation = 0;
}
$aggregation = new completion_aggregation();
$aggregation->course = $data->id;
$aggregation->criteriatype = COMPLETION_CRITERIA_TYPE_ROLE;
$aggdata['criteriatype'] = COMPLETION_CRITERIA_TYPE_ROLE;
$aggregation = new completion_aggregation($aggdata);
$aggregation->setMethod($data->role_aggregation);
$aggregation->insert();
$aggregation->save();
// Update course total passing grade
if (!empty($data->criteria_grade)) {
if ($grade_item = grade_category::fetch_course_category($course->id)->grade_item) {
$grade_item->gradepass = $data->criteria_grade_value;
if (method_exists($grade_item, 'update')) {
$grade_item->update('course/completion.php');
}
}
}
add_to_log($course->id, 'course', 'completion updated', 'completion.php?id='.$course->id);
redirect($CFG->wwwroot."/course/view.php?id=$course->id", get_string('changessaved'));
$url = new moodle_url('/course/view.php', array('id' => $course->id));
redirect($url);
}
+4 -1
View File
@@ -179,10 +179,13 @@ class course_completion_form extends moodleform {
$criteria->config_form_display($mform);
// Completion on course grade
$mform->addElement('header', 'grade', get_string('grade'));
$mform->addElement('header', 'grade', get_string('coursegrade', 'completion'));
// Grade enable and passing grade
$course_grade = $DB->get_field('grade_items', 'gradepass', array('courseid' => $course->id, 'itemtype' => 'course'));
if (!$course_grade) {
$course_grade = '0.00000';
}
$criteria = new completion_criteria_grade($params);
$criteria->config_form_display($mform, $course_grade);
+7
View File
@@ -85,6 +85,13 @@ if (!empty($course)) {
//editor should respect category context if course context is not set.
$editoroptions['context'] = $catcontext;
$course = file_prepare_standard_editor($course, 'summary', $editoroptions, null, 'course', 'summary', null);
// Set up the default restricted module list
if (!empty($CFG->restrictbydefault)) {
if (!empty($CFG->defaultallowedmodules)) {
$course->allowedmods = explode(',', $CFG->defaultallowedmodules);
}
}
}
// first create the form
+42
View File
@@ -1,9 +1,29 @@
<?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/>.
/**
* Page for creating or editing course category name/parent/description.
* When called with an id parameter, edits the category with that id.
* Otherwise it creates a new category with default parent from the parent
* parameter, which may be 0.
*
* @package core
* @subpackage course
* @copyright 2007 Nicolas Connault
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once('../config.php');
@@ -107,6 +127,28 @@ if ($mform->is_cancelled()) {
redirect('category.php?id='.$newcategory->id.'&categoryedit=on');
}
// Unfortunately the navigation never generates correctly for this page because technically this page doesn't actually
// exist on the navigation; you get here through the course management page.
// First up we'll try to make the course management page active seeing as that is where the user thinks they are.
// The big prolem here is that the course management page is a common page for both editing users and common users and
// is only added to the admin tree if the user has permission to edit at the system level.
$node = $PAGE->settingsnav->get('root');
if ($node) {
$node = $node->get('courses');
if ($node) {
$node = $node->get('coursemgmt');
}
}
if ($node) {
// The course management page exists so make that active.
$node->make_active();
} else {
// Failing that we'll override the URL, not as accurate and chances are things
// won't be 100% correct all the time but should work most times.
// A common reason to arrive here is having the management capability within only a particular category (not at system level).
navigation_node::override_active_url(new moodle_url('/course/index.php', array('categoryedit' => 'on')));
}
$PAGE->set_title($title);
$PAGE->set_heading($fullname);
echo $OUTPUT->header();
+1 -1
View File
@@ -52,7 +52,7 @@ class moodle_course_external extends external_api {
* @param array $options
* @return array
*/
public static function get_courses($options) {
public static function get_courses($options = array()) {
global $CFG, $DB;
require_once($CFG->dirroot . "/course/lib.php");
+1 -1
View File
@@ -69,7 +69,7 @@ function callback_topics_request_key() {
function callback_topics_get_section_name($course, $section) {
// We can't add a node without any text
if (!empty($section->name)) {
if ((string)$section->name !== '') {
return format_string($section->name, true, array('context' => get_context_instance(CONTEXT_COURSE, $course->id)));
} else if ($section->section == 0) {
return get_string('section0name', 'format_topics');
+1 -1
View File
@@ -76,7 +76,7 @@ function callback_weeks_request_key() {
*/
function callback_weeks_get_section_name($course, $section) {
// We can't add a node without text
if (!empty($section->name)) {
if ((string)$section->name !== '') {
// Return the name the user set
return format_string($section->name, true, array('context' => get_context_instance(CONTEXT_COURSE, $course->id)));
} else if ($section->section == 0) {
+2 -1
View File
@@ -177,6 +177,7 @@ if (!$categories = get_categories()) { /// No category yet!
$tempcat->context = get_context_instance(CONTEXT_COURSECAT, $tempcat->id);
mark_context_dirty('/'.SYSCONTEXTID);
fix_course_sortorder(); // Required to build course_categories.depth and .path.
set_config('defaultrequestcategory', $tempcat->id);
}
/// Move a category to a new parent if required
@@ -394,4 +395,4 @@ function print_category_edit($category, $displaylist, $parentslist, $depth=-1, $
print_category_edit($cat, $displaylist, $parentslist, $depth+1, $up, $down);
}
}
}
}
+12 -4
View File
@@ -1719,9 +1719,9 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
}
if ($completionicon) {
$imgsrc = $OUTPUT->pix_url('i/completion-'.$completionicon);
$imgalt = s(get_string('completion-alt-'.$completionicon, 'completion'));
$imgalt = s(get_string('completion-alt-'.$completionicon, 'completion', $mod->name));
if ($completion == COMPLETION_TRACKING_MANUAL && !$isediting) {
$imgtitle = s(get_string('completion-title-'.$completionicon, 'completion'));
$imgtitle = s(get_string('completion-title-'.$completionicon, 'completion', $mod->name));
$newstate =
$completiondata->completionstate==COMPLETION_COMPLETE
? COMPLETION_INCOMPLETE
@@ -1740,6 +1740,7 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
echo "
<form class='togglecompletion$extraclass' method='post' action='".$CFG->wwwroot."/course/togglecompletion.php'><div>
<input type='hidden' name='id' value='{$mod->id}' />
<input type='hidden' name='modulename' value='".s($mod->name)."' />
<input type='hidden' name='sesskey' value='".sesskey()."' />
<input type='hidden' name='completionstate' value='$newstate' />
<input type='image' src='$imgsrc' alt='$imgalt' title='$imgtitle' />
@@ -1762,7 +1763,7 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
// see the activity itself, or for staff)
if (!$mod->uservisible) {
echo '<div class="availabilityinfo">'.$mod->availableinfo.'</div>';
} else if ($canviewhidden && !empty($CFG->enableavailability)) {
} else if ($canviewhidden && !empty($CFG->enableavailability) && $mod->visible) {
$ci = new condition_info($mod);
$fullinfo = $ci->get_full_information();
if($fullinfo) {
@@ -2076,6 +2077,11 @@ function get_course_category_tree($id = 0, $depth = 0) {
return array($categories, $categoryids);
}
if (empty($categoryids)) {
// No categories available (probably all hidden).
return array();
}
// The depth is 0 this function has just been called so we can finish it off
list($ccselect, $ccjoin) = context_instance_preload_sql('c.id', CONTEXT_COURSE, 'ctx');
@@ -2835,6 +2841,8 @@ function delete_course_module($id) {
// very quick on an empty table)
$DB->delete_records('course_modules_completion', array('coursemoduleid' => $cm->id));
$DB->delete_records('course_modules_availability', array('coursemoduleid'=> $cm->id));
$DB->delete_records('course_completion_criteria', array('moduleinstance' => $cm->id,
'criteriatype' => COMPLETION_CRITERIA_TYPE_ACTIVITY));
delete_context(CONTEXT_MODULE, $cm->id);
return $DB->delete_records('course_modules', array('id'=>$cm->id));
@@ -3770,7 +3778,7 @@ function create_course($data, $editoroptions = NULL) {
fix_course_sortorder();
// update module restrictions
if ($course->restrictmodules) {
if ($course->restrictmodules || $CFG->restrictbydefault ) {
if (isset($data->allowedmods)) {
update_restricted_mods($course, $data->allowedmods);
} else {
+11 -8
View File
@@ -78,7 +78,7 @@ $PAGE->navbar->add($userinfo);
$PAGE->set_title("$course->shortname: $strrecentactivity");
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();
echo $OUTPUT->heading(format_string($course->fullname) . ": $userinfo", 3);
echo $OUTPUT->heading(format_string($course->fullname) . ": $userinfo", 2);
$mform->display();
@@ -221,7 +221,9 @@ if (!empty($activities)) {
echo $OUTPUT->spacer(array('height'=>30, 'br'=>true)); // should be done with CSS instead
}
echo $OUTPUT->box_start();
echo "<h2>$activity->name</h2>";
if (!empty($activity->name)) {
echo html_writer::tag('h2', $activity->name);
}
$inbox = true;
} else if ($activity->type == 'activity') {
@@ -230,16 +232,17 @@ if (!empty($activities)) {
$cm = $modinfo->cms[$activity->cmid];
if ($cm->visible) {
$linkformat = '';
$class = '';
} else {
$linkformat = 'class="dimmed"';
$class = 'dimmed';
}
$name = format_string($cm->name);
$modfullname = $modnames[$cm->modname];
$image = "<img src=\"" . $OUTPUT->pix_url('icon', $cm->modname) . "\" class=\"icon\" alt=\"$modfullname\" />";
echo "<h4>$image $modfullname".
" <a href=\"$CFG->wwwroot/mod/$cm->modname/view.php?id=$cm->id\" $linkformat>$name</a></h4>";
$image = $OUTPUT->pix_icon('icon', $modfullname, $cm->modname, array('class' => 'icon smallicon'));
$link = html_writer::link(new moodle_url("/mod/$cm->modname/view.php",
array("id" => $cm->id)), $name, array('class' => $class));
echo html_writer::tag('h3', "$image $modfullname $link");
}
} else {
@@ -269,7 +272,7 @@ if (!empty($activities)) {
} else {
echo '<h4><center>' . get_string('norecentactivity') . '</center></h2>';
echo html_writer::tag('h3', get_string('norecentactivity'), array('class' => 'mdl-align'));
}
+11 -12
View File
@@ -90,6 +90,9 @@ if($group === 0 && $course->groupmode == SEPARATEGROUPS) {
* Load data
*/
// Retrieve course_module data for all modules in the course
$modinfo = get_fast_modinfo($course);
// Get criteria for course
$completion = new completion_info($course);
@@ -333,6 +336,7 @@ if(!$csv) {
exit;
}
print '<div id="completion-progress-wrapper" class="no-overflow">';
print '<table id="completion-progress" class="generaltable flexible boxaligncenter completionreport" style="text-align: left" cellpadding="5" border="1">';
// Print criteria group names
@@ -486,13 +490,10 @@ if(!$csv) {
switch ($criterion->criteriatype) {
case COMPLETION_CRITERIA_TYPE_ACTIVITY:
// Load activity
$activity = $criterion->get_mod_instance();
// Display icon
$icon = $OUTPUT->pix_url('icon', $criterion->module);
$iconlink = $CFG->wwwroot.'/mod/'.$criterion->module.'/view.php?id='.$criterion->moduleinstance;
$icontitle = $activity->name;
$icontitle = $modinfo->cms[$criterion->moduleinstance]->name;
$iconalt = get_string('modulename', $criterion->module);
break;
@@ -574,10 +575,7 @@ foreach ($progress as $user) {
if ($criterion->criteriatype == COMPLETION_CRITERIA_TYPE_ACTIVITY) {
// Load activity
$mod = $criterion->get_mod_instance();
$activity = $DB->get_record('course_modules', array('id' => $criterion->moduleinstance));
$activity->name = $mod->name;
$activity = $modinfo->cms[$criterion->moduleinstance];
// Get progress information and state
if(array_key_exists($activity->id,$user->progress)) {
@@ -603,7 +601,7 @@ foreach ($progress as $user) {
($activity->completion==COMPLETION_TRACKING_AUTOMATIC ? 'auto' : 'manual').
'-'.$completiontype;
$describe=get_string('completion-alt-auto-'.$completiontype,'completion');
$describe = get_string('completion-' . $completiontype, 'completion');
$a=new StdClass;
$a->state=$describe;
$a->date=$date;
@@ -632,7 +630,7 @@ foreach ($progress as $user) {
$completiontype = $is_complete ? 'y' : 'n';
$completionicon = 'completion-auto-'.$completiontype;
$describe = get_string('completion-alt-auto-'.$completiontype, 'completion');
$describe = get_string('completion-' . $completiontype, 'completion');
$a = new stdClass();
$a->state = $describe;
@@ -646,7 +644,7 @@ foreach ($progress as $user) {
} else {
if ($allow_marking_criteria === $criterion->id) {
$describe = get_string('completion-alt-auto-'.$completiontype,'completion');
$describe = get_string('completion-' . $completiontype, 'completion');
print '<td class="completion-progresscell">'.
'<a href="'.$CFG->wwwroot.'/course/togglecompletion.php?user='.$user->id.'&amp;course='.$course->id.'&amp;rolec='.$allow_marking_criteria.'&amp;sesskey='.sesskey().'">'.
@@ -671,7 +669,7 @@ foreach ($progress as $user) {
$ccompletion = new completion_completion($params);
$completiontype = $ccompletion->is_complete() ? 'y' : 'n';
$describe = get_string('completion-alt-auto-'.$completiontype, 'completion');
$describe = get_string('completion-' . $completiontype, 'completion');
$a = new StdClass;
$a->state = $describe;
@@ -704,6 +702,7 @@ if($csv) {
exit;
}
print '</table>';
print '</div>';
print $pagingbar;
print '<ul class="progress-actions"><li><a href="index.php?course='.$course->id.
+1 -1
View File
@@ -22,7 +22,7 @@
$group = optional_param('group', 0, PARAM_INT); // Group to display
$user = optional_param('user', 0, PARAM_INT); // User to display
$date = optional_param('date', 0, PARAM_FILE); // Date to display - number or some string
$date = optional_param('date', 0, PARAM_INT); // Date to display
$modname = optional_param('modname', '', PARAM_SAFEDIR); // course_module->id
$modid = optional_param('modid', 0, PARAM_FILE); // number or 'site_errors'
$modaction = optional_param('modaction', '', PARAM_PATH); // an action as recorded in the logs
+3 -1
View File
@@ -259,6 +259,7 @@ if(!$csv) {
exit;
}
print '<div id="completion-progress-wrapper" class="no-overflow">';
print '<table id="completion-progress" class="generaltable flexible boxaligncenter" style="text-align:left"><tr style="vertical-align:top">';
// User heading / sort option
@@ -364,7 +365,7 @@ foreach($progress as $user) {
($activity->completion==COMPLETION_TRACKING_AUTOMATIC ? 'auto' : 'manual').
'-'.$completiontype;
$describe=get_string('completion-alt-auto-'.$completiontype,'completion');
$describe = get_string('completion-' . $completiontype, 'completion');
$a=new StdClass;
$a->state=$describe;
$a->date=$date;
@@ -392,6 +393,7 @@ if($csv) {
exit;
}
print '</table>';
print '</div>';
print $pagingbar;
print '<ul class="progress-actions"><li><a href="index.php?course='.$course->id.
+1 -1
View File
@@ -39,7 +39,7 @@ if (!$course = $DB->get_record('course', array('id'=>$id))) {
$PAGE->set_url('/course/reset.php', array('id'=>$id));
require_login($course);
require_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $course->id));
require_capability('moodle/course:reset', get_context_instance(CONTEXT_COURSE, $course->id));
$strreset = get_string('reset');
$strresetcourse = get_string('resetcourse');
+75 -58
View File
@@ -15,10 +15,19 @@
$blocklist = optional_param('blocklist', 0, PARAM_INT);
$modulelist= optional_param('modulelist', '', PARAM_ALPHAEXT);
$PAGE->set_url('/course/search.php', compact('search', 'page', 'perpage', 'blocklist', 'modulelist', 'edit'));
$PAGE->set_context(get_context_instance(CONTEXT_SYSTEM));
$search = trim(strip_tags($search)); // trim & clean raw searched string
// List of minimum capabilities which user need to have for editing/moving course
$capabilities = array('moodle/course:create', 'moodle/category:manage');
// List of category id's in which current user has course:create and category:manage capability.
$usercatlist = array();
// List of parent category id's
$catparentlist = array();
//Populate usercatlist with list of category id's with required capabilities.
make_categories_list($usercatlist, $catparentlist, $capabilities);
$search = trim(strip_tags($search)); // trim & clean raw searched string
if ($search) {
$searchterms = explode(" ", $search); // Search for words independently
foreach ($searchterms as $key => $searchterm) {
@@ -32,7 +41,7 @@
$site = get_site();
$urlparams = array();
foreach (array('search', 'page', 'blocklist', 'modulelist') as $param) {
foreach (array('search', 'page', 'blocklist', 'modulelist', 'edit') as $param) {
if (!empty($$param)) {
$urlparams[$param] = $$param;
}
@@ -48,11 +57,17 @@
require_login();
}
if (can_edit_in_category()) {
//Editing is possible if user have system or category level create and manage capability
if (can_edit_in_category() || !empty($usercatlist)) {
if ($edit !== -1) {
$USER->editing = $edit;
}
$adminediting = $PAGE->user_is_editing();
// Set perpage if user can edit in category
if ($perpage != 99999) {
$perpage = 30;
}
} else {
$adminediting = false;
}
@@ -74,11 +89,6 @@
}
}
$capabilities = array('moodle/course:create', 'moodle/category:manage');
if (has_any_capability($capabilities, get_context_instance(CONTEXT_SYSTEM)) && ($perpage != 99999)) {
$perpage = 30;
}
$displaylist = array();
$parentlist = array();
make_categories_list($displaylist, $parentlist);
@@ -94,7 +104,7 @@
$strfrontpage = get_string('frontpage', 'admin');
$strnovalidcourses = get_string('novalidcourses');
if (empty($search) and empty($blocklist) and empty($modulelist)) {
if (empty($search) and empty($blocklist) and empty($modulelist) and empty($moveto) and ($edit != -1)) {
$PAGE->navbar->add($strcourses, new moodle_url('/course/index.php'));
$PAGE->navbar->add($strsearch);
$PAGE->set_title("$site->fullname : $strsearch");
@@ -114,18 +124,28 @@
exit;
}
$courses = array();
if (!empty($moveto) and $data = data_submitted() and confirm_sesskey()) { // Some courses are being moved
if (! $destcategory = $DB->get_record("course_categories", array("id"=>$data->moveto))) {
print_error('cannotfindcategory', '', '', $data->moveto);
if (!$destcategory = $DB->get_record("course_categories", array("id" => $moveto))) {
print_error('cannotfindcategory', '', '', $moveto);
}
$courses = array();
//User should have manage and create capablity on destination category.
require_capability('moodle/category:manage', get_context_instance(CONTEXT_COURSECAT, $moveto));
require_capability('moodle/course:create', get_context_instance(CONTEXT_COURSECAT, $moveto));
foreach ( $data as $key => $value ) {
if (preg_match('/^c\d+$/', $key)) {
array_push($courses, substr($key, 1));
$courseid = substr($key, 1);
// user must have category:manage and course:create capability for the course to be moved.
$coursecontext = get_context_instance(CONTEXT_COURSE, $courseid);
foreach ($capabilities as $capability) {
require_capability($capability, $coursecontext);
array_push($courses, $courseid);
}
}
}
move_courses($courses, $data->moveto);
move_courses($courses, $moveto);
}
// get list of courses containing blocks if required
@@ -148,9 +168,7 @@
foreach ($courses as $course) {
$courses[$course->id] = $course;
}
}
// get list of courses containing modules if required
elseif (!empty($modulelist) and confirm_sesskey()) {
} elseif (!empty($modulelist) and confirm_sesskey()) { // get list of courses containing modules
$modulename = $modulelist;
$sql = "SELECT DISTINCT c.id FROM {".$modulelist."} module, {course} c"
." WHERE module.course=c.id";
@@ -172,34 +190,26 @@
else {
$totalcount = 0;
}
}
else {
} else if (!empty($searchterm)) { //Donot do search for empty search request.
$courses = get_courses_search($searchterms, "fullname ASC",
$page, $perpage, $totalcount);
}
$searchform = print_course_search($search, true, "navbar");
if (!empty($courses) && has_capability('moodle/course:create', get_context_instance(CONTEXT_SYSTEM))) {
$searchform = '';
// not sure if this capability is the best here
if (has_capability('moodle/category:manage', get_context_instance(CONTEXT_SYSTEM))) {
if ($PAGE->user_is_editing()) {
$string = get_string("turneditingoff");
$edit = "off";
} else {
$string = get_string("turneditingon");
$edit = "on";
}
$aurl = new moodle_url("$CFG->wwwroot/course/search.php", array(
'edit' => $edit,
'sesskey' => sesskey(),
'search' => $search,
'page' => $page,
'perpage' => $perpage));
$searchform = $OUTPUT->single_button($aurl, $string, 'get');
$searchform = '';
//Turn editing should be visible if user have system or category level capability
if (!empty($courses) && (can_edit_in_category() || !empty($usercatlist))) {
if ($PAGE->user_is_editing()) {
$string = get_string("turneditingoff");
$edit = "off";
} else {
$string = get_string("turneditingon");
$edit = "on";
}
$params = array_merge($urlparams, array('sesskey' => sesskey(), 'edit' => $edit));
$aurl = new moodle_url("$CFG->wwwroot/course/search.php", $params);
$searchform = $OUTPUT->single_button($aurl, $string, 'get');
} else {
$searchform = print_course_search($search, true, "navbar");
}
$PAGE->navbar->add($strcourses, new moodle_url('/course/index.php'));
@@ -228,25 +238,30 @@
print_navigation_bar($totalcount, $page, $perpage, $encodedsearch, $modulelink);
if (!$adminediting) {
// Show list of courses
if (!$adminediting) { //Not editing mode
foreach ($courses as $course) {
$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
$course->summary .= "<br /><p class=\"category\">";
$course->summary .= "$strcategory: <a href=\"category.php?id=$course->category\">";
$course->summary .= $displaylist[$course->category];
$course->summary .= "</a></p>";
// front page don't belong to any category and block can exist.
if ($course->category > 0) {
$course->summary .= "<br /><p class=\"category\">";
$course->summary .= "$strcategory: <a href=\"category.php?id=$course->category\">";
$course->summary .= $displaylist[$course->category];
$course->summary .= "</a></p>";
}
print_course($course, $search);
echo $OUTPUT->spacer(array('height'=>5, 'width'=>5, 'br'=>true)); // should be done with CSS instead
}
} else {
/// Show editing UI.
} else { //editing mode
echo "<form id=\"movecourses\" action=\"search.php\" method=\"post\">\n";
echo "<div><input type=\"hidden\" name=\"sesskey\" value=\"".sesskey()."\" />\n";
echo "<input type=\"hidden\" name=\"search\" value=\"".s($search)."\" />\n";
echo "<input type=\"hidden\" name=\"page\" value=\"$page\" />\n";
echo "<input type=\"hidden\" name=\"perpage\" value=\"$perpage\" /></div>\n";
if (!empty($modulelist) and confirm_sesskey()) {
echo "<input type=\"hidden\" name=\"modulelist\" value=\"$modulelist\" /></div>\n";
} else if (!empty($blocklist) and confirm_sesskey()) {
echo "<input type=\"hidden\" name=\"blocklist\" value=\"$blocklist\" /></div>\n";
}
echo "<table border=\"0\" cellspacing=\"2\" cellpadding=\"4\" class=\"generalbox boxaligncenter\">\n<tr>\n";
echo "<th scope=\"col\">$strcourses</th>\n";
echo "<th scope=\"col\">$strcategory</th>\n";
@@ -278,9 +293,8 @@
echo "<td>".$displaylist[$course->category]."</td>\n";
echo "<td>\n";
// this is ok since this will get inherited from course category context
// if it is set
if (has_capability('moodle/category:manage', $coursecontext)) {
// If user has all required capabilities to move course then show selectable checkbox
if (has_all_capabilities($capabilities, $coursecontext)) {
echo "<input type=\"checkbox\" name=\"c$course->id\" />\n";
} else {
echo "<input type=\"checkbox\" name=\"c$course->id\" disabled=\"disabled\" />\n";
@@ -320,13 +334,15 @@
// checks whether user can do site backup
if (has_capability('moodle/backup:backupcourse', $coursecontext)) {
echo "<a title=\"".get_string("backup")."\" href=\"../backup/backup.php?id=$course->id\">\n<img".
$backupurl = new moodle_url('/backup/backup.php', array('id' => $course->id));
echo "<a title=\"".get_string("backup")."\" href=\"".$backupurl."\">\n<img".
" src=\"" . $OUTPUT->pix_url('t/backup') . "\" class=\"iconsmall\" alt=\"".get_string("backup")."\" /></a>\n ";
}
// checks whether user can do restore
if (has_capability('moodle/restore:restorecourse', $coursecontext)) {
echo "<a title=\"".get_string("restore")."\" href=\"../files/index.php?id=$course->id&amp;wdir=/backupdata\">\n<img".
$restoreurl = new moodle_url('/backup/restorefile.php', array('contextid' => $coursecontext->id));
echo "<a title=\"".get_string("restore")."\" href=\"".$restoreurl."\">\n<img".
" src=\"" . $OUTPUT->pix_url('t/restore') . "\" class=\"iconsmall\" alt=\"".get_string("restore")."\" /></a>\n ";
}
@@ -336,7 +352,8 @@
echo "<br />";
echo "<input type=\"button\" onclick=\"checkall()\" value=\"$strselectall\" />\n";
echo "<input type=\"button\" onclick=\"checknone()\" value=\"$strdeselectall\" />\n";
echo html_writer::select($displaylist, 'moveto', '', array(''=>get_string('moveselectedcoursesto')), array('id'=>'movetoid'));
//Select box should only show categories in which user has min capability to move course.
echo html_writer::select($usercatlist, 'moveto', '', array(''=>get_string('moveselectedcoursesto')), array('id'=>'movetoid'));
$PAGE->requires->js_init_call('M.util.init_select_autosubmit', array('movecourses', 'movetoid', false));
echo "</td>\n</tr>\n";
echo "</table>\n</form>";
+29
View File
@@ -0,0 +1,29 @@
<?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/>.
/**
* Defines message providers (types of message sent) for the PayPal enrolment plugin.
*
* @package enrol_authorize
* @copyright 2012 Andrew Davis
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$messageproviders = array(
'authorize_enrolment' => array(),
);
@@ -144,6 +144,7 @@ $string['invalidacctype'] = 'Invalid account type';
$string['isbusinesschecking'] = 'Is business checking?';
$string['logindesc'] = 'This option must be ON. <br /><br />Please ensure that you have turned <a href="{$a->url}">loginhttps ON</a> in Admin >> Variables >> Security.<br /><br />Turning this on will make Moodle use a secure https connection just for the login and payment pages.';
$string['logininfo'] = 'When configuring your Authorize.Net account, the login name is required and you must enter <strong>either</strong> the transaction key <strong>or</strong> the password in the appropriate box. We recommend you enter the transaction key due to security precautions.';
$string['messageprovider:authorize_enrolment'] = 'Authorize.Net enrolment messages';
$string['methodcc'] = 'Credit card';
$string['methodccdesc'] = 'Select credit card and accepted types below';
$string['methodecheck'] = 'eCheck (ACH)';
+1 -1
View File
@@ -233,7 +233,7 @@ function send_welcome_messages($orderdata) {
$a->profileurl = "$CFG->wwwroot/user/view.php?id=$lastuserid";
$a->paymenturl = "$CFG->wwwroot/enrol/authorize/index.php?user=$lastuserid";
$emailmessage = get_string('welcometocoursesemail', 'enrol_authorize', $a);
$subject = get_string("enrolmentnew", '', format_string($SITE->shortname, true, array('context' => get_context_instance(CONTEXT_COURSE, SITEID))));
$subject = get_string("enrolmentnew", 'enrol', format_string($SITE->shortname, true, array('context' => get_context_instance(CONTEXT_COURSE, SITEID))));
$eventdata = new stdClass();
$eventdata->modulename = 'moodle';
+1 -1
View File
@@ -26,6 +26,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2010081203;
$plugin->version = 2010081205;
$plugin->requires = 2010090501;
$plugin->cron = 180;
+29
View File
@@ -0,0 +1,29 @@
<?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/>.
/**
* Defines message providers (types of message sent) for the PayPal enrolment plugin.
*
* @package enrol_flatfile
* @copyright 2012 Andrew Davis
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$messageproviders = array(
'flatfile_enrolment' => array(),
);
@@ -30,6 +30,7 @@ $string['location'] = 'File location';
$string['mailadmin'] = 'Notify admin by email';
$string['mailstudents'] = 'Notify students by email';
$string['mailteachers'] = 'Notify teachers by email';
$string['messageprovider:flatfile_enrolment'] = 'Flat file enrolment messages';
$string['mapping'] = 'Flat file mapping';
$string['pluginname'] = 'Flat file (CSV)';
$string['pluginname_desc'] = 'This method will repeatedly check for and process a specially-formatted text file in the location that you specify.
+1 -1
View File
@@ -27,5 +27,5 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2010091400;
$plugin->version = 2010091401;
$plugin->cron = 60;
+29
View File
@@ -0,0 +1,29 @@
<?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/>.
/**
* Defines message providers (types of message sent) for the PayPal enrolment plugin.
*
* @package enrol_imsenterprise
* @copyright 2012 Andrew Davis
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$messageproviders = array(
'imsenterprise_enrolment' => array(),
);
@@ -54,6 +54,7 @@ $string['location'] = 'File location';
$string['logtolocation'] = 'Log file output location (blank for no logging)';
$string['mailadmins'] = 'Notify admin by email';
$string['mailusers'] = 'Notify users by email';
$string['messageprovider:imsenterprise_enrolment'] = 'IMS Enterprise enrolment messages';
$string['miscsettings'] = 'Miscellaneous';
$string['processphoto'] = 'Add user photo data to profile';
$string['processphotowarning'] = 'Warning: Image processing is likely to add a significant burden to the server. You are recommended not to activate this option if large numbers of students are expected to be processed.';
+1 -1
View File
@@ -26,5 +26,5 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2011013000;
$plugin->version = 2011013001;
$plugin->cron = 60;
+50 -27
View File
@@ -757,24 +757,21 @@ class course_enrolment_manager {
* @return array
*/
public function get_other_users_for_display(core_enrol_renderer $renderer, moodle_url $pageurl, $sort, $direction, $page, $perpage) {
global $CFG;
$userroles = $this->get_other_users($sort, $direction, $page, $perpage);
$roles = $this->get_all_roles();
$courseid = $this->get_course()->id;
$context = $this->get_context();
$now = time();
$extrafields = array();
if (!empty($CFG->extrauserselectorfields)) {
$extrafields = explode(',', $CFG->extrauserselectorfields);
}
$users = array();
foreach ($userroles as $userrole) {
if (!array_key_exists($userrole->id, $users)) {
$users[$userrole->id] = array(
'userid' => $userrole->id,
'courseid' => $courseid,
'picture' => new user_picture($userrole),
'firstname' => fullname($userrole, true),
'email' => $userrole->email,
'roles' => array()
);
$users[$userrole->id] = $this->prepare_user_for_display($userrole, $extrafields, $now);
}
$a = new stdClass;
$a->role = $roles[$userrole->roleid]->localname;
@@ -797,6 +794,7 @@ class course_enrolment_manager {
break;
}
}
$users[$userrole->id]['roles'] = array();
$users[$userrole->id]['roles'][$userrole->roleid] = array(
'text' => $roletext,
'unchangeable' => !$changeable
@@ -818,11 +816,11 @@ class course_enrolment_manager {
* @return array
*/
public function get_users_for_display(course_enrolment_manager $manager, $sort, $direction, $page, $perpage) {
global $CFG;
$pageurl = $manager->get_moodlepage()->url;
$users = $this->get_users($sort, $direction, $page, $perpage);
$now = time();
$strnever = get_string('never');
$straddgroup = get_string('addgroup', 'group');
$strunenrol = get_string('unenrol', 'enrol');
$stredit = get_string('edit');
@@ -830,42 +828,34 @@ class course_enrolment_manager {
$allroles = $this->get_all_roles();
$assignable = $this->get_assignable_roles();
$allgroups = $this->get_all_groups();
$courseid = $this->get_course()->id;
$context = $this->get_context();
$canmanagegroups = has_capability('moodle/course:managegroups', $context);
$url = new moodle_url($pageurl, $this->get_url_params());
$extrafields = array();
if (!empty($CFG->extrauserselectorfields)) {
$extrafields = explode(',', $CFG->extrauserselectorfields);
}
$userdetails = array();
foreach ($users as $user) {
$details = array(
'userid' => $user->id,
'courseid' => $courseid,
'picture' => new user_picture($user),
'firstname' => fullname($user, true),
'email' => $user->email,
'lastseen' => $strnever,
'roles' => array(),
'groups' => array(),
'enrolments' => array()
);
if ($user->lastaccess) {
$details['lastseen'] = format_time($now - $user->lastaccess);
}
$details = $this->prepare_user_for_display($user, $extrafields, $now);
// Roles
$details['roles'] = array();
foreach ($this->get_user_roles($user->id) as $rid=>$rassignable) {
$details['roles'][$rid] = array('text'=>$allroles[$rid]->localname, 'unchangeable'=>(!$rassignable || !isset($assignable[$rid])));
}
// Users
$usergroups = $this->get_user_groups($user->id);
$details['groups'] = array();
foreach($usergroups as $gid=>$unused) {
$details['groups'][$gid] = $allgroups[$gid]->name;
}
// Enrolments
$details['enrolments'] = array();
foreach ($this->get_user_enrolments($user->id) as $ue) {
if ($ue->timestart and $ue->timeend) {
$period = get_string('periodstartend', 'enrol', array('start'=>userdate($ue->timestart), 'end'=>userdate($ue->timeend)));
@@ -892,6 +882,39 @@ class course_enrolment_manager {
return $userdetails;
}
/**
* Prepare a user record for display
*
* This function is called by both {@link get_users_for_display} and {@link get_other_users_for_display} to correctly
* prepare user fields for display
*
* Please note that this function does not check capability for moodle/coures:viewhiddenuserfields
*
* @param object $user The user record
* @param array $extrafields The list of fields as returned from get_extra_user_fields used to determine which
* additional fields may be displayed
* @param int $now The time used for lastaccess calculation
* @return array The fields to be displayed including userid, courseid, picture, firstname, lastseen and any
* additional fields from $extrafields
*/
private function prepare_user_for_display($user, $extrafields, $now) {
$details = array(
'userid' => $user->id,
'courseid' => $this->get_course()->id,
'picture' => new user_picture($user),
'firstname' => fullname($user, has_capability('moodle/site:viewfullnames', $this->get_context())),
'lastseen' => get_string('never'),
);
foreach ($extrafields as $field) {
$details[$field] = $user->{$field};
}
if ($user->lastaccess) {
$details['lastseen'] = format_time($now - $user->lastaccess);
}
return $details;
}
public function get_manual_enrol_buttons() {
$plugins = $this->get_enrolment_plugins();
$buttons = array();
+1 -1
View File
@@ -26,4 +26,4 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2010071201;
$plugin->version = 2010071202;
+5 -1
View File
@@ -379,7 +379,11 @@ YUI.add('moodle-enrol_manual-quickenrolment', function(Y) {
params['role'] = this.get(UEP.BASE).one('.'+CSS.ENROLMENTOPTION+'.'+CSS.ROLE+' select').get('value');
params['startdate'] = this.get(UEP.BASE).one('.'+CSS.ENROLMENTOPTION+'.'+CSS.STARTDATE+' select').get('value');
params['duration'] = this.get(UEP.BASE).one('.'+CSS.ENROLMENTOPTION+'.'+CSS.DURATION+' select').get('value');
params['recovergrades'] = this.get(UEP.BASE).one('#'+CSS.RECOVERGRADES).get('checked')?1:0;
if (this.get(UEP.DISABLEGRADEHISTORY) != true) {
params['recovergrades'] = this.get(UEP.BASE).one('#'+CSS.RECOVERGRADES).get('checked')?1:0;
} else {
params['recovergrades'] = 0;
}
Y.io(M.cfg.wwwroot+this.get(UEP.AJAXURL), {
method:'POST',
+2
View File
@@ -145,6 +145,8 @@ class enrol_mnet_mnetservice_enrol {
// users {@link http://tracker.moodle.org/browse/MDL-21327}
$user = mnet_strip_user((object)$userdata, mnet_fields_to_import($client));
$user->mnethostid = $client->id;
$user->auth = 'mnet';
$user->confirmed = 1;
try {
$user->id = $DB->insert_record('user', $user);
} catch (Exception $e) {
+1 -1
View File
@@ -27,7 +27,7 @@
$string['error_multiplehost'] = 'Some instance of MNet enrolment plugin already exists for this host. Only one instance per host and/or one instance for \'All hosts\' is allowed.';
$string['instancename'] = 'Enrolment method name';
$string['instancename_help'] = 'You can optionally rename this instance of the MNet enrolment method. If you leave this field empty, the default instance name will be used, containing the name of the remote host and the assigned role for their users.';
$string['mnet_enrol_description'] = 'Publish this service to allow administrators at {$a} to enrol their students in courses you have created on your server.<br/><ul><li><em>Dependency</em>: You must also <strong>publish</strong> the SSO (Service Provider) service to {$a}.</li><li><em>Dependency</em>: You must also <strong>subscribe</strong> to the SSO (Identity Provider) service on {$a}.</li></ul><br/>Subscribe to this service to be able to enrol your students in courses on {$a}.<br/><ul><li><em>Dependency</em>: You must also <strong>subscribe</strong> to the SSO (Service Provider) service on {$a}.</li><li><em>Dependency</em>: You must also <strong>publish</strong> the SSO (Identity Provider) service to {$a}.</li></ul><br/>';
$string['mnet_enrol_description'] = 'Publish this service to allow administrators at {$a} to enrol their students in courses you have created on your server.<br/><ul><li><em>Dependency</em>: You must also <strong>subscribe</strong> to the SSO (Identity Provider) service on {$a}.</li><li><em>Dependency</em>: You must also <strong>publish</strong> the SSO (Service Provider) service to {$a}.</li></ul><br/>Subscribe to this service to be able to enrol your students in courses on {$a}.<br/><ul><li><em>Dependency</em>: You must also <strong>publish</strong> the SSO (Identity Provider) service to {$a}.</li><li><em>Dependency</em>: You must also <strong>subscribe</strong> to the SSO (Service Provider) service on {$a}.</li></ul><br/>';
$string['mnet_enrol_name'] = 'Remote enrolment service';
$string['pluginname'] = 'MNet remote enrolments';
$string['pluginname_desc'] = 'Allows remote MNet host to enrol their users into our courses.';
+21 -22
View File
@@ -48,33 +48,32 @@ $manager = new course_enrolment_manager($PAGE, $course, $filter);
$table = new course_enrolment_other_users_table($manager, $PAGE);
$PAGE->set_url('/enrol/otherusers.php', $manager->get_url_params()+$table->get_url_params());
/***
* Actions will go here
*/
$userdetails = array (
'picture' => false,
'firstname' => get_string('firstname'),
'lastname' => get_string('lastname'),
);
if (!empty($CFG->extrauserselectorfields)) {
$extrafields = explode(',', $CFG->extrauserselectorfields);
foreach ($extrafields as $field) {
$userdetails[$field] = get_string($field);
}
}
/*$fields = array(
'userdetails' => array (
'picture' => false,
'firstname' => get_string('firstname'),
'lastname' => get_string('lastname'),
'email' => get_string('email')
),
'lastseen' => get_string('lastaccess'),
'role' => array(
'roles' => get_string('roles', 'role'),
'context' => get_string('context')
)
);*/
$fields = array(
'userdetails' => array (
'picture' => false,
'firstname' => get_string('firstname'),
'lastname' => get_string('lastname'),
'email' => get_string('email')
),
'userdetails' => $userdetails,
'lastseen' => get_string('lastaccess'),
'role' => get_string('roles', 'role')
);
// Remove hidden fields if the user has no access
if (!has_capability('moodle/course:viewhiddenuserfields', $context)) {
$hiddenfields = array_flip(explode(',', $CFG->hiddenuserfields));
if (isset($hiddenfields['lastaccess'])) {
unset($fields['lastseen']);
}
}
$table->set_fields($fields, $OUTPUT);
//$users = $manager->get_other_users($table->sort, $table->sortdirection, $table->page, $table->perpage);
+29
View File
@@ -0,0 +1,29 @@
<?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/>.
/**
* Defines message providers (types of message sent) for the PayPal enrolment plugin.
*
* @package enrol_paypal
* @copyright 2012 Chris Follin
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$messageproviders = array(
'paypal_enrolment' => array(),
);
+5 -5
View File
@@ -243,7 +243,7 @@ while (!feof($fp)) {
$eventdata->name = 'paypal_enrolment';
$eventdata->userfrom = $teacher;
$eventdata->userto = $user;
$eventdata->subject = get_string("enrolmentnew", '', $shortname);
$eventdata->subject = get_string("enrolmentnew", 'enrol', $shortname);
$eventdata->fullmessage = get_string('welcometocoursetext', '', $a);
$eventdata->fullmessageformat = FORMAT_PLAIN;
$eventdata->fullmessagehtml = '';
@@ -262,8 +262,8 @@ while (!feof($fp)) {
$eventdata->name = 'paypal_enrolment';
$eventdata->userfrom = $user;
$eventdata->userto = $teacher;
$eventdata->subject = get_string("enrolmentnew", '', $shortname);
$eventdata->fullmessage = get_string('enrolmentnewuser', '', $a);
$eventdata->subject = get_string("enrolmentnew", 'enrol', $shortname);
$eventdata->fullmessage = get_string('enrolmentnewuser', 'enrol', $a);
$eventdata->fullmessageformat = FORMAT_PLAIN;
$eventdata->fullmessagehtml = '';
$eventdata->smallmessage = '';
@@ -281,8 +281,8 @@ while (!feof($fp)) {
$eventdata->name = 'paypal_enrolment';
$eventdata->userfrom = $user;
$eventdata->userto = $admin;
$eventdata->subject = get_string("enrolmentnew", '', $shortname);
$eventdata->fullmessage = get_string('enrolmentnewuser', '', $a);
$eventdata->subject = get_string("enrolmentnew", 'enrol', $shortname);
$eventdata->fullmessage = get_string('enrolmentnewuser', 'enrol', $a);
$eventdata->fullmessageformat = FORMAT_PLAIN;
$eventdata->fullmessagehtml = '';
$eventdata->smallmessage = '';
+1
View File
@@ -44,6 +44,7 @@ $string['enrolstartdate_help'] = 'If enabled, users can be enrolled from this da
$string['mailadmins'] = 'Notify admin';
$string['mailstudents'] = 'Notify students';
$string['mailteachers'] = 'Notify teachers';
$string['messageprovider:paypal_enrolment'] = 'PayPal enrolment messages';
$string['nocost'] = 'There is no cost associated with enrolling in this course!';
$string['paypal:config'] = 'Configure PayPal enrol instances';
$string['paypal:manage'] = 'Manage enrolled users';
+1 -1
View File
@@ -26,5 +26,5 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2010073100;
$plugin->version = 2010073101;
$plugin->requires = 2010090501; // Requires this Moodle version
+26 -7
View File
@@ -166,18 +166,37 @@ if ($action) {
$renderer = $PAGE->get_renderer('core_enrol');
$userdetails = array (
'picture' => false,
'firstname' => get_string('firstname'),
'lastname' => get_string('lastname'),
);
if (!empty($CFG->extrauserselectorfields)) {
$extrafields = explode(',', $CFG->extrauserselectorfields);
foreach ($extrafields as $field) {
$userdetails[$field] = get_string($field);
}
}
$fields = array(
'userdetails' => array (
'picture' => false,
'firstname' => get_string('firstname'),
'lastname' => get_string('lastname'),
'email' => get_string('email')
),
'userdetails' => $userdetails,
'lastseen' => get_string('lastaccess'),
'role' => get_string('roles', 'role'),
'group' => get_string('groups', 'group'),
'enrol' => get_string('enrolmentinstances', 'enrol')
);
// Remove hidden fields if the user has no access
if (!has_capability('moodle/course:viewhiddenuserfields', $context)) {
$hiddenfields = array_flip(explode(',', $CFG->hiddenuserfields));
if (isset($hiddenfields['lastaccess'])) {
unset($fields['lastseen']);
}
if (isset($hiddenfields['groups'])) {
unset($fields['group']);
}
}
$table->set_fields($fields, $renderer);
$canassign = has_capability('moodle/role:assign', $manager->get_context());
@@ -197,4 +216,4 @@ $PAGE->set_heading($PAGE->title);
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('enrolledusers', 'enrol'));
echo $renderer->render($table);
echo $OUTPUT->footer();
echo $OUTPUT->footer();
+1 -1
View File
@@ -114,7 +114,7 @@ class edit_outcome_form extends moodleform {
if (empty($courseid)) {
$mform->hardFreeze('standard');
} else if (empty($outcome->courseid) and !has_capability('moodle/grade:manage', get_context_instance(CONTEXT_SYSTEM))) {
} else if (!has_capability('moodle/grade:manage', get_context_instance(CONTEXT_SYSTEM))) {
$mform->hardFreeze('standard');
} else if ($coursecount and empty($outcome->courseid)) {
+6 -8
View File
@@ -163,7 +163,7 @@ if ($mform->is_cancelled()) {
// form processing
} else if ($data = $mform->get_data(false)) {
if (is_array($data->feedback)) {
if (isset($data->feedback) && is_array($data->feedback)) {
$data->feedbackformat = $data->feedback['format'];
$data->feedback = $data->feedback['text'];
}
@@ -193,20 +193,18 @@ if ($mform->is_cancelled()) {
$data->feedbackformat = $old_grade_grade->feedbackformat;
}
// update final grade or feedback
// when we set override grade the first time, it happens here
$grade_item->update_final_grade($data->userid, $data->finalgrade, 'editgrade', $data->feedback, $data->feedbackformat);
$grade_grade = new grade_grade(array('userid'=>$data->userid, 'itemid'=>$grade_item->id), true);
$grade_grade->grade_item =& $grade_item; // no db fetching
if (has_capability('moodle/grade:manage', $context) or has_capability('moodle/grade:edit', $context)) {
if (!grade_floats_different($data->finalgrade, $old_grade_grade->finalgrade)
and $data->feedback === $old_grade_grade->feedback) {
// change overridden flag only if grade or feedback not changed
if (!isset($data->overridden)) {
$data->overridden = 0; // checkbox
}
$grade_grade->set_overridden($data->overridden);
// change overridden flag
if (!isset($data->overridden)) {
$data->overridden = 0; // checkbox unticked
}
$grade_grade->set_overridden($data->overridden);
}
if (has_capability('moodle/grade:manage', $context) or has_capability('moodle/grade:hide', $context)) {

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