Compare commits

..

553 Commits

Author SHA1 Message Date
Martin Dougiamas 6ab0ce20cc Bumping to 1.9.9 2010-06-08 05:24:12 +00:00
Moodle Robot 57409479d8 Updated the 19 build version to 20100608 2010-06-08 00:46:59 +00:00
Moodle Robot 26ca459a4c Updated the 19 build version to 20100607 2010-06-07 00:46:39 +00:00
Moodle Robot abd6504cd2 Updated the 19 build version to 20100606 2010-06-06 00:45:28 +00:00
Moodle Robot 1c137ab5ba Updated the 19 build version to 20100605 2010-06-05 00:45:26 +00:00
Petr Skoda c0693c51bc MDL-22680 fixed new password setting 2010-06-04 18:12:18 +00:00
Moodle Robot e0dd38c20c Updated the 19 build version to 20100604 2010-06-04 00:46:05 +00:00
David Mudrak 71ae9c7f43 MDL-22448 Fixed missing sql_cast_char2int(), credit goes to Tim Lock 2010-06-03 08:55:45 +00:00
Petr Skoda a91e69f384 MDL-22042 fixed kses cleaning of html code 2010-06-03 08:28:14 +00:00
Petr Skoda d7f657b308 MDL-22040 converting username to html entities before outputting 2010-06-03 08:18:13 +00:00
Sam Hemelryk 37278b6d23 htmlpurify MDL-22654 Merged fixes into 1.9 2010-06-03 07:24:30 +00:00
Moodle Robot 2bbe8d4fdf Updated the 19 build version to 20100603 2010-06-03 00:45:21 +00:00
Moodle Robot f7f3aa2f1a Automatic installer.php lang files by installer_builder (20100603) 2010-06-03 00:37:05 +00:00
Moodle Robot 24c6373de9 Updated the 19 build version to 20100602 2010-06-02 00:44:53 +00:00
Moodle Robot dbd52f1631 Automatic installer.php lang files by installer_builder (20100602) 2010-06-02 00:36:46 +00:00
Martin Dougiamas fa2edb63cf Making sure header.php can't be called by itself 2010-06-01 03:32:37 +00:00
Martin Dougiamas e595058242 MDL-22631 Added some clean_param calls to clean the $_GET data and also added lots of warnings and info there. 2010-06-01 02:51:23 +00:00
Moodle Robot 1bdb4edbca Updated the 19 build version to 20100601 2010-06-01 00:44:48 +00:00
Moodle Robot 8f6ab2905f Updated the 19 build version to 20100531 2010-05-31 00:45:29 +00:00
Eloy Lafuente 430cb2d510 MDL-22585 languages import - fixed regression caused by the inclusion of 'parentlanguage' in 1.9 strings 2010-05-30 10:15:55 +00:00
Moodle Robot f1608ce3c6 Updated the 19 build version to 20100530 2010-05-30 00:44:58 +00:00
Moodle Robot 39f98aac09 Automatic installer.php lang files by installer_builder (20100530) 2010-05-30 00:36:20 +00:00
Moodle Robot a6a6ea6355 Updated the 19 build version to 20100529 2010-05-29 00:44:58 +00:00
Eloy Lafuente 8156571788 MDL-22588 restore scales - fix scales not being assigned to target course 2010-05-28 09:18:03 +00:00
Moodle Robot 2688a99af4 Updated the 19 build version to 20100528 2010-05-28 00:45:05 +00:00
Moodle Robot d85cd635a6 Updated the 19 build version to 20100527 2010-05-27 00:44:48 +00:00
Petr Skoda a7ff0a2fc5 MDL-22181 brute force hack to work around missing idnumber in module fast info 2010-05-26 08:39:37 +00:00
Moodle Robot 7bfaddbe42 Updated the 19 build version to 20100526 2010-05-26 00:45:07 +00:00
Moodle Robot f3b02a16f7 Automatic installer.php lang files by installer_builder (20100526) 2010-05-26 00:36:44 +00:00
David Mudrak 83270e8780 MDL-22575 Preparing langconfig.php in the English pack
As all strings must be defined in the English language pack, we must add
thislanguageint into English langconfig.php, too. Also added empty
parentlang, even it is not used, for the same reason.

Backported from HEAD.
2010-05-25 08:43:36 +00:00
Moodle Robot 3496332bca Updated the 19 build version to 20100525 2010-05-25 00:43:47 +00:00
Moodle Robot 05592aa650 Updated the 19 build version to 20100524 2010-05-24 00:44:32 +00:00
Moodle Robot 1a9693eaf1 Updated the 19 build version to 20100523 2010-05-23 00:44:45 +00:00
Moodle Robot 007f5f4fed Updated the 19 build version to 20100522 2010-05-22 00:45:01 +00:00
Petr Skoda db359e6369 MDL-22537 new html purifier backported to stable, unfortunately PHP5 only 2010-05-21 11:39:22 +00:00
Petr Skoda f8502768a2 file data.php was added on branch MOODLE_19_STABLE on 2010-05-21 11:39:52 +0000 2010-05-21 10:40:57 +00:00
Petr Skoda 3e56add650 file SafeObject.php was added on branch MOODLE_19_STABLE on 2010-05-21 11:39:47 +0000 2010-05-21 10:40:57 +00:00
Petr Skoda 143238487c file RemoveSpansWithoutAttributes.php was added on branch MOODLE_19_STABLE on 2010-05-21 11:39:47 +0000 2010-05-21 10:40:57 +00:00
Petr Skoda 470e633924 file schema.ser was added on branch MOODLE_19_STABLE on 2010-05-21 11:39:49 +0000 2010-05-21 10:40:56 +00:00
Petr Skoda c1309ecc35 file URI.AllowedSchemes.txt was added on branch MOODLE_19_STABLE on 2010-05-21 11:39:30 +0000 2010-05-21 10:40:56 +00:00
Petr Skoda 75f2fd8aa4 file SafeParam.php was added on branch MOODLE_19_STABLE on 2010-05-21 11:39:40 +0000 2010-05-21 10:40:56 +00:00
Petr Skoda c5e7f53d78 file SafeObject.php was added on branch MOODLE_19_STABLE on 2010-05-21 11:39:46 +0000 2010-05-21 10:40:56 +00:00
Petr Skoda a21e336aa9 file SafeEmbed.php was added on branch MOODLE_19_STABLE on 2010-05-21 11:39:45 +0000 2010-05-21 10:40:56 +00:00
Petr Skoda 62dd96980a file Output.FlashCompat.txt was added on branch MOODLE_19_STABLE on 2010-05-21 11:39:28 +0000 2010-05-21 10:40:56 +00:00
Petr Skoda 40856f1442 file HTMLPurifier.safe-includes.php was added on branch MOODLE_19_STABLE on 2010-05-21 11:39:49 +0000 2010-05-21 10:40:56 +00:00
Petr Skoda f0597acf73 file HTML.SafeObject.txt was added on branch MOODLE_19_STABLE on 2010-05-21 11:39:32 +0000 2010-05-21 10:40:56 +00:00
Petr Skoda 1a4f34e080 file HTML.SafeEmbed.txt was added on branch MOODLE_19_STABLE on 2010-05-21 11:39:29 +0000 2010-05-21 10:40:56 +00:00
Petr Skoda 15d6569e4c file AutoFormat.RemoveSpansWithoutAttributes.txt was added on branch MOODLE_19_STABLE on 2010-05-21 11:39:25 +0000 2010-05-21 10:40:56 +00:00
Moodle Robot 3182434c46 Updated the 19 build version to 20100521 2010-05-21 00:43:45 +00:00
Moodle Robot cfd3f06544 Automatic installer.php lang files by installer_builder (20100521) 2010-05-21 00:35:41 +00:00
Petr Skoda e720dbd79a MDL-22531 fix for broken sql in get_users_by_capability() in cases where role_assignmetns is not in the resulting query such as when only default role is interesting for us - thanks Ye Chen for the report and solution 2010-05-20 18:35:05 +00:00
Martin Dougiamas a4a0264df6 MDL-19628 Store 0.0.0.0 in user table and log tables if IP address can't be found. I didn't change getremoteaddr in 1.9. 2010-05-20 02:42:18 +00:00
Moodle Robot e5264d19e9 Updated the 19 build version to 20100520 2010-05-20 00:44:48 +00:00
Sam Marshall 4d16b11a38 Lib MDL-22518 Group selector dropdowns destroy accessibility 2010-05-19 16:51:52 +00:00
Moodle Robot fb8d8cac39 Updated the 19 build version to 20100519 2010-05-19 00:44:53 +00:00
Moodle Robot 448d4b5057 Updated the 19 build version to 20100518 2010-05-18 00:44:28 +00:00
Moodle Robot 04b6aaaa5f Updated the 19 build version to 20100517 2010-05-17 00:43:28 +00:00
Moodle Robot 41e7b080a3 Updated the 19 build version to 20100516 2010-05-16 00:43:10 +00:00
Moodle Robot 8f8c02f6e7 Updated the 19 build version to 20100515 2010-05-15 00:44:22 +00:00
Gordon Bateson d1174b125c MDL-17702 when embedding documents in ie, use iframe for ie and object for others, because forms cannot escape from objcet in ie 2010-05-14 02:10:41 +00:00
Moodle Robot 0dd4fc0886 Updated the 19 build version to 20100514 2010-05-14 00:43:45 +00:00
Martin Dougiamas 03b8bc9bf3 MDL-22388 Added some checks to kill these scripts dead with an unequivocal notice unless included properly from a Moodle script. 2010-05-13 01:40:36 +00:00
Moodle Robot ae46b1f880 Updated the 19 build version to 20100513 2010-05-13 00:43:16 +00:00
Tim Hunt b778784346 moodlelib MDL-19418 fix bugs introduced when converting clean_param to preg.
Aumusingly, one of the bugs was detected by a unit test that was in Moodle 1.9, but
which for some reason was not in HEAD. I have tidied up the clean_param unit tests
and added a few more.
2010-05-12 12:05:37 +00:00
Moodle Robot 4434e5f6f8 Updated the 19 build version to 20100512 2010-05-12 00:43:33 +00:00
Moodle Robot f08641cd3f Updated the 19 build version to 20100511 2010-05-11 00:43:14 +00:00
Tim Hunt 2ccb0b9fd2 quiz recent activity: MDL-22410 permission check was wrong. 2010-05-10 22:36:37 +00:00
Moodle Robot 0de2d1fbe3 Updated the 19 build version to 20100510 2010-05-10 00:43:13 +00:00
Moodle Robot de902ce34e Updated the 19 build version to 20100509 2010-05-09 00:43:23 +00:00
Moodle Robot d0ca0af595 Updated the 19 build version to 20100508 2010-05-08 00:43:35 +00:00
Pierre Pichet 0fc550a5cc MDL-22386 merge from HEAD setting correctly the number of dataitem when duplicating a calculated, calculatedsimple, calculatedmulti question 2010-05-07 22:08:27 +00:00
Moodle Robot 13e949cdb0 Updated the 19 build version to 20100507 2010-05-07 00:44:14 +00:00
Eloy Lafuente 6f1cadb7c9 MDL-18576 timezones - updated to 2010i from 2009c (2147 rules) ; backported to 19_STABLE 2010-05-06 15:28:55 +00:00
Moodle Robot 92ddde6799 Updated the 19 build version to 20100506 2010-05-06 00:44:58 +00:00
Dan Marsden ecf6f35cbf SCORM MDL-22340 use full path for includes. 2010-05-06 00:13:54 +00:00
Moodle Robot d5db311178 Updated the 19 build version to 20100505 2010-05-05 00:44:48 +00:00
Dan Marsden a88499aa40 SCORM backup MDL-22301 use consistant naming for vars. 2010-05-04 01:48:57 +00:00
Moodle Robot afd0814aeb Updated the 19 build version to 20100504 2010-05-04 00:44:28 +00:00
Moodle Robot 6a48b4e765 Automatic installer.php lang files by installer_builder (20100504) 2010-05-04 00:36:05 +00:00
Moodle Robot bfa942338f Updated the 19 build version to 20100503 2010-05-03 00:44:06 +00:00
Moodle Robot 490b93f210 Updated the 19 build version to 20100502 2010-05-02 00:44:03 +00:00
Tim Hunt 28e5664ac2 quiz: MDL-20586 Oops, remove reference to global $DB. 2010-05-01 07:08:24 +00:00
Gordon Bateson f5bf248e24 MDL-17702 replace iframe with object to be compatible with XHTML 1.0 strict 2010-05-01 02:20:30 +00:00
Moodle Robot d55e5169bc Updated the 19 build version to 20100501 2010-05-01 00:43:23 +00:00
Tim Hunt 3271c060c2 quiz reports MDL-22257: was loading the complete user record, when it only wanted userid.
On a coures with 16000 users, that is a very bad idea ;-)
2010-04-30 13:15:40 +00:00
Dan Marsden 6f51e02bab SCORM AICC MDL-2144 total_time accumulation calculated incorrectly. - thanks to Matteo Scaramuccia for report and fix. merged from HEAD 2010-04-30 08:51:04 +00:00
Dan Marsden cfb345a7ba SCORM MDL-18202 MDL-21379 use correct Scorm format for 1.3 merged from HEAD 2010-04-30 05:47:06 +00:00
Moodle Robot c1211da953 Updated the 19 build version to 20100430 2010-04-30 00:43:14 +00:00
Tim Hunt 5c8f9016b2 quiz recent activity: MDL-20586 was showing scores even if quiz settings said not to.
Fix started with a patch from Yolanda Ordo?ez Rufat but with significant reworking by me.
2010-04-29 10:46:37 +00:00
Tim Hunt 4017267988 calculated qtype: MDL-22241 Invalid SQL (must not have a ; at the end.) 2010-04-29 10:41:53 +00:00
Dan Marsden ad71ee56a3 SCORM MDL-21568 missing var from restore merged from HEAD 2010-04-29 09:49:55 +00:00
Dan Marsden 649e176ed6 SCORM MDL-22046 - show last completed attempt in gradebook - thanks to Bruce Cota for the report/fix merged from HEAD 2010-04-29 09:18:32 +00:00
Dan Marsden 74dd5c50ab SCORM MDL-22168 only set x.start.time when a SCO is started - don't update it. merged from HEAD 2010-04-29 08:32:58 +00:00
Moodle Robot c74610c8dd Updated the 19 build version to 20100429 2010-04-29 00:43:19 +00:00
Moodle Robot cb16f0b515 Automatic installer.php lang files by installer_builder (20100429) 2010-04-29 00:35:17 +00:00
Moodle Robot 0a52c510e7 Updated the 19 build version to 20100428 2010-04-28 00:44:32 +00:00
Moodle Robot 57d09bef9c Updated the 19 build version to 20100427 2010-04-27 00:43:48 +00:00
Tim Hunt a8d3973c00 tablelib.php: Fix some minor whitespace errors that were messing up a merge I was doing.
(Seemed better to fix core, rather than intentionally introduce whitespace errors into my code.)
2010-04-26 15:47:55 +00:00
Moodle Robot 996ef6c1ec Updated the 19 build version to 20100426 2010-04-26 00:44:25 +00:00
Moodle Robot 7e7b4b5a96 Updated the 19 build version to 20100425 2010-04-25 00:43:12 +00:00
Petr Skoda 7c9ec0dbdb MDL-22181 fixed 'random' overriding of assignment idnumbers in gradebook - big thanks to Gordon Bridge for the report and patch 2010-04-24 17:37:54 +00:00
Moodle Robot c6bd6f2413 Updated the 19 build version to 20100424 2010-04-24 00:43:23 +00:00
Eloy Lafuente ccfc004f26 MDL-22176 backup & restore links - Fixed missing .php extension in URL 2010-04-23 17:36:52 +00:00
Tim Hunt 7e3078db0a unit tests: MDL-22175 Further improvements unit test failure display.
Exceptions are now also shown with a pruned stack trace.
And 2.0 code for displaying PHP5 error types backported to 1.9.
2010-04-23 17:22:54 +00:00
Eloy Lafuente a6fbcfa0aa MDL-22176 backup & restore links - preserve links to course main page 2010-04-23 15:45:19 +00:00
Tim Hunt 80f752acf4 unit tests: MDL-22175 Improve unit test failure display.
When you are using helper funcitions, show all the interesting bits of the stack trace,
rather that just the line in the helper function where the failed asset was called.
2010-04-23 11:22:31 +00:00
Sam Marshall 9476acfbcb weblib: MDL-22174 print_group_picture should not print empty links 2010-04-23 11:13:23 +00:00
Gordon Bateson 7480adb9cb fix detection of correct answers in JCross that is not case-sensitive 2010-04-23 01:20:16 +00:00
Moodle Robot 70f337107d Updated the 19 build version to 20100423 2010-04-23 00:43:29 +00:00
Moodle Robot 23fa4a1b8d Updated the 19 build version to 20100422 2010-04-22 00:43:18 +00:00
Dan Marsden 2114f6764b SCORM MDL-16184 MDL-21423 backport from HEAD 2010-04-21 23:40:03 +00:00
Dan Marsden fc289cab3b SCORM MDL-18835 display time periods in "human-readable" format. - mainly for SCORM 2004 objects. - thanks to Vlas Voloshin for patch - merged from HEAD 2010-04-21 22:42:30 +00:00
Petr Skoda caa932d8bf MDL-22154 fixed incorrect URL in ajax call (thanks Pasi H?kkinen) and fixed xhtml strict issue with embedded JS 2010-04-21 12:42:24 +00:00
Moodle Robot b0f8277a33 Updated the 19 build version to 20100421 2010-04-21 00:44:04 +00:00
Helen Foster 3d76035f86 MDL-21218 help file rewording thanks to Elena Ivanova 2010-04-20 07:36:44 +00:00
Moodle Robot b3d9ac7064 Updated the 19 build version to 20100420 2010-04-20 00:44:44 +00:00
Moodle Robot 38567b9421 Updated the 19 build version to 20100419 2010-04-19 00:43:10 +00:00
Inaki f8997538f3 auth cas: MDL-20029 upgrade phpCAS version to the latest available version
Also make sure phpCAS doesn't try to start a new PHP session. We have already
started our own and want to keep it :). In addition to it, it emitted a PHP
notice that could block the authentication process under certain
configurations.

And pretty much the same with the wantsurl and loginguest checks.
2010-04-18 14:39:33 +00:00
Inaki 741f53bad8 file spanish.php was added on branch MOODLE_19_STABLE on 2010-04-18 14:39:35 +0000 2010-04-18 12:08:45 +00:00
Inaki 21a0f2c43a file languages.php was added on branch MOODLE_19_STABLE on 2010-04-18 14:39:35 +0000 2010-04-18 12:08:45 +00:00
Inaki 6235205a16 file pgt-main.php was added on branch MOODLE_19_STABLE on 2010-04-18 14:39:34 +0000 2010-04-18 12:08:44 +00:00
Inaki 61cbf5ca09 file pgt-file.php was added on branch MOODLE_19_STABLE on 2010-04-18 14:39:34 +0000 2010-04-18 12:08:44 +00:00
Inaki 8fd2e01b2d file pgt-db.php was added on branch MOODLE_19_STABLE on 2010-04-18 14:39:33 +0000 2010-04-18 12:08:44 +00:00
Inaki 9a921c9c70 file japanese.php was added on branch MOODLE_19_STABLE on 2010-04-18 14:39:35 +0000 2010-04-18 12:08:44 +00:00
Inaki d4048003a7 file greek.php was added on branch MOODLE_19_STABLE on 2010-04-18 14:39:35 +0000 2010-04-18 12:08:44 +00:00
Inaki 35ac4fbc5f file german.php was added on branch MOODLE_19_STABLE on 2010-04-18 14:39:35 +0000 2010-04-18 12:08:44 +00:00
Inaki e4c34125f7 file french.php was added on branch MOODLE_19_STABLE on 2010-04-18 14:39:34 +0000 2010-04-18 12:08:44 +00:00
Inaki de6e4d5762 file english.php was added on branch MOODLE_19_STABLE on 2010-04-18 14:39:34 +0000 2010-04-18 12:08:44 +00:00
Inaki 5ae94b8164 file domxml-php4-to-php5.php was added on branch MOODLE_19_STABLE on 2010-04-18 14:39:34 +0000 2010-04-18 12:08:44 +00:00
Inaki d1c9fa80a5 file client.php was added on branch MOODLE_19_STABLE on 2010-04-18 14:39:34 +0000 2010-04-18 12:08:44 +00:00
Inaki b2a3385dbb file catalan.php was added on branch MOODLE_19_STABLE on 2010-04-18 14:39:34 +0000 2010-04-18 12:08:44 +00:00
Moodle Robot ff0a7c0c34 Updated the 19 build version to 20100418 2010-04-18 00:45:02 +00:00
Moodle Robot ff33ac3fc7 Updated the 19 build version to 20100417 2010-04-17 00:42:55 +00:00
Andrew Davis a4bc9693af unit tests MDL-22017 made test_usergetdate() work on machines in different timezones 2010-04-16 07:48:15 +00:00
Andrew Davis 192dcd8871 gradebook MDL-21218 made overview report respect display hidden items default correctly 2010-04-16 04:38:03 +00:00
Moodle Robot 241f7d68a7 Updated the 19 build version to 20100416 2010-04-16 00:43:24 +00:00
Tim Hunt 1565032231 grades: MDL-22098 silly bug that leads to bad performance problems in the grader report. 2010-04-15 16:37:07 +00:00
Moodle Robot d87f45de85 Updated the 19 build version to 20100415 2010-04-15 00:42:59 +00:00
Moodle Robot 9724c30eff Updated the 19 build version to 20100414 2010-04-14 00:42:55 +00:00
Moodle Robot 8ed5548898 Updated the 19 build version to 20100413 2010-04-13 00:42:55 +00:00
Moodle Robot b1fbd47b45 Updated the 19 build version to 20100412 2010-04-12 00:42:54 +00:00
Moodle Robot eea6830deb Updated the 19 build version to 20100411 2010-04-11 00:42:49 +00:00
Inaki 73f20aa03b auth cas/db/ldap: MDL-18689 Fix typos in auth/{cas,db,ldap}/auth.php
Forward-ported from MOODLE_18_STABLE
2010-04-10 15:24:55 +00:00
Inaki a24cd879b7 auth config: MDL-19053 Use the HTML editor to edit the login page authentication instructions
They are actually displayed as HTML, but they are edited through a plain
text area control instead.
2010-04-10 15:11:49 +00:00
Moodle Robot a012708185 Updated the 19 build version to 20100410 2010-04-10 00:43:07 +00:00
Inaki 8b86439780 filter tex: MDL-10197 Quality improvement of TeX-images by using PNG format.
It seems some TeX installs use a convert utility that renders poor quality
images when using the GIF format, but render good ones when using PNG. If
all the needed tools are available, let the admin choose the preferred
output format.
2010-04-10 00:17:45 +00:00
Anthony Borrow 30a906c58a MDL-18044 - updating missed scalestip string to scalestip2 2010-04-09 08:33:06 +00:00
Moodle Robot c544712126 Updated the 19 build version to 20100409 2010-04-09 00:44:19 +00:00
Eloy Lafuente 68715e174c NOBUG: Bombing BOM: BOM bombed 2010-04-08 18:11:41 +00:00
Moodle Robot 4967d90426 Updated the 19 build version to 20100408 2010-04-08 00:44:19 +00:00
Tim Hunt 0e31d5bfc6 quiz reports: MDL-21688 Add missing sesskey checks. 2010-04-07 11:26:00 +00:00
Tim Hunt 97546dbe14 questionlib: MDL-21828 Fix database query that does not work in Oracle.
Bug report and fix thanks to David Binney.
2010-04-07 09:47:17 +00:00
Moodle Robot c6efbb9bf8 Updated the 19 build version to 20100407 2010-04-07 00:44:25 +00:00
Moodle Robot 131094b6bf Automatic installer.php lang files by installer_builder (20100407) 2010-04-07 00:36:27 +00:00
Moodle Robot 8f3e6f99a2 Updated the 19 build version to 20100406 2010-04-06 00:44:13 +00:00
Moodle Robot 9eab193993 Updated the 19 build version to 20100405 2010-04-05 00:43:44 +00:00
Moodle Robot ebc3754f1d Updated the 19 build version to 20100404 2010-04-04 00:44:01 +00:00
Moodle Robot ac55810332 Updated the 19 build version to 20100403 2010-04-03 00:44:42 +00:00
Helen Foster 9478c59e3e MDL-21218 new help file thanks to David Mudrak for help with wording 2010-04-02 12:34:41 +00:00
Helen Foster b49c4720f3 lang string MDL-21218 small rewording 2010-04-02 12:01:56 +00:00
David Mudrak 0db6ff6fa9 MDL-21845 Fixed missing multilang support 2010-04-02 09:36:31 +00:00
David Mudrak 503b8b480a MDL-18903 All outgoing emails can be diverted into a single address
This is highly useful when developing or debugging any emailing feature.
Backported from 2.0dev
2010-04-02 09:33:11 +00:00
Moodle Robot e8ee0a0720 Updated the 19 build version to 20100402 2010-04-02 00:44:07 +00:00
Petr Skoda 10dd4cd8d0 MDL-22006 fixed problems with E_ALL in PHP 5.3., thanks Mauno Korpelainen for the report 2010-04-01 17:10:58 +00:00
Moodle Robot d1d101ef38 Updated the 19 build version to 20100401 2010-04-01 00:44:15 +00:00
Tim Hunt 8bf6b5c2c8 grade import: MDL-21987 Problem with repeated imports of the same grade.
The thanks to Petr (skodak).

Here is what I learned while working on this:

1. when explicitly setting the final grade (manual edit or import),
   it is important that ->overridden gets set, and it should get set
   to the time when the override was done.

2. but only on certainly sorts of grade item, and the condition for
   setting the flag is different when it is the feedback being changed
   or the grade being changed, hence the two different tests
   is_overridable_item and is_overridable_item_feedback.

3. but, if the grade and feedback is not actually changed, then the ->overridden
   timestamp should not be changed. (That was the bit that was buggy.)
2010-03-31 13:50:58 +00:00
Moodle Robot dc2c925cc9 Updated the 19 build version to 20100331 2010-03-31 00:45:22 +00:00
Moodle Robot b7bc4dd60b Updated the 19 build version to 20100330 2010-03-30 00:45:24 +00:00
Moodle Robot d96719ac58 Updated the 19 build version to 20100329 2010-03-29 00:44:01 +00:00
Moodle Robot 13f3ba7f8f Updated the 19 build version to 20100328 2010-03-28 00:43:43 +00:00
Martin Dougiamas ee3c8982cb Post 1.9.8 bump 2010-03-27 16:54:22 +00:00
Moodle Robot 255c63edeb Updated the 19 build version to 20100327 2010-03-27 00:43:50 +00:00
Moodle Robot 5f6a78acc8 Automatic installer.php lang files by installer_builder (20100327) 2010-03-27 00:36:18 +00:00
Lukas Haemmerle 9a1222085f MDL-21931 Fixed IE CSS bug 2010-03-26 10:11:49 +00:00
Moodle Robot 8c9b64e53e Updated the 19 build version to 20100326 2010-03-26 00:43:59 +00:00
Martin Dougiamas 892aafe88d Bumping to 1.9.8 release 2010-03-25 04:11:28 +00:00
Moodle Robot 6a8797fae6 Updated the 19 build version to 20100325 2010-03-25 00:43:56 +00:00
Petr Skoda 7bce3cf885 MDL-21910 adding https www root to flash detection 2010-03-24 08:28:28 +00:00
Petr Skoda 67255b58ec MDL-21802 backporting patch for vulnerability in CAS client library 2010-03-24 08:11:47 +00:00
Petr Skoda 351d2a98ac file readme_moodle.txt was added on branch MOODLE_19_STABLE on 2010-03-24 08:11:47 +0000 2010-03-24 08:11:13 +00:00
Moodle Robot 58b89df986 Updated the 19 build version to 20100324 2010-03-24 00:43:08 +00:00
Moodle Robot a4e4a51219 Updated the 19 build version to 20100323 2010-03-23 00:42:54 +00:00
Eloy Lafuente 2c77aa3685 MDL-19233 restore of roles - prevent role creation, role assignment and
permission overrides by observing corresponding caps. Improve role mapping a bit.
Credit goes to Daniel Neis.
2010-03-22 22:10:33 +00:00
Eloy Lafuente a914552779 NOBUG: Fixed incorrect text comparison breaking mssql/oracle upgrade 2010-03-22 10:59:05 +00:00
Moodle Robot 3dafa79a51 Updated the 19 build version to 20100322 2010-03-22 00:43:21 +00:00
Eloy Lafuente 68323795b8 MDL-21868 mssql generator - be a bot more specific (both must be integers) 2010-03-21 18:47:35 +00:00
Eloy Lafuente 32feeb023c MDL-21868 mssql generator - improve integer meta type detection 2010-03-21 18:04:44 +00:00
Moodle Robot 09b2ffb97b Updated the 19 build version to 20100321 2010-03-21 00:43:07 +00:00
Moodle Robot f60a7c8bbd Updated the 19 build version to 20100320 2010-03-20 00:44:57 +00:00
Petr Skoda 811c2e7575 MDL-21788 use session regeneration on all sites by default and improved string 2010-03-19 07:58:52 +00:00
Moodle Robot 2a011db8a2 Updated the 19 build version to 20100319 2010-03-19 00:43:48 +00:00
Moodle Robot 986a3d0036 Automatic installer.php lang files by installer_builder (20100319) 2010-03-19 00:36:12 +00:00
Petr Skoda 12b9842c6b MDL-21859 fixed sesskey protection on email actions 2010-03-18 22:54:28 +00:00
Petr Skoda 838093ab3b MDL-21830 Prevent users from viewing names of all other site users - only teachers with role assign see the full name of not enrolled users when trying to access the profile 2010-03-18 22:15:22 +00:00
Petr Skoda e92e4b8ab0 MDL-21068 do not show admin usernames in cron logs 2010-03-18 21:59:51 +00:00
Petr Skoda 31eb0fddb6 MDL-21649 fixed form value quoting 2010-03-18 21:23:25 +00:00
Petr Skoda 031afaa59c MDL-21858 improved input validation 2010-03-18 21:07:54 +00:00
Petr Skoda 9c170e28c4 MDL-21818 fixed globals problems 2010-03-18 20:58:19 +00:00
Moodle Robot 7e02fe26fc Updated the 19 build version to 20100318 2010-03-18 00:44:10 +00:00
Moodle Robot 469a320ea1 Automatic installer.php lang files by installer_builder (20100318) 2010-03-18 00:36:32 +00:00
Helen Foster 0ee71c638a help file MDL-17698 edits to ensure XHTML strict compliance thanks to David Horat 2010-03-17 14:11:42 +00:00
Helen Foster 64b004b025 help file MDL-17698 edits to ensure XHTML strict compliance thanks to David Horat 2010-03-17 14:01:24 +00:00
Helen Foster 080f872804 help file MDL-21308 rewording thanks to Bente Olsen 2010-03-17 10:47:48 +00:00
Helen Foster 171d0f7b86 help file MDL-21600 obsolete file thanks to Koen Roggemans 2010-03-17 09:46:14 +00:00
Moodle Robot 250f99df74 Updated the 19 build version to 20100317 2010-03-17 00:44:16 +00:00
Moodle Robot 0d361c8309 Automatic installer.php lang files by installer_builder (20100317) 2010-03-17 00:36:21 +00:00
Moodle Robot 6c1bc334c0 Updated the 19 build version to 20100316 2010-03-16 00:43:30 +00:00
Gordon Bateson 9f23ea03b1 MDL-21817 replace use of preg_match() with /e modifier with preg_replace_callback() and preg_match_all() with a loop 2010-03-15 10:39:42 +00:00
Gordon Bateson b45b9eae4d MDL-21817 replace use of preg_match() with /e modifier with preg_match_callback() and preg_match_all() with a loop 2010-03-15 10:15:59 +00:00
Moodle Robot ca2d4e6edc Updated the 19 build version to 20100315 2010-03-15 00:43:28 +00:00
Moodle Robot 4a1fc7b4de Updated the 19 build version to 20100314 2010-03-14 00:44:07 +00:00
Moodle Robot 5b9b92e935 Updated the 19 build version to 20100313 2010-03-13 00:43:21 +00:00
Moodle Robot ef0cdb25ef Automatic installer.php lang files by installer_builder (20100312) 2010-03-12 15:17:13 +00:00
Moodle Robot 35a0d5f8c8 Automatic installer.php lang files by installer_builder (20100312) 2010-03-12 15:01:52 +00:00
Dan Marsden 278fc21a29 AICC MDL-21332 set scoid if not already set - thanks to Matteo Scaramuccia for report and fix. merged from HEAD 2010-03-12 07:39:09 +00:00
Dan Marsden 05d9f028e7 AICC MDL-21305 mastery score should be set even when lessonstatus <> "completed" - thanks to Matteo Scaramuccia for report and fix. merged from HEAD 2010-03-12 07:27:22 +00:00
Moodle Robot e7a7712bfa Updated the 19 build version to 20100312 2010-03-12 00:43:23 +00:00
Moodle Robot e31b66eb15 Automatic installer.php lang files by installer_builder (20100312) 2010-03-12 00:35:50 +00:00
Dan Poltawski 3afe38a532 lib/blocklib.php MDL-21805 Moving blocks up/down causes blocks to disappear
If two blocks of the same type were next to each other the weight would be
set the same and block disappear..

Thanks to my colleague Andrew Nicols for the patch.

(This patch was commited on a train at 90mph near Coventry, UK)
2010-03-11 16:25:45 +00:00
Moodle Robot 7b6c6e9c31 Updated the 19 build version to 20100311 2010-03-11 00:43:03 +00:00
Petr Skoda a8944c8195 MDL-21789 fixed buggy handling of 0.00 in s() 2010-03-10 08:46:19 +00:00
Moodle Robot 903182f822 Updated the 19 build version to 20100310 2010-03-10 00:43:11 +00:00
Helen Foster 97f7661011 lang string MDL-21016 rewording as suggested by Ray Lawrence 2010-03-09 21:40:56 +00:00
Moodle Robot 9d3c427e7d Updated the 19 build version to 20100309 2010-03-09 00:43:38 +00:00
Moodle Robot 8d08717b51 Updated the 19 build version to 20100308 2010-03-08 00:42:59 +00:00
Petr Skoda 63c7303150 MDL-21769 fixed input validation 2010-03-07 15:36:20 +00:00
Petr Skoda 38b6976505 MDL-21769 fixed input validation 2010-03-07 15:29:39 +00:00
Petr Skoda b6c760ccd7 MDL-21769 fixed input validation 2010-03-07 15:23:58 +00:00
Petr Skoda 3d2d9e6527 MDL-21769 fixed input validation 2010-03-07 15:16:19 +00:00
Petr Skoda f7429974b2 MDL-21769 fixed input validation 2010-03-07 15:10:15 +00:00
Petr Skoda e20b7eed49 MDL-21767 fixed input validation 2010-03-07 14:57:43 +00:00
Moodle Robot 9597ac84c9 Updated the 19 build version to 20100307 2010-03-07 00:43:00 +00:00
Moodle Robot 98bfdc3355 Updated the 19 build version to 20100306 2010-03-06 00:43:03 +00:00
Helen Foster fe08331675 help file MDL-21054 rewording thanks to Bente Olsen 2010-03-05 15:14:01 +00:00
Helen Foster b74bdc319c help file MDL-21053 rewording thanks to Bente Olsen 2010-03-05 14:55:00 +00:00
Helen Foster 9c72f010d3 lang string MDL-18565 spelling fix thanks to Ray Lawrence 2010-03-05 11:41:33 +00:00
Moodle Robot 7ba0dd71ad Updated the 19 build version to 20100305 2010-03-05 00:43:31 +00:00
Eloy Lafuente 4f13fe005e MDL-17510 calendar - added 2 missing labels plus space/comments cleaning. Credit goes to Daniel Neis 2010-03-04 21:57:33 +00:00
Eloy Lafuente 7e4a97c6ac MDL-21750 ims-cc restore - avoid requiring net conection on validation. Credit goes to Darko 2010-03-04 21:30:23 +00:00
Penny Leach 774c13ca15 events: MDL-17442 add support for local events and run event queue in cron 2010-03-04 17:06:19 +00:00
Moodle Robot bf71c4c778 Updated the 19 build version to 20100304 2010-03-04 00:42:49 +00:00
Moodle Robot 405be90aba Updated the 19 build version to 20100303 2010-03-03 00:43:04 +00:00
Moodle Robot 76571df084 Updated the 19 build version to 20100302 2010-03-02 00:42:36 +00:00
Moodle Robot c6fc01d98f Updated the 19 build version to 20100301 2010-03-01 00:43:06 +00:00
Moodle Robot b5a84497e7 Updated the 19 build version to 20100228 2010-02-28 00:42:20 +00:00
Moodle Robot 6570787eba Automatic installer.php lang files by installer_builder (20100228) 2010-02-28 00:34:48 +00:00
Moodle Robot 6b900d9666 Updated the 19 build version to 20100227 2010-02-27 00:42:46 +00:00
Moodle Robot 7237c0f83d Updated the 19 build version to 20100226 2010-02-26 00:43:15 +00:00
Eloy Lafuente fbd146b362 MDL-14934 excel dates. Rely in excellib's format_date() to otput dates. It supports base/timezones properly. 2010-02-25 10:16:15 +00:00
Moodle Robot fc77147262 Updated the 19 build version to 20100225 2010-02-25 00:42:45 +00:00
Helen Foster 850e4781ad lang string MDL-21546 rewording thanks to Bente Olsen 2010-02-24 10:52:02 +00:00
Helen Foster 41e7385f01 help file MDL-21546 rewording thanks to Bente Olsen 2010-02-24 10:35:25 +00:00
Dan Poltawski 47e32d2955 moodlelib: sync_metacourse MDL-20626 wasn't respecting hidden role assignments
This causes hidden role assignments to become public on metacourses

Many thanks to Daniel Neis for the patch

Signed-off-by: Dan Poltawski <dan.poltawski@luns.net.uk>
2010-02-24 09:01:27 +00:00
Dan Poltawski f6674e23e8 blocks/admin MDL-21593 - Specify full url to 'child courses'
Prevents link breaking on resources will full blocs
2010-02-24 08:56:41 +00:00
Dan Poltawski dcb98cd8e8 gradebook/overview MDL-21424 - link to correct grade card
The overview report was sending the user to their own user report
rather than the user they were looking at.
2010-02-24 08:53:45 +00:00
Dan Poltawski 7348068be8 blocks/quiz_results: MDL-21284 - dont strip leading zeros from idnumbers
Or make assumptions its an integer as many external systems are not and to
be of copy and paste use to teachers it should match
2010-02-24 08:51:16 +00:00
Dan Poltawski 695ba14064 grader report: MDL-21192 - remove duplicate variable decleration
Many thanks to Barry Oosthuizen for the patch!

Signed-off-by: Dan Poltawski <dan.poltawski@luns.net.uk>
2010-02-24 08:48:18 +00:00
Dan Poltawski e9d030cfdd block/mentees: MDL-20993 - incorrectly assumes SITEID 2010-02-24 08:45:18 +00:00
Dan Poltawski ed5a88a715 user/edit_form MDL-20683 - allow user to edit description if set with
$CFG->profilesforenrolledusersonly

The original intention seems to be to allow the user to edit the description
if its not empty, however it was not ever allowing that to happen. This was
already correct in HEAD.
2010-02-24 08:38:24 +00:00
Moodle Robot 131065d3e1 Updated the 19 build version to 20100224 2010-02-24 00:42:38 +00:00
Tim Hunt 74aabeb08a nobug: whitespace fixes. 2010-02-23 14:31:09 +00:00
Tim Hunt 0f6a49da32 match qtype: MDL-21701 / OU bug 9551 Fix display of response history.
The displays were being displayed in an order that depended on what the student had
selected, not the order in which the subquestions were displayed.

Great attention to detail by the OU testing team to notice this!
2010-02-23 12:47:07 +00:00
Moodle Robot 74964e989e Updated the 19 build version to 20100223 2010-02-23 00:43:18 +00:00
Dan Marsden 4ee0c3a1a7 SCORM MDL-21584 detect SCORM 2004 4th edition correctly. thanks to Valerian for the report and patch. merged from HEAD 2010-02-22 01:33:33 +00:00
Moodle Robot c29f46d37c Updated the 19 build version to 20100222 2010-02-22 00:43:16 +00:00
Dan Poltawski c33dd43a31 moodlelib: MDL-21477 - stop unzip_show_status depending on files/index.php
function
2010-02-21 15:31:26 +00:00
Eloy Lafuente 19a34c2fd6 Added new installer langs (mr_utf8 & zu_utf8) to 19_STABLE 2010-02-21 15:08:27 +00:00
Eloy Lafuente b189e210d1 file installer.php was added on branch MOODLE_19_STABLE on 2010-02-21 15:08:27 +0000 2010-02-21 15:04:22 +00:00
Dan Poltawski f01ce862ec config-dist.php MDL-21603 - prevent php5 strict warnings with defualt config 2010-02-21 14:46:49 +00:00
Urs Hunkler d472b68b11 FF 3.6 has problems with the used sarissa library. Following the sarissa forums the conflicting line can be commented out. http://sourceforge.net/projects/sarissa/forums/forum/256492/topic/3508927 2010-02-21 12:06:36 +00:00
Moodle Robot 6366286ebf Updated the 19 build version to 20100221 2010-02-21 00:42:39 +00:00
Moodle Robot 34d10397a2 Updated the 19 build version to 20100220 2010-02-20 00:41:43 +00:00
Dan Poltawski 1b97bb14df Revert revision 1.75.2.23 to access.php - MDL-21664
I commited junk from another file as part of commit. Sorry everyone.

I'm to use emacs for the weekend as punishment
2010-02-19 19:13:31 +00:00
Dan Poltawski ff9a1e85c9 lib/db/upgrade: MDL-21664 - $CFG->passwordmainsalt was used rather than $CFG->passwordsaltmain
Causing all admins to be warned about their salt even if they had one set
2010-02-19 16:47:28 +00:00
Moodle Robot 5bc3ab3db0 Updated the 19 build version to 20100219 2010-02-19 00:42:49 +00:00
David Mudrak 4815487089 MDL-7932 Yet another occurance of missing default comments 2010-02-18 18:39:12 +00:00
Jamie Pratt 7d2e309c9b MDL-21650 "cookieless sessions fail when opening a pop up window using the javascript 'openpopup' function for example from the course view page " adding the session name and id in the js function openpopup. 2010-02-18 12:56:12 +00:00
Jamie Pratt 4a4a05cfa8 MDL-21637 "bug in some versions of php version 5 prevents cookieless sessions working" 2010-02-18 11:50:18 +00:00
Andrew Davis e599553d84 simpletestlib MDL-21644 Removed instances of the php keyword protected which is unsupported by php 4 2010-02-18 08:30:45 +00:00
Andrew Davis c315756bf6 gradebook MDL-21644 Removed instances of the php keyword protected which is unsupported by php 4 2010-02-18 08:29:03 +00:00
Penny Leach 9fa2029768 mnet MDL-21633 fixed array to string conversion when rotating keys.
this doesn't need fixing in HEAD because of our new dml stuff
2010-02-18 03:22:23 +00:00
Penny Leach 25cd4deb3a mnet MDL-14117 truncate values in $dn to the RFC 3280 lengths when making new mnet keys 2010-02-18 03:11:52 +00:00
Penny Leach da92b21caa mnet MDL-17202 disambiguating strings in mnet enrolment config and updated plugin desc
committing forgotten file
2010-02-18 01:23:43 +00:00
Moodle Robot c28ccac7f8 Updated the 19 build version to 20100218 2010-02-18 00:42:46 +00:00
Dan Poltawski 8d6e18cc6c mnet: MDL-21632 - set $this to deleted too.
My previous commit message wasn't quite correct, I had misread the code, peers
were being properly makred as delted.
2010-02-17 22:18:11 +00:00
Dan Poltawski 154b2a1d7f mnet: MDL-21632 - remove reference to non-existant table
Backport Jermoes patch to only mark mnet hosts as deleted rather than delete
from db. Unfortunately the previous behaviour in <2.0 to mark hosts as delted
wasn't at all correct due to horrible behaviour of the commit()  function.
This addresses tha tproblem.
2010-02-17 22:15:02 +00:00
Jamie Pratt cdf50f82de MDL-21641 cookieless sessions - Need to try to set a cookie before falling back to cookieless mode. Moved test to see if cookies are working till after Moodle has attempted to set a cookie. If there is no cookie then we use session id in url. 2010-02-17 14:25:35 +00:00
Jamie Pratt 62236dd1b1 MDL-21638 cookieless session id not passed when loading images - needed for example for graphs which access session data 2010-02-17 11:31:33 +00:00
Jamie Pratt 72336b7f93 MDL-21637 bug in some versions of php version 5 prevents cookieless sessions working. Using static variable to store data from CFG on first call to fix problem. 2010-02-17 11:25:38 +00:00
Penny Leach 5425c4d06a mnet MDL-17202 disambiguating strings in mnet enrolment config and updated plugin desc 2010-02-17 03:59:04 +00:00
Penny Leach 5a97f0d96b mnet MDL-21257 temporary fix for mnet breaking on session regeneration. This is fixed better, but more obtrusively in 2.0 2010-02-17 01:32:14 +00:00
Moodle Robot c0f891d6fe Updated the 19 build version to 20100217 2010-02-17 00:43:07 +00:00
Moodle Robot 42d3d715ec Automatic installer.php lang files by installer_builder (20100217) 2010-02-17 00:35:47 +00:00
Andrew Davis 2fa0e3e21b user profiles MDL-20619 Email obfuscation wasnt working in some versions of IE 2010-02-16 02:52:53 +00:00
Moodle Robot cda0cdb819 Updated the 19 build version to 20100216 2010-02-16 00:42:46 +00:00
Moodle Robot 86bc6d3898 Updated the 19 build version to 20100215 2010-02-15 00:42:44 +00:00
Moodle Robot d8f12e5a98 Updated the 19 build version to 20100214 2010-02-14 00:42:33 +00:00
Moodle Robot 6b25991f60 Updated the 19 build version to 20100213 2010-02-13 00:42:46 +00:00
Sam Marshall bfaf0e5747 MDL-21567 Assign roles screen at module level can show users twice 2010-02-12 16:33:54 +00:00
Moodle Robot 45f656b9bc Updated the 19 build version to 20100212 2010-02-12 00:41:57 +00:00
Gordon Bateson dfdec574d3 fix student access to HotPots in tail of a HotPot quiz chain 2010-02-11 02:52:22 +00:00
Moodle Robot b5e596256c Updated the 19 build version to 20100211 2010-02-11 00:42:45 +00:00
Eloy Lafuente fddef9d6b7 MDL-7647 confirmation email - usernames with slashes causing confirmation problems 2010-02-10 16:46:00 +00:00
Moodle Robot 88b78226dd Updated the 19 build version to 20100210 2010-02-10 00:44:06 +00:00
Moodle Robot 67abeea724 Automatic installer.php lang files by installer_builder (20100210) 2010-02-10 00:36:23 +00:00
Piers Harding b34b5c7b49 MDL-18202 - fix incorrect substitutions of '_'. 2010-02-09 17:50:52 +00:00
Moodle Robot 4d5ead9be0 Updated the 19 build version to 20100209 2010-02-09 00:42:54 +00:00
Moodle Robot abe92c685e Automatic installer.php lang files by installer_builder (20100209) 2010-02-09 00:35:18 +00:00
Andrew Davis 1966cb853f gradebook MDL-21315 Fixed column highlighting 2010-02-08 04:18:40 +00:00
Moodle Robot edab8319fe Updated the 19 build version to 20100208 2010-02-08 00:42:38 +00:00
Moodle Robot 78421bfa9a Updated the 19 build version to 20100207 2010-02-07 00:41:48 +00:00
Moodle Robot 25733f443d Updated the 19 build version to 20100206 2010-02-06 00:42:45 +00:00
Moodle Robot 5ac643a6b6 Automatic installer.php lang files by installer_builder (20100206) 2010-02-06 00:35:17 +00:00
Tim Hunt b6be82811d question state loading MDL-9327 and MDL-19114 fix loading the state of ungraded essay questions
In two situations, the correct state was not being loaded for essay questions that had
not yet been manually graded:
1. When starting a subsequent attempt in each attempt builds on last mode.
2. In the quiz reports.

This commit fixes the problem. It has one other side-effect. When viewing the individual
question grades in the overview report for an attempt that is still in progress, the
information displayed will be slightly different. This only affects adaptive mode quizzes,
and will acutally cause the report to show slighly more up-to-date information.

Interestingly, the reportlib.php change had already been made in HEAD, as part of MDL 16529
2010-02-05 16:36:59 +00:00
Andrew Davis 3570713828 gradebook MDL-21218 course and category totals behaviour when they contain hidden items 2010-02-05 07:27:02 +00:00
Moodle Robot 0e2ff533bd Updated the 19 build version to 20100205 2010-02-05 00:43:23 +00:00
Rossiani Wijaya edef4cd2e1 MDL-20307 - add view fullname capabilities to display fullname in gradebook and participant list 2010-02-04 04:37:31 +00:00
Moodle Robot df9fe21b58 Updated the 19 build version to 20100204 2010-02-04 00:42:38 +00:00
Eloy Lafuente 9e9b31f89b MDL-21407 latex filter - lalala, added missing savepoint 2010-02-03 09:11:49 +00:00
Eloy Lafuente 16421d0353 MDL-21407 tex filter - trim leading whitespace from latex preamble 2010-02-03 09:10:13 +00:00
Andrew Davis a97f19333c grader report MDL-21367 when an item is unhidden its category should unhide to 2010-02-03 02:22:58 +00:00
Moodle Robot c50959fa54 Updated the 19 build version to 20100203 2010-02-03 00:42:30 +00:00
Moodle Robot 0815881c65 Updated the 19 build version to 20100202 2010-02-02 00:38:58 +00:00
Penny Leach 5f3aa3c97a mnet MDL-17863 increase length of portno field in the host table (so 443 works) 2010-02-01 04:19:51 +00:00
Penny Leach 6b970039cb mnet MDL-17082 fixing typo in previous bugfix 2010-02-01 01:43:26 +00:00
Moodle Robot 49e25c58ea Updated the 19 build version to 20100201 2010-02-01 00:38:11 +00:00
Moodle Robot 360a5d6955 Automatic installer.php lang files by installer_builder (20100201) 2010-02-01 00:31:21 +00:00
Moodle Robot 8f978af0a3 Updated the 19 build version to 20100131 2010-01-31 00:37:52 +00:00
Moodle Robot 678730b041 Updated the 19 build version to 20100130 2010-01-30 00:38:29 +00:00
Moodle Robot c7539c2c15 Automatic installer.php lang files by installer_builder (20100130) 2010-01-30 00:31:41 +00:00
Helen Foster d6b5a314f7 help file MDL-21308 rewording thanks to Bente Olsen 2010-01-29 20:27:30 +00:00
Andrew Davis fd1e0f3beb grader report MDL-21374 made column averages align correctly 2010-01-29 01:17:23 +00:00
Moodle Robot 2d9e548ef5 Updated the 19 build version to 20100129 2010-01-29 00:37:36 +00:00
Rossiani Wijaya b1bef4085e MDL-21440 - replacing hardcoded string with language string. 2010-01-28 02:19:06 +00:00
Moodle Robot f5058b206b Updated the 19 build version to 20100128 2010-01-28 00:37:53 +00:00
Moodle Robot 62e1cf14d8 Updated the 19 build version to 20100127 2010-01-27 00:37:49 +00:00
Moodle Robot 2fd7250f20 Updated the 19 build version to 20100126 2010-01-26 00:37:48 +00:00
Gordon Bateson 986c607c4b do not treat https absolute urls as relative urls 2010-01-25 07:16:45 +00:00
Penny Leach 70d2f4be3c mnet MDL-17629 upgrade to fix referntial integrity in mnet hostids for localhost and all hosts records 2010-01-25 00:59:21 +00:00
Moodle Robot bcaa8cd2bd Updated the 19 build version to 20100125 2010-01-25 00:37:41 +00:00
Moodle Robot 788291baa0 Updated the 19 build version to 20100124 2010-01-24 00:37:52 +00:00
Moodle Robot e99a3c131c Updated the 19 build version to 20100123 2010-01-23 00:37:15 +00:00
Rossiani Wijaya da4aed67d3 MDL-21300 - remove filename validation for invalid character. 2010-01-22 02:01:03 +00:00
Moodle Robot 0135dda86a Updated the 19 build version to 20100122 2010-01-22 00:38:08 +00:00
Eloy Lafuente 3a41c990dc MDL-16018 textarea height - min 7 lines to avoid visualization problem 2010-01-22 00:01:08 +00:00
Eloy Lafuente 589ad34e82 MDL-21265 wiki - fix problem for students not able to see entries in other groups until own entry is created by teacher 2010-01-21 23:40:02 +00:00
Eloy Lafuente 94e5756daf MDL-21293 Grrr, left one testing line there... sorry! 2010-01-21 19:34:27 +00:00
Eloy Lafuente 468a1aff83 MDL-21293 Better conversion from old to new categories in specialization() 2010-01-21 19:32:39 +00:00
Inaki 3381dd4607 auth ldap/cas config: MDL-21343 LDAP / CAS settings broken due to wrong superflous value 2010-01-21 19:20:37 +00:00
Eloy Lafuente bc188d0273 MDL-21293 tag_youtube block - migrate from old (not working anymore!) YouTube API
to the new Google Data API
2010-01-21 17:37:46 +00:00
Moodle Robot 1584d69510 Updated the 19 build version to 20100121 2010-01-21 00:38:04 +00:00
Eloy Lafuente 35e25af7b0 MDL-21393 clean old executabble (by everybody) script. 2010-01-20 11:21:30 +00:00
Rossiani Wijaya 85056e763f MDL-11131 - style for temporary block handler (for sticky block) 2010-01-20 06:37:51 +00:00
Rossiani Wijaya 1833b24abb MDL-11131 - fixed the weight of sticky blocks as it moved around. 2010-01-20 04:36:23 +00:00
Moodle Robot e3fb0b7847 Updated the 19 build version to 20100120 2010-01-20 00:37:39 +00:00
Moodle Robot 7a525d74f0 Updated the 19 build version to 20100119 2010-01-19 00:38:01 +00:00
Eloy Lafuente 77fcfa7395 MDL-21370 restore - avoid adding slashes twice to user info
Credit goes to jean-christophe zulian
2010-01-18 19:37:49 +00:00
Tim Hunt d3e2dfaf75 graphlib MDL-21371: Legend layout issue when different legend texts had different heights. 2010-01-18 15:24:19 +00:00
Moodle Robot 1070f24868 Updated the 19 build version to 20100118 2010-01-18 00:37:41 +00:00
Moodle Robot e5448baec4 Automatic installer.php lang files by installer_builder (20100118) 2010-01-18 00:30:50 +00:00
Moodle Robot 5c2bb616c7 Updated the 19 build version to 20100117 2010-01-17 00:37:40 +00:00
Moodle Robot e418527862 Updated the 19 build version to 20100116 2010-01-16 00:37:57 +00:00
Sam Marshall 8ec0c7b0da MDL-21356 rsslib: Schema address from tag output in wasn't escaped (problem only if it contains &) 2010-01-15 14:36:48 +00:00
Moodle Robot 4f1216af39 Updated the 19 build version to 20100115 2010-01-15 00:37:47 +00:00
Moodle Robot 2c214cee4f Automatic installer.php lang files by installer_builder (20100115) 2010-01-15 00:30:56 +00:00
Pierre Pichet d2eca89391 MDL-21336 testing with $correct != '' so that correct answer 0 is shown in multianswer 2010-01-14 21:56:42 +00:00
David Mudrak a81beb4c24 MDL-21346 fixed various print_password_policy() issues 2010-01-14 20:46:31 +00:00
David Mudrak a34d4fbe03 MDL-21229 editor: added missing tooltip translation 2010-01-14 10:20:29 +00:00
Andrew Davis 732cef98a7 weblib MDL-21183 Commented out some unreasonable unit tests 2010-01-14 02:14:10 +00:00
Pierre Pichet 77a6f29667 MDL-21336 testing with $correct != '' so that correct answer 0 is shown 2010-01-14 01:17:37 +00:00
Moodle Robot 85cb53c0ad Updated the 19 build version to 20100114 2010-01-14 00:38:03 +00:00
Dan Marsden 5883099064 SCORM AICC MDL-21330 fix php notice - thanks to Matteo Scaramuccia for report and fix. merged from Stable 2010-01-13 22:42:03 +00:00
Penny Leach 46cc83dfdb mnet MDL-17931 add slashes to mnet method profiles when saving 2010-01-13 22:17:25 +00:00
Dan Marsden 534182ebdd SCORM AICC MDL-19392 add some missing params to querystring merged from HEAD 2010-01-13 22:08:39 +00:00
Eloy Lafuente b70f33ea6d NOBUG: Fix notice (and something more?). Like MDL-12961 but in data module 2010-01-13 16:47:42 +00:00
Rossiani Wijaya 3de4198a4f MDL-20402 - update bulk user action messages from regular textarea to HTML editor. 2010-01-13 07:56:20 +00:00
Penny Leach 1ddd8283f9 mnet: MDL-20059 fix up login/mnet_email.php in a few places
Merged (belatedly from HEAD)
2010-01-13 03:10:26 +00:00
Penny Leach 3022e494ca mnet MDL-21328 fixed non unique first field sql in mnet_services.php 2010-01-13 02:46:13 +00:00
Penny Leach bcb7c63ec0 mnet MDL-17082 removed all use of $_POST 2010-01-13 02:42:05 +00:00
Andrew Davis 6dc8c4e402 weblib MDL-21296 a temporary workaround convert_urls_into_links() causing timeouts 2010-01-13 02:16:12 +00:00
Dan Marsden ff9be2feef SCORM AICC MDL-19392 MDL-13716 cast result as a String in AICC (already done in Scorm 1.2 and 1.3 merged from HEAD 2010-01-13 02:01:31 +00:00
Penny Leach a3f6b0fe7e mnet MDL-19260 add an addslashes_object when updating public keys
fixing typo in last commit
2010-01-13 01:48:23 +00:00
Penny Leach 77ca2c9c1d mnet MDL-19260 add an addslashes_object when updating public keys
not merged to HEAD because of new db stuff
2010-01-13 01:43:24 +00:00
Dan Marsden 2ee0ca3438 SCORM AICC MDL-21304 typo when referring to SCORM session var in AICC files - thanks to Matteo Scaramuccia for the report and fix. merged from HEAD 2010-01-13 01:39:22 +00:00
Moodle Robot 7bf1a0ec9b Updated the 19 build version to 20100113 2010-01-13 00:38:01 +00:00
Eloy Lafuente 0cced51f5a MDL-21296 - secs are secs no milisecs, :-P 2010-01-12 14:07:34 +00:00
Eloy Lafuente 6650e754c7 MDL-21296 - Adding timing info to test in order to compare results 2010-01-12 14:06:06 +00:00
Eloy Lafuente b0fbf376cc MDL-21168 - Support encoded chars in query part of URL. Done in review day, but it's tested, grrr. 2010-01-12 13:37:13 +00:00
Eloy Lafuente fe8525e86b MDL-21168 - Added test for URLs with encoded paths and queries 2010-01-12 13:23:23 +00:00
Gordon Bateson 1bef863f84 add groupings awareness to HotPot module 2010-01-12 07:26:10 +00:00
Moodle Robot 743ee9d956 Updated the 19 build version to 20100112 2010-01-12 00:37:42 +00:00
Penny Leach 8901f90395 mnet: MDL-21298 fixed a very unhelpful error message (and saved a db query)
this adds a new string for nolocaluser - nolocaluser2 (it's just nolocaluser in head)
2010-01-11 22:20:14 +00:00
Penny Leach decbf994c0 mnet/login: MDL-21018 - be a bit more picky about when to show the link to mnet_email.php 2010-01-11 22:05:47 +00:00
Rossiani Wijaya f3a1b0ce39 MDL-21174 - exclude deleted users in bulk upload of user profile pictures. 2010-01-11 06:50:02 +00:00
Andrew Davis 5eb17eabee weblib MDL-21168 I had accidently deleted a test 2010-01-11 06:21:32 +00:00
Andrew Davis bdac61091c weblib MDL-21168 added some more tests 2010-01-11 06:14:09 +00:00
Andrew Davis 1f6a37155a course sorting MDL-21011 made upgrade code more efficient 2010-01-11 02:29:08 +00:00
Penny Leach b6fff6a5aa mnet MDL-17169 trim the raw xmlrpc response before passing it to the xml parser 2010-01-11 01:02:35 +00:00
Moodle Robot d3b3fad86d Updated the 19 build version to 20100111 2010-01-11 00:38:10 +00:00
Moodle Robot 276b2b2ea3 Updated the 19 build version to 20100110 2010-01-10 00:37:30 +00:00
Moodle Robot d807d3a516 Automatic installer.php lang files by installer_builder (20100110) 2010-01-10 00:30:43 +00:00
Eloy Lafuente 0959a70851 First commit of ast_utf8 installer file. Backported from HEAD 2010-01-09 23:16:46 +00:00
Eloy Lafuente 158b6463e6 file installer.php was added on branch MOODLE_19_STABLE on 2010-01-09 23:16:46 +0000 2010-01-09 23:13:20 +00:00
Moodle Robot 25a049d01d Updated the 19 build version to 20100109 2010-01-09 00:38:02 +00:00
Moodle Robot cbcd5d6c27 Automatic installer.php lang files by installer_builder (20100109) 2010-01-09 00:31:11 +00:00
Eloy Lafuente 321b4075cd MDL-21168 convert_urls_into_links() - added tests about links in tags and double conversions 2010-01-08 22:21:16 +00:00
Eloy Lafuente 8267366e44 MDL-21168 avoid http://www.whatever to be linked twice 2010-01-08 22:16:37 +00:00
Eloy Lafuente c782bd7a4b MDL-21168 convert_urls_into_links() - changed solution to avoid linking
inside <img> tags by negative look-behind assertion of =" string
2010-01-08 16:48:38 +00:00
Eloy Lafuente 7fd2dcec3c MDL-21168 convert_urls_into_links() - minor changes to tests (code formatting,
utf_decode() out and properly escape % chars.
2010-01-08 16:38:40 +00:00
Andrew Davis ac13e678c9 grader report MDL-21088 Fixed assorted vertical alignment issues 2010-01-08 08:03:22 +00:00
Andrew Davis 1a59f3dd02 grader report MDL-21270 Use constants instead of integers 2010-01-08 07:46:30 +00:00
Andrew Davis 7cf7a14d85 course sorting MDL-21011 "Re-sort courses by name" button eventually lead sortorder to hit column maximum value 2010-01-08 07:38:50 +00:00
Andrew Davis 1ca30d589f course sorting MDL-21011 "Re-sort courses by name" button eventually lead sortorder to hit column maximum value 2010-01-08 07:17:52 +00:00
Andrew Davis 9c09c3b89a course sorting MDL-21011 "Re-sort courses by name" button eventually lead sortorder to hit column maximum value 2010-01-08 07:07:55 +00:00
Andrew Davis e45757ad63 moodlelib MDL-20918 usergetdate was returning an array in a different order depending on whether or not timezone was set 2010-01-08 06:41:57 +00:00
Rossiani Wijaya 366a5bb8fd MDL-18774 - fixed fullname format label. 2010-01-08 02:27:32 +00:00
Moodle Robot deb03b4ff9 Updated the 19 build version to 20100108 2010-01-08 00:37:59 +00:00
Eloy Lafuente 566c19c620 MDL-21264 sql_isnotempty fixed. Thanks Tim! Backported from HEAD 2010-01-07 15:02:41 +00:00
David Mudrak f330bf4a42 MDL-21248 workshop: yet another place violating not null feedback 2010-01-07 14:19:11 +00:00
David Mudrak d5ed6c36d2 MDL-21248 workshop fills description field for a grade mapping only element 2010-01-07 13:53:55 +00:00
Moodle Robot 3eb066cdfa Updated the 19 build version to 20100107 2010-01-07 00:37:30 +00:00
Rossiani Wijaya 733f09a461 MDL-18824 changing fullname name (fullnamedisplay) default value to language. 2010-01-06 05:10:23 +00:00
Moodle Robot bc90a47903 Updated the 19 build version to 20100106 2010-01-06 00:37:59 +00:00
Moodle Robot 3f09627554 Automatic installer.php lang files by installer_builder (20100106) 2010-01-06 00:31:06 +00:00
Helen Foster 24cc21c077 config settings: MDL-16658 small rewording 2010-01-05 22:15:59 +00:00
Helen Foster d10342e4a2 moodle lang string: MDL-16658 small rewording 2010-01-05 21:53:51 +00:00
Moodle Robot 0cdb0453f2 Updated the 19 build version to 20100105 2010-01-05 00:37:25 +00:00
Andrew Davis 36f1ce024f graderreport MDL-21159 grader report was producing invalid html 2010-01-04 08:14:14 +00:00
Moodle Robot a8bb7474a6 Updated the 19 build version to 20100104 2010-01-04 00:34:35 +00:00
Moodle Robot 71b1edd8da Updated the 19 build version to 20100103 2010-01-03 00:35:00 +00:00
Moodle Robot c73ca693e9 Automatic installer.php lang files by installer_builder (20100103) 2010-01-03 00:28:11 +00:00
Moodle Robot 709fa905af Updated the 19 build version to 20100102 2010-01-02 00:34:24 +00:00
Moodle Robot 3b58064a98 Updated the 19 build version to 20100101 2010-01-01 00:34:57 +00:00
Moodle Robot c39ff02c27 Automatic installer.php lang files by installer_builder (20100101) 2010-01-01 00:28:11 +00:00
Moodle Robot 817837383b Updated the 19 build version to 20091231 2009-12-31 00:35:52 +00:00
Moodle Robot b3ec8bce9c Automatic installer.php lang files by installer_builder (20091231) 2009-12-31 00:28:10 +00:00
Eloy Lafuente 4029d09097 MDL-16658 restore - new restore:createuser cap + pre-check users before restoring 2009-12-30 17:17:09 +00:00
Helen Foster 7e766c4d51 moodle.org lang string: MDLSITE-846 thanks to Mauno 2009-12-30 14:07:31 +00:00
Helen Foster bbf0d4086f moodle.org lang strings: MDLSITE-297 thanks to MD 2009-12-30 12:36:09 +00:00
Petr Skoda 75c9459b00 MDL-21194 fixed mnet quotes issue - credit goes to Valery Fremaux 2009-12-30 08:06:15 +00:00
Moodle Robot 689458916d Updated the 19 build version to 20091230 2009-12-30 00:34:48 +00:00
Eloy Lafuente 0fa3908eb8 NOBUG: Whitespace and XHTML 2009-12-29 19:34:06 +00:00
Moodle Robot 752542c5af Updated the 19 build version to 20091229 2009-12-29 00:34:23 +00:00
Eloy Lafuente f4b233eef5 MDL-21203 delete dupe code - Credit goes to Antoine G 2009-12-28 14:32:08 +00:00
Moodle Robot 8002b70cbb Updated the 19 build version to 20091228 2009-12-28 00:35:53 +00:00
Moodle Robot 646feb47f2 Updated the 19 build version to 20091227 2009-12-27 00:34:21 +00:00
Moodle Robot 9a2f1f706c Updated the 19 build version to 20091226 2009-12-26 00:34:34 +00:00
Moodle Robot eb04558e7e Updated the 19 build version to 20091225 2009-12-25 00:34:22 +00:00
Moodle Robot a70b4067ea Automatic installer.php lang files by installer_builder (20091225) 2009-12-25 00:27:41 +00:00
Valery Fremaux e87eda39cf http://tracker.moodle.org/browse/MDL-21186 2009-12-24 23:08:30 +00:00
Andrew Davis 1b34261dc6 weblib MDL-21168 improved convert_urls_into_links 2009-12-24 04:36:14 +00:00
Moodle Robot fcf40a111e Updated the 19 build version to 20091224 2009-12-24 00:35:07 +00:00
Rossiani Wijaya 80990f1aef MDL-20949 changing the language string from 'your' to 'the', to print out the password policy requirements. 2009-12-23 02:07:08 +00:00
Moodle Robot 7b11ee0635 Updated the 19 build version to 20091223 2009-12-23 00:34:52 +00:00
Matt Oquist e48675ba98 MDL-19024 Fix a bug that stops strings from being displayed correctly in the admin section when configuring the MNET services. (Thanks, Richard Mansfield.) 2009-12-22 03:00:42 +00:00
Moodle Robot 1276ac66ff Updated the 19 build version to 20091222 2009-12-22 00:35:13 +00:00
Moodle Robot fc7e0e9d67 Updated the 19 build version to 20091221 2009-12-21 00:34:35 +00:00
Pierre Pichet ed26d187a7 correcting pass from reference problem line 84 as identified by syntax report on moodle.org 2009-12-20 13:19:01 +00:00
Moodle Robot 61b9115ad2 Updated the 19 build version to 20091220 2009-12-20 00:35:08 +00:00
Moodle Robot 8fd08116ea Updated the 19 build version to 20091219 2009-12-19 00:34:22 +00:00
Moodle Robot a91d252b32 Automatic installer.php lang files by installer_builder (20091219) 2009-12-19 00:27:44 +00:00
Eloy Lafuente 64aec4287b MDL-21045, MDL-21046 restore - gradebook categories, letters and outcomes are now
restored no matter if user info is enabled or no (as far as they are user-independent)
2009-12-18 18:47:14 +00:00
Tim Hunt f7f6e31b63 Grade item: MDL-21161 timemodified never gets set on calculated gradebook columns 2009-12-18 18:19:48 +00:00
Eloy Lafuente 4e2ba0840b Related to MDL-6489 - advanced search template was missing in backup/restore 2009-12-18 18:08:56 +00:00
Eloy Lafuente 9e845f9ee7 MDL-11507, MDL-15157 database activity - avoid some notices on restore 2009-12-18 17:51:27 +00:00
Eloy Lafuente 06cc4c9699 MDL-21160 database activity - remap scale on restore 2009-12-18 17:37:11 +00:00
Tim Hunt b9a18f1b17 grader report: MDL-21159 Link to user report does not respect $CFG->grade_profilereport setting.
Also, the report was generating invalid XHTML.
2009-12-18 17:13:42 +00:00
Dan Marsden 7cf74b7002 SCORM MDL-20122 badly formatted restore values - thanks to Michael Avelar for the fix merged from HEAD 2009-12-18 08:20:48 +00:00
Dan Marsden d2f35f4357 SCORM MDL-18857 allow items with a score of 0 to still display on outline report. merged from HEAD 2009-12-18 07:24:07 +00:00
Dan Marsden 2dae979d8e SCORM MDL-21024 missing field in restore. merged from HEAD 2009-12-18 07:14:53 +00:00
Dan Marsden 98cdb41a4a SCORM MDL-20588 workaround for IE 6 bug - turn zlib compression off if IE 6 is detected. merged from HEAD 2009-12-18 06:42:37 +00:00
Dongsheng Cai c6a032b9d3 "MDL-15502, added a filter to selec users who have never logged in, credits to Anthony Borrow" 2009-12-18 05:24:14 +00:00
Dan Marsden 990ecc4694 mnet MDL-16522 missed a check - should not show logs tab for all hosts screen merged from HEAD 2009-12-18 03:21:07 +00:00
Dan Marsden d6f826c810 mnet MDL-16522 duplication of inconsistant code - now uses a tabs.php file but still needs a further code tidy as per MDL-16286 merged from HEAD 2009-12-18 03:16:35 +00:00
Dan Marsden c883e63ebd file tabs.php was added on branch MOODLE_19_STABLE on 2009-12-18 03:16:35 +0000 2009-12-18 03:09:05 +00:00
Dongsheng Cai baf1dc0a4d "MDL-21122, fixed saving setting problem in section links block" 2009-12-18 03:01:36 +00:00
Pierre Pichet 1343e53aff correcting pass from reference problem line 24 as identified by syntax report of Fri Dec 18 08:21:03 WST 2009 2009-12-18 02:35:47 +00:00
Moodle Robot e2baf96bdf Updated the 19 build version to 20091218 2009-12-18 00:34:10 +00:00
Pierre Pichet efed05fd25 MDL-3282 , MDL-4595 error in numerical with comma . More number formats are allowed.
merged from HEAD
2009-12-17 21:50:53 +00:00
Eloy Lafuente 3ae036b04b NOBUG minor typo in phpdocs 2009-12-17 14:38:59 +00:00
Sam Hemelryk 9d557dee01 weblib MDL-6820 Reverted modification due to unforseen regressions 2009-12-17 09:22:23 +00:00
Andrew Davis 49b115075e mnet MDL-12057 fixed mnet admin page table width 2009-12-17 08:20:35 +00:00
Andrew Davis c85a042383 live log MDL-20994 made "block editing on" button work on live logs page 2009-12-17 08:03:19 +00:00
Andrew Davis 6b8e4d338c weblib MDL-20826 improved convert_urls_into_links() 2009-12-17 07:43:46 +00:00
Moodle Robot af1d07d088 Updated the 19 build version to 20091217 2009-12-17 00:34:18 +00:00
Rossiani Wijaya 019907767a MDL-20949 printing out password policy requirements on signup page. 2009-12-16 01:51:48 +00:00
Andrew Davis d8a3469cfa quiz MDL-18896 small efficiency improvement 2009-12-16 00:51:28 +00:00
Moodle Robot 3f55dc7059 Updated the 19 build version to 20091216 2009-12-16 00:34:09 +00:00
Moodle Robot d2a247b68c Updated the 19 build version to 20091215 2009-12-15 00:34:51 +00:00
Moodle Robot bd2dbab136 Automatic installer.php lang files by installer_builder (20091215) 2009-12-15 00:28:11 +00:00
Gordon Bateson 811fab85a7 for consistency, use 0x80 instead of 128 in hotpot_charcode_to_utf8() 2009-12-14 03:28:26 +00:00
Moodle Robot 6bb053347c Updated the 19 build version to 20091214 2009-12-14 00:33:35 +00:00
Moodle Robot 959792675e Updated the 19 build version to 20091213 2009-12-13 00:33:18 +00:00
Moodle Robot 23e91e0dcc Updated the 19 build version to 20091212 2009-12-12 00:33:47 +00:00
Moodle Robot f16b7bf9b0 Updated the 19 build version to 20091211 2009-12-11 00:33:31 +00:00
Moodle Robot 842d34099c Updated the 19 build version to 20091210 2009-12-10 00:34:09 +00:00
Eloy Lafuente 6bf36bc2b9 MDL-20667 grader report - fix visualization annoyance in overall/range rows 2009-12-10 00:12:42 +00:00
Rossiani Wijaya e29748a54a MDL-20044 fixed ajax functionality when using bullet points (<ul>) in topic summary. 2009-12-09 01:59:47 +00:00
Moodle Robot d694bf90a1 Updated the 19 build version to 20091209 2009-12-09 00:34:52 +00:00
Gordon Bateson d113780338 MDL-20810: add missing function hotpot_charcode_to_utf8() required when importing Hot Potatoes files containing non-ascii chars into Moodle question bank 2009-12-08 04:09:59 +00:00
Moodle Robot b2ffd65ec2 Updated the 19 build version to 20091208 2009-12-08 00:33:56 +00:00
Moodle Robot 8bbd86a2db Automatic installer.php lang files by installer_builder (20091208) 2009-12-08 00:27:25 +00:00
Eloy Lafuente 01c986b64b MDL-20961 customize notices showed when user information is not included in baclup 2009-12-07 11:36:55 +00:00
jerome mouneyrac e223319801 flash upgrader MDL-20841 fix swfobject javascript bug related to http://code.google.com/p/swfobject/issues/detail?id=332 2009-12-07 03:23:59 +00:00
Moodle Robot 53bc0353b7 Updated the 19 build version to 20091207 2009-12-07 00:33:35 +00:00
Moodle Robot d64c3bf6d3 Updated the 19 build version to 20091206 2009-12-06 00:33:16 +00:00
Eloy Lafuente becb6e1c07 MDL-21029 glossary - fix display of entries belonging to site/course global glossaries 2009-12-05 11:23:12 +00:00
Moodle Robot 43371caf2c Updated the 19 build version to 20091205 2009-12-05 00:34:06 +00:00
Moodle Robot 21b83bd0c8 Automatic installer.php lang files by installer_builder (20091205) 2009-12-05 00:27:25 +00:00
Tim Hunt 331e1a976a Typo in calculated qtype lang file. 2009-12-04 19:02:15 +00:00
David Mudrak ed55d692f3 MDL-20992 workshop supports course reset 2009-12-04 12:21:28 +00:00
Dongsheng Cai 0cd77e569f "MDL-20125, added configurable setting to section_links block, credits to Jason Hardin" 2009-12-04 06:40:44 +00:00
Dongsheng Cai 44d34e8990 "MDL-20587, chat module, show sessions with just one users, credits to Daniel Neis" 2009-12-04 03:51:20 +00:00
Dongsheng Cai 8aadf873b7 "MDL-20819, sometimes, modules return non-array which can break stats processing, added more error checking" 2009-12-04 03:04:37 +00:00
Moodle Robot cee8f4b24a Updated the 19 build version to 20091204 2009-12-04 00:33:27 +00:00
Sam Hemelryk c12167467e weblib MDL-20725 Fixed string formatting issue in nested selects 2009-12-03 08:00:00 +00:00
jerome mouneyrac 0402b9d31e flash upgrader MDL-20841 fix xhtml strict, Kudo to Tim Hunt 2009-12-03 02:59:38 +00:00
jerome mouneyrac e63d2e43b0 flash upgrader MDL-20841 update phpdoc 2009-12-03 02:37:39 +00:00
Rossiani Wijaya ec30a562d8 MDL-20725 remove double escaping characters. 2009-12-03 02:09:58 +00:00
Andrew Davis 891027acf3 componentlib MDL-20966 Added a guard to prevent a php warning during upgrade 2009-12-03 00:59:55 +00:00
Moodle Robot 7b9b800b54 Updated the 19 build version to 20091203 2009-12-03 00:33:49 +00:00
Petr Skoda d44b4a796d MDL-21026 improved entity handling 2009-12-02 21:09:12 +00:00
Sam Marshall d5f4161c2c MDL-2684: kses strips out CSS from style tags unless the first property is on 'allowed' list, this is silly 2009-12-02 17:59:12 +00:00
Andrew Davis e7062765e0 mnet MDL-21019 Removed hard coded strings 2009-12-02 09:24:48 +00:00
Moodle Robot cc692622fc Updated the 19 build version to 20091202 2009-12-02 00:34:29 +00:00
Moodle Robot daee0e4fc5 Updated the 19 build version to 20091201 2009-12-01 00:34:12 +00:00
Sam Marshall 8562968ec9 MDL-21009 Group selector must use absolute links in order to work with javascript off (last minute stupid testing fix) 2009-11-30 17:18:44 +00:00
Sam Marshall dcca8dfb97 MDL-21009 Group selector must use absolute links in order to work with javascript off 2009-11-30 17:12:16 +00:00
Dongsheng Cai 92fa5b0f2a "MDL-20985, fixed typo" 2009-11-30 02:16:18 +00:00
Eloy Lafuente 8a57240f6f MDL-20826 convert_urls_into_links() - add some test to reveal (side?) problems
and allow comparing of alternatives
2009-11-30 02:02:31 +00:00
Andrew Davis a757f4a2d7 unit tests MDL-19060 unified the two checks for CVS directories 2009-11-30 01:16:23 +00:00
Moodle Robot dbc8d12eb8 Updated the 19 build version to 20091130 2009-11-30 00:33:55 +00:00
Eloy Lafuente 6dd255bde8 MDL-16658 restore users pre-check. Reviewed logic with latest discussions. Continues disabled 2009-11-29 19:34:07 +00:00
Moodle Robot 2315ad0483 Updated the 19 build version to 20091129 2009-11-29 00:33:58 +00:00
Moodle Robot 0569249083 Updated the 19 build version to 20091128 2009-11-28 00:33:51 +00:00
Moodle Robot 12aa1d3f87 Automatic installer.php lang files by installer_builder (20091128) 2009-11-28 00:27:15 +00:00
Eloy Lafuente a5f0b03411 MDL-19697 mnet auth - start saving user->firstaccess 2009-11-27 14:47:43 +00:00
jerome mouneyrac ee720bd06f flash upgrader MDL-20841 Add lang support to the flash upgrader 2009-11-27 09:50:14 +00:00
Andrew Davis bb2fcfcbc3 unit tests MDL-20537 Added another unit test for shorten_text 2009-11-27 06:12:07 +00:00
Andrew Davis 9e12452925 mnet admin MDL-12057 Added an entry to standard style css to make tables on admin/mnet/index.php the same width 2009-11-27 05:57:52 +00:00
Andrew Davis dcc7e27813 cornflower theme MDL-20987 Added missing close div tag at the end of cornflower footer.html 2009-11-27 05:52:25 +00:00
Andrew Davis 1721304eea grader report MDL-20179 Fixed broken JS on grader report 2009-11-27 05:45:56 +00:00
Andrew Davis a368208636 unit test MDL-19060 prevent unit tests from scanning cvs and .git directories 2009-11-27 05:40:02 +00:00
Martin Dougiamas 5bcd30d5c3 Bumping the version post-release 2009-11-27 04:51:03 +00:00
Moodle Robot 75e5a14ada Updated the 19 build version to 20091127 2009-11-27 00:34:47 +00:00
Moodle Robot 0ace0f0bdc Automatic installer.php lang files by installer_builder (20091127) 2009-11-27 00:28:06 +00:00
David Mudrak 6b67b00992 MDL-20981 admin/lang.php escapes all variables but $a placeholders 2009-11-26 14:32:57 +00:00
Eloy Lafuente fbb35a56e9 MDL-20982 glossary - make print view to respect current theme 2009-11-26 11:30:34 +00:00
Sam Hemelryk f334afe662 admin MDL-20980 Touched up regex that determines weak password salts 2009-11-26 09:01:04 +00:00
Sam Hemelryk 9cf85078d5 login MDL-20875 Fixed bug with messaging popup when changing password. Thanks Rossi for the patch 2009-11-26 07:25:31 +00:00
Sam Hemelryk a2a5c0875e upgrade MDL-20978 Added site's URL into the message subject sent out with recent upgrades 2009-11-26 06:48:43 +00:00
Moodle Robot c8db64ec4d Automatic installer.php lang files by installer_builder (20091126) 2009-11-26 00:26:55 +00:00
Moodle Robot a0026d1ef2 Updated the 19 build version to 20091126 2009-11-25 18:24:53 +00:00
647 changed files with 25019 additions and 17938 deletions
+3
View File
@@ -223,6 +223,9 @@
grade_cron();
mtrace('done.');
mtrace('Starting processing the event queue...');
events_cron();
mtrace('done.');
/// Run all core cron jobs, but not every time since they aren't too important.
/// These don't have a timer to reduce load, so we'll use a random number
+4
View File
@@ -1013,6 +1013,10 @@ function lang_fix_value_before_save($value='') {
if (ini_get_bool('magic_quotes_sybase')) { // Unescape escaped sybase quotes
$value = str_replace("''", "'", $value);
}
// escape all embedded variables
$value = str_replace('$', '\$', $value); // Add slashes for $
// unescape placeholders: only $a and $a->something are allowed. All other $variables are left escaped
$value = preg_replace('/\\\\\$a($|[^_a-zA-Z0-9\-]|\->[a-zA-Z0-9_]+)/', '$a\\1', $value);
$value = str_replace("'", "\\'", $value); // Add slashes for '
$value = str_replace('"', "\\\"", $value); // Add slashes for "
$value = str_replace("%","%%",$value); // Escape % characters
+1 -1
View File
@@ -248,7 +248,7 @@
if ($parent == 'en_utf8') {
continue;
}
if (strpos($parent, '[[') !== false) {
if (empty($parent) || strpos($parent, '[[') !== false) {
continue; // no parent
}
if (!isset($installedlangs[$parent])) {
+1 -1
View File
@@ -178,7 +178,7 @@ if (!$acl) {
}
$deletecolumn = "<a href=\"?id={$aclrecord->id}&amp;action=delete&amp;sesskey={$USER->sesskey}\">"
. get_string('delete') . "</a>";
$table->data[] = array ($aclrecord->username, $aclrecord->mnet_host_id, $accesscolumn, $deletecolumn);
$table->data[] = array (s($aclrecord->username), $aclrecord->mnet_host_id, $accesscolumn, $deletecolumn);
}
}
+2 -2
View File
@@ -64,7 +64,7 @@ function mnet_get_functions($type, $parentname) {
foreach($rpcrecords as $rpc) {
if (!array_key_exists($rpc->function_name, $methodServiceArray)) {
$rpc->enabled = 0;
update_record('mnet_rpc', $rpc);
update_record('mnet_rpc', addslashes_recursive($rpc));
}
}
}
@@ -85,7 +85,7 @@ function mnet_get_functions($type, $parentname) {
} else {
array_unshift($profile, $details['returns']);
}
$dataobject->profile = serialize($profile);
$dataobject->profile = addslashes(serialize($profile));
$dataobject->help = addslashes($details['description']);
} else {
$dataobject->profile = serialize(array(array('type' => 'void', 'description' => 'No return value')));
+2 -16
View File
@@ -1,23 +1,9 @@
<?php
$logurl = $CFG->wwwroot.
'/course/report/log/index.php?chooselog=1&amp;showusers=1&amp;showcourses=1&amp;host_course='.$mnet_peer->id.
'%2F1&amp;user='.'0'.
'&amp;date=0'.
'&amp;modid=&amp;modaction=0&amp;logformat=showashtml';
admin_externalpage_print_header();
if (isset($mnet_peer->id) && $mnet_peer->id > 0) {
$tabs[] = new tabobject('mnetdetails', 'peers.php?step=update&amp;hostid='.$mnet_peer->id, $strmnetedithost, $strmnetedithost, false);
$tabs[] = new tabobject('mnetservices', 'mnet_services.php?step=list&amp;hostid='.$mnet_peer->id, $strmnetservices, $strmnetservices, false);
$tabs[] = new tabobject('mnetthemes', 'mnet_themes.php?step=list&amp;hostid='.$mnet_peer->id, $strmnetthemes, $strmnetthemes, false);
if ($mnet_peer->application->name == 'moodle') {
$tabs[] = new tabobject('mnetlog', $logurl, $strmnetlog, $strmnetlog, false);
}
} else {
$tabs[] = new tabobject('mnetdetails', '#', $strmnetedithost, $strmnetedithost, false);
}
print_tabs(array($tabs), 'mnetdetails');
$currenttab = 'mnetdetails';
require_once($CFG->dirroot .'/admin/mnet/tabs.php');
print_simple_box_start("center", "");
?>
+2 -4
View File
@@ -1,10 +1,8 @@
<?php
admin_externalpage_print_header();
$tabs[] = new tabobject('mnetdetails', 'peers.php?step=update&amp;hostid='.$mnet_peer->id, $strmnetedithost, $strmnetedithost, false);
$tabs[] = new tabobject('mnetservices', 'mnet_services.php?step=list&amp;hostid='.$mnet_peer->id, $strmnetservices, $strmnetservices, false);
$tabs[] = new tabobject('mnetthemes', 'mnet_themes.php?step=list&amp;hostid='.$mnet_peer->id, $strmnetthemes, $strmnetthemes, false);
print_tabs(array($tabs), 'mnetdetails');
$currenttab = 'mnetdetails';
require_once($CFG->dirroot .'/admin/mnet/tabs.php');
print_simple_box_start("center", "");
?>
+5 -14
View File
@@ -1,19 +1,9 @@
<?php
admin_externalpage_print_header();
$logurl = $CFG->wwwroot.
'/course/report/log/index.php?chooselog=1&amp;showusers=1&amp;showcourses=1&amp;host_course='.$mnet_peer->id.
'%2F1&amp;user='.'0'.
'&amp;date=0'.
'&amp;modid=&amp;modaction=0&amp;logformat=showashtml';
$currenttab = 'mnetservices';
require_once($CFG->dirroot .'/admin/mnet/tabs.php');
$tabs[] = new tabobject('mnetdetails', 'peers.php?step=update&amp;hostid='.$mnet_peer->id, $strmnetedithost, $strmnetedithost, false);
$tabs[] = new tabobject('mnetservices', 'mnet_services.php?step=list&amp;hostid='.$mnet_peer->id, $strmnetservices, $strmnetservices, false);
$tabs[] = new tabobject('mnetthemes', 'mnet_themes.php?step=list&amp;hostid='.$mnet_peer->id, $strmnetthemes, $strmnetthemes, false);
if ($mnet_peer->id != $CFG->mnet_all_hosts_id && $mnet_peer->application->name == 'moodle') {
$tabs[] = new tabobject('mnetlog', $logurl, $strmnetlog, $strmnetlog, false);
}
print_tabs(array($tabs), 'mnetservices');
print_simple_box_start("center", "");
?>
@@ -27,11 +17,12 @@ print_simple_box_start("center", "");
<?php
foreach($myservices as $name => $versions) {
$version = current($versions);
$langmodule = ($version['parent_type'] == 'mod' ? '' : ($version['parent_type'] . '_')) . $version['parent'];
?>
<tr>
<td align="left" valign="top" colspan="2">
<h3><?php echo get_string($name.'_name', $version['parent_type'].'_'.$version['parent'] , $mnet_peer->name); ?></h3>
<?php echo get_string($name.'_description', $version['parent_type'].'_'.$version['parent'], $mnet_peer->name); ?>
<h3><?php echo get_string($name.'_name', $langmodule , $mnet_peer->name); ?></h3>
<?php echo get_string($name.'_description', $langmodule, $mnet_peer->name); ?>
<?php
$breakstring = '';
foreach($versions as $version){
+11 -7
View File
@@ -24,6 +24,10 @@
// force Go ahead with something we've been warned is strange
$step = optional_param('step', NULL, PARAM_ALPHA);
$hostid = optional_param('hostid', NULL, PARAM_INT);
$publishes = optional_param('publish', null, PARAM_BOOL); // optional_param cleans arrays too
$subscribes = optional_param('subscribe', null, PARAM_BOOL); // optional_param cleans arrays too
$exists = optional_param('exists', null, PARAM_BOOL); // optional_param cleans arrays too
$nocertstring = '';
$nocertmatch = '';
$badcert = '';
@@ -43,21 +47,21 @@
if (($form = data_submitted()) && confirm_sesskey()) {
$mnet_peer->set_id($hostid);
$treevals = array();
foreach($_POST['exists'] as $key => $value) {
$host2service = get_record('mnet_host2service', 'hostid', $_POST['hostid'], 'serviceid', $key);
$publish = (isset($_POST['publish'][$key]) && $_POST['publish'][$key] == 'on')? 1 : 0;
$subscribe = (isset($_POST['subscribe'][$key]) && $_POST['subscribe'][$key] == 'on')? 1 : 0;
foreach($exists as $key => $value) {
$host2service = get_record('mnet_host2service', 'hostid', $hostid, 'serviceid', $key);
$publish = array_key_exists($key, $publishes) ? $publishes[$key] : 0;
$subscribe = array_key_exists($key, $subscribes) ? $subscribes[$key] : 0;
if ($publish != 1 && $subscribe != 1) {
if (false == $host2service) {
// We don't have or need a record - do nothing!
} else {
// We don't need the record - delete it
delete_records('mnet_host2service', 'hostid', $_POST['hostid'], 'serviceid', $key);
delete_records('mnet_host2service', 'hostid', $hostid, 'serviceid', $key);
}
} elseif (false == $host2service && ($publish == 1 || $subscribe == 1)) {
$host2service = new stdClass();
$host2service->hostid = $_POST['hostid'];
$host2service->hostid = $hostid;
$host2service->serviceid = $key;
$host2service->publish = $publish;
@@ -81,7 +85,7 @@
$id_list .= ', '.$CFG->mnet_all_hosts_id;
}
$concat = sql_concat('COALESCE(h2s.id,0) ', ' \'-\' ', ' svc.id');
$concat = sql_concat('COALESCE(h2s.id,0) ', ' \'-\' ', ' svc.id', '\'-\'', 'r.parent_type', '\'-\'', 'r.parent');
$query = "
SELECT DISTINCT
+2 -13
View File
@@ -3,19 +3,8 @@ admin_externalpage_print_header();
print_heading(get_string('themes'));
$original_theme = fullclone($THEME);
$logurl = $CFG->wwwroot.
'/course/report/log/index.php?chooselog=1&amp;showusers=1&amp;showcourses=1&amp;host_course='.$mnet_peer->id.
'%2F1&amp;user='.'0'.
'&amp;date=0'.
'&amp;modid=&amp;modaction=0&amp;logformat=showashtml';
$tabs[] = new tabobject('mnetdetails', 'peers.php?step=update&amp;hostid='.$mnet_peer->id, $strmnetedithost, $strmnetedithost, false);
$tabs[] = new tabobject('mnetservices', 'mnet_services.php?step=list&amp;hostid='.$mnet_peer->id, $strmnetservices, $strmnetservices, false);
$tabs[] = new tabobject('mnetthemes', 'mnet_themes.php?step=list&amp;hostid='.$mnet_peer->id, $strmnetthemes, $strmnetthemes, false);
if ($mnet_peer->id != $CFG->mnet_all_hosts_id) {
$tabs[] = new tabobject('mnetlog', $logurl, $strmnetlog, $strmnetlog, false);
}
print_tabs(array($tabs), 'mnetthemes');
$currenttab = 'mnetthemes';
require_once($CFG->dirroot .'/admin/mnet/tabs.php');
$themes = get_list_of_plugins("theme");
$sesskey = !empty($USER->id) ? $USER->sesskey : '';
+27
View File
@@ -0,0 +1,27 @@
<?php
/**
* Handles tabs for the mnet pages.
* We assume that $currenttab is defined
*
*/
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); // It must be included from a Moodle page
}
$logurl = $CFG->wwwroot.
'/course/report/log/index.php?chooselog=1&amp;showusers=1&amp;showcourses=1&amp;host_course='.$mnet_peer->id.
'%2F1&amp;user='.'0'.
'&amp;date=0'.
'&amp;modid=&amp;modaction=0&amp;logformat=showashtml';
$tabs = array();
if (isset($mnet_peer->id) && $mnet_peer->id > 0) {
$tabs[] = new tabobject('mnetdetails', 'peers.php?step=update&amp;hostid='.$mnet_peer->id, $strmnetedithost, $strmnetedithost, false);
$tabs[] = new tabobject('mnetservices', 'mnet_services.php?step=list&amp;hostid='.$mnet_peer->id, $strmnetservices, $strmnetservices, false);
$tabs[] = new tabobject('mnetthemes', 'mnet_themes.php?step=list&amp;hostid='.$mnet_peer->id, $strmnetthemes, $strmnetthemes, false);
if ($mnet_peer->application->name == 'moodle' && $mnet_peer->id != $CFG->mnet_all_hosts_id) {
$tabs[] = new tabobject('mnetlog', $logurl, $strmnetlog, $strmnetlog, false);
}
} else {
$tabs[] = new tabobject('mnetdetails', '#', $strmnetedithost, $strmnetedithost, false);
}
print_tabs(array($tabs), $currenttab);
+2 -2
View File
@@ -501,8 +501,8 @@ function report_security_check_passwordsaltmain($detailed=false) {
if (empty($CFG->passwordsaltmain)) {
$result->status = REPORT_SECURITY_WARNING;
$result->info = get_string('check_passwordsaltmain_warning', 'report_security');
} else if ($CFG->passwordsaltmain === 'a_very_long_random_string_of_characters#@6&*1'
|| trim($CFG->passwordsaltmain) === '' || preg_match('/^([\w]+|[\d]+)$/i', $CFG->passwordsaltmain)) {
} else if ($CFG->passwordsaltmain === 'some long random string here with lots of characters'
|| trim($CFG->passwordsaltmain) === '' || preg_match('/^([a-z0-9]{0,10})$/i', $CFG->passwordsaltmain)) {
$result->status = REPORT_SECURITY_WARNING;
$result->info = get_string('check_passwordsaltmain_weak', 'report_security');
} else {
+81 -4
View File
@@ -66,22 +66,39 @@ class ExHtmlReporter extends HtmlReporter {
function paintFail($message) {
// Explicitly call grandparent, not parent::paintFail.
SimpleScorer::paintFail($message);
$this->_paintPassFail('fail', $message);
$this->_paintPassFail('fail', $message, debug_backtrace());
}
/**
* Called when an error (uncaught exception or PHP error) needs to be output.
*/
function paintError($message) {
// Explicitly call grandparent, not parent::paintFail.
// Explicitly call grandparent, not parent::paintError.
SimpleScorer::paintError($message);
$this->_paintPassFail('exception', $message);
}
/**
* Private method. Used by printPass/Fail/Error.
* Called when a caught exception needs to be output.
*/
function _paintPassFail($passorfail, $message) {
function paintException($exception) {
// Explicitly call grandparent, not parent::paintException.
SimpleScorer::paintException($exception);
$message = 'Unexpected exception of type [' . get_class($exception) .
'] with message ['. $exception->getMessage() .
'] in ['. $exception->getFile() .
' line ' . $exception->getLine() . ']';
$stacktrace = null;
if (method_exists($exception, 'getTrace')) {
$stacktrace = $exception->getTrace();
}
$this->_paintPassFail('exception', $message, $stacktrace);
}
/**
* Private method. Used by printPass/Fail/Error/Exception.
*/
function _paintPassFail($passorfail, $message, $stacktrace = null) {
global $FULLME, $CFG;
print_simple_box_start('', '100%', '', 5, $passorfail . ' generalbox');
@@ -100,6 +117,25 @@ class ExHtmlReporter extends HtmlReporter {
echo "<a href=\"{$url}path=$folder$file\" title=\"$this->strrunonlyfile\">$file</a>";
echo $this->strseparator, implode($this->strseparator, $breadcrumb);
echo $this->strseparator, '<br />', $this->_htmlEntities($message), "\n\n";
if ($stacktrace) {
$dotsadded = false;
$interestinglines = 0;
$filteredstacktrace = array();
foreach ($stacktrace as $frame) {
if (empty($frame['file']) || (strpos($frame['file'], 'simpletestlib') === false
&& strpos($frame['file'], 'report/unittest') === false)) {
$filteredstacktrace[] = $frame;
$interestinglines += 1;
$dotsadded = false;
} else if (!$dotsadded) {
$filteredstacktrace[] = array('line' => '...', 'file' => '...');
$dotsadded = true;
}
}
if ($interestinglines > 1 || $passorfail == 'exception') {
echo '<div class="notifytiny">' . format_backtrace($filteredstacktrace) . "</div>\n\n";
}
}
print_simple_box_end();
flush();
}
@@ -193,4 +229,45 @@ class ExHtmlReporter extends HtmlReporter {
return get_string($identifier, 'simpletest', $a);
}
}
/**
* Formats a backtrace ready for output.
*
* @param array $callers backtrace array, as returned by debug_backtrace().
* @param boolean $plaintext if false, generates HTML, if true generates plain text.
* @return string formatted backtrace, ready for output.
*/
function format_backtrace($callers, $plaintext = false) {
// do not use $CFG->dirroot because it might not be available in destructors
$dirroot = dirname(dirname(__FILE__));
if (empty($callers)) {
return '';
}
$from = $plaintext ? '' : '<ul style="text-align: left">';
foreach ($callers as $caller) {
if (!isset($caller['line'])) {
$caller['line'] = '?'; // probably call_user_func()
}
if (!isset($caller['file'])) {
$caller['file'] = 'unknownfile'; // probably call_user_func()
}
$from .= $plaintext ? '* ' : '<li>';
$from .= 'line ' . $caller['line'] . ' of ' . str_replace($dirroot, '', $caller['file']);
if (isset($caller['function'])) {
$from .= ': call to ';
if (isset($caller['class'])) {
$from .= $caller['class'] . $caller['type'];
}
$from .= $caller['function'] . '()';
} else if (isset($caller['exception'])) {
$from .= ': '.$caller['exception'].' thrown';
}
$from .= $plaintext ? "\n" : '</li>';
}
$from .= $plaintext ? '' : '</ul>';
return $from;
}
?>
+1 -1
View File
@@ -56,7 +56,7 @@ class AutoGroupTest extends TestSuite {
}
$file_path = $path . '/' . $file;
if (is_dir($file_path)) {
if ($file != 'CVS' && !in_array($file_path, $this->ignorefolders)) {
if ($file != 'CVS' && $file != '.git' && !in_array($file_path, $this->ignorefolders)) {
$this->_recurseFolders($file_path);
}
} elseif (preg_match('/simpletest(\/|\\\\)test.*\.php$/', $file_path) ||
+1 -1
View File
@@ -325,7 +325,7 @@
if ($validroleids) {
$roleids = '('.implode(',', $validroleids).')';
$select = " SELECT u.id, u.firstname, u.lastname, u.email";
$select = " SELECT DISTINCT u.id, u.firstname, u.lastname, u.email";
$countselect = "SELECT COUNT(u.id)";
$from = " FROM {$CFG->prefix}user u
INNER JOIN {$CFG->prefix}role_assignments ra ON ra.userid = u.id
+5 -5
View File
@@ -26,7 +26,7 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
2700 => get_string('numminutes', '', 45),
3600 => get_string('numminutes', '', 60))));
$temp->add(new admin_setting_configselect('fullnamedisplay', get_string('fullnamedisplay', 'admin'), get_string('configfullnamedisplay', 'admin'),
'firstname lastname', array('language' => get_string('language'),
'language', array('language' => get_string('language'),
'firstname lastname' => get_string('firstname').' + '.get_string('lastname'),
'lastname firstname' => get_string('lastname').' + '.get_string('firstname'),
'firstname' => get_string('firstname'))));
@@ -65,16 +65,16 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
$temp->add(new admin_setting_configcheckbox('loginhttps', get_string('loginhttps', 'admin'), get_string('configloginhttps', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('cookiesecure', get_string('cookiesecure', 'admin'), get_string('configcookiesecure', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('cookiehttponly', get_string('cookiehttponly', 'admin'), get_string('configcookiehttponly', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('regenloginsession', get_string('regenloginsession', 'admin'), get_string('configregenloginsession', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('regenloginsession', get_string('regenloginsession', 'admin'), get_string('configregenloginsession', 'admin'), 1));
$temp->add(new admin_setting_configtext('excludeoldflashclients', get_string('excludeoldflashclients', 'admin'), get_string('configexcludeoldflashclients', 'admin'), '10.0.12', PARAM_TEXT));
$ADMIN->add('security', $temp);
// "modulesecurity" settingpage
$temp = new admin_settingpage('modulesecurity', get_string('modulesecurity', 'admin'));
$temp->add(new admin_setting_configselect('restrictmodulesfor', get_string('restrictmodulesfor', 'admin'), get_string('configrestrictmodulesfor', 'admin'), 'none', array('none' => 'No courses',
'all' => 'All courses',
'requested' => 'Requested courses')));
$temp->add(new admin_setting_configselect('restrictmodulesfor', get_string('restrictmodulesfor', 'admin'), get_string('configrestrictmodulesfor', 'admin'), 'none', array('none' => get_string('nocourses'),
'all' => get_string('fulllistofcourses'),
'requested' => get_string('requestedcourses'))));
$temp->add(new admin_setting_configcheckbox('restrictbydefault', get_string('restrictbydefault', 'admin'), get_string('configrestrictbydefault', 'admin'), 0));
if (!$options = get_records("modules")) {
$options = array();
+1 -1
View File
@@ -25,7 +25,7 @@ if ($hassiteconfig
get_string('alternatelogin', 'auth', htmlspecialchars($CFG->wwwroot.'/login/index.php')), ''));
$temp->add(new admin_setting_configtext('forgottenpasswordurl', get_string('forgottenpasswordurl', 'auth'),
get_string('forgottenpassword', 'auth'), ''));
$temp->add(new admin_setting_configtextarea('auth_instructions', get_string('instructions', 'auth'),
$temp->add(new admin_setting_confightmltextarea('auth_instructions', get_string('instructions', 'auth'),
get_string('authinstructions', 'auth'), ''));
$temp->add(new admin_setting_configtext('allowemailaddresses', get_string('allowemailaddresses', 'admin'), get_string('configallowemailaddresses', 'admin'), '', PARAM_NOTAGS));
$temp->add(new admin_setting_configtext('denyemailaddresses', get_string('denyemailaddresses', 'admin'), get_string('configdenyemailaddresses', 'admin'), '', PARAM_NOTAGS));
+4 -10
View File
@@ -191,25 +191,19 @@ function process_directory ($dir, $userfield, $overwrite, &$results) {
*/
function process_file ($file, $userfield, $overwrite) {
// Add additional checks on the filenames, as they are user
// controlled and we don't want to open any security holes.
// controlled and we don't want to open any security holes.
$path_parts = pathinfo(cleardoubleslashes($file));
$basename = $path_parts['basename'];
$extension = $path_parts['extension'];
if ($basename != clean_param($basename, PARAM_CLEANFILE)) {
// The original picture file name has invalid characters
notify(get_string('uploadpicture_invalidfilename', 'admin',
clean_param($basename, PARAM_CLEANHTML)));
return PIX_FILE_ERROR;
}
// The picture file name (without extension) must match the
// userfield attribute.
$uservalue = substr($basename, 0,
strlen($basename) -
strlen($extension) - 1);
// userfield names are safe, so don't quote them.
if (!($user = get_record('user', $userfield, addslashes($uservalue)))) {
// userfield names are safe, so don't quote them.
if (!($user = get_record('user', $userfield, addslashes($uservalue),'deleted',0))) {
$a = new Object();
$a->userfield = clean_param($userfield, PARAM_CLEANHTML);
$a->uservalue = clean_param($uservalue, PARAM_CLEANHTML);
+27 -22
View File
@@ -1,28 +1,33 @@
<?php // $Id$
require_once $CFG->libdir.'/formslib.php';
class admin_uploadpicture_form extends moodleform {
function definition (){
global $CFG, $USER;
$mform =& $this->_form;
$this->set_upload_manager(new upload_manager('userpicturesfile', false, false, null, false, 0, true, true, false));
$mform->addElement('header', 'settingsheader', get_string('upload'));
$mform->addElement('file', 'userpicturesfile', get_string('file'), 'size="40"');
$mform->addRule('userpicturesfile', null, 'required');
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
$choices =& $this->_customdata;
$mform->addElement('select', 'userfield', get_string('uploadpicture_userfield', 'admin'), $choices);
$mform->setType('userfield', PARAM_INT);
require_once $CFG->libdir.'/formslib.php';
$choices = array( 0 => get_string('no'), 1 => get_string('yes') );
$mform->addElement('select', 'overwritepicture', get_string('uploadpicture_overwrite', 'admin'), $choices);
$mform->setType('overwritepicture', PARAM_INT);
$this->add_action_buttons(false, get_string('uploadpictures', 'admin'));
}
class admin_uploadpicture_form extends moodleform {
function definition (){
global $CFG, $USER;
$mform =& $this->_form;
$this->set_upload_manager(new upload_manager('userpicturesfile', false, false, null, false, 0, true, true, false));
$mform->addElement('header', 'settingsheader', get_string('upload'));
$mform->addElement('file', 'userpicturesfile', get_string('file'), 'size="40"');
$mform->addRule('userpicturesfile', null, 'required');
$choices =& $this->_customdata;
$mform->addElement('select', 'userfield', get_string('uploadpicture_userfield', 'admin'), $choices);
$mform->setType('userfield', PARAM_INT);
$choices = array( 0 => get_string('no'), 1 => get_string('yes') );
$mform->addElement('select', 'overwritepicture', get_string('uploadpicture_overwrite', 'admin'), $choices);
$mform->setType('overwritepicture', PARAM_INT);
$this->add_action_buttons(false, get_string('uploadpictures', 'admin'));
}
}
?>
+5
View File
@@ -1,4 +1,9 @@
<?php // $Id$
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
require_once $CFG->libdir.'/formslib.php';
class admin_uploaduser_form1 extends moodleform {
+1 -1
View File
@@ -9,7 +9,7 @@ class user_message_form extends moodleform {
$mform->addElement('header', 'general', get_string('message', 'message'));
$mform->addElement('textarea', 'messagebody', get_string('messagebody'), array('rows'=>15, 'cols'=>60));
$mform->addElement('htmleditor', 'messagebody', get_string('messagebody'), array('rows'=>15, 'cols'=>60));
$mform->addRule('messagebody', '', 'required', null, 'client');
$mform->setHelpButton('messagebody', array('writing', 'reading', 'questions', 'richtext'), false, 'editorhelpbutton');
$mform->addElement('format', 'format', get_string('format'));
+1309 -976
View File
File diff suppressed because it is too large Load Diff
@@ -1,568 +1,190 @@
<?php
/**
* @file CAS/PGTStorage/pgt-db.php
* Basic class for PGT database storage
*/
// include phpDB library (the test was introduced in release 0.4.8 for
// the integration into Tikiwiki).
if (!class_exists('DB')) {
@include_once('DB.php');
}
/**
* @class PGTStorageDB
* The PGTStorageDB class is a class for PGT database storage. An instance of
* this class is returned by CASClient::SetPGTStorageDB().
*
* @author Pascal Aubry <pascal.aubry at univ-rennes1.fr>
*
* @ingroup internalPGTStorageDB
*/
class PGTStorageDB extends PGTStorage
{
/**
* @addtogroup internalPGTStorageDB
* @{
*/
/**
* a string representing a PEAR DB URL to connect to the database. Written by
* PGTStorageDB::PGTStorageDB(), read by getURL().
*
* @hideinitializer
* @private
*/
var $_url='';
/**
* This method returns the PEAR DB URL to use to connect to the database.
*
* @return a PEAR DB URL
*
* @private
*/
function getURL()
{
return $this->_url;
}
/**
* The handle of the connection to the database where PGT's are stored. Written by
* PGTStorageDB::init(), read by getLink().
*
* @hideinitializer
* @private
*/
var $_link = null;
/**
* This method returns the handle of the connection to the database where PGT's are
* stored.
*
* @return a handle of connection.
*
* @private
*/
function getLink()
{
return $this->_link;
}
/**
* The name of the table where PGT's are stored. Written by
* PGTStorageDB::PGTStorageDB(), read by getTable().
*
* @hideinitializer
* @private
*/
var $_table = '';
/**
* This method returns the name of the table where PGT's are stored.
*
* @return the name of a table.
*
* @private
*/
function getTable()
{
return $this->_table;
}
// ########################################################################
// DEBUGGING
// ########################################################################
/**
* This method returns an informational string giving the type of storage
* used by the object (used for debugging purposes).
*
* @return an informational string.
* @public
*/
function getStorageType()
{
return "database";
}
/**
* This method returns an informational string giving informations on the
* parameters of the storage.(used for debugging purposes).
*
* @public
*/
function getStorageInfo()
{
return 'url=`'.$this->getURL().'\', table=`'.$this->getTable().'\'';
}
// ########################################################################
// CONSTRUCTOR
// ########################################################################
/**
* The class constructor, called by CASClient::SetPGTStorageDB().
*
* @param $cas_parent the CASClient instance that creates the object.
* @param $user the user to access the data with
* @param $password the user's password
* @param $database_type the type of the database hosting the data
* @param $hostname the server hosting the database
* @param $port the port the server is listening on
* @param $database the name of the database
* @param $table the name of the table storing the data
*
* @public
*/
function PGTStorageDB($cas_parent,$user,$password,$database_type,$hostname,$port,$database,$table)
{
phpCAS::traceBegin();
// call the ancestor's constructor
$this->PGTStorage($cas_parent);
if ( empty($database_type) ) $database_type = CAS_PGT_STORAGE_DB_DEFAULT_DATABASE_TYPE;
if ( empty($hostname) ) $hostname = CAS_PGT_STORAGE_DB_DEFAULT_HOSTNAME;
if ( $port==0 ) $port = CAS_PGT_STORAGE_DB_DEFAULT_PORT;
if ( empty($database) ) $database = CAS_PGT_STORAGE_DB_DEFAULT_DATABASE;
if ( empty($table) ) $table = CAS_PGT_STORAGE_DB_DEFAULT_TABLE;
// build and store the PEAR DB URL
$this->_url = $database_type.':'.'//'.$user.':'.$password.'@'.$hostname.':'.$port.'/'.$database;
// XXX should use setURL and setTable
phpCAS::traceEnd();
}
// ########################################################################
// INITIALIZATION
// ########################################################################
/**
* This method is used to initialize the storage. Halts on error.
*
* @public
*/
function init()
{
phpCAS::traceBegin();
// if the storage has already been initialized, return immediatly
if ( $this->isInitialized() )
return;
return;
// call the ancestor's method (mark as initialized)
parent::init();
//include phpDB library (the test was introduced in release 0.4.8 for
//the integration into Tikiwiki).
if (!class_exists('DB')) {
include_once('DB.php');
}
// try to connect to the database
$this->_link = DB::connect($this->getURL());
if ( DB::isError($this->_link) ) {
phpCAS::error('could not connect to database ('.DB::errorMessage($this->_link).')');
}
var_dump($this->_link);
phpCAS::traceBEnd();
}
/** @} */
}
?>
@@ -114,15 +114,26 @@ class PGTStorageFile extends PGTStorage
if (empty($path) ) $path = CAS_PGT_STORAGE_FILE_DEFAULT_PATH;
// check that the path is an absolute path
if ( $path[0] != '/' ) {
phpCAS::error('an absolute path is needed for PGT storage to file');
if (getenv("OS")=="Windows_NT"){
if (!preg_match('`^[a-zA-Z]:`', $path)) {
phpCAS::error('an absolute path is needed for PGT storage to file');
}
}
else
{
if ( $path[0] != '/' ) {
phpCAS::error('an absolute path is needed for PGT storage to file');
}
// store the path (with a leading and trailing '/')
$path = preg_replace('|[/]*$|','/',$path);
$path = preg_replace('|^[/]*|','/',$path);
// store the path (with a leading and trailing '/')
$path = preg_replace('|[/]*$|','/',$path);
$path = preg_replace('|^[/]*|','/',$path);
}
$this->_path = $path;
// check the format and store it
switch ($format) {
case CAS_PGT_STORAGE_FILE_FORMAT_PLAIN:
@@ -171,7 +182,6 @@ class PGTStorageFile extends PGTStorage
{
phpCAS::traceBegin();
$filename = $this->getPath().$pgt_iou.'.'.$this->getFormat();
phpCAS::traceEnd($filename);
return $filename;
}
@@ -215,7 +225,6 @@ class PGTStorageFile extends PGTStorage
phpCAS::traceBegin();
$pgt = FALSE;
$fname = $this->getPGTIouFilename($pgt_iou);
if ( !($f=fopen($fname,"r")) ) {
phpCAS::trace('could not open `'.$fname.'\'');
} else {
@@ -237,4 +246,4 @@ class PGTStorageFile extends PGTStorage
}
?>
?>
@@ -183,7 +183,6 @@ class PGTStorage
// include specific PGT storage classes
include_once(dirname(__FILE__).'/pgt-file.php');
// incompatibility with Moodle
//include_once(dirname(__FILE__).'/pgt-db.php');
include_once(dirname(__FILE__).'/pgt-db.php');
?>
?>
File diff suppressed because it is too large Load Diff
@@ -10,7 +10,7 @@
require_once('domxml-php4-to-php5.php');
}
Version 1.20a, 2008-11-06, http://alexandre.alapetite.net/doc-alex/domxml-php4-php5/
Version 1.21, 2008-12-05, http://alexandre.alapetite.net/doc-alex/domxml-php4-php5/
------------------------------------------------------------------
Written by Alexandre Alapetite, http://alexandre.alapetite.net/cv/
@@ -179,6 +179,7 @@ class php4DOMDocument extends php4DOMNode
}
function html_dump_mem() {return $this->myDOMNode->saveHTML();}
function root() {return parent::_newDOMElement($this->myDOMNode->documentElement,$this);}
function xinclude() {return $this->myDOMNode->xinclude();}
function xpath_new_context() {return new php4DOMXPath($this);}
}
+27
View File
@@ -0,0 +1,27 @@
<?php
/**
* @file languages/spanish.php
* @author Iván-Benjamín García Torà <ivaniclixx AT gmail DOT com>
* @sa @link internalLang Internationalization @endlink
* @ingroup internalLang
*/
$this->_strings = array(
CAS_STR_USING_SERVER
=> 'usant servidor',
CAS_STR_AUTHENTICATION_WANTED
=> 'Autentificació CAS necessària!',
CAS_STR_LOGOUT
=> 'Sortida de CAS necessària!',
CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED
=> 'Ja hauria d\ haver estat redireccionat al servidor CAS. Feu click <a href="%s">aquí</a> per a continuar.',
CAS_STR_AUTHENTICATION_FAILED
=> 'Autentificació CAS fallida!',
CAS_STR_YOU_WERE_NOT_AUTHENTICATED
=> '<p>No estàs autentificat.</p><p>Pots tornar a intentar-ho fent click <a href="%s">aquí</a>.</p><p>Si el problema persisteix hauría de contactar amb l\'<a href="mailto:%s">administrador d\'aquest llocc</a>.</p>',
CAS_STR_SERVICE_UNAVAILABLE
=> 'El servei `<b>%s</b>\' no està disponible (<b>%s</b>).'
);
?>
@@ -1,79 +1,27 @@
<?php
/**
* @file languages/english.php
* @author Pascal Aubry <pascal.aubry at univ-rennes1.fr>
* @sa @link internalLang Internationalization @endlink
* @ingroup internalLang
*/
$this->_strings = array(
CAS_STR_USING_SERVER
=> 'using server',
CAS_STR_AUTHENTICATION_WANTED
=> 'CAS Authentication wanted!',
CAS_STR_LOGOUT
=> 'CAS logout wanted!',
CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED
=> 'You should already have been redirected to the CAS server. Click <a href="%s">here</a> to continue.',
CAS_STR_AUTHENTICATION_FAILED
=> 'CAS Authentication failed!',
CAS_STR_YOU_WERE_NOT_AUTHENTICATED
=> '<p>You were not authenticated.</p><p>You may submit your request again by clicking <a href="%s">here</a>.</p><p>If the problem persists, you may contact <a href="mailto:%s">the administrator of this site</a>.</p>',
CAS_STR_SERVICE_UNAVAILABLE
=> 'The service `<b>%s</b>\' is not available (<b>%s</b>).'
);
?>
@@ -1,82 +1,28 @@
<?php
/**
* @file languages/english.php
* @author Pascal Aubry <pascal.aubry at univ-rennes1.fr>
* @sa @link internalLang Internationalization @endlink
* @ingroup internalLang
*/
$this->_strings = array(
CAS_STR_USING_SERVER
=> 'utilisant le serveur',
CAS_STR_AUTHENTICATION_WANTED
=> 'Authentication CAS nécessaire&nbsp;!',
=> 'Authentication CAS ncessaire&nbsp;!',
CAS_STR_LOGOUT
=> 'Déconnexion demandée&nbsp;!',
=> 'Dconnexion demande&nbsp;!',
CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED
=> 'Vous auriez du etre redirigé(e) vers le serveur CAS. Cliquez <a href="%s">ici</a> pour continuer.',
=> 'Vous auriez du etre redirig(e) vers le serveur CAS. Cliquez <a href="%s">ici</a> pour continuer.',
CAS_STR_AUTHENTICATION_FAILED
=> 'Authentification CAS infructueuse&nbsp;!',
CAS_STR_YOU_WERE_NOT_AUTHENTICATED
=> '<p>Vous n\'avez pas été authentifié(e).</p><p>Vous pouvez soumettre votre requete à nouveau en cliquant <a href="%s">ici</a>.</p><p>Si le problème persiste, vous pouvez contacter <a href="mailto:%s">l\'administrateur de ce site</a>.</p>',
=> '<p>Vous n\'avez pas t authentifi(e).</p><p>Vous pouvez soumettre votre requete nouveau en cliquant <a href="%s">ici</a>.</p><p>Si le problme persiste, vous pouvez contacter <a href="mailto:%s">l\'administrateur de ce site</a>.</p>',
CAS_STR_SERVICE_UNAVAILABLE
=> 'Le service `<b>%s</b>\' est indisponible (<b>%s</b>)'
);
?>
@@ -1,79 +1,27 @@
<?php
/**
* @file languages/german.php
* @author Henrik Genssen <hg at mediafactory.de>
* @sa @link internalLang Internationalization @endlink
* @ingroup internalLang
*/
$this->_strings = array(
CAS_STR_USING_SERVER
=> 'via Server',
CAS_STR_AUTHENTICATION_WANTED
=> 'CAS Authentifizierung erforderlich!',
CAS_STR_LOGOUT
=> 'CAS Abmeldung!',
CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED
=> 'eigentlich h&auml;ten Sie zum CAS Server weitergeleitet werden sollen. Dr&uuml;cken Sie <a href="%s">hier</a> um fortzufahren.',
CAS_STR_AUTHENTICATION_FAILED
=> 'CAS Anmeldung fehlgeschlagen!',
CAS_STR_YOU_WERE_NOT_AUTHENTICATED
=> '<p>Sie wurden nicht angemeldet.</p><p>Um es erneut zu versuchen klicken Sie <a href="%s">hier</a>.</p><p>Wenn das Problem bestehen bleibt, kontkatieren Sie den <a href="mailto:%s">Administrator</a> dieser Seite.</p>',
CAS_STR_SERVICE_UNAVAILABLE
=> 'Der Dienst `<b>%s</b>\' ist nicht verf&uuml;gbar (<b>%s</b>).'
);
?>
+27
View File
@@ -0,0 +1,27 @@
<?php
/**
* @file languages/greek.php
* @author Vangelis Haniotakis <haniotak at ucnet.uoc.gr>
* @sa @link internalLang Internationalization @endlink
* @ingroup internalLang
*/
$this->_strings = array(
CAS_STR_USING_SERVER
=> ' ',
CAS_STR_AUTHENTICATION_WANTED
=> ' CAS!',
CAS_STR_LOGOUT
=> ' CAS!',
CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED
=> ' CAS. <a href="%s"></a> .',
CAS_STR_AUTHENTICATION_FAILED
=> ' CAS !',
CAS_STR_YOU_WERE_NOT_AUTHENTICATED
=> '<p> .</p><p> , <a href="%s"></a>.</p><p> , <a href="mailto:%s"></a>.</p>',
CAS_STR_SERVICE_UNAVAILABLE
=> ' `<b>%s</b>\' (<b>%s</b>).'
);
?>
+27
View File
@@ -0,0 +1,27 @@
<?php
/**
* @file languages/japanese.php
* @author fnorif (fnorif@yahoo.co.jp)
*
* Now Encoding is EUC-JP and LF
**/
$this->_strings = array(
CAS_STR_USING_SERVER
=> 'using server',
CAS_STR_AUTHENTICATION_WANTED
=> 'CASˤǧڤԤޤ',
CAS_STR_LOGOUT
=> 'CAS?Ȥޤ!',
CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED
=> 'CASФ˹ԤɬפޤưŪžʤ <a href="%s"></a> 򥯥å³Ԥޤ',
CAS_STR_AUTHENTICATION_FAILED
=> 'CASˤǧڤ˼Ԥޤ',
CAS_STR_YOU_WERE_NOT_AUTHENTICATED
=> '<p>ǧڤǤޤǤ.</p><p>٥ꥯȤ<a href="%s"></a>򥯥å.</p><p>ʤ <a href="mailto:%s">ΥȤδ</a>Ƥ.</p>',
CAS_STR_SERVICE_UNAVAILABLE
=> 'ӥ `<b>%s</b>\' ѤǤޤ (<b>%s</b>).'
);
?>
@@ -1,70 +1,24 @@
<?php
/**
* @file languages/languages.php
* Internationalization constants
* @author Pascal Aubry <pascal.aubry at univ-rennes1.fr>
* @sa @link internalLang Internationalization @endlink
* @ingroup internalLang
*/
//@{
/**
* a phpCAS string index
*/
define("CAS_STR_USING_SERVER", 1);
define("CAS_STR_AUTHENTICATION_WANTED", 2);
define("CAS_STR_LOGOUT", 3);
define("CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED", 4);
define("CAS_STR_AUTHENTICATION_FAILED", 5);
define("CAS_STR_YOU_WERE_NOT_AUTHENTICATED", 6);
define("CAS_STR_SERVICE_UNAVAILABLE", 7);
//@}
?>
+27
View File
@@ -0,0 +1,27 @@
<?php
/**
* @file languages/spanish.php
* @author Iván-Benjamín García Torà <ivaniclixx AT gmail DOT com>
* @sa @link internalLang Internationalization @endlink
* @ingroup internalLang
*/
$this->_strings = array(
CAS_STR_USING_SERVER
=> 'usando servidor',
CAS_STR_AUTHENTICATION_WANTED
=> '¡Autentificación CAS necesaria!',
CAS_STR_LOGOUT
=> '¡Salida CAS necesaria!',
CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED
=> 'Ya debería haber sido redireccionado al servidor CAS. Haga click <a href="%s">aquí</a> para continuar.',
CAS_STR_AUTHENTICATION_FAILED
=> '¡Autentificación CAS fallida!',
CAS_STR_YOU_WERE_NOT_AUTHENTICATED
=> '<p>No estás autentificado.</p><p>Puedes volver a intentarlo haciendo click <a href="%s">aquí</a>.</p><p>Si el problema persiste debería contactar con el <a href="mailto:%s">administrador de este sitio</a>.</p>',
CAS_STR_SERVICE_UNAVAILABLE
=> 'El servicio `<b>%s</b>\' no está disponible (<b>%s</b>).'
);
?>
File diff suppressed because it is too large Load Diff
-79
View File
@@ -1,79 +0,0 @@
<?php
/**
* @file languages/greek.php
* @author Vangelis Haniotakis <haniotak at ucnet.uoc.gr>
* @sa @link internalLang Internationalization @endlink
* @ingroup internalLang
*/
$this->_strings = array(
CAS_STR_USING_SERVER
=> '÷ñçóéìïðïéåßôáé ï åîõðçñåôçôÞò',
CAS_STR_AUTHENTICATION_WANTED
=> 'Áðáéôåßôáé ç ôáõôïðïßçóç CAS!',
CAS_STR_LOGOUT
=> 'Áðáéôåßôáé ç áðïóýíäåóç áðü CAS!',
CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED
=> 'Èá Ýðñåðå íá åß÷áôå áíáêáôåõèõíèåß óôïí åîõðçñåôçôÞ CAS. ÊÜíôå êëßê <a href="%s">åäþ</a> ãéá íá óõíå÷ßóåôå.',
CAS_STR_AUTHENTICATION_FAILED
=> 'Ç ôáõôïðïßçóç CAS áðÝôõ÷å!',
CAS_STR_YOU_WERE_NOT_AUTHENTICATED
=> '<p>Äåí ôáõôïðïéçèÞêáôå.</p><p>Ìðïñåßôå íá îáíáðñïóðáèÞóåôå, êÜíïíôáò êëßê <a href="%s">åäþ</a>.</p><p>Åáí ôï ðñüâëçìá åðéìåßíåé, åëÜôå óå åðáöÞ ìå ôïí <a href="mailto:%s">äéá÷åéñéóôÞ</a>.</p>',
CAS_STR_SERVICE_UNAVAILABLE
=> 'Ç õðçñåóßá `<b>%s</b>\' äåí åßíáé äéáèÝóéìç (<b>%s</b>).'
);
?>
-53
View File
@@ -1,53 +0,0 @@
<?php
/**
* @file languages/japanese.php
* @author fnorif (fnorif@yahoo.co.jp)
*
* Now Encoding is EUC-JP and LF
**/
$this->_strings = array(
CAS_STR_USING_SERVER
=> 'using server',
CAS_STR_AUTHENTICATION_WANTED
=> 'CASによる認証を行います',
CAS_STR_LOGOUT
=> 'CASからログアウトします!',
CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED
=> 'CASサーバに行く必要があります。自動的に転送されない場合は <a href="%s">こちら</a> をクリックして続行します。',
CAS_STR_AUTHENTICATION_FAILED
=> 'CASによる認証に失敗しました',
CAS_STR_YOU_WERE_NOT_AUTHENTICATED
=> '<p>認証できませんでした.</p><p>もう一度リクエストを送信する場合は<a href="%s">こちら</a>をクリック.</p><p>問題が解決しない場合は <a href="mailto:%s">このサイトの管理者</a>に問い合わせてください.</p>',
CAS_STR_SERVICE_UNAVAILABLE
=> 'サービス `<b>%s</b>\' は利用できません (<b>%s</b>).'
);
?>
+14 -8
View File
@@ -97,8 +97,10 @@ class auth_plugin_cas extends auth_plugin_base {
$username = optional_param("username");
if (!empty($username)) {
if (strstr($SESSION->wantsurl,'ticket') || strstr($SESSION->wantsurl,'NOCAS'))
unset($SESSION->wantsurl);
if (isset($SESSION->wantsurl) && (strstr($SESSION->wantsurl, 'ticket') ||
strstr($SESSION->wantsurl, 'NOCAS'))) {
unset($SESSION->wantsurl);
}
return;
}
@@ -112,6 +114,9 @@ class auth_plugin_cas extends auth_plugin_base {
// Connection to CAS server
$this->connectCAS();
// Don't try to validate the server SSL credentials
phpCAS::setNoCasServerValidation();
// Gestion de la connection CAS si accs direct d'un ent ou autre
if (phpCAS::checkAuthentication()) {
$frm->username=phpCAS::getUser();
@@ -121,7 +126,7 @@ class auth_plugin_cas extends auth_plugin_base {
return;
}
if ($_GET["loginguest"]== true) {
if (isset($_GET["loginguest"]) && ($_GET["loginguest"]== true)) {
$frm->username="guest";
$frm->password="guest";
return;
@@ -161,7 +166,7 @@ class auth_plugin_cas extends auth_plugin_base {
if ($this->config->logoutcas ) {
$backurl = $CFG->wwwroot;
$this->connectCAS();
phpCAS::logout($backurl);
phpCAS::logoutWithURL($backurl);
}
}
/**
@@ -175,12 +180,13 @@ class auth_plugin_cas extends auth_plugin_base {
global $PHPCAS_CLIENT;
// mode proxy CAS
if ( !is_object($PHPCAS_CLIENT) ) {
// Make sure phpCAS doesn't try to start a new PHP session when connecting to the CAS server.
if ($this->config->proxycas) {
phpCAS::proxy($this->config->casversion, $this-> config->hostname, (int) $this->config->port, $this->config->baseuri);
phpCAS::proxy($this->config->casversion, $this-> config->hostname, (int) $this->config->port, $this->config->baseuri, false);
}
// mode client CAS
else {
phpCAS::client($this->config->casversion, $this-> config->hostname, (int) $this->config->port, $this->config->baseuri);
phpCAS::client($this->config->casversion, $this-> config->hostname, (int) $this->config->port, $this->config->baseuri, false);
}
}
@@ -773,9 +779,9 @@ if ( !is_object($PHPCAS_CLIENT) ) {
$updateuser->id = $user->id;
$updateuser->auth = 'cas';
if (update_record('user', $updateuser)) {
echo "\t"; print_string('auth_dbreviveser', 'auth', array($user->username, $user->id)); echo "\n";
echo "\t"; print_string('auth_dbreviveduser', 'auth', array($user->username, $user->id)); echo "\n";
} else {
echo "\t"; print_string('auth_dbreviveusererror', 'auth', $user->username); echo "\n";
echo "\t"; print_string('auth_dbrevivedusererror', 'auth', $user->username); echo "\n";
}
}
commit_sql();
+1 -1
View File
@@ -602,7 +602,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
$opt_deref[LDAP_DEREF_ALWAYS] = get_string('yes');
choose_from_menu($opt_deref, 'opt_deref', $config->opt_deref, LDAP_DEREF_NEVER, '');
choose_from_menu($opt_deref, 'opt_deref', $config->opt_deref, '');
if (isset($err['opt_deref'])) formerr($err['opt_deref']);
+1 -1
View File
@@ -364,7 +364,7 @@ class auth_plugin_db extends auth_plugin_base {
if ($old_user = get_record('user', 'username', $user->username, 'deleted', 1, 'mnethostid', $user->mnethostid)) {
$user->id = $old_user->id;
set_field('user', 'deleted', 0, 'username', $user->username);
echo "\t"; print_string('auth_dbreviveuser', 'auth', array(stripslashes($user->username), $user->id)); echo "\n";
echo "\t"; print_string('auth_dbreviveduser', 'auth', array(stripslashes($user->username), $user->id)); echo "\n";
} elseif ($id = insert_record ('user',$user)) { // it is truly a new user
echo "\t"; print_string('auth_dbinsertuser','auth',array(stripslashes($user->username), $id)); echo "\n";
// if relevant, tag for password generation
+2 -2
View File
@@ -723,9 +723,9 @@ class auth_plugin_ldap extends auth_plugin_base {
$updateuser->id = $user->id;
$updateuser->auth = 'ldap';
if (update_record('user', $updateuser)) {
echo "\t"; print_string('auth_dbreviveser', 'auth', array($user->username, $user->id)); echo "\n";
echo "\t"; print_string('auth_dbreviveduser', 'auth', array($user->username, $user->id)); echo "\n";
} else {
echo "\t"; print_string('auth_dbreviveusererror', 'auth', $user->username); echo "\n";
echo "\t"; print_string('auth_dbrevivedusererror', 'auth', $user->username); echo "\n";
}
}
commit_sql();
+1 -1
View File
@@ -199,7 +199,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
$opt_deref = array();
$opt_deref[LDAP_DEREF_NEVER] = get_string('no');
$opt_deref[LDAP_DEREF_ALWAYS] = get_string('yes');
choose_from_menu($opt_deref, 'opt_deref', $config->opt_deref, LDAP_DEREF_NEVER, '');
choose_from_menu($opt_deref, 'opt_deref', $config->opt_deref, '');
if (isset($err['opt_deref'])) formerr($err['opt_deref']);
?>
</td>
+19 -5
View File
@@ -230,6 +230,17 @@ class auth_plugin_mnet extends auth_plugin_base {
return $url;
}
/**
* after a successful login, land.php will call complete_user_login
* which will in turn regenerate the session id.
* this means that what is stored in mnet_session table needs updating.
*
*/
function update_session_id() {
global $USER;
return set_field('mnet_session', 'session_id', session_id(), 'username', $USER->username, 'mnethostid', $USER->mnethostid, 'useragent', sha1($_SERVER['HTTP_USER_AGENT']));
}
/**
* This function confirms the remote (ID provider) host's mnet session
* by communicating the token and UA over the XMLRPC transport layer, and
@@ -291,16 +302,16 @@ class auth_plugin_mnet extends auth_plugin_base {
// TODO: refactor into a separate function
if (empty($localuser) || ! $localuser->id) {
if (empty($this->config->auto_add_remote_users)) {
print_error('nolocaluser', 'mnet');
print_error('nolocaluser2', 'mnet');
}
$remoteuser->mnethostid = $remotehost->id;
if (! insert_record('user', addslashes_recursive($remoteuser))) {
$remoteuser->firstaccess = time(); // First time user in this server, grab it here
if (!$remoteuser->id = insert_record('user', addslashes_recursive($remoteuser))) {
print_error('databaseerror', 'mnet');
}
$firsttime = true;
if (! $localuser = get_record('user', 'username', addslashes($remoteuser->username), 'mnethostid', $remotehost->id)) {
print_error('nolocaluser', 'mnet');
}
$localuser = $remoteuser;
}
// check sso access control list for permission first
@@ -367,6 +378,9 @@ class auth_plugin_mnet extends auth_plugin_base {
}
$localuser->mnethostid = $remotepeer->id;
if (empty($localuser->firstaccess)) { // Now firstaccess, grab it here
$localuser->firstaccess = time();
}
$bool = update_record('user', addslashes_recursive($localuser));
if (!$bool) {
+1
View File
@@ -34,6 +34,7 @@ $localuser = $mnetauth->confirm_mnet_session($token, $remotewwwroot);
// log in
$USER = get_complete_user_data('id', $localuser->id, $localuser->mnethostid);
complete_user_login($USER);
$mnetauth->update_session_id();
if (!empty($localuser->mnet_foreign_host_array)) {
$USER->mnet_foreign_host_array = $localuser->mnet_foreign_host_array;
+1 -1
View File
@@ -59,7 +59,7 @@
<tr valign="top">
<td align="right"><?php print_string("auth_shib_idp_list", "auth") ?>:</td>
<td>
<textarea name="organization_selection" rows="10" cols="30" style="overflow: auto; white-space: nowrap;"
<textarea name="organization_selection" rows="10" cols="30" style="overflow: auto;"
><?php
if (!isset($config->organization_selection)){
echo 'urn:mace:organization1:providerID, Example Organization 1
+6 -1
View File
@@ -133,7 +133,12 @@
$backupprefs->backup_blogs = 0;
$backupprefs->backuproleassignments = array();
print_simple_box("<font color=\"red\">".get_string("backupnoneusersinfo")."</font>","center", "70%", '', "20", "noticebox");
if ($backupuserinfo) { // Based on perms, decide the msg to show
$nousersmsgtoshow = 'backupnoneusersinfo';
} else {
$nousersmsgtoshow = 'backupmissinguserinfoperms';
}
print_simple_box("<font color=\"red\">".get_string($nousersmsgtoshow)."</font>","center", "70%", '', "20", "noticebox");
echo "<hr />";
}
+19
View File
@@ -2400,6 +2400,9 @@
$result = $blockobject->encode_content_links($result,$mypreferences);
}
// Finally encode some well-know links to course
$result = backup_course_encode_links($result, $mypreferences);
if ($result != $content) {
debugging('<br /><hr />'.s($content).'<br />changed to<br />'.s($result).'<hr /><br />');
}
@@ -2407,6 +2410,22 @@
return $result;
}
/**
* Encode some well-know links to course. Restore will recode them to new course id
*/
function backup_course_encode_links($content, $preferences) {
global $CFG;
$base = preg_quote($CFG->wwwroot,"/");
// Link to the course main page (it also covers "&topic=xx" and "&week=xx"
// because they don't become transformed (section number) in backup/restore
$search = '/(' . $base . '\/course\/view.php\?id\=)([0-9]+)/';
$result = preg_replace($search,'$@COURSEVIEWBYID*$2@$', $content);
return $result;
}
/**
* Callback preg_replace function used by backup_encode_absolute_links()
* to process $@FILEPHP@$ URLs to get slasharguments independent URLs
+3 -2
View File
@@ -9,9 +9,10 @@
xmlns:cc ="http://www.imsglobal.org/xsd/imsccauth_v1p0"
version="1.0"
elementFormDefault ="qualified"
attributeFormDefault="unqualified"
attributeFormDefault="unqualified"
>
<xs:import namespace ="http://www.w3.org/XML/1998/namespace" schemaLocation = "xml.xsd" />
<xs:import namespace ="http://www.imsglobal.org/xsd/imscc/imscp_v1p1" schemaLocation = "imscp_v1p2_localised.xsd" />
<xs:import namespace ="http://ltsc.ieee.org/xsd/imscc/LOM" schemaLocation = "domainProfile_1/lomLoose_localised.xsd" />
<xs:import namespace ="http://ltsc.ieee.org/xsd/LOM" schemaLocation = "domainProfile_2/lomLoose_localised.xsd" />
+286
View File
@@ -0,0 +1,286 @@
<?xml version='1.0'?>
<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns ="http://www.w3.org/1999/xhtml"
xml:lang="en">
<xs:annotation>
<xs:documentation>
<div>
<h1>About the XML namespace</h1>
<div class="bodytext">
<p>
This schema document describes the XML namespace, in a form
suitable for import by other schema documents.
</p>
<p>
See <a href="http://www.w3.org/XML/1998/namespace.html">
http://www.w3.org/XML/1998/namespace.html</a> and
<a href="http://www.w3.org/TR/REC-xml">
http://www.w3.org/TR/REC-xml</a> for information
about this namespace.
</p>
<p>
Note that local names in this namespace are intended to be
defined only by the World Wide Web Consortium or its subgroups.
The names currently defined in this namespace are listed below.
They should not be used with conflicting semantics by any Working
Group, specification, or document instance.
</p>
<p>
See further below in this document for more information about <a
href="#usage">how to refer to this schema document from your own
XSD schema documents</a> and about <a href="#nsversioning">the
namespace-versioning policy governing this schema document</a>.
</p>
</div>
</div>
</xs:documentation>
</xs:annotation>
<xs:attribute name="lang">
<xs:annotation>
<xs:documentation>
<div>
<h3>lang (as an attribute name)</h3>
<p>
denotes an attribute whose value
is a language code for the natural language of the content of
any element; its value is inherited. This name is reserved
by virtue of its definition in the XML specification.</p>
</div>
<div>
<h4>Notes</h4>
<p>
Attempting to install the relevant ISO 2- and 3-letter
codes as the enumerated possible values is probably never
going to be a realistic possibility.
</p>
<p>
See BCP 47 at <a href="http://www.rfc-editor.org/rfc/bcp/bcp47.txt">
http://www.rfc-editor.org/rfc/bcp/bcp47.txt</a>
and the IANA language subtag registry at
<a href="http://www.iana.org/assignments/language-subtag-registry">
http://www.iana.org/assignments/language-subtag-registry</a>
for further information.
</p>
<p>
The union allows for the 'un-declaration' of xml:lang with
the empty string.
</p>
</div>
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:union memberTypes="xs:language">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value=""/>
</xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="space">
<xs:annotation>
<xs:documentation>
<div>
<h3>space (as an attribute name)</h3>
<p>
denotes an attribute whose
value is a keyword indicating what whitespace processing
discipline is intended for the content of the element; its
value is inherited. This name is reserved by virtue of its
definition in the XML specification.</p>
</div>
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:NCName">
<xs:enumeration value="default"/>
<xs:enumeration value="preserve"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="base" type="xs:anyURI"> <xs:annotation>
<xs:documentation>
<div>
<h3>base (as an attribute name)</h3>
<p>
denotes an attribute whose value
provides a URI to be used as the base for interpreting any
relative URIs in the scope of the element on which it
appears; its value is inherited. This name is reserved
by virtue of its definition in the XML Base specification.</p>
<p>
See <a
href="http://www.w3.org/TR/xmlbase/">http://www.w3.org/TR/xmlbase/</a>
for information about this attribute.
</p>
</div>
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="id" type="xs:ID">
<xs:annotation>
<xs:documentation>
<div>
<h3>id (as an attribute name)</h3>
<p>
denotes an attribute whose value
should be interpreted as if declared to be of type ID.
This name is reserved by virtue of its definition in the
xml:id specification.</p>
<p>
See <a
href="http://www.w3.org/TR/xml-id/">http://www.w3.org/TR/xml-id/</a>
for information about this attribute.
</p>
</div>
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup name="specialAttrs">
<xs:attribute ref="xml:base"/>
<xs:attribute ref="xml:lang"/>
<xs:attribute ref="xml:space"/>
<xs:attribute ref="xml:id"/>
</xs:attributeGroup>
<xs:annotation>
<xs:documentation>
<div>
<h3>Father (in any context at all)</h3>
<div class="bodytext">
<p>
denotes Jon Bosak, the chair of
the original XML Working Group. This name is reserved by
the following decision of the W3C XML Plenary and
XML Coordination groups:
</p>
<blockquote>
<p>
In appreciation for his vision, leadership and
dedication the W3C XML Plenary on this 10th day of
February, 2000, reserves for Jon Bosak in perpetuity
the XML name "xml:Father".
</p>
</blockquote>
</div>
</div>
</xs:documentation>
</xs:annotation>
<xs:annotation>
<xs:documentation>
<div xml:id="usage" id="usage">
<h2><a name="usage">About this schema document</a></h2>
<div class="bodytext">
<p>
This schema defines attributes and an attribute group suitable
for use by schemas wishing to allow <code>xml:base</code>,
<code>xml:lang</code>, <code>xml:space</code> or
<code>xml:id</code> attributes on elements they define.
</p>
<p>
To enable this, such a schema must import this schema for
the XML namespace, e.g. as follows:
</p>
<pre>
&lt;schema . . .>
. . .
&lt;import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/xml.xsd"/>
</pre>
<p>
or
</p>
<pre>
&lt;import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2009/01/xml.xsd"/>
</pre>
<p>
Subsequently, qualified reference to any of the attributes or the
group defined below will have the desired effect, e.g.
</p>
<pre>
&lt;type . . .>
. . .
&lt;attributeGroup ref="xml:specialAttrs"/>
</pre>
<p>
will define a type which will schema-validate an instance element
with any of those attributes.
</p>
</div>
</div>
</xs:documentation>
</xs:annotation>
<xs:annotation>
<xs:documentation>
<div id="nsversioning" xml:id="nsversioning">
<h2><a name="nsversioning">Versioning policy for this schema document</a></h2>
<div class="bodytext">
<p>
In keeping with the XML Schema WG's standard versioning
policy, this schema document will persist at
<a href="http://www.w3.org/2009/01/xml.xsd">
http://www.w3.org/2009/01/xml.xsd</a>.
</p>
<p>
At the date of issue it can also be found at
<a href="http://www.w3.org/2001/xml.xsd">
http://www.w3.org/2001/xml.xsd</a>.
</p>
<p>
The schema document at that URI may however change in the future,
in order to remain compatible with the latest version of XML
Schema itself, or with the XML namespace itself. In other words,
if the XML Schema or XML namespaces change, the version of this
document at <a href="http://www.w3.org/2001/xml.xsd">
http://www.w3.org/2001/xml.xsd
</a>
will change accordingly; the version at
<a href="http://www.w3.org/2009/01/xml.xsd">
http://www.w3.org/2009/01/xml.xsd
</a>
will not change.
</p>
<p>
Previous dated (and unchanging) versions of this schema
document are at:
</p>
<ul>
<li><a href="http://www.w3.org/2009/01/xml.xsd">
http://www.w3.org/2009/01/xml.xsd</a></li>
<li><a href="http://www.w3.org/2007/08/xml.xsd">
http://www.w3.org/2007/08/xml.xsd</a></li>
<li><a href="http://www.w3.org/2004/10/xml.xsd">
http://www.w3.org/2004/10/xml.xsd</a></li>
<li><a href="http://www.w3.org/2001/03/xml.xsd">
http://www.w3.org/2001/03/xml.xsd</a></li>
</ul>
</div>
</div>
</xs:documentation>
</xs:annotation>
</xs:schema>
+34
View File
@@ -352,6 +352,40 @@
}
}
// Re-check all the roles creation/mapping stuff
if (!empty($restore->course_id)) {
$contexttosearch = get_context_instance(CONTEXT_COURSE, $restore->course_id);
// if we know the target category, check capability on it
} else if (!empty($restore->restore_restorecatto)) {
$contexttosearch = get_context_instance(CONTEXT_COURSECAT, $restore->restore_restorecatto);
} else {
$contexttosearch = get_context_instance(CONTEXT_SYSTEM);
}
$cancreateroles = has_capability('moodle/role:manage', get_context_instance(CONTEXT_SYSTEM));
$canassignroles = has_capability('moodle/role:assign', $contexttosearch);
$canoverridecaps= has_capability('moodle/role:override', $contexttosearch) || has_capability('moodle/role:safeoverride', $contexttosearch);
if (!empty($restore->rolesmapping)) {
foreach ($restore->rolesmapping as $originalrole => $targetrole) {
// First, if new role is selected, check used really can do that
if (empty($targetrole) && !$cancreateroles) {
$messages[] = get_string('restorecannotcreateorassignroles');
$show_continue_button = false;
break;
}
// Now, check that the target role is available for role assignments
if (!empty($targetrole) && !$canassignroles) {
$messages[] = get_string('restorecannotassignroles');
$show_continue_button = false;
break;
}
// Now, check that the target role is available for capability overrides
if (!empty($targetrole) && !$canoverridecaps) {
$messages[] = get_string('restorecannotoverrideperms');
$show_continue_button = false;
break;
}
}
}
/// If restoring users and backup has mnet remote users and we are restoring to different site, forbid restore to non-admins. MDL-17009
if ($restore->users != 2 && /// If restoring users
+36 -3
View File
@@ -622,9 +622,10 @@ if ($restoreuserinfo) {
$allroles = get_records('role');
echo ('<table width="100%" class="restore-form-instances">');
echo ('<tr><td align="right" style="width:50%"><b>'.get_string('sourcerole').'</b></td><td align="left" style="width:50%"><b>'.get_string('targetrole').'</b></td></tr>');
if ($info->backup_moodle_version < 2006092801) {
echo ('<tr><td align="right" style="width:50%"><b>'.get_string('sourcerole').'</b></td><td align="left" style="width:50%"><b>'.get_string('targetrole').'</b></td></tr>');
// 1.6 and below backup
/// Editting teacher
@@ -669,6 +670,20 @@ if ($restoreuserinfo) {
// 1.7 and above backup
$roles = restore_read_xml_roles($xml_file);
// Calculate if any role can be mapped
$str_new = '';
$canmaproles = false;
if (has_capability('moodle/role:manage', get_context_instance(CONTEXT_SYSTEM))) {
$str_new = 'new role';
$canmaproles = true;
} else if (!empty($siterolesarray)) {
$canmaproles = true;
}
if ($canmaproles) {
echo ('<tr><td align="right" style="width:50%"><b>'.get_string('sourcerole').'</b></td><td align="left" style="width:50%"><b>'.get_string('targetrole').'</b></td></tr>');
}
if (!empty($roles->roles)) { // possible to have course with no roles
foreach ($siterolesarray as $siteroleid=>$siteroleshortname) {
$siteroleschoicearray[$siteroleid] = $siterolesnamearray[$siteroleid]." (". $siterolesarray[$siteroleid].")";
@@ -676,7 +691,12 @@ if ($restoreuserinfo) {
foreach ($roles->roles as $roleid=>$role) {
$mappableroles = $siteroleschoicearray;
if (!$canmaproles) { // User cannot map roles at all, add hidden element and continue
echo "<tr><td colspan=\"2\"><input type=\"hidden\" name=\"roles_{$roleid}\" value=\"0\" /></td></tr>";
continue;
}
$mappableroles = !empty($siteroleschoicearray) ? $siteroleschoicearray : array();
echo ('<tr><td align="right">');
echo '<label for="menuroles_'.$roleid.'">'.format_string($role->name)." (".($role->shortname).")".'</label>';
@@ -700,8 +720,21 @@ if ($restoreuserinfo) {
break;
}
}
// Hack a bit, so, if role continues unmatched, and was "editingteacher", and "teacher" is available
// preselect it as fallback matching (can happen a lot)
if ($matchrole == 0 && $role->shortname == 'editingteacher' && in_array('teacher', $siterolesarray)) {
$matchrole = array_search('teacher', $siterolesarray);
}
// If arrived here, role continues unmatched and the user lacks the 'moodle/role:manage' capability
// perform automatic matching to site defaultcourseroleid (only if available in the list)
if ($matchrole == 0 && !has_capability('moodle/role:manage', get_context_instance(CONTEXT_SYSTEM))) {
if (array_key_exists($CFG->defaultcourseroleid, $siterolesarray)) {
$matchrole = $CFG->defaultcourseroleid;
}
}
}
choose_from_menu ($mappableroles, "roles_".$roleid, $matchrole, 'new role', '', '0');
choose_from_menu ($mappableroles, "roles_".$roleid, $matchrole, $str_new, '', '0');
echo ('</td></tr>');
}
}
+176 -109
View File
@@ -200,11 +200,31 @@ define('RESTORE_GROUPS_GROUPINGS', 3);
return $status;
}
/**
* This function decodes some well-know links to course
*/
function course_decode_content_links($content, $restore) {
global $CFG;
// Links to course
$searchstring = '/\$@(COURSEVIEWBYID)\*([0-9]+)@\$/';
$replacestring= $CFG->wwwroot . '/course/view.php?id=' . $restore->course_id;
$result = preg_replace($searchstring, $replacestring, $content);
return $result;
}
//This function is called from all xxxx_decode_content_links_caller(),
//its task is to ask all modules (maybe other linkable objects) to restore
//links to them.
function restore_decode_content_links_worker($content,$restore) {
global $CFG;
// Course links decoder
$content = course_decode_content_links($content, $restore);
// Module links decoders
foreach($restore->mods as $name => $info) {
$function_name = $name."_decode_content_links";
if (function_exists($function_name)) {
@@ -705,22 +725,34 @@ define('RESTORE_GROUPS_GROUPINGS', 3);
* Here it's the logic applied, keep it updated:
*
* If restoring users from same site backup:
* 1A - If match by id and username and mnethost => ok, return target user
* 1B - If match by id and mnethost and user is deleted in DB and
* match by email LIKE 'backup_email%' => ok, return target user
* 1C - If match by id and mnethost and user is deleted in backup file
* 1A - Normal check: If match by id and username and mnethost => ok, return target user
* 1B - Handle users deleted in DB and "alive" in backup file:
* If match by id and mnethost and user is deleted in DB and
* (match by username LIKE 'backup_email.%' or by non empty email = md5(username)) => ok, return target user
* 1C - Handle users deleted in backup file and "alive" in DB:
* If match by id and mnethost and user is deleted in backup file
* and match by email = email_without_time(backup_email) => ok, return target user
* 1D - If match by username and mnethost and doesn't match by id => conflict, return false
* 1E - else => user needs to be created, return true
* 1D - Conflict: If match by username and mnethost and doesn't match by id => conflict, return false
* 1E - None of the above, return true => User needs to be created
*
* if restoring from another site backup:
* 2A - If match by username and mnethost and
* (email or non-zero firstaccess) => ok, return target user
* 2B - Note: we cannot handle "deleted" situations here as far
* as username gets modified and id cannot be used here
* 2C - If match by username and mnethost and not
* by (email or non-zero firstaccess) => conflict, return false
* 2D - else => user needs to be created, return true
* if restoring from another site backup (cannot match by id here, replace it by email/firstaccess combination):
* 2A - Normal check: If match by username and mnethost and (email or non-zero firstaccess) => ok, return target user
* 2B - Handle users deleted in DB and "alive" in backup file:
* 2B1 - If match by mnethost and user is deleted in DB and not empty email = md5(username) and
* (username LIKE 'backup_email.%' or non-zero firstaccess) => ok, return target user
* 2B2 - If match by mnethost and user is deleted in DB and
* username LIKE 'backup_email.%' and non-zero firstaccess) => ok, return target user
* (to cover situations were md5(username) wasn't implemented on delete we requiere both)
* 2C - Handle users deleted in backup file and "alive" in DB:
* If match mnethost and user is deleted in backup file
* and by email = email_without_time(backup_email) and non-zero firstaccess=> ok, return target user
* 2D - Conflict: If match by username and mnethost and not by (email or non-zero firstaccess) => conflict, return false
* 2E - None of the above, return true => User needs to be created
*
* Note: for DB deleted users email is stored in username field, hence we
* are looking there for emails. See delete_user()
* Note: for DB deleted users md5(username) is stored *sometimes* in the email field,
* hence we are looking there for usernames if not empty. See delete_user()
*/
function restore_check_user($restore, $user) {
global $CFG;
@@ -734,7 +766,7 @@ define('RESTORE_GROUPS_GROUPINGS', 3);
}
// Handle checks from same site backups
if (backup_is_same_site($restore)) {
if (backup_is_same_site($restore) && empty($CFG->forcedifferentsitecheckingusersonrestore)) {
// 1A - If match by id and username and mnethost => ok, return target user
if ($rec = get_record('user', 'id', $user->id, 'username', addslashes($user->username), 'mnethostid', $user->mnethostid)) {
@@ -742,32 +774,40 @@ define('RESTORE_GROUPS_GROUPINGS', 3);
}
// 1B - Handle users deleted in DB and "alive" in backup file
// 1B1- If match by id and mnethost and user is deleted in DB and
// match by email LIKE 'backup_email.%' => ok, return target user
// Note: for deleted users email is stored in username field, hence we
// are looking there for emails in the query below. See delete_user()
// Note: for DB deleted users email is stored in username field, hence we
// are looking there for emails. See delete_user()
// Note: for DB deleted users md5(username) is stored *sometimes* in the email field,
// hence we are looking there for usernames if not empty. See delete_user()
// If match by id and mnethost and user is deleted in DB and
// match by username LIKE 'backup_email.%' or by non empty email = md5(username) => ok, return target user
if ($rec = get_record_sql("SELECT *
FROM {$CFG->prefix}user u
WHERE id = $user->id
AND mnethostid = $user->mnethostid
AND deleted = 1
AND username LIKE '$user->email.%'")) {
AND (
username LIKE '".addslashes($user->email).".%'
OR (
".sql_isnotempty('user', 'email', false, false)."
AND email = '".md5($user->username)."'
)
)")) {
return $rec; // Matching user, deleted in DB found, return it
}
// 1C - Handle users deleted in backup file and "alive" in DB
// 1C1- If match by id and mnethost and user is deleted in backup file
// and match by email = email_without_time(backup_email) => ok, return target user
// If match by id and mnethost and user is deleted in backup file
// and match by email = email_without_time(backup_email) => ok, return target user
if ($user->deleted) {
// Note: for DB deleted users email is stored in username field, hence we
// are looking there for emails. See delete_user()
// Trim time() from email
// Note: for deleted users email is stored in username field, hece
// we are trimming the username field to get the email. See delete_user()
$trimemail = preg_replace('/(.*?)\.[0-9]+.?$/', '\\1', $user->username);
if ($rec = get_record_sql("SELECT *
FROM {$CFG->prefix}user u
WHERE id = $user->id
AND mnethostid = $user->mnethostid
AND email = '$trimemail'")) {
AND email = '".addslashes($trimemail)."'")) {
return $rec; // Matching user, deleted in backup file found, return it
}
}
@@ -786,38 +826,80 @@ define('RESTORE_GROUPS_GROUPINGS', 3);
// (email or non-zero firstaccess) => ok, return target user
if ($rec = get_record_sql("SELECT *
FROM {$CFG->prefix}user u
WHERE username = '$user->username'
WHERE username = '".addslashes($user->username)."'
AND mnethostid = $user->mnethostid
AND (
email = '$user->email'
email = '".addslashes($user->email)."'
OR (
firstaccess != 0
AND firstaccess = $user->firstaccess
)
)")) {
return $rec; // Matching user
return $rec; // Matching user found, return it
}
// 2B - Handle users deleted in DB and "alive" in backup file
// Note: for deleted users email is stored in username field, hence we
// are looking there for emails in the query below. See delete_user()
// Note: for deleted users md5(username) is stored *sometimes* in the
// email field, hence we are looking there for usernames in the query below
// 2B - Note: we cannot handle "deleted" situations here as far
// as username gets modified and id cannot be used either
// 2B1-deleted = 1 AND email = md5(username) AND mnsethostid AND (username like $user->email.% OR firstaccess)
// 2B2 deleted and mnsethostid AND username like $user->email.% AND firstaccess
// 2C - Handle users deleted in backup file and "alive" in DB
// 2D - If match by username and mnethost and not
// by (email or non-zero firstaccess) => conflict, return false
// Note: for DB deleted users email is stored in username field, hence we
// are looking there for emails. See delete_user()
// Note: for DB deleted users md5(username) is stored *sometimes* in the email field,
// hence we are looking there for usernames if not empty. See delete_user()
// 2B1 - If match by mnethost and user is deleted in DB and not empty email = md5(username) and
// (by username LIKE 'backup_email.%' or non-zero firstaccess) => ok, return target user
if ($rec = get_record_sql("SELECT *
FROM {$CFG->prefix}user u
WHERE username = '$user->username'
WHERE mnethostid = $user->mnethostid
AND deleted = 1
AND ".sql_isnotempty('user', 'email', false, false)."
AND email = '".md5($user->username)."'
AND (
username LIKE '".addslashes($user->email).".%'
OR (
firstaccess != 0
AND firstaccess = $user->firstaccess
)
)")) {
return $rec; // Matching user found, return it
}
// 2B2 - If match by mnethost and user is deleted in DB and
// username LIKE 'backup_email.%' and non-zero firstaccess) => ok, return target user
// (this covers situations where md5(username) wasn't being stored so we require both
// the email & non-zero firstaccess to match)
if ($rec = get_record_sql("SELECT *
FROM {$CFG->prefix}user u
WHERE mnethostid = $user->mnethostid
AND deleted = 1
AND username LIKE '".addslashes($user->email).".%'
AND firstaccess != 0
AND firstaccess = $user->firstaccess")) {
return $rec; // Matching user found, return it
}
// 2C - Handle users deleted in backup file and "alive" in DB
// If match mnethost and user is deleted in backup file
// and match by email = email_without_time(backup_email) and non-zero firstaccess=> ok, return target user
if ($user->deleted) {
// Note: for DB deleted users email is stored in username field, hence we
// are looking there for emails. See delete_user()
// Trim time() from email
$trimemail = preg_replace('/(.*?)\.[0-9]+.?$/', '\\1', $user->username);
if ($rec = get_record_sql("SELECT *
FROM {$CFG->prefix}user u
WHERE mnethostid = $user->mnethostid
AND email = '".addslashes($trimemail)."'
AND firstaccess != 0
AND firstaccess = $user->firstaccess")) {
return $rec; // Matching user, deleted in backup file found, return it
}
}
// 2D - If match by username and mnethost and not by (email or non-zero firstaccess) => conflict, return false
if ($rec = get_record_sql("SELECT *
FROM {$CFG->prefix}user u
WHERE username = '".addslashes($user->username)."'
AND mnethostid = $user->mnethostid
AND NOT (
email = '$user->email'
email = '".addslashes($user->email)."'
OR (
firstaccess != 0
AND firstaccess = $user->firstaccess
@@ -830,7 +912,7 @@ define('RESTORE_GROUPS_GROUPINGS', 3);
// Arrived here, return true as the user will need to be created and no
// conflicts have been found in the logic above. This covers:
// 1E - else => user needs to be created, return true
// 2D - else => user needs to be created, return true
// 2E - else => user needs to be created, return true
return true;
}
@@ -885,7 +967,7 @@ define('RESTORE_GROUPS_GROUPINGS', 3);
$user = $rec->info;
// Find the correct mnethostid for user before performing any further check
if (empty($user->mnethosturl) || $user->mnethosturl===$CFG->wwwroot) {
if (empty($user->mnethosturl) || $user->mnethosturl === $CFG->wwwroot) {
$user->mnethostid = $CFG->mnet_localhost_id;
} else {
// fast url-to-id lookups
@@ -900,13 +982,18 @@ define('RESTORE_GROUPS_GROUPINGS', 3);
$usercheck = restore_check_user($restore, $user);
if (is_object($usercheck)) { // No problem, we have found one user in DB to be mapped to
// Annotate it, for later process by restore_create_users(). Set new_id to mapping user->id
backup_putid($restore->backup_unique_code, 'user', $userid, $usercheck->id, $user);
} else if ($usercheck === false) { // Found conflict, report it as problem
$problems[] = get_string('restoreuserconflict', '', $user->username);
$status = false;
} else if ($usercheck === true) { // User needs to be created, check if we are able
if (!$cancreateuser) { // Cannot create, report as problem
if ($cancreateuser) { // Can create user, annotate it, for later process by restore_create_users(). Set new_id to 0
backup_putid($restore->backup_unique_code, 'user', $userid, 0, $user);
} else { // Cannot create user, report it as problem
$problems[] = get_string('restorecannotcreateuser', '', $user->username);
$status = false;
@@ -1667,7 +1754,7 @@ define('RESTORE_GROUPS_GROUPINGS', 3);
$restoreall = true; // set to false if any grade_item is not selected/restored
$importing = !empty($SESSION->restore->importing); // there should not be a way to import old backups, but anyway ;-)
if ($importing || $restore->users == 2) {
if ($importing) {
$restoreall = false;
} else {
@@ -1858,7 +1945,7 @@ define('RESTORE_GROUPS_GROUPINGS', 3);
$restoreall = true; // set to false if any grade_item is not selected/restored or already exist
$importing = !empty($SESSION->restore->importing);
if ($importing || $restore->users == 2) {
if ($importing) {
$restoreall = false;
} else {
@@ -2704,25 +2791,17 @@ define('RESTORE_GROUPS_GROUPINGS', 3);
$authcache = array(); // Cache to get some bits from authentication plugins
$status = true;
//Check it exists
if (!file_exists($xml_file)) {
$status = false;
}
//Get info from xml
if ($status) {
//info will contain the old_id of every user
//in backup_ids->info will be the real info (serialized)
$info = restore_read_xml_users($restore,$xml_file);
}
//Now, get evey user_id from $info and user data from $backup_ids
//and create the necessary db structures
// Users have already been checked by restore_precheck_users() so they are loaded
// in backup_ids table. They don't need to be loaded (parsed) from XML again. Also, note
// the same function has performed the needed modifications in the $user->mnethostid field
// so we don't need to do it again here at all. Just some checks.
if (!empty($info->users)) {
// Get users ids from backup_ids table
$userids = get_fieldset_select('backup_ids', 'old_id', "backup_code = $restore->backup_unique_code AND table_name = 'user'");
/// Grab mnethosts keyed by wwwroot, to map to id
$mnethosts = get_records('mnet_host', '', '',
'wwwroot', 'wwwroot, id');
// Have users to process, proceed with them
if (!empty($userids)) {
/// Get languages for quick search later
$languages = get_list_of_languages();
@@ -2732,12 +2811,25 @@ define('RESTORE_GROUPS_GROUPINGS', 3);
/// Init trailing messages
$messages = array();
foreach ($info->users as $userid) {
$rec = backup_getid($restore->backup_unique_code,"user",$userid);
$user = $rec->info;
foreach ($userids as $userid) {
// Defaults
$user_exists = false; // By default user does not exist
$newid = null; // By default, there is not newid
// Get record from backup_ids
$useridsdbrec = backup_getid($restore->backup_unique_code, 'user', $userid);
// Based in restore_precheck_users() calculations, if the user exists
// new_id must contain the id of the matching user
if (!empty($useridsdbrec->new_id)) {
$user_exists = true;
$newid = $useridsdbrec->new_id;
}
$user = $useridsdbrec->info;
foreach (array_keys(get_object_vars($user)) as $field) {
if (!is_array($user->$field)) {
$user->$field = backup_todb($user->$field);
$user->$field = backup_todb($user->$field, false);
if (is_null($user->$field)) {
$user->$field = '';
}
@@ -2782,31 +2874,12 @@ define('RESTORE_GROUPS_GROUPINGS', 3);
//Has role teacher or student or needed
$is_course_user = ($is_teacher or $is_student or $is_needed);
// in case we are restoring to same server, look for user by id and username
// it should return record always, but in sites rebuilt from scratch
// and being reconstructed using course backups
$user_data = false;
if (backup_is_same_site($restore)) {
$user_data = get_record('user', 'id', $user->id, 'username', addslashes($user->username));
}
// Only try to perform mnethost/auth modifications if restoring to another server
// or if, while restoring to same server, the user doesn't exists yet (rebuilt site)
//
// So existing user data in same server *won't be modified by restore anymore*,
// under any circumpstance. If somehting is wrong with existing data, it's server fault.
if (!backup_is_same_site($restore) || (backup_is_same_site($restore) && !$user_data)) {
//Calculate mnethostid
if (empty($user->mnethosturl) || $user->mnethosturl===$CFG->wwwroot) {
$user->mnethostid = $CFG->mnet_localhost_id;
} else {
// fast url-to-id lookups
if (isset($mnethosts[$user->mnethosturl])) {
$user->mnethostid = $mnethosts[$user->mnethosturl]->id;
} else {
$user->mnethostid = $CFG->mnet_localhost_id;
}
}
if (!backup_is_same_site($restore) || (backup_is_same_site($restore) && !$user_exists)) {
//Arriving here, any user with mnet auth and using $CFG->mnet_localhost_id is wrong
//as own server cannot be accesed over mnet. Change auth to manual and inform about the switch
if ($user->auth == 'mnet' && $user->mnethostid == $CFG->mnet_localhost_id) {
@@ -2825,21 +2898,6 @@ define('RESTORE_GROUPS_GROUPINGS', 3);
}
unset($user->mnethosturl);
//To store user->id along all the iteration
$newid=null;
//check if it exists (by username) and get its id
$user_exists = true;
if (!backup_is_same_site($restore) || !$user_data) { /// Restoring to another server, or rebuilding site (failed id&
/// login search above), look for existing user based on fields
$user_data = get_record('user', 'username', addslashes($user->username), 'mnethostid', $user->mnethostid);
}
if (!$user_data) {
$user_exists = false;
} else {
$newid = $user_data->id;
}
//Flags to see what parts are we going to restore
$create_user = true;
$create_roles = true;
@@ -2871,8 +2929,6 @@ define('RESTORE_GROUPS_GROUPINGS', 3);
if ($create_user) {
//Unset the id because it's going to be inserted with a new one
unset ($user->id);
// relink the descriptions
$user->description = stripslashes($user->description);
/// Disable pictures based on global setting or existing empty value (old backups can contain wrong empties)
if (!empty($CFG->disableuserimages) || empty($user->picture)) {
@@ -3120,7 +3176,7 @@ define('RESTORE_GROUPS_GROUPINGS', 3);
}
backup_flush(300);
}
} /// End of loop over all the users loaded from xml
} /// End of loop over all the users loaded from backup_ids table
/// Inform about all the messages geerated while restoring users
if (!defined('RESTORE_SILENTLY')) {
@@ -3582,6 +3638,10 @@ define('RESTORE_GROUPS_GROUPINGS', 3);
} else {
$sca->userid = $USER->id;
}
// If course scale, recode the course field
if ($sca->courseid != 0) {
$sca->courseid = $restore->course_id;
}
// If scale is standard, if user lacks perms to manage standar scales
// 'downgrade' them to course scales
if ($sca->courseid == 0 and !has_capability('moodle/course:managescales', get_context_instance(CONTEXT_SYSTEM), $sca->userid)) {
@@ -8202,7 +8262,6 @@ define('RESTORE_GROUPS_GROUPINGS', 3);
// Precheck the users section, detecting various situations that can lead to problems, so
// we stop restore before performing any further action
/*
if (!defined('RESTORE_SILENTLY')) {
echo '<li>'.get_string('restoreusersprecheck').'</li>';
}
@@ -8216,7 +8275,6 @@ define('RESTORE_GROUPS_GROUPINGS', 3);
}
return false;
}
*/
//If we've selected to restore into new course
//create it (course)
@@ -9046,6 +9104,7 @@ define('RESTORE_GROUPS_GROUPINGS', 3);
* It isn't now, just overwriting
*/
function restore_create_roles($restore, $xmlfile) {
global $CFG;
if (!defined('RESTORE_SILENTLY')) {
echo "<li>".get_string("creatingrolesdefinitions").'</li>';
}
@@ -9080,7 +9139,8 @@ define('RESTORE_GROUPS_GROUPINGS', 3);
$status = backup_putid($restore->backup_unique_code,"role",$oldroleid,
$rolemappings[$oldroleid]); // adding a new id
} else {
// check for permissions before create new roles
} else if (has_capability('moodle/role:manage', get_context_instance(CONTEXT_SYSTEM))) {
// code to make new role name/short name if same role name or shortname exists
$fullname = $roledata->name;
@@ -9123,7 +9183,14 @@ define('RESTORE_GROUPS_GROUPINGS', 3);
insert_record('role_capabilities', $roleinfo);
}
} else {
// map the new role to course default role
if (!$default_role = get_field("course", "defaultrole", "id", $restore->course_id)) {
$default_role = $CFG->defaultcourseroleid;
}
$status = backup_putid($restore->backup_unique_code, "role", $oldroleid, $default_role);
}
/// Now, restore role nameincourse (only if the role had nameincourse in backup)
if (!empty($roledata->nameincourse)) {
$newrole = backup_getid($restore->backup_unique_code, 'role', $oldroleid); /// Look for target role
+1 -1
View File
@@ -116,7 +116,7 @@ class block_admin extends block_list {
if ($course->metacourse) {
if (has_capability('moodle/course:managemetacourse', $context)) {
$strchildcourses = get_string('childcourses');
$this->content->items[]='<a href="importstudents.php?id='.$this->instance->pageid.'">'.$strchildcourses.'</a>';
$this->content->items[]='<a href="'.$CFG->wwwroot.'/course/importstudents.php?id='.$this->instance->pageid.'">'.$strchildcourses.'</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/course.gif" class="icon" alt="" />';
} else if (has_capability('moodle/role:assign', $context)) {
$strchildcourses = get_string('childcourses');
+1 -1
View File
@@ -38,7 +38,7 @@ class block_mentees extends block_base {
$this->content->text = '<ul>';
foreach ($usercontexts as $usercontext) {
$this->content->text .= '<li><a href="'.$CFG->wwwroot.'/user/view.php?id='.$usercontext->instanceid.'&amp;course=1">'.fullname($usercontext).'</a></li>';
$this->content->text .= '<li><a href="'.$CFG->wwwroot.'/user/view.php?id='.$usercontext->instanceid.'&amp;course='.SITEID.'">'.fullname($usercontext).'</a></li>';
}
$this->content->text .= '</ul>';
}
+1 -1
View File
@@ -337,7 +337,7 @@ class block_quiz_results extends block_base {
foreach($best as $userid => $gradeid) {
switch($nameformat) {
case B_QUIZRESULTS_NAME_FORMAT_ID:
$thisname = $course->student.' '.intval($users[$userid]->idnumber);
$thisname = $course->student.' '.$users[$userid]->idnumber;
break;
case B_QUIZRESULTS_NAME_FORMAT_ANON:
$thisname = $course->student;
+6 -6
View File
@@ -122,7 +122,7 @@ if (!isset($CFG->block_search_softlock)){
</tr>
</table>
<fieldset name="">
<fieldset class="">
<legend align="top"><?php print_string('pdfhandling', 'block_search') ?></legend>
<table cellspacing="5" width="90%">
<tr>
@@ -147,7 +147,7 @@ if (!isset($CFG->block_search_softlock)){
</table>
</fieldset>
<fieldset name="">
<fieldset class="">
<legend align="top"><?php print_string('wordhandling', 'block_search') ?></legend>
<table cellspacing="5" width="90%">
<tr>
@@ -198,7 +198,7 @@ if (!empty($types)){
$type = trim($type);
if (preg_match("/\\b$type\\b/i", $defaultfiletypes)) continue;
?>
<fieldset name="">
<fieldset class="">
<legend align="top"><?php echo get_string('handlingfor', 'block_search').' '.$utype ?></legend>
<table cellspacing="5" width="90%">
<tr>
@@ -234,7 +234,7 @@ if (!empty($types)){
}
?>
<fieldset name="">
<fieldset class="">
<legend align="top"><?php echo get_string('searchdiscovery', 'block_search') ?></legend>
<table>
<tr>
@@ -250,7 +250,7 @@ if (!empty($types)){
</table>
</fieldset>
<fieldset name="">
<fieldset class="">
<legend align="top"><?php echo get_string('modulessearchswitches', 'block_search') ?></legend>
<table cellspacing="5" width="90%">
<tr valign="top">
@@ -283,7 +283,7 @@ if (!$found_searchable_modules) {
</table>
</fieldset>
<fieldset name="">
<fieldset class="">
<legend align="top"><?php echo get_string('blockssearchswitches', 'block_search') ?></legend>
<table cellspacing="5" width="90%">
<tr valign="top">
+30 -5
View File
@@ -4,7 +4,7 @@ class block_section_links extends block_base {
function init() {
$this->title = get_string('blockname', 'block_section_links');
$this->version = 2007101509;
$this->version = 2007101511;
}
function instance_config($instance) {
@@ -29,6 +29,11 @@ class block_section_links extends block_base {
global $CFG, $USER, $COURSE;
$highlight = 0;
if(isset($this->config)){
$config = $this->config;
} else{
$config = get_config('blocks/section_links');
}
if ($this->content !== NULL) {
return $this->content;
@@ -60,11 +65,21 @@ class block_section_links extends block_base {
$sectionname = 'topic';
}
$inc = 1;
if ($course->numsections > 22) {
$inc = 2;
if(!empty($config->numsections1) and ($course->numsections > $config->numsections1)) {
$inc = $config->incby1;
} else {
if ($course->numsections > 22) {
$inc = 2;
}
}
if ($course->numsections > 40) {
$inc = 5;
if(!empty($config->numsections2) and ($course->numsections > $config->numsections2)) {
$inc = $config->incby2;
} else {
if ($course->numsections > 40) {
$inc = 5;
}
}
if (!empty($USER->id)) {
@@ -112,6 +127,16 @@ class block_section_links extends block_base {
$this->content->text = $text;
return $this->content;
}
/**
* Has instance config
* @return boolean
**/
function instance_allow_config() {
return true;
}
function before_delete() {
delete_records('config_plugins', 'plugin', 'blocks/section_links');
}
}
?>
+73
View File
@@ -0,0 +1,73 @@
<?php
$numberofsections = array();
for ($i = 1; $i < 53; $i++){
$numberofsections[$i] = $i;
}
$increments = array();
for ($i = 1; $i < 11; $i++){
$increments[$i] = $i;
}
if(isset($this->config)){
$config = $this->config;
} else{
$config = get_config('blocks/section_links');
}
$selected = array();
if (!empty($config->numsections1)) {
if (empty($config->incby1)) {
$config->incby1 = 2;
}
$selected[1] = array($config->numsections1, $config->incby1);
} else {
$selected[1] = array(22, 2);
}
if (!empty($config->numsections2)) {
if (empty($config->incby1)) {
$config->incby1 = 5;
}
$selected[2] = array($config->numsections2, $config->incby2);
} else {
$selected[2] = array(40, 5);
}
?>
<table cellpadding="9" cellspacing="0">
<?php
for($i = 1; $i < 3; $i++){
?>
<tr valign="top">
<td align="right">
<?php print_string('numsections'.$i, 'block_section_links'); ?>:
</td>
<td>
<?php choose_from_menu($numberofsections, 'numsections'.$i, $selected[$i][0]); ?>
</td>
<td>
<?php print_string('numsectionsdesc'.$i, 'block_section_links'); ?>
</td>
</tr>
<tr valign="top">
<td align="right">
<?php print_string('incby'.$i, 'block_section_links'); ?>:
</td>
<td>
<?php choose_from_menu($increments, 'incby'.$i, $selected[$i][1]); ?>
</td>
<td>
<?php print_string('incbydesc'.$i, 'block_section_links'); ?>
</td>
</tr>
<?php }
?>
<tr>
<td colspan="3" align="center">
<input type="hidden" name="sesskey" value="<?php echo sesskey();?>">
<input type="submit" value="<?php print_string('savechanges') ?>" />
</td>
</tr>
</table>
+33
View File
@@ -0,0 +1,33 @@
<?php
$configs = array();
$numberofsections = array();
for ($i = 1; $i < 53; $i++){
$numberofsections[$i] = $i;
}
$increments = array();
for ($i = 1; $i < 11; $i++){
$increments[$i] = $i;
}
$selected = array(1 => array(22,2),
2 => array(40,5));
for($i = 1; $i < 3; $i++){
$configs[] = new admin_setting_configselect('numsections'.$i, get_string('numsections'.$i, 'block_section_links'),
get_string('numsectionsdesc'.$i, 'block_section_links'),
$selected[$i][0], $numberofsections);
$configs[] = new admin_setting_configselect('incby'.$i, get_string('incby'.$i, 'block_section_links'),
get_string('incbydesc'.$i, 'block_section_links'),
$selected[$i][1], $increments);
}
foreach ($configs as $config) {
$config->plugin = 'blocks/section_links';
$settings->add($config);
}
?>
+97 -28
View File
@@ -5,7 +5,6 @@ require_once($CFG->libdir . '/filelib.php');
require_once($CFG->libdir . '/magpie/rss_cache.inc');
require_once($CFG->libdir . '/phpxml/xml.php');
define('YOUTUBE_DEV_KEY', 'Dlp6qqRbI28');
define('DEFAULT_NUMBER_OF_VIDEOS', 5);
define('YOUTUBE_CACHE_EXPIRATION', 1800);
@@ -22,6 +21,9 @@ class block_tag_youtube extends block_base {
function specialization() {
$this->title = !empty($this->config->title) ? $this->config->title : get_string('blockname', 'block_tag_youtube');
// Convert numeric categories (old YouTube API) to
// textual ones (new Google Data API)
$this->config->category = !empty($this->config->category) ? $this->category_map_old2new($this->config->category) : '0';
}
function instance_allow_multiple() {
@@ -30,7 +32,7 @@ class block_tag_youtube extends block_base {
function preferred_width() {
return 140;
}
}
function get_content() {
@@ -67,19 +69,18 @@ class block_tag_youtube extends block_base {
$numberofvideos = $this->config->numberofvideos;
}
$request = 'http://www.youtube.com/api2_rest?method=youtube.videos.list_by_playlist';
$request .= '&dev_id=' . YOUTUBE_DEV_KEY;
$request .= "&id={$this->config->playlist}";
$request .= "&page=1";
$request .= "&per_page={$numberofvideos}";
$request = 'http://gdata.youtube.com/feeds/api/playlists/' .
$this->config->playlist .
'?start-index=1&max-results=' .
$numberofvideos .
'&format=5';
return $this->fetch_request($request);
}
function get_videos_by_tag(){
$tagid = optional_param('id', 0, PARAM_INT); // tag id - for backware compatibility
$tag = optional_param('tag', '', PARAM_TAG); // tag
$tag = optional_param('tag', '', PARAM_TAG); // tag
if ($tag) {
$tagobject = tag_get('name', $tag);
@@ -98,11 +99,11 @@ class block_tag_youtube extends block_base {
$numberofvideos = $this->config->numberofvideos;
}
$request = 'http://www.youtube.com/api2_rest?method=youtube.videos.list_by_tag';
$request .= '&dev_id='. YOUTUBE_DEV_KEY;
$request .= "&tag={$querytag}";
$request .= "&page=1";
$request .= "&per_page={$numberofvideos}";
$request = 'http://gdata.youtube.com/feeds/api/videos?vq=' .
$querytag .
'&start-index=1&max-results=' .
$numberofvideos .
'&format=5';
return $this->fetch_request($request);
}
@@ -110,7 +111,7 @@ class block_tag_youtube extends block_base {
function get_videos_by_tag_and_category(){
$tagid = optional_param('id', 0, PARAM_INT); // tag id - for backware compatibility
$tag = optional_param('tag', '', PARAM_TAG); // tag
$tag = optional_param('tag', '', PARAM_TAG); // tag
if ($tag) {
$tagobject = tag_get('name', $tag);
@@ -129,12 +130,13 @@ class block_tag_youtube extends block_base {
$numberofvideos = $this->config->numberofvideos;
}
$request = 'http://www.youtube.com/api2_rest?method=youtube.videos.list_by_category_and_tag';
$request .= '&category_id='.$this->config->category;
$request .= '&dev_id=' . YOUTUBE_DEV_KEY;
$request .= "&tag={$querytag}";
$request .= "&page=1";
$request .= "&per_page={$numberofvideos}";
$request = 'http://gdata.youtube.com/feeds/api/videos?category=' .
$this->category_map_old2new($this->config->category) .
'&vq=' .
$querytag .
'&start-index=1&max-results=' .
$numberofvideos .
'&format=5';
return $this->fetch_request($request);
}
@@ -151,6 +153,8 @@ class block_tag_youtube extends block_base {
if ( $cache_status == 'HIT' ) {
$cached_response = $cache->get( $request );
// TODO: Stop using phpxml, switching to DOM/Simple for this
// TODO: Drop lib/phpxml if 0 uses in core/contrib
$xmlobj = XML_unserialize($cached_response);
return $this->render_video_list($xmlobj);
}
@@ -168,6 +172,8 @@ class block_tag_youtube extends block_base {
$cache->set($request, $response);
}
// TODO: Stop using phpxml, switching to DOM/Simple for this
// TODO: Drop lib/phpxml if 0 uses in core/contrib
$xmlobj = XML_unserialize($response);
return $this->render_video_list($xmlobj);
}
@@ -176,26 +182,89 @@ class block_tag_youtube extends block_base {
$text = '';
$text .= '<ul class="yt-video-entry unlist img-text">';
$videos = $xmlobj['ut_response']['video_list']['video'];
$videos = $xmlobj['feed']['entry'];
if (is_array($videos) ) {
foreach($videos as $video){
$url = s($video['media:group']['media:player attr']['url']);
$thumbnail = s($video['media:group']['media:thumbnail']['0 attr']['url']);
$title = s($video['media:group']['media:title']);
$seconds = $video['media:group']['yt:duration attr']['seconds'];
$text .= '<li>';
$text .= '<div class="clearfix">';
$text .= '<a href="'. s($video['url']) . '">';
$text .= '<img alt="" class="youtube-thumb" src="'. $video['thumbnail_url'] .'" /></a>';
$text .= '</div><span><a href="'. s($video['url']) . '">'.s($video['title']).'</a></span>';
$text .= '<a href="'. $url . '">';
$text .= '<img alt="" class="youtube-thumb" src="'. $thumbnail .'" /></a>';
$text .= '</div><span><a href="'. $url . '">'. $title .'</a></span>';
$text .= '<div>';
$text .= format_time($video['length_seconds']);
$text .= format_time($seconds);
$text .= "</div></li>\n";
}
} else {
} else {
// if youtube is offline, or for whatever reason the previous
// call doesn't work...
// call doesn't work...
//add_to_log(SITEID, 'blocks/tag_youtube', 'problem in getting videos off youtube');
}
$text .= "</ul><div class=\"clearer\"></div>\n";
return $text;
}
function get_categories() {
// TODO: Right now using sticky categories from
// http://gdata.youtube.com/schemas/2007/categories.cat
// This should be performed from time to time by the block insead
// and cached somewhere, avoiding deprecated ones and observing regions
return array (
'0' => get_string('anycategory', 'block_tag_youtube'),
'Film' => get_string('filmsanimation', 'block_tag_youtube'),
'Autos' => get_string('autosvehicles', 'block_tag_youtube'),
'Music' => get_string('music', 'block_tag_youtube'),
'Animals'=> get_string('petsanimals', 'block_tag_youtube'),
'Sports' => get_string('sports', 'block_tag_youtube'),
'Travel' => get_string('travel', 'block_tag_youtube'),
'Games' => get_string('gadgetsgames', 'block_tag_youtube'),
'Comedy' => get_string('comedy', 'block_tag_youtube'),
'People' => get_string('peopleblogs', 'block_tag_youtube'),
'News' => get_string('newspolitics', 'block_tag_youtube'),
'Entertainment' => get_string('entertainment', 'block_tag_youtube'),
'Education' => get_string('education', 'block_tag_youtube'),
'Howto' => get_string('howtodiy', 'block_tag_youtube'),
'Tech' => get_string('scienceandtech', 'block_tag_youtube')
);
}
/**
* Provide conversion from old numeric categories available in youtube API
* to the new ones available in the Google API
*
* @param int $oldcat old category code
* @return mixed new category code or 0 (if no match found)
*
* TODO: Someday this should be applied on upgrade for all the existing
* block instances so we won't need the mapping any more. That would imply
* to implement restore handling to perform the conversion of old blocks.
*/
function category_map_old2new($oldcat) {
$oldoptions = array (
0 => '0',
1 => 'Film',
2 => 'Autos',
23 => 'Comedy',
24 => 'Entertainment',
10 => 'Music',
25 => 'News',
22 => 'People',
15 => 'Animals',
26 => 'Howto',
17 => 'Sports',
19 => 'Travel',
20 => 'Games'
);
if (array_key_exists($oldcat, $oldoptions)) {
return $oldoptions[$oldcat];
} else {
return $oldcat;
}
}
}
?>
+5 -20
View File
@@ -12,30 +12,15 @@
<tr valign="top">
<td align="right"><?php print_string('category', 'block_tag_youtube'); ?>:</td>
<td>
<?php
<?php
if (isset($this->config) && isset($this->config->category)) {
$selected = $this->config->category;
} else {
$selected = 0;
}
/* http://youtube.com/dev_api_ref?m=youtube.videos.list_by_category_and_tag */
$options = array ( 0 => get_string('anycategory', 'block_tag_youtube'),
1 => get_string('filmsanimation', 'block_tag_youtube'),
2 => get_string('autosvehicles', 'block_tag_youtube'),
23 => get_string('comedy', 'block_tag_youtube'),
24 => get_string('entertainment', 'block_tag_youtube'),
10 => get_string('music', 'block_tag_youtube'),
25 => get_string('newspolitics', 'block_tag_youtube'),
22 => get_string('peopleblogs', 'block_tag_youtube'),
15 => get_string('petsanimals', 'block_tag_youtube'),
26 => get_string('howtodiy', 'block_tag_youtube'),
17 => get_string('sports', 'block_tag_youtube'),
19 => get_string('travel', 'block_tag_youtube'),
20 => get_string('gadgetsgames', 'block_tag_youtube'),
);
choose_from_menu ($options, 'category', $selected);
?>
$categories = $this->get_categories();
choose_from_menu ($categories, 'category', $selected);
?>
</td>
</tr>
<tr valign="top">
@@ -48,4 +33,4 @@
<td colspan="3" align="center">
<input type="submit" value="<?php print_string('savechanges') ?>" /></td>
</tr>
</table>
</table>
+2 -2
View File
@@ -108,8 +108,8 @@ switch ($action) {
error('Incorrect blog post id');
}
$post->id = $existing->id;
$post->subject = $existing->subject;
$post->summary = $existing->summary;
$post->subject = clean_text($existing->subject);
$post->summary = clean_text($existing->summary, $existing->format);
$post->publishstate = $existing->publishstate;
$post->format = $existing->format;
$post->action = $action;
+4
View File
@@ -1,5 +1,9 @@
<?php // $Id$
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
require_once($CFG->libdir.'/formslib.php');
class blog_edit_form extends moodleform {
+2
View File
@@ -1,5 +1,7 @@
<?php //$Id$
defined('MOODLE_INTERNAL') || die();
/// Sets up blocks and navigation for index.php
require_once($CFG->dirroot .'/blog/lib.php');
+10 -7
View File
@@ -659,17 +659,20 @@
/// Find the base url from $_GET variables, for print_paging_bar
/// WARNING: EVIL EVIL EVIL! This function directly acesses $_GET which is a big no no. MDL-22631
/// I added some clean_param() calls for now but $_GET should just not ever be used directly.
/// The function is totally gone in Moodle 2.0.
function get_baseurl($filtertype, $filterselect) {
$getcopy = $_GET;
unset($getcopy['blogpage']);
unset($_GET['blogpage']);
$strippedurl = strip_querystring(qualified_me());
if(!empty($getcopy)) {
if(!empty($_GET)) {
$first = false;
$querystring = '';
foreach($getcopy as $var => $val) {
foreach($_GET as $var => $val) {
$var = clean_param($var, PARAM_ALPHANUM); // See MDL-22631
$val = clean_param($val, PARAM_CLEAN);
if(!$first) {
$first = true;
if ($var != 'filterselect' && $var != 'filtertype') {
@@ -680,8 +683,8 @@
}
} else {
if ($var != 'filterselect' && $var != 'filtertype') {
$querystring .= '&amp;'.$var.'='.$val;
$hasparam = true;
$querystring .= '&amp;'.$var.'='.$val;
$hasparam = true;
}
}
}
+2 -2
View File
@@ -334,9 +334,9 @@
case 'edit':
if(empty($form)) {
$form->name = $event->name;
$form->name = clean_text($event->name);
$form->courseid = $event->courseid; // Not to update, but for date validation
$form->description = $event->description;
$form->description = clean_text($event->description);
$form->timestart = $event->timestart;
$form->timeduration = $event->timeduration;
$form->id = $event->id;
+54 -56
View File
@@ -251,7 +251,10 @@ function calendar_show_day($d, $m, $y, $courses, $groups, $users, $courseid) {
$text.= '</div></form></div>';
}
$text .= get_string('dayview', 'calendar').': '.calendar_course_filter_selector($getvars);
$text .= '<label for="cal_course_flt_jump">'.
get_string('dayview', 'calendar').
':</label>'.
calendar_course_filter_selector($getvars);
echo '<div class="header">'.$text.'</div>';
@@ -374,7 +377,7 @@ function calendar_show_month_detailed($m, $y, $courses, $groups, $users, $course
}
}
}
// Extract information: events vs. time
calendar_events_by_day($events, $m, $y, $eventsbyday, $durationbyday, $typesbyday, $courses);
@@ -517,55 +520,51 @@ function calendar_show_month_detailed($m, $y, $courses, $groups, $users, $course
echo "</table>\n"; // Tabular display of days ends
// OK, now for the filtering display
echo '<div class="filters"><table><tr>';
// Global events
if($SESSION->cal_show_global) {
echo '<td class="event_global" style="width: 8px;"></td><td><strong>'.get_string('globalevents', 'calendar').':</strong> ';
echo get_string('shown', 'calendar').' (<a href="'.CALENDAR_URL.'set.php?var=showglobal&amp;'.$getvars.'">'.get_string('clickhide', 'calendar').'</a>)</td>'."\n";
}
else {
echo '<td style="width: 8px;"></td><td><strong>'.get_string('globalevents', 'calendar').':</strong> ';
echo get_string('hidden', 'calendar').' (<a href="'.CALENDAR_URL.'set.php?var=showglobal&amp;'.$getvars.'">'.get_string('clickshow', 'calendar').'</a>)</td>'."\n";
}
// Course events
if(!empty($SESSION->cal_show_course)) {
echo '<td class="event_course" style="width: 8px;"></td><td><strong>'.get_string('courseevents', 'calendar').':</strong> ';
echo get_string('shown', 'calendar').' (<a href="'.CALENDAR_URL.'set.php?var=showcourses&amp;'.$getvars.'">'.get_string('clickhide', 'calendar').'</a>)</td>'."\n";
}
else {
echo '<td style="width: 8px;"></td><td><strong>'.get_string('courseevents', 'calendar').':</strong> ';
echo get_string('hidden', 'calendar').' (<a href="'.CALENDAR_URL.'set.php?var=showcourses&amp;'.$getvars.'">'.get_string('clickshow', 'calendar').'</a>)</td>'."\n";
}
echo "</tr>\n";
if(!empty($USER->id) && !isguest()) {
echo '<tr>';
// Group events
if($SESSION->cal_show_groups) {
echo '<td class="event_group" style="width: 8px;"></td><td><strong>'.get_string('groupevents', 'calendar').':</strong> ';
echo get_string('shown', 'calendar').' (<a href="'.CALENDAR_URL.'set.php?var=showgroups&amp;'.$getvars.'">'.get_string('clickhide', 'calendar').'</a>)</td>'."\n";
}
else {
echo '<td style="width: 8px;"></td><td><strong>'.get_string('groupevents', 'calendar').':</strong> ';
echo get_string('hidden', 'calendar').' (<a href="'.CALENDAR_URL.'set.php?var=showgroups&amp;'.$getvars.'">'.get_string('clickshow', 'calendar').'</a>)</td>'."\n";
}
// User events
if($SESSION->cal_show_user) {
echo '<td class="event_user" style="width: 8px;"></td><td><strong>'.get_string('userevents', 'calendar').':</strong> ';
echo get_string('shown', 'calendar').' (<a href="'.CALENDAR_URL.'set.php?var=showuser&amp;'.$getvars.'">'.get_string('clickhide', 'calendar').'</a>)</td>'."\n";
}
else {
echo '<td style="width: 8px;"></td><td><strong>'.get_string('userevents', 'calendar').':</strong> ';
echo get_string('hidden', 'calendar').' (<a href="'.CALENDAR_URL.'set.php?var=showuser&amp;'.$getvars.'">'.get_string('clickshow', 'calendar').'</a>)</td>'."\n";
}
echo "</tr>\n";
}
echo '</table></div>';
// OK, now for the filtering display
echo '<div class="filters"><table><tr>';
// Global events
if($SESSION->cal_show_global) {
echo '<td class="event_global" style="width: 8px;"></td><td><strong>'.get_string('globalevents', 'calendar').':</strong> ';
echo get_string('shown', 'calendar').' (<a href="'.CALENDAR_URL.'set.php?var=showglobal&amp;'.$getvars.'">'.get_string('clickhide', 'calendar').'</a>)</td>'."\n";
} else {
echo '<td style="width: 8px;"></td><td><strong>'.get_string('globalevents', 'calendar').':</strong> ';
echo get_string('hidden', 'calendar').' (<a href="'.CALENDAR_URL.'set.php?var=showglobal&amp;'.$getvars.'">'.get_string('clickshow', 'calendar').'</a>)</td>'."\n";
}
// Course events
if(!empty($SESSION->cal_show_course)) {
echo '<td class="event_course" style="width: 8px;"></td><td><strong>'.get_string('courseevents', 'calendar').':</strong> ';
echo get_string('shown', 'calendar').' (<a href="'.CALENDAR_URL.'set.php?var=showcourses&amp;'.$getvars.'">'.get_string('clickhide', 'calendar').'</a>)</td>'."\n";
} else {
echo '<td style="width: 8px;"></td><td><strong>'.get_string('courseevents', 'calendar').':</strong> ';
echo get_string('hidden', 'calendar').' (<a href="'.CALENDAR_URL.'set.php?var=showcourses&amp;'.$getvars.'">'.get_string('clickshow', 'calendar').'</a>)</td>'."\n";
}
echo "</tr>\n";
if(!empty($USER->id) && !isguest()) {
echo '<tr>';
// Group events
if($SESSION->cal_show_groups) {
echo '<td class="event_group" style="width: 8px;"></td><td><strong>'.get_string('groupevents', 'calendar').':</strong> ';
echo get_string('shown', 'calendar').' (<a href="'.CALENDAR_URL.'set.php?var=showgroups&amp;'.$getvars.'">'.get_string('clickhide', 'calendar').'</a>)</td>'."\n";
} else {
echo '<td style="width: 8px;"></td><td><strong>'.get_string('groupevents', 'calendar').':</strong> ';
echo get_string('hidden', 'calendar').' (<a href="'.CALENDAR_URL.'set.php?var=showgroups&amp;'.$getvars.'">'.get_string('clickshow', 'calendar').'</a>)</td>'."\n";
}
// User events
if($SESSION->cal_show_user) {
echo '<td class="event_user" style="width: 8px;"></td><td><strong>'.get_string('userevents', 'calendar').':</strong> ';
echo get_string('shown', 'calendar').' (<a href="'.CALENDAR_URL.'set.php?var=showuser&amp;'.$getvars.'">'.get_string('clickhide', 'calendar').'</a>)</td>'."\n";
} else {
echo '<td style="width: 8px;"></td><td><strong>'.get_string('userevents', 'calendar').':</strong> ';
echo get_string('hidden', 'calendar').' (<a href="'.CALENDAR_URL.'set.php?var=showuser&amp;'.$getvars.'">'.get_string('clickshow', 'calendar').'</a>)</td>'."\n";
}
echo "</tr>\n";
}
echo '</table></div>';
}
function calendar_show_upcoming_events($courses, $groups, $users, $futuredays, $maxevents, $courseid) {
@@ -581,15 +580,14 @@ function calendar_show_upcoming_events($courses, $groups, $users, $futuredays, $
$text.= '<div>';
$text.= '<input type="hidden" name="action" value="new" />';
$text.= '<input type="hidden" name="course" value="'.$courseid.'" />';
/*
$text.= '<input type="hidden" name="cal_m" value="'.$m.'" />';
$text.= '<input type="hidden" name="cal_y" value="'.$y.'" />';
*/
$text.= '<input type="submit" value="'.get_string('newevent', 'calendar').'" />';
$text.= '</div></form></div>';
}
$text .= get_string('upcomingevents', 'calendar').': '.calendar_course_filter_selector('from=upcoming');
$text .= '<label for="cal_course_flt_jump">'.
get_string('upcomingevents', 'calendar').
': </label>'.
calendar_course_filter_selector('from=upcoming');
echo '<div class="header">'.$text.'</div>';
+19
View File
@@ -28,6 +28,7 @@
// //
///////////////////////////////////////////////////////////////////////////
unset($CFG); // Ignore this line
$CFG = new stdClass();
//=========================================================================
// 1. DATABASE SETUP
@@ -176,6 +177,22 @@ $CFG->admin = 'admin';
// shared out from your site/institution!
// $CFG->includeuserpasswordsinbackup = true;
//
// Completely disable user creation when restoring a course, bypassing any
// permissions granted via roles and capabilities. Enabling this setting
// results in the restore process stopping when a user attempts to restore a
// course requiring users to be created.
// $CFG->disableusercreationonrestore = true;
//
// Modify the restore process in order to force the "user checks" to assume
// that the backup originated from a different site, so detection of matching
// users is performed with different (more "relaxed") rules. Note that this is
// only useful if the backup file has been created using Moodle < 1.9.4 and the
// site has been rebuilt from scratch using backup files (not the best way btw).
// If you obtain user conflicts on restore, rather than enabling this setting
// permanently, try restoring the backup on a different site, back it up again
// and then restore on the target server.
// $CFG->forcedifferentsitecheckingusersonrestore = true;
//
// Prevent stats processing and hide the GUI
// $CFG->disablestatsprocessing = true;
//
@@ -347,6 +364,8 @@ $CFG->admin = 'admin';
// When working with production data on test servers, no emails should ever be send to real users
// $CFG->noemailever = true;
//
// Divert all outgoing emails to this address to test and debug emailing features
// $CFG->divertallemailsto = 'root@localhost.local';
//
//=========================================================================
// ALL DONE! To continue installation, visit your main page with a browser
+2 -2
View File
@@ -57,9 +57,9 @@
if ($resort and confirm_sesskey()) {
if ($courses = get_courses($category->id, "fullname ASC", 'c.id,c.fullname,c.sortorder')) {
// move it off the range
$count = get_record_sql('SELECT MAX(sortorder) AS max, 1
$count = get_record_sql('SELECT MIN(sortorder) AS min, 1
FROM ' . $CFG->prefix . 'course WHERE category=' . $category->id);
$count = $count->max + 100;
$count = $count->min;
begin_sql();
foreach ($courses as $course) {
set_field('course', 'sortorder', $count, 'id', $course->id);
+4
View File
@@ -1,5 +1,9 @@
<?php //$Id$
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
require_once($CFG->libdir.'/formslib.php');
require_once($CFG->libdir . '/questionlib.php');
+4
View File
@@ -1,5 +1,9 @@
<?php //$Id$
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
require_once($CFG->libdir.'/formslib.php');
class course_edit_form extends moodleform {
+1 -3
View File
@@ -656,9 +656,7 @@ function print_log_xls($course, $user, $date, $order='l.time DESC', $modname,
}
$myxls->write($row, 0, $courses[$log->course], '');
// Excel counts from 1/1/1900
$excelTime=25569+$log->time/(3600*24);
$myxls->write($row, 1, $excelTime, $formatDate);
$myxls->write_date($row, 1, $log->time, $formatDate); // write_date() does conversion/timezone support. MDL-14934
$myxls->write($row, 2, $log->ip, '');
$fullname = fullname($log, has_capability('moodle/site:viewfullnames', get_context_instance(CONTEXT_COURSE, $course->id)));
$myxls->write($row, 3, $fullname, '');
+5
View File
@@ -1,4 +1,9 @@
<?php
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
require_once ($CFG->libdir.'/formslib.php');
/**
* This class adds extra methods to form wrapper specific to be used for module
+4
View File
@@ -1,5 +1,9 @@
<?php //$$
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
require_once($CFG->libdir.'/formslib.php');
class recent_form extends moodleform {
+2 -2
View File
@@ -6,7 +6,7 @@
require_once('lib.php');
require_once($CFG->libdir.'/adminlib.php');
$id = optional_param('id', 0, PARAM_INT);// Course ID
$id = required_param('id', PARAM_INT);// Course ID
if (!$course = get_record('course', 'id', $id) ) {
error('That\'s an invalid course id'.$id);
@@ -21,7 +21,7 @@
$strreports = get_string('reports');
if ($course->id == SITEID) {
admin_externalpage_setup('reportloglive');
admin_externalpage_setup('reportloglive','',array('id' => $course->id));
admin_externalpage_print_header();
} else {
+4
View File
@@ -31,6 +31,10 @@
* @package course
*//** */
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
require_once($CFG->libdir.'/formslib.php');
/**
+4
View File
@@ -1,4 +1,8 @@
<?php // $Id$
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
require_once $CFG->libdir.'/formslib.php';
class course_reset_form extends moodleform {
+4 -2
View File
@@ -21,6 +21,8 @@ $summary = optional_param('summary', '', PARAM_RAW);
$sequence = optional_param('sequence', '', PARAM_SEQUENCE);
$visible = optional_param('visible', 0, PARAM_INT);
$pageaction = optional_param('action', '', PARAM_ALPHA); // Used to simulate a DELETE command
$positiontoinsert = optional_param('positiontoinsert', '', PARAM_ALPHA);
$positiontoinsertid = optional_param('positiontoinsertid', '', PARAM_RAW);
// Authorise the user and verify some incoming data
if (!$course = get_record('course', 'id', $courseid)) {
@@ -45,7 +47,7 @@ require_login($course->id);
require_capability('moodle/course:update', $context);
if (!empty($CFG->disablecourseajax)) {
errorl_log('Course AJAX not allowed');
error_log('Course AJAX not allowed');
die;
}
@@ -234,7 +236,7 @@ switch($req_method) {
case 'DELETE':
switch ($class) {
case 'block':
blocks_execute_action($PAGE, $pageblocks, 'delete', $blockinstance);
blocks_execute_action($PAGE, $pageblocks, 'delete', $blockinstance, false, false);
break;
case 'resource':
+1 -1
View File
@@ -73,7 +73,7 @@
} else {
if (has_capability('moodle/course:managescales', $context)) {
echo "<p align=\"center\">(";
print_string("scalestip");
print_string("scalestip2");
echo ")</p>";
}
}
+1 -1
View File
@@ -21,7 +21,7 @@ if (is_array($mnethosts)) {
<?php print choose_from_menu_yesno('enrol_mnet_allow_allcourses', $frm->enrol_mnet_allow_allcourses); ?>
</td>
<td>
<?php print_string("allow_allcourses", "enrol_mnet") ?>
<?php print_string("allow_allcourses2", "enrol_mnet") ?>
</td>
</tr>
+1 -1
View File
@@ -23,7 +23,7 @@
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM));
$query = urldecode($_SERVER['QUERY_STRING']);
error_reporting(E_ALL);
error_reporting(DEBUG_ALL);
if ($query) {
$output = $query;
+1 -1
View File
@@ -164,7 +164,7 @@ function tex_filter ($courseid, $text) {
$texcache->timemodified = time();
insert_record("cache_filters",$texcache, false);
}
$filename = $md5 . ".gif";
$filename = $md5 . ".{$CFG->filter_tex_convertformat}";
$text = str_replace( $matches[0][$i], string_file_picture_tex($filename, $texexp, '', '', $align, $alt), $text);
}
return $text;
+7 -2
View File
@@ -5,10 +5,9 @@ require_once($CFG->dirroot.'/filter/tex/lib.php');
$items = array();
$items[] = new admin_setting_heading('filter_tex_latexheading', get_string('latexsettings', 'admin'), '');
$items[] = new admin_setting_configtextarea('filter_tex_latexpreamble', get_string('latexpreamble','admin'),
'', " \\usepackage[latin1]{inputenc}\n \\usepackage{amsmath}\n \\usepackage{amsfonts}\n \\RequirePackage{amsmath,amssymb,latexsym}\n");
'', "\\usepackage[latin1]{inputenc}\n\\usepackage{amsmath}\n\\usepackage{amsfonts}\n\\RequirePackage{amsmath,amssymb,latexsym}\n");
$items[] = new admin_setting_configtext('filter_tex_latexbackground', get_string('backgroundcolour', 'admin'), '', '#FFFFFF');
$items[] = new admin_setting_configtext('filter_tex_density', get_string('density', 'admin'), '', '120', PARAM_INT);
$items[] = new admin_setting_configtext('filter_tex_density', get_string('density', 'admin'), '', '120', PARAM_INT);
if (PHP_OS=='Linux') {
$default_filter_tex_pathlatex = "/usr/bin/latex";
@@ -38,6 +37,12 @@ $items[] = new admin_setting_configexecutable('filter_tex_pathlatex', get_string
$items[] = new admin_setting_configexecutable('filter_tex_pathdvips', get_string('pathdvips', 'admin'), '', $default_filter_tex_pathdvips);
$items[] = new admin_setting_configexecutable('filter_tex_pathconvert', get_string('pathconvert', 'admin'), '', $default_filter_tex_pathconvert);
// Even if we offer GIF and PNG formats here, in the update callback we check whether
// all the paths actually point to executables. If they don't, we force the setting
// to GIF, as that's the only format mimeTeX can produce.
$formats = array('gif' => 'GIF', 'png' => 'PNG');
$items[] = new admin_setting_configselect('filter_tex_convertformat', get_string('convertformat', 'admin'), get_string('configconvertformat', 'admin'), 'gif', $formats);
foreach ($items as $item) {
$item->set_updatedcallback('filter_tex_updatedcallback');
$settings->add($item);
+10 -8
View File
@@ -82,11 +82,11 @@
}
/**
* Render TeX string into gif
* Render TeX string into gif/png
* @param string $formula TeX formula
* @param string $filename base of filename for output (no extension)
* @param int $fontsize font size
* @param int $density density value for .ps to .gif conversion
* @param int $density density value for .ps to .gif/.png conversion
* @param string $background background color (e.g, #FFFFFF).
* @param file $log valid open file handle for optional logging (debugging only)
* @return bool true if successful
@@ -106,7 +106,7 @@
$tex = "{$this->temp_dir}/$filename.tex";
$dvi = "{$this->temp_dir}/$filename.dvi";
$ps = "{$this->temp_dir}/$filename.ps";
$gif = "{$this->temp_dir}/$filename.gif";
$img = "{$this->temp_dir}/$filename.{$CFG->filter_tex_convertformat}";
// turn the latex doc into a .tex file in the temp area
$fh = fopen( $tex, 'w' );
@@ -126,30 +126,32 @@
return false;
}
// run convert on document (.ps to .gif)
// run convert on document (.ps to .gif/.png)
if ($background) {
$bg_opt = "-transparent \"$background\""; // Makes transparent background
} else {
$bg_opt = "";
}
$command = "{$CFG->filter_tex_pathconvert} -density $density -trim $bg_opt $ps $gif";
$command = "{$CFG->filter_tex_pathconvert} -density $density -trim $bg_opt $ps $img";
if ($this->execute($command, $log )) {
return false;
}
return $gif;
return $img;
}
/**
* Delete files created in temporary area
* Don't forget to copy the final gif before calling this
* Don't forget to copy the final gif/png before calling this
* @param string $filename file base (no extension)
*/
function clean_up( $filename ) {
global $CFG;
unlink( "{$this->temp_dir}/$filename.tex" );
unlink( "{$this->temp_dir}/$filename.dvi" );
unlink( "{$this->temp_dir}/$filename.ps" );
unlink( "{$this->temp_dir}/$filename.gif" );
unlink( "{$this->temp_dir}/$filename.{$CFG->filter_tex_convertformat}" );
unlink( "{$this->temp_dir}/$filename.aux" );
unlink( "{$this->temp_dir}/$filename.log" );
return;
+7
View File
@@ -84,6 +84,13 @@ function filter_tex_updatedcallback($name) {
delete_records('cache_filters', 'filter', 'tex');
delete_records('cache_filters', 'filter', 'algebra');
if (!(is_file($CFG->filter_tex_pathlatex) && is_executable($CFG->filter_tex_pathlatex) &&
is_file($CFG->filter_tex_pathdvips) && is_executable($CFG->filter_tex_pathdvips) &&
is_file($CFG->filter_tex_pathconvert) && is_executable($CFG->filter_tex_pathconvert))) {
// LaTeX, dvips or convert are not available, and mimetex can only produce GIFs so...
set_config('filter_tex_convertformat', 'gif');
}
}
?>
+1 -3
View File
@@ -26,8 +26,6 @@
$cmd = ''; // Initialise these variables
$status = '';
error_reporting(E_ALL);
$relativepath = get_file_argument('pix.php');
$args = explode('/', trim($relativepath, '/'));
@@ -40,7 +38,7 @@
}
if (!file_exists($pathname)) {
$md5 = str_replace('.gif','',$image);
$md5 = str_replace(".{$CFG->filter_tex_convertformat}",'',$image);
if ($texcache = get_record('cache_filters', 'filter', 'tex', 'md5key', $md5)) {
if (!file_exists($CFG->dataroot.'/filter/tex')) {
make_upload_directory('filter/tex');
+9 -8
View File
@@ -25,7 +25,7 @@
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM), $USER->id); /// Required cap to run this. MDL-18552
$query = urldecode($_SERVER['QUERY_STRING']);
error_reporting(E_ALL);
error_reporting(DEBUG_ALL);
$output = '';
// look up in cache if required
@@ -123,6 +123,7 @@
return;
}
$texexp = stripslashes($texexp);
$image = md5($texexp) . ".gif";
$filetype = 'image/gif';
if (!file_exists("$CFG->dataroot/filter/tex")) {
@@ -217,7 +218,7 @@
$tex = "$latex->temp_dir/$md5.tex";
$dvi = "$latex->temp_dir/$md5.dvi";
$ps = "$latex->temp_dir/$md5.ps";
$gif = "$latex->temp_dir/$md5.gif";
$img = "$latex->temp_dir/$md5.{$CFG->filter_tex_convertformat}";
// put the expression as a file into the temp area
$expression = stripslashes($expression);
@@ -240,13 +241,13 @@
$output .= execute($cmd);
// step 3: convert command
$cmd = "$CFG->filter_tex_pathconvert -density 240 -trim $ps $gif ";
$cmd = "$CFG->filter_tex_pathconvert -density 240 -trim $ps $img ";
$output .= execute($cmd);
if (!$graphic) {
echo($output);
} else {
send_file($gif, "$md5.gif");
send_file($img, "$md5.{$CFG->filter_tex_convertformat}");
}
}
@@ -287,13 +288,13 @@
target="inlineframe">
<center>
<input type="text" name="tex" size="50"
value="f(x)=\Bigint_{-\infty}^x~e^{-t^2}dt" />
value="f(x)=\int_{-\infty}^x~e^{-t^2}dt" />
</center>
<p>The following tests are available:</p>
<ol>
<li><input type="radio" name="action" value="ShowDB" id="ShowDB" />
<label for="ShowDB">See the cache_filters database entry for this expression (if any).</label></li>
<li><input type="radio" name="DeleteDB" value="DeleteDB" id="DeleteDB" />
<li><input type="radio" name="action" value="DeleteDB" id="DeleteDB" />
<label for="DeleteDB">Delete the cache_filters database entry for this expression (if any).</label></li>
<li><input type="radio" name="action" value="ShowImageMimetex" id="ShowImageMimetex" checked="checked" />
<label for="ShowImageMimetex">Show a graphic image of the algebraic expression rendered with mimetex.</label></li>
@@ -320,7 +321,7 @@ searches the database cache_filters table to see if this TeX expression had been
processed before. If not, it adds a DB entry for that expression. It then
replaces the TeX expression by an &lt;img src=&quot;.../filter/tex/pix.php...&quot;&gt;
tag. The filter/tex/pix.php script then searches the database to find an
appropriate gif image file for that expression and to create one if it doesn't exist.
appropriate gif/png image file for that expression and to create one if it doesn't exist.
It will then use either the LaTex/Ghostscript renderer (using external executables
on your system) or the bundled Mimetex executable. The full Latex/Ghostscript
renderer produces better results and is tried first.
@@ -331,7 +332,7 @@ you might try to fix them.</p>
process this expression. Then the database entry for that expression contains
a bad TeX expression in the rawtext field (usually blank). You can fix this
by clicking on &quot;Delete DB Entry&quot;</li>
<li>The TeX to gif image conversion process does not work.
<li>The TeX to gif/png image conversion process does not work.
If paths are specified in the filter configuation screen for the three
executables these will be tried first. Note that they still must be correctly
installed and have the correct permissions. In particular make sure that you
-69
View File
@@ -1,69 +0,0 @@
<?PHP // $Id$
// This function fetches math. images from the data directory
// If not, it obtains the corresponding TeX expression from the cache_tex db table
// and uses mimeTeX to create the image file
$nomoodlecookie = true; // Because it interferes with caching
require_once("../../config.php");
require_once($CFG->dirroot.'/filter/tex/lib.php');
if (empty($CFG->textfilters)) {
error ('Filter not enabled!');
} else {
$filters = explode(',', $CFG->textfilters);
if (array_search('filter/tex', $filters) === FALSE) {
error ('Filter not enabled!');
}
}
error_reporting(E_ALL);
$texexp = urldecode($_SERVER['QUERY_STRING']);
$texexp = str_replace('formdata=','',$texexp);
if ($texexp) {
$image = md5($texexp) . ".gif";
$filetype = 'image/gif';
if (!file_exists("$CFG->dataroot/filter/tex")) {
make_upload_directory("filter/tex");
}
$texexp = str_replace('&lt;','<',$texexp);
$texexp = str_replace('&gt;','>',$texexp);
$texexp = preg_replace('!\r\n?!',' ',$texexp);
$pathname = "$CFG->dataroot/filter/tex/$image";
$cmd = tex_filter_get_cmd($pathname, $texexp);
system($cmd, $status);
if (file_exists($pathname)) {
require_once($CFG->libdir . '/filelib.php');
send_file($pathname, $image);
} else {
echo "Image not found!";
}
exit;
} else {
echo "No tex expresion specified";
}
?>
<html>
<head><title>mimeTeX Previewer</title></head>
<body>
<p>Now enter your own expression or use the sample provided,
press the Submit button, and mimeTeX's rendering should be
displayed in the little window immediately below it.
<center>
<form action="texed.php" method="get"
target="inlineframe">
<input type="text" name="formdata" size="50"
value="\Large f(x)=\Bigint_{-\infty}^x~e^{-t^2}dt" />
<input type="submit" />
</form> <br /> <br />
<iframe name="inlineframe" align="middle" width="80%" height="100">
&lt;p&gt;Something is wrong...&lt;/p&gt;
</iframe>
</center> <br />
</body>
</html>
+4
View File
@@ -16,6 +16,10 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
require_once $CFG->libdir.'/formslib.php';
class edit_letter_form extends moodleform {
+4
View File
@@ -16,6 +16,10 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
require_once $CFG->libdir.'/formslib.php';
class edit_outcome_form extends moodleform {
+4
View File
@@ -16,6 +16,10 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
require_once $CFG->libdir.'/formslib.php';
class edit_scale_form extends moodleform {
+4
View File
@@ -15,6 +15,10 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
require_once($CFG->libdir.'/formslib.php');
/**
+4
View File
@@ -15,6 +15,10 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
require_once $CFG->libdir.'/formslib.php';
class edit_calculation_form extends moodleform {
+4
View File
@@ -15,6 +15,10 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
require_once $CFG->libdir.'/formslib.php';
class edit_category_form extends moodleform {
+4
View File
@@ -15,6 +15,10 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
require_once $CFG->libdir.'/formslib.php';
class edit_grade_form extends moodleform {
+4
View File
@@ -15,6 +15,10 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
require_once $CFG->libdir.'/formslib.php';
class edit_outcomeitem_form extends moodleform {
+4
View File
@@ -15,6 +15,10 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
require_once $CFG->libdir.'/formslib.php';
class grade_export_form extends moodleform {
+4
View File
@@ -15,6 +15,10 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
require_once $CFG->libdir.'/formslib.php';
require_once($CFG->libdir.'/gradelib.php');
+18 -8
View File
@@ -14,15 +14,25 @@ function set_row(idx) {
}
/** highlight/unset the column of a table **/
function set_col(idx) {
function set_col(col,gradecelloffset) {
var table = document.getElementById('user-grades');
for (var i = 1; i < table.rows.length; i++) {
if (table.rows[i].cells[idx]) {
if (table.rows[i].cells[idx].className.search(/vmarked/) != -1) {
table.rows[i].cells[idx].className = table.rows[i].cells[idx].className.replace(' vmarked', '');
} else {
table.rows[i].cells[idx].className += ' vmarked';
}
//highlight the column header
flip_vmarked(table,2,col);
//add any grade cell offset (due to colspans) then iterate down the table
col += gradecelloffset;
for (var row = 3; row < table.rows.length; row++) {
flip_vmarked(table,row,col);
}
}
function flip_vmarked(table,row,col) {
if (table.rows[row].cells[col]) {
if (table.rows[row].cells[col].className.search(/vmarked/) != -1) {
table.rows[row].cells[col].className = table.rows[row].cells[col].className.replace(' vmarked', '');
} else {
table.rows[row].cells[col].className += ' vmarked';
}
}
}

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