Compare commits

...

1867 Commits

Author SHA1 Message Date
moodler 500fa33277 Bumped to 1.8.8 release 2009-01-28 07:56:53 +00:00
moodlerobot b703522d82 Updated the 18 build version to 20090128 2009-01-27 23:55:37 +00:00
stronk7 b18525e3d4 MDL-17365 forum rate - fix error message. 2009-01-27 18:06:25 +00:00
stronk7 461ca1b47e MDL-17365 forum rate - validate rating against scale values. Backported from HEAD 2009-01-27 17:55:35 +00:00
gbateson 96ff52548d MDL-17679: implement course reset for HotPot module (thanks to Albert Gasset) 2009-01-27 08:29:55 +00:00
moodlerobot a951a3a7cc Updated the 18 build version to 20090127 2009-01-26 23:56:11 +00:00
moodlerobot 66fea43d40 Automatic installer.php lang files by installer_builder (20090127) 2009-01-26 23:49:01 +00:00
moodlerobot b0f7cd073d Updated the 18 build version to 20090126 2009-01-25 23:55:13 +00:00
moodlerobot 7293bce7d7 Updated the 18 build version to 20090125 2009-01-24 23:56:37 +00:00
moodlerobot 7fd4f2f030 Updated the 18 build version to 20090124 2009-01-23 23:55:45 +00:00
moodlerobot 4393d509c0 Automatic installer.php lang files by installer_builder (20090124) 2009-01-23 23:49:03 +00:00
moodlerobot 251cc9e515 Updated the 18 build version to 20090123 2009-01-22 23:56:52 +00:00
moodlerobot 40c0a21f4e Automatic installer.php lang files by installer_builder (20090123) 2009-01-22 23:50:02 +00:00
poltawski c615c8b9b5 calendar:export MDL-17203 prevent disclosing of sensitive information
For more robust solution, please upgrade to 19_STABLE or later
2009-01-22 10:11:09 +00:00
moodlerobot 54f356203f Updated the 18 build version to 20090122 2009-01-21 23:57:25 +00:00
moodlerobot d83cdd1609 Automatic installer.php lang files by installer_builder (20090122) 2009-01-21 23:50:38 +00:00
moodlerobot 56aaef4dbf Updated the 18 build version to 20090121 2009-01-20 23:55:36 +00:00
moodlerobot b0e8c9d07c Automatic installer.php lang files by installer_builder (20090121) 2009-01-20 23:48:32 +00:00
moodlerobot 060a865087 Updated the 18 build version to 20090120 2009-01-19 23:55:16 +00:00
moodlerobot 3d36b7246f Automatic installer.php lang files by installer_builder (20090120) 2009-01-19 23:48:10 +00:00
moodlerobot 9b246f1366 Updated the 18 build version to 20090119 2009-01-18 23:53:09 +00:00
moodlerobot 02ae9049cf Automatic installer.php lang files by installer_builder (20090119) 2009-01-18 23:46:10 +00:00
moodlerobot 16d9e060b0 Updated the 18 build version to 20090118 2009-01-18 00:04:06 +00:00
moodlerobot c2e702dff9 Automatic installer.php lang files by installer_builder (20090118) 2009-01-17 23:56:32 +00:00
moodlerobot 94fe495c71 Updated the 18 build version to 20090117 2009-01-17 00:07:34 +00:00
moodlerobot b7fb958d30 Automatic installer.php lang files by installer_builder (20090117) 2009-01-17 00:00:00 +00:00
moodlerobot e8782e1a01 Updated the 18 build version to 20090116 2009-01-16 03:41:06 +00:00
moodlerobot 229ae9efc9 Automatic installer.php lang files by installer_builder (20090116) 2009-01-16 03:31:26 +00:00
dongsheng ee5719014c "MDL-6926, force language in forum module" 2009-01-14 04:53:44 +00:00
moodlerobot 73d0da2e76 Updated the 18 build version to 20090114 2009-01-13 23:59:19 +00:00
wildgirl acb51756b2 embedding files in a frame: MDL-10021 small rewording of help file 2009-01-13 10:20:30 +00:00
moodlerobot 3a37bc3182 Updated the 18 build version to 20090113 2009-01-13 00:02:07 +00:00
peterbulmer bae9a29ec2 MDL-10498: Apostrophe / Quote in username or email breaks profile update
Author: Aaron Barnes <aaronb@catalyst.net.nz>
2009-01-12 02:02:06 +00:00
moodlerobot b8164f8b9e Updated the 18 build version to 20090112 2009-01-11 23:55:57 +00:00
moodlerobot 53c84c37c7 Updated the 18 build version to 20090111 2009-01-11 00:08:38 +00:00
moodlerobot 9a73229511 Updated the 18 build version to 20090110 2009-01-09 23:56:26 +00:00
moodlerobot 7e6e79a1a8 Automatic installer.php lang files by installer_builder (20090110) 2009-01-09 23:49:32 +00:00
moodlerobot 544a530e19 Updated the 18 build version to 20090109 2009-01-08 23:57:58 +00:00
moodlerobot bc3a9fff93 Automatic installer.php lang files by installer_builder (20090109) 2009-01-08 23:50:33 +00:00
jerome 1c081ac632 resource: MDL-10021 upload file resource: change "keep navigation visible" into a select box. Choice are now: No - Yes, with frame - Yes, without frame 2009-01-08 02:55:03 +00:00
jerome e2c9778fe7 database: MDL-16999 move the warning message from the environment check page to a normal upgrade page 2009-01-08 01:09:46 +00:00
moodlerobot 0ae4106150 Updated the 18 build version to 20090108 2009-01-08 00:06:03 +00:00
skodak f4ac741224 MDL-17799 proper log url sanitisation - big thanks to Full Name hacker ;-) backported from HEAD 2009-01-07 23:02:01 +00:00
moodlerobot 6909a0e410 Updated the 18 build version to 20090107 2009-01-06 23:57:11 +00:00
skodak ccd99f576a MDL-17789 prevent potential XSS problems through PHP_SELF; backported from HEAD 2009-01-06 13:10:00 +00:00
moodlerobot 581b14ecb7 Updated the 18 build version to 20090106 2009-01-05 23:56:11 +00:00
moodlerobot 3b386129c2 Automatic installer.php lang files by installer_builder (20090106) 2009-01-05 23:48:43 +00:00
moodlerobot 5e9fe46559 Updated the 18 build version to 20090105 2009-01-04 23:55:09 +00:00
moodlerobot 12acacebcd Updated the 18 build version to 20090104 2009-01-03 23:57:55 +00:00
moodlerobot a0eeecc7fb Updated the 18 build version to 20090103 2009-01-03 00:01:13 +00:00
moodlerobot 28ca97e6a7 Automatic installer.php lang files by installer_builder (20090103) 2009-01-02 23:53:24 +00:00
skodak af65bb7957 MDL-17772 fixed guest access; backported from MOODLE_19_STABLE 2009-01-02 21:08:24 +00:00
stronk7 f49b1e379b MDL-12922 restore roll dates - prevent wrong rolls to 0 happening to teachers. Backported from HEAD 2009-01-02 18:00:43 +00:00
moodlerobot d9933413df Updated the 18 build version to 20090102 2009-01-01 23:58:35 +00:00
moodlerobot c9f6ccb2a0 Automatic installer.php lang files by installer_builder (20090102) 2009-01-01 23:50:16 +00:00
skodak 3eb24a6e69 MDL-17758 fixed hardcoded /admin/ links 2009-01-01 14:36:49 +00:00
moodlerobot 31f4ca3c15 Updated the 18 build version to 20090101 2008-12-31 23:55:50 +00:00
moodlerobot 4fb49dda67 Updated the 18 build version to 20081231 2008-12-31 00:01:29 +00:00
moodlerobot 5673c270ff Updated the 18 build version to 20081230 2008-12-29 23:57:35 +00:00
skodak a6bac1a193 MDL-17682 added default value for city field; backported from HEAD 2008-12-29 21:47:59 +00:00
moodlerobot 6338f9cac1 Updated the 18 build version to 20081229 2008-12-28 23:57:50 +00:00
moodlerobot 00e89cf2b7 Updated the 18 build version to 20081228 2008-12-27 23:56:48 +00:00
moodlerobot 6c0db78af0 Updated the 18 build version to 20081227 2008-12-26 23:58:32 +00:00
moodlerobot a428f715d7 Automatic installer.php lang files by installer_builder (20081227) 2008-12-26 23:51:07 +00:00
arborrow e20ea4cde6 MDL-17741 - typo $tableparam 2008-12-26 23:14:39 +00:00
arborrow 4acd575cad MDL-17741 - typo $tableparam 2008-12-26 20:46:40 +00:00
iarenaza bb53eb49a8 auth/ldap: MDL-9405 sync_users() can create duplicated users
If we are using auth_ldap_sync_users.php to synchronize our users, and we
have a database which is case-sensitive when doing comparisons (Postgres and
Oracle at least), and any of our users has the vale of the username attribute
in mixed-case (like 'John Smith'), we get duplicated users.

This is because we don't make sure the username attribute value is 'lowercased'
after we retrive it from the LDAP server and before we insert it into the
database.
2008-12-26 15:57:55 +00:00
moodlerobot 2c0c202e55 Updated the 18 build version to 20081226 2008-12-25 23:55:02 +00:00
moodlerobot 98e60173a9 Updated the 18 build version to 20081225 2008-12-24 23:56:27 +00:00
moodlerobot 0bba3204fd Updated the 18 build version to 20081224 2008-12-23 23:56:33 +00:00
moodlerobot 94d30966ac Automatic installer.php lang files by installer_builder (20081224) 2008-12-23 23:49:18 +00:00
moodlerobot 1eb458f54d Updated the 18 build version to 20081223 2008-12-22 23:54:28 +00:00
moodlerobot 84885b9bda Updated the 18 build version to 20081222 2008-12-21 23:52:48 +00:00
moodlerobot cc3919d0bc Automatic installer.php lang files by installer_builder (20081222) 2008-12-21 16:53:21 +00:00
stronk7 e4387c5776 Adding kk_utf8 to installer langs. Backported from HEAD. 2008-12-21 16:04:48 +00:00
stronk7 dac1b1cae2 file installer.php was added on branch MOODLE_18_STABLE on 2008-12-21 16:04:48 +0000 2008-12-21 16:02:16 +00:00
gbateson 3d9e194de6 MDL-6467 add "swf" and "flv" to the list of files for which relative urls are converted to absolute urls 2008-12-21 01:47:06 +00:00
moodlerobot 5935cf5e66 Updated the 18 build version to 20081221 2008-12-20 23:57:55 +00:00
moodlerobot bc7f2e4944 Updated the 18 build version to 20081220 2008-12-19 23:54:30 +00:00
moodlerobot d3b195eed6 Updated the 18 build version to 20081219 2008-12-18 23:55:29 +00:00
moodlerobot 286ef9f6ac Updated the 18 build version to 20081218 2008-12-17 23:57:01 +00:00
moodlerobot d364e38b6a Automatic installer.php lang files by installer_builder (20081218) 2008-12-17 23:49:29 +00:00
moodlerobot f9318e82f9 Updated the 18 build version to 20081217 2008-12-17 00:37:47 +00:00
moodlerobot ed87f95535 Updated the 18 build version to 20081216 2008-12-15 23:54:10 +00:00
moodlerobot 9392abebd4 Automatic installer.php lang files by installer_builder (20081216) 2008-12-15 23:47:26 +00:00
tjhunt 1e3d1148a3 Flatfile enrolment: MDL-11418 SQL error. Thanks to Patrick Pollet.
I don't know exactly how this works, but it looks like a good fix to me, so committing.
2008-12-15 02:53:44 +00:00
moodlerobot 3b6165a5d0 Updated the 18 build version to 20081215 2008-12-14 23:53:38 +00:00
moodlerobot d48a52d6b4 Automatic installer.php lang files by installer_builder (20081215) 2008-12-14 23:47:06 +00:00
moodlerobot 546eb4274c Updated the 18 build version to 20081214 2008-12-13 23:52:55 +00:00
moodlerobot 75d816bc7e Updated the 18 build version to 20081213 2008-12-12 23:54:19 +00:00
moodlerobot 8befb03723 Automatic installer.php lang files by installer_builder (20081213) 2008-12-12 23:47:44 +00:00
tjhunt a1f5200104 match qtype: MDL-17326 backup and restore problems
* The shuffleanswers options was not backed up or restored.

* Responses were not properly recoded on restore.
2008-12-12 06:45:19 +00:00
tjhunt d8301555cd matching qtype: MDL-17496 With filterall and multilang, the contents of the dropdowns was not being properly filtered
This was caused becuse the solution to MDL-9005 was not quite right.
2008-12-12 04:39:18 +00:00
tjhunt 4914c939c6 numerical and shortanswer question types: problems with compare_responses and test_response.
MDL-15315 The previous fix for this issue with wildcard answers in the item analysis report caused the following two regressions. This patch fixes it properly.

MDL-17247 This is basiclly pointing out the weridness in the previous fix and gave some useful clues as to a proper solution. Thanks Oleg.

MDL-17610 This was a report of a problem with each attempt builds on last, with a shortanswer question, where the sutdent's response contains a '.

Also, lots of unit tests to try to ensure the new code is right.
2008-12-12 03:48:26 +00:00
moodlerobot 2d3921b478 Updated the 18 build version to 20081212 2008-12-11 23:53:58 +00:00
moodlerobot e4f3c89ef6 Automatic installer.php lang files by installer_builder (20081212) 2008-12-11 23:47:15 +00:00
moodlerobot b92200dbc4 Updated the 18 build version to 20081211 2008-12-10 23:54:52 +00:00
tjhunt 3d0f39ea96 truefalse qtype: MDL-12027 remove spurious alt attribute from truefalse qtype radio buttons. 2008-12-10 00:54:38 +00:00
moodlerobot 05e2f6577b Updated the 18 build version to 20081210 2008-12-09 23:54:49 +00:00
piers 80b4f1e8d2 MDL-17572 - remove php short tags. backport to 1.8. 2008-12-09 22:04:48 +00:00
moodlerobot 5e229d0e1b Updated the 18 build version to 20081209 2008-12-08 23:54:08 +00:00
exe-cutor 0a53e4b12c Added Shibboleth 2.x fix 2008-12-08 10:53:00 +00:00
skodak dcb74f68c7 MDL-17368 removing unused html area spell checker - we have our own implementation; backported from MOODLE_19_STABLE 2008-12-08 00:13:03 +00:00
moodlerobot 69bac29715 Updated the 18 build version to 20081208 2008-12-07 23:54:05 +00:00
moodlerobot b3f225c67d Automatic installer.php lang files by installer_builder (20081208) 2008-12-07 23:47:16 +00:00
stronk7 4ebc71d941 MDL-17545 activity names filter: Improve handling when name contains htmlentities() chars. Backported from HEAD. 2008-12-07 19:00:44 +00:00
stronk7 e31d919deb MDL-17518 resource names filter: Improve handling when name contains htmlentities() chars. Backported from HEAD 2008-12-07 18:48:15 +00:00
moodlerobot 11c82f1398 Updated the 18 build version to 20081207 2008-12-06 23:53:35 +00:00
moodlerobot 16bff0af46 Updated the 18 build version to 20081206 2008-12-05 23:53:45 +00:00
moodlerobot 13f7a01401 Automatic installer.php lang files by installer_builder (20081206) 2008-12-05 23:47:00 +00:00
tjhunt 713324b8c4 quiz settings: MDL-16781 Avoid concatenating and calling strtolower on language strings. 2008-12-05 04:20:13 +00:00
moodlerobot 3208d06283 Updated the 18 build version to 20081205 2008-12-04 23:53:50 +00:00
moodlerobot b12910d6f0 Automatic installer.php lang files by installer_builder (20081205) 2008-12-04 23:47:11 +00:00
pichetp a2816b7447 MDL-17524 Merging from HEAD
Deleting a calculated question delete datasetdefinitions shared by other question
2008-12-04 16:44:29 +00:00
moodlerobot 538c7feb3f Updated the 18 build version to 20081204 2008-12-03 18:39:02 +00:00
moodlerobot 8623f5d34f Automatic installer.php lang files by installer_builder (20081204) 2008-12-03 18:25:45 +00:00
ericmerrill bc738a326f weblib: MDL-16293: background-color attribute stripped from html. Adding 'background-color' attribute to $ALLOWED_PROTOCOLS array so kses doesn't drop it. 2008-12-03 16:51:22 +00:00
skodak 2235d76688 MDL-17392 - mailstop typo - credit goes to Daniel Neis, thanks; backported from MOODLE_19_STABLE 2008-12-01 22:41:53 +00:00
danmarsden 81bd4c1d1a MDL-17115 - no point in waiting for SCORM API to load when we know JS is disabled. merged from HEAD 2008-11-28 06:50:34 +00:00
ikawhero 2ca60d4f84 MDL-17434 Full URLs for enrol/unenrol links 2008-11-28 06:27:39 +00:00
moodlerobot e0cd8349ff Updated the 18 build version to 20081128 2008-11-28 02:00:35 +00:00
tjhunt 8b28857e69 fix notices: MDL-15974 Some systems that were upgraded have nullable columns, leading to notices
A new install has NOT NULL DEFAULT 0.
2008-11-27 05:07:36 +00:00
tjhunt 4baced6731 quiz item analysis report: MDL-13427 <br> tags in the headers of some columns. 2008-11-27 04:48:05 +00:00
tjhunt f5661d4525 quiz overview report: MDL-17235 SQL error was breaking 'Show all students' in quizzes with feedback.
Thanks to Juan Leyva for finding the problem and suggesting the fix.
2008-11-27 04:11:45 +00:00
moodlerobot 1285f57c2e Updated the 18 build version to 20081127 2008-11-27 02:06:55 +00:00
moodlerobot e21b71f60a Updated the 18 build version to 20081126 2008-11-26 02:06:45 +00:00
moodlerobot c2678149c1 Automatic installer.php lang files by installer_builder (20081126) 2008-11-26 01:51:52 +00:00
jerome fd0da9afbb database: MDL-16999 update 'Required Entries' warning message, merged from 19 2008-11-25 02:48:15 +00:00
moodlerobot 150d7176ca Updated the 18 build version to 20081125 2008-11-25 02:03:30 +00:00
moodlerobot 6a55040085 Updated the 18 build version to 20081124 2008-11-24 02:03:00 +00:00
moodlerobot c6ee79ca86 Updated the 18 build version to 20081123 2008-11-23 01:56:45 +00:00
moodlerobot 0b50c5356f Automatic installer.php lang files by installer_builder (20081123) 2008-11-23 01:43:31 +00:00
moodlerobot 8a254e7138 Updated the 18 build version to 20081122 2008-11-22 02:09:12 +00:00
moodlerobot be6ca627f5 Automatic installer.php lang files by installer_builder (20081122) 2008-11-22 01:56:00 +00:00
jerome e9a84e1016 database: MDL-16999 fix "Required Entries" and "Required Entries before viewing" settings. Display a warning message during upgrade process if the fields were set previously (partially merged from 1.9) 2008-11-21 07:11:01 +00:00
moodlerobot 2601887ca9 Updated the 18 build version to 20081121 2008-11-21 02:16:00 +00:00
moodlerobot 8ee39d43a8 Updated the 18 build version to 20081120 2008-11-20 02:04:52 +00:00
skodak f07e38fbca MDL-17236 html block: proper cleanup of html; backported from HEAD 2008-11-19 16:47:36 +00:00
skodak 64954387a6 MDL-17274 security: register globals not supported- now we are preventing upgrades and installs too; backported from HEAD 2008-11-19 09:48:38 +00:00
moodlerobot 0d14cbbe2b Updated the 18 build version to 20081119 2008-11-19 02:14:04 +00:00
moodlerobot 7662ce86ea Automatic installer.php lang files by installer_builder (20081119) 2008-11-19 02:00:02 +00:00
skodak c69e659c45 MDL-17143 $CFG->profilesforenrolledusersonly does not belong into advanced user edit form - it was removing description if user had only create user cap 2008-11-18 21:40:42 +00:00
skodak da7fac00ea MDL-17143 fixed use of $userid in definition_after_data() - problem in 1.8.x is that the definition_after_data() is called 2x ;-) 2008-11-18 21:32:50 +00:00
moodlerobot 4a762cb514 Updated the 18 build version to 20081118 2008-11-18 01:58:01 +00:00
moodlerobot 3e0b46f9dc Automatic installer.php lang files by installer_builder (20081118) 2008-11-18 01:45:24 +00:00
moodlerobot 52f18993ad Updated the 18 build version to 20081117 2008-11-17 02:11:36 +00:00
stronk7 c5d843ede8 MDL-17227 forum: seekey-ize forum prune (split). Backported from HEAD 2008-11-16 22:47:54 +00:00
moodlerobot e51a39cf34 Updated the 18 build version to 20081116 2008-11-16 01:54:53 +00:00
iarenaza 55e92195ba file resources: MDL-14541 Object tag embedding PDF's and nested Flash objects does not work reliably
Merged from MOODLE_19_STABLE.

Credit goes to David Boyer for reporting and suggesting the fix for PDF files,
and Jon Witts & Mauno Korpelainen for proving a way to reproduce the Flash
issue and tips to fix it.
2008-11-15 12:31:29 +00:00
pichetp c589f054b4 MDL-17104 better delete of unused sub questions, merge from HEAD 2008-11-15 10:17:51 +00:00
moodlerobot 79c5abb5d2 Updated the 18 build version to 20081115 2008-11-15 01:59:13 +00:00
moodlerobot 5253457317 Automatic installer.php lang files by installer_builder (20081115) 2008-11-15 01:44:34 +00:00
stronk7 871ba32077 MDL-17227 forum: add sesskey to post/discussion deletion. Backported from HEAD 2008-11-14 08:53:41 +00:00
moodlerobot 3511770629 Updated the 18 build version to 20081114 2008-11-14 02:04:42 +00:00
moodlerobot 386c21b708 Automatic installer.php lang files by installer_builder (20081114) 2008-11-14 01:51:45 +00:00
piers b9aa74c7f5 MDL-16949 - fix wrong addition of times in SCORM API, thanks Xabi Martin. backport 1.8. 2008-11-14 00:10:10 +00:00
wildgirl 537172328a profilesforenrolledusersonly setting: MDL-17143 lang string rewording 2008-11-13 11:33:27 +00:00
moodlerobot f4f0229152 Updated the 18 build version to 20081113 2008-11-13 02:00:33 +00:00
moodlerobot d01506b312 Automatic installer.php lang files by installer_builder (20081113) 2008-11-13 01:48:19 +00:00
dongsheng 8b26c8fb4e "MDL-17143, bump version to set new profilesforenrolledusersonly setting" 2008-11-12 02:24:27 +00:00
dongsheng 7e62718e7c MDL-17143
don't display the user description at all when user isn't enrolled in any courses, backported to 1.8
2008-11-12 02:21:54 +00:00
moodlerobot 61f34d4260 Updated the 18 build version to 20081112 2008-11-12 02:15:37 +00:00
moodlerobot d7743238e5 Automatic installer.php lang files by installer_builder (20081112) 2008-11-12 02:01:54 +00:00
moodlerobot 838069d4fc Updated the 18 build version to 20081111 2008-11-11 02:10:56 +00:00
moodlerobot 11a61fa8eb Automatic installer.php lang files by installer_builder (20081111) 2008-11-11 01:58:17 +00:00
moodlerobot 81e31feeeb Updated the 18 build version to 20081110 2008-11-10 01:59:02 +00:00
moodlerobot 6c68f8a4a8 Updated the 18 build version to 20081109 2008-11-09 01:59:48 +00:00
moodlerobot a59f281522 Updated the 18 build version to 20081108 2008-11-08 01:58:18 +00:00
moodler d60e730bbb auth/cas MDL-17121 Upgraded to latest version which is LGPL 2008-11-07 02:00:27 +00:00
moodlerobot f5a5d102ca Updated the 18 build version to 20081107 2008-11-07 01:58:15 +00:00
moodlerobot 32b8a389a1 Updated the 18 build version to 20081106 2008-11-06 02:23:46 +00:00
danmarsden cc09c0d071 MDL-17071 fix misleading text - it's removing enrolments not assignments - merged from HEAD 2008-11-05 07:15:36 +00:00
moodlerobot 797f4e9f89 Updated the 18 build version to 20081105 2008-11-05 02:23:53 +00:00
jerome e06c28f04a MDL-10021: display iframe when the resource is on another domain, merged from 19 2008-11-04 05:15:55 +00:00
jerome 5a3288003e MDL-10021: fix xhtml/javascript 2008-11-04 02:23:27 +00:00
moodlerobot 1f3d624490 Updated the 18 build version to 20081104 2008-11-04 02:11:17 +00:00
moodlerobot 1e01c44eea Automatic installer.php lang files by installer_builder (20081104) 2008-11-04 01:56:14 +00:00
skodak 897065d9dd MDL-17110 snoopy: imported new version 1.2.4; backported from HEAD 2008-11-03 07:57:27 +00:00
moodlerobot 562c7feb2d Updated the 18 build version to 20081103 2008-11-03 01:53:53 +00:00
moodlerobot ce1648f481 Updated the 18 build version to 20081102 2008-11-02 01:49:51 +00:00
moodlerobot dd513e0b70 Automatic installer.php lang files by installer_builder (20081102) 2008-11-02 01:38:25 +00:00
skodak 913d8d935c MDL-17027: protect user profile images if $CFG->forcelogin enabled; merged from MOODLE_19_STABLE 2008-11-01 22:49:23 +00:00
skodak 43f0cd8eae MDL-17065 user: profile images of deleted users are not accessible anymore; merged from MOODLE_19_STABLE 2008-11-01 22:47:53 +00:00
moodlerobot a6475bc27e Updated the 18 build version to 20081101 2008-11-01 01:48:02 +00:00
piers 516ca02e7e MDL-7068 - SCORM 2004 compliance - fix mod/scorm to handle core data elements correctly - now passes test DMI. backport 1.8. 2008-10-31 23:05:46 +00:00
jerome 58208f5511 MDL-10021: change frame into object tag when display a Link Resource with navigation bar, merged from 19 2008-10-31 06:00:35 +00:00
moodlerobot f95efc39a5 Updated the 18 build version to 20081031 2008-10-31 02:13:20 +00:00
danmarsden a82fa6146a MDL-17050 excorising $_POST - thanks to mikec for patch merged from HEAD 2008-10-31 00:57:34 +00:00
gbateson 062b672983 MDL-16300: small fix to handle case when no users with hotpot attempts are found 2008-10-30 07:22:26 +00:00
gbateson 87ca8583aa MDL-16300: use cache to minimize use of get_users_by_capability() 2008-10-30 07:13:11 +00:00
gbateson a4b1ac3b0d use "md5key" as secondary key on hotpot_strings table; allow for non-unique secondary keys on hotpot tables (can happen on hotpot_strings) 2008-10-30 06:22:30 +00:00
peterbulmer 735f76f0f4 MDL-15942 catch one more instance of mnet update needing secure commit
Author: Peter Bulmer <peter.bulmer@catalyst.net.nz>
2008-10-30 04:10:16 +00:00
peterbulmer cd6eda7ea8 MDL-17038 bugfixes
Author: Peter Bulmer <peter.bulmer@catalyst.net.nz>
2008-10-30 04:09:04 +00:00
peterbulmer 48fd1cf621 MDL-17038 - truncate overlength varchar fields before attempting to insert
Signed-off-by: Peter Bulmer <peter.bulmer@catalyst.net.nz>


Author: Peter Bulmer <peter.bulmer@catalyst.net.nz>
2008-10-30 04:08:24 +00:00
peterbulmer c5caa7199d MDL-17038 formatting correction
Author: Peter Bulmer <peter.bulmer@catalyst.net.nz>
2008-10-30 04:07:38 +00:00
peterbulmer 8f3f4373dd MDL-17038 Change to use sensible variable names
Author: Peter Bulmer <peter.bulmer@catalyst.net.nz>
2008-10-30 04:07:14 +00:00
peterbulmer edf57f60fc MDL-17038 - refine query to limit size of returned data.
Author: Peter Bulmer <peter.bulmer@catalyst.net.nz>
2008-10-30 04:06:46 +00:00
moodlerobot 8f1f4924b1 Updated the 18 build version to 20081030 2008-10-30 01:56:31 +00:00
piers 054ff00c61 MDL-17052 - remove use of $_POST. backport to 1.8. 2008-10-29 16:16:51 +00:00
moodlerobot 6e5cdb10d4 Updated the 18 build version to 20081029 2008-10-29 01:54:22 +00:00
moodlerobot 80c6222023 Updated the 18 build version to 20081028 2008-10-28 01:56:19 +00:00
moodlerobot 65c1d6dde0 Updated the 18 build version to 20081027 2008-10-27 01:49:22 +00:00
moodlerobot 92aad49de4 Automatic installer.php lang files by installer_builder (20081027) 2008-10-27 01:36:15 +00:00
moodlerobot bd524b5471 Updated the 18 build version to 20081026 2008-10-26 01:45:30 +00:00
moodlerobot a1a7801540 Updated the 18 build version to 20081025 2008-10-25 01:54:38 +00:00
tjhunt c72e019be4 moodlelib iprange checks: MDL-16986 If the user makes a mistake and types something like 172.16.1.143/148, with something greater than 32 after the slash, treat it as /32. 2008-10-24 02:53:40 +00:00
moodlerobot 74c810d36c Updated the 18 build version to 20081024 2008-10-24 01:59:44 +00:00
moodlerobot da52163058 Updated the 18 build version to 20081023 2008-10-23 02:08:13 +00:00
fmarier e92cdcdbd9 moodlelib/welcome message: MDL-16947 use the userid that was passed in for the profile URL 2008-10-22 02:40:14 +00:00
moodlerobot a0e7eaaa11 Updated the 18 build version to 20081022 2008-10-22 02:01:09 +00:00
stronk7 8435575b16 Bumped to 1.8.7+ (before weekly build) 2008-10-21 23:06:20 +00:00
moodlerobot 73caeda7a2 Updated the 18 build version to 20081021 2008-10-21 01:54:52 +00:00
moodlerobot aad356e1ab Updated the 18 build version to 20081020 2008-10-19 22:32:49 +00:00
skodak 4999b4216e MDL-16925 mod/forum - fixed blank page after posting - credit goes to Martin 2008-10-19 08:38:24 +00:00
moodlerobot 4485ad9fe3 Updated the 18 build version to 20081019 2008-10-19 01:49:23 +00:00
moodlerobot f62ff28387 Automatic installer.php lang files by installer_builder (20081019) 2008-10-19 01:37:07 +00:00
stronk7 272a1af077 Adding correct Office 2007 mime types. MDL-15987 ; backported from HEAD 2008-10-17 18:07:57 +00:00
moodlerobot 6d3cdc95c3 Updated the 18 build version to 20081018 2008-10-17 17:00:40 +00:00
moodlerobot 2064c7c223 Updated the 18 build version to 20081017 2008-10-17 01:57:57 +00:00
skodak d893d6ebf0 MDL-16903 mod/forum: undefined course context when forum subscription not allowed; merged from MOODLE_19_STABLE 2008-10-16 20:46:12 +00:00
nicolasconnault 5ef153b5b4 MDL-8074 Language strings for 1.8 2008-10-16 14:31:15 +00:00
nicolasconnault 19486aae82 MDL-16898 Extending include_path 2008-10-16 11:17:04 +00:00
moodlerobot 782acecf7d Updated the 18 build version to 20081016 2008-10-16 02:05:31 +00:00
moodler 498b0ade38 Bump for 1.8.7 release 2008-10-15 07:30:25 +00:00
moodlerobot 6885225a8e Updated the 18 build version to 20081015 2008-10-15 02:07:27 +00:00
piers 1846d0a2c2 MDL-16810 - fix typo on function name. thanks to Jason Hardin. Backport to 1.8. 2008-10-14 04:43:25 +00:00
moodlerobot f9c6edc8da Updated the 18 build version to 20081014 2008-10-14 02:06:58 +00:00
skodak d19db94df3 MDL-16839 forms: workaround for problematic hard frozen values; merged from MOODLE_19_STABLE 2008-10-13 19:40:47 +00:00
nicolasconnault 9330f3e1fa MDL-16780 Fixing require_once problem 2008-10-13 12:23:56 +00:00
nicolasconnault 8a30c5bec2 MDL-16780 Adding missing file 2008-10-13 12:09:44 +00:00
jamiesensei e073353ff2 MDL-16842 "Adding group of elements in function lib/formslib.php/repeat_elements() not working correctly" Fixed using fullclone instead of clone now. Merged from 1.9 stable. 2008-10-13 11:53:37 +00:00
moodlerobot b7e6e7a119 Updated the 18 build version to 20081013 2008-10-13 02:02:37 +00:00
moodlerobot 13733eb075 Automatic installer.php lang files by installer_builder (20081013) 2008-10-13 01:43:46 +00:00
moodlerobot 99b8fb5541 Updated the 18 build version to 20081012 2008-10-12 01:54:27 +00:00
moodlerobot 6ac660f4ac Updated the 18 build version to 20081011 2008-10-11 01:59:17 +00:00
moodlerobot 63dcec6662 Updated the 18 build version to 20081010 2008-10-10 02:04:39 +00:00
poltawski efdcc40927 MDL-16434 fix typo in class name "generalbox"
thanks to Joseph Rézeau
2008-10-09 10:56:05 +00:00
moodlerobot 8a6afdde27 Updated the 18 build version to 20081009 2008-10-09 02:01:46 +00:00
moodlerobot 0fece2d628 Automatic installer.php lang files by installer_builder (20081009) 2008-10-09 01:46:06 +00:00
moodlerobot e0734f6277 Updated the 18 build version to 20081008 2008-10-08 02:07:35 +00:00
scyrma 2e3a3337b1 Forum/MDL-14558: Prevent users from subscribing or getting subscribed to forums where subscriptions are not allowed. 2008-10-07 08:11:46 +00:00
scyrma ebf0aeec86 Lesson/MDL-13311: make it possible to have a short answer question using 0 as answer. (backport) 2008-10-07 05:18:08 +00:00
moodlerobot e875530645 Updated the 18 build version to 20081007 2008-10-07 01:52:40 +00:00
moodlerobot b475fec548 Updated the 18 build version to 20081006 2008-10-06 01:50:03 +00:00
moodlerobot 7eb7ca6786 Updated the 18 build version to 20081005 2008-10-05 01:47:12 +00:00
moodlerobot ef62ec7c66 Automatic installer.php lang files by installer_builder (20081005) 2008-10-05 01:34:46 +00:00
moodlerobot 06b9f960de Updated the 18 build version to 20081004 2008-10-04 01:49:12 +00:00
nicolasconnault 1992b70a32 MDL-16780 Backport from MOODLE_19_STABLE 2008-10-03 07:27:37 +00:00
nicolasconnault 7eb43d9d01 file XML.php was added on branch MOODLE_18_STABLE on 2008-10-03 07:27:39 +0000 2008-10-03 07:13:17 +00:00
nicolasconnault f8b6fda2a7 file Urlencoded.php was added on branch MOODLE_18_STABLE on 2008-10-03 07:27:39 +0000 2008-10-03 07:13:17 +00:00
nicolasconnault 5bb3fdc73d file PHP.php was added on branch MOODLE_18_STABLE on 2008-10-03 07:27:39 +0000 2008-10-03 07:13:17 +00:00
nicolasconnault 93a4a32e2e file Null.php was added on branch MOODLE_18_STABLE on 2008-10-03 07:27:39 +0000 2008-10-03 07:13:17 +00:00
nicolasconnault 7a38e689f2 file Error.php was added on branch MOODLE_18_STABLE on 2008-10-03 07:27:40 +0000 2008-10-03 07:13:17 +00:00
nicolasconnault 5ba0a8b71e file Server.php was added on branch MOODLE_18_STABLE on 2008-10-03 07:27:38 +0000 2008-10-03 07:13:16 +00:00
nicolasconnault 1e3f87b91e file Response.php was added on branch MOODLE_18_STABLE on 2008-10-03 07:27:38 +0000 2008-10-03 07:13:16 +00:00
nicolasconnault b17cc53447 file JSON.php was added on branch MOODLE_18_STABLE on 2008-10-03 07:27:39 +0000 2008-10-03 07:13:16 +00:00
nicolasconnault cf7f20fc54 file JSON.php was added on branch MOODLE_18_STABLE on 2008-10-03 07:27:38 +0000 2008-10-03 07:13:16 +00:00
nicolasconnault 365b745202 file Helper.php was added on branch MOODLE_18_STABLE on 2008-10-03 07:27:37 +0000 2008-10-03 07:13:16 +00:00
nicolasconnault db8d52b560 file Debug.php was added on branch MOODLE_18_STABLE on 2008-10-03 07:27:38 +0000 2008-10-03 07:13:16 +00:00
nicolasconnault 602572d131 file Action.php was added on branch MOODLE_18_STABLE on 2008-10-03 07:27:38 +0000 2008-10-03 07:13:16 +00:00
moodlerobot 71186e4168 Updated the 18 build version to 20081003 2008-10-03 01:49:10 +00:00
nicolasconnault 627e2cb6f5 MDL-16768 Added php version-dependent function definitions so that we can use json_encode() and json_decode() no matter what PHP version the server is running. 2008-10-02 07:54:17 +00:00
moodlerobot 0b75065449 Updated the 18 build version to 20081002 2008-10-02 01:58:05 +00:00
moodlerobot 63bcf21fbf Updated the 18 build version to 20081001 2008-10-01 01:58:39 +00:00
moodlerobot fc5e568fbf Updated the 18 build version to 20080930 2008-09-30 01:49:32 +00:00
stronk7 5194a4f938 Fix link to wiki in breadcrumb. Credit goes to Clif Kussmaul. MDL-16331 2008-09-29 22:35:19 +00:00
stronk7 82e0a886c2 Improve DOM detection (due to conficts with old DOM-XML). MDL-15637 ; backported from 19_STABLE 2008-09-29 17:11:21 +00:00
moodlerobot e57069e318 Updated the 18 build version to 20080929 2008-09-29 01:47:39 +00:00
tjhunt c26c206276 MDL-16720 The edit icon in the quiz preview screen pops up the edit form in a window that is too small 2008-09-28 08:59:43 +00:00
moodlerobot 8a16c85e8c Updated the 18 build version to 20080928 2008-09-28 01:51:05 +00:00
moodlerobot bdb0e3e233 Automatic installer.php lang files by installer_builder (20080928) 2008-09-28 01:38:33 +00:00
stronk7 97f4bb9fde Backporting MDL-16715 to 18_STABLE (new transid codes). Credit goes to Ethem Elvice. 2008-09-27 17:35:39 +00:00
moodlerobot 02d0084a51 Updated the 18 build version to 20080927 2008-09-27 01:51:03 +00:00
stronk7 5af25dd922 Cleaning wiki recent activity URLs. MDL-15896 ; backported from 19_STABLE 2008-09-26 09:38:32 +00:00
moodlerobot 665ba7679d Updated the 18 build version to 20080926 2008-09-26 02:01:58 +00:00
piers 0b32c364a1 MDL-7068 - SCORM 2004 compliance. Handle cmi.interactions hydration (scorm 1.2 to as well). Backport to 1.8 - rerun compliance test. 2008-09-26 00:37:10 +00:00
stronk7 e041c56184 Protect message settings with sesskey. MDL-16688 ; backported from 19_STABLE 2008-09-25 22:36:18 +00:00
peterbulmer dbc804de90 MDL-16560 - correct bogus function call
Author: Peter Bulmer <peter.bulmer@catalyst.net.nz>
2008-09-25 10:01:54 +00:00
moodlerobot 07715b2c5e Updated the 18 build version to 20080925 2008-09-25 01:51:50 +00:00
moodlerobot 04a3e8b1f0 Automatic installer.php lang files by installer_builder (20080925) 2008-09-25 01:39:40 +00:00
danmarsden ab9cba84ae MDL-16599 - tidy up error message to be make more sense to the user. merged from HEAD 2008-09-24 07:04:10 +00:00
moodlerobot f374ad64d1 Updated the 18 build version to 20080924 2008-09-24 01:56:04 +00:00
moodlerobot 435c0a785b Automatic installer.php lang files by installer_builder (20080924) 2008-09-24 01:42:43 +00:00
moodlerobot e5c825ab8a Updated the 18 build version to 20080923 2008-09-23 01:53:47 +00:00
moodlerobot c4c28a7468 Updated the 18 build version to 20080922 2008-09-22 01:43:53 +00:00
moodlerobot abf7d22073 Automatic installer.php lang files by installer_builder (20080922) 2008-09-22 01:31:45 +00:00
pichetp 48f1234896 Merge from 1.9 as HEAD is different
MDL-16427 implement the '*' convention as for other questiontypes
MDL-15358 negative data and MDL-16427 handling 0
MDL-15233 tolerance
2008-09-21 03:15:40 +00:00
moodlerobot defb0f64f0 Updated the 18 build version to 20080921 2008-09-21 01:45:05 +00:00
moodlerobot f2f07143e3 Automatic installer.php lang files by installer_builder (20080921) 2008-09-21 01:33:39 +00:00
pichetp 0759221a5e MDL-15233 merge from 1.9 2008-09-20 14:55:38 +00:00
pichetp 3744e9ef24 Merge from 1.9 as HEAD is different
MDL-16427 implement the '*' convention as for other questiontypes
MDL-15358 negative data and MDL-16427 handling 0
2008-09-20 14:42:19 +00:00
pichetp 0455e362ae MDL-15358 negative data between () and MDL-14979 - Remove the obsolete quizfile.php
merge from 1.9 as this file is no more in HEAD
2008-09-20 14:30:05 +00:00
moodlerobot c5f0168382 Updated the 18 build version to 20080920 2008-09-20 01:50:23 +00:00
nicolasconnault cc980ff6e5 MDL-16556 Applied Mark Nielsen's patch 2008-09-19 05:42:47 +00:00
moodlerobot 65dc989055 Updated the 18 build version to 20080919 2008-09-19 01:49:53 +00:00
pichetp 38d739257d MDL-16427 changing $answer=='*' to $answer ==='*' 2008-09-18 14:48:11 +00:00
moodlerobot 2c16f768ed Updated the 18 build version to 20080918 2008-09-18 02:02:50 +00:00
piers 254dfd1f0f MDL-7097 - API debug. Add ability to manually poke the SCORM API for 1.2 and 2004. backport 1.8. 2008-09-17 02:13:32 +00:00
moodlerobot d944e872b7 Updated the 18 build version to 20080917 2008-09-17 01:53:47 +00:00
moodler 1e1e2438c6 MDL-12563 Fixed RSS dates so that they are always GMT 2008-09-16 08:58:17 +00:00
moodlerobot 32579e3d1c Updated the 18 build version to 20080916 2008-09-16 02:03:38 +00:00
stronk7 ed16449ba6 Re-introducing colons in page names + cleaning tabs output. MDL-15896 ; backported from HEAD 2008-09-15 16:25:03 +00:00
moodlerobot 0c6b31f211 Updated the 18 build version to 20080915 2008-09-15 01:56:25 +00:00
moodlerobot 867ab98575 Updated the 18 build version to 20080914 2008-09-14 01:50:27 +00:00
moodlerobot b4de8efe5d Updated the 18 build version to 20080913 2008-09-13 01:48:33 +00:00
mudrd8mz ea9700180d Pre-select default country in signup form. Backported from HEAD 2008-09-12 15:39:43 +00:00
moodlerobot 8e07f16724 Updated the 18 build version to 20080912 2008-09-12 02:03:20 +00:00
moodlerobot aa54c77cf7 Updated the 18 build version to 20080911 2008-09-11 02:09:05 +00:00
moodlerobot 02875a7622 Updated the 18 build version to 20080910 2008-09-10 02:01:34 +00:00
moodlerobot c6c934b578 Updated the 18 build version to 20080909 2008-09-09 01:57:56 +00:00
piers f0e870d0cf MDL-11734 - cmi.comments_from_learner not read - write. revamp the handling of array style elements. Backport to 1.8. 2008-09-08 20:08:17 +00:00
stronk7 c54c59e7d8 Added missing join condition. Credit goes to Colin Chambers. MDL-16385 ; backported from HEAD 2008-09-08 14:29:01 +00:00
moodlerobot 32af0dbef2 Updated the 18 build version to 20080908 2008-09-08 01:53:00 +00:00
piers 3da1e9c5f4 MDL-16299 - Javascript error during scorm player load. SCOID should not be populated - TOC figures this out. Backport to 1.8. 2008-09-08 00:35:54 +00:00
peterbulmer 206c91a1c4 MDL-14488 - start sql query with unique field - credit David Monllaó 2008-09-07 06:06:40 +00:00
peterbulmer 44bba1e66c MDL-16301 - address issue. 2008-09-07 05:26:25 +00:00
moodlerobot 62d6eb1f83 Updated the 18 build version to 20080907 2008-09-07 01:50:28 +00:00
moodlerobot c1dfbdaea4 Updated the 18 build version to 20080906 2008-09-06 01:46:25 +00:00
moodlerobot f38b8c88bf Updated the 18 build version to 20080905 2008-09-05 01:57:20 +00:00
moodlerobot 6e8e2bb04c Updated the 18 build version to 20080904 2008-09-04 01:50:15 +00:00
moodlerobot 988e9b0f64 Updated the 18 build version to 20080903 2008-09-03 01:53:34 +00:00
piers 7d80c9a0fe MDL-16299 - Javascript error during scorm player load. Ensure SCOID is always populated. Backport 1.8. 2008-09-03 00:43:02 +00:00
moodlerobot 619c19d863 Updated the 18 build version to 20080902 2008-09-02 01:53:33 +00:00
moodlerobot 13eef19b99 Automatic installer.php lang files by installer_builder (20080902) 2008-09-02 01:38:00 +00:00
tjhunt 50a8e2b90c MDL-15655 - address_in_subnet does not work on 64 bit architectures. Also, we found some other issues with this funtion while diagnosing the problem. 2008-09-01 04:18:03 +00:00
moodlerobot ddf17a0c4e Updated the 18 build version to 20080901 2008-09-01 01:48:22 +00:00
skodak d84da076cc MDL-15580 fixed several problems in 18 groups upgrade - removing duplicates in groups_members and fixing handling of $result; this does not fix already upgraded sites, sorry 2008-08-31 19:59:57 +00:00
moodlerobot c8b5ebc8e3 Updated the 18 build version to 20080831 2008-08-31 01:46:05 +00:00
moodlerobot d749b452d3 Updated the 18 build version to 20080830 2008-08-30 01:53:24 +00:00
peterbulmer ef1720eb6f MDL-16264 Make mnet courses affect course_list block
If a user has mnet courses, these should affect block display in the same way as local courses do.
2008-08-29 04:28:40 +00:00
piers b95a25b7a8 MDL-14492 - Provide feedback to user about redirect delay in loadsco.php. Add sanity checking for scorm_resize() as it tries to set -ve heights if user specifies a small area. Thanks francois. backport 1.8. 2008-08-29 04:14:34 +00:00
moodlerobot ec53ceed49 Updated the 18 build version to 20080829 2008-08-29 01:51:03 +00:00
moodlerobot c157c72d4c Automatic installer.php lang files by installer_builder (20080829) 2008-08-29 01:38:34 +00:00
tjhunt 3835cc29f3 MDL-16243 Implement a health-centre check that the question categories are arranged properly in tree structures. 2008-08-28 05:06:26 +00:00
moodlerobot aa44e74ce3 Updated the 18 build version to 20080828 2008-08-28 01:56:32 +00:00
tjhunt 9300321849 MDL-8475 - Better handling of blank answer - further changes to make it even more robust. Also, make the same changes to the shortanswer question type that were already made to the numerical question type. 2008-08-28 01:46:26 +00:00
moodlerobot 64511f27aa Automatic installer.php lang files by installer_builder (20080828) 2008-08-28 01:41:30 +00:00
piers 522e4ab8c3 MDL-4746 - Course 01 of the ADL SCORM 1.2 test suite fails on point 4. only set browsed status if the SCO hasn't set a status. Backport 1.8. 2008-08-27 23:30:05 +00:00
danmarsden 0ad6f487be MDL-16137 - clear scorm directory if it already exists 2008-08-27 22:36:00 +00:00
danmarsden 255b8281b6 MDL-10767 - set values of checkboxes correctly merged from HEAD 2008-08-27 22:15:06 +00:00
jerome d5e89c7964 MDL-16043: manage case when administrator set enrol_remotecoursefield or enrol_remoteuserfield in UPPERCASE, merged from 19 2008-08-27 07:06:57 +00:00
piers 906faa5a1f MDL-4746 - Course 01 of the ADL SCORM 1.2 test suite fails on point 4. gramatical error - thanks Dan. Backport 1.8. 2008-08-27 04:08:55 +00:00
peterbulmer f038db5c7c MDL-15942 - separate data escaped for db insertion from unescaped data 2008-08-27 03:39:21 +00:00
piers fff59beb90 MDL-4746 - Course 01 of the ADL SCORM 1.2 test suite fails on point 4. Fix cmi.comments, and mastery_score checking. Backport to 1.8. 2008-08-27 02:53:27 +00:00
moodlerobot 6e5dfc1b4b Updated the 18 build version to 20080827 2008-08-27 01:50:21 +00:00
piers d448df5a1c MDL-16111 - SCORM grade not updated in Grader Report. Reverse out 1.8 only portion of patch as it break SCORM compliance - regression testing. 2008-08-26 23:32:11 +00:00
moodlerobot 4bfc6cbdfd Updated the 18 build version to 20080826 2008-08-26 01:56:16 +00:00
iarenaza c99f31c86b MDL-16061 Revert incorrect fix for "Remove 'username' from the $moodleattributes array"
The fix is wrong, as it breaks auth_db_sync_users.php and
auth_ldap_sync_users.php at least. No new users are added to Moodle, as the
username is missing from the new user info record.

The fix needs to go into update_user_record() in lib/moodlelib.php to make it
skip the 'username' key, as we really need get_userinfo() to return the
username as part of the user info array.
2008-08-25 22:35:26 +00:00
moodlerobot 89eedbe1cb Updated the 18 build version to 20080825 2008-08-25 01:44:17 +00:00
moodlerobot 60c540f5a6 Automatic installer.php lang files by installer_builder (20080825) 2008-08-25 01:31:52 +00:00
piers 345a24669b MDL-15881 - Probable bug: Not able to update SCORM. Backport 1.8. 2008-08-24 23:04:43 +00:00
piers 87806bd4bc MDL-16111 - SCORM grade not updated in Grader Report. Include grading by learning objects if status is complete. Backport to 1.8. 2008-08-24 21:26:02 +00:00
iarenaza 0d47dafb08 MDL-15799 LDAP - user data mapping doesn't work.
The Right Way(tm) to write a LDAP filter is enclosing it in parentheses (see
RFC 4515/2254).
2008-08-24 20:37:41 +00:00
stronk7 105eb2d512 Prevent some notices at install. MDL-16188 2008-08-24 16:30:01 +00:00
moodlerobot bd68242fb0 Updated the 18 build version to 20080824 2008-08-24 01:44:34 +00:00
moodlerobot bf4dde1e29 Automatic installer.php lang files by installer_builder (20080824) 2008-08-24 01:29:51 +00:00
moodlerobot 2340efe201 Updated the 18 build version to 20080823 2008-08-23 01:43:48 +00:00
moodlerobot aa87f6cb14 Automatic installer.php lang files by installer_builder (20080823) 2008-08-23 01:31:27 +00:00
piers 571709c448 MDL-16111 - SCORM grade not updated in Grader Report. Make sure that lastattempt does not exceed maxattempts. Backport 1.8. 2008-08-22 03:23:13 +00:00
moodlerobot bec23ebe9c Updated the 18 build version to 20080822 2008-08-22 01:49:49 +00:00
piers e88e09a1f1 MDL-13431 - SCORM results not transferring to Gradebook. SCORM API debugging tool - add reference to SCORM, and SCO identifier. backport 1.8. 2008-08-22 01:41:48 +00:00
moodlerobot 12d3294e0a Automatic installer.php lang files by installer_builder (20080822) 2008-08-22 01:36:17 +00:00
mudrd8mz 4ec9d6b07d MDL-14326 Remove all course_modules that remained empty (i.e. with instance==0) after the particular restore process. Backported from MOODLE_19_STABLE 2008-08-21 12:20:49 +00:00
piers dc5f29bf8c MDL-13431 - SCORM results not transferring to Gradebook. SCORM API debugging tool. Backport to 1.8. remove add_to_log. 2008-08-21 08:31:28 +00:00
moodlerobot 0088d8ce7e Updated the 18 build version to 20080821 2008-08-21 01:50:49 +00:00
moodlerobot a90d5b6082 Automatic installer.php lang files by installer_builder (20080821) 2008-08-21 01:36:47 +00:00
piers c9af47a031 MDL-13431 - SCORM results not transferring to Gradebook. SCORM API debugging tool. Backport to 1.8 + XHTML problems that stop the debug from working. 2008-08-21 01:32:10 +00:00
piers f7a197e8fa file debug.js.php was added on branch MOODLE_18_STABLE on 2008-08-21 01:32:11 +0000 2008-08-21 00:36:12 +00:00
piers 623e2d59d1 MDL-13431 - SCORM results not transferring to Gradebook. Add logging mechanism so that launched URI can be traced. Backport 1.8. 2008-08-20 23:33:07 +00:00
piers e0260731dc MDL-15859 [PATCH] Fixes for tests of '' on Oracle. Backport 1.8. 2008-08-20 23:15:21 +00:00
piers 1282d92329 MDL-13431 - SCORM results not transferring to Gradebook. Add logging mechanism so that SCORM API interaction with Moodle can be traced. Backport 1.8. 2008-08-20 22:39:34 +00:00
piers 1fdfed864f MDL-13431 - SCORM results not transferring to Gradebook. Use the correct method for getting the course object. Backport 1.8. 2008-08-20 22:34:34 +00:00
danmarsden 4bf780bf99 MDL-14620 - need to check vars are set before using. - adding check so I can include this form type in SCORM - merged from HEAD 2008-08-20 22:01:06 +00:00
tjhunt 240363ac49 MDL-15654 Incorrect escaping of HTML in the history table on the review quiz attempt page. 2008-08-20 09:46:10 +00:00
tjhunt c68631a272 MDL-15605 Convert question bank consistency checks described in MoodleDocs (http://docs.moodle.org/en/Development:Question_bank_consistency_check) to health centre checks. 2008-08-20 08:53:00 +00:00
tjhunt e5b7520dce MDL-16141 Need an sql_position function to do POSITION(needle IN haystack) on crappy databases. Backported from HEAD. 2008-08-20 08:51:19 +00:00
danmarsden 4b51c3fb2f MDL-16113 add warning to Scorm modedit page if slasharg is disabled. merged from HEAD 2008-08-20 02:30:11 +00:00
moodlerobot d8bfab810c Updated the 18 build version to 20080820 2008-08-20 01:54:15 +00:00
tjhunt 242f42a49f SCORM module XHTML strict fixes. 2008-08-19 06:59:29 +00:00
moodlerobot f2d7523e1d Updated the 18 build version to 20080819 2008-08-19 01:48:57 +00:00
moodlerobot a1b6cb7da4 Automatic installer.php lang files by installer_builder (20080819) 2008-08-19 01:35:06 +00:00
skodak 1f56978e1a MDL-16108 force autocomplete off for unmaskable password fields 2008-08-18 20:20:05 +00:00
moodlerobot 8c4f5bc33f Updated the 18 build version to 20080818 2008-08-18 01:43:42 +00:00
moodlerobot 1f72738c04 Automatic installer.php lang files by installer_builder (20080818) 2008-08-18 01:30:42 +00:00
moodlerobot c6d9053948 Updated the 18 build version to 20080817 2008-08-17 01:40:36 +00:00
moodlerobot 274a1cc850 Automatic installer.php lang files by installer_builder (20080817) 2008-08-17 01:27:04 +00:00
moodlerobot 9165153bd3 Updated the 18 build version to 20080816 2008-08-16 01:49:31 +00:00
pichetp a478b383cd better filtering of null answers MDL-8475 merged from HEAD 2008-08-15 11:26:58 +00:00
iarenaza 4e4955b55e Remove 'username' from the $moodleattributes array.
It doesn't make sense at all (username is not part of the externally mapped
fields) and produces a notice that breaks HTTP headers with debugging enabled.
2008-08-15 11:15:45 +00:00
tjhunt fb7e6a9a0d MDL-16056 - Aiken format should treat input as plain text, and so escape HTML special characters. 2008-08-15 03:13:57 +00:00
moodlerobot 62f0cff4ce Updated the 18 build version to 20080815 2008-08-15 01:46:39 +00:00
piers 4c9c6f0ddb MDL-13904 Scorm structure isn't respected after an update of the package. Incorrectly named table in a delete. backport 1.8. 2008-08-15 01:10:16 +00:00
piers 4bea11eae5 MDL-16055 PHP warning when creating new scorm activity. backport 1.8. 2008-08-15 00:21:40 +00:00
peterbulmer 740972a826 MDL-16021 dont force mnethost restriction forloading user data based on id 2008-08-14 23:48:20 +00:00
pichetp a53b72f516 better validation of null answers MDL-8475 merged from HEAD 2008-08-14 11:54:53 +00:00
jerome 224ac0b90f MDL-16043: ensures cross-db: add lowercase conversion for every database fieldname, merged from 19 2008-08-14 11:34:00 +00:00
jerome f6fd87d97b MDL-15175: ensures cross-db: add a lowercase conversion for the username, merged from 19 2008-08-14 09:53:19 +00:00
tjhunt 7fa260c83c Oops! RISK_DATALOSS did not exist before 1.9. 2008-08-14 02:09:14 +00:00
moodlerobot 877f1e2485 Updated the 18 build version to 20080814 2008-08-14 01:52:00 +00:00
peterbulmer a17912002b MDL-15933 Require jump destination MNET peer to be non-deleted.
Also require landing source MNET peer to be non-deleted.
2008-08-13 23:34:11 +00:00
piers a9aaede659 MDL-13904 Scorm structure isn't respected after an update of the package. This is a large change to the handling of SCORM package update - all SCOes are issued with a new id, and all references to the old ones are deleted. The scorm_scoes_track data is preserved by being reattached to the new SCO ids (unless they have been deleted). backport to 1.8. 2008-08-13 23:20:35 +00:00
piers d2436bf26b MDL-11188 SCORM module does not respect "prerequisites" like it used to. MDL-12342 & signs in CDATA sections are imported as &amp;. This is a rewrite of the prerequisite handling. backport to 1.8. 2008-08-13 22:44:03 +00:00
piers 3fa20034ae MDL-14492 Provide feedback to user about redirect delay in loadsco.php. Add lang text for please wait. backport 1.8. 2008-08-13 22:32:05 +00:00
tjhunt 2e13c2864f MDL-15819 - Review the RISK_XXX flags on all quiz and question capabilites. 2008-08-13 07:06:43 +00:00
jerome 15a9e839f2 MDL-15175: fix sync with external Oracle database merged from 1.9 2008-08-13 06:35:22 +00:00
tjhunt 847bb2fd19 MDL-12797 - Site-wide quiz default time-limit was not working. The default was being used, but the enabled state was not being initialised correctly for the form field. 2008-08-13 03:18:11 +00:00
moodlerobot 6d139a20d6 Updated the 18 build version to 20080813 2008-08-13 01:49:18 +00:00
moodlerobot a262b1c15e Updated the 18 build version to 20080812 2008-08-12 01:53:10 +00:00
moodlerobot 302348cb4d Automatic installer.php lang files by installer_builder (20080812) 2008-08-12 01:40:28 +00:00
moodlerobot d183669cc1 Updated the 18 build version to 20080811 2008-08-11 01:22:32 +00:00
moodlerobot 6c1f6b016d Automatic installer.php lang files by installer_builder (20080811) 2008-08-11 01:10:16 +00:00
piers 983927938a MDL-14492 Provide feedback to user about redirect delay in loadsco.php. backport to 1.8. 2008-08-10 22:37:04 +00:00
moodlerobot 7cfae72475 Updated the 18 build version to 20080810 2008-08-10 01:40:02 +00:00
moodlerobot 5e195c8235 Updated the 18 build version to 20080809 2008-08-09 01:42:56 +00:00
moodlerobot b1fbc8be30 Automatic installer.php lang files by installer_builder (20080809) 2008-08-09 01:30:59 +00:00
moodlerobot f7fa56821d Updated the 18 build version to 20080808 2008-08-08 01:48:23 +00:00
moodlerobot 62b4a55e5c Automatic installer.php lang files by installer_builder (20080808) 2008-08-08 01:35:31 +00:00
stronk7 8fb75b1d7a Backported from HEAD: Complete inline help about smtp hosts. Credit goes to Anthony. MDL-15923 2008-08-07 22:57:56 +00:00
stronk7 c5ade93e96 Adding 'text-decoration' and 'font-family' to allowed protocols. Backported from HEAD. MDL-15963 2008-08-07 22:42:54 +00:00
danmarsden dcbdab7312 MDL-15967 - must use full php tags, not shortags - thanks Urs merged from head 2008-08-07 20:48:33 +00:00
stronk7 933b96a3a8 Fixed copy&paste error. Credit goes to Sergio Rabellino.
http://moodle.org/mod/forum/discuss.php?d=102933 ; backported from HEAD
2008-08-07 17:11:54 +00:00
moodlerobot 490e14d6cc Updated the 18 build version to 20080807 2008-08-07 01:52:23 +00:00
moodlerobot 93f1172f98 Automatic installer.php lang files by installer_builder (20080807) 2008-08-07 01:38:28 +00:00
piers e19a4892a9 MDL-10425 and MDL-12872 Firefox bugs String() handling on replace. enhanced rege xfor CMI data types. MDL-8193 Incorrect handling of quotes in SetValue processing - recoded so that it escapes all values passed from tracks. backport to 1.8. Plus - fixed a back dated problem with determining the next sco in sequence with the navigation buttons. 2008-08-06 23:56:46 +00:00
piers 5f75ca701e MDL-15950 MDL-15640 MDL-15943 - SCORM player.php not inserting footer, Showing SCORM participation report. (thanks Urs Hunkler and Mitsuhiro Yoshida). Warning are displayed in a SCORM activity (thanks Dan). Backport to 1.8. 2008-08-06 05:09:15 +00:00
moodlerobot b5655a6578 Updated the 18 build version to 20080806 2008-08-06 01:52:19 +00:00
moodlerobot 9a825e9082 Automatic installer.php lang files by installer_builder (20080806) 2008-08-06 01:37:13 +00:00
moodlerobot ecca8c346b Updated the 18 build version to 20080805 2008-08-05 01:45:33 +00:00
moodlerobot f057ecd40c Automatic installer.php lang files by installer_builder (20080805) 2008-08-05 01:32:17 +00:00
stronk7 418deec57c Make custom checks BC, so any test about future releases doesn't fail
with error it the file and/or function is missing (highly possible). MDL-15939
2008-08-05 00:19:41 +00:00
stronk7 73254d7861 Backporting environment.xml from HEAD. Should be (and work) the same. 2008-08-04 23:14:48 +00:00
moodlerobot 3f9e92b025 Updated the 18 build version to 20080804 2008-08-04 01:48:41 +00:00
piers 1f3ef341bd MDL-14457 SCORM module creating extra windows when opening module in a new window. Backport to 1.8 (thanks Jo Matthews). 2008-08-03 22:20:20 +00:00
stronk7 c607a0ea03 Allow multiple SMTP hosts or host:port to be defined in $CFG->smtphosts. MDL-15923 ; backport from HEAD 2008-08-03 21:15:35 +00:00
moodlerobot a83cdea8e3 Updated the 18 build version to 20080803 2008-08-03 01:40:20 +00:00
gbateson 6792aa17f6 MDL-15811 fix quotes: width=240" -> width="240" 2008-08-02 21:30:59 +00:00
moodlerobot 63620c1d78 Updated the 18 build version to 20080802 2008-08-02 01:43:47 +00:00
moodlerobot 218ff7fb75 Automatic installer.php lang files by installer_builder (20080802) 2008-08-02 01:31:06 +00:00
skodak 0680a761f7 MDL-15410 Require PHP 5.2.4 instead of 5.2.0 in HEAD because PHP 5.2.0 has many known problems :-( 2008-08-01 10:09:38 +00:00
piers 43d67c7d22 MDL-14902 Missing column 'whatgrade' in prefix_scorm table. Is a DB patch (thanks Hans de Zwart). backport 1.8. 2008-08-01 04:35:38 +00:00
moodlerobot 5b526573d0 Updated the 18 build version to 20080801 2008-08-01 01:45:49 +00:00
piers 8fc7b48708 MDL-15899 JavaScript error In IE7 when opening SCORM content in a new window. Fix spaces in popup name for fussy IE. backported to 1.8. 2008-07-31 22:33:33 +00:00
mchurch c03ace0bdb MDL-15896 - Clean 'page' and 'q' parameters to only allow normal page name characters. 2008-07-31 14:14:05 +00:00
moodlerobot 9c29e6bfc6 Updated the 18 build version to 20080731 2008-07-31 01:56:33 +00:00
moodlerobot 27e053a25a Updated the 18 build version to 20080730 2008-07-30 01:45:19 +00:00
moodlerobot 1d64431c90 Updated the 18 build version to 20080729 2008-07-29 01:45:51 +00:00
piers f02cc7bf03 MDL-9378 New visualisation for SCORM - modify CSS class names to make them more specific. sorry to commit so close to review day, just fixing a regression - 1.8. 2008-07-29 01:27:12 +00:00
piers 8e3391e166 MDL-11892 JavaScript error on SCORM tree list - bapckport to 1.8 for AICC. 2008-07-28 22:46:37 +00:00
moodlerobot 165d5ca1a3 Updated the 18 build version to 20080728 2008-07-28 01:44:18 +00:00
moodlerobot 743fd57f2c Automatic installer.php lang files by installer_builder (20080728) 2008-07-28 01:32:47 +00:00
piers 7527707dd5 MDL-9378 New visualisation for SCORM - back ported to 1.8. 2008-07-28 00:49:22 +00:00
piers 2eedb5babd MDL-11137 Unable to locate API error - add check for empty array from DB interface (ksort complains) - backport to 1.8. 2008-07-27 21:26:07 +00:00
danmarsden fa31cbab04 MDL-15747 typo merged from HEAD 2008-07-27 20:22:59 +00:00
moodlerobot 9ea6e88ff2 Updated the 18 build version to 20080727 2008-07-27 01:40:45 +00:00
moodlerobot a2c075aaac Updated the 18 build version to 20080726 2008-07-26 01:44:02 +00:00
skodak 7387acb1e0 MDL-15823 format_string() improvements; merged from MOODLE_19_STABLE 2008-07-25 22:45:04 +00:00
piers 8e3cb48829 MDL-11137 Unable to locate API error - remove comment code with bad characters. backport to 1.8. 2008-07-25 02:33:10 +00:00
piers 19161949aa MDL-11137 Unable to locate API error - force a sort order on the cmi elements, and ensure correct type comparison when determining whether we have seen this objective id before. affects aicc, 1.2 and 1.3. propagate to 1.8. 2008-07-25 01:58:44 +00:00
moodlerobot 5d3a303539 Updated the 18 build version to 20080725 2008-07-25 01:47:09 +00:00
piers 39a3b2af0f MDL-9077 switch from client to server side validation for reference field as client side not supported for this type (file upload name) - propogate to 1.8. 2008-07-24 01:44:29 +00:00
moodlerobot 5d23030fc8 Updated the 18 build version to 20080724 2008-07-24 01:43:03 +00:00
piers 94446a8d68 MDL-7323 AICC Import does not handle Core_Vendor + remove tabs and ambiguous else - propogated to 1.8. 2008-07-24 01:30:26 +00:00
moodlerobot a9b2d797dc Updated the 18 build version to 20080723 2008-07-23 01:43:38 +00:00
moodlerobot ed7646af01 Automatic installer.php lang files by installer_builder (20080723) 2008-07-23 01:32:04 +00:00
moodlerobot e7dc0e4f15 Updated the 18 build version to 20080722 2008-07-22 01:50:49 +00:00
moodlerobot 95151a7493 Automatic installer.php lang files by installer_builder (20080722) 2008-07-22 01:39:24 +00:00
moodlerobot f6b8d22716 Updated the 18 build version to 20080721 2008-07-21 01:38:20 +00:00
moodlerobot cc518e4615 Automatic installer.php lang files by installer_builder (20080721) 2008-07-21 01:27:00 +00:00
moodlerobot e8b3db0f95 Added autogenerated bn_utf8 installer file. 2008-07-20 21:22:27 +00:00
moodlerobot 9d3e59b7ba file installer.php was added on branch MOODLE_18_STABLE on 2008-07-20 21:22:27 +0000 2008-07-20 21:20:08 +00:00
moodlerobot 7f3981ef41 Updated the 18 build version to 20080720 2008-07-20 01:50:38 +00:00
moodlerobot 4d16e6f650 Updated the 18 build version to 20080719 2008-07-19 01:39:03 +00:00
moodlerobot 6962ab2a64 Automatic installer.php lang files by installer_builder (20080719) 2008-07-19 01:28:06 +00:00
ericmerrill 5fa8b35428 MDL-15697 Added a check form rule limiting post subject and forum name to 255 characters, as limited by the DB 2008-07-18 13:27:04 +00:00
scyrma 6c831d73d3 MDL-4346: limiting the 'defer' clause to one call / fix the missing openpopup() bug in IE. (backport from 1.9) 2008-07-18 07:18:41 +00:00
moodler bfe239f1e6 MDL-6850 Removed apparent-size from du 2008-07-18 06:40:17 +00:00
piers b2c1183316 MDL-11892 Propogate Fixes for 'calls to expand javascript' to SCORM 1.2, and 1.3 code. 2008-07-18 06:28:41 +00:00
moodler 7b518b7227 MDL-15701 Merged fix from 1.9 (Don't show deleted hosts) 2008-07-18 04:05:00 +00:00
moodlerobot 66c041bd00 Updated the 18 build version to 20080718 2008-07-18 01:40:04 +00:00
tjhunt 9db58d015f MDL-15693 - print_question_icon does not cope with missing question types 2008-07-17 12:49:28 +00:00
tjhunt 1be35acd87 MDL-15692 - Quiz attempt paging bar screws up in IE7 when you zoom the page. Normal Moodle paging bar doesn't, so I've changed the HTML the quiz generates to be closer the the output of weblib. Fortunately, this is irrelevant in 2.0. 2008-07-17 12:39:45 +00:00
moodlerobot 34e3e0b732 Updated the 18 build version to 20080717 2008-07-17 01:44:13 +00:00
moodlerobot cede8c8fa3 Updated the 18 build version to 20080716 2008-07-16 01:44:09 +00:00
tjhunt 0df32c07c7 MDL-14413 - Invalid function name - is_image_by_extentsion in QTI export 2008-07-15 09:18:35 +00:00
moodlerobot 390b1cf724 Updated the 18 build version to 20080715 2008-07-15 01:43:55 +00:00
fmarier 4d7928e235 MDL-15614 Add 3 missing PHP error codes to get_file_upload_error()
The get_file_upload_error() function was missing the following error codes:

    UPLOAD_ERR_NO_TMP_DIR => 'Missing a temporary folder.',
    UPLOAD_ERR_CANT_WRITE => 'Failed to write file to disk.',
    UPLOAD_ERR_EXTENSION => 'File upload stopped by extension.',

(see http://www.php.net/manual/en/features.file-upload.errors.php)
2008-07-14 02:35:30 +00:00
moodlerobot 32f87cd80f Updated the 18 build version to 20080714 2008-07-14 01:40:49 +00:00
mudrd8mz 1cf107ac7d MDL-15639 Wrong link (missing filename) to the in the 1.8 installer 2008-07-13 19:59:26 +00:00
gbateson c251af9516 improvements to generation of html from xml:
JCloze: set textbox size allowing for minimum gap size setting and longest answer;
JMatch: allow for duplicates and distractors in RHS items;
JQuiz: set textbox size allowing for longest answer, and use textarea if answer longer than 29 chars;
2008-07-13 12:18:42 +00:00
moodlerobot 8005dfec30 Updated the 18 build version to 20080713 2008-07-13 01:38:34 +00:00
moodlerobot c393c9a44c Updated the 18 build version to 20080712 2008-07-12 01:43:42 +00:00
moodlerobot c2697aeeb2 Updated the 18 build version to 20080711 2008-07-11 08:17:51 +00:00
skodak 0283b62467 MDL-13811 email change conf on by default; merged from MOODLE_19_STABLE 2008-07-11 07:51:12 +00:00
moodler 17a0ab80ed MDL-13811 Merged mailstop fix from 1.9 2008-07-11 07:14:44 +00:00
moodler 210a02693d Bumping post 1.8.6 2008-07-11 06:08:18 +00:00
moodler 9acd97389e Release 1.8.6 2008-07-11 05:49:41 +00:00
dongsheng dca379c260 MDL-14932, improve accessibility in group assigning and role assigning pages. 2008-07-11 04:57:52 +00:00
moodlerobot 48b58815eb Updated the 18 build version to 20080711 2008-07-11 01:42:15 +00:00
skodak c913f22058 MDL-10586 fixed coding style; merged from MOODLE_19_STABLE 2008-07-10 08:37:03 +00:00
scyrma c66edc0c29 MDL-14999 & MDL-10657: Fix for a few problems in HTMLArea. (Patch by Nicklas Lindgren) 2008-07-10 04:12:46 +00:00
scyrma 90ffb070d0 MDL-10586: Fix header to show the right display order. (Initial patch by Mitsuhiro Yoshida) 2008-07-10 03:34:50 +00:00
moodlerobot 37d795053c Updated the 18 build version to 20080710 2008-07-10 01:42:13 +00:00
skodak 33df4820bf MDL-15469 adding fclose before write to already open file; merged from MOODLE_19_STABLE 2008-07-09 10:33:50 +00:00
scyrma 73ef9f11ba MDL-15403: Patch sent by Peter Bulmer, said to have been written by Donal McMullan. Prevents a remotely-triggered mass-unenrolments of users in a
(mnet-enabled) course. (backport from 1.9)
2008-07-09 09:21:53 +00:00
moodlerobot 70e5759150 Updated the 18 build version to 20080709 2008-07-09 01:43:14 +00:00
skodak 8a942e9c79 MDL-13811 moved new setting to correct category 2008-07-08 08:20:03 +00:00
moodlerobot 5774e05b33 Updated the 18 build version to 20080708 2008-07-08 01:46:33 +00:00
moodlerobot 90aab3868b Automatic installer.php lang files by installer_builder (20080708) 2008-07-08 01:32:03 +00:00
skodak 3d70d2f8df MDL-13383 fixed restore form; merged from MOODLE_19_STABLE 2008-07-07 22:36:31 +00:00
mudrd8mz db75ffa618 MDL-11911 Do not show posts from other separated groups in Full recent activity report 2008-07-07 15:38:21 +00:00
skodak 56cab517e9 MDL-15413 warn admins if display_errors enabled; backported from HEAD 2008-07-07 14:36:06 +00:00
moodlerobot d4f421493b Updated the 18 build version to 20080707 2008-07-07 01:39:29 +00:00
skodak ad1630ae86 MDL-13901 fixed upgrade from 1.6.x -> 1.8.x which was incorrectly setting "Default role for all users" to guest 2008-07-06 23:46:25 +00:00
moodlerobot 0445685775 Updated the 18 build version to 20080706 2008-07-06 01:37:23 +00:00
skodak 7894f66662 MDL-13811 reworked unsetting of preferences and minor tweaks; backported from HEAD 2008-07-05 22:47:32 +00:00
skodak 82a3bbd629 MDL-15548 fixed regression, thanks Gary! 2008-07-05 17:24:15 +00:00
skodak 6e695a1f4e MDL-15516 prvent access to deleted profiles and other user areas; backported from HEAD 2008-07-05 14:57:22 +00:00
nicolasconnault f978083108 MDL-13811 Completed the required changes. Also added a "Cancel email change" link. 2008-07-05 14:41:55 +00:00
nicolasconnault 4c3a837f21 file emailupdate.php was added on branch MOODLE_18_STABLE on 2008-07-05 14:41:56 +0000 2008-07-05 14:28:13 +00:00
arborrow 970ea98196 MDL-14022 - verifies that maxgrade is in fact a number before adding grade_against to totalpoints 2008-07-05 02:58:32 +00:00
moodlerobot ca4fc3a908 Updated the 18 build version to 20080705 2008-07-05 01:45:16 +00:00
moodlerobot 489b2e19de Automatic installer.php lang files by installer_builder (20080705) 2008-07-05 01:32:52 +00:00
skodak c6bd449dea MDL-15544 add danger warning for email self-registration; backported from HEAD 2008-07-04 23:57:52 +00:00
arborrow f1591379e8 MDL-7571 - shuffles 'mode' before displaying, also moves some code to avoid a duplicate foreach loop 2008-07-04 22:21:51 +00:00
moodlerobot 54d264ea7c Updated the 18 build version to 20080704 2008-07-04 01:44:01 +00:00
moodlerobot f69f513d28 Automatic installer.php lang files by installer_builder (20080704) 2008-07-04 01:30:38 +00:00
skodak ec7a9479f9 MDL-15021 Deleted not fully setup separate admin settings 2008-07-03 14:07:40 +00:00
moodlerobot d35218a111 Updated the 18 build version to 20080703 2008-07-03 01:42:48 +00:00
dongsheng 394cc4a484 "MDL-12843, add proper html id, thanks ken" 2008-07-02 07:29:32 +00:00
dongsheng db15d5d552 "MDL-15424, close table tags manually before calling redirect" 2008-07-02 07:05:30 +00:00
dongsheng 0d2ee05aa1 "MDL-15501, typo, sorry" 2008-07-02 05:12:14 +00:00
dongsheng 4eb9d73cc7 "MDL-15501, add appropriate div and h2 tags to the header div" 2008-07-02 05:01:03 +00:00
dongsheng 6b52c45e95 "MDL-15469, limit email notification" 2008-07-02 04:51:28 +00:00
moodlerobot 99f7c8df47 Updated the 18 build version to 20080702 2008-07-02 01:56:24 +00:00
skodak 2192e94ef2 MDL-10633 fixed regression in last commit 2008-07-01 23:01:01 +00:00
gbateson b0e7781eb8 MDL-15184: fix sql injection vulnerability 2008-07-01 10:48:16 +00:00
moodlerobot 069dbaa91e Updated the 18 build version to 20080701 2008-07-01 01:38:47 +00:00
moodlerobot 6a971ac82a Automatic installer.php lang files by installer_builder (20080701) 2008-07-01 01:27:17 +00:00
scyrma b219363c03 MDL-15392: preventing duplicate #id in blog entries list 2008-06-30 01:52:56 +00:00
moodlerobot a148872083 Updated the 18 build version to 20080630 2008-06-30 01:42:54 +00:00
moodlerobot 0ca23ab0d6 Automatic installer.php lang files by installer_builder (20080630) 2008-06-30 01:31:43 +00:00
moodlerobot 7177a7a93d Updated the 18 build version to 20080629 2008-06-29 01:35:36 +00:00
moodlerobot 736956b1d0 Updated the 18 build version to 20080628 2008-06-28 01:38:28 +00:00
whchuang 3e26020006 Fixed typo in the help text. Changed 'the' to then and removed the extra period in bulleted list 2008-06-28 00:35:10 +00:00
scyrma 25effd9682 MDL-15392: fix output sanitization and put permalink back, in a xhtml-strict compliant way. 2008-06-27 03:54:32 +00:00
dongsheng 020ce4787f "MDL-10633, fix dobule quote in calendar" 2008-06-27 03:09:59 +00:00
moodlerobot 3580b97516 Updated the 18 build version to 20080627 2008-06-27 01:40:45 +00:00
dongsheng 6ad7a2da89 "MDL-15424, fix html tag" 2008-06-26 08:56:38 +00:00
moodlerobot 193cc59ca3 Updated the 18 build version to 20080626 2008-06-26 01:46:20 +00:00
moodlerobot 7c013eab3f Automatic installer.php lang files by installer_builder (20080626) 2008-06-26 01:34:12 +00:00
Francois Marier 0d003551eb Fix drift between CVS and git 2008-06-25 01:54:21 +00:00
moodlerobot 07c92f644f Updated the 18 build version to 20080625 2008-06-25 01:54:21 +00:00
moodlerobot a1dc1a26db Automatic installer.php lang files by installer_builder (20080625) 2008-06-25 01:30:58 +00:00
tjhunt ce6d939f26 MDL-15315 / MDL-15332 merge problem. Sorry. 2008-06-24 16:24:21 +00:00
wildgirl 493288848b lang string typo fixes 2008-06-24 13:51:03 +00:00
moodlerobot 77d587b42e Updated the 18 build version to 20080624 2008-06-24 01:42:40 +00:00
moodlerobot d186e24dff Automatic installer.php lang files by installer_builder (20080624) 2008-06-24 01:30:55 +00:00
tjhunt 139fa3dee6 MDL-15372 - Links in course summary and section summaries not recoded on restore. Petr thinks it is a bad idea to recode links in course summaries, becuase he thinks there should not be links there at all, but I disagree, and as long as links are there, and we have the code to stop them breaking on backup and restore, we should fix the bug. 2008-06-23 17:02:16 +00:00
tjhunt 3f35d9da9d MDL-13229 - Cannot export group events - now make it export group events if 'all' is selected - Oops, allow for course without groups. 2008-06-23 14:34:55 +00:00
tjhunt 61faff2eec MDL-13229 - Cannot export group events - now make it export group events if 'all' is selected - Oops, allow for course without groups. 2008-06-23 14:28:52 +00:00
dongsheng c0d5964594 "MDL-15344, new lang string add" 2008-06-23 06:07:05 +00:00
moodlerobot e72a18576f Updated the 18 build version to 20080623 2008-06-23 01:39:29 +00:00
moodlerobot b18e27ea93 Automatic installer.php lang files by installer_builder (20080623) 2008-06-23 01:28:21 +00:00
moodlerobot ee8dd77019 Updated the 18 build version to 20080622 2008-06-22 01:40:22 +00:00
moodlerobot 350d29e7d8 Updated the 18 build version to 20080621 2008-06-21 01:41:44 +00:00
moodlerobot e8206e91b4 Automatic installer.php lang files by installer_builder (20080621) 2008-06-21 01:30:40 +00:00
gbateson 986f2bc884 replace get_jmatch_items by set_jmatch_items 2008-06-20 22:27:40 +00:00
tjhunt 1170f42f3a MDL-15315 - Error in Item analysis report for short aswer questions that use wildcards 2008-06-20 17:22:57 +00:00
tjhunt 2054096041 MDL-15332 - Item analysis links to the question edit form even for users without an appropriate capability. 2008-06-20 16:30:35 +00:00
moodlerobot 4a04703937 Updated the 18 build version to 20080620 2008-06-20 01:47:56 +00:00
tjhunt f733a88518 MDL-13229 - Cannot export group events - now make it export group events if 'all' is selected. 2008-06-19 17:57:58 +00:00
tjhunt 9f18286f31 MDL-15318 - url is a reserved word in JavaScript in IE, so the Gen Calendar URL button does not work there 2008-06-19 14:24:10 +00:00
gbateson d23e60ad43 removed get_jmatch_items_old 2008-06-19 05:49:45 +00:00
gbateson 3c6a14ee12 allow <img> and other tags in LHS of JMatch when outputformat is "v6" 2008-06-19 05:13:34 +00:00
pichetp 69c6d6ca42 MDL-14625 more tolerant to missing subquestions merged from HEAD 2008-06-19 01:55:49 +00:00
pichetp 3af0788f9c MDL-14625 more tolerant to missing subquestions merged from HEAD 2008-06-19 01:50:28 +00:00
moodlerobot 9676a2860c Updated the 18 build version to 20080619 2008-06-19 01:46:44 +00:00
tjhunt 2888dc67e1 MDL-15290 - Missing question types not handled properly on backup. 2008-06-18 14:29:34 +00:00
dongsheng 71c3e668a5 "MDL-8642, setting of auto scrolling" 2008-06-18 03:45:26 +00:00
dongsheng b678200478 "MDL-12304, fix double text" 2008-06-18 03:16:06 +00:00
moodlerobot dfd0732d37 Updated the 18 build version to 20080618 2008-06-18 01:55:03 +00:00
jerome 31b8823ff3 MDL-11461 all ressource types are now displayed in the ressource help popup, merged from 1.9 2008-06-17 01:52:23 +00:00
moodlerobot 5e20081493 Updated the 18 build version to 20080617 2008-06-17 01:43:08 +00:00
dongsheng 4e3b92aecc "MDL-15251, see tracker, merged from MOODLE_19_STABLE" 2008-06-16 12:25:31 +00:00
dongsheng e6edcdaff7 "MDL-15251, see tracker, merged from MOODLE_19_STABLE" 2008-06-16 09:05:42 +00:00
dongsheng 3c14b202eb "MDL-15251, fix country field in user/view.php" 2008-06-16 02:16:42 +00:00
moodlerobot 763d96c685 Updated the 18 build version to 20080616 2008-06-16 01:44:38 +00:00
moodlerobot c90bfc60d2 Automatic installer.php lang files by installer_builder (20080616) 2008-06-16 01:32:46 +00:00
moodlerobot 91b3b50d28 Updated the 18 build version to 20080615 2008-06-15 01:42:06 +00:00
moodlerobot c3801e8c66 Updated the 18 build version to 20080614 2008-06-14 01:55:18 +00:00
moodlerobot e418ebf500 Updated the 18 build version to 20080613 2008-06-13 02:07:23 +00:00
stronk7 ba6b4afc8b Timezone info updated to tzdata2008c. Backported from HEAD 2008-06-12 16:03:16 +00:00
moodlerobot e15dace905 Updated the 18 build version to 20080612 2008-06-12 02:05:53 +00:00
moodlerobot a648c81aac Automatic installer.php lang files by installer_builder (20080612) 2008-06-12 01:49:02 +00:00
moodlerobot 1a46de2f48 Updated the 18 build version to 20080611 2008-06-11 02:17:49 +00:00
dongsheng 74680e68ed "MDL-12304, fix double text" 2008-06-10 05:16:40 +00:00
moodlerobot 9e7d048f50 Updated the 18 build version to 20080610 2008-06-10 02:03:45 +00:00
moodlerobot 465679ab04 Automatic installer.php lang files by installer_builder (20080610) 2008-06-10 01:47:17 +00:00
moodlerobot f8e7cfb677 Updated the 18 build version to 20080609 2008-06-09 02:02:41 +00:00
iarenaza 9306b4f5c5 MDL-12783 IMS idon't unenroll students who were enrolled by other plug-ins
Credit goes to Scott Krajewski for the bug report and patch!
2008-06-08 15:28:08 +00:00
moodlerobot 1aeb49ce6e Updated the 18 build version to 20080608 2008-06-08 02:03:41 +00:00
iarenaza 913f427e3b MDL-15182 Fix LDAP enrolment course auto-creation at user login 2008-06-07 21:18:12 +00:00
moodlerobot e41ba00a95 Updated the 18 build version to 20080607 2008-06-07 02:00:41 +00:00
gbateson 557ab204c0 fix conversion of relative URLs in Hot Potatoes "<=" and "=>" buttons on sites where slasharguments as disabled (Site Admin -> Server -> HTTP -> Use slash arguments) 2008-06-07 01:38:03 +00:00
moodlerobot 5125790ba9 Updated the 18 build version to 20080606 2008-06-06 02:01:40 +00:00
mchurch ca2b78b2d9 MDL-11892 Fixed calls to expand javascript to correctly use quoted strings in all necessary places. 2008-06-05 21:12:43 +00:00
moodlerobot 3a23a33f2a Updated the 18 build version to 20080605 2008-06-05 02:04:55 +00:00
moodlerobot 2624b8cfb2 Updated the 18 build version to 20080604 2008-06-04 02:17:51 +00:00
moodlerobot 58b44a97b8 Updated the 18 build version to 20080603 2008-06-03 02:03:23 +00:00
iarenaza fb8f96c38d MDL-15039 Apostrophes in idnumber prevent users from being unenrolled via LDAP
If any member of a course has an ID number containing an apostrophe (eg.
CN=Paddy O'Brien,OU=Students,DC=etc...), no other members will ever be
unenrolled via LDAP.

Thanks to Michael Woods for the bug report and proposed solution.
2008-06-02 22:33:08 +00:00
moodlerobot 957e659644 Updated the 18 build version to 20080602 2008-06-02 02:07:46 +00:00
moodlerobot 139f64ab4c Updated the 18 build version to 20080601 2008-06-01 02:02:23 +00:00
iarenaza ad5903f32c MDL-4248 Fix error when updating user profiles and any of these fields is empty
According to http://es2.php.net/manual/en/function.ldap-modify.php#43216 we
need to specify an array() value to delete an attribute's value, instead of an
empty string.
2008-05-31 14:53:03 +00:00
iarenaza 255d79e8bb MDL-4207 Don't overwrite modified user profile values with empty LDAP values when 'unlocked if empty' is set
If user profile values are locked to LDAP, then LDAP should provide those
values.

But the purpose of the setting 'unlocked if empty' is to allow the user to fill
in a value for the selected field _if LDAP is giving nothing_ for this field.
Thus it makaes sense to let this value stand in until LDAP is giving a value
for this field.
2008-05-31 13:22:58 +00:00
moodlerobot f82d20ef83 Updated the 18 build version to 20080531 2008-05-31 02:07:34 +00:00
moodlerobot cc455ee55f Automatic installer.php lang files by installer_builder (20080531) 2008-05-31 01:45:06 +00:00
moodlerobot 2612942b3f Updated the 18 build version to 20080530 2008-05-30 02:07:49 +00:00
moodlerobot 741af83691 Updated the 18 build version to 20080529 2008-05-29 02:05:17 +00:00
mchurch e19d0aa40c MDL-15035 - Changed error message to more meaningful one. 2008-05-28 14:56:02 +00:00
moodlerobot a770bee3b4 Updated the 18 build version to 20080528 2008-05-28 02:16:51 +00:00
dongsheng 9ae6f20211 "MDL-14932, accessibility imporvement, see tracker" 2008-05-28 01:53:00 +00:00
tjhunt b2a7f16b29 MDL-14764 - Imported multichoice questions may have a blank answernumbering value, which results in an "ERR" prefix to all answers' text. Thanks to Nate H for the fix. 2008-05-27 13:42:26 +00:00
moodlerobot 7e380f7a62 Updated the 18 build version to 20080527 2008-05-27 02:07:24 +00:00
moodlerobot 0564d9f348 Updated the 18 build version to 20080526 2008-05-26 02:10:21 +00:00
iarenaza e249546b1f MDL-14987 Default attribute for Active Directory password expiry is missing 2008-05-25 21:43:09 +00:00
moodlerobot 13aac2d528 Updated the 18 build version to 20080525 2008-05-25 02:01:32 +00:00
moodlerobot 73018ff695 Updated the 18 build version to 20080524 2008-05-24 02:02:37 +00:00
moodlerobot dca6c88184 Updated the 18 build version to 20080523 2008-05-23 02:05:56 +00:00
moodlerobot 407dddf80a Automatic installer.php lang files by installer_builder (20080523) 2008-05-23 01:49:17 +00:00
moodlerobot 4c13c8322e Updated the 18 build version to 20080522 2008-05-22 02:06:56 +00:00
mchurch 5b3a9f3add MDL-13860 - Fixed mistyped function call to 'scorm_seq_overall'. This was preventing some SCORM navigation from continuing in our tests - but only if debugging was turned off! 2008-05-21 16:34:04 +00:00
moodlerobot ace21471a1 Updated the 18 build version to 20080521 2008-05-21 02:25:57 +00:00
moodlerobot f6fea7895e Automatic installer.php lang files by installer_builder (20080521) 2008-05-21 01:56:53 +00:00
tjhunt d54f58e745 MDL-14928 - Adding random questions from a category with an apostrophe in the name does not work. Stupid bloody addslashes. Roll on dmllib 2.0. 2008-05-20 17:09:39 +00:00
moodlerobot 20654b5f22 Updated the 18 build version to 20080520 2008-05-20 02:01:04 +00:00
moodlerobot ea99602131 Automatic installer.php lang files by installer_builder (20080520) 2008-05-20 01:44:29 +00:00
moodlerobot 00d541cb6f Updated the 18 build version to 20080519 2008-05-19 02:03:56 +00:00
moodlerobot 1b1d73538f Updated the 18 build version to 20080518 2008-05-18 01:56:47 +00:00
moodlerobot 1bbbf98c7b Updated the 18 build version to 20080517 2008-05-17 02:02:26 +00:00
moodlerobot f5f2ac2a84 Automatic installer.php lang files by installer_builder (20080517) 2008-05-17 01:45:51 +00:00
moodlerobot 98925bbd7f Updated the 18 build version to 20080516 2008-05-16 02:06:54 +00:00
moodlerobot 237287ac73 Updated the 18 build version to 20080515 2008-05-15 02:13:49 +00:00
dongsheng 18aa02efdd "MDL-14820, escape filename" 2008-05-14 05:21:01 +00:00
moodlerobot 48f758e26d Updated the 18 build version to 20080514 2008-05-14 02:19:57 +00:00
moodlerobot 9f01a22de1 Updated the 18 build version to 20080513 2008-05-13 02:22:20 +00:00
stronk7 0e247d1d4f Backporting MDL-14495 to 18_STABLE 2008-05-13 02:16:53 +00:00
stronk7 c7642843ba Avoid $_REQUEST["id"] usage. MDL-14806 ; backported from 19_STABLE 2008-05-13 01:51:07 +00:00
tjhunt 698945eb18 MDL-14804 - question_list_instances is broken - It does not include the each modules lib file before doing function_exists($module->name.'_question_list_instances'). 2008-05-12 17:29:50 +00:00
tjhunt 45efd8efad MDL-14797 - Error when moving a course to an empty category on Postgres 2008-05-12 10:44:40 +00:00
tjhunt 3816ad3b25 MDL-14406 - backport fix to this branch, which seems to have been missed. 2008-05-12 08:21:02 +00:00
moodlerobot 632859fca9 Updated the 18 build version to 20080512 2008-05-12 02:14:23 +00:00
moodlerobot ba83cc409d Automatic installer.php lang files by installer_builder (20080512) 2008-05-12 01:44:58 +00:00
stronk7 68abb79baf Prevent excess of unenolments by enrol_database_sync.php. MDL-8550 ; backported from HEAD 2008-05-11 23:56:13 +00:00
moodlerobot 0538ad9c0c Updated the 18 build version to 20080511 2008-05-11 02:07:41 +00:00
moodlerobot 2e094399fd New uz installer lang 2008-05-10 02:58:59 +00:00
moodlerobot 4c65f3cd14 file installer.php was added on branch MOODLE_18_STABLE on 2008-05-10 02:58:59 +0000 2008-05-10 02:57:14 +00:00
moodlerobot b7d40f71bc Updated the 18 build version to 20080510 2008-05-10 02:13:33 +00:00
diml edc70eac69 fixes MDL-14770, $course_id error 2008-05-09 21:51:00 +00:00
tjhunt a5ba72c655 MDL-14750 - Multianswer questions get broken by backup and restore becuase question->parent is not recoded properly in the database. 2008-05-09 15:22:48 +00:00
moodlerobot 3d7b0284aa Updated the 18 build version to 20080509 2008-05-09 02:16:11 +00:00
moodlerobot 96ed80ac0d Automatic installer.php lang files by installer_builder (20080509) 2008-05-09 01:48:04 +00:00
jerome bbfd4e747b MDL-14716 Install script: icon image are now displayed on the Server Checks page, merged from19 2008-05-08 03:09:50 +00:00
moodlerobot 08570d71d5 Updated the 18 build version to 20080508 2008-05-08 02:14:28 +00:00
moodlerobot 550af6d0d2 Automatic installer.php lang files by installer_builder (20080508) 2008-05-08 01:46:00 +00:00
tjhunt 931d8ad7c1 MDL-14726 - rcache bit wrong in set_field 2008-05-07 13:04:42 +00:00
tjhunt 7bab64e437 MDL-5482 - Backup and restore problems for match, random and truefalse question types.
All the credit goes to Paulo Matos who carefully worked out and tested this fix, and updated the patch several times over more than a year while I very slowly got around to reviewing it and checking it in.
2008-05-07 12:31:56 +00:00
fmarier c7ad4ebfe4 Printing ADODB error to the web server error log (MDL-14628) 2008-05-07 04:37:34 +00:00
moodlerobot a45e98117b Updated the 18 build version to 20080507 2008-05-07 02:10:39 +00:00
moodlerobot a4b578acba Updated the 18 build version to 20080506 2008-05-06 02:13:42 +00:00
moodlerobot 8f55f04cae Updated the 18 build version to 20080505 2008-05-05 01:56:27 +00:00
diml f35e2e78bd syntax fix for MDL-14678 2008-05-04 10:49:37 +00:00
moodlerobot a3f57335a6 Updated the 18 build version to 20080504 2008-05-04 02:06:57 +00:00
moodlerobot 1d29db2505 Automatic installer.php lang files by installer_builder (20080504) 2008-05-04 01:52:28 +00:00
moodlerobot 4d6f2b14bf New lang supported by installer: cy_utf8 2008-05-04 00:46:47 +00:00
moodlerobot ed5cf1be35 file installer.php was added on branch MOODLE_18_STABLE on 2008-05-04 00:46:47 +0000 2008-05-04 00:42:16 +00:00
moodlerobot bd7b9afc2b Updated the 18 build version to 20080503 2008-05-03 01:55:54 +00:00
moodlerobot 8bb45b3018 Automatic installer.php lang files by installer_builder (20080503) 2008-05-03 01:40:44 +00:00
poltawski d21d4c769c MDL-13716 - When storing progress of scorm activity a 404 is
encountered and js failure on split. Cast to string to avoid this.

thanks to Peter Chamberlin of LJCreate
backported from MOODLE_19_STABLE
2008-05-02 10:45:05 +00:00
scyrma 9ebf1ff327 MDL-11342: Urlencode the filepath in directory resource 2008-05-02 08:13:49 +00:00
jerome 02aad242c2 MDL-11382 added a link 'Profil' to the administration block. 2008-05-02 06:18:06 +00:00
scyrma 0cc6a219c4 MDL-8592: Get spellchecking to work over https (backport from 1.9) 2008-05-02 03:35:38 +00:00
jerome 7987cbb64c MDL-14439 IE and Opera fire the onchange when ever you move into a dropdwown list with the keyboard - this changes fix the problem. Merged from 19. 2008-05-02 02:52:48 +00:00
jerome 0345ccddab MDL-14439 Added javascript file dropdwon.js - fix IE/Opera behavior. They do not fire dropdwon menu onChange automatically anymore. Merged from 19. 2008-05-02 02:47:32 +00:00
jerome f89efbdcd7 file dropdown.js was added on branch MOODLE_18_STABLE on 2008-05-02 02:47:32 +0000 2008-05-02 02:38:36 +00:00
moodlerobot ab3b0e99bc Updated the 18 build version to 20080502 2008-05-02 01:57:17 +00:00
moodlerobot 564c86821e Automatic installer.php lang files by installer_builder (20080502) 2008-05-02 01:42:25 +00:00
dongsheng 61b8c43f38 "MDL-7362, allow_call_time_pass_reference setting may cause bug, see tracker, thanks James" 2008-05-01 08:33:42 +00:00
scyrma f39309cba8 MDL-3381: Remove all remaining core calls to ctype_* functions and make ctype a recommended optional library. (backport from 1.9) 2008-05-01 08:07:53 +00:00
dongsheng f1be9a633d "MDL-10944, fix undefined property in chatd.php" 2008-05-01 06:56:26 +00:00
scyrma 74226d322e MDL-14590 - Spellchecker now working in the messaging system too (backport from 1.9) 2008-05-01 05:21:11 +00:00
moodlerobot 1f5f554d2b Updated the 18 build version to 20080501 2008-05-01 02:01:37 +00:00
moodlerobot b671a8f0aa Automatic installer.php lang files by installer_builder (20080501) 2008-05-01 01:46:28 +00:00
poltawski aa2b1ba10d MDL-12614 - Bad regular expression matching was causing syntactically
invalid js when returning to previously attempted SCORM package.

merged from MOODLE_19_STABLE
2008-04-30 11:54:39 +00:00
moodlerobot 094a70b7a1 Updated the 18 build version to 20080430 2008-04-30 01:59:06 +00:00
dongsheng acbbc1e3d3 "MDL-14262, fix optional_param, backported from MOODLE_19_STABLE" 2008-04-30 01:53:17 +00:00
moodlerobot 8794dfd840 Automatic installer.php lang files by installer_builder (20080430) 2008-04-30 01:42:55 +00:00
dongsheng 325d9bd4d6 "MDL-14262, fix wrong logged link, see tracker" 2008-04-30 01:09:34 +00:00
jerome a671e19ae8 MDL-13815 - Course summary text is optional and empty by default now 2008-04-29 03:51:43 +00:00
moodlerobot fbc1f0e5ba Updated the 18 build version to 20080429 2008-04-29 01:59:57 +00:00
moodlerobot ab84aff0ec Automatic installer.php lang files by installer_builder (20080429) 2008-04-29 01:44:35 +00:00
stronk7 85b22635ac Fixed old-glorious typo in wiki backup. MDL-10811 2008-04-28 23:08:02 +00:00
diml f1678f0ed1 Contributes to MDL12324 - fixes search failure when using extended chars (non ascii) in query strings 2008-04-28 16:28:35 +00:00
moodlerobot 857570c420 Updated the 18 build version to 20080428 2008-04-28 01:57:01 +00:00
skodak f07e806dd8 MDL-14564 fixed whitespace 2008-04-27 22:41:36 +00:00
skodak 556e66c964 MDL-14564 pg null trouble fixed by David Mudrak 2008-04-27 22:35:39 +00:00
dongsheng 0cc7163e28 MDL-14262, fix incorrect link, see tracker, merged from MOODLE_19_STABLE 2008-04-27 17:09:22 +00:00
stronk7 3b384c750f glossary->id for block is now properly recoded by restore. MDL-4934 2008-04-27 01:53:25 +00:00
moodlerobot 28580a7575 Updated the 18 build version to 20080427 2008-04-27 01:52:41 +00:00
stronk7 02671df098 Backporting from HEAD some recent improvements in order to be able
to restore block instances properly. MDL-4934
2008-04-27 01:49:44 +00:00
moodlerobot 141dd0001f Updated the 18 build version to 20080426 2008-04-26 01:58:10 +00:00
skodak 011bdd6a6c MDL-14557 PostgreSQL+empty integer problem: user/editadvanced_form.php - credit goes to David Mudrak 2008-04-25 14:41:28 +00:00
skodak 71b860de73 MDL-14499 backporting fix for missing data:uploadentries 2008-04-25 14:19:36 +00:00
moodlerobot 0e4d297634 Updated the 18 build version to 20080425 2008-04-25 02:02:05 +00:00
moodlerobot 45a8715ca3 Automatic installer.php lang files by installer_builder (20080425) 2008-04-25 01:44:31 +00:00
scyrma 9fe384b2f4 Typo in code: 'a/' is wrong, '/a' is good. 2008-04-24 08:01:12 +00:00
dongsheng 00611f4a3e MDL-14292, fix html, see tracker, thanks Chris 2008-04-24 04:15:02 +00:00
moodlerobot 1aae2de951 Updated the 18 build version to 20080424 2008-04-24 02:02:21 +00:00
tjhunt 97578db412 MDL-13982 - Performance problem when deleting questions from large question banks. Thanks to Michael Spall for this fix. 2008-04-23 13:44:31 +00:00
tjhunt 80f7917245 MDL-14063 - Backport notice fix and whitespace cleanups from 1.9. 2008-04-23 10:57:52 +00:00
tjhunt 14bb4c1ad9 MDL-11978 - Backport admin notification from MDL-11061 about bogus $CFG->wwwroot from 1.9 to 1.8 and 1.7. 2008-04-23 10:38:10 +00:00
moodler 5fe44967f8 Merged MDL-14483 from 1.9 Use the recipient language to send email 2008-04-23 02:25:55 +00:00
moodlerobot 9c2e402dd8 Updated the 18 build version to 20080423 2008-04-23 02:02:43 +00:00
tjhunt 5c3a8f2654 MDL-14352 - General feedback for descriptions not showing up on the review page, as it should. 2008-04-22 16:17:00 +00:00
tjhunt 85becf9549 MDL-14467 - qtype_multichoice help file in the wrong place. 2008-04-22 14:34:19 +00:00
tjhunt 8218ad778c file multichoice.html was added on branch MOODLE_18_STABLE on 2008-04-22 14:34:19 +0000 2008-04-22 14:34:18 +00:00
moodlerobot 2a0280735f Updated the 18 build version to 20080422 2008-04-22 02:05:20 +00:00
stronk7 de09e4e445 Replace custom casting code by proper sql_cast_char2int() core function. MDL-12893 ; backported from HEAD 2008-04-21 18:12:01 +00:00
stronk7 78356e70e8 Backporting sql_cast_char2int() to 18_STABLE. MDL-12893 2008-04-21 18:00:24 +00:00
pichetp e23cfada9c MDL-14435 Removing capitals merging from head 2008-04-21 02:53:35 +00:00
moodlerobot b6e64bdc3f Updated the 18 build version to 20080421 2008-04-21 01:54:12 +00:00
stronk7 49022d40e1 Replace low level $db->Concat() calls to Moodle sql_concat() cross-db alternative. MDL-13823 ; backported from HEAD 2008-04-20 22:17:29 +00:00
stronk7 c40ff3464d Modify sql_concat() to support all elements being numeric. MDL-13823 ; backported from HEAD 2008-04-20 21:20:45 +00:00
moodlerobot 4f569a8a67 Updated the 18 build version to 20080420 2008-04-20 01:52:30 +00:00
skodak 31620715c6 MDL-11396 backporting patch from MOODLE_19_STABLE 2008-04-19 23:16:00 +00:00
moodler b685c67b66 MDL-12742 Moved errant lang file in 1.8 2008-04-19 13:33:51 +00:00
moodler a8ee70a946 file block_search.php was added on branch MOODLE_18_STABLE on 2008-04-19 13:33:50 +0000 2008-04-19 13:27:08 +00:00
moodlerobot bb0d1297d8 Updated the 18 build version to 20080419 2008-04-19 01:53:58 +00:00
stronk7 e9b129a6a4 MDL-14072 - Backported from HEAD. Prevent NULLs, empties and numbers to be processed by:
- backup_encode_absolute_links() at backup
- restore_decode_absolute_links() at restore
2008-04-18 16:59:47 +00:00
moodler 0872afb8d2 MDL-11142 Roles upgrade was losing timestart and timeend for teachers and students (Merged from 1.7) 2008-04-18 03:30:48 +00:00
moodlerobot 8bafccf4c4 Updated the 18 build version to 20080418 2008-04-18 01:57:46 +00:00
gbateson cb856ad077 removed setting of timeclose and timeopen when course format == "weeks" 2008-04-18 00:58:26 +00:00
diml eb791e1258 Fixes all registered unstabilities in MDL-14325, MDL-14328 and closes those buglines.
default values for global search parameters,
command quoting issues status choosed untill better resolution,
typo error in error message
2008-04-17 20:46:30 +00:00
stronk7 30e04e5e2a With get_my_courses() properly filtering out not vievable
courses for the user requesting the list, perfomr proper dimming
of not visible courses. Backported from HEAD. MDL-12855
2008-04-17 18:35:12 +00:00
tjhunt 42fd1a8187 MDL-8682 - yet another followup. The javascript still was not quite right. you cannot rely on the case of element.nodeName. 2008-04-17 13:07:37 +00:00
dongsheng 654689ef2d MDL-14320, remove useless icon in edit entry page, merged from MOODLE_19_STABLE 2008-04-17 09:43:44 +00:00
dongsheng a312c55950 MDL-8188, add approve.gif to chameleon theme 2008-04-17 02:29:33 +00:00
dongsheng 1406339b9f file approve.gif was added on branch MOODLE_18_STABLE on 2008-04-17 02:29:33 +0000 2008-04-17 02:27:58 +00:00
moodlerobot 1a139531bf Updated the 18 build version to 20080417 2008-04-17 01:55:58 +00:00
moodlerobot ec74ba1539 Automatic installer.php lang files by installer_builder (20080417) 2008-04-17 01:40:20 +00:00
dongsheng d1a734f2e3 MDL-14249, to keep ods lib exactly the same with excellib, some dummy function added 2008-04-16 07:15:54 +00:00
dongsheng 5508ecf266 MDL-14320, improve coding style, thanks Petr, merged from MOODLE_19_STABLE 2008-04-16 02:44:43 +00:00
moodlerobot 5bf4ae7fdb Updated the 18 build version to 20080416 2008-04-16 01:53:53 +00:00
stronk7 c602026c33 Fixed get_my_courses() to efectively filter out courses based in the user that
is requesting the list (not in the user the list is about). MDL-12855
2008-04-16 01:52:02 +00:00
diml 8ca823ad43 MDL14325 adds usemoodletoot key 2008-04-15 22:08:12 +00:00
diml 1674b69f3c Resolves quote issues - related to MDL14254 2008-04-15 21:30:12 +00:00
diml 59c1249cae Resolves MDL-14377 2008-04-15 21:18:03 +00:00
diml 2a8167fcc1 Resolves MDL-13992, MDL-14328 2008-04-15 21:11:29 +00:00
dongsheng 063970335d MDL-8778, fix last access date 2008-04-15 05:45:57 +00:00
moodler 072758e96a MDL-4485 Merged logging fix from 1.9 2008-04-15 03:41:08 +00:00
dongsheng d43aa0e36a MDL-8188, copy check.gif from mod/glossary to here, see tracker 2008-04-15 03:40:13 +00:00
dongsheng 0ffeb32266 file approve.gif was added on branch MOODLE_18_STABLE on 2008-04-15 03:40:13 +0000 2008-04-15 03:33:05 +00:00
dongsheng 3854fcb9f6 MDL-14320, remove icon when no file in entry, Thanks Robert 2008-04-15 02:39:25 +00:00
moodlerobot d10296c0e1 Updated the 18 build version to 20080415 2008-04-15 02:01:53 +00:00
moodler 14316a329b Bump to 1.8.5+ 2008-04-14 06:56:46 +00:00
moodlerobot 2cc8826edb Updated the 18 build version to 20080414 2008-04-14 02:00:24 +00:00
moodlerobot 9e864f2546 Automatic installer.php lang files by installer_builder (20080414) 2008-04-14 01:44:37 +00:00
skodak 1a92acfb1b MDL-14342 fixed wrong quotes; merged from MOODLE_19_STABLE 2008-04-13 22:26:41 +00:00
moodlerobot a3c6822887 Updated the 18 build version to 20080413 2008-04-13 01:54:44 +00:00
moodlerobot a64573c79c Automatic installer.php lang files by installer_builder (20080413) 2008-04-13 01:39:04 +00:00
moodlerobot 4c15367f44 Updated the 18 build version to 20080412 2008-04-12 01:52:38 +00:00
moodlerobot 0153d1b515 Automatic installer.php lang files by installer_builder (20080412) 2008-04-12 01:37:25 +00:00
diml 3c2e8010af fixes reported quote issue on $file in shel exec commands (MDL14325) backported 2008-04-11 23:23:16 +00:00
diml 151744819b fixes reported quote issue on $file in shel exec commands (MDL14325) 2008-04-11 23:22:58 +00:00
dongsheng 77cd174025 MDL-14249, add more needed functions to excellib.php 2008-04-11 07:42:58 +00:00
scyrma a2ae4ee63b MDL-9410 - In user profile display, add http:// to web links if it's not already there 2008-04-11 07:03:20 +00:00
dongsheng 388370bf88 MDL-12662, fix undefined index(IIS) 2008-04-11 05:32:57 +00:00
gbateson 116c28e0e9 do not show hidden HotPots on mod/hotpot/index.php 2008-04-11 05:12:14 +00:00
dongsheng 87b8241498 MDL-9534, fix xmlize() call 2008-04-11 03:58:40 +00:00
moodlerobot f5024e6deb Updated the 18 build version to 20080411 2008-04-11 01:58:42 +00:00
moodlerobot fb56caace7 Updated the 18 build version to 20080410 2008-04-10 01:56:18 +00:00
dongsheng 56ae2b7f26 MDL-12611, realign the help icon 2008-04-09 03:41:59 +00:00
dongsheng 643e83fd60 MDL-14091, fix myMoodle courses list sort order, Thanks Iñaki 2008-04-09 02:45:33 +00:00
moodlerobot 50ea3cc486 Updated the 18 build version to 20080409 2008-04-09 01:58:01 +00:00
stronk7 823844e709 Unset rcache on UPDATE statements not using dmllib.php. MDL-14257 ; backported from HEAD 2008-04-08 23:19:34 +00:00
diml 779de749eb fixes slash issues that avoid finding relative pathes to converters 2008-04-08 22:00:03 +00:00
moodler 99312493b6 Bumped to Moodle 1.8.5 2008-04-08 14:48:01 +00:00
scyrma 0f4aa108d9 MDL-13792 - Commiting Patch by Skodak, fixing problem with japanese characters under some conditions. This has been reported to work, if nobody else
comes foward with bugs related to this, it will need to be changed everywhere else where there is no urlencoding done at this time.
2008-04-08 03:00:30 +00:00
moodlerobot 8e6e45aa1a Updated the 18 build version to 20080408 2008-04-08 02:01:15 +00:00
moodlerobot 040ea6d217 Automatic installer.php lang files by installer_builder (20080408) 2008-04-08 01:45:26 +00:00
diml 2e47bfb16b global sync to HEAD for passing fixes 2008-04-07 21:24:49 +00:00
diml 3702d88a6e upgrades Zend engine to version 1.5.0 2008-04-07 21:23:13 +00:00
diml 185441df1a file Wildcard.php was added on branch MOODLE_18_STABLE on 2008-04-07 21:23:15 +0000 2008-04-07 20:45:44 +00:00
diml 1394c591c6 file Range.php was added on branch MOODLE_18_STABLE on 2008-04-07 21:23:15 +0000 2008-04-07 20:45:43 +00:00
diml 278b82afec file Insignificant.php was added on branch MOODLE_18_STABLE on 2008-04-07 21:23:14 +0000 2008-04-07 20:45:43 +00:00
diml 5842492ff6 file Fuzzy.php was added on branch MOODLE_18_STABLE on 2008-04-07 21:23:14 +0000 2008-04-07 20:45:43 +00:00
diml c335b24901 file LowerCaseUtf8.php was added on branch MOODLE_18_STABLE on 2008-04-07 21:23:14 +0000 2008-04-07 20:44:21 +00:00
diml 3e70580216 file CaseInsensitive.php was added on branch MOODLE_18_STABLE on 2008-04-07 21:23:14 +0000 2008-04-07 20:43:30 +00:00
diml ae3071a0df file LockManager.php was added on branch MOODLE_18_STABLE on 2008-04-07 21:23:14 +0000 2008-04-07 20:38:19 +00:00
moodlerobot d778032a9e Updated the 18 build version to 20080407 2008-04-07 01:57:05 +00:00
stronk7 9d88867d0f Enforce DOT as decimal separator for Oracle. MDL-11629 ; backported from HEAD 2008-04-06 15:44:48 +00:00
moodlerobot 49d4be8ba5 Updated the 18 build version to 20080406 2008-04-06 01:51:26 +00:00
moodlerobot 7ca341ae94 Updated the 18 build version to 20080405 2008-04-05 01:35:54 +00:00
stronk7 b16206af1c Documenting local hack about MDL-14215 ; backporte from HEAD 2008-04-04 22:36:35 +00:00
stronk7 741859448b Fixed bug preventing correct detection of enums under mysqli. MDL-14215 ; backported from HEAD 2008-04-04 19:56:15 +00:00
stronk7 fd6024c0be Fix wrong conversion from '0' to '' in oracle_diry_hack. MDL-14182 ; backported from HEAD 2008-04-04 11:27:03 +00:00
moodlerobot 9037920594 Updated the 18 build version to 20080404 2008-04-04 01:35:25 +00:00
moodlerobot 203968ccae Automatic installer.php lang files by installer_builder (20080404) 2008-04-04 01:23:14 +00:00
stronk7 9eb290680b Fixed DST calculation when requesting explicit (parameter) timezones. MDL-14093 ; backported from HEAD 2008-04-03 18:10:21 +00:00
moodlerobot 1510c6c913 Updated the 18 build version to 20080403 2008-04-03 01:29:38 +00:00
moodlerobot faed109b67 Updated the 18 build version to 20080402 2008-04-02 03:38:59 +00:00
skodak a0a264068f MDL-13792 reverting previous commits - the use of urlencode() is not correct 2008-04-01 20:24:00 +00:00
tjhunt 8db9017fd8 MDL-8682 - once again. It won't work all the time if the javascript is inside an if statement. 2008-04-01 16:51:03 +00:00
skodak 96b4500a91 MDL-10660 reverting previous changes - see tracker 2008-04-01 08:52:19 +00:00
moodlerobot 2fbc9fcb8b Updated the 18 build version to 20080401 2008-04-01 03:33:04 +00:00
scyrma f9085923a2 MDL-13792 - Fix to prevent urlencoding of '/' 2008-04-01 01:55:00 +00:00
tjhunt c612c32231 Backport JS improvements from MDL-8682. 2008-03-31 15:09:41 +00:00
nicolasconnault f8d1a60893 MDL-13397 Fixed the language string. Merging from HEAD 2008-03-31 06:18:11 +00:00
skodak 947c93bc0a MDL-13506 backport of adodb 4.98 from MOODLE_19_STABLE 2008-03-31 06:12:48 +00:00
moodlerobot f63a256c87 Updated the 18 build version to 20080331 2008-03-31 03:34:17 +00:00
moodlerobot cdfbc956fc Updated the 18 build version to 20080330 2008-03-30 03:33:26 +00:00
stronk7 9922fbf9d6 Not visible courses don't cause unenrolment under LDAP anymore. Credit goes to Iñaki Arenaza. MDL-14097 ; backported from HEAD 2008-03-30 00:47:26 +00:00
moodlerobot 31df961fd2 Updated the 18 build version to 20080329 2008-03-29 03:28:15 +00:00
moodlerobot 288b5b4028 Updated the 18 build version to 20080328 2008-03-28 03:35:53 +00:00
moodlerobot e94ed1ae6e Updated the 18 build version to 20080327 2008-03-27 03:34:54 +00:00
scyrma 57be0ec8f7 MDL-13792 - Use urlencode for filename in upload and uploadsingle assignments to fix problems with multibytes filenames. 2008-03-27 01:48:17 +00:00
moodlerobot 1b7d1827de Updated the 18 build version to 20080326 2008-03-26 03:39:09 +00:00
moodlerobot b10c986edc Automatic installer.php lang files by installer_builder (20080326) 2008-03-26 03:24:57 +00:00
dongsheng 18dd81c215 MDL-12531 add institution to lockable fileds, thanks for your patch, Lgor Plisco 2008-03-26 00:45:06 +00:00
moodlerobot 2468aba863 Updated the 18 build version to 20080325 2008-03-25 03:34:45 +00:00
moodlerobot c4826181c8 Automatic installer.php lang files by installer_builder (20080325) 2008-03-25 03:22:08 +00:00
dongsheng 54ad70b035 MDL-10660, check whether memcache has been installed. 2008-03-25 02:16:59 +00:00
dongsheng 66feb0092d MDL-10606 Corrected course search box id 2008-03-25 01:13:34 +00:00
dongsheng c852b07683 MDL-10606, change course search box id 2008-03-25 01:01:00 +00:00
dongsheng 133e54629f MDL-13287, fix a link. 2008-03-25 00:27:35 +00:00
moodlerobot 7d9881cdea Updated the 18 build version to 20080324 2008-03-24 03:29:56 +00:00
moodlerobot 95ae6fbf1f Updated the 18 build version to 20080323 2008-03-23 03:27:50 +00:00
stronk7 169d90353f Update timezone rules to tzdata2008a. MDL-14024 ; backported from HEAD 2008-03-22 23:46:53 +00:00
moodlerobot dd6f51b926 Updated the 18 build version to 20080322 2008-03-22 03:28:19 +00:00
moodlerobot 8dea9afdee Updated the 18 build version to 20080321 2008-03-21 03:26:11 +00:00
diml 91b1bf8572 shooting out debug code see MDL-13993 2008-03-20 19:31:21 +00:00
ikawhero 948cff69a6 Fixed typo that was affecting the reordering of custom profile fields.
MDL-13909.
2008-03-20 09:13:14 +00:00
moodlerobot 1f1df4b191 Updated the 18 build version to 20080320 2008-03-20 03:33:04 +00:00
scyrma df226eb12d MDL-13959 - Fix from Eloy - this makes the timezone-related functions accept an optional parameter different from the current user timezone. (backport) 2008-03-20 03:08:06 +00:00
scyrma 88d8fff6d7 MDL-13934 - Commit patch by Eloy - prevent display of moodle docs link on redirect pages 2008-03-19 08:23:26 +00:00
moodlerobot afd64674a5 Updated the 18 build version to 20080319 2008-03-19 03:33:41 +00:00
moodlerobot 26eee29f1e Updated the 18 build version to 20080318 2008-03-18 03:35:10 +00:00
nicolasconnault 3c6767e8ad MDL-13743 Added realmedia support 2008-03-17 13:14:11 +00:00
stronk7 5bdab31478 Glossary extended search fixed. MDL-13947 ; backported from HEAD 2008-03-17 12:31:45 +00:00
moodlerobot e883fe1ab2 Updated the 18 build version to 20080317 2008-03-17 03:33:21 +00:00
moodlerobot fa6947c2cd Updated the 18 build version to 20080316 2008-03-16 03:31:33 +00:00
moodlerobot 8536a9fbc6 Updated the 18 build version to 20080315 2008-03-15 03:35:29 +00:00
moodlerobot 19a7b0aaff Automatic installer.php lang files by installer_builder (20080315) 2008-03-15 03:20:32 +00:00
moodlerobot d3b10b9746 Updated the 18 build version to 20080314 2008-03-14 03:33:02 +00:00
moodlerobot 38aa918f2f Automatic installer.php lang files by installer_builder (20080314) 2008-03-14 03:20:12 +00:00
nicolasconnault 3a9ad62295 MDL-13919 Fixed undefined variable. Merging from MOODLE_17_STABLE 2008-03-13 14:02:11 +00:00
moodlerobot efd1898dc0 Updated the 18 build version to 20080313 2008-03-13 03:34:45 +00:00
moodlerobot 719faf3548 Updated the 18 build version to 20080312 2008-03-12 03:43:56 +00:00
moodlerobot e155f2040b Automatic installer.php lang files by installer_builder (20080312) 2008-03-12 03:30:01 +00:00
danmarsden ec8d4ea9cd MDL-9666 Merged from 1.9 and HEAD 2008-03-11 23:44:17 +00:00
ethem 0425032153 Race condition in cron for Scheduled-Capture (very very big sites and order review enabled only).
In one cron, 250-500 orders may be processed (based on 5 minutes).
If an admin sets cron time up smaller than 5 minutes and
250-500> new transactions are made after last cron executed, it can be blocked.
Authorize cron sets up an_lastcron every time when admin/cron.php executes.
This must be set up after blocking check code.

As result, if pending orders aren't accepted with in 30 days at payment management page, they expired and users cannot enrol.
When an admin enabled order review, he is guaranteed 'Payment managers accept/deny transactions manually'.
Scheduled-Capture is designed for forgotten orders only ;)

Backported from HEAD.
2008-03-11 08:33:18 +00:00
moodlerobot d00f6bbccf Updated the 18 build version to 20080311 2008-03-11 03:45:53 +00:00
moodlerobot 2e43c17e57 Automatic installer.php lang files by installer_builder (20080311) 2008-03-11 03:29:59 +00:00
pichetp 8d7c19f5d1 MDL-12503 Loguniform and MDL-12421 rounding merging from head and 1.9 STABLE 2008-03-10 20:28:18 +00:00
andreabix e99f828c35 Fixed [MDL-12830] 2008-03-10 15:58:44 +00:00
andreabix 5d65584d34 Fixed label line height in course page 2008-03-10 15:32:11 +00:00
moodlerobot 92cb423293 Updated the 18 build version to 20080310 2008-03-10 04:27:06 +00:00
gbateson 7c3f0706a0 add "mp3" (used by DewPlayer) to the list of query string parameters to search for when converting relative urls to absolute urls 2008-03-10 01:35:51 +00:00
stronk7 9ebd5c666d Ensure only target groups_members are added to backup. MDL-12453 ; backported from HEAD 2008-03-09 17:33:17 +00:00
urs_hunkler df5be4fb9c set chameleonteachereditenabled to false as default. 2008-03-09 12:09:43 +00:00
moodlerobot 75b281a8a1 Updated the 18 build version to 20080309 2008-03-09 03:47:08 +00:00
moodlerobot dc01248261 Updated the 18 build version to 20080308 2008-03-08 03:52:40 +00:00
moodlerobot e4aad71ea4 Automatic installer.php lang files by installer_builder (20080308) 2008-03-08 03:37:18 +00:00
scyrma 79d00fd3af MDL-12860 - Patch from Joseph Rézeau, to fix a problem in the display of lesson result when using regexp. 2008-03-07 04:52:23 +00:00
moodlerobot 9456e28c08 Updated the 18 build version to 20080307 2008-03-07 03:52:09 +00:00
moodlerobot 7649ed1209 Automatic installer.php lang files by installer_builder (20080307) 2008-03-07 03:37:11 +00:00
gbateson 87042d5731 remove trailing whitespace on every line and standardize line endings 2008-03-06 07:39:21 +00:00
gbateson efcbd12a39 fix for Moodle 1.8 and 1.9 to allow students to access hidden hotpots which form part of a hotpot chain - see http://moodle.org/mod/forum/discuss.php?d=91861. In Moodle 1.8 and later the "require_login" function (lib/moodlelib.php) is stricter than in earlier versions of Moodle and checks a module's visibility and groupings access. From Moodle 2.0 on, this HotPot module does not need this fix. 2008-03-06 07:24:44 +00:00
moodlerobot 8efcefe411 Updated the 18 build version to 20080306 2008-03-06 04:03:59 +00:00
moodlerobot 751f367170 Updated the 18 build version to 20080305 2008-03-05 05:41:04 +00:00
moodler 528029df3f Merged release display fixes from 1.9 2008-03-05 05:38:04 +00:00
stronk7 b6a671d653 Simplify anydb_escape_string() to use simple-cross-db addslashes(). MDL-13793 ; backported from 19_STABLE 2008-03-04 23:42:00 +00:00
moodlerobot d8a7a8f691 Automatic installer.php lang files by installer_builder (20080304) 2008-03-04 03:47:39 +00:00
moodler 09e3e4efb6 Merged MDL-13717 Applied hack from Nicklas to fix sitemp etc. It worked for me in a quick test. 2008-03-02 01:25:18 +00:00
skodak e7d53ba351 MDL-13705 2008-03-01 13:11:58 +00:00
moodlerobot 558d74308f Automatic installer.php lang files by installer_builder (20080229) 2008-02-29 03:33:28 +00:00
tjhunt 1ba41a5caf MDL-12695 - Symantec Norton internet security pop up blocker seems to be stopping user starting a quiz attempt. Backport Jamie's fix from 1.9 now that it has had a time to cook and hasn't thrown up any problems. 2008-02-28 22:09:40 +00:00
skodak 41cc574f95 MDL-13705 2008-02-28 21:18:41 +00:00
skodak 5a7aef9c1c MDL-13705 2008-02-28 21:01:42 +00:00
pichetp 152f2f68ce MDL-13720 removing $files parameter from 1.9 version 2008-02-28 19:40:24 +00:00
tjhunt 7f761c27eb MDL-13189 - replace the $QTYPE_MENU global with a function call, so that we can set up the language strings later, after $COURSE is initialised. This ensures that the quesion names appear in the right language. 2008-02-28 12:53:05 +00:00
moodlerobot 0ce6c76982 Automatic installer.php lang files by installer_builder (20080228) 2008-02-28 03:37:58 +00:00
andreabix 6219090e2c Fixed MDL-12564 2008-02-27 17:38:19 +00:00
moodlerobot a0ea30a741 Automatic installer.php lang files by installer_builder (20080227) 2008-02-27 03:40:05 +00:00
moodler a40cd98d67 Merged MDL-13569 Mark N patch for notice 2008-02-26 09:06:39 +00:00
moodler d84e26d2c4 MDL-9367 Fix doc links for auth pages 2008-02-26 05:50:05 +00:00
skodak c8d51449f7 MDL-13237, MDL-13661 - fixing rcache regression, sorry :-(; merged from MOODLE_19_STABLE 2008-02-25 15:16:21 +00:00
poltawski b2fb1d4096 MDL-9667 - convert_tree_to_html doesn't set css class properly if
$tab->linkedwhenselected is set

Patch from Jeff Graham
backported from MOODLE_19_STABLE
2008-02-25 11:59:10 +00:00
skodak 2459ecc419 MDL-13565 Tracking forum fixes; merged from MOODLE_19_STABLE 2008-02-24 10:55:53 +00:00
moodlerobot 48441521aa Automatic installer.php lang files by installer_builder (20080223) 2008-02-23 03:24:57 +00:00
moodlerobot 2101eddc89 Automatic installer.php lang files by installer_builder (20080222) 2008-02-22 03:35:58 +00:00
tjhunt 33cc11661b MDL-13551 - preview question capability wrongly denied to student who has moodle/question:manage capability - This was already fixed in 1.9. 2008-02-21 22:34:45 +00:00
nicolasconnault 7e507929e6 MDL-13465 Implemented Martin's solution 2008-02-21 09:15:57 +00:00
moodler e671b92a2a Revert bad strings MDLSITE-359 2008-02-21 05:53:11 +00:00
moodler 53f5364123 MDL-13554 Fix from Mark Nielsen for bad block backups 2008-02-21 05:33:15 +00:00
moodlerobot 5b2f502112 Automatic installer.php lang files by installer_builder (20080221) 2008-02-21 03:38:25 +00:00
moodlerobot 34126fd8f1 Automatic installer.php lang files by installer_builder (20080220) 2008-02-20 03:35:16 +00:00
moodler fed8004f56 MDL-12277 Fixes relating to message sending from participants page in non-english 2008-02-20 02:20:57 +00:00
pichetp 74a2040332 Mergging from head MDL-12255 Adding questiontext decoding and subquestions validation 2008-02-19 23:39:45 +00:00
pichetp 9a5d3d9d3d Merging MDL-12063 from HEAD qtype_questions where left orphans when questions when deleted or
qtype change
2008-02-19 18:01:11 +00:00
tjhunt cda98581a5 Fix dangerous comment. (MDL-13536) 2008-02-19 17:14:13 +00:00
skodak 5e75f98c71 MDL-11816 fixed wiki export with quick hack; merged from MOODLE_19_STABLE 2008-02-19 11:06:24 +00:00
urs_hunkler 2dc20107b9 Added h1 - h4 fontsizes. Disabled the Chameleon engine by default. Wrote a short hint about the intearactive editing in the README. 2008-02-19 07:51:29 +00:00
moodler cd6323f517 MDL-13489 Merged fixes from 1.9 2008-02-19 06:55:54 +00:00
skodak cee5f24cc3 MDL-12382 allow admins to access any course - including courses where they have guest role and course does not allow guests; merged from MOODLE_19_STABLE 2008-02-18 23:38:37 +00:00
skodak a2e587548e MDL-12382 allow admins to access any course - including courses where they have guest role and course does not allow guests; merged from MOODLE_19_STABLE 2008-02-18 23:37:56 +00:00
moodlerobot 56e5cb78a8 Automatic installer.php lang files by installer_builder (20080218) 2008-02-18 03:33:55 +00:00
donal 5a3951e035 MDL-12492: Thanks to Nigel McNie, this addresses a problem which prevents hosts from re-keying when their keys expire. 2008-02-15 08:32:26 +00:00
donal bc1982446c Write to the log when the SSL key is created 2008-02-15 08:10:53 +00:00
donal eb3deee548 Remove unneeded mnet_host2service records 2008-02-15 08:04:24 +00:00
moodlerobot 262bc9a40b Automatic installer.php lang files by installer_builder (20080215) 2008-02-15 03:36:16 +00:00
nicolasconnault b8d8a34565 MDL-13430 I can only see this issue in the assignment submissions page. 2008-02-14 07:17:52 +00:00
donal a29910300d Ensure that the wwwroot has been supplied with a http:// or https:// prefix 2008-02-13 03:06:54 +00:00
pichetp d79dfb8586 merging MDL-13429 Go button problem from 1.9 2008-02-13 02:55:27 +00:00
donal 30f5739a46 MDL-12492: This patch addresses a problem which prevents hosts from re-keying when their keys expire. 2008-02-12 22:27:49 +00:00
nicolasconnault 1e51f8fa07 MDL-13397 Implemented the requiredentries parameter (previously not implemented). This includes a warning message and an SQL restriction on entries fetched for view.php 2008-02-12 15:54:20 +00:00
ethem 3211d8b265 Merged from MOODLE_17_STABLE 2008-02-11 15:31:10 +00:00
moodlerobot c9ab907641 Automatic installer.php lang files by installer_builder (20080209) 2008-02-09 03:32:45 +00:00
poltawski c095ae4364 MDL-13354 - wrong capability checked for view report link 2008-02-08 09:59:18 +00:00
moodler c9534efc10 Merged (sortof) fix from MDL-13378 2008-02-08 04:01:20 +00:00
moodlerobot 7edb720ac8 Automatic installer.php lang files by installer_builder (20080208) 2008-02-08 03:27:25 +00:00
poltawski 244cb43dff MDL-13339 - ensure we don't continue the restore process if there is
no course header in the backup file. This bug was causing blank course
records to be created when users tried to restore a non-moodle backup file
such as a scorm file.
backported from MOODLE_19_STABLE
2008-02-07 18:50:01 +00:00
ethem 2b72207cc3 Cron handles all expired unenrolments. It is time to use own enrolment method when calling funcs enrol_into_course, role_assign.
Zend Studio Warning: Assignment in condition (line XX), Solved, one more ()

Merged from MOODLE_17_STABLE
2008-02-07 16:18:48 +00:00
moodler a9aecc7b14 Fix subject lines and corrupted emails from messages MDL-13364 (merged) 2008-02-07 05:20:00 +00:00
gbateson c814ba2c1e MDL-13328 correct the counting of attempts when clickreporting has been enabled 2008-02-07 04:18:47 +00:00
moodlerobot 8823667015 Added missing lang 2008-02-07 03:30:27 +00:00
moodlerobot 6ffb4d547c file installer.php was added on branch MOODLE_18_STABLE on 2008-02-07 03:30:27 +0000 2008-02-07 03:29:58 +00:00
moodlerobot 3434f2553a Automatic installer.php lang files by installer_builder (20080207) 2008-02-07 03:24:04 +00:00
poltawski 1877680610 MDL-13314 count_role_users was showing different count to those returned from
get_role_users(), based on patch from Patrick Pollett
backported from MOODLE_19_STABLE
2008-02-06 14:49:57 +00:00
nicolasconnault 8fc5a75c11 MDL-6826 Removed the optional_param lines at the top, and set the submit buttons to PARAM_RAW. Also changed !empty() to isset() 2008-02-06 10:24:26 +00:00
stronk7 eda7a6b347 Backported from HEAD. Some old backups can contain empties in user->picture, fix them before insert. 2008-02-05 20:31:59 +00:00
andreabix 5d4b57cb07 Added missing classes
.rolecap .inherit.capdefault, .rolecap .allow.capdefault {
  background-color:#E3DFD4;
}

#admin-roles-override .capcurrent {
  background-color:#E3DFD4;
}
2008-02-05 18:52:31 +00:00
nicolasconnault 502e8e4c30 MDL-12158 Applied Matt's patch, merging from 1.7 2008-02-05 10:38:44 +00:00
nicolasconnault 93f56c2a9d MDL-10451 Fixed HTML errors 2008-02-05 09:49:43 +00:00
gbateson 98e8766b5b MDL-10451 remove extraneous closing </b> tag from lang/en_utf8/help/hotpot/outputformat.html 2008-02-05 04:20:47 +00:00
gbateson 5d5f22570f MDL-13048 fix undefined course id when importing a Hot Potatoes quiz into the Lesson module 2008-02-05 04:09:38 +00:00
moodler 88540a03e6 Merged logic fix for MDL-6826 from 1.9 2008-02-05 03:19:06 +00:00
skodak 7a222aa46e MDL-12976 workaround for unsupported false in update_record() 2008-02-04 23:54:40 +00:00
skodak 0dbc56ee8b MDL-7734 fixed global $COURSE 2008-02-04 21:12:45 +00:00
urs_hunkler 7c3bf2a16b MDL-13329 :: Buttons in the sidblocks looked quite different in the different browsers. Changed several CSS aspects to make them look more similar, specially added IE "hacks". 2008-02-04 20:50:12 +00:00
nicolasconnault c0d26d69f8 MDL-6826 Removed "changes" from both buttons, and implemented Tatsuya's patch 2008-02-04 12:57:32 +00:00
scyrma d33c47e381 MDL-13060 - removing old entries fro VA and CD 2008-02-04 00:48:25 +00:00
urs_hunkler 75d6eaaf31 MDL-13268 :: CSS added 2008-02-03 16:53:51 +00:00
moodler 6c5baec1b5 Automatic installer.php lang files by installer_builder (20080203) 2008-02-03 03:34:09 +00:00
stronk7 fdc6e017b5 Backported from HEAD. Add some browser output when restoring a lot of users. 2008-02-03 00:53:08 +00:00
skodak c7d80b3a25 MDL-13276 fixed footer when selecting file on frontpage 2008-02-02 21:10:45 +00:00
moodler 2979aead19 Automatic installer.php lang files by installer_builder (20080202) 2008-02-02 03:42:35 +00:00
skodak 68e9ee7163 MDL-13220 rebuild course cache after ajax edits - patch by Myles Carrick; merged from MOODLE_19_STABLE 2008-02-01 08:23:38 +00:00
moodler 7b462b46f0 Automatic installer.php lang files by installer_builder (20080201) 2008-02-01 03:37:18 +00:00
gbateson 8297db894e fix for MDL-13174 : replace calls to html_entity_decode() with hotpot_charcode_to_utf8() because html_entity_decode is broken in PHP 4 2008-01-31 07:25:47 +00:00
moodler 4babe7c31f MDL-13263 Add nopostforum string 2008-01-31 05:50:45 +00:00
moodler 000f9787f6 Automatic installer.php lang files by installer_builder (20080131) 2008-01-31 03:43:31 +00:00
scyrma 020fe631c3 MDL-11594 - Changes in image location broke chameleon 2008-01-31 00:35:27 +00:00
poltawski 970166d4ac MDL-13221 - doing wrong capability check for hidden activites. But we
don't need it at all as require_login() with the $cm argument does the
check for us
backported from MOODLE_19_STABLE
2008-01-30 20:44:08 +00:00
tjhunt df6447ef65 MDL-13110 - Manually grading random questions does not work. Fix thanks to Ken Burres. 2008-01-30 18:18:38 +00:00
mchurch 203b990fb0 MDL-13252 Fix context to always use course context, rather than instance->page. 2008-01-30 16:38:03 +00:00
scyrma ab6bd700d8 Imported and replaced country list to fix MDL-13060. The new list is the exact ISO list. Note that an official list also exists in French, but we will need to
do translations to other languages.  This commit also includes the restorelib upgrade path.
2008-01-30 07:49:47 +00:00
moodler e629e57a2b Automatic installer.php lang files by installer_builder (20080130) 2008-01-30 03:39:30 +00:00
skodak a8cd1b57da MDL-13237 rceche limiting through intcachemax finally implemented - this should prevent major memory leaks; backported from MOODLE_19_STABLE 2008-01-29 17:52:11 +00:00
scyrma 89d98b923b Upgrade path for MDL-13060. 2008-01-29 05:48:07 +00:00
moodler de13f5b6fd Automatic installer.php lang files by installer_builder (20080129) 2008-01-29 03:35:46 +00:00
moodler 098a26f514 Fixed PHP5 constructor for pdf which was overwriting values MDL-13207 2008-01-28 05:25:49 +00:00
moodler 802f6e34d7 Automatic installer.php lang files by installer_builder (20080128) 2008-01-28 03:39:23 +00:00
moodler d0494b6ec0 Fixed missing context argument MDL-13206 2008-01-28 03:22:41 +00:00
moodler f8faba784a Latest tags for 1.8 2008-01-28 03:15:40 +00:00
stronk7 a3534169ae Rename lesson->usegrademax to lesson->usemaxgrade. Some old sites can have it incorrect. MDL-13177 2008-01-27 15:28:11 +00:00
gbateson c447099bda fix for MDL-13173: quotes in HotPot activity name 2008-01-26 08:26:38 +00:00
moodler 14c5382464 Automatic installer.php lang files by installer_builder (20080126) 2008-01-26 03:30:58 +00:00
stronk7 e70e08fa8e Adding some missing parts to scheduled backup. MDL-10721
(will continue tomorrow with 19_STABLE and HEAD)
2008-01-26 01:15:24 +00:00
poltawski 2328428fe1 MDL-13068 - fix typo causing course delete to fail
backported from MOODLE_19_STABLE
2008-01-25 21:10:44 +00:00
nicolasconnault 123dcabe68 MDL-13043 get_users_listing() always returned the guest account, which was then used in the user count on this page. I made this inclusion conditional, and the bug disappeared. 2008-01-25 15:56:51 +00:00
nicolasconnault 1c1b5fc676 MDL-13043 get_users_listing() always returned the guest account, which was then used in the user count on this page. I made this inclusion conditional, and the bug disappeared. 2008-01-25 15:32:11 +00:00
moodler 89f02fd6b2 Merged choice fix for $current notice from 1.9 2008-01-25 06:28:26 +00:00
stronk7 3efca70fda General cleanup of backup users. Part of MDL-10721 2008-01-25 00:37:58 +00:00
nicolasconnault 24ab562c73 MDL-6826 backporting new "save changes and return to course" button for all modules' edit and add forms. 2008-01-24 19:23:10 +00:00
stronk7 3dcb2cda36 role_assignments are only exported for target users. MDL-13115 2008-01-24 18:44:11 +00:00
tjhunt e3d41efc04 MDL-13096 - Student can view all text for all questions in a course. 2008-01-24 15:26:58 +00:00
tjhunt 1b3fa338bb MDL-13150 - Remove extra <br /> tag for XHTML strict validation - Thanks to Joseph R?zeau 2008-01-24 15:06:46 +00:00
moodler 5a01c73780 Automatic installer.php lang files by installer_builder (20080124) 2008-01-24 04:05:27 +00:00
scyrma ba33284ca1 MDL-8810: changing require_once to include_once when looking for mod/.../lib.php 2008-01-24 02:26:15 +00:00
stronk7 5a661304aa Now the backup->users = none setting is properly populated to all
modules / instances, saving a lot of info to be always written. MDL-13115
2008-01-24 00:40:51 +00:00
mchurch f653c544e9 MDL-12694: Same change as in 1.9. Files that can be embedded will be embedded regardless of resource frame settings. 2008-01-23 16:32:30 +00:00
scyrma 52d3a9e351 MDL-8123 and MDL-11594 : make admin icons themeable. 2008-01-23 06:09:58 +00:00
scyrma b94db131e5 file open.gif was added on branch MOODLE_18_STABLE on 2008-01-23 06:09:59 +0000 2008-01-23 05:53:34 +00:00
scyrma 7cc7b0c033 file item.gif was added on branch MOODLE_18_STABLE on 2008-01-23 06:09:58 +0000 2008-01-23 05:53:34 +00:00
scyrma 81c049d9c2 file closed.gif was added on branch MOODLE_18_STABLE on 2008-01-23 06:09:58 +0000 2008-01-23 05:53:34 +00:00
moodler d119a6f42f Merged workshop disable from 1.9 MDL-13100 2008-01-23 04:39:45 +00:00
moodler f032a4bebd file defaults.php was added on branch MOODLE_18_STABLE on 2008-01-23 04:39:45 +0000 2008-01-23 04:38:43 +00:00
moodler 8b45b8e0a6 Automatic installer.php lang files by installer_builder (20080123) 2008-01-23 03:43:30 +00:00
moodler 27b1710b01 Automatic installer.php lang files by installer_builder (20080122) 2008-01-22 03:37:15 +00:00
poltawski 98928f94e9 MDL-9605 - fixed missing string which wasn't merged to 1.8 2008-01-21 16:46:36 +00:00
gbateson 0ee8a5280e fix MDL-13047 in which an invalid SQL was generated when the were no attempts which match the conditions for the required HotPot report 2008-01-21 08:21:22 +00:00
gbateson 4855134e63 fix Undefined property: stdClass::$studentfeedbackurl (line 282) and stdClass::$cellcontent2 (line 1081) in mod\hotpot\lib.php 2008-01-21 07:17:08 +00:00
moodler 96be763dc5 Automatic installer.php lang files by installer_builder (20080121) 2008-01-21 03:36:24 +00:00
moodler 8a8d3515d3 Automatic installer.php lang files by installer_builder (20080120) 2008-01-20 03:34:27 +00:00
mudrd8mz b59914d977 MDL-12291 help.php is now able to skip _local langpacks 2008-01-19 21:54:04 +00:00
skodak 4dc48514e5 MDL-13052 edit/user.php typo; merged from MOODLE_19_STABLE 2008-01-18 17:13:57 +00:00
skodak ac470e064e MDL-13029 Typo in groups_members_join_sql - patch by Chris Bandy 2008-01-18 10:31:00 +00:00
skodak 4b3f2d3739 MDL-12977 adding missing global $CFG 2008-01-18 10:18:47 +00:00
skodak b8ca891023 MDL-11759 group edit cleanup 2008-01-18 10:07:29 +00:00
moodler 70acd53078 Automatic installer.php lang files by installer_builder (20080118) 2008-01-18 03:38:22 +00:00
poltawski f1cac46f00 MDL-13039 - fix missing strings 2008-01-17 14:56:13 +00:00
moodler 990ae1bb9d Automatic installer.php lang files by installer_builder (20080117) 2008-01-17 03:39:22 +00:00
poltawski 904eea079b MDL-13003 - dont initalise array keys twice.. 2008-01-16 15:10:20 +00:00
scyrma 676174682e Fix for MDL-9669 : make it possible to specify 0 as cellpadding and cellspacing 2008-01-16 07:37:31 +00:00
moodler 870c9c02b3 Automatic installer.php lang files by installer_builder (20080116) 2008-01-16 03:35:59 +00:00
thepurpleblob 7356223a7d MDL-12016:
Read xml structure correctly to get category path
2008-01-15 14:58:10 +00:00
thepurpleblob 9deccd7a44 Reverting Mike C's change in MDL-12016 2008-01-15 14:37:11 +00:00
ethem 5580a59ba7 Tidy up 2008-01-15 10:58:24 +00:00
ethem 7bf7c697d3 MDL-12958 In the Authorize enrol plug-in when a credit card expiry date (year) is entered, a validate error is generated blocking credit card usage 2008-01-14 17:58:06 +00:00
moodler c539258b52 Moved to + after release 2008-01-14 08:55:06 +00:00
moodler 0c9945f5c6 Automatic installer.php lang files by installer_builder (20080114) 2008-01-14 03:50:26 +00:00
poltawski 74ec307700 reverting bad commit, sorry 2008-01-13 18:55:47 +00:00
poltawski f4687e66e7 MDL-8269 - stats wasn't paying attention to run time settings as the strtotime arguments were the wrong way round. Thanks to Mark Nielsen
backported from MOODLE_19_STABLE
2008-01-13 18:47:51 +00:00
urs_hunkler b4ed6f7392 MDL-12564 :: added font-family to the arrow properties. 2008-01-13 17:51:25 +00:00
moodler 54d9b6d847 Automatic installer.php lang files by installer_builder (20080113) 2008-01-13 03:32:30 +00:00
urs_hunkler 83941d0192 MDL-11154 :: added the missing code. 2008-01-12 18:38:31 +00:00
urs_hunkler 9109202550 MDL-9306 :: explanation added for hooks as comma separated lists in Chameleon. 2008-01-12 16:30:02 +00:00
urs_hunkler 669b80b1e2 MDL-11486 :: added width to the adminblock 2008-01-12 14:50:45 +00:00
urs_hunkler 49f5a957cd MDL-12210 :: set background-color: none to transparent 2008-01-12 14:31:20 +00:00
skodak c35b90ebed MDL-12914 Register globals trouble; backported from MOODLE_19_STABLE 2008-01-11 23:24:00 +00:00
moodler 68f67bbe75 Bumping to 1.8.4 2008-01-11 14:47:22 +00:00
poltawski 099d1c8f62 MDL-12400 - superfluous required_param causing problems in upload
assignment user report.
backported from MOODLE_19_STABLE
2008-01-11 11:47:23 +00:00
moodler e599ca7241 Automatic installer.php lang files by installer_builder (20080111) 2008-01-11 03:37:56 +00:00
skodak 19226c30b5 MDL-12911 fixed permission checks 2008-01-10 15:08:08 +00:00
moodler ccd33d6b19 Added support for db folders MDL-12904 2008-01-10 03:50:52 +00:00
moodler 4de6676739 Automatic installer.php lang files by installer_builder (20080110) 2008-01-10 03:36:28 +00:00
poltawski ae817db2f8 MDL-12889 - fix bad invalid capability check 2008-01-09 15:43:37 +00:00
arborrow e93291d5ee MDL-12889 - uncommitting previous change - since grade:viewall is new to 1.9 (my bad) 2008-01-09 15:17:39 +00:00
arborrow cfe0874655 MDL-12889 - bad capability check [thanks Tim!] in assignment recent activity report
merged from MOODLE_19_STABLE
2008-01-09 15:06:59 +00:00
moodler 75ed3a0add MDL-12801 Slight modifications to roles terminology to make it more consistent
"Global" and "Core" -->  "System" everywhere to match code and most docs
2008-01-09 06:46:44 +00:00
poltawski 6b3eca01f2 MDL-12882 - we were caching empty records which caused clone warnings
backported from MOODLE_19_STABLE
2008-01-08 20:21:30 +00:00
tjhunt 51f90f8839 MDL-12785 - Partially correct tick icon not displayed for MULTICHOICE, single answer questions. Fix thanks to Joseph R?zeau. 2008-01-08 18:28:51 +00:00
poltawski 99797689e6 MDL-9372 - only show RSS options in database module when RSS is enabled
backported from MOODLE_19_STABLE
2008-01-08 13:43:42 +00:00
poltawski 841dca3991 MDL-10813 - Course requests not respecting course request category.
Also made the course request category more robust, as breakage would
incur if $CFG->defaultrequestcategory didn't exist as a category.

backported from MOODLE_19_STABLE
2008-01-08 12:55:13 +00:00
skodak 28fb4d1027 MDL-12869 fixed minor security problem in installer - reported by hanno; backported from MOODLE_19_STABLE 2008-01-08 07:20:35 +00:00
martinlanghoff e54510d166 dmllib:rcache_set()/rcache_get() - use clone() function which we can support in PHP4 - MDL-12827 2008-01-08 04:15:48 +00:00
moodler 72cd33b6f4 Automatic installer.php lang files by installer_builder (20080108) 2008-01-08 03:36:41 +00:00
iarenaza c10708e9ce MDL-12858 fix print_error() usage.
print_error()'s third parameter is the URL we jump to (defaults to
$CFG->wwwroot if not set) when we click the 'Continue' button, not the message
string parameter object.
2008-01-07 23:40:12 +00:00
moodler ef1da4973c Automatic installer.php lang files by installer_builder (20080107) 2008-01-07 03:33:24 +00:00
moodler bd4c23edf3 Automatic installer.php lang files by installer_builder (20080106) 2008-01-06 03:22:02 +00:00
thepurpleblob 8354fc630f MDL-12701:
Missing string
2008-01-04 21:03:14 +00:00
nicolasconnault 737b745890 MDL-12827 Saving a clone of the $record in the cache instead of the record itself, to avoid referencing 2008-01-04 09:23:35 +00:00
nicolasconnault abd67b8e7f MDL-12429 Applied and tested Fran?ois' patches to 1.8, 1.9 and head. 2008-01-04 06:46:00 +00:00
moodler b70a71f3eb Automatic installer.php lang files by installer_builder (20080104) 2008-01-04 03:28:20 +00:00
poltawski 673b34647a MDL-12825 - add some extra height to popups in IE7, otherwise they cant
be used - backported from MOODLE_19_STABLE
2008-01-03 22:41:06 +00:00
moodler 1539445279 Automatic installer.php lang files by installer_builder (20080103) 2008-01-03 03:21:22 +00:00
skodak 9346aeddae MDL-9744 passwork field for ldap bind pw - patch by Iñaki Arenaza 2008-01-02 22:52:43 +00:00
stronk7 fba5ee935b Respect case of enumvalues. MDL-12803 2008-01-02 16:45:47 +00:00
skodak 2edb5cbdc4 MDL-12793 PARAM_HOST incorrect cleaning; backported from MOODLE_19_STABLE 2008-01-01 17:24:08 +00:00
stronk7 b3ed7949fb Better behaviour for "-" course searches under MSSQL and Oracle. MDL-7312 ; merged from 17_STABLE 2008-01-01 11:56:16 +00:00
moodler 4100f63ab4 Automatic installer.php lang files by installer_builder (20080101) 2008-01-01 03:12:18 +00:00
stronk7 06553cdb82 Removed old timezones file. MDL-12024 2007-12-31 15:26:30 +00:00
stronk7 34a90b1d22 Moving from old "timezones" location to the new "timezone" one. MDL-12024 2007-12-31 14:59:24 +00:00
stronk7 598100a16b Adding new (1976) timezone rules (africa, antarctica,
asia, australasia, europe, northamerica, southamerica).
CSV generated with 2007j olson files. MDL-12024
2007-12-31 13:20:36 +00:00
moodler 514dc2d92a Automatic installer.php lang files by installer_builder (20071231) 2007-12-31 03:16:09 +00:00
mark-nielsen beca85894e Fix for MDL-10752 (mostly a backport from MOODLE_19_STABLE or later) 2007-12-30 19:07:23 +00:00
moodler 022acf5df4 Automatic installer.php lang files by installer_builder (20071230) 2007-12-30 03:13:24 +00:00
poltawski 7d39e1b828 MDL-9925 - When a user presses cancel on restore they are sent to
/admin/. For teachers this gives an ugly access denied message,
so instead send them back to the course they came from.

Thanks to Wen Hao Chuang for the fix!

backported from MOODLE_18_STABLE
2007-12-29 23:45:38 +00:00
mark-nielsen 300185b2e4 Fixes for MDL-12383 and MDL-12605 2007-12-29 22:46:38 +00:00
mark-nielsen 20dce6a07d Fix for MDL-12605 2007-12-29 22:14:11 +00:00
mark-nielsen d630b81286 Fix for MDL-11900 2007-12-29 21:48:18 +00:00
mark-nielsen a59b768dee Fix for MDL-12606 2007-12-29 21:13:56 +00:00
mark-nielsen 338f490b98 Fix for MDL-12610: Ordering of jumps. Also fixed jump display for matching questions and a small display bug for matching questions. 2007-12-29 20:37:24 +00:00
moodler 37bff835b0 Automatic installer.php lang files by installer_builder (20071229) 2007-12-29 03:15:03 +00:00
stronk7 d0a2161941 Prevent race condition in event creation. MDL-5956.
Credit goes to Penny, Luke and Martin @ Catalyst.

Merged from MOODLE_17_STABLE
2007-12-28 18:39:50 +00:00
mchurch 757bc06941 MDL-12703 - Use the 'welcometocourse' language string if there is no 'welcomemessage' property set in the course object. Currently, there does not seem to be any code or data items that would set this property. 2007-12-28 17:10:34 +00:00
mchurch a20f71c7ef MDL-12704 - Added error handling to print_recent_activity() to prevent fatal errors in the case of missing files. 2007-12-28 15:56:21 +00:00
iarenaza 8a60457e13 MDL-12323 MDL-4061 Don't connect to the LDAP server if update external is not set for any field. 2007-12-28 12:03:12 +00:00
moodler 90dc0f3071 Automatic installer.php lang files by installer_builder (20071228) 2007-12-28 03:31:12 +00:00
mchurch 7cdb6ee4a9 MDL-12744 - Add ability to pass an extra button for use in print header for modules that use the course page to display themselves with blocks. 2007-12-27 21:25:19 +00:00
poltawski 5a8100234f MDL-12459 - fix missing quotes breaking navigation, thanks to Katja Krüger 2007-12-27 09:39:12 +00:00
skodak 1c6f3513d9 MDL-11927 setting proper cookie path - backported from MOODLE_19_STABLE 2007-12-26 23:02:30 +00:00
skodak fcfe44d8b4 MDL-11783 no uploads after finalising; backported from MOODLE_19_STABLE 2007-12-25 22:04:17 +00:00
skodak 28f18faa37 MDL-12338 prevent KSES from breaking í chars in alt/title tags - credit goes to Eloy; backported from MOODLE_19_STABLE 2007-12-25 20:57:23 +00:00
moodler 8e4a35943c Automatic installer.php lang files by installer_builder (20071225) 2007-12-25 03:14:48 +00:00
moodler 18284d3f65 Automatic installer.php lang files by installer_builder (20071224) 2007-12-24 03:18:52 +00:00
poltawski 45ee48d990 MDL-10611 - backslashes in username get doubled up with an nonsuccessful log in 2007-12-23 16:39:57 +00:00
poltawski abae4967bc MDL-10241 - unenrolling self wasn't working properly from user profile
because unenrol.php was doing wrong capability check when $userid set.o
Also improves the lanaguage used when unenrolling self.
2007-12-23 16:15:29 +00:00
skodak 6417390ca5 MDL-12705 disabled guest autoogin in upgrade scripts; backported from MOODLE_19_STABLE 2007-12-22 18:18:20 +00:00
nfreear 32db125642 Merged MDL-7493 further fix: strip_tags from title strings because the titles may have HTML in them.
-From Martin D/moodler in moodleblock.class.php - thanks.
2007-12-21 11:32:13 +00:00
moodler 13b78aa854 Automatic installer.php lang files by installer_builder (20071221) 2007-12-21 03:21:35 +00:00
poltawski 877c237cf5 MDL-12638 fixed typo, backported from MOODLE_19_STABLE 2007-12-20 16:20:09 +00:00
diml 8ed5c68a7f try update Zend directory to 1.9 equivalent 2007-12-19 22:08:24 +00:00
diml 54b9c5feb0 try update Zend directory to 1.9 equivalent 2007-12-19 21:59:41 +00:00
nfreear 03c03e08cc Followup for MDL-7493... - Finally the correct images! fix transparency, and improve contrast in Windows High Contrast Black mode. Merged. 2007-12-19 13:41:43 +00:00
mchurch 3dc3b31e77 Fixing warning that can break uploads. 2007-12-19 00:04:05 +00:00
nfreear 51f2cdd803 Fixes reopened MDL-7493... - foreground show/hide block icon/ALT text switched with Javscript. Merged. 2007-12-18 17:43:00 +00:00
tjhunt b12c6f2b1c MDL-12635 - Manual grading report does not check capabilites - also, only show the tabs for the reports people can access. Backported from MOODLE_19_STABLE. 2007-12-18 16:12:27 +00:00
moodler 2c15845dfb Automatic installer.php lang files by installer_builder (20071218) 2007-12-18 03:24:09 +00:00
skodak f4b987c7a4 MDL-12524 fixed quoting of phrases in mail header (problem with special chars in names of users); backported from MOODLE_19_STABLE 2007-12-17 21:40:25 +00:00
diml 61bfc7eaa1 Resolving MDL12577 2007-12-17 21:10:11 +00:00
skodak f6a9b4c9b8 MDL-12596 Timezone problem in PHPMailer RFCDate() Function - patch submitted by Leo Gaggl; backported from MOODLE_19_STABLE 2007-12-16 14:51:40 +00:00
skodak cd268329ef MDL-12597 fixed short php bugs; backported from MOODLE_19_STABLE 2007-12-16 14:14:42 +00:00
skodak 32b0172953 MDL-12581 fixed multiple xhtml strict; backported from MOODLE_19_STABLE 2007-12-15 16:06:44 +00:00
skodak 56d0ff42c0 MDL-8992 eoas hack added only when really needed, removed slow fullclone; backported from MOODLE_19_STABLE 2007-12-15 13:22:10 +00:00
stronk7 fc137768fd Version bump by delta. Modify some timezone fields to accept new olson files. MDL-12024 2007-12-14 23:33:03 +00:00
stronk7 5220582ed7 Modify some timezone fields to accept new olson files. MDL-12024 2007-12-14 23:27:27 +00:00
skodak 0b3cc31c2e MDL-12221 backported basic layout containers from MOODLE_19_STABLE - themes compatibility 2007-12-14 21:38:40 +00:00
toyomoyo e1cd6c73e5 MDL-9290, restore performance improvements on reading xml 2007-12-14 06:14:21 +00:00
diml 82df9925b8 Fixes MDL-12578
adding SEARCH_TYPE_LESSON and related keys to searchlib.
2007-12-13 21:42:32 +00:00
tjhunt bbe0467bff Fix Javascript error from essay questions on the review page. 2007-12-12 18:10:47 +00:00
toyomoyo 58c8f24909 MDL-12544, hide hidden roles in profile when user has no capability 2007-12-12 07:10:53 +00:00
toyomoyo a5c1df9bcf MDL-12550, wrong user count in role assignment 2007-12-12 03:30:50 +00:00
tjhunt b2744afe61 MDL-12542 - backup_todb not called on restore on date before it is inserted into mdl_user. This would cause a backup from a pre 1.7 site (or a pre 1.7 that has been upgraded to 1.9) to a 1.9 fresh install, to fail sometimes. Backported from MOODLE_19_STABLE. 2007-12-11 15:55:42 +00:00
nfreear 6d969cd512 Fixes MDL-12541 "Weeks course format - dates for each section should be marked up as heading". Merged. 2007-12-11 15:35:49 +00:00
scyrma 03c358e331 MDL-12528 - getElementById was misspelled. 2007-12-11 04:59:34 +00:00
stronk7 0db058ef58 Backporting MDL-12407 to 18_STABLE. Fix was missing there. 2007-12-10 09:37:34 +00:00
stronk7 1bc0bbb4ef Reverting latest commit that was breaking some sites
under MySQL. MDL-12427. http://moodle.org/mod/forum/discuss.php?d=86238
2007-12-09 23:28:24 +00:00
stronk7 32932231fd Deleting one "add course" button that shouldn't be there
if we aren't inside a category. MDL-12076
2007-12-07 23:53:59 +00:00
stronk7 9cdfe34923 MDL-12084. Using new cross-db sql_isnotempty() function. 2007-12-07 15:56:18 +00:00
fmarier 36c04a1bdb weblib: Fix typo in print_table() which was causing invalid <th> tag
MDL-11506
2007-12-07 04:58:35 +00:00
scyrma 73fcfef178 MDL-12321 : backport (excluding db changes) of patches in 11657 and 11606.
This should prevent the mass-mailing of forum digests from breaking in the
middle of a cron run.
2007-12-07 00:45:05 +00:00
mattc-catalyst f52a0de1c5 MDL-12433: course/info - missing context 2007-12-07 00:15:50 +00:00
moodler ea9af5b1a2 Automatic installer.php lang files by installer_builder (20071206) 2007-12-06 05:16:04 +00:00
toyomoyo 1ac5aabb2f MDL-12439, templates not imported in database preset import 2007-12-06 00:45:31 +00:00
diml ee7a11dc62 fixing security hole. reference : http://moodle.org/mod/forum/discuss.php?d=85748#p379857
Inaki Arenzana
2007-12-05 15:55:01 +00:00
martinlanghoff ca6f03263d datalib:get_my_courses() - fix CAST() to work in MySQL - MDL-12427
MySQL does not like CAST()s to VARCHAR. Change it to a CHAR() -- note
the lack of length definition -- which will do the cast without any
padding. That's what we are after, anyway.
2007-12-04 23:11:03 +00:00
martinlanghoff 77a53d26bb datalib: get_logs_user*() - fix invalid SQL - MDL-12426
Oracle does not accept column labels in the GROUP BY section -
get_logs_usercourse() and get_logs_userday() were computing the
day/hours column and using it in the GROUP BY. The compatible fix
is to reproduce the same computation in the GROUP BY section.

Credit for the fix goes to Dennis Rochford <Dennis.Rochford@usq.edu.au>.
2007-12-04 06:15:08 +00:00
martinlanghoff 414b66be32 blocks/online_users: Remove SQL "id,id" which causes errors on Oracle - MDL-12425
Credit for the fix goes to Dennis Rochford <Dennis.Rochford@usq.edu.au>
2007-12-04 06:13:47 +00:00
martinlanghoff b5558e5742 mod/assignment: Remove SQL "id,id" which causes errors on Oracle - MDL-12425
This loop also needs some rewriting - it is _very_ inefficient on
large courses.
2007-12-04 06:13:15 +00:00
martinlanghoff 9dbb215cf6 datalib:get_my_courses() - fix SQL compat Oracle - MDL-12427
One of the SQL queries in gmc is concatenating ctx.path with an id field.
Oracle barfs at the idea of casting the numeric id - so we CAST() it
explicitly, lest there be any confusion.

Credit for the fix to Dennis Rochford <Dennis.Rochford@usq.edu.au>
2007-12-04 06:07:12 +00:00
moodler 0a85b6161b Automatic installer.php lang files by installer_builder (20071204) 2007-12-04 05:21:30 +00:00
toyomoyo eb34ba19a9 MDL-12399, shorten_text() truncates all closing tags 2007-12-04 05:09:12 +00:00
fmarier 8a48b86836 ddllib: Mark table_column() as deprecated
Signed-off-by: Eloy Lafuente
2007-12-03 23:17:56 +00:00
stronk7 0196475e23 Adding some outer spaces to returned SQL to avoid wrong
sentences caused by concatenation.
2007-12-03 20:41:31 +00:00
stronk7 8245849ef9 Adding two new functions: sql_isempty() and sql_isnotempty() to perform
SQL comparisons to empties in a cross-db way. General solution for
problems like MDL-12084
2007-12-03 20:08:07 +00:00
nfreear 0b5a4199d0 Fixes bug MDL-12416, Help links - img ALT text should contain phrase "new window" to match link TITLE. Merged. 2007-12-03 16:47:23 +00:00
whchuang 3dd157d0ee MDL-12094. Added the /blocks/search/lang/en_utf8/block_search.php back based on the moodle 1.9 version 2007-11-30 02:13:44 +00:00
moodler 51528c6d6e New installer files added - stronk7
Backported from HEAD
2007-11-29 17:02:16 +00:00
moodler d07ae54371 file installer.php was added on branch MOODLE_18_STABLE on 2007-11-29 17:02:16 +0000 2007-11-29 16:59:26 +00:00
moodler 4f497b2c4e Automatic installer.php lang files by installer_builder (20071129) 2007-11-29 05:57:40 +00:00
toyomoyo 482221882b MDL-12289, fixing html strict for restore 2007-11-29 04:45:34 +00:00
toyomoyo fab9a8452a MDL-12346, lesson module GIFT import fails 2007-11-29 04:30:28 +00:00
urs_hunkler 0c7d5e2966 added missing pix 2007-11-28 16:14:07 +00:00
toyomoyo 50ab9935c0 MDL-10263, enable forum search for multiple groups 2007-11-28 07:49:55 +00:00
toyomoyo 1e81a1295e MDL-11818, single post forum descript = first post 2007-11-28 05:06:41 +00:00
arborrow 200f64d220 MDL-10523 - Removing DISTINCT from the query will enable the function to work with MSSQL which was having difficulty with the current syntax and should not impact other queries because the user id should already be unique. 2007-11-27 20:18:19 +00:00
nicolasconnault 1b1bd5929b MDL-8863 Initial page field was disabled when there were no entries in the wiki, making it useless. It is now always enabled 2007-11-27 13:29:36 +00:00
toyomoyo e489cc2f8d MDL-12331, hidden teacher should not be displayed in choice results 2007-11-26 05:58:21 +00:00
toyomoyo 827100874d MDL-12175, forum reset should delete attachments 2007-11-26 04:22:40 +00:00
toyomoyo 160684c811 fixing 2 restore problems 1) group sql is broken 2) sql could return multiple groups 2007-11-26 03:19:26 +00:00
toyomoyo afbb79e1c6 MDL-12081, teacher with import capability can not import course 2007-11-26 02:37:56 +00:00
gbateson 1cd4d9dffe fix MDL-12318: from Moodle 1.8 onward, the HotPot module has its own mediaplugin filter, because teh standard Moodle "filter/mediaplugin" can no longer insert media players into Javascript. 2007-11-26 00:14:54 +00:00
gbateson f548abb84c added new mediaplayer filter, because standard Moodle mediaplugin filter can no longer insert players into JavaScript. "mod/hotpot/mediaplayers/moodle/filter.php" mimics the behavior or the "filter/mediaplugin/filter.php" in Moodle 1.7 2007-11-26 00:12:56 +00:00
moodler 1f44541d17 Automatic installer.php lang files by installer_builder (20071125) 2007-11-25 03:54:21 +00:00
skodak 1cefec56ed MDL-12329 fixed last access when course not accessed yet - patch by Yolanda Ordóñez Rufat; backported from MOODLE_19_STABLE 2007-11-23 21:33:28 +00:00
moodler aeae7ec39d Automatic installer.php lang files by installer_builder (20071123) 2007-11-23 04:59:35 +00:00
toyomoyo 471e1be772 MDL-12320, problem viewing grades with separate groups 2007-11-23 04:12:12 +00:00
stronk7 3e5d5d5741 Deleting one ='' condition that isn't cross-db nor necessary. MDL-12186 2007-11-22 22:45:23 +00:00
scyrma f1deee8860 Replaces 'GMT' by 'UTC' where it showed in user interface and fixes MDL-9164. 2007-11-22 06:39:11 +00:00
toyomoyo c08b2ecf09 turn the block of if $CFG->messaging if off 2007-11-22 01:15:38 +00:00
toyomoyo fae700ba1c MDL-10028, adding a string 2007-11-22 01:03:30 +00:00
nfreear 7b8cd330a3 Fixes reopened bug MDL-7472, "Explicitly label radio buttons in Survey" - removes use of USER->screenreader using get_accesshide + many other accessibility fixes. MERGED. 2007-11-21 15:26:19 +00:00
toyomoyo 5645145115 MDL-10294, MDL-10028, changing messaging/bulk messaging system 2007-11-21 07:46:45 +00:00
diml ad91f3744e fix unchecked foreach loops 2007-11-20 23:25:46 +00:00
diml 7bf21a5064 fix table name for deletion of indexes before regeneration 2007-11-20 23:25:22 +00:00
tjhunt 3b37251a8a MDL-12282 - Numerical question type - the units are displayed on the editing form with a stupidly large number of decimal places. 2007-11-20 16:56:53 +00:00
ethem 80d7317a79 Fixo 2007-11-20 14:25:20 +00:00
ethem 47d75826be Fix for Canadian Postal Code
http://moodle.org/mod/forum/discuss.php?d=81736
2007-11-20 13:41:49 +00:00
moodler 8478d321ec Automatic installer.php lang files by installer_builder (20071120) 2007-11-20 05:14:28 +00:00
mattc-catalyst 9e9511ca48 MDL-12264 - course/info: check if course is hidden before displaying info about it.
Author: Matt Clarkson <mattc@catalyst.net.nz>
2007-11-20 02:36:53 +00:00
stronk7 451761a403 Some question formating... 2007-11-20 00:05:16 +00:00
nfreear f5a587ce76 Initial fix for MDL-12256, "Course AJAX has very poor accessibility - ALT text" - test, imgAttributes.length NOT attributes.length. Merged. 2007-11-19 17:11:51 +00:00
scyrma ffb13064dc MDL-3632 : this prevents people without mod/forum:viewhiddentimedposts to see hiddentimedposts. 2007-11-19 05:10:42 +00:00
iarenaza d359ac1491 MDL-11099 and MDL-11655 Don't show external db password in clear 2007-11-18 12:43:11 +00:00
moodler 7521250967 Automatic installer.php lang files by installer_builder (20071118) 2007-11-18 04:45:49 +00:00
mchurch 0b0f2f864b MDL-12016 Category text not being sent to 'create_category_path'. 2007-11-15 14:04:22 +00:00
mchurch ed0acd0904 MDL-12015 Import question count was wrong. 2007-11-15 13:40:13 +00:00
bobopinna b3f877de05 MDL-12161 Stripped slashes in LO titles 2007-11-15 08:41:51 +00:00
bobopinna 552254834b MDL-12161 Stripped slashes in LO titles 2007-11-15 07:54:37 +00:00
toyomoyo 894722ed9c MDL-12180, blocks capabilities not appearing when overriding block roles 2007-11-15 07:43:49 +00:00
toyomoyo dcc09c507e MDL-12160, do not force context creation when calling get_coursemodule_info() as context_rel table might not exist yet 2007-11-15 07:20:52 +00:00
toyomoyo da76b7ee70 MDL-8330, adding a warning to translators about updating of lang packs 2007-11-15 01:15:11 +00:00
tjhunt 3a041e458c Delete commented-out code that was actually not commented out properly, and so caused warnings. 2007-11-14 14:48:13 +00:00
bobopinna 134f59345f MDL-12118 Fixed learner_response report. It was changed by SCORM2004 3rd Ed. specification 2007-11-14 11:37:13 +00:00
bobopinna 1769403fbd Fixed MDL-11914 2007-11-14 09:49:39 +00:00
toyomoyo eb923b5cc1 MDL-4279, calendar double message lesson opens lesson closes 2007-11-14 07:15:20 +00:00
martinlanghoff 8e9fca4fff htmlarea: fix in FF - MDL-11242
The previous fix for IE left some problems in the FF side of
things because we were trying additions/substractions on
width once its had turned to a string of value + unit.

Do the math before we attach 'px' to it...
2007-11-14 02:48:17 +00:00
fmarier bcc37dd0c1 mod/quiz: Revert commit which added the "go back to course" link 2007-11-14 01:13:00 +00:00
mchurch 58e84d7044 MDL-11991 Fixing error on undefined method while using the manual plug-in. 2007-11-13 18:02:28 +00:00
mchurch c58364c3d3 MDL-12149 Added code to check for selected group as well, so that privileged users get correct count when changing groups. 2007-11-13 16:46:16 +00:00
arborrow f6a54f01e3 MDL-11743 - SHOW LOCAL VARIABLES more accurately returns database character set on some hosts and makes explicit what is normally the default behavior. 2007-11-13 16:00:40 +00:00
mchurch 678530de2b MDL-12114 Fixed typo in elements array. 2007-11-13 15:53:02 +00:00
mchurch ca6e796485 MDL-11646 Simplified. 2007-11-13 15:00:10 +00:00
mchurch 5d6dccfa8e MDL-11646 Cycled through all roles for a user, using role_unassign for reach role, when deleting the user. 2007-11-13 14:31:00 +00:00
sam_marshall e941d7248b MDL-12030 Double quotes used accidentally instead of single 2007-11-12 11:43:34 +00:00
gbateson fec02d75b9 fix for MDL-9713 : use XMLDB functions to create tables when mod/hotpot/db/mysql.sql is not found. This allows upgrade direct from Moodle 1.5 (or earlier) to Moodle 1.8 (or later) 2007-11-12 08:49:41 +00:00
martinlanghoff ab7005bfa4 htmlarea: Fix fullscreen editor on IE6/7 -- MDL-11242
Only say px if the width is a pure number. Under IE we
get the "100%" for the width of the editor, so blindly
appending "px" results in a JS execution error.

With this patch we only attach px if it's a pure int.

Also tested the sizing of HTMLArea in the messaging
window. So both should be working now.
2007-11-12 04:08:20 +00:00
urs_hunkler 2dd8e071a8 added missing "if ($heading)" to suppress empty page header. 2007-11-11 09:33:33 +00:00
mark-nielsen e041eb354e Fix for MDL-12088: Error occured when no feedback was entered into the question by the author 2007-11-11 01:14:03 +00:00
skodak d6358f2d18 MFC: MDL-12079 fixed use of clean_param() 2007-11-10 14:51:34 +00:00
skodak 6ba9ac7e71 MFC: MDL-12092 removed newline chars, we do not know the admin's platform, one line should be ok IMHO. 2007-11-10 14:38:24 +00:00
stronk7 5e1cef5b04 Adding lang support within profile fields to make them selfcontained. 2007-11-09 19:08:31 +00:00
toyomoyo 5789b52a35 MDL-11235, Gradebook Items with Grade of "0" not included in Total % calculation 2007-11-09 07:46:43 +00:00
toyomoyo eab947dabd MDL-12043, check existance of xyz_grades() functionsy 2007-11-09 05:43:53 +00:00
toyomoyo 2b2cdcd504 MDL-12065, do not force parents to enrol in student courses 2007-11-09 01:37:07 +00:00
fmarier d4833f2103 Add missing fields when upgrading/installing on Postgres
mod/exercise, mod/scorm and question/type/rqp
MDL-12023
2007-11-09 01:22:25 +00:00
fmarier f285e9514a mod/quiz: Add a link back to the course page after a quiz is completed 2007-11-09 01:07:17 +00:00
poltawski fc05711af3 MDL-12070 - PARAM_CLEANHTML strips magic quotes.. 2007-11-08 22:17:44 +00:00
diml 603042b740 General syncback from HEAD branch (2.0) 2007-11-08 20:13:14 +00:00
diml 386aed2335 General syncback from HEAD branch (2.0) 2007-11-08 20:00:50 +00:00
poltawski 4e48f83df8 MDL-12070 - re-enable the use of HTML in choice options 2007-11-08 18:25:49 +00:00
toyomoyo 7b57c10fb9 MDL-12061, <p> in html editor breaks xhtml strict 2007-11-08 05:36:21 +00:00
moodler 1ea523a8b1 Automatic installer.php lang files by installer_builder (20071108) 2007-11-08 05:21:53 +00:00
nicolasconnault 34d1510980 MDL-11790 Fixed hard-coded strings. Merci Nicolas! 2007-11-08 05:17:22 +00:00
urs_hunkler db6988d87f In the first table column class="header" was missing. 2007-11-07 18:08:00 +00:00
ethem c5edbc12e8 Fix for refactoring
Fatal error: Call to undefined method enrolment_plugin_authorize::print_enrolmentkeyfrom() in /usr/local/www/data/moodle/enrol/manual/enrol.html on line 7
2007-11-07 15:51:45 +00:00
moodler fa9e2d8b58 Merged simple grammar fix from 1.7 2007-11-07 07:13:35 +00:00
nicolasconnault 57aafd33f7 MDL-8853 Applied Ann's Patch 2007-11-06 13:38:34 +00:00
toyomoyo c9ff03bdf4 fixing bogus $scoid 2007-11-06 05:40:01 +00:00
toyomoyo e967dcc1a7 MDL-10509, LDAP username to be always in lowercase 2007-11-06 00:59:04 +00:00
nicolasconnault 15fbde6aee MDL-8992 Now only appearing once per page, and XHTML compliant. Also removed an ugly browser-sniffing css hack from the quicktime plugin, and applied the same browser detection as for the other plugins 2007-11-05 14:10:38 +00:00
toyomoyo 50b474966c MDL-12006, commenting out a line that doesn't seem to do anything 2007-11-05 02:17:28 +00:00
moodler eeb28d3ff4 New installer file added to CVS repo. 2007-11-04 17:06:59 +00:00
moodler 0f4452fcd0 file installer.php was added on branch MOODLE_18_STABLE on 2007-11-04 17:06:59 +0000 2007-11-04 17:05:25 +00:00
moodler 343c223111 Automatic installer.php lang files by installer_builder (20071103) 2007-11-03 05:06:50 +00:00
stronk7 726f2a45dc There was a mistake in the dir being created. It must be
the backup temp area one. MDL-11912
2007-11-02 13:01:02 +00:00
stronk7 6f23f8985a Changed check_dir_exists() behaviour to be more robust
and to work better when used recursively under sites
with open_basedir enabled. Credit goes to René Samselnig. MDL-11437
2007-11-02 09:50:33 +00:00
skodak 752569765e MDL-11999 reset the cap cache after switching role so that the first page gets correct permissions 2007-11-02 08:25:10 +00:00
donal72 0570c31a3b Propagate additional error info about XML parse failures 2007-11-02 00:14:11 +00:00
donal72 d1bbb75333 More error info about XML parse failures 2007-11-02 00:12:59 +00:00
donal72 9822b38f10 Initialize the $message variable properly this time. 2007-11-01 21:30:25 +00:00
donal72 dc2ea6fb26 Revert: Initialize the $message variable 2007-11-01 21:27:51 +00:00
stronk7 941f70858d Unsetting one white border. 2007-11-01 20:07:19 +00:00
nicolasconnault 3b0dc8cd12 MDL-11790 Added missing strings 2007-11-01 14:51:27 +00:00
nicolasconnault 5358318b6f MDL-8992 Added a simple script from http://mar.anomy.net/entry/2006/11/24/02.12.18/ to the mediaplugin filter output. Works like a charm on all tested browsers 2007-11-01 13:58:44 +00:00
nicolasconnault e88bc4a2c1 file eolas_fix.js was added on branch MOODLE_18_STABLE on 2007-11-01 13:58:44 +0000 2007-11-01 13:52:15 +00:00
nicolasconnault 4970ebb19c MDL-11328 added the missing variable 2007-11-01 09:29:12 +00:00
nicolasconnault a6ec1e9dd0 MDL-11912 Creating 1000's layer directory first, then userid directory: no need for recursion 2007-11-01 08:45:22 +00:00
donal72 e0033fb83c Test for empty dataset to suppress a warning 2007-11-01 06:13:19 +00:00
donal72 c5fbfafa62 Initialize the $message variable 2007-11-01 05:02:31 +00:00
pichetp 5e0da4b5ee MDL-11867 setting real null when response is null in calculated question merged from
head
2007-11-01 00:36:04 +00:00
nicolasconnault 4b952ed3ff MDL-11912 Removed recursive param 2007-10-31 19:04:26 +00:00
tjhunt c28f197deb MDL-10284 - wrong language string used on the quiz view page to inform students of the quiz deadline. I took the opportunity to strip out an unnecessary HTML table, and reviewing uses of the string /quiz(open|close)s?/ found one other inconsistency on the quiz editing form. 2007-10-31 17:08:38 +00:00
tjhunt b63b4c2c19 MDL-11624 - /mod/quiz/index.php too dependant on individual course format names. I basically changed it to do the same as the forum module. 2007-10-31 16:41:42 +00:00
nicolasconnault 1994116184 MDL-11912 Removed recursive param 2007-10-31 15:20:34 +00:00
moodler d2d4b56c83 Automatic installer.php lang files by installer_builder (20071031) 2007-10-31 04:34:57 +00:00
pichetp 439e93b27f solving MDL-7496 for calculated merged from head 2007-10-31 02:44:34 +00:00
pichetp 5234b78232 solving MDL-7496 for calculated merge from head 2007-10-31 02:34:33 +00:00
tjhunt cc701ed021 MDL-9375 (and dups) - Each attempt builds on last with multi-page quizzes gives the wrong score on the second attempt. It turns out that this was already fixed in Moodle 1.9 (part of commit 1.115 -> 1.116) so I have just backported the relevant changes. I have tested that this fixes the reported problem. I have not had time to test that it does not break one of the other billion possible combinations of settings possible with the quiz. Code review and testing welcome. 2007-10-30 18:22:28 +00:00
tjhunt 06ff2489ae Fix notice. 2007-10-30 17:52:43 +00:00
tjhunt aac7fcb6fe Unit tests for MDL-9295 - clean_param with PARAM_URL/PARAM_LOCALURL. 2007-10-30 10:46:01 +00:00
tjhunt 9f34d8341a MDL-9295 - PARAM_URL/PARAM_LOCALURL does not accept http://localhost/ or other hosts on lans. 2007-10-30 10:15:02 +00:00
tjhunt 921899fc20 MDL-11462 fixed PARAM_URL inline focs, uncommented old regex in URL validation library - official TLD not required anymore. Backported from MOODLE_19_STABLE. 2007-10-30 10:11:24 +00:00
toyomoyo f3768c4094 making multibyte filename appear correctly under IE download 2007-10-30 00:32:27 +00:00
mchurch 24ec59cd3c Removing the questionnaire language file from main release. 2007-10-29 21:27:03 +00:00
skodak 47b0cf06a3 MFC: MDL-11904 deny/accept Email settings conflict with text - now .example.com means all subdomains 2007-10-29 20:17:08 +00:00
mchurch 7a3fa1280f Removing the questionnaire language file main release. 2007-10-29 19:48:58 +00:00
tjhunt 2628f0bc16 MDL-11416 - Support for nonsortable columns in table lib. Backported from MOODLE_19_STABLE so that the fix for MDL-5262 works. 2007-10-29 15:25:09 +00:00
poltawski 070a606c68 MDL-11813 - Use existing group setting strings on course edit form so can be
better translated. Patch from Daniel Miksik

Merged from MOODLE_19_STABLE
2007-10-29 09:49:53 +00:00
poltawski 8ef593442b MDL-10810 silence warnings in PHP 4.x - the last param was added in PHP 5.0.2
copied apporach used further up file.. yukyukyuk
2007-10-29 00:58:01 +00:00
moodler 83a66c9f3b Automatic installer.php lang files by installer_builder (20071028) 2007-10-28 05:12:00 +00:00
tjhunt f312622c4e MDL-11825 - Force penaltyfactor to 1 for truefalse questions on GIFT import, as is done on the editing form. 2007-10-25 09:42:19 +00:00
danmarsden 5fa1dcdb43 MDL-11397 bug with IE 6 not displaying anonymous results correctly.
merged from HEAD
2007-10-24 21:33:16 +00:00
whchuang f2c0c26767 Fixed MDL-10506 Hide/Show Advanced button does not toggle in IE and Safari when edit profile 2007-10-23 22:12:57 +00:00
moodler f96fdd4505 Automatic installer.php lang files by installer_builder (20071023) 2007-10-23 05:10:33 +00:00
arborrow 4e36e57bcb MDL-11869 - javascript syntax error was preventing the call to the calc function. Adding in the double slashes around CDATA resolves the problem. 2007-10-22 20:29:45 +00:00
tjhunt dc99997eac MDL-11708 - Zero answers are not allowed in Matching questions - sometimes I hate PHP. 2007-10-22 16:56:24 +00:00
tjhunt 32a6bb301e MDL-11824 - Literal asterisk (\*) in shortanswer question not handled correctly by get_correct_responses + Unit tests. 2007-10-22 15:36:50 +00:00
gbateson b1062ec362 improve XHTML compatability of HotPot reports; correct termination of <input> tags in JCloze and JQuiz 2007-10-22 01:36:20 +00:00
moodler 14a6c97e6c Automatic installer.php lang files by installer_builder (20071021) 2007-10-21 04:21:13 +00:00
gbateson a78a688961 improvements to XHTML compatability in index.php:
(1) remove unnecessary quote in <form ";
(2) change </A> to lowercase;
(3) correctly terminate <input .. /> and <img /> tags;
(4) change & to &amp; in URLs
2007-10-21 02:33:10 +00:00
gbateson 661b8d9dec improvements to XHTML compatability:
(1) lib.php: change "&" to "&amp;" in URLs in "hotpot_print_show_links" function;
(2) mod.html: change size=40 to size="40", remove obselete </span>, change nowrap to nowrap="true", change "&" to "&amp;" in URLs;
(3) view.php: add closing </div> tags for "page" and "content" divs, change "&" to "&amp;" in URLs;
(4) template/v6.php: change "<=" to "&lt;="in strLastQCaption, change  "=>" to "=&gt;" in strNextQCaption
2007-10-21 02:09:28 +00:00
skodak 909abddce3 MFC: MDL-8605 fixed user image restore code 2007-10-20 21:04:27 +00:00
skodak 5678d4e4fa MFC: MDL-11857 missing addslashes on idnumber field during backup restore 2007-10-20 19:29:41 +00:00
skodak ee9568e574 MFC: MDL-11857 missing addslashes on idnumber field during backup restore 2007-10-20 19:29:02 +00:00
stronk7 60b5a1e50a Booleans are not always transformed to 0 /1. This was preventing install
under mysqli. Define block->multiple if needed.
2007-10-19 17:36:19 +00:00
stronk7 44f2b37760 Adding support to course/formats from within the editor. MDL-11842 2007-10-19 16:48:02 +00:00
poltawski c3b4148b48 MDL-11840 - curl was set to use CONNECTs for all http requests. This is disallowed
by most http proxies to prevent tunneling. Added some debugging in case of failure.

merged from MOODLE_19_STABLE
2007-10-19 14:48:38 +00:00
poltawski 8569a0b96f MDL-11766 download_file_content is quite broken with proxies - lacking global
CFG definition, so must never have worked, also incorrectly specified proxyhost..

Merged from MOODLE_19_STABLE
2007-10-19 11:46:58 +00:00
toyomoyo 1b14f9daf5 MDL-11667, admin blocks page should not count blocks not placed on courses 2007-10-19 07:52:16 +00:00
toyomoyo 0d2521b4d3 MDL-11831, gradebook will not show all participants when groups are defined but groupmode not set 2007-10-19 06:50:57 +00:00
toyomoyo 29a8cc034b MDL-9059, broken sql in calendar_set_filters() 2007-10-19 02:27:27 +00:00
donal72 5862de1d22 Remove reference to other applications from the Moodle 1.8 source. This is a 1.9+ feature. 2007-10-19 00:45:56 +00:00
toyomoyo 2022d08058 MDL-11241, adding logs for roles management 2007-10-18 05:45:14 +00:00
moodler e3d945e86a Automatic installer.php lang files by installer_builder (20071018) 2007-10-18 05:39:03 +00:00
donal72 b3225d1a2f Laying groundwork for more Mnet error reporting 2007-10-17 08:14:17 +00:00
donal72 d029c122af Rewrite testclient.php to be a service browser for remote Moodles. This should be useful to people who are trying to connect to the API from non-Moodle hosts, or write software to connect to Moodle. MDL-10214, MDL-10174, MDL-10172, MDL-10171 2007-10-17 08:11:29 +00:00
donal72 eb1bf09594 Change reflection methods to only report on methods that are being published to the inquiring host (instead of all methods that could be published). MDL-10214, MDL-10174, MDL-10172, MDL-10171 2007-10-17 08:07:24 +00:00
toyomoyo 6fdadd110b MDL-11687, the string 'capability' should not be translated in the links to capabilities docs page 2007-10-17 05:35:36 +00:00
toyomoyo b57ddf7b1d MDL-11687, the string 'capability' should not be translated in the links to capabilities docs page 2007-10-17 05:29:56 +00:00
tjhunt 3c7d829b22 MDL-5262 - PHP notice when sorting on R% coloumn in the Item analysis report - I adopted the simple solution of stopping people sorting on that column, since it is the same as sorting on rcount, I think. Backported from MOODLE_19_STABLE. 2007-10-16 21:26:38 +00:00
donal72 4a1db8bd3d Log error code and text in mnet_server_fault_xml function. MDL-10196 2007-10-16 14:02:17 +00:00
donal72 ed548587ab Label for wwwroot field 2007-10-16 10:19:34 +00:00
donal72 dbd1755a42 MDL-11329: fixed text: "Local courses for external users:" 2007-10-16 09:14:25 +00:00
skodak 09d1d1ac2e MDL-10535 Categories with quote in name cannot be added 2007-10-16 09:01:56 +00:00
donal72 90f3a22a0b More helpful MNet error messages in debug mode 2007-10-16 09:01:46 +00:00
donal72 753775479c MDL-11040: get_complete_user_data doesn't get the complete user data. Replace with get_record to bring over the user's description. 2007-10-16 08:50:41 +00:00
skodak c47b3a935b MDL-11759 missing RISK_XSS in manage groups capability 2007-10-16 08:42:51 +00:00
donal72 2eff9d1367 Removed a constraint that caused mnet to fail on clusters, vservers and other network configurations where the mnet client's hostname (as specified in the wwwroot) resolves to an IP address that differs from the IP address that it uses to contact other hosts. This should address MDL-10672 2007-10-16 08:00:03 +00:00
toyomoyo 1437b25532 fixing a warning 2007-10-16 04:33:04 +00:00
toyomoyo 4e39b6ff35 MDL-9059, admins don't see group event in course 2007-10-16 03:45:32 +00:00
thepurpleblob 01c48affff MDL-11769:
question name is properly truncated to less than 255 characters tom
stop PostGRES choking.
2007-10-15 13:48:48 +00:00
nfreear d6949b0238 Follow up fix for MDL-11436 'Encapsulate "accesshide" HTML class in function', and use. Merged. 2007-10-15 10:11:39 +00:00
nicolasconnault f60ecf6045 MDL-10905 iterating properly through readdir() 2007-10-15 05:42:36 +00:00
toyomoyo f0af72d2f9 MDL-10353, adding couse variable to nav bar in calendar preferences 2007-10-15 04:45:38 +00:00
moodler 9f51b7c925 Automatic installer.php lang files by installer_builder (20071015) 2007-10-15 04:31:36 +00:00
gbateson 4ad794c524 where the correct responses on a JQuiz multiple choice question all have a score of 0%, the scores will be corrected to 100% 2007-10-15 00:55:51 +00:00
skodak 4aec47adba MDL-8605 eh, forgot to undo some testing code before commit, sorry 2007-10-13 22:14:38 +00:00
skodak f38de13d68 MDL-8605 quick fix for broken user pix upgrade 2007-10-13 22:05:17 +00:00
mark-nielsen e6096b71e5 Fix for MDL-11684 2007-10-13 03:05:41 +00:00
mark-nielsen 8a789e52cc Fix for MDL-11696 2007-10-13 02:24:56 +00:00
mark-nielsen bbb0032181 Fix for MDL-11636 2007-10-13 01:54:25 +00:00
nicolasconnault 3751aaf098 MDL-8605 Backup and restore implemented, and using remove_dir instead of rmdir, which doesn't support deleting non-empty directories 2007-10-12 20:26:44 +00:00
nfreear 75e27a12be MDL-11695, Skip block links inaccessible for many keyboard-only users. Merged. 2007-10-12 09:18:22 +00:00
nicolasconnault c19977a6f5 MDL-8605 Minor typos and version.php fix 2007-10-11 14:16:32 +00:00
nicolasconnault 3d6d2b8153 MDL-8605 New user directories implemented 2007-10-11 13:19:53 +00:00
toyomoyo 7f4ea06814 MDL-9059, fixing students can't view group entries in calendar 2007-10-11 07:59:23 +00:00
moodler 3dda8f3cf3 Bumping post-1.8 2007-10-11 06:53:05 +00:00
moodler d78ec260b2 Bumping to new release 1.8.3 2007-10-11 06:22:27 +00:00
toyomoyo 0572e4291d MDL-10353, calender redirection broken when editting and exporting 2007-10-11 05:22:49 +00:00
moodler 8bc1d327c2 Automatic installer.php lang files by installer_builder (20071011) 2007-10-11 04:19:47 +00:00
iarenaza e0f57f0d56 Fix MDL-11632: Multiple files with emtpy lines outside PHP open/close tags
There are multiple issues with Moodle files containing empty or blank lines
(lines consisting of white spaces or tabs only) and/or white space before or
after the PHP open and close tags, notably with config.php and theme files.
2007-10-10 21:09:18 +00:00
jmg324 6886503616 merged from HEAD 2007-10-10 16:05:18 +00:00
tjhunt bc93860e9f MDL-11703 - escaped *'s in shortanswer answers were not matching properly. 2007-10-10 15:26:22 +00:00
nicolasconnault 1ffd2c0ac6 MDL-11608 Removed stripslashes_safe($rename) and changed PARAM_RAW to PARAM_TEXT for rename param 2007-10-10 04:59:52 +00:00
moodler e1be60d66c Automatic installer.php lang files by installer_builder (20071010) 2007-10-10 04:49:33 +00:00
nfreear 727031451d Fixes MDL-11676, Skip block links are broken in Internet Explorer 6. Merged. 2007-10-09 15:51:39 +00:00
tjhunt 947d3349ab MDL-9076 - Move the 'Add 3 more overall feedbacks' button inside that group of elements on the quiz settings form.
To make this possible, I added an extra argument to the repeat_elements method, which other people may find helpful on other forms.

backported from HEAD.
2007-10-09 15:45:11 +00:00
nicolasconnault 2bb9c62bf8 MDL_11608 The $rename param was obtained with PARAM_NOTAG, I changed that to PARAM_RAW. I also changed the rename field's value to htmlspecialchars($category->name) 2007-10-09 14:13:21 +00:00
thepurpleblob b65f805a91 MDL-11514:
Link to missing word information and help file removed. There
was no extra help.
2007-10-09 10:28:47 +00:00
thepurpleblob 4bc522672d MDL-11515:
Help file is not used.
2007-10-09 10:21:09 +00:00
thepurpleblob 1bb56f97c5 MDL-11425:
Process the text properly for the category path.
2007-10-09 10:08:36 +00:00
nfreear a11b2d8e72 Fixes MDL-11648, "Required" is inappropriate text for legend in user profile edit form. Merged. 2007-10-08 13:58:24 +00:00
gbateson 5a1920568c added escaping of quotes in TimesUp message, so that apostrophes do not cause Javascript errors 2007-10-08 06:32:05 +00:00
skodak dd85612a17 MDL-11448 FirstClass Authentication does not hold settings and has cosmetic and info leakage issues, patch by Dan Trockman; backported from HEAD 2007-10-07 14:10:51 +00:00
skodak 7e2aced51d MDL-11304 remerging fixes 2007-10-07 13:31:59 +00:00
moodler fe6e5f35b5 Added some require_logins to set up themes and lang MDL-10833 2007-10-07 09:25:51 +00:00
moodler de3499d458 Fixed the theme problem on activity reports MDL-10833 2007-10-07 09:15:37 +00:00
pichetp 26b131922b checking that there remain $oldwrappedids before deleting them lines 87-..
add         if(is_array($oldwrappedids) && count($oldwrappedids)){
2007-10-06 21:06:21 +00:00
pichetp f67882c305 missing global $CFG ; line 577
function save_dataset_items($question, $fromform){
global $CFG;
2007-10-06 19:10:28 +00:00
nicolasconnault eed1c7ca5b MDL-11525 When courseid is not present in the log entry, showing "Site" instead of $log->info 2007-10-05 07:19:29 +00:00
toyomoyo 34a2acfc72 MDL-11308, wrong capability check in print_user() function 2007-10-05 07:18:11 +00:00
toyomoyo bb0aa83341 MDL-10353, calender export not handling course variable correctly 2007-10-05 03:51:37 +00:00
toyomoyo dfae0ffa1b modinstance fed with wrong cmid, thanks shane 2007-10-05 03:27:23 +00:00
stronk7 c194ca1c70 MDL-11597. Backported from HEAD to 18_STABLE 2007-10-04 22:18:27 +00:00
whchuang 90b52b9486 added missing string definition for sectionerror. Fixed MDL-10401 2007-10-04 18:29:13 +00:00
gbateson b0e29954ae slight adjustment to the previous modification so that Hot Potatoes navigation buttons are removed when navigation is set to "Moodle navigation frame" 2007-10-04 05:29:12 +00:00
moodler ebd7bc06ce Automatic installer.php lang files by installer_builder (20071004) 2007-10-04 05:23:43 +00:00
toyomoyo 167a831615 MDL-10353, after setting preferences in calendar user should return to same course 2007-10-04 05:12:16 +00:00
gbateson efedb70895 in order to allow hotpots to appear in a frame when navigation is set to "Moodle navigation frame", it is necessary to use target="$CFG->framename" instead of CFG->frametarget 2007-10-04 05:11:07 +00:00
toyomoyo 3f9fd1987c MDL-10353, (calendar) accidentally backported new stuff from HEAD 2007-10-04 03:00:25 +00:00
tjhunt 048373691e MDL-10843 - Backporting lang string search changes from HEAD, so question type plugins can have their help file inside their lang folder. 2007-10-03 14:01:08 +00:00
exe-cutor baa0b3ceae Removed requirement for email, givenname and surname attributes 2007-10-03 12:32:55 +00:00
moodler e289bd8030 Automatic installer.php lang files by installer_builder (20071003) 2007-10-03 05:16:57 +00:00
toyomoyo 509f876de8 MDL-10353, fixing 2 more raised calendar issues 2007-10-03 04:20:14 +00:00
whchuang 6e21779482 added missing string definition for sectionerror. Fixed MDL-10766 2007-10-03 00:04:04 +00:00
tjhunt b65a82e1a4 MDL-8682: Pressing enter when answering a short answer question can submit the wrong one. To fix this, I have disabled the enter key unless the keyboard focus is on a submit button (or inside a text box or HTML editor).
MDL-9451: Quiz answers can be lost if user navigates before page reloads. I am not totally sure I have fixed this, but I hope so. I moved the printing of the hidden form field with the list of questions on the page to the end of the form, so no answers will be processed unless the whole form loaded. Note that you could still lose data, but only if the page takes a really long time to load and you answer the first question and click submit before the whole quiz is loaded.

Backported from HEAD.
2007-10-02 21:03:39 +00:00
tjhunt f6fc4e1891 PHP docs for choose_from_menu function. 2007-10-02 18:47:46 +00:00
nfreear a4bc586138 Fixes MDL-11161, Activity type text added to beginning of activity links in Screen Reader... (also MDL- 7436) 2007-10-02 09:28:55 +00:00
gbateson f0bcc27f90 removed duplicate declaration of "hotpot_stripslashes" function 2007-10-02 07:39:11 +00:00
donal72 75bbcfb74f Bugfix caused by typo in /mnet/lib.php: This issue will have broken mnet for many users. 2007-10-02 06:44:07 +00:00
toyomoyo 014c522eb8 MDL-10353, calendar not keeping course id in url, backporting MDL-10084 2007-10-02 06:26:57 +00:00
donal72 f99f716464 Bugfix caused by typo in /mnet/lib.php: This issue will have broken mnet for many users. 2007-10-02 06:21:26 +00:00
gbateson b1b4cdb7d8 use new function "hotpot_stripslashes()" instead of PHP's "stripslashes()" to remove slashes after preg_replace with "e" modifier, because when MSSQL Server is installed, PHP's "stripslashes()" does not remove slashes, even if the Moodle database is not MSSQL 2007-09-30 04:15:50 +00:00
skodak dda3fc5779 MDL-11472 fixed harcoded mdl_ prefix in sql queries; backported from HEAD 2007-09-27 08:41:55 +00:00
tjhunt 4e557706d3 MDL-5327 - When making up a default question name from the question text, strip any HTML tags. 2007-09-27 06:53:59 +00:00
tjhunt 0556edaf60 MDL-9331 - Problem with the tables on the quiz index page. 2007-09-26 20:44:58 +00:00
tjhunt 231e409849 MDL-5086 - Improve the formatting of the question import and export help so that the code samples fit. 2007-09-26 20:12:39 +00:00
tjhunt e7c9105d26 Tweak the styles for <pre> tags in help files. These are mostly used for code samples, and they have a grey background and are shown in a different font, so the indent I am getting rid of is not necessarly to make the structure of the document clearn, and usually just means that the code sample does not fit. 2007-09-26 20:09:47 +00:00
nfreear 8323fb4279 Follow-up for MDL-1149 Accessibility: Current week/topic is NOT indicated non-visually. Reorder. 2007-09-26 12:54:54 +00:00
nfreear 28e95b14e2 Follow-up for MDL-1149 Accessibility: Current week/topic is NOT indicated non-visually, only in styling. Prefer "This week" to "Current week" 2007-09-26 10:58:42 +00:00
tjhunt df4847fc1b Get rid of duplicate $Id$ tags. 2007-09-26 10:23:10 +00:00
tjhunt e0e0c00e94 Add $Id$ tags. 2007-09-26 10:13:28 +00:00
tjhunt e19f5f4ce5 Get rid of duplicate $Id$ tags. 2007-09-26 10:11:23 +00:00
tjhunt f5f696be2a MDL-11446 - when a set of radio buttons is a required field, don't colour the lables of all the individual radio buttons red. Backported from HEAD. 2007-09-26 10:07:48 +00:00
gbateson 36d38823c0 change CONTEXT_MODULE to CONTEXT_COURSE in order to fix "Invalid context creation for level 50 instance" error on "mod/hotpot/index.php" caused by get_context_instance(CONTEXT_MODULE, $course->id) in "mod/hotpot/lib.php" 2007-09-26 07:19:51 +00:00
skodak fadd42e097 MDL-11434 $CFG->filelifetime = 0 has no effect; patch by Chris Fryer; backported from HEAD 2007-09-25 19:09:08 +00:00
nfreear 23ae278546 Fix MDL-7436 Accessibility "Indicate type of resource in the name of the resource". Merged 2007-09-25 15:36:43 +00:00
skodak f86c86269e MDL-11413 I hope now it is correct solution; backported from HEAD 2007-09-25 14:05:16 +00:00
nfreear 89eccbccb2 MDL-1149 Accessibility: Current week/topic is NOT indicated non-visually, only in styling. Merged. 2007-09-25 12:08:19 +00:00
nfreear 5d88d553ef MDL-11436, Encapsulate "accesshide" HTML class in function, and use. Merged. 2007-09-25 11:39:55 +00:00
nfreear caba817fe7 Partial fix of reopened MDL-7436 Accessibility: "Indicate type of resource in the name of the resource" 2007-09-24 17:29:01 +00:00
skodak 419b95d2ad MDL-10729 Active tabs are now marked inactive; backported from HEAD (and fixed commit message :-( ) 2007-09-24 17:15:31 +00:00
nfreear 61bb817fd2 Partial fix for reopened MDL-7474, Accessibility: "Provide alt text for ascending/ descending icons in glossary" 2007-09-24 17:11:42 +00:00
nfreear a186848393 Partial fix reopened for MDL-7493, Accessibility: Make sure 'Show hide block' button-link visible under Windows High Contrast. 2007-09-24 16:44:32 +00:00
skodak 66738744f5 MDL-11237 raising memory limit for preg_xxxx(), backported from HEAD 2007-09-24 16:34:03 +00:00
skodak 961ffe486f MDL-10833 some more course theme fixes 2007-09-24 15:49:14 +00:00
skodak 04bb266b3f MDL-10833 course theme in live logs fixed; backported from HEAD 2007-09-24 15:40:08 +00:00
stronk7 d672ecf8e8 Backporting typo from HEAD 2007-09-24 15:37:52 +00:00
skodak 4f4f20e7fb MDL-11413 revisited; backported from HEAD 2007-09-24 15:25:47 +00:00
tjhunt b424feb1cd MDL-10916 - Import and Export of Cloze question misses out "generalfeedback" column. Merged from MOODLE_17_STABLE. 2007-09-24 14:17:18 +00:00
skodak 78ed8710e6 MDL-8850 hidden activities not shown in user activity reports anymore 2007-09-24 10:06:06 +00:00
tjhunt 5ff601c49e Fix PHP syntax errors. 2007-09-24 10:05:42 +00:00
samulik 186b0a1537 MDL-1883 - /course/scales.php very slow. "Backported" the fix by Petr from 1.9 to 1.8. Not a direct merge as the code has been refactored. 2007-09-24 06:32:14 +00:00
skodak f99ed7c86d MDL-11414 fixed handling of log urls (problem reported by Andreas Nolden); backported from HEAD 2007-09-23 13:14:34 +00:00
skodak bdbb8f02b2 MDL-11413 improved text cleaning (problem reported by Andreas Nolden); backported from HEAD 2007-09-23 12:29:13 +00:00
skodak 0c08447833 MDL-11413 improved text cleaning (problem reported by Andreas Nolden); backported from HEAD 2007-09-23 12:23:15 +00:00
tjhunt c6b4a16884 MDL-11316 - Extra slashes appearing in the correct answer of shortanswer questions when they contain a slash. 2007-09-21 18:28:31 +00:00
tjhunt f5446711d2 MDL-9952 - Cant escape # by using \ in a Cloze question. 2007-09-21 16:17:53 +00:00
tjhunt 919352d80a MDL-3731 - Help file for the Item Analysis report does not explain why Disc. Coeff. is sometimes reported at -999.00. 2007-09-21 13:28:31 +00:00
tjhunt 57c9510f1b MDL-10338 - quiz index page does not work in weekscss format. 2007-09-21 11:10:18 +00:00
nicolasconnault edf9554096 MDL-11351 Removed a redundant check for a multiLang JS variable 2007-09-21 09:12:45 +00:00
toyomoyo 874833bf64 MDL-11364, users assigned as teacher on front page has no access to hidden activities 2007-09-21 02:19:26 +00:00
tjhunt aac5f17176 XHTML Strict in question state history table. 2007-09-20 15:09:45 +00:00
urs_hunkler 725685f9fb Added the missing switch construct to the mymoodle page for flexible column positioning. 2007-09-20 09:45:29 +00:00
jmg324 cfbd464c72 MDL-10296 made print_user_picture cater for https possibility in user/edit 2007-09-20 09:33:32 +00:00
urs_hunkler 1a730605aa Added the missing switch construct to the mymoodle page for flexible column positioning. 2007-09-20 09:32:59 +00:00
martinlanghoff f33f60f78e eaccelerator: never set the mode if we failed to init 2007-09-20 06:50:29 +00:00
martinlanghoff 2b33092aba Revert - dmllib: check $MCACHE->status() before using it 2007-09-20 06:46:35 +00:00
martinlanghoff b874e680dc dmllib: check $MCACHE->status() before using it 2007-09-20 06:41:32 +00:00
moodler aa604cfa06 Automatic installer.php lang files by installer_builder (20070920) 2007-09-20 04:33:43 +00:00
tjhunt af8288c0e6 MDL-10671 - Content on question import and export pages sitting on the left side. 2007-09-19 17:57:52 +00:00
tjhunt 0920afeddc MDL-10824 - spaces in javascript URLs are not strictly valid. 2007-09-19 17:44:37 +00:00
tjhunt 1ad377cf12 MDL-10903 - Wrong capability checked in get_all_instances_in_course should be moodle/course:viewhiddenactivities, not moodle/course:viewhiddencourses. 2007-09-19 17:05:32 +00:00
tjhunt e9ba213148 MDL-10972 - The lang string 'fullname', which is normally used for course fullnames, was being used for a person's full name in some quiz reports. This dual usage is not translatable into all languages. 2007-09-19 15:52:08 +00:00
tjhunt 3fc8fbccd6 MDL-6315 - When processing a manul grading action, if both the comment and the score are blank - as might be the case on the 'Grade all' page of the manual grading when the teacher uses it to grade some, but not all of the students - then do not record the question as graded. 2007-09-19 10:55:31 +00:00
tjhunt eebb9e840d XHTML Strictness. 2007-09-19 10:31:53 +00:00
tjhunt d7ced1eca3 MDL-11095 - Use absolute path to include tabs.php, not a relative path, for greater robustness. 2007-09-19 10:26:19 +00:00
toyomoyo cbcae60bb4 MDL-11324, only display users with course/view when assigning them in mod or blocks context 2007-09-19 03:47:48 +00:00
thepurpleblob cf71b80e65 Typo! 2007-09-18 12:29:06 +00:00
tjhunt dc1a8255ba MDL-11317 - Slashes displayed in incorrect responses for short answer questions. Fix by adding stripslashes in the appropriate place. 2007-09-18 12:15:10 +00:00
jamiesensei 0b58276ad0 MDL-11318 formslib now respects a template for an element if it is set. But since formslib uses the templates to insert help buttons for setAdvanced functionality etc. if you use templates you will lose this functionality. 2007-09-18 09:44:58 +00:00
iarenaza 5d27c224dd MDL-11299 - Make objectClass string comparison case insensitive.
LDAP serves accept attribute names in a case insensitive way, so don't
force the users to use any particular spelling. (backported from HEAD).
2007-09-18 08:50:18 +00:00
toyomoyo 015edfa92e MDL-11234, if roles definitions matches exactly, mapping should be allowed with or without role assign capability 2007-09-18 06:59:46 +00:00
moodler c0b9b34aea Automatic installer.php lang files by installer_builder (20070918) 2007-09-18 04:30:55 +00:00
stronk7 c54982c11b Interlinking from/to data module added. MDL-9576
Backported from HEAD
2007-09-17 22:08:31 +00:00
stronk7 1714e789f4 Now, under quick grading, when new assignment_submissions records are
created, we provide a default for data1 and data2 text not null
columns. MDL-11268

Merged from MOODLE_17_STABLE
2007-09-17 16:58:54 +00:00
tjhunt 91d44be7b0 MDL-11267 - Anywone who can view quiz reports can delete student attempts. 2007-09-17 16:11:37 +00:00
tjhunt edd33b96b3 MDL-11310 - Multichoice edititing form should have space for 5 answers by default 2007-09-17 14:39:37 +00:00
thepurpleblob df63d62031 MDL-11104:
Markdown updated to latest version.
2007-09-17 12:36:14 +00:00
thepurpleblob ae066f4cae MDL-11104:
Added some extra information for markdown-extra features.
2007-09-17 12:29:05 +00:00
thepurpleblob fc1981bb71 Forgot to take out duplicate question count check. 2007-09-17 10:59:32 +00:00
thepurpleblob 3404e92ced MDL-11279:
Code was not properly checking for empty category.
Check moved to right place and proper print_error() function called as appropriate
2007-09-17 10:54:22 +00:00
nfreear e2e41efc2a MDL-11160 'Live cron runs out of memory ...' - added enrolment check, to match HEAD. 2007-09-17 09:19:00 +00:00
moodler 0e92e35575 Automatic installer.php lang files by installer_builder (20070917) 2007-09-17 05:04:44 +00:00
stronk7 eb2a551ce4 Typo causing wiki files not being saved in backup. MDL-9335 2007-09-16 23:01:28 +00:00
stronk7 82cb40f813 Hide the metacourse dropdown menu if the course
isn't a metacourse and general XHTML compliance. MDL-9922
2007-09-16 19:24:08 +00:00
stronk7 dbc6368462 Prevent some warning when restoring site courses... MDL-10054 MDL-10118 2007-09-16 18:32:50 +00:00
stronk7 f4afcf7efa Show the roll dates option only if the backup course has a start date
(some formats like main page, social..., haven't it and rolling dates
from 0 produces crazy dates. MDL-10125
2007-09-16 17:27:29 +00:00
stronk7 05c7e459ac Fixed wrong link to log report. Shouldn't these links be in php
code instead of lang files? MDL-11281
2007-09-16 08:28:55 +00:00
moodler 7608d5ccab Automatic installer.php lang files by installer_builder (20070916) 2007-09-16 04:22:31 +00:00
iarenaza c798b55df4 Remove additional check when dealing with hidden courses in LDAP enrolment.
The check is superfluous and uses an inexistant variable ($type) that
was removed when we switched to role based enrolment.

Fixes MDL-11098 MDL-10282 and MDL-8346. (backported from HEAD)
2007-09-15 21:54:13 +00:00
skodak 5a9528b959 applying the same patch to advcheckbox, backported from HEAD - Fixes MDL-8627, "HTML QuickForm displays (some?) disabled elements in a non-accessible way", overrides parent::getFrozenHtml. 2007-09-15 19:48:39 +00:00
skodak 45d99c3807 MDL-10277 Force password change cannot be unchecked once selected; backported from HEAD 2007-09-15 09:45:01 +00:00
skodak d26e72d1b2 MDL-11292 fixed Cannot create child auth plugins - patch by Mark Nielsen; used inlude_once() when searching for functions/methods in files; backported from HEAD 2007-09-15 09:31:58 +00:00
skodak 2baa6afc82 MDL-10995 backported basic perf improvement from HEAD - course parents are now cached when walking the context tree - this should substantially improve login time; HEAD will have a better solution soon by ML; 2007-09-15 09:08:25 +00:00
nfreear 0fcad934b6 MDL-11160 'Live cron runs out of memory, before "core" ...' - tailored get_recordset_.. fix for 1.8 branch. 2007-09-14 15:48:19 +00:00
tjhunt 9bee6187e4 MDL-11271 - The closing bracket "}" can't be used in cloze question type. Now, you can excape a closing } with a backslash. Do feedback, as well as answer. 2007-09-14 09:42:40 +00:00
tjhunt 4764cb3ee8 MDL-11271 - The closing bracket "}" can't be used in cloze question type. Now, you can excape a closing } with a backslash. 2007-09-14 09:34:40 +00:00
toyomoyo f2614f737b MDL-10904, fixing getElementById 2007-09-14 03:32:42 +00:00
stronk7 b7f2b64f2f Now using one cross-db solution to be able to
simulate the status boolean ins assignment
submissions. MDL-8164 & MDL-10846

Backported from MOODLE_HEAD
2007-09-13 17:58:55 +00:00
tjhunt 3b53ec29f8 MDL-11081 and MDL-11211 - Implement quiz_question_list_instances. The lach of this function was causing a horrible dataloss bug: MDL-11211. Fix thanks to Janne Mikkonen, refined by me. Merged from MOODLE_16_STABLE. 2007-09-13 17:29:13 +00:00
tjhunt 0498a4d517 MDL-11213 - Quiz preview attempts show up in item analysis. Fix thanks to Jean-Michel Vedrine. 2007-09-13 16:24:50 +00:00
tjhunt 7d0ffb0fe6 MDL-11231 - Missing "correct" tick in Close question with answer '0'. 2007-09-13 10:46:39 +00:00
bobopinna d3564a90ad Fixed a problem importing imsmanifest.xml file from course file system 2007-09-13 10:26:58 +00:00
nfreear d3ad764373 Fixes MDL-8627, "HTML QuickForm displays (some?) disabled elements in a non-accessible way", overrides parent::getFrozenHtml. Merged. 2007-09-12 11:25:11 +00:00
skodak 8a9febcdb0 MDL-10635 adding caching workaround for performance problems with update_course_icon() function - 1.9 will have a different solution 2007-09-12 10:45:32 +00:00
arborrow 0a78a5c67d MDL-10410 - for consistency using UNCATEGORISED constant rather than hardcoded string 2007-09-12 03:38:53 +00:00
martinlanghoff 16ce3928cc admin/cron: if $PERF->dbqueries is set, profile modules...
The cron() function of some modules can be a huge drag on the
server. Capture profiling data...
2007-09-12 03:33:38 +00:00
martinlanghoff 08c28a96f7 PERF logging - move handling to moodle_request_shutdown()
By moving the performance profile logging to the very
end of PHP processing, we cover more pages, notably those
that don't end up with a footer or a redirect, like file
serving.

This should improve quality of our performance logs, and
help catch some piggies...
2007-09-12 03:33:16 +00:00
martinlanghoff 1ba840fdbb redirect() - log performance profiling info
Many heavy pages end in a redirect. Log their profiling data!

Thanks to Matt Clarkson for spotting the problem.
2007-09-12 03:33:00 +00:00
martinlanghoff cfca081765 admin/modules: Avoid calling rebuild_course_cache()
rebuild_course_cache() over all courses is extremely expensive,
not suitable for interactive calling. Better to clear modinfo
and let course/view.php repopulate it as needed.

With this patch we clear out modinfo _only_ for courses affected
by the module we show/hide/delete.
2007-09-12 03:32:42 +00:00
martinlanghoff f6297ede8e course/index: move orphan fixups to an optimised fix_coursecategory_orphans()
Move the fixups for orphan courses to the newly minted
fix_coursecategory_orphans() -- and optimise it to take only 1 dbquery for
the common case.

If we do find lots of orphans, we issue 2 updates per orphan.

This cuts down dbqueries drastically - we used to have 2x the number of
courses in the site.
2007-09-12 03:32:21 +00:00
martinlanghoff 50a79cfecc fix_course_sortorder(): fix breakage with large categories, saner error
Two improvements for fix_course_sortorder()

 - If the category has more courses than the shift range
   use a larger shift range to avoid overlapping with itself

 - If things do go wrong during the per-course sortorder updates,
   rollback and try and call ourselves with a 'safe' flag.

Still - far from perfect. Probably the global sortorder approach
is broken. The sanest way is to rework things to always join against
course_categories and order by the combined sortorders.
2007-09-12 03:31:32 +00:00
arborrow 133f457cdc MDL-10407 fixed missing double quote 2007-09-12 03:23:26 +00:00
thepurpleblob 8f56f9d9a3 Missing a stripslashes() so TeX functions didn't work 2007-09-11 14:52:51 +00:00
thepurpleblob 1c632b934d MDL-10092:
Decode HTML entities before processing.
2007-09-11 13:53:24 +00:00
jgutierr25 12b7c16ffc pb with autologinguest 2007-09-11 07:55:51 +00:00
tjhunt 3580ad8ee1 Take out duplicate $Id$ CVS tags. 2007-09-10 11:06:01 +00:00
toyomoyo 5c6a0bad7b MDL-11062, 1.7=>1.8 groups upgrade problems 2007-09-10 01:54:33 +00:00
gbateson 697463d868 added "Enable" label to open/close time checkboxes 2007-09-08 23:30:37 +00:00
stronk7 8d20f40cb9 Fix excess of slashing in course names when restoring. MDL-11151 2007-09-08 22:56:29 +00:00
stronk7 347f90e704 Fix link in email to new admin report. MDL-7850 2007-09-08 22:48:23 +00:00
stronk7 b533156097 Adding some strings for the new backups report. MDL-7850 2007-09-08 22:44:42 +00:00
stronk7 22bf0fd32c Redirecting old backup log to the new one. MDL-7850 2007-09-08 22:39:23 +00:00
stronk7 2c4f2d4004 Adding new report to display scheduled backup logs. MDL-7850 2007-09-08 22:32:51 +00:00
moodler a2ed173893 Automatic installer.php lang files by installer_builder (20070908) 2007-09-08 04:05:55 +00:00
thepurpleblob ec6b89399a MDL-11147:
Debugging now has support for LaTeX/Ghostscrip renderer.
2007-09-07 14:21:09 +00:00
moodler e2d52b4b88 Automatic installer.php lang files by installer_builder (20070907) 2007-09-07 04:49:28 +00:00
toyomoyo c8733890c3 MDL-11111 number of search results is not always correct in the role assignment view 2007-09-07 03:13:53 +00:00
pichetp 5d72dbbe9d Correcting a little error: datesetitem = array(); instead of datasetitem = array();
line +-550 $question->dataset[$datasetname]->datasetitem = array();
2007-09-07 02:42:37 +00:00
moodler b214c00f01 Automatic installer.php lang files by installer_builder (20070907) 2007-09-07 02:12:53 +00:00
moodler c223acda18 Merged fixes for RTL support in 1.8 from Sharar Dolev and the Hebrew translation team
see  MDL-10768
2007-09-06 07:30:51 +00:00
toyomoyo 41fe0508eb MDL-11064, users can't see teacher's profile 2007-09-06 07:07:58 +00:00
toyomoyo 6673f18b1c MDL-9613, spliting the queries into 2 for site/course block respectively 2007-09-06 06:24:40 +00:00
stronk7 97bc9f4934 Now restoring groups is cross-db (the detection of existing groups)
Merged from MOODLE_17_STABLE
2007-09-05 18:40:25 +00:00
stronk7 07893c5239 Repeated fields aren't necessary at all since Moodle 1.7
and, in fact, they throw error if using limits! MDL-9592

Merged from MOODLE_17_STABLE
2007-09-05 15:27:53 +00:00
nfreear 4bedc06d42 MDL-11134, Accessibility: move help link into <label>, so it won't be ignored in JAWS forms mode. Merged. 2007-09-05 14:38:08 +00:00
stronk7 93d8244508 Now the Oracle XMLDB generator detects changes of precision
in NUMBERs without decimals (virtually INTs) and is able to perform the
change of precision properly
2007-09-04 23:16:14 +00:00
stronk7 77b7083885 Added one new test to change precission of a numeric field
to a smaller one. It breaks Oracle in its current status.
2007-09-04 22:10:11 +00:00
moodler a9fce7695e Merged fixes for MDL-10833 from HEAD 2007-09-04 08:18:27 +00:00
moodler bf4c59aa42 Fixes merged from HEAD for MDL-10833 2007-09-04 08:14:33 +00:00
moodler 6255297f0b Merged fixes for MDL-10833 from HEAD 2007-09-04 08:08:58 +00:00
poltawski 6164fc9080 MDL-9851 - RSS block links previously used to open in new window. Restoring this
behaviour. Had to tweak the cleaning to ensure the JS hack for XHTML complaint new
window gets through.
2007-09-03 10:18:59 +00:00
stronk7 a0d692e925 Now, the repository is able to set the resource->name if
it haven't been manuall defined. Part of MDL-10878.
2007-09-02 10:50:22 +00:00
urs_hunkler 1bc5e06312 corrected right column - had id "left-column" 2007-08-31 18:58:08 +00:00
jgutierr25 eb6591ca8b problem with autologinguest 2007-08-31 09:42:22 +00:00
toyomoyo f005a30c52 fixing a typo 2007-08-31 08:20:57 +00:00
moodler 73083f1705 Robustness - avoid possible divide by zero problem MDL-7425 2007-08-30 05:59:31 +00:00
skodak 2712b7f2dc MDL-10921 LDAP Auth to Active Directory requires LDAP_OPT_REFERRALS option set; backported from HEAD 2007-08-29 20:43:54 +00:00
skodak b9e6a03e3e MDL-11023 silence warnings in PHP 4.x - the last param was added in PHP 5.0.2 2007-08-29 20:19:14 +00:00
skodak cd93c36de6 MDL-11058 changeme password not always required to be changed; backported from HEAD 2007-08-29 18:20:52 +00:00
skodak 69e5b55d03 MDL-11043 misspelled get_string in login/index.php 2007-08-29 18:07:49 +00:00
skodak e0a8a35867 MDL-11053 Course object not escaped before insert - patch by Aaron C Spike; backported from HEAD 2007-08-29 13:54:09 +00:00
stronk7 a34487e2e5 Now Moodle >= 1.9 requires PostgreSQL >= 8.0. MDL-11033
Merged from MOODLE_17_STABLE
2007-08-28 15:33:37 +00:00
nicolasconnault bc1d20eea9 MDL-9005 Fixed this and another multilang issue (module name in preview didn't filter multilang tags either). 2007-08-28 13:22:02 +00:00
toyomoyo 7efe75fcc4 MDL-10818, forgot a global 2007-08-28 07:03:24 +00:00
toyomoyo 1f7790ffe5 MDL-10818, do not display graph if user has no permission 2007-08-28 07:01:42 +00:00
moodler c15b5c3c96 Automatic installer.php lang files by installer_builder (20070828) 2007-08-28 05:57:04 +00:00
nicolasconnault 03648520cc MDL-7574 Applying Matthew Davidson's patch. 2007-08-27 17:27:00 +00:00
stronk7 ea6f1fd569 New tables must have the id unsigned. 2007-08-27 14:42:19 +00:00
nicolasconnault d6c42bb205 MDL-10918 Applied Aaron's patch 2007-08-27 14:03:28 +00:00
moodler e3128055a2 Automatic installer.php lang files by installer_builder (20070827) 2007-08-27 06:13:50 +00:00
moodler 52c72b0079 Automatic installer.php lang files by installer_builder (20070826) 2007-08-26 05:55:50 +00:00
moodler e5d17c3450 Automatic installer.php lang files by installer_builder (20070825) 2007-08-25 04:14:03 +00:00
gbateson ee0875740d fixed results not being sent caused by commenting out of "interceptFeedback" (probably left over from debugging) 2007-08-25 01:44:39 +00:00
nicolasconnault ec5a8430eb MDL-10970 Someone was using
$locations = array('location1');
$locations += array('location2', 'location3', 'location4');

to save the hassle of doing one $locations[] = 'location1'; for each location.

But += doesn't add any entry if the key of the new array already exists in the original array. So, using my example, the resulting array would be:

$locations: array('location1', 'location3', 'location4');
2007-08-24 07:19:05 +00:00
moodler 3fdb68a838 Automatic installer.php lang files by installer_builder (20070824) 2007-08-24 06:05:22 +00:00
moodler 1ebce948ec Merged XHTML fix from HEAD 2007-08-24 04:29:16 +00:00
moodler 8841cecde3 Hide roles button on sticky blocks MDL-9723 Merged from head 2007-08-24 02:23:43 +00:00
mchurch aa4be76082 Moving get $cm outside of the 'forum_enabletimedposts' condition as it is needed even if this isn't set. 2007-08-23 13:38:21 +00:00
moodler af191f3be2 Added new icons for file types MDL-9940 2007-08-23 06:44:09 +00:00
moodler 4cd5906993 Added new mime-types for Office 2007 documents MDL-9940 2007-08-23 06:42:24 +00:00
moodler 907e4a312d MDL-10960 fix rss user names 2007-08-23 06:13:48 +00:00
moodler 8eda8b6521 Automatic installer.php lang files by installer_builder (20070823) 2007-08-23 06:03:40 +00:00
moodler 16c5052e79 Remove timelimits from rebuild_course_cache() MDL-10954 2007-08-23 05:45:15 +00:00
moodler c6144706fb Removed checked default from teachers on course reset page MDL-10946 2007-08-23 05:14:57 +00:00
skodak 8ab04045ff MDL-10947 https was replaced with httpss when wwwroot already is https credit goes to Tobias Marx; backported from HEAD 2007-08-22 20:03:45 +00:00
moodler a280860c4e Automatic installer.php lang files by installer_builder (20070822) 2007-08-22 09:13:23 +00:00
moodler 5c8faf4728 Merged patch for MDLSITE-244 from HEAD 2007-08-22 07:52:10 +00:00
jamiesensei 9b71941eba Latest environment.xml from HEAD 2007-08-22 06:06:42 +00:00
jamiesensei 45e27a011b strings needed for custom checks and random question check. 2007-08-22 05:56:10 +00:00
jamiesensei 53f6ee19bd adding code for check for rqp questions and also small update to code for checking for random questions that fixes a small issue with the display of the error message. 2007-08-22 05:35:43 +00:00
jamiesensei 42e28aa6ca Merged various new functionalities from 1.9 into 1.8
---
MDL-9616 - Custom checks in environment.xml
MDL-9616 - tidy up
* add a better message in the table for these checks.
* improve existing strings for other types of check.
* remove a line of debug code.
---
Added new check to be able to compare current and target
moodle versions. Executed only on upgrade (not at install). MDL-10722
---
MDL-10938. 'only strings from lang files can be used as feedback in environment check. Some way is needed to include data from custom check function - a $a param to pass to get_string'. Custom check for questions uses new functionality to print more complex strings as feedback.
2007-08-22 05:29:35 +00:00
skodak 0d8b628813 MDL-10056 Fixed deleting of assignments when original plugin not present; backported from HEAD 2007-08-21 09:23:37 +00:00
toyomoyo 3f22efa141 MDL-10658, course short name repeated in breadcrumbs 2007-08-21 05:10:21 +00:00
jamiesensei 2142a30406 MDL-9872 Admin Report on Possible problems Random questions selecting questions from sub categories. Backporting from HEAD. Reports possible problems with question engine when upgrading to Moodle 1.9 2007-08-21 03:44:10 +00:00
moodler 1d671e8e4a Moved lang file MDL-10920 2007-08-21 03:39:23 +00:00
moodler 211a42594f Moved language files for presets MDL-10920 2007-08-21 03:34:53 +00:00
toyomoyo 041396c760 fixing typos 2007-08-21 02:11:50 +00:00
nicolasconnault dadcf5cc42 MDL-10177 Applied lovely hack (not ugly!) suggested by Pablo. It's lovely because it solves an ugly design error in the previous code: modifying a parameter variable in the function body. 2007-08-20 17:58:38 +00:00
thepurpleblob 0337694a7d MDL-9345:
Hard coded error message "cannot view profile" put into the errors file in
the language pack. Where it should be :-)
2007-08-20 15:13:35 +00:00
jamiesensei a936d39aed file index.php was added on branch MOODLE_18_STABLE on 2007-08-21 03:44:15 +0000 2007-08-20 11:12:11 +00:00
Martin Langhoff f5c39e0b23 cvsimport fixups 2007-08-29 13:13:58 +12:00
Martin Langhoff 53aab8ffd4 cvsimport fixups binary files 2007-08-29 13:13:53 +12:00
nfreear bc8f835f0d MDL-5400 "Accessibility modifications..." - fixing the 4 themes that don't use <h1>. Merged. 2007-08-20 10:57:04 +00:00
thepurpleblob b05c975e30 MDL-10819:
GIFT now exports grade fractions for numeric questions
2007-08-20 10:34:20 +00:00
thepurpleblob 908a8949b3 MDL-10689:
No questions imported if "stop on error" selected and there are invalid grades.
2007-08-20 10:05:40 +00:00
thepurpleblob dc4495783d MDL-10902:
Whoops! Overwrote question object. Variable name changed
Thanks to Adriane Boyd for spotting that one.
2007-08-18 09:32:09 +00:00
thepurpleblob 75ca3e0d01 Moved check for plugin import/export to the start rather than the end 2007-08-17 09:46:51 +00:00
toyomoyo 49b5de5ae4 MDL-10037, hide hidden user's blogs from course view 2007-08-17 08:15:38 +00:00
toyomoyo 9725881e50 MDL-10856, fixing mp3 filter by placing utf.js include in <head> 2007-08-17 04:57:08 +00:00
toyomoyo 3b817c7251 reversing a change causing multiple mp3s not to work 2007-08-17 02:06:43 +00:00
nfreear acb9bb129a MDL-9890 "Help should be well-formed..." - replacing abused (nested) <blockquote> and <ul> with <div class="indent">, especially in install.html, and other validation errors. Merged. 2007-08-16 10:58:57 +00:00
moodler 480e735763 Automatic installer.php lang files by installer_builder (20070816) 2007-08-16 06:53:00 +00:00
toyomoyo 6b94ff60e6 MDL-10856, mp3 filter not working in uploaded html files 2007-08-16 05:28:40 +00:00
toyomoyo 6214b779ff MDL-10818, do not display broken graph when user has no permission to view activity graph 2007-08-16 04:04:35 +00:00
tjhunt 9ce40f4de1 MDL-10858 - Edit field sizes for overall feedback are silly 2007-08-15 12:44:30 +00:00
tjhunt c72a4079b1 MDL-10834 - Restore of quiz module may create calendar events without a date/time. Fix thanks to Derek Woolhead. Merged from MOODLE_17_STABLE. 2007-08-14 13:33:44 +00:00
moodler 8f5b6a9308 Automatic installer.php lang files by installer_builder (20070814) 2007-08-14 06:14:36 +00:00
tjhunt 1138529ffa Notice on quiz config.html page. - backported from HEAD. 2007-08-13 11:20:59 +00:00
toyomoyo 80289b2543 MDL-10691, slow forum_role_unassign() 2007-08-13 05:38:14 +00:00
urs_hunkler 71f9356394 MDL-10704 and MDL-10793 corrected also the second letter-spacing 2007-08-12 12:48:49 +00:00
urs_hunkler dd48dfc480 MDL-10704 - removed letter-spacing to avoid the Khmer rendering issue 2007-08-12 10:42:35 +00:00
urs_hunkler 95dfead3b1 Added the $THEME->htmleditorpostprocess option. When the DOM tree of Moodle pages needs to be changed then the HTMLEditor must be applied after the DOM changes. With $THEME->htmleditorpostprocess developers get control when to render the HTMLEditor. They have to call the rendering function within their scripts. 2007-08-12 09:56:51 +00:00
urs_hunkler 22c22fe17c merged from 1.7, cleaned up and replaced the wrong colour name lightgreen with the CSS colour name lime. 2007-08-12 09:13:37 +00:00
moodler 6e4dbffd0a Straighten files in directory mode 2007-08-12 06:15:55 +00:00
moodler 6339452c3e Added a small exception to make a download link for zip files MDL-9478 2007-08-11 14:56:48 +00:00
tjhunt ffeb631f28 Fix whitespace. 2007-08-10 15:54:11 +00:00
tjhunt a44ce185fa MDL-10581 - Each attemtp builds on last & multi-page quizzes was casuing grading errors. 2007-08-10 15:22:15 +00:00
tjhunt 1c5d61d928 MDL-10799 - Question types do not accurately determine whether their state has changed or not. 2007-08-10 15:21:16 +00:00
tjhunt b766a48f3f MDL-10786 - Short Answer questions will not allow 0 as the sole answer 2007-08-10 10:48:27 +00:00
tjhunt eac3f48ca7 Accessing wrong field of $mod from course.modinfo. Merged from MOODLE_17_STABLE. 2007-08-10 10:37:38 +00:00
thepurpleblob 581ca3d354 MDL-10785:
empty() changed to !isset()
2007-08-10 07:16:36 +00:00
moodler 6ac9c77179 OK now the emailing problem is fixed properly I think 2007-08-10 05:23:18 +00:00
stronk7 31682b1276 Fixing one SQL that could cause problems with coincidences
in the associative array. MDL-10787
2007-08-10 01:44:46 +00:00
stronk7 daf3c36c51 MSSQL blobs doesn't like quoted binaries. MDL-9835 2007-08-10 00:55:44 +00:00
stronk7 0ab95f8bf6 Adding some comments about latest local changes. MDL-10788 2007-08-10 00:45:02 +00:00
stronk7 295ce0c81e Fixed bug when inserting strings beginning by single quotes. MDL-10788 2007-08-10 00:40:32 +00:00
stronk7 dda4bbbf25 Fixed insert/update of Oracle xLOBs. Credit goes to Rita Scholes. MDL-9835 2007-08-09 18:16:47 +00:00
stronk7 eee45d7fe6 Reverting deleted addslashes(). They are needed for proper testing after all. 2007-08-09 18:10:52 +00:00
stronk7 838e92f788 And binary tests should use addslahes at all. Testing cross-db right now. 2007-08-09 17:59:08 +00:00
stronk7 a904349624 Adding some difficulties to the CLOB/BLOB tests... (escape chars) 2007-08-09 17:51:37 +00:00
thepurpleblob bfbe9c52c1 Added hooks to qtype import/export 2007-08-09 14:11:08 +00:00
moodler 2e5815427b Further to MDL-10771 2007-08-09 13:28:15 +00:00
moodler 1c2d58cc99 Further fix for MDL-10771 2007-08-09 13:27:06 +00:00
moodler ebecdf8d14 Removed <P> tags MDL-10771 2007-08-09 13:24:13 +00:00
thepurpleblob 82cb7fe78c MDL-6367:
Backporting quiz import/export for plugins
2007-08-09 08:43:23 +00:00
moodler 9b2aa32147 FIxed display of results when groups have been defined
It was only showing the current group EVEN even the choice acticity itself was not in group mode
2007-08-09 06:25:49 +00:00
stronk7 196684087f Now sybase quotes are properly handled by the lang editor. Part of MDL-9835 2007-08-08 22:16:23 +00:00
urs_hunkler d86d8f5a99 added missing div before footer 2007-08-08 17:49:28 +00:00
tjhunt 4514f4bf4b MDL-10759 - Bogus get_context_instance call in quiz_print_recent_mod_activity. Merged from MOODLE_17_STABLE. 2007-08-08 11:31:09 +00:00
stronk7 4bcf2c2122 Reverting last commit I performed by mistake when debugging
a bit the plugin. Sorry! :-(
2007-08-08 11:10:41 +00:00
stronk7 ed4fd6c492 Detect the connection status before continue. Else no-one
will be able to connect with local alternatives. And
under SSO it's a problem!
2007-08-08 10:59:42 +00:00
tjhunt 809651502d MDL-10737 - Increase size of short answer text entry box 2007-08-07 12:39:33 +00:00
urs_hunkler ab717a9c26 MDL-8109 - removed comments and some changes to make merging easier 2007-08-07 07:11:44 +00:00
urs_hunkler 9ffa6198f3 MDL-8109 - found a way to work with the split print_header and print_footer part. Check the tracker for more info 2007-08-07 06:53:31 +00:00
stronk7 62ec0b2bd4 Id tag added + whitespace cleaning 2007-08-06 23:20:21 +00:00
stronk7 c6b2e4fce9 Added Id tag 2007-08-06 22:15:19 +00:00
poltawski 82ad3312a7 MDL-10624 Reverting forum part of last commit - it wasn't needed, I wasn't testing
correctly.
2007-08-06 19:16:17 +00:00
poltawski ca2af27934 Fixed typo in previous commit 2007-08-06 18:49:05 +00:00
poltawski 19ec0f2df2 MDL-9431 & MDL-10624 - we're not removing some tracking records from the
database when we unassign roles - remove forum_subscriptions & user_lastaccess
2007-08-06 18:44:10 +00:00
stronk7 4adbf6cf72 Added Id tag 2007-08-06 18:28:30 +00:00
stronk7 91cee36fe6 Adding Id tag + copyright notice. 2007-08-06 17:54:14 +00:00
moodler 0c93bd7340 Make sure that the receiving user has some messaging preferences set so they can see popups, get email etc.
MDL-10732
2007-08-06 15:09:18 +00:00
moodler 4be4e29a3b JUst tidying some comments while I was there 2007-08-06 14:50:12 +00:00
poltawski 8cd6f2b347 MDL-10714 - tweak language to clarify allowdeleteing 2007-08-06 13:37:36 +00:00
poltawski 87aa917219 MDL-10715 - remove inappropiate 'upload not allowed' options on upload assignment types! 2007-08-06 13:26:43 +00:00
tjhunt 1221d87de8 MDL-9519 - incorrectuse of language strings in quiz. 2007-08-06 13:22:06 +00:00
moodler caa413ece1 Some fixes relating to the unsubscribe link in emails for some types of forums 2007-08-06 13:08:05 +00:00
mattc-catalyst 4fb68891b0 MDL-7043: fix insert link functionality to allow linking to images again
Author: Matt Clarkson <mattc@catalyst.net.nz>
2007-08-06 05:21:30 +00:00
moodler acd404e309 Automatic installer.php lang files by installer_builder (20070806) 2007-08-06 03:56:00 +00:00
stronk7 1f31378d11 fix insert_record() call using arrays instead of objects
Merged from MOODLE_17_STABLE
2007-08-05 22:49:49 +00:00
stronk7 273c8bf204 $dataobject in insert_record() and update_record() must be objects.
Added code to detect, fix and debug array situations. Related to MDL-9751.
2007-08-05 22:35:31 +00:00
urs_hunkler db8a7ac9d1 $thumbheigt was calculated instead of $thumbwidth 2007-08-05 16:40:05 +00:00
moodler ef9b262c7c Added some whitespace to new discussion button 2007-08-05 05:38:16 +00:00
stronk7 5ce8c064dd Prevent one warning 2007-08-04 18:46:36 +00:00
stronk7 37c023fb5c Support some strings from within the auth plugin lang files added. MDL-10694 2007-08-04 17:16:05 +00:00
moodler 2ac86cbd24 Automatic installer.php lang files by installer_builder (20070804) 2007-08-04 05:46:18 +00:00
tjhunt 5573a51843 MDL-10709 - Shortanswer resonses should be trimmed before being saved in the database. 2007-08-03 14:26:33 +00:00
donal72 f4f534c675 MDL-8119 : Improvements to logging where Mnet hosts are involved 2007-08-03 13:18:00 +00:00
donal72 aa34400457 Link to profile editing should not appear on other users' profiles. 2007-08-03 12:20:46 +00:00
urs_hunkler 8ebd0d9f4d Added a space before divs too and removed the space behind req 2007-08-03 12:04:31 +00:00
donal72 1880a55e53 MDL-9288 : An additional addslashes() that was in Petr's patch but didn't get committed. Tested and required. 2007-08-03 11:15:59 +00:00
tjhunt 4fadd52878 Tabs to spaces. 2007-08-03 10:34:15 +00:00
tjhunt 87b9156edb MDL-10690 - Make quiz name a manditory field. 2007-08-03 10:32:53 +00:00
donal72 39bf0df228 MDL-9314 : typo of $access / $accessctrl 2007-08-03 10:08:52 +00:00
urs_hunkler 27a78fcd2d Added a space behind advancedimg to correct aligning in forms. 2007-08-03 09:28:52 +00:00
moodler 45debd50c5 Automatic installer.php lang files by installer_builder (20070803) 2007-08-03 07:17:02 +00:00
moodler a4f3137661 Fixed reportgraphs MDL-10700 2007-08-03 03:28:18 +00:00
stronk7 1002d7e22a Added space to perform correct N' queries under MSSQL. MDL-10423 2007-08-02 23:37:13 +00:00
donal72 587813b713 1 word doco fix 2007-08-02 05:36:06 +00:00
donal72 c21899e0dd Fix for PHP 5.2.2: $HTTP_RAW_POST_DATA not populated bug:
http://bugs.php.net/bug.php?id=41293
2007-08-02 05:13:10 +00:00
donal72 bcfbd8cbdf Rename 'promiscuous' to 'dangerous'. Minor bugfixing for mnet. 2007-08-02 04:30:34 +00:00
donal72 304182d210 Minor mnet bugfixes 2007-08-02 00:48:04 +00:00
thepurpleblob f4c0f3d062 MDL-10680:
subquestions/subanswers needed swapped for matching questions
2007-08-01 13:43:29 +00:00
thepurpleblob a871e630b2 MDL-10585:
MDL-10584:
Present more factually correct message when a guest attempts to enrol.
Provide a mechanism for specifying which role in a course holds the
enrolment key.
2007-08-01 11:50:00 +00:00
thepurpleblob 5ceecdaaff MDL-10585:
MDL-10584:
Present more factually correct message when a guest attempts to enrol.
Provide a mechanism for specifying which role in a course holds the
enrolment key.
2007-08-01 10:55:17 +00:00
gbateson 964b1bb8c5 fix 2 javascript errors: "getELementById not defined" and "parseint not defined" 2007-08-01 05:23:35 +00:00
moodler 5aada1957d FIx for HTML typo MDL-9222 2007-08-01 05:10:54 +00:00
moodler 6e0c3e4e4d Fixed broken docs links MDL-10670 2007-07-31 15:58:17 +00:00
tjhunt 1e6eb9da35 MDL-10663 - fix stupid typo on the stable branch. Somebody shoot me! 2007-07-31 09:38:52 +00:00
stronk7 960192ec0e search cron was killing the rest of cron tasks! 2007-07-30 23:40:41 +00:00
tjhunt 66f8778519 MDL-10661 - another bloody invisiblefieldset bug. 2007-07-30 22:14:16 +00:00
stronk7 da30f2babd Since now, Moodle 2.0 will require PHP 5.2. MDL-10390
Merged from MOODLE_17_STABLE
2007-07-30 16:41:54 +00:00
tjhunt 9ff3b4ab32 MDL-10300 - cleaning incorrectly applied to overall feedback. Backported from HEAD. 2007-07-30 10:41:15 +00:00
moodler f97583af41 Automatic installer.php lang files by installer_builder (20070730) 2007-07-30 04:38:50 +00:00
toyomoyo dfb723b481 MDL-10640, adding missing index for mdl_role_capabilities table during upgrade 2007-07-30 02:37:22 +00:00
wildgirl f40f3604c7 MDL-4912 docs directory clean-up 2007-07-28 20:17:08 +00:00
moodler 6483b3b16c Automatic installer.php lang files by installer_builder (20070728) 2007-07-28 06:12:34 +00:00
stronk7 a3daa6c40d Adding one Moodle note about the local hack performed. MDL-9911 2007-07-28 00:15:09 +00:00
stronk7 bb9950d1cc Moodle hack to make the excel generation lib really better
under UTF-8. Credit goes to Thomas Robb. MDL-9911
2007-07-28 00:00:45 +00:00
mchurch 4fb30fc90b Bug #MDL-10632, fixing the use of 'delete_event'. 2007-07-27 18:42:51 +00:00
toyomoyo 50ae935fd6 MDL-10256, when user is unassigned a role in course, if user has no course:view, user will be removed from all groups in course 2007-07-27 05:42:27 +00:00
thepurpleblob 3fcf436c16 MDL-10239:
Improper check for correct answer in true/false questions
2007-07-26 15:06:38 +00:00
thepurpleblob aa86e60148 Possible error passing course id from page to page resolved 2007-07-26 12:36:14 +00:00
thepurpleblob 529c18df40 Whoops - parameters need to match category check and display of course. 2007-07-26 11:03:07 +00:00
thepurpleblob 88f3ed390f MDL-9123:
Check that the selected category is allowed.
2007-07-26 10:54:53 +00:00
moodler 5008d3951f Automatic installer.php lang files by installer_builder (20070726) 2007-07-26 05:17:36 +00:00
toyomoyo 247879d0f3 fix for MDL-10564, wrong userid used for get_my_courses() in blogs 2007-07-26 02:44:35 +00:00
toyomoyo 3708bfc599 fix for MDL-9804, shortname on forms are limited to 15 chars 2007-07-26 02:28:43 +00:00
stronk7 59d1acce89 Adding two missing strings. MDL-6017
NOTE: These are OUT for Moodle 1.9 and new Grade System, so don't
      translate them!

Merged from MOODLE_17_STABLE
2007-07-25 22:10:50 +00:00
stronk7 e95c8bc282 Fixing two get_string() calls when restoring gradebook preferences. MDL-6017
Merged from MOODLE_17_STABLE
2007-07-25 21:34:11 +00:00
tjhunt c7ff87ee13 OU Bug 2867 - Overview report keeps forgetting the 'Display options' settings. Merged from OU Moodle. 2007-07-25 17:08:24 +00:00
urs_hunkler 520b973c8d added paddign-top:1em for removed <br /> in sitelink 2007-07-25 14:57:07 +00:00
urs_hunkler f76a2d832d removed <br /> in sitelink 2007-07-25 14:49:20 +00:00
thepurpleblob 18e1b648b9 MDL-10604:
Add ability to add sub categories directly from category screens.
2007-07-25 13:55:13 +00:00
thepurpleblob b30533ad22 MDL-10604:
Add ability to add sub categories directly from category screens.
2007-07-25 13:51:20 +00:00
urs_hunkler 8e797520d7 deleted commented old line. 2007-07-25 11:17:23 +00:00
urs_hunkler b552ea3586 changed old getElementById(id).submit() to the new submitFormById(id) call. 2007-07-25 11:16:17 +00:00
tjhunt bc898bed7b Regression from MDL-10515 - the a. b. was getting doubled. 2007-07-25 10:08:51 +00:00
mark-nielsen 13f4d81384 Fixed MDL-9923 2007-07-24 07:01:43 +00:00
moodler 12fa8f82fc Automatic installer.php lang files by installer_builder (20070724) 2007-07-24 06:20:51 +00:00
stronk7 cf5bb676dc Anihilate the last TEXT column having a default clause. With thin, Moodle > 1.8
builds under strict (mysql) and those defaults won't be there anymore. As part
of the upgrade to 1.9 one check is going to be performed to see if it's needed
to drop such default. MDL-6218
2007-07-23 23:26:32 +00:00
stronk7 02e7dadc05 Let's use the default (cached) list of fields here. MDL-10571 2007-07-23 16:33:54 +00:00
stronk7 439d39348d Now the my page retrieves all the fields (modinfo included) from
the course, so print_overview() calls are working again.  MDL-10232
2007-07-23 15:50:59 +00:00
jgutierr25 69860d5d10 *** empty log message *** 2007-07-23 11:38:14 +00:00
moodler 84345a1d0d Fixed a broken link to full post in searches 2007-07-23 09:10:47 +00:00
toyomoyo 41617e6525 ignore limits on first call in sql, so that we can cache all, but only return required portion 2007-07-23 08:55:43 +00:00
toyomoyo 864fbeda4b making get_my_courses cache respect limit and also back porting from HEAD to cut down loop time 2007-07-23 08:37:41 +00:00
stronk7 748d925acb Small improvement. Reducing the list of fields returned
by get_my_courses().
2007-07-22 22:58:34 +00:00
stronk7 f352ff4b83 Small improvement. Reducing the list of fields
returned by get_my_courses() in this block.
2007-07-22 10:29:01 +00:00
stronk7 3dc450db90 New cross-db version of the big union query used by get_my_courses() function.
I've tested both the "IN" subquery and the "FROM" subquery and, under sites
with more courses, the "FROM" one seems to perform slightly better. MDL-9381
2007-07-22 00:24:40 +00:00
thepurpleblob 11bf8a95e2 MDL-10531:
GIFT now handles Essay and Description type questions. See help/docs.
2007-07-21 07:47:49 +00:00
thepurpleblob 6a219918c2 MDL-10531:
GIFT now handles Essay and Description type questions. See help/docs.
2007-07-21 07:38:02 +00:00
tjhunt 6f6506058f MDL-7925 - it happened again. Stupid bloodly forms lib. I have no idea what it was playing at. 2007-07-20 17:10:11 +00:00
tjhunt cccd285acf Change where it looks for quiz report language files, to match the way the existing reports currenly work. 2007-07-20 16:12:06 +00:00
thepurpleblob 14f42baf18 MDL-10396:
Add an option and a check to (optionally) prevent users being enrolled
in hidden courses.
2007-07-20 13:01:24 +00:00
thepurpleblob 0dc4f14a26 MDL-10157:
Turn the diagnostic prints into error_logs. The more normal "course skipped"
message now requires DEBUG_ALL or greater before it is generated at all.
2007-07-20 08:55:44 +00:00
moodler 3dbdd5caa3 Automatic installer.php lang files by installer_builder (20070720) 2007-07-20 05:48:34 +00:00
urs_hunkler 38048ab4eb activated chamleon again 2007-07-19 19:55:24 +00:00
urs_hunkler 2329052916 MDL-10322 integrated the flat tabs from pre 1.8, several other enhancements 2007-07-19 19:53:40 +00:00
mchurch d715f651f4 Changing the doc. 2007-07-19 17:01:04 +00:00
tjhunt 597abe1a2c MDL-8056 - one if statement was missed during Matt Clarkson's/Eloy's commit on 15th July 2007. 2007-07-19 16:51:05 +00:00
mchurch 9a1dd76cfa Adding 'get_coursemodule_info' to the standard available functions for assignment types. As a minimum, this allows assignment types to add their own icon (like resource does). 2007-07-19 16:49:08 +00:00
toyomoyo 488fec2e70 fix for MDL-10445, adding of blocks on user blog page is not possible 2007-07-19 06:04:03 +00:00
moodler ece92348bf Merged fixes for mp3 and flv files from MDL-9739 2007-07-19 06:00:19 +00:00
moodler cf3ccea5e5 Automatic installer.php lang files by installer_builder (20070719) 2007-07-19 05:55:20 +00:00
moodler ee87411fa9 Merged support for flv from stable 1.8 2007-07-19 05:45:17 +00:00
toyomoyo b8f8058211 MDL-10149, preventing the deletion of the last admin role 2007-07-19 05:18:06 +00:00
moodler 29b30932c9 Merged fix for navigation from HEAD 2007-07-19 03:51:20 +00:00
toyomoyo 02bfbf0518 fix for MDL-10461, timemodified not preserved during restore 2007-07-19 03:36:09 +00:00
skodak 9d46c8fbbf MDL-10517 Use of addslashes in assignment/lib.php; backported from HEAD 2007-07-18 18:43:51 +00:00
tjhunt b77a1c30bd MDL-10515 - Change HTML to make it easier to style multiple choice questions 2007-07-18 13:57:08 +00:00
thepurpleblob 49240e1503 MDL-10496:
Correct role capability requirements had not been included, so menu
was not displayed for roles with only category update and/or bacup
selected (assigned at site level)
2007-07-18 09:12:23 +00:00
toyomoyo 7ea370a056 fix for MDL-10469, no courses shown for users with doanything 2007-07-18 07:00:18 +00:00
moodler 323871cbf3 Automatic installer.php lang files by installer_builder (20070718) 2007-07-18 06:29:58 +00:00
stronk7 d7fd82a2ca And key fields are lowercased too. End of MDL-10413 2007-07-17 18:56:40 +00:00
stronk7 6794ccb2b3 And index fields are lowercased too. Part of MDL-10413 2007-07-17 18:53:19 +00:00
stronk7 392e59c88e Ensuring we always retrofit lowercase tables. Part of MDL-10413. 2007-07-17 18:48:18 +00:00
tjhunt fdfe84df84 OU bug 3463 - warnings when you start an attempt in 'each attempt builds on last' mode. 2007-07-17 15:28:04 +00:00
thepurpleblob dc751c555e MDL-10395:
Course managers are now displayed in the order that the user
selects in the Define Roles page.
2007-07-17 13:58:50 +00:00
thepurpleblob ef9e26dd33 MDL-10495:
Course Manager's roles now in same order as Manage Roles screen
2007-07-17 13:12:05 +00:00
jgutierr25 28b9086750 test if cas activated and non parameters 2007-07-17 12:09:14 +00:00
jgutierr25 85b70ad4f6 *** empty log message *** 2007-07-17 11:55:09 +00:00
jgutierr25 1110888aee *** empty log message *** 2007-07-17 11:49:06 +00:00
toyomoyo 43a8efaadc fix for MDL-10475, before dropping student can post add an override for all legacy student role to prevent them from adding entries. 2007-07-17 02:45:47 +00:00
moodler 71ad20a5ca Bye bye CHANGES ... http://moodle.org/mod/forum/discuss.php?d=75777 2007-07-17 02:20:47 +00:00
stronk7 ca133f6ec3 Adding some course->xxxx missing fields to backup & restore. MDL-10444 2007-07-16 20:16:24 +00:00
urs_hunkler c69e712116 #admin-report-courseoverview-index .invisiblefieldset { display: block; } 2007-07-16 19:21:14 +00:00
skodak ce52f7c68c MDL-10482 incorrect texarea height; backported from HEAD 2007-07-16 14:51:03 +00:00
stronk7 1aca4eeaf0 Now the glossary->allowcoments setting is respected. MDL-8056
Credit goes to Matt Clarkson. Thanks.
2007-07-15 22:24:43 +00:00
skodak 3e57e4b578 MDL-8096 fixed & in htmlarea httpsrequired parameter - xhtml strict fix; backported from HEAD 2007-07-15 15:20:31 +00:00
mchurch d10350ce83 Tracker #MDL-9353 - Paypal cost of course not visible in course settings. 2007-07-13 20:12:32 +00:00
tjhunt e0fdaa9de0 MDL-10452 - start quiz UI is confusing if you have quiz:preview capability. Change the 'start/continue attempt button' to say 'start/continue preview' in this case. Merged from MOODLE_17_STABLE. 2007-07-13 15:58:32 +00:00
jamiesensei 2da97a4f23 merged in fix for MDL-10382 and MDL-10440 from HEAD. Revision 1.36 -1.38 from HEAD 2007-07-13 09:25:59 +00:00
moodler 5097b7269b Automatic installer.php lang files by installer_builder (20070713) 2007-07-13 08:37:27 +00:00
thepurpleblob f88c5b545d MDL-10380:
Check for randeredmatch plugin done using array_key_exists() for PHP4
compatibility
MDL-10317:
Question name is now the question ID, rather than the question text.
2007-07-13 08:35:09 +00:00
moodler be8963b70c Fixed a string for the no posts page 2007-07-13 03:04:25 +00:00
skodak 9bea47311f MDL-10433 Upgrade: undo_groupings() causes warnings (before groupings exist); backported from HEAD 2007-07-12 15:34:29 +00:00
nfreear be76a35ac3 Part fix of bug MDL-10332 "Data module not filtering list by group on .." - restore bug. Merged. 2007-07-12 14:15:58 +00:00
urs_hunkler eceb6476e1 One more of those .invisiblefieldset display inline issues. Please someone find another solutionand and throw out this general display:inline property. 2007-07-11 15:10:49 +00:00
thepurpleblob b0cd3f5453 MDL-10380:
Modified check for existence of renderedmatch plugin so that it sees it properly.
Bodged weird parameter passing issue so that correct answer choices are found.
2007-07-11 13:48:28 +00:00
thepurpleblob 24c07163d0 MDL-10415:
Documentation for Aiken format added back, plus a few other minor improvements.
2007-07-11 09:56:48 +00:00
moodler b95233e1e1 CHecked in a fix to make get_list_of_timezones calls more efficient MDL-8451 2007-07-11 09:07:34 +00:00
exe-cutor ba1b4cd1ef Got rid of warning messages 2007-07-11 08:29:10 +00:00
exe-cutor 21e00abf42 Fixed a but that caused problems with usernames (shibboleth attribute) that contained uppercase letters 2007-07-11 07:58:57 +00:00
urs_hunkler 9c257d8057 one more of these display: inline issues with invisiblefieldset :-( Can someone replace this problematic solution with another one - please!
after correcting the property to display:block the search button moves below the search field when the text gets longer or the block width very narrow.

.block_search_forums .invisiblefieldset {
  display: block;
}
2007-07-10 20:25:28 +00:00
moodler d0b9615cff Automatic installer.php lang files by installer_builder (20070710) 2007-07-10 06:35:14 +00:00
stronk7 fcbae39803 Now SQL sentences are all together and with proper terminators.
Tested against MySQL, PostgreSQL and MSSQL. MDL-7357
2007-07-09 18:03:15 +00:00
stronk7 25e5ce9a5f Reverting to previous version to respect cross-db. Final
tested solution arriving in hours. MDL-7357
2007-07-09 17:15:50 +00:00
jgutierr25 611e9f2a67 *** empty log message *** 2007-07-09 08:41:30 +00:00
toyomoyo 7936d32cf6 fix for MDL-9937, hidden teachers are visible during course enrol 2007-07-09 07:42:02 +00:00
moodler bc8f1674e9 CHanged XMLDB format slightly to make it easier to cut and paste MDL-7357 2007-07-09 03:56:04 +00:00
toyomoyo 5d29fd70a3 fix for MDL-9613, broken sql in online user block 2007-07-09 02:52:23 +00:00
moodler 6c8a956d90 Bump for post 1.8.2 2007-07-09 02:39:44 +00:00
stronk7 1aee1e5a27 Now tested against Oracle too. Adding option to XMLDB Editor interface. MDL-7357 2007-07-08 23:56:15 +00:00
stronk7 5e8255d651 First cut of the utility embeded in the XMLDB Editor used to
check any Moodle server looking for missing indexes. Tested
under MySQL, PostgreSQL and MSSQL. No frontend available
until tested for Oracle. MDL-7357
2007-07-08 23:18:16 +00:00
stronk7 6f8489e13d Adding some new strings to the XMLDB editor. MDL-7357 2007-07-08 23:12:54 +00:00
moodler b19909d9ae Bump to 1.8.2 release 2007-07-08 14:32:41 +00:00
Martin Langhoff 9084681497 cvsimport fixups 2007-07-07 14:09:13 +12:00
stronk7 305726a6a2 Small upgrade to fix some guest->mnethostid. MDL-10375 2007-07-06 17:43:33 +00:00
stronk7 62f3bee984 Use the new, central, create_guest_record() function. MDL-10375 2007-07-06 17:39:55 +00:00
stronk7 0183e41239 Adding new, central, create_guest_record() function. MDL-10375 2007-07-06 17:37:43 +00:00
poltawski 3b5d49f20c MDL-10311 - further groups import fixes 2007-07-06 16:28:43 +00:00
poltawski bdf5dce110 MDL-10311 Group import broken - missing lang strings & slight helpfile update 2007-07-06 15:30:43 +00:00
poltawski c278e8bc8f MDL-10311 Group import broken - groups import hadn't been updated for new groups,
also missing lang strings
2007-07-06 15:26:35 +00:00
moodler ed200fd420 New CAS module from Jérôme Gutierrez MDL-10366 2007-07-06 10:18:10 +00:00
urs_hunkler 44a718e930 In HTML resources the container box collapsed, when floats are used for content. Solved by adding "clearfix" to the classes. 2007-07-06 08:38:42 +00:00
moodler 5e4098df22 Automatic installer.php lang files by installer_builder (20070706) 2007-07-06 04:53:17 +00:00
skodak 300ade82c4 MDL-10355 fixed typo; backported from HEAD 2007-07-05 20:51:13 +00:00
moodler 275b342ce2 Automatic installer.php lang files by installer_builder (20070705) 2007-07-05 05:54:28 +00:00
skodak 84d7815107 MDL-10341 fixed user search cleaning 2007-07-04 08:30:53 +00:00
urs_hunkler cd1aa3bb76 working on MDL-10322 :: tabs. I added a space before the closing </li> to close the gap between the li elements used without images. I don't know why this space is necessary. 2007-07-03 20:14:20 +00:00
bobopinna 4b70ac02cd Fixed help title 2007-07-03 12:14:52 +00:00
bobopinna 2ad92ce59b Added a missing string 2007-07-03 12:09:39 +00:00
bobopinna bdf0b64635 Added missing help files 2007-07-03 12:06:39 +00:00
bobopinna fba486beb4 file whatgrade.html was added on branch MOODLE_18_STABLE on 2007-07-03 12:06:43 +0000 2007-07-03 12:04:18 +00:00
bobopinna 40bb4f3941 file stagesize.html was added on branch MOODLE_18_STABLE on 2007-07-03 12:06:43 +0000 2007-07-03 12:04:18 +00:00
bobopinna f5084fcf1f file skipview.html was added on branch MOODLE_18_STABLE on 2007-07-03 12:06:41 +0000 2007-07-03 12:04:18 +00:00
bobopinna 75f97e398e file maxattempt.html was added on branch MOODLE_18_STABLE on 2007-07-03 12:06:40 +0000 2007-07-03 12:04:18 +00:00
bobopinna 450eb77b78 file hidebrowse.html was added on branch MOODLE_18_STABLE on 2007-07-03 12:06:39 +0000 2007-07-03 12:04:17 +00:00
bobopinna 4caf41a177 Added a missing string 2007-07-03 10:28:30 +00:00
bobopinna d9a1a6f021 Fixed a bad definited string 2007-07-03 10:27:30 +00:00
bobopinna 880ae97916 Added activation string
fixed bug MDL-9570
2007-07-03 09:43:57 +00:00
bobopinna d10fd935b9 Readded Exit link now called "Exit Activity" 2007-07-03 09:36:31 +00:00
bobopinna d205581b9e Fixed bug MDL-9236 2007-07-03 09:27:42 +00:00
bobopinna e3c424e08c Fixed bug MDL-9776 2007-07-03 09:17:39 +00:00
bobopinna fa21044e08 Fixed bug MDL-10318 on db/update.php 2007-07-03 07:55:33 +00:00
bobopinna 5b696e30cc Fixed bug MDL-10318 2007-07-03 07:54:32 +00:00
stronk7 5c03a7d201 File no longer used. It's under formslib control since
Moodle 1.8. Thanks James! MDL-10036
2007-07-02 17:10:47 +00:00
stronk7 55c59f5050 XHTML conmpliance 2007-07-02 17:02:06 +00:00
stronk7 c9c54db3d8 Using the new "choose" parameter to navigate/preview/choose
IMS-CP resource packages. MDL-10036
2007-07-02 16:56:31 +00:00
stronk7 826b485ce1 Using the new choosecoursefileorimsrepo form element. MDL-10036 2007-07-02 16:53:26 +00:00
stronk7 bbbba10d73 Registering the choosecoursefileorimsrepo form element to
show the "Browse Repository" button
for IMS-CP resources type. (MDL-10036)
2007-07-02 16:50:47 +00:00
stronk7 493ac92129 Adding the choosecoursefileorimsrepo form element to
show the "Browse Repository" button
for IMS-CP resources type. (MDL-10036)
2007-07-02 16:48:32 +00:00
moodler 084712eadc Automatic installer.php lang files by installer_builder (20070702) 2007-07-02 04:56:52 +00:00
skodak 22f3e58605 MDL-9599 Glossary terms revert back to 'Not categorized' when using categories, patch by Alexander Pavlyutin 2007-07-01 15:47:46 +00:00
skodak dc6ef09c49 MDL-10309 Broken password expiration support for LDAP user types rfc2307 and rfc2307bis, patch by Iñaki Arenaza 2007-07-01 15:41:24 +00:00
thepurpleblob 3f9156bf56 MDL-10240:
Added Bb Short Response as a Moodle Essay type question.
Found quite a lot of stuff that could do to be checked and improved
in this code, so this should be considered an intermediate step.
2007-06-29 14:31:08 +00:00
moodler 52dce7612b Automatic installer.php lang files by installer_builder (20070629) 2007-06-29 04:59:49 +00:00
mchurch 552ae418de Bug MDL-8520. Adding target= to the logs buttons. 2007-06-28 18:15:13 +00:00
mchurch 4db3f36034 Bug MDL-8520. Adding target= to the prev/next buttons. 2007-06-28 18:07:09 +00:00
thepurpleblob 9259bf1c0e MDL-10234
Encoded images in subdirectories failed to load.
Thanks to Enrique Castro for fix.
2007-06-28 15:13:52 +00:00
moodler 9407c07c61 Automatic installer.php lang files by installer_builder (20070628) 2007-06-28 05:37:12 +00:00
toyomoyo 0b6c589f21 fix for MDL-10273, users with no capability sould not see New Event button 2007-06-28 03:58:39 +00:00
skodak 9da6b30269 MDL-10276 Text cleaning trouble; backported from HEAD 2007-06-27 12:00:26 +00:00
poltawski 5046d2353b MDL-10264 - fixed typo 2007-06-26 21:16:10 +00:00
gbateson 81f99d24f7 make sure $hotpot->id is set when adding calendar events for new HotPot 2007-06-26 12:04:00 +00:00
tjhunt a80094eff3 Error getting the context in old gradebook. Merged from OU moodle. 2007-06-26 11:50:19 +00:00
moodler f4921fb310 Implemented fix for MDL-10254, thanks Valery! 2007-06-26 09:07:56 +00:00
toyomoyo 6c709360f5 applying supplied patch to MDL-9051, missing $CFG->forum_enabletimedposts 2007-06-26 08:30:49 +00:00
moodler 8969caa059 Automatic installer.php lang files by installer_builder (20070626) 2007-06-26 07:56:55 +00:00
gbateson 226c671af7 in XML source files of HP quizzes, convert relative URLs to absolute URLs in links using window.open(...) 2007-06-26 05:03:38 +00:00
gbateson ca8c7dbc52 ange relative URLs to absolute URLs in window.open(...) 2007-06-26 02:45:40 +00:00
mchurch 1239139dd3 Fixing update_group_button and update_groups_button. They were no longer calling valid URL's. 2007-06-25 20:43:36 +00:00
mchurch fc1bdd6e88 Fixing update_group_button and update_groups_button. They were no longer calling valid URL's. 2007-06-25 20:33:52 +00:00
tjhunt b207f15ca2 Clean up whitespace. 2007-06-25 17:13:17 +00:00
urs_hunkler 9dd4a457c8 changed navmenuwidth to the standard value 2007-06-25 12:19:56 +00:00
moodler ea86a3aa8d Patch for JS problem in MDL-10027 (Chris Holmes did it) 2007-06-25 09:20:55 +00:00
moodler e33fc5a3ee Automatic installer.php lang files by installer_builder (20070625) 2007-06-25 06:49:18 +00:00
tjhunt 1cbf76c5fb MDL-10237 - Improve wording on true/false edit form. 2007-06-24 11:52:52 +00:00
urs_hunkler 06d11b581a Add an option $CFG->CSSEdit or $THEME->CSSEdit to Moodle. If one of both is set to true, Moodle does not write all CSS code in one single CSS file but adds CSS @include to the theme CSS file to load all single CSS files. These single CSS files can then be interactively edited and saved with CSSEdit. It's like Firebug with direct saving your changes. 2007-06-23 12:20:19 +00:00
moodler c519c19ab8 Automatic installer.php lang files by installer_builder (20070623) 2007-06-23 06:01:45 +00:00
tjhunt 357d918295 MDL-10213 - layuout problem for question in IE in Moodle 1.7. I'm taking the opportunity to clean up the CSS in 1.8 and HEAD to match what I did in 1.7. 2007-06-22 13:45:24 +00:00
jamiesensei 173e8c5dfb making environment colours css selector refer to table class instead of body id. So that colours show up on other pages besides admin page. 2007-06-22 11:06:21 +00:00
moodler 50e7e04949 Some fixups for the SCORM update page (missing strings etc) 2007-06-22 05:45:18 +00:00
tjhunt e1e9407acb MDL-7772 - improve the SQL for showing users without attemtps. 2007-06-21 16:14:32 +00:00
bobopinna 3f7cc1f861 Fixed a bad id definition for toc sublists 2007-06-20 09:23:22 +00:00
moodler 6a51d6a786 Automatic installer.php lang files by installer_builder (20070620) 2007-06-20 09:01:24 +00:00
bobopinna 8c36f3b9a9 Fixed a problem with utf8 bug MDL-10101 2007-06-20 08:53:00 +00:00
jamiesensei 2da68b0b32 added styles to install.php for colours for environment table 2007-06-20 06:37:01 +00:00
stronk7 55005a51ce Now calendar export have some correct defaults. MDL-10175 2007-06-19 17:53:14 +00:00
skodak c92d8dd677 (MDL-10155) detect failed regexes duing multilang upgrade (it was causing data loss on some sites); backported from HEAD 2007-06-19 17:26:45 +00:00
tjhunt e1e7d03480 Notices from T/F question is you submit without answering in adaptive mode. Merged from OU Moodle. 2007-06-19 16:35:58 +00:00
tjhunt 7ee50b87b8 XHTML Strict. 2007-06-19 16:32:54 +00:00
jamiesensei 687ce1c4e0 MDL-10168 improvements to display of results from environment checks 2007-06-19 16:32:07 +00:00
jamiesensei 3db1ddedd3 elaborated phpdoc comment slightly for doc_link 2007-06-19 15:17:14 +00:00
jamiesensei fc2df8c889 refactored page_doc_link into two functions. doc_link returns a link to docs. page_doc_link returns the link for this page. 2007-06-19 15:05:17 +00:00
toyomoyo 60a66a2bef fix for MDL-10122, accessibility for course search box 2007-06-19 03:20:42 +00:00
poltawski f7d555d577 MDL-10144 - Fix weak include not changed in STABLE 2007-06-18 19:37:28 +00:00
poltawski 974762e6f5 MDL-10148 - hard coded lang strings in user/message.html 2007-06-18 19:19:51 +00:00
bobopinna ab5642fe19 Fixed a typo added during last commit ;-) 2007-06-18 11:53:21 +00:00
andreabix b1b45674dd Fixed MDL-10100 2007-06-18 11:26:50 +00:00
thepurpleblob dee89d7ecc Missing a CVS Id tag 2007-06-18 10:27:08 +00:00
moodler 32caf9d6d9 Patch from Samuli Karevaara, thanks! 2007-06-18 06:34:13 +00:00
bobopinna 91c6c3dc85 Added some missing strings 2007-06-17 05:33:46 +00:00
mudrd8mz 331ecbe5b6 Undoing last three commits - I did not realized they should go into the HEAD and not into the STABLE :-( I am sorry...
I rolled back using
cvs update -j 1.88.2.8 -j 1.88.2.5 lang.php
2007-06-17 01:38:32 +00:00
mudrd8mz 46a4dde38c "Number of missing strings" or "No missing strings" displayed in the missing mode. Fixes MDL-7029 2007-06-17 01:21:16 +00:00
mudrd8mz 9b7d5f1aa8 Started to work on GUI improvements. Menu tabs introduced. Heading to fix MDL-8012 2007-06-17 00:41:22 +00:00
mudrd8mz 706ea2faf3 To choose a file to edit, popup_form() is used now. It saves some space on the screen. 2007-06-16 22:25:09 +00:00
ethem f8128f42a9 MDL-9836
Authorize.net / SSL Config Bug prevents display of options from enrol/authorize/enrol.php
2007-06-15 17:45:28 +00:00
andreabix 234e96d185 Fixed MDL-10073 2007-06-15 13:23:06 +00:00
csantossaenz 01b1fab671 Fixed bug MDL-7516 2007-06-15 09:09:36 +00:00
moodler 61d29b99d8 Skipping these may help some sites 2007-06-15 06:08:02 +00:00
moodler 8054e9aaad Push beyond 1.8.1 now 2007-06-15 04:19:22 +00:00
tjhunt ee4848432c XHTML strict! 2007-06-14 10:58:23 +00:00
tjhunt d3d4f4936e Whitespace cleanup in workshop help files. 2007-06-14 10:58:12 +00:00
toyomoyo d799be5424 backporting changes in HEAD to fix MDL-10093, administrator or course-creator assigned at course cat level can not restore new courses 2007-06-14 08:51:55 +00:00
urs_hunkler f24e0da312 MDL-9745 - added the fix for input field alignment to 1.8 too. 2007-06-14 07:08:58 +00:00
toyomoyo a8fbb9b4cd fix for MDL-10112 bulk messaging fails silently when messaging not enabled 2007-06-14 04:40:14 +00:00
stronk7 cfc673c112 Now the tokeniser is using the new textlib->entities_to_utf8()
own function (PHP4 and PHP compatible)
2007-06-13 23:21:36 +00:00
stronk7 6dfe1cc67c Added entities_to_utf8() function to textlib, suitable to convert
any entity (numerical and html) to utf-8, providing a PHP4 and PH5
way to do the work.
Also, added the code2utf8() function to convert Unicode code numbers
to UTF-8 chars.
2007-06-13 19:39:53 +00:00
tjhunt e796e306f8 Fix lang file sorting. 2007-06-13 16:39:53 +00:00
pichetp a7adb64678 Removing question/type/datasetdependent/categorydatasetdefinitions.php MDL-10072 2007-06-13 07:51:08 +00:00
toyomoyo bfd12c4dd5 fixing a bug related to setting the granular flag in restore 2007-06-13 06:33:18 +00:00
pichetp 8eede3f475 removing temporary debug print_r 2007-06-13 03:15:58 +00:00
pichetp 9267fe2f43 solving lost of dataitems MDL-10087 2007-06-13 03:11:14 +00:00
stronk7 1c09e6fe0c First cut of the tokeniser library. Modified from drupal search.module
code (see copyrights). The library converts any text/html into an array
of tokens with their score (weight). Supports stop_words, cjk basic
tokeniser (for indexers) and different modes of handling numbers.
2007-06-12 18:15:05 +00:00
pichetp 62fc4a966f set correctly default value for tolerencetype for answers 2007-06-12 15:50:24 +00:00
tjhunt 7ba648a011 Fix typo spotted by Eclipse. 2007-06-12 13:47:14 +00:00
tjhunt 19798dc28d Improve doc comments on get_context_* funcitions. 2007-06-12 11:11:34 +00:00
moodler 08f5787e35 Undoing MDL-9041 2007-06-12 07:05:30 +00:00
dwoolhead 5b99950ef1 Move Export calendar button to bottom of the page (IE especially) 2007-06-11 15:55:48 +00:00
pichetp 21cd4715de adding equation display in calculated question text(MDL-10070) and answers text length
greater.
2007-06-11 08:05:49 +00:00
moodler 9a9446e5b4 Automatic installer.php lang files by installer_builder (20070611) 2007-06-11 06:16:18 +00:00
1081 changed files with 66184 additions and 40397 deletions
-12256
View File
File diff suppressed because it is too large Load Diff
+16 -4
View File
@@ -140,9 +140,15 @@ $registrationauths = array();
$registrationauths[''] = $txt->disable;
foreach ($authsenabled as $auth) {
$authplugin = get_auth_plugin($auth);
$displayauths[$auth] = get_string("auth_{$auth}title", 'auth');
/// Get the auth title (from core or own auth lang files)
$authtitle = get_string("auth_{$auth}title", "auth");
if ($authtitle == "[[auth_{$auth}title]]") {
$authtitle = get_string("auth_{$auth}title", "auth_{$auth}");
}
/// Apply titles
$displayauths[$auth] = $authtitle;
if ($authplugin->can_signup()) {
$registrationauths[$auth] = get_string("auth_{$auth}title", 'auth');
$registrationauths[$auth] = $authtitle;
}
}
@@ -151,9 +157,15 @@ foreach ($authsavailable as $auth) {
continue; //already in the list
}
$authplugin = get_auth_plugin($auth);
$displayauths[$auth] = get_string("auth_{$auth}title", 'auth');
/// Get the auth title (from core or own auth lang files)
$authtitle = get_string("auth_{$auth}title", "auth");
if ($authtitle == "[[auth_{$auth}title]]") {
$authtitle = get_string("auth_{$auth}title", "auth_{$auth}");
}
/// Apply titles
$displayauths[$auth] = $authtitle;
if ($authplugin->can_signup()) {
$registrationauths[$auth] = get_string("auth_{$auth}title", 'auth');
$registrationauths[$auth] = $authtitle;
}
}
+15 -9
View File
@@ -9,6 +9,7 @@ require_once $CFG->libdir.'/adminlib.php';
$adminroot = admin_get_root();
admin_externalpage_setup('userauthentication', $adminroot);
$auth = required_param('auth', PARAM_SAFEDIR);
$CFG->pagepath = 'auth/' . $auth;
$authplugin = get_auth_plugin($auth);
$err = array();
@@ -50,13 +51,18 @@ if ($frm = data_submitted()) {
$frm = get_config("auth/$auth");
}
$user_fields = array("firstname", "lastname", "email", "phone1", "phone2", "department", "address", "city", "country", "description", "idnumber", "lang");
$user_fields = array("firstname", "lastname", "email", "phone1", "phone2", "institution", "department", "address", "city", "country", "description", "idnumber", "lang");
$modules = get_list_of_plugins('auth');
foreach ($modules as $module) {
$options[$module] = get_string("auth_{$module}title", 'auth');
}
asort($options);
/// Get the auth title (from core or own auth lang files)
$authtitle = get_string("auth_{$auth}title", "auth");
if ($authtitle == "[[auth_{$auth}title]]") {
$authtitle = get_string("auth_{$auth}title", "auth_{$auth}");
}
/// Get the auth descriptions (from core or own auth lang files)
$authdescription = get_string("auth_{$auth}description", "auth");
if ($authdescription == "[[auth_{$auth}description]]") {
$authdescription = get_string("auth_{$auth}description", "auth_{$auth}");
}
// output configuration form
admin_externalpage_print_header($adminroot);
@@ -69,9 +75,9 @@ echo "<input type=\"hidden\" name=\"auth\" value=\"".$auth."\" />\n";
// auth plugin description
print_simple_box_start('center', '80%');
print_heading($options[$auth]);
print_simple_box_start('center', '60%', '', 5, 'informationbox');
print_string("auth_{$auth}description", 'auth');
print_heading($authtitle);
print_simple_box_start('center', '80%', '', 5, 'informationbox');
echo $authdescription;
print_simple_box_end();
echo "<hr />\n";
$authplugin->config_form($frm, $err, $user_fields);
+8 -3
View File
@@ -54,7 +54,7 @@
if (!$block = blocks_get_record($multiple)) {
error("Block doesn't exist!");
}
$block->multiple = !$block->multiple;
$block->multiple = intval(!$block->multiple);
update_record('block', $block);
}
@@ -179,8 +179,13 @@
if($blockobject->has_config()) {
$settings = '<a href="block.php?block='.$blockid.'">'.$strsettings.'</a>';
}
$count = count_records('block_instance', 'blockid', $blockid);
// MDL-11167, blocks can be placed on mymoodle, or the blogs page
// and it should not show up on course search page
$count = count_records_sql('SELECT COUNT(*)
FROM '.$CFG->prefix.'block_instance
WHERE blockid = '.$blockid.' AND
pagetype = \'course-view\'');
if ($count>0) {
$blocklist = "<a href=\"{$CFG->wwwroot}/course/search.php?blocklist=$blockid&amp;sesskey={$USER->sesskey}\" ";
$blocklist .= "title=\"$strshowblockcourse\" >$count</a>";
+36 -11
View File
@@ -98,11 +98,21 @@
$cron_function = $mod->name."_cron";
if (function_exists($cron_function)) {
mtrace("Processing module function $cron_function ...", '');
if (!empty($PERF->dbqueries)) {
$pre_dbqueries = $PERF->dbqueries;
$pre_time = microtime(1);
}
if ($cron_function()) {
if (! set_field("modules", "lastcron", $timenow, "id", $mod->id)) {
mtrace("Error: could not update timestamp for $mod->fullname");
}
}
if (isset($pre_dbqueries)) {
mtrace("... used " . ($PERF->dbqueries - $pre_dbqueries) . " dbqueries");
mtrace("... used " . (microtime(1) - $pre_time) . " seconds");
}
/// Reset possible changes by modules to time_limit. MDL-11597
@set_time_limit(0);
mtrace("done.");
}
}
@@ -127,6 +137,8 @@
mtrace('Error: could not update timestamp for '.$block->name);
}
}
/// Reset possible changes by blocks to time_limit. MDL-11597
@set_time_limit(0);
mtrace('done.');
}
}
@@ -142,13 +154,26 @@
mtrace('Removing expired enrolments ...', ''); // See MDL-8785
$timenow = time();
if ($oldenrolments = get_records_select('role_assignments', "timeend > 0 AND timeend < '$timenow'")) {
mtrace(count($oldenrolments).' to delete');
foreach ($oldenrolments as $oldenrolment) {
if (role_unassign($oldenrolment->roleid, $oldenrolment->userid, 0, $oldenrolment->contextid)) {
mtrace("Deleted expired role assignment $oldenrolment->roleid for user $oldenrolment->userid from context $oldenrolment->contextid");
}
}
$somefound = false;
// The preferred way saves memory, dmllib.php
// find courses where limited enrolment is enabled
global $CFG;
$rs_enrol = get_recordset_sql("SELECT ra.roleid, ra.userid, ra.contextid
FROM {$CFG->prefix}course c
INNER JOIN {$CFG->prefix}context cx ON cx.instanceid = c.id
INNER JOIN {$CFG->prefix}role_assignments ra ON ra.contextid = cx.id
WHERE cx.contextlevel = '".CONTEXT_COURSE."'
AND ra.timeend > 0
AND ra.timeend < '$timenow'
AND c.enrolperiod > 0
");
mtrace($rs_enrol->RecordCount().' to delete');
while ($oldenrolment = rs_fetch_next_record($rs_enrol)) {
role_unassign($oldenrolment->roleid, $oldenrolment->userid, 0, $oldenrolment->contextid);
$somefound = true;
}
rs_close($rs_enrol);
if($somefound) {
mtrace('Done');
} else {
mtrace('none found');
@@ -173,7 +198,7 @@
foreach ($assigns as $assign) {
if ($context = get_context_instance(CONTEXT_COURSE, $assign->courseid)) {
if (role_unassign(0, $assign->id, 0, $context->id)) {
mtrace("Deleted assignment for user $assign->id from course $assign->courseid");
mtrace("removing user $assign->id from course $assign->courseid as they have not accessed the course for over $CFG->longtimenosee days");
}
}
}
@@ -199,8 +224,8 @@
/// Delete users who haven't completed profile within required period
if (!empty($CFG->deleteunconfirmed)) {
$oneweek = $timenow - ($CFG->deleteunconfirmed * 3600);
if (!empty($CFG->deleteincompleteusers)) {
$cuttime = $timenow - ($CFG->deleteincompleteusers * 3600);
if ($users = get_users_not_fully_set_up($oneweek)) {
foreach ($users as $user) {
if (delete_records('user', 'id', $user->id)) {
@@ -339,7 +364,7 @@
if (!empty($CFG->enablestats) and empty($CFG->disablestatsprocessing)) {
// check we're not before our runtime
$timetocheck = strtotime("$CFG->statsruntimestarthour:$CFG->statsruntimestartminute today");
$timetocheck = strtotime("today $CFG->statsruntimestarthour:$CFG->statsruntimestartminute");
if (time() > $timetocheck) {
$time = 60*60*20; // set it to 20 here for first run... (overridden by $CFG)
+1 -1
View File
@@ -54,7 +54,7 @@ function delete_subdirectories($rootdir) {
$dir = opendir($rootdir);
while ($file = readdir($dir)) {
while (false !== ($file = readdir($dir))) {
if ($file != '.' and $file != '..') {
$fullfile = $rootdir .'/'. $file;
if (filetype($fullfile) == 'dir') {
+160
View File
@@ -117,6 +117,166 @@
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="optional">
<FEEDBACK>
<ON_CHECK message="ctyperecommended" />
</FEEDBACK>
</PHP_EXTENSION>
</PHP_EXTENSIONS>
</MOODLE>
<MOODLE version="1.9">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mysql" version="4.1.16">
<FEEDBACK>
<ON_ERROR message="mysql416required" />
</FEEDBACK>
<BYPASS function="bypass_mysql416_reqs" message="mysql416bypassed" />
</VENDOR>
<VENDOR name="postgres" version="8.0" />
<VENDOR name="mssql" version="9.0" />
<VENDOR name="odbc_mssql" version="9.0" />
<VENDOR name="mssql_n" version="9.0" />
<VENDOR name="oracle" version="9.0" />
</DATABASE>
<PHP version="4.3.0" level="required">
<RESTRICT function="restrict_php50_version" message="php50restricted" />
</PHP>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="optional">
<FEEDBACK>
<ON_CHECK message="iconvrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
<FEEDBACK>
<ON_CHECK message="mbstringrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="optional">
<FEEDBACK>
<ON_CHECK message="curlrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="optional">
<FEEDBACK>
<ON_CHECK message="opensslrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="optional">
<FEEDBACK>
<ON_CHECK message="ctyperecommended" />
</FEEDBACK>
</PHP_EXTENSION>
</PHP_EXTENSIONS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="question/upgrade.php" function="question_check_no_rqp_questions" level="optional">
<FEEDBACK>
<ON_CHECK message="qtyperqpwillberemovedanyway" />
<ON_OK message="qtyperqpwillberemoved" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="question/upgrade.php" function="question_random_check" level="optional">
<FEEDBACK>
<ON_OK message="questioncwqpfsok" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/customcheckslib.php" function="php_check_register_globals" level="required">
<FEEDBACK>
<ON_CHECK message="globalswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="2.0" requires="1.9">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mysql" version="4.1.16">
<FEEDBACK>
<ON_ERROR message="mysql416required" />
</FEEDBACK>
<BYPASS function="bypass_mysql416_reqs" message="mysql416bypassed" />
</VENDOR>
<VENDOR name="postgres" version="8.0" />
<VENDOR name="mssql" version="9.0" />
<VENDOR name="odbc_mssql" version="9.0" />
<VENDOR name="mssql_n" version="9.0" />
<VENDOR name="oracle" version="9.0" />
<VENDOR name="sqlite" version="2.0" />
</DATABASE>
<PHP version="5.2.4" level="required">
</PHP>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="optional">
<FEEDBACK>
<ON_CHECK message="iconvrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
<FEEDBACK>
<ON_CHECK message="mbstringrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_CHECK message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="optional">
<FEEDBACK>
<ON_CHECK message="opensslrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="required">
<FEEDBACK>
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zip" level="required">
<FEEDBACK>
<ON_ERROR message="ziprequired" />
</FEEDBACK>
</PHP_EXTENSION>
</PHP_EXTENSIONS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="lib/customcheckslib.php" function="php_check_register_globals" level="required">
<FEEDBACK>
<ON_CHECK message="globalswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
</COMPATIBILITY_MATRIX>
+193 -1
View File
@@ -525,11 +525,203 @@ class problem_000011 extends problem_base {
}
return 'Error counter was cleared.';
} else {
return '<p>Session errors can be caused by:<ul><li>unresolved problem in server software (aka random switching of users),</li><li>blocked or modified cookies,</li><li>deleting of active session files.</li></ul></p><p><a href="'.me().'&resetsesserrorcounter=1">Reset counter.</a></p>';
return '<p>Session errors can be caused by:</p><ul>' .
'<li>unresolved problem in server software (aka random switching of users),</li>' .
'<li>blocked or modified cookies,</li>' .
'<li>deleting of active session files.</li>' .
'</ul><p><a href="'.me().'&amp;resetsesserrorcounter=1">Reset counter</a></p>';
}
}
}
class problem_000012 extends problem_base {
function title() {
return 'Random questions data consistency';
}
function exists() {
return record_exists_select('question', "qtype = 'random' AND parent <> id");
}
function severity() {
return SEVERITY_ANNOYANCE;
}
function description() {
return '<p>For random questions, question.parent should equal question.id. ' .
'There are some questions in your database for which this is not true. ' .
'One way that this could have happened is for random questions restored from backup before ' .
'<a href="http://tracker.moodle.org/browse/MDL-5482">MDL-5482</a> was fixed.</p>';
}
function solution() {
global $CFG;
return '<p>Upgrade to Moodle 1.9.1 or later, or manually execute the SQL</p>' .
'<pre>UPDATE ' . $CFG->prefix . 'question SET parent = id WHERE qtype = \'random\' and parent &lt;> id;</pre>';
}
}
class problem_000013 extends problem_base {
function title() {
return 'Multi-answer questions data consistency';
}
function exists() {
global $CFG;
$positionexpr = sql_position(sql_concat("','", "q.id", "','"),
sql_concat("','", "qma.sequence", "','"));
return record_exists_sql("
SELECT * FROM {$CFG->prefix}question q
JOIN {$CFG->prefix}question_multianswer qma ON $positionexpr > 0
WHERE qma.question <> q.parent") ||
record_exists_sql("
SELECT * FROM {$CFG->prefix}question q
JOIN {$CFG->prefix}question parent_q ON parent_q.id = q.parent
WHERE q.category <> parent_q.category");
}
function severity() {
return SEVERITY_ANNOYANCE;
}
function description() {
return '<p>For each sub-question whose id is listed in ' .
'question_multianswer.sequence, its question.parent field should equal ' .
'question_multianswer.question; and each sub-question should be in the same ' .
'category as its parent. There are questions in your database for ' .
'which this is not the case. One way that this could have happened is ' .
'for multi-answer questions restored from backup before ' .
'<a href="http://tracker.moodle.org/browse/MDL-14750">MDL-14750</a> was fixed.</p>';
}
function solution() {
return '<p>Upgrade to Moodle 1.9.1 or later, or manually execute the ' .
'code in question_multianswer_fix_subquestion_parents_and_categories in ' .
'<a href="http://cvs.moodle.org/moodle/question/type/multianswer/db/upgrade.php?revision=1.1.10.2&amp;view=markup">/question/type/multianswer/db/upgrade.php' .
'from the 1.9 stable branch</a>.</p>';
}
}
class problem_000014 extends problem_base {
function title() {
return 'Only multianswer and random questions should be the parent of another question';
}
function exists() {
global $CFG;
return record_exists_sql("
SELECT * FROM {$CFG->prefix}question q
JOIN {$CFG->prefix}question parent_q ON parent_q.id = q.parent
WHERE parent_q.qtype NOT IN ('random', 'multianswer')");
}
function severity() {
return SEVERITY_ANNOYANCE;
}
function description() {
return '<p>You have questions that violate this in your databse. ' .
'You will need to investigate to determine how this happened.</p>';
}
function solution() {
return '<p>It is impossible to give a solution without knowing more about ' .
' how the problem was caused. You may be able to get help from the ' .
'<a href="http://moodle.org/mod/forum/view.php?f=121">Quiz forum</a>.</p>';
}
}
class problem_000017 extends problem_base {
function title() {
return 'Question categories tree structure';
}
function find_problems() {
static $answer = null;
if (is_null($answer)) {
$categories = get_records('question_categories', '', '', 'id');
// Look for missing parents.
$missingparent = array();
foreach ($categories as $category) {
if ($category->parent != 0 && !array_key_exists($category->parent, $categories)) {
$missingparent[$category->id] = $category;
}
}
// Look for loops.
$loops = array();
while (!empty($categories)) {
$current = array_pop($categories);
$thisloop = array($current->id => $current);
while (true) {
if (isset($thisloop[$current->parent])) {
// Loop detected
$loops[$current->id] = $thisloop;
break;
} else if (!isset($categories[$current->parent])) {
// Got to the top level, or a category we already know is OK.
break;
} else {
// Continue following the path.
$current = $categories[$current->parent];
$thisloop[$current->id] = $current;
unset($categories[$current->id]);
}
}
}
$answer = array($missingparent, $loops);
}
return $answer;
}
function exists() {
list($missingparent, $loops) = $this->find_problems();
return !empty($missingparent) || !empty($loops);
}
function severity() {
return SEVERITY_ANNOYANCE;
}
function description() {
list($missingparent, $loops) = $this->find_problems();
$description = '<p>The question categories should be arranged into tree ' .
' structures by the question_categories.parent field. Sometimes ' .
' this tree structure gets messed up.</p>';
if (!empty($missingparent)) {
$description .= '<p>The following categories are missing their parents:</p><ul>';
foreach ($missingparent as $cat) {
$description .= "<li>Category $cat->id: " . s($cat->name) . "</li>\n";
}
$description .= "</ul>\n";
}
if (!empty($loops)) {
$description .= '<p>The following categories form a loop of parents:</p><ul>';
foreach ($loops as $loop) {
$description .= "<li><ul>\n";
foreach ($loop as $cat) {
$description .= "<li>Category $cat->id: " . s($cat->name) . " has parent $cat->parent</li>\n";
}
$description .= "</ul></li>\n";
}
$description .= "</ul>\n";
}
return $description;
}
function solution() {
global $CFG;
list($missingparent, $loops) = $this->find_problems();
$solution = '<p>Consider executing the following SQL queries. These fix ' .
'the problem by moving some categories to the top level.</p>';
if (!empty($missingparent)) {
$solution .= "<pre>UPDATE " . $CFG->prefix . "question_categories\n" .
" SET parent = 0\n" .
" WHERE id IN (" . implode(',', array_keys($missingparent)) . ");</pre>\n";
}
if (!empty($loops)) {
$solution .= "<pre>UPDATE " . $CFG->prefix . "question_categories\n" .
" SET parent = 0\n" .
" WHERE id IN (" . implode(',', array_keys($loops)) . ");</pre>\n";
}
return $solution;
}
}
class problem_00000x extends problem_base {
function title() {
+33 -24
View File
@@ -190,8 +190,9 @@
$db->debug = false;
if ($status) {
//ugly hack - install new groups: MDL-9217
require_once("$CFG->dirroot/group/db/upgrade.php");
install_group_db();
require("$CFG->dirroot/group/version.php");
set_config('group_version', $group_version);
//install_group_db();
// Install the roles system.
moodle_install_roles();
@@ -281,11 +282,16 @@
require_once($CFG->libdir.'/environmentlib.php');
print_heading(get_string('environment', 'admin'));
if (!check_moodle_environment($release, $environment_results, true)) {
print_box_start('generalbox', 'notice'); // MDL-8330
print_string('langpackwillbeupdated', 'admin');
print_box_end();
notice_yesno(get_string('environmenterrorupgrade', 'admin'),
'index.php?confirmupgrade=1&confirmrelease=1', 'index.php');
} else {
notify(get_string('environmentok', 'admin'), 'notifysuccess');
print_box_start('generalbox', 'notice'); // MDL-8330
print_string('langpackwillbeupdated', 'admin');
print_box_end();
echo '<form action="index.php"><div>';
echo '<input type="hidden" name="confirmupgrade" value="1" />';
echo '<input type="hidden" name="confirmrelease" value="1" />';
@@ -325,9 +331,10 @@
/// If successful, continue upgrading roles and setting everything properly
if ($status) {
if (empty($CFG->rolesactive)) {
//ugly hack - upgrade to new groups (from 1.6) : MDL-9217
require_once("$CFG->dirroot/group/db/upgrade.php");
install_group_db();
// ugly hack - upgrade to new groups (from 1.6) : MDL-9217
// require_once("$CFG->dirroot/group/db/upgrade.php");
// MDL-11062, proper group upgrade code is done in lib/db/upgrade.php
// install_group_db();
// Upgrade to the roles system.
moodle_install_roles();
set_config('rolesactive', 1);
@@ -407,6 +414,9 @@
/// first old *.php update and then the new upgrade.php script
upgrade_plugins('enrol', 'enrol', "$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
/// Check all auth plugins and upgrade if necessary
upgrade_plugins('auth','auth',"$CFG->wwwroot/$CFG->admin/index.php");
/// Check all course formats and upgrade if necessary
upgrade_plugins('format','course/format',"$CFG->wwwroot/$CFG->admin/index.php");
@@ -416,7 +426,7 @@
upgrade_local_db("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
/// Check for changes to RPC functions
require_once($CFG->dirroot.'/admin/mnet/adminlib.php');
require_once("$CFG->dirroot/$CFG->admin/mnet/adminlib.php");
upgrade_RPC_functions("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
@@ -488,19 +498,7 @@
/// Check if the guest user exists. If not, create one.
if (! record_exists("user", "username", "guest")) {
$guest->auth = "manual";
$guest->username = "guest";
$guest->password = md5("guest");
$guest->firstname = addslashes(get_string("guestuser"));
$guest->lastname = " ";
$guest->email = "root@localhost";
$guest->description = addslashes(get_string("guestuserinfo"));
$guest->mnethostid = $CFG->mnet_localhost_id;
$guest->confirmed = 1;
$guest->lang = $CFG->lang;
$guest->timemodified= time();
if (! $guest->id = insert_record("user", $guest)) {
if (! $guest = create_guest_record()) {
notify("Could not create guest user record !!!");
}
}
@@ -549,15 +547,26 @@
print_box(get_string("upgrade$CFG->upgrade", "admin", "$CFG->wwwroot/$CFG->admin/upgrade$CFG->upgrade.php"));
}
if (ini_get_bool('register_globals') && !ini_get_bool('magic_quotes_gpc')) {
print_box(get_string('globalsquoteswarning', 'admin'), 'generalbox adminwarning');
if (ini_get_bool('register_globals')) {
print_box(get_string('globalswarning', 'admin'), 'generalbox adminwarning');
}
if (is_dataroot_insecure()) {
print_box(get_string('datarootsecuritywarning', 'admin', $CFG->dataroot), 'generalbox adminwarning');
}
/// If no recently cron run
if (defined('WARN_DISPLAY_ERRORS_ENABLED')) {
print_box(get_string('displayerrorswarning', 'admin'), 'generalbox adminwarning');
}
if (substr($CFG->wwwroot, -1) == '/') {
print_box(get_string('cfgwwwrootslashwarning', 'admin'), 'generalbox adminwarning');
}
if (strpos($ME, $CFG->httpswwwroot.'/') === false) {
print_box(get_string('cfgwwwrootwarning', 'admin'), 'generalbox adminwarning');
}
/// If no recently cron run
$lastcron = get_field_sql('SELECT max(lastcron) FROM ' . $CFG->prefix . 'modules');
if (time() - $lastcron > 3600 * 24) {
$strinstallation = get_string('installation', 'install');
@@ -592,7 +601,7 @@
//////////////////////////////////////////////////////////////////////////////////////////////////
//// IT IS ILLEGAL AND A VIOLATION OF THE GPL TO HIDE, REMOVE OR MODIFY THIS COPYRIGHT NOTICE ///
$copyrighttext = '<a href="http://moodle.org/">Moodle</a> '.
'<a href="http://docs.moodle.org/en/Release">'.$CFG->release.'</a> ('.$CFG->version.')<br />'.
'<a href="http://docs.moodle.org/en/Release" title="'.$CFG->version.'">'.$CFG->release.'</a><br />'.
'Copyright &copy; 1999 onwards, Martin Dougiamas<br />'.
'and <a href="http://docs.moodle.org/en/Credits">many other contributors</a>.<br />'.
'<a href="http://docs.moodle.org/en/License">GNU Public License</a>';
+3
View File
@@ -583,6 +583,9 @@ function lang_fix_value_before_save($value='') {
if ($CFG->lang != "zh_hk" and $CFG->lang != "zh_tw") { // Some MB languages include backslash bytes
$value = str_replace("\\","",$value); // Delete all slashes
}
if (ini_get_bool('magic_quotes_sybase')) { // Unescape escaped sybase quotes
$value = str_replace("''", "'", $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
@@ -308,7 +308,7 @@
}
if ($remote) {
echo '</select>';
echo '<br /><input type="submit" value="&larr; '.get_string('install','admin').'" />';
echo '<br /><input type="submit" value="'.$THEME->larrow.' '.get_string('install','admin').'" />';
}
echo '</fieldset>';
echo '</form>';
+4 -4
View File
@@ -47,7 +47,7 @@ if (!empty($action) and confirm_sesskey()) {
// fetch the record in question
$id = required_param('id', PARAM_INT);
if (!$idrec = get_record('mnet_sso_access_control', 'id', $id)) {
error(get_string('recordnoexists','mnet'), '/admin/mnet/access_control.php');
error(get_string('recordnoexists','mnet'), "/$CFG->admin/mnet/access_control.php");
}
switch ($action) {
@@ -62,7 +62,7 @@ if (!empty($action) and confirm_sesskey()) {
// require the access parameter, and it must be 'allow' or 'deny'
$accessctrl = trim(strtolower(required_param('accessctrl', PARAM_ALPHA)));
if ($accessctrl != 'allow' and $accessctrl != 'deny') {
error(get_string('invalidaccessparam', 'mnet') , '/admin/mnet/access_control.php');
error(get_string('invalidaccessparam', 'mnet') , "/$CFG->admin/mnet/access_control.php");
}
if (mnet_update_sso_access_control($idrec->username, $idrec->mnet_host_id, $accessctrl)) {
@@ -75,7 +75,7 @@ if (!empty($action) and confirm_sesskey()) {
break;
default:
print_error('invalidactionparam', 'mnet', '/admin/mnet/access_control.php');
print_error('invalidactionparam', 'mnet', "/$CFG->admin/mnet/access_control.php");
}
}
@@ -86,7 +86,7 @@ if ($form = data_submitted() and confirm_sesskey()) {
// check permissions and verify form input
if (!has_capability('moodle/user:delete', $sitecontext)) {
error(get_string('nomodifyacl','mnet'), '/admin/mnet/access_control.php');
error(get_string('nomodifyacl','mnet'), "/$CFG->admin/mnet/access_control.php");
}
if (empty($form->username)) {
$formerror['username'] = get_string('enterausername','mnet');
+3 -3
View File
@@ -29,7 +29,7 @@ function mnet_get_functions($type, $parentname) {
$docname = 'rpclib.php';
$relname = '/mod/'.$parentname.'/'.$docname;
$filename = $CFG->dirroot.$relname;
if (file_exists($filename)) include $filename;
if (file_exists($filename)) include_once $filename;
$mnet_publishes = $parentname.'_mnet_publishes';
if (function_exists($mnet_publishes)) {
(array)$publishes = $mnet_publishes();
@@ -38,7 +38,7 @@ function mnet_get_functions($type, $parentname) {
// auth or enrol
$relname = '/'.$type.'/'.$parentname.'/'.$docname;
$filename = $CFG->dirroot.$relname;
if (file_exists($filename)) include $filename;
if (file_exists($filename)) include_once $filename;
$class = $type.($type=='enrol'? 'ment':'').'_plugin_'.$parentname;
if (class_exists($class)) {
$object = new $class();
@@ -72,7 +72,7 @@ function mnet_get_functions($type, $parentname) {
if (!file_exists($filename)) return false;
if (extension_loaded('tokenizer')) {
include_once $CFG->dirroot.'/admin/mnet/MethodTable.php';
include_once "$CFG->dirroot/$CFG->admin/mnet/MethodTable.php";
$functions = (array)MethodTable::create($filename,false);
}
+3 -3
View File
@@ -1,7 +1,7 @@
<?php
print_header("$site->shortname: $strmnetsettings", "$site->fullname",
'<a href="'.$CFG->wwwroot.'/admin/index.php">'.$stradministration.'</a> -> '.
'<a href="'.$CFG->wwwroot.'/admin/mnet/index.php">'.get_string('mnetsettings', 'mnet').'</a> -> Delete host');
'<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/index.php">'.$stradministration.'</a> -> '.
'<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/mnet/index.php">'.get_string('mnetsettings', 'mnet').'</a> -> Delete host');
print_heading(get_string('mnetsettings', 'mnet'));
?>
@@ -46,7 +46,7 @@ print_heading(get_string('mnetsettings', 'mnet'));
</td>
</tr>
</table>
</center>
</div>
<?php
print_footer();
?>
+1 -1
View File
@@ -38,7 +38,7 @@
" class=\"icon\" alt=\"".get_string("course")."\" />";
foreach ($courses as $course) {
$link = $CFG->wwwroot . '/admin/mnet/enr_course_enrol.php?'
$link = "$CFG->wwwroot/$CFG->admin/mnet/enr_course_enrol.php?"
. "host={$mnethost}&amp;courseid={$course->id}&amp;sesskey={$USER->sesskey}";
echo '<tr>'
. "<td>$icon</td>"
+1 -1
View File
@@ -38,7 +38,7 @@
. '</tr>';
$hosts = $enrolment->list_remote_servers();
foreach ($hosts as $host) {
$coursesurl = "{$CFG->wwwroot}/admin/mnet/enr_courses.php?host={$host->id}&amp;sesskey={$USER->sesskey}";
$coursesurl = "{$CFG->wwwroot}/$CFG->admin/mnet/enr_courses.php?host={$host->id}&amp;sesskey={$USER->sesskey}";
$coursecount = get_field_sql("SELECT count(id) FROM {$CFG->prefix}mnet_enrol_course WHERE hostid={$host->id}");
if (empty($coursecount)) {
$coursecount = '?';
+1 -1
View File
@@ -40,7 +40,7 @@
/// If data submitted, process and store
if (($form = data_submitted()) && confirm_sesskey()) {
if (!empty($form->submit) && $form->submit == get_string('savechanges')) {
if (in_array($form->mode, array("off", "strict", "promiscuous"))) {
if (in_array($form->mode, array("off", "strict", "dangerous"))) {
if (set_config('mnet_dispatcher_mode', $form->mode)) {
redirect('index.php', get_string('changessaved'));
} else {
+8 -1
View File
@@ -48,7 +48,14 @@
$publish = (isset($_POST['publish'][$key]) && $_POST['publish'][$key] == 'on')? 1 : 0;
$subscribe = (isset($_POST['subscribe'][$key]) && $_POST['subscribe'][$key] == 'on')? 1 : 0;
if (false == $host2service && ($publish == 1 || $subscribe == 1)) {
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);
}
} elseif (false == $host2service && ($publish == 1 || $subscribe == 1)) {
$host2service = new stdClass();
$host2service->hostid = $_POST['hostid'];
$host2service->serviceid = $key;
+1 -1
View File
@@ -76,7 +76,7 @@ if (empty($CFG->mnet_dispatcher_mode) || $CFG->mnet_dispatcher_mode !== 'strict'
</th>
</tr>
<tr>
<td class="cell c0"></td>
<td class="cell c0">wwwroot:</td>
<td class="cell c1"><input type="text" name="wwwroot" value="" /></td>
<td class="cell c2"></td>
<td class="cell c3"></td>
+9 -2
View File
@@ -50,6 +50,11 @@ if (($form = data_submitted()) && confirm_sesskey()) {
if (!empty($form->wwwroot)) {
// ensure we remove trailing slashes
$form->wwwroot = preg_replace(':/$:', '', $form->wwwroot);
// ensure the wwwroot starts with a http or https prefix
if (strtolower(substr($form->wwwroot, 0, 4)) != 'http') {
$form->wwwroot = 'http://'.$form->wwwroot;
}
}
if(!function_exists('xmlrpc_encode_request')) {
@@ -91,6 +96,7 @@ if (($form = data_submitted()) && confirm_sesskey()) {
if (isset($form->deleted) && ($form->deleted == '0' || $form->deleted == '1')) {
$mnet_peer->deleted = $form->deleted;
$mnet_peer->updateparams->deleted = $form->deleted;
}
if (isset($form->public_key)) {
@@ -101,9 +107,10 @@ if (($form = data_submitted()) && confirm_sesskey()) {
} else {
$oldkey = $mnet_peer->public_key;
$mnet_peer->public_key = $form->public_key;
$mnet_peer->public_key_expires = $mnet_peer->check_common_name($form->public_key);
$mnet_peer->updateparams->public_key = $form->public_key;
$mnet_peer->public_key_expires = $mnet_peer->check_common_name($form->public_key);
$mnet_peer->updateparams->public_key_expires = $mnet_peer->check_common_name($form->public_key);
if ($mnet_peer->public_key_expires == false) {
$mnet_peer->public_key == $oldkey;
$errmsg = '<br />';
foreach ($mnet_peer->error as $err) {
$errmsg .= $err['code'] . ': ' . $err['text'].'<br />';
+2 -2
View File
@@ -16,7 +16,7 @@
}
if ($module != '') {
require_once("$CFG->dirroot/mod/$module/lib.php");
include_once("$CFG->dirroot/mod/$module/lib.php");
// if the config.html contains a hidden form field giving
// the module name then the form does not have to prefix all
// its variable names, we will do it here.
@@ -43,7 +43,7 @@
/// Otherwise print the form.
$module = required_param('module', PARAM_SAFEDIR);
require_once("$CFG->dirroot/mod/$module/lib.php");
include_once("$CFG->dirroot/mod/$module/lib.php");
$strmodulename = get_string("modulename", $module);
+36 -19
View File
@@ -34,29 +34,45 @@
print_heading($stractivities);
$coursesaffected = false;
/// If data submitted, then process and store.
if (!empty($hide) and confirm_sesskey()) {
if (!$module = get_record("modules", "name", $hide)) {
error("Module doesn't exist!");
}
set_field("modules", "visible", "0", "id", $module->id); // Hide main module
set_field('course_modules', 'visibleold', '1', 'visible' ,'1', 'module', $module->id); // Remember the previous visible state so we can toggle this back if the module is unhidden.
set_field('course_modules', 'visibleold', '0', 'visible' ,'0', 'module', $module->id);
set_field("course_modules", "visible", "0", "module", $module->id); // Hide all related activity modules
$coursesaffected = true;
set_field("modules", "visible", "0", "id", $module->id); // Hide main module
// Remember the visibility status in visibleold
// and hide...
$sql = "UPDATE {$CFG->prefix}course_modules
SET visibleold=visible,
visible=0
WHERE module={$module->id}";
execute_sql($sql, false);
// clear the course modinfo cache for courses
// where we just deleted something
$sql = "UPDATE {$CFG->prefix}course
SET modinfo=''
WHERE id IN (SELECT DISTINCT course
FROM {$CFG->prefix}course_modules
WHERE visibleold=1 AND module={$module->id})";
execute_sql($sql, false);
}
if (!empty($show) and confirm_sesskey()) {
if (!$module = get_record("modules", "name", $show)) {
error("Module doesn't exist!");
}
set_field("modules", "visible", "1", "id", $module->id); // Show main module
set_field('course_modules', 'visible', '1', 'visibleold', '1', 'module', $module->id); // Get the previous saved visible state for the course module.
$coursesaffected = true;
set_field("modules", "visible", "1", "id", $module->id); // Show main module
set_field('course_modules', 'visible', '1', 'visibleold',
'1', 'module', $module->id); // Get the previous saved visible state for the course module.
// clear the course modinfo cache for courses
// where we just made something visible
$sql = "UPDATE {$CFG->prefix}course
SET modinfo=''
WHERE id IN (SELECT DISTINCT course
FROM {$CFG->prefix}course_modules
WHERE visible=1 AND module={$module->id})";
execute_sql($sql, false);
}
if (!empty($delete) and confirm_sesskey()) {
@@ -89,6 +105,15 @@
}
}
// clear course.modinfo for courses
// that used this module...
$sql = "UPDATE {$CFG->prefix}course
SET modinfo=''
WHERE id IN (SELECT DISTINCT course
FROM {$CFG->prefix}course_modules
WHERE module={$module->id})";
execute_sql($sql, false);
// Now delete all the course module records
if (!delete_records("course_modules", "module", $module->id)) {
notify("Error occurred while deleting all $strmodulename records in course_modules table");
@@ -124,20 +149,12 @@
// Delete the capabilities that were defined by this module
capabilities_cleanup('mod/'.$module->name);
// rebuild_course_cache(); // Because things have changed
$coursesaffected = true;
$a->module = $strmodulename;
$a->directory = "$CFG->dirroot/mod/$delete";
notice(get_string("moduledeletefiles", "", $a), "modules.php");
}
}
if ($coursesaffected) {
rebuild_course_cache(); // Because things have changed
}
/// Get and sort the existing modules
if (!$modules = get_records("modules")) {
+19 -7
View File
@@ -42,7 +42,7 @@ while(@ob_end_flush());
echo '<strong>Progress:</strong>';
$i = 0;
$skiptables = array($CFG->prefix.'config');//, $CFG->prefix.'sessions2');
$skiptables = array($CFG->prefix.'config', $CFG->prefix.'user_students', $CFG->prefix.'user_teachers');//, $CFG->prefix.'sessions2');
foreach ($tables as $table) {
if (($CFG->prefix && strpos($table, $CFG->prefix) !== 0)
@@ -63,12 +63,8 @@ foreach ($tables as $table) {
if ($rs and $rs->RecordCount() > 0) {
while (!$rs->EOF) {
$text = $rs->fields[$column];
$search = '/(<(?:lang|span) lang="[a-zA-Z0-9_-]*".*?>.+?<\/(?:lang|span)>)(\s*<(?:lang|span) lang="[a-zA-Z0-9_-]*".*?>.+?<\/(?:lang|span)>)+/is';
$newtext = preg_replace_callback($search, 'multilangupgrade_impl', $text);
if ($newtext != $text) {
$newtext = addslashes($newtext);
execute_sql("UPDATE $table SET $column='$newtext' WHERE id=".$rs->fields['id'], false);
}
$id = $rs->fields['id'];
if ($i % 600 == 0) {
echo '<br />';
}
@@ -77,6 +73,22 @@ foreach ($tables as $table) {
}
$i++;
$rs->MoveNext();
if (empty($text) or is_numeric($text)) {
continue; // nothing to do
}
$search = '/(<(?:lang|span) lang="[a-zA-Z0-9_-]*".*?>.+?<\/(?:lang|span)>)(\s*<(?:lang|span) lang="[a-zA-Z0-9_-]*".*?>.+?<\/(?:lang|span)>)+/is';
$newtext = preg_replace_callback($search, 'multilangupgrade_impl', $text);
if (is_null($newtext)) {
continue; // regex error
}
if ($newtext != $text) {
$newtext = addslashes($newtext);
execute_sql("UPDATE $table SET $column='$newtext' WHERE id=$id", false);
}
}
}
}
+1 -1
View File
@@ -54,7 +54,7 @@ if ($modid == '0') { // special
}
else {
$modname = get_field("modules","name","id",$modid);
require_once('mod/'.$modname.'/lib.php');
include_once('mod/'.$modname.'/lib.php');
}
$function = $modname.'_process_email';
+140
View File
@@ -0,0 +1,140 @@
<?php // $Id$
// index.php - scheduled backup logs
require_once('../../../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->dirroot.'/backup/lib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('reportbackups', $adminroot);
admin_externalpage_print_header($adminroot);
$courseid = optional_param('courseid', 0, PARAM_INT);
require_capability('moodle/site:backup', get_context_instance(CONTEXT_SYSTEM, SITEID));
/// Scheduled backups are disabled by the server admin
if (!empty($CFG->disablescheduledbackups)) {
print_error('scheduledbackupsdisabled', '', '', NULL, true);
}
/// Scheduled backups aren't active by the site admin
$backup_config = backup_get_config();
if (empty($backup_config->backup_sche_active)) {
notify(get_string('scheduledbackupsinactive'));
}
/// Get needed strings
$backuploglaststatus = get_string("backuploglaststatus");
$backuplogdetailed = get_string("backuplogdetailed");
$stradmin = get_string("administration");
$strconfiguration = get_string("configuration");
$strbackup = get_string("backup");
$strbackupdetails = get_string("backupdetails");
$strlogs = get_string("logs");
$strftimedatetime = get_string("strftimerecent");
$strftimetime = get_string("strftimetime").":%S";
$strerror = get_string("error");
$strok = get_string("ok");
$strunfinished = get_string("unfinished");
$strskipped = get_string("skipped");
$strcourse = get_string("course");
$strtimetaken = get_string("timetaken","quiz");
$strstatus = get_string("status");
$strnext = get_string("next");
/// Decide when to show last execution logs or detailed logs
/// Lastlog view
if (!$courseid) {
print_heading($backuploglaststatus);
print_simple_box_start('center');
/// Now, get every record from backup_courses
$courses = get_records("backup_courses");
if (!$courses) {
notify(get_string('nologsfound'));
} else {
echo "<table border=\"0\" align=\"center\" cellpadding=\"3\" cellspacing=\"3\">";
//Print table header
echo "<tr>";
echo "<td nowrap=\"nowrap\" align=\"center\"><font size=\"3\">$strcourse</font></td>";
echo "<td nowrap=\"nowrap\" align=\"center\" colspan=\"3\"><font size=\"3\">$strtimetaken</font></td>";
echo "<td nowrap=\"nowrap\" align=\"center\"><font size=\"3\">$strstatus</font></td>";
echo "<td nowrap=\"nowrap\" align=\"center\"><font size=\"3\">$strnext</font></td></tr>";
foreach ($courses as $course) {
/// Get the course shortname
$coursename = get_field ("course","fullname","id",$course->courseid);
if ($coursename) {
echo "<tr>";
echo "<td nowrap=\"nowrap\"><font size=\"2\"><a href=\"index.php?courseid=$course->courseid\">".$coursename."</a></font></td>";
echo "<td nowrap=\"nowrap\"><font size=\"2\">".userdate($course->laststarttime,$strftimedatetime)."</font></td>";
echo "<td nowrap=\"nowrap\"><font size=\"2\"> - </font></td>";
echo "<td nowrap=\"nowrap\"><font size=\"2\">".userdate($course->lastendtime,$strftimedatetime)."</font></td>";
if ($course->laststatus == 1) {
echo "<td nowrap=\"nowrap\" align=\"center\"><font size=\"2\" color=\"green\">".$strok."</font></td>";
} else if ($course->laststatus == 2) {
echo "<td nowrap=\"nowrap\" align=\"center\"><font size=\"2\" color=\"red\">".$strunfinished."</font></td>";
} else if ($course->laststatus == 3) {
echo "<td nowrap=\"nowrap\" align=\"center\"><font size=\"2\" color=\"green\">".$strskipped."</font></td>";
} else {
echo "<td nowrap=\"nowrap\" align=\"center\"><font size=\"2\" color=\"red\">".$strerror."</font></td>";
}
echo "<td nowrap=\"nowrap\"><font size=\"2\">".userdate($course->nextstarttime,$strftimedatetime)."</font></td>";
echo "</tr>";
}
}
echo "</table>";
}
print_simple_box_end();
/// Detailed View !!
} else {
print_heading($backuplogdetailed);
$coursename = get_field("course","fullname","id","$courseid");
print_heading("$strcourse: $coursename");
print_simple_box_start('center');
/// First, me get all the distinct backups for that course in backup_log
$executions = get_records_sql("SELECT DISTINCT laststarttime,laststarttime
FROM {$CFG->prefix}backup_log
WHERE courseid = '$courseid'
ORDER BY laststarttime DESC");
/// Iterate over backup executions
if (!$executions) {
notify(get_string('nologsfound'));
} else {
echo "<table border=\"0\" align=\"center\" cellpadding=\"3\" cellspacing=\"3\">";
foreach($executions as $execution) {
echo "<tr>";
echo "<td nowrap=\"nowrap\" align=\"center\" colspan=\"3\">";
print_simple_box("<center>".userdate($execution->laststarttime)."</center>", "center");
echo "</td>";
echo "</tr>";
$logs = get_records_sql("SELECT *
FROM {$CFG->prefix}backup_log
WHERE courseid = '$courseid' AND
laststarttime = '$execution->laststarttime'
ORDER BY id");
if ($logs) {
foreach ($logs as $log) {
echo "<tr>";
echo "<td nowrap=\"nowrap\"><font size=\"2\">".userdate($log->time,$strftimetime)."</font></td>";
$log->info = str_replace("- ERROR!!","- <font color=\"red\">ERROR!!</font>",$log->info);
$log->info = str_replace("- OK","- <font color=\"green\">OK</font>",$log->info);
echo "<td nowrap=\"nowrap\"><font size=\"2\">".str_replace(" ","&nbsp;&nbsp;&nbsp;&nbsp;",$log->info)."</font></td>";
echo "</tr>";
}
}
}
echo "</table>";
}
print_simple_box_end();
}
admin_externalpage_print_footer($adminroot);
?>
+2 -2
View File
@@ -10,9 +10,9 @@
require_login();
require_capability('moodle/site:viewreports', get_context_instance(CONTEXT_SYSTEM, SITEID));
require_capability('moodle/site:viewreports', get_context_instance(CONTEXT_SYSTEM));
stats_check_uptodate($course->id);
stats_check_uptodate();
$param = stats_get_parameters($time,$report,SITEID,STATS_MODE_RANKED);
+74
View File
@@ -0,0 +1,74 @@
<?php // $Id$
require_once('../../../config.php');
require_once($CFG->dirroot.'/question/upgrade.php');
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('reportquestion', $adminroot);
admin_externalpage_print_header($adminroot);
print_heading(page_doc_link(get_string('adminreport', 'question')));
$probstr = '';
$contextupgradeversion = 2007081000;
if ($CFG->version < $contextupgradeversion){
///cwrqpfs issue
$probstr = print_heading(get_string('cwrqpfs', 'question'), '', 3, 'main', true);
if ($updates = question_cwqpfs_to_update()){
$probstr .=get_string('cwrqpfsinfo', 'question');
$probstr .= '<ul>';
$catlist = join(array_keys($updates), ',');
//get info about cateogries and no of questions used outside category's course
$categories = get_records_sql('SELECT qc.*, c.fullname as coursename FROM '.$CFG->prefix.'question_categories as qc, '
.$CFG->prefix.'course as c WHERE qc.course = c.id AND qc.id IN ('.$catlist.')');
foreach ($updates as $id => $publish){
$categories[$id]->caturl = "$CFG->wwwroot/question/category.php?sesskey=".sesskey().
"&amp;edit=$id&amp;id=".$categories[$id]->course;
if ($categories[$id]->publish){
$categories[$id]->changefrom = get_string('published', 'question');
$categories[$id]->changeto = get_string('unpublished', 'question');
} else {
$categories[$id]->changefrom = get_string('unpublished', 'question');
$categories[$id]->changeto = get_string('published', 'question');
}
$probstr .= '<li>'.get_string('changepublishstatuscat', 'question', $categories[$id]);
if ($questions = get_records_sql('SELECT q.*, qui.id as quizid, qui.name as quizname, cm.id as cmid, '
.'qui.course, c.fullname as coursename FROM '.$CFG->prefix.'question q, '
.$CFG->prefix.'quiz_question_instances qqi, '
.$CFG->prefix.'quiz qui, '
.$CFG->prefix.'course_modules cm, '
.$CFG->prefix.'modules m, '
.$CFG->prefix.'course c '
.'WHERE (q.category = '.$id.' AND qqi.question = q.id '
.'AND qqi.quiz = qui.id '
.'AND qui.course = c.id '
.'AND cm.instance = qui.id '
.'AND cm.module = m.id '
.'AND m.name = \'quiz\''
.'AND ('.$categories[$id]->course.' <> qui.course)) ORDER BY qui.id ASC')){
$probstr .= '<ul>';
foreach ($questions as $question){
$question->quizurl = "$CFG->wwwroot/mod/quiz/edit.php?cmid=".$question->cmid;
$question->qurl = "$CFG->wwwroot/question/question.php?cmid={$question->cmid}&amp;id={$question->id}&amp;returnurl=".urlencode($FULLME);
$probstr .= '<li>'.get_string('questionaffected', 'question', $question).'</li>';
}
$probstr .= '</ul>';
}
$probstr .= '</li>';
}
$probstr .= '</ul>';
} else {
$probstr .=('<p>'.get_string('cwrqpfsnoprob', 'question').'</p>');
}
}
if ($probstr) {
print_box($probstr);
} else {
print_box(get_string('noprobs', 'question'), 'boxwidthnarrow boxaligncenter generalbox');
}
admin_externalpage_print_footer($adminroot);
?>
+9 -14
View File
@@ -43,9 +43,8 @@
</label>
<?php check_theme_arrows(); ?>
<p class="arrow_button">
<input name="add" id="add" type="submit" value="<?php echo '&nbsp;'.$THEME->larrow.' &nbsp; &nbsp; '.get_string('add'); ?>" title="<?php print_string('add'); ?>" />
<br />
<input name="remove" id="remove" type="submit" value="<?php echo '&nbsp; '.$THEME->rarrow.' &nbsp; &nbsp; '.get_string('remove'); ?>" title="<?php print_string('remove'); ?>" />
<input name="add" id="add" type="submit" value="<?php echo $THEME->larrow.'&nbsp;'.get_string('add'); ?>" title="<?php print_string('add'); ?>" /><br />
<input name="remove" id="remove" type="submit" value="<?php echo get_string('remove').'&nbsp;'.$THEME->rarrow; ?>" title="<?php print_string('remove'); ?>" />
</p>
</td>
<td valign="top">
@@ -58,13 +57,11 @@
<?php
$i=0;
if (!empty($searchtext)) {
echo "<optgroup label=\"$strsearchresults (" . $availableusers->_numOfRows . ")\">\n";
echo "<optgroup label=\"$strsearchresults (" . $usercount . ")\">\n";
while ($user = rs_fetch_next_record($availableusers)) {
if (!isset($contextusers[$user->id])) {
$fullname = fullname($user, true);
echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
$i++;
}
$fullname = fullname($user, true);
echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
$i++;
}
echo "</optgroup>\n";
@@ -74,11 +71,9 @@
.'<optgroup label="'.get_string('trysearching').'"><option></option></optgroup>'."\n";
} else {
while ($user = rs_fetch_next_record($availableusers)) {
if (!isset($contextusers[$user->id])) {
$fullname = fullname($user, true);
echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
$i++;
}
$fullname = fullname($user, true);
echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
$i++;
}
}
}
+98 -8
View File
@@ -163,7 +163,9 @@
}
}
}
$rolename = get_field('role', 'name', 'id', $roleid);
add_to_log($course->id, 'role', 'assign', 'admin/roles/assign.php?contextid='.$context->id.'&roleid='.$roleid, $rolename, '', $USER->id);
} else if ($remove and !empty($frm->removeselect) and confirm_sesskey()) {
$sitecontext = get_context_instance(CONTEXT_SYSTEM);
@@ -197,11 +199,16 @@
}
}
}
$rolename = get_field('role', 'name', 'id', $roleid);
add_to_log($course->id, 'role', 'unassign', 'admin/roles/assign.php?contextid='.$context->id.'&roleid='.$roleid, $rolename, '', $USER->id);
} else if ($showall) {
$searchtext = '';
$previoussearch = 0;
}
}
if ($context->contextlevel==CONTEXT_COURSE and $context->instanceid == SITEID) {
@@ -233,16 +240,99 @@
$LIKE = sql_ilike();
$FULLNAME = sql_fullname();
$select .= " AND ($FULLNAME $LIKE '%$searchtext%' OR email $LIKE '%$searchtext%') ";
$selectsql = " AND ($FULLNAME $LIKE '%$searchtext%' OR email $LIKE '%$searchtext%') ";
$select .= $selectsql;
} else {
$selectsql = "";
}
$availableusers = get_recordset_sql('SELECT id, firstname, lastname, email
FROM '.$CFG->prefix.'user
WHERE '.$select.'
ORDER BY lastname ASC, firstname ASC');
if ($context->contextlevel > CONTEXT_COURSE) { // mod or block (or group?)
/// In the .html file below we loop through these results and exclude any in $contextusers
/************************************************************************
* *
* context level is above or equal course context level *
* in this case we pull out all users matching search criteria (if any) *
* *
* MDL-11324 *
* a mini get_users_by_capability() call here, this is done instead of *
* get_users_by_capability() because *
* 1) get_users_by_capability() does not deal with searching by name *
* 2) exceptions array can be potentially large for large courses *
* 3) get_recordset_sql() is more efficient *
* *
************************************************************************/
if ($possibleroles = get_roles_with_capability('moodle/course:view', CAP_ALLOW, $context)) {
$doanythingroles = get_roles_with_capability('moodle/site:doanything', CAP_ALLOW, get_context_instance(CONTEXT_SYSTEM));
$validroleids = array();
foreach ($possibleroles as $possiblerole) {
if (isset($doanythingroles[$possiblerole->id])) { // We don't want these included
continue;
}
if ($caps = role_context_capabilities($possiblerole->id, $context, 'moodle/course:view')) { // resolved list
if (isset($caps['moodle/course:view']) && $caps['moodle/course:view'] > 0) { // resolved capability > 0
$validroleids[] = $possiblerole->id;
}
}
}
if ($validroleids) {
$roleids = '('.implode(',', $validroleids).')';
$select = " SELECT 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
INNER JOIN {$CFG->prefix}role r ON r.id = ra.roleid";
$where = " WHERE ra.contextid ".get_related_contexts_string($context)."
AND u.deleted = 0
AND ra.roleid in $roleids";
$excsql = " AND u.id NOT IN (
SELECT u.id
FROM {$CFG->prefix}role_assignments r,
{$CFG->prefix}user u
WHERE r.contextid = $contextid
AND u.id = r.userid
AND r.roleid = $roleid
$selectsql)";
$availableusers = get_recordset_sql($select . $from . $where . $selectsql . $excsql);
}
$usercount = $availableusers->_numOfRows;
}
} else {
/************************************************************************
* *
* context level is above or equal course context level *
* in this case we pull out all users matching search criteria (if any) *
* *
************************************************************************/
/// MDL-11111 do not include user already assigned this role in this context as available users
/// so that the number of available users is right and we save time looping later
$availableusers = get_recordset_sql('SELECT id, firstname, lastname, email
FROM '.$CFG->prefix.'user
WHERE '.$select.'
AND id NOT IN (
SELECT u.id
FROM '.$CFG->prefix.'role_assignments r,
'.$CFG->prefix.'user u
WHERE r.contextid = '.$contextid.'
AND u.id = r.userid
AND r.roleid = '.$roleid.'
'.$selectsql.')
ORDER BY lastname ASC, firstname ASC');
$usercount = $availableusers->_numOfRows;
}
echo '<div style="text-align:center">'.$strcurrentcontext.': '.print_context_name($context).'<br/>';
$assignableroles = array('0'=>get_string('listallroles', 'role').'...') + $assignableroles;
popup_form("$CFG->wwwroot/$CFG->admin/roles/assign.php?userid=$userid&amp;courseid=$courseid&amp;contextid=$contextid&amp;roleid=",
+2 -1
View File
@@ -113,7 +113,8 @@ $contextlevel = 0;
$component = '';
$strrisks = s(get_string('risks', 'role'));
$strcapabilities = s(get_string('capabilities', 'role'));
// MDL-11687
$strcapabilities = 'Capabilities';//s(get_string('capabilities', 'role'));
// prepare legacy defaults
if (!empty($role->legacytype)) {
+9 -1
View File
@@ -119,9 +119,12 @@
}
if (empty($errors)) {
$rolename = get_field('role', 'name', 'id', $newroleid);
add_to_log(SITEID, 'role', 'add', 'admin/roles/manage.php?action=add', $rolename, '', $USER->id);
redirect('manage.php');
}
}
break;
case 'edit':
@@ -228,10 +231,11 @@
unassign_capability($lcap, $roleid);
}
}
add_to_log(SITEID, 'role', 'edit', 'admin/roles/manage.php?action=edit&roleid='.$role->id, $role->name, '', $USER->id);
redirect('manage.php');
}
}
break;
case 'delete':
@@ -342,6 +346,8 @@
// dupilcate all the capabilities
role_cap_duplicate($sourcerole, $newrole);
}
$rolename = get_field('role', 'name', 'id', $newrole);
add_to_log(SITEID, 'role', 'duplicate', 'admin/roles/manage.php?roleid='.$newrole.'&action=duplicate', $rolename, '', $USER->id);
redirect('manage.php');
break;
@@ -352,6 +358,8 @@
if ($confirm and data_submitted() and confirm_sesskey()) {
reset_role_capabilities($roleid);
$rolename = get_field('role', 'name', 'id', $roleid);
add_to_log(SITEID, 'role', 'reset', 'admin/roles/manage.php?roleid='.$roleid.'&action=reset', $rolename, '', $USER->id);
redirect('manage.php?action=view&amp;roleid='.$roleid);
} else {
+2 -1
View File
@@ -30,7 +30,8 @@
$component = '';
$strrisks = s(get_string('risks', 'role'));
$strcapabilities = s(get_string('capabilities', 'role'));
// MDL-11687
$strcapabilities = 'Capabilities';//s(get_string('capabilities', 'role'));
foreach ($capabilities as $capability) {
+2
View File
@@ -130,6 +130,8 @@
}
}
}
$rolename = get_field('role', 'name', 'id', $roleid);
add_to_log($course->id, 'role', 'override', 'admin/roles/override.php?contextid='.$context->id.'&roleid='.$roleid, $rolename, '', $USER->id);
redirect($baseurl);
}
+2 -2
View File
@@ -3,7 +3,7 @@
// This file defines settingpages and externalpages under the "courses" category
$ADMIN->add('courses', new admin_externalpage('coursemgmt', get_string('coursemgmt', 'admin'), $CFG->wwwroot . '/course/index.php?categoryedit=on'));
$ADMIN->add('courses', new admin_externalpage('coursemgmt', get_string('coursemgmt', 'admin'), $CFG->wwwroot . '/course/index.php?categoryedit=on','moodle/category:update'));
$ADMIN->add('courses', new admin_externalpage('enrolment', get_string('enrolments'), $CFG->wwwroot . '/'.$CFG->admin.'/enrol.php'));
@@ -17,7 +17,7 @@ $ADMIN->add('courses', $temp);
// "backups" settingpage
$temp = new admin_settingpage('backups', get_string('backups','admin'));
$temp = new admin_settingpage('backups', get_string('backups','admin'),'moodle/site:backup');
$temp->add(new admin_setting_backupcheckbox('backup_sche_modules', get_string('includemodules'), get_string('backupincludemoduleshelp'), 0));
$temp->add(new admin_setting_backupcheckbox('backup_sche_withuserdata', get_string('includemoduleuserdata'), get_string('backupincludemoduleuserdatahelp'), 0));
$temp->add(new admin_setting_backupcheckbox('backup_sche_metacourse', get_string('metacourse'), get_string('backupmetacoursehelp'), 0));
-1
View File
@@ -5,7 +5,6 @@ $temp = new admin_settingpage('locationsettings', get_string('locationsettings',
$options = get_list_of_timezones();
$options[99] = get_string('serverlocaltime');
$temp->add(new admin_setting_configselect('timezone', get_string('timezone','admin'), get_string('configtimezone', 'admin'), 99, $options));
$options = get_list_of_timezones();
$options[99] = get_string('timezonenotforced', 'admin');
$temp->add(new admin_setting_configselect('forcetimezone', get_string('forcetimezone', 'admin'), get_string('helpforcetimezone', 'admin'), 99, $options));
$options = get_list_of_countries();
+5 -5
View File
@@ -3,19 +3,19 @@
// This file defines settingpages and externalpages under the "mnet" category
$ADMIN->add('mnet', new admin_externalpage('net', get_string('settings', 'mnet'),
$CFG->wwwroot . '/admin/mnet/index.php',
"$CFG->wwwroot/$CFG->admin/mnet/index.php",
'moodle/site:config'));
$ADMIN->add('mnet', new admin_externalpage('mnetpeers', get_string('mnetpeers', 'mnet'),
$CFG->wwwroot . '/admin/mnet/peers.php',
"$CFG->wwwroot/$CFG->admin/mnet/peers.php",
'moodle/site:config'));
$ADMIN->add('mnet', new admin_externalpage('ssoaccesscontrol', get_string('ssoaccesscontrol', 'mnet'),
$CFG->wwwroot . '/admin/mnet/access_control.php',
"$CFG->wwwroot/$CFG->admin/mnet/access_control.php",
'moodle/site:config'));
$ADMIN->add('mnet', new admin_externalpage('mnetenrol', get_string('mnetenrol', 'mnet'),
$CFG->wwwroot . '/admin/mnet/enr_hosts.php',
"$CFG->wwwroot/$CFG->admin/mnet/enr_hosts.php",
'moodle/site:config'));
$ADMIN->add('mnet', new admin_externalpage('trustedhosts', get_string('trustedhosts', 'mnet'),
$CFG->wwwroot . '/admin/mnet/trustedhosts.php',
"$CFG->wwwroot/$CFG->admin/mnet/trustedhosts.php",
'moodle/site:config'));
?>
+3
View File
@@ -33,8 +33,11 @@ $temp->add(new admin_setting_configselect('bloglevel', get_string('bloglevel', '
1 => get_string('personalblogs','blog'),
0 => get_string('disableblogs','blog'))));
$temp->add(new admin_setting_configcheckbox('profilesforenrolledusersonly', get_string('profilesforenrolledusersonly','admin'),get_string('configprofilesforenrolledusersonly', 'admin'),'1'));
$temp->add(new admin_setting_configcheckbox('cronclionly', get_string('cronclionly', 'admin'), get_string('configcronclionly', 'admin'), 0));
$temp->add(new admin_setting_configtext('cronremotepassword', get_string('cronremotepassword', 'admin'), get_string('configcronremotepassword', 'admin'), '', PARAM_RAW));
$temp->add(new admin_setting_configcheckbox('emailchangeconfirmation', get_string('emailchangeconfirmation', 'admin'), get_string('configemailchangeconfirmation', 'admin'), 1));
$ADMIN->add('security', $temp);
+10 -1
View File
@@ -17,7 +17,7 @@ $ADMIN->add('server', $temp, 0);
// "email" settingpage
$temp = new admin_settingpage('mail', get_string('mail','admin'));
$temp->add(new admin_setting_configtext('smtphosts', get_string('smtphosts', 'admin'), get_string('configsmtphosts', 'admin'), '', PARAM_HOST));
$temp->add(new admin_setting_configtext('smtphosts', get_string('smtphosts', 'admin'), get_string('configsmtphosts', 'admin'), '', PARAM_RAW));
$temp->add(new admin_setting_configtext('smtpuser', get_string('smtpuser', 'admin'), get_string('configsmtpuser', 'admin'), '', PARAM_NOTAGS));
$temp->add(new admin_setting_configtext('smtppass', get_string('smtppass', 'admin'), get_string('configsmtpuser', 'admin'), '', PARAM_RAW));
$temp->add(new admin_setting_configtext('noreplyaddress', get_string('noreplyaddress', 'admin'), get_string('confignoreplyaddress', 'admin'), 'noreply@' . $_SERVER['HTTP_HOST'], PARAM_NOTAGS));
@@ -155,6 +155,15 @@ $temp->add(new admin_setting_configselect('deleteunconfirmed', get_string('delet
6 => get_string('numhours', '', 6),
1 => get_string('numhours', '', 1))));
$temp->add(new admin_setting_configselect('deleteincompleteusers', get_string('deleteincompleteusers', 'admin'), get_string('configdeleteincompleteusers', 'admin'), 0, array(0 => get_string('never'),
168 => get_string('numdays', '', 7),
144 => get_string('numdays', '', 6),
120 => get_string('numdays', '', 5),
96 => get_string('numdays', '', 4),
72 => get_string('numdays', '', 3),
48 => get_string('numdays', '', 2),
24 => get_string('numdays', '', 1))));
$temp->add(new admin_setting_configselect('loglifetime', get_string('loglifetime', 'admin'), get_string('configloglifetime', 'admin'), 0, array(0 => get_string('neverdeletelogs'),
1000 => get_string('numdays', '', 1000),
365 => get_string('numdays', '', 365),
+1 -1
View File
@@ -72,7 +72,7 @@
if (!empty($pt)) {
echo '</td>';
echo '<td valign="top" style="width: '.$blocks_preferred_width.'px;" id="left-column">';
echo '<td valign="top" style="width: '.$blocks_preferred_width.'px;" id="right-column">';
blocks_print_group($PAGE, $blocks, BLOCK_POS_RIGHT);
echo '</td>';
echo '</tr></table>';
+9 -9
View File
@@ -24,9 +24,9 @@
if (!$ok or !confirm_sesskey()) {
$message = '<br /><br />';
$message .= $CFG->dataroot.'/temp/olson.txt<br />';
$message .= $CFG->dataroot.'/temp/timezones.txt<br />';
$message .= '<a href="http://download.moodle.org/timezones/">http://download.moodle.org/timezones/</a><br />';
$message .= '<a href="'.$CFG->wwwroot.'/lib/timezones.txt">'.$CFG->dirroot.'/lib/timezones.txt</a><br />';
$message .= $CFG->dataroot.'/temp/timezone.txt<br />';
$message .= '<a href="http://download.moodle.org/timezone/">http://download.moodle.org/timezone/</a><br />';
$message .= '<a href="'.$CFG->wwwroot.'/lib/timezone.txt">'.$CFG->dirroot.'/lib/timezone.txt</a><br />';
$message .= '<br />';
$message = get_string("configintrotimezones", 'admin', $message);
@@ -54,7 +54,7 @@
/// Next, look for a CSV file locally
$source = $CFG->dataroot.'/temp/timezones.txt';
$source = $CFG->dataroot.'/temp/timezone.txt';
if (!$importdone and is_readable($source)) {
if ($timezones = get_records_csv($source, 'timezone')) {
update_timezone_records($timezones);
@@ -64,17 +64,17 @@
/// Otherwise, let's try moodle.org's copy
$source = 'http://download.moodle.org/timezones/';
$source = 'http://download.moodle.org/timezone/';
if (!$importdone and ini_get('allow_url_fopen')) {
if (is_readable($source) && $contents = file_get_contents($source)) { // Grab whole page
if ($file = fopen($CFG->dataroot.'/temp/timezones.txt', 'w')) { // Make local copy
if ($file = fopen($CFG->dataroot.'/temp/timezone.txt', 'w')) { // Make local copy
fwrite($file, $contents);
fclose($file);
if ($timezones = get_records_csv($CFG->dataroot.'/temp/timezones.txt', 'timezone')) { // Parse it
if ($timezones = get_records_csv($CFG->dataroot.'/temp/timezone.txt', 'timezone')) { // Parse it
update_timezone_records($timezones);
$importdone = $source;
}
unlink($CFG->dataroot.'/temp/timezones.txt');
unlink($CFG->dataroot.'/temp/timezone.txt');
}
}
}
@@ -82,7 +82,7 @@
/// Final resort, use the copy included in Moodle
$source = $CFG->dirroot.'/lib/timezones.txt';
$source = $CFG->dirroot.'/lib/timezone.txt';
if (!$importdone and is_readable($source)) { // Distribution file
if ($timezones = get_records_csv($source, 'timezone')) {
update_timezone_records($timezones);
+3
View File
@@ -6,6 +6,9 @@
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
/// no guest autologin
require_login(0, false);
$adminroot = admin_get_root();
admin_externalpage_setup('upgradesettings', $adminroot); // now hidden page
-3
View File
@@ -104,8 +104,6 @@ if ($um->preprocess_files() && confirm_sesskey()) {
"maildisplay" => 1,
"htmleditor" => 1,
"autosubscribe" => 1,
"idnumber" => 1,
"icq" => 1,
"course1" => 1,
"course2" => 1,
"course3" => 1,
@@ -421,4 +419,3 @@ function my_file_get_contents($filename, $use_include_path = 0) {
}
?>
+16 -4
View File
@@ -118,8 +118,9 @@
$updateuser->idnumber = ''; // Clear this field to free it up
$updateuser->timemodified = time();
if (update_record('user', $updateuser)) {
// not sure if this is needed. unenrol_student($user->id); // From all courses
delete_records('role_assignments', 'userid', $user->id); // unassign all roles
// Removing a user may have more requirements than just removing their role assignments.
// Use 'role_unassign' to make sure that all necessary actions occur.
role_unassign(0, $user->id);
// remove all context assigned on this user?
notify(get_string('deletedactivity', '', fullname($user, true)) );
} else {
@@ -202,7 +203,7 @@
}
}
$users = get_users_listing($sort, $dir, $page*$perpage, $perpage, $search, $firstinitial, $lastinitial, $remotewhere);
$users = get_users_listing($sort, $dir, $page*$perpage, $perpage, $search, $firstinitial, $lastinitial, $remotewhere, false);
$usercount = get_users(false);
$usersearchcount = get_users(false, $search, true, "", "", $firstinitial, $lastinitial);
@@ -303,7 +304,18 @@
$mainadmin = get_admin();
$table->head = array ("$firstname / $lastname", $email, $city, $country, $lastaccess, "", "", "");
$override = new object();
$override->firstname = 'firstname';
$override->lastname = 'lastname';
$fullnamelanguage = get_string('fullnamedisplay', '', $override);
if (($CFG->fullnamedisplay == 'firstname lastname') or
($CFG->fullnamedisplay == 'firstname') or
($CFG->fullnamedisplay == 'language' and $fullnamelanguage == 'firstname lastname' )) {
$fullnamedisplay = "$firstname / $lastname";
} else { // ($CFG->fullnamedisplay == 'language' and $fullnamelanguage == 'lastname firstname')
$fullnamedisplay = "$lastname / $firstname";
}
$table->head = array ($fullnamedisplay, $email, $city, $country, $lastaccess, "", "", "");
$table->align = array ("left", "left", "left", "left", "left", "center", "center", "center");
$table->width = "95%";
foreach ($users as $user) {
@@ -0,0 +1,271 @@
<?php // $Id$
///////////////////////////////////////////////////////////////////////////
// //
// NOTICE OF COPYRIGHT //
// //
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
// http://moodle.com //
// //
// Copyright (C) 2001-3001 Martin Dougiamas http://dougiamas.com //
// (C) 2001-3001 Eloy Lafuente (stronk7) http://contiento.com //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details: //
// //
// http://www.gnu.org/copyleft/gpl.html //
// //
///////////////////////////////////////////////////////////////////////////
/// This class will compare all the indexes found in the XMLDB definitions
/// with the phisical DB implementation, reporting about all the missing
/// indexes to be created to be 100% ok.
class check_indexes extends XMLDBAction {
/**
* Init method, every subclass will have its own
*/
function init() {
parent::init();
/// Set own core attributes
/// Set own custom attributes
/// Get needed strings
$this->loadStrings(array(
'confirmcheckindexes' => 'xmldb',
'ok' => '',
'missing' => 'xmldb',
'table' => 'xmldb',
'key' => 'xmldb',
'index' => 'xmldb',
'searchresults' => 'xmldb',
'missingindexes' => 'xmldb',
'completelogbelow' => 'xmldb',
'nomissingindexesfound' => 'xmldb',
'yesmissingindexesfound' => 'xmldb',
'yes' => '',
'no' => '',
'back' => 'xmldb'
));
}
/**
* Invoke method, every class will have its own
* returns true/false on completion, setting both
* errormsg and output as necessary
*/
function invoke() {
parent::invoke();
$result = true;
/// Set own core attributes
$this->does_generate = ACTION_GENERATE_HTML;
/// These are always here
global $CFG, $XMLDB;
/// And we nedd some ddl suff
require_once ($CFG->libdir . '/ddllib.php');
/// Here we'll acummulate all the missing indexes found
$missing_indexes = array();
/// Do the job, setting $result as needed
/// Get the confirmed to decide what to do
$confirmed = optional_param('confirmed', false, PARAM_BOOL);
/// If not confirmed, show confirmation box
if (!$confirmed) {
$o = '<table class="generalbox" border="0" cellpadding="5" cellspacing="0" id="notice">';
$o.= ' <tr><td class="generalboxcontent">';
$o.= ' <p class="centerpara">' . $this->str['confirmcheckindexes'] . '</p>';
$o.= ' <table class="boxaligncenter" cellpadding="20"><tr><td>';
$o.= ' <div class="singlebutton">';
$o.= ' <form action="index.php?action=check_indexes&amp;confirmed=yes" method="post"><fieldset class="invisiblefieldset">';
$o.= ' <input type="submit" value="'. $this->str['yes'] .'" /></fieldset></form></div>';
$o.= ' </td><td>';
$o.= ' <div class="singlebutton">';
$o.= ' <form action="index.php?action=main_view" method="post"><fieldset class="invisiblefieldset">';
$o.= ' <input type="submit" value="'. $this->str['no'] .'" /></fieldset></form></div>';
$o.= ' </td></tr>';
$o.= ' </table>';
$o.= ' </td></tr>';
$o.= '</table>';
$this->output = $o;
} else {
/// The back to edit table button
$b = ' <p class="centerpara buttons">';
$b .= '<a href="index.php">[' . $this->str['back'] . ']</a>';
$b .= '</p>';
/// Iterate over $XMLDB->dbdirs, loading their XML data to memory
if ($XMLDB->dbdirs) {
$dbdirs =& $XMLDB->dbdirs;
$o='<ul>';
foreach ($dbdirs as $dbdir) {
/// Only if the directory exists
if (!$dbdir->path_exists) {
continue;
}
/// Load the XML file
$xmldb_file = new XMLDBFile($dbdir->path . '/install.xml');
/// Load the needed XMLDB generator
$classname = 'XMLDB' . $CFG->dbtype;
$generator = new $classname();
$generator->setPrefix($CFG->prefix);
/// Only if the file exists
if (!$xmldb_file->fileExists()) {
continue;
}
/// Load the XML contents to structure
$loaded = $xmldb_file->loadXMLStructure();
if (!$loaded || !$xmldb_file->isLoaded()) {
notify('Errors found in XMLDB file: '. $dbdir->path . '/install.xml');
continue;
}
/// Arriving here, everything is ok, get the XMLDB structure
$structure = $xmldb_file->getStructure();
$o.=' <li>' . str_replace($CFG->dirroot . '/', '', $dbdir->path . '/install.xml');
/// Getting tables
if ($xmldb_tables = $structure->getTables()) {
$o.=' <ul>';
/// Foreach table, process its indexes and keys
foreach ($xmldb_tables as $xmldb_table) {
/// Skip table if not exists
if (!table_exists($xmldb_table)) {
continue;
}
$o.=' <li>' . $xmldb_table->getName();
/// Keys
if ($xmldb_keys = $xmldb_table->getKeys()) {
$o.=' <ul>';
foreach ($xmldb_keys as $xmldb_key) {
$o.=' <li>' . $this->str['key'] . ': ' . $xmldb_key->readableInfo() . ' ';
/// Primaries are skipped
if ($xmldb_key->getType() == XMLDB_KEY_PRIMARY) {
$o.='<font color="green">' . $this->str['ok'] . '</font></li>';
continue;
}
/// If we aren't creating the keys or the key is a XMLDB_KEY_FOREIGN (not underlying index generated
/// automatically by the RDBMS) create the underlying (created by us) index (if doesn't exists)
if (!$generator->getKeySQL($xmldb_table, $xmldb_key) || $xmldb_key->getType() == XMLDB_KEY_FOREIGN) {
/// Create the interim index
$xmldb_index = new XMLDBIndex('anyname');
$xmldb_index->setFields($xmldb_key->getFields());
switch ($xmldb_key->getType()) {
case XMLDB_KEY_UNIQUE:
case XMLDB_KEY_FOREIGN_UNIQUE:
$xmldb_index->setUnique(true);
break;
case XMLDB_KEY_FOREIGN:
$xmldb_index->setUnique(false);
break;
}
/// Check if the index exists in DB
if (index_exists($xmldb_table, $xmldb_index)) {
$o.='<font color="green">' . $this->str['ok'] . '</font>';
} else {
$o.='<font color="red">' . $this->str['missing'] . '</font>';
/// Add the missing index to the list
$obj = new object;
$obj->table = $xmldb_table;
$obj->index = $xmldb_index;
$missing_indexes[] = $obj;
}
}
$o.='</li>';
}
$o.=' </ul>';
}
/// Indexes
if ($xmldb_indexes = $xmldb_table->getIndexes()) {
$o.=' <ul>';
foreach ($xmldb_indexes as $xmldb_index) {
$o.=' <li>' . $this->str['index'] . ': ' . $xmldb_index->readableInfo() . ' ';
/// Check if the index exists in DB
if (index_exists($xmldb_table, $xmldb_index)) {
$o.='<font color="green">' . $this->str['ok'] . '</font>';
} else {
$o.='<font color="red">' . $this->str['missing'] . '</font>';
/// Add the missing index to the list
$obj = new object;
$obj->table = $xmldb_table;
$obj->index = $xmldb_index;
$missing_indexes[] = $obj;
}
$o.='</li>';
}
$o.=' </ul>';
}
$o.=' </li>';
}
$o.=' </ul>';
}
$o.=' </li>';
}
$o.='</ul>';
}
/// We have finished, let's show the results of the search
$s = '';
$r = '<table class="generalbox boxaligncenter boxwidthwide" border="0" cellpadding="5" cellspacing="0" id="results">';
$r.= ' <tr><td class="generalboxcontent">';
$r.= ' <h2 class="main">' . $this->str['searchresults'] . '</h2>';
$r.= ' <p class="centerpara">' . $this->str['missingindexes'] . ': ' . count($missing_indexes) . '</p>';
$r.= ' </td></tr>';
$r.= ' <tr><td class="generalboxcontent">';
/// If we have found missing indexes inform about them
if (count($missing_indexes)) {
$r.= ' <p class="centerpara">' . $this->str['yesmissingindexesfound'] . '</p>';
$r.= ' <ul>';
foreach ($missing_indexes as $obj) {
$xmldb_table = $obj->table;
$xmldb_index = $obj->index;
$sqlarr = $xmldb_table->getAddIndexSQL($CFG->dbtype, $CFG->prefix, $xmldb_index, true);
$r.= ' <li>' . $this->str['table'] . ': ' . $xmldb_table->getName() . '. ' .
$this->str['index'] . ': ' . $xmldb_index->readableInfo() . '</li>';
$s.= '<code>' . str_replace("\n", '<br />', implode('<br />', $sqlarr)) . '</code><br />';
}
$r.= ' </ul>';
/// Add the SQL statements (all together)
$r.= '<hr />' . $s;
} else {
$r.= ' <p class="centerpara">' . $this->str['nomissingindexesfound'] . '</p>';
}
$r.= ' </td></tr>';
$r.= ' <tr><td class="generalboxcontent">';
/// Add the complete log message
$r.= ' <p class="centerpara">' . $this->str['completelogbelow'] . '</p>';
$r.= ' </td></tr>';
$r.= '</table>';
$this->output = $b . $r . $o;
}
/// Launch postaction if exists (leave this here!)
if ($this->getPostAction() && $result) {
return $this->launch($this->getPostAction());
}
/// Return ok if arrived here
return $result;
}
}
?>
@@ -84,7 +84,7 @@ class edit_field extends XMLDBAction {
/// Fetch request data
$tableparam = required_param('table', PARAM_CLEAN);
if (!$table =& $structure->getTable($tableparam)) {
$this->errormsg = 'Wrong table specified: ' . $tableparm;
$this->errormsg = 'Wrong table specified: ' . $tableparam;
return false;
}
$fieldparam = required_param('field', PARAM_CLEAN);
@@ -84,7 +84,7 @@ class edit_index extends XMLDBAction {
/// Fetch request data
$tableparam = required_param('table', PARAM_CLEAN);
if (!$table =& $structure->getTable($tableparam)) {
$this->errormsg = 'Wrong table specified: ' . $tableparm;
$this->errormsg = 'Wrong table specified: ' . $tableparam;
return false;
}
$indexparam = required_param('index', PARAM_CLEAN);
@@ -84,7 +84,7 @@ class edit_key extends XMLDBAction {
/// Fetch request data
$tableparam = required_param('table', PARAM_CLEAN);
if (!$table =& $structure->getTable($tableparam)) {
$this->errormsg = 'Wrong table specified: ' . $tableparm;
$this->errormsg = 'Wrong table specified: ' . $tableparam;
return false;
}
$keyparam = required_param('key', PARAM_CLEAN);
@@ -130,6 +130,18 @@ class get_db_directories extends XMLDBAction {
}
}
/// Now, course formats (course/format/xxx/db)
if ($plugins = get_list_of_plugins('course/format', 'db')) {
foreach ($plugins as $plugin) {
$dbdir = new stdClass;
$dbdir->path = $CFG->dirroot . '/course/format/' . $plugin . '/db';
if (!isset($XMLDB->dbdirs[$dbdir->path])) {
$XMLDB->dbdirs[$dbdir->path] = $dbdir;
}
$XMLDB->dbdirs[$dbdir->path]->path_exists = file_exists($dbdir->path); //Update status
}
}
/// Now, enrolment plugins (enrol/xxx/db)
if ($plugins = get_list_of_plugins('enrol', 'db')) {
foreach ($plugins as $plugin) {
@@ -141,7 +153,7 @@ class get_db_directories extends XMLDBAction {
$XMLDB->dbdirs[$dbdir->path]->path_exists = file_exists($dbdir->path); //Update status
}
}
/// Now, groups
$dbdir = new stdClass;
$dbdir->path = $CFG->dirroot . '/group/db';
@@ -47,7 +47,8 @@ class main_view extends XMLDBAction {
'delete' => 'xmldb',
'reservedwords' => 'xmldb',
'test' => 'xmldb',
'gotolastused' => 'xmldb'
'gotolastused' => 'xmldb',
'checkindexes' => 'xmldb'
));
}
@@ -84,6 +85,8 @@ class main_view extends XMLDBAction {
$b .= '&nbsp;<a href="index.php?action=view_reserved_words">[' . $this->str['reservedwords'] . ']</a>';
/// The test button
$b .= '&nbsp;<a href="index.php?action=test">[' . $this->str['test'] . ']</a>';
/// The check indexes button
$b .= '&nbsp;<a href="index.php?action=check_indexes">[' . $this->str['checkindexes'] . ']</a>';
$b .= '</p>';
/// Send buttons to output
$o .= $b;
@@ -88,6 +88,7 @@ class new_table extends XMLDBAction {
$field->setType(XMLDB_TYPE_INTEGER);
$field->setLength(10);
$field->setNotNull(true);
$field->setUnsigned(true);
$field->setSequence(true);
$field->setComment('id of the table, please edit me');
$field->setLoaded(true);
@@ -88,7 +88,7 @@ class new_table_from_mysql extends XMLDBAction {
$dbtables = $db->MetaTables('TABLES');
$selecttables = array();
foreach ($dbtables as $dbtable) {
$dbtable = str_replace($CFG->prefix, '', $dbtable);
$dbtable = strtolower(str_replace($CFG->prefix, '', $dbtable));
$i = $structure->findTableInArray($dbtable);
if ($i === NULL) {
$selecttables[$dbtable] = $dbtable;
+49 -34
View File
@@ -92,7 +92,7 @@ class test extends XMLDBAction {
$table->addFieldInfo('course', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0');
$table->addFieldInfo('type', XMLDB_TYPE_CHAR, '20', null, XMLDB_NOTNULL, null, XMLDB_ENUM, array('single', 'news', 'general', 'social', 'eachuser', 'teacher', 'qanda'), 'general');
$table->addFieldInfo('name', XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null, null, '');
$table->addFieldInfo('intro', XMLDB_TYPE_TEXT, 'small', null, XMLDB_NOTNULL, null, null, null, '');
$table->addFieldInfo('intro', XMLDB_TYPE_TEXT, 'small', null, XMLDB_NOTNULL, null, null, null, null);
$table->addFieldInfo('logo', XMLDB_TYPE_BINARY, 'big', null, XMLDB_NOTNULL, null, null, null);
$table->addFieldInfo('assessed', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0');
$table->addFieldInfo('assesstimestart', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0');
@@ -378,7 +378,22 @@ class test extends XMLDBAction {
$tests['change field precision (number)'] = $test;
}
/// 18th test. Change the sign of one numeric field to unsigned
/// 18th test. Change the precision of one integer field to a smaller one
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
$field = new XMLDBField('course');
$field->setAttributes(XMLDB_TYPE_INTEGER, '5', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0');
$test->sql = $table->getAlterFieldSQL($CFG->dbtype, $CFG->prefix, $field, true);
$test->status = change_field_precision($table, $field, false, false);
if (!$test->status) {
$test->error = $db->ErrorMsg();
}
$tests['change field precision (integer) to smaller one'] = $test;
}
/// 19th test. Change the sign of one numeric field to unsigned
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -393,7 +408,7 @@ class test extends XMLDBAction {
$tests['change field sign (unsigned)'] = $test;
}
/// 19th test. Change the sign of one numeric field to signed
/// 20th test. Change the sign of one numeric field to signed
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -408,7 +423,7 @@ class test extends XMLDBAction {
$tests['change field sign (signed)'] = $test;
}
/// 20th test. Change the nullability of one char field to not null
/// 21th test. Change the nullability of one char field to not null
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -423,7 +438,7 @@ class test extends XMLDBAction {
$tests['change field nullability (not null)'] = $test;
}
/// 21th test. Change the nullability of one char field to null
/// 22th test. Change the nullability of one char field to null
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -438,7 +453,7 @@ class test extends XMLDBAction {
$tests['change field nullability (null)'] = $test;
}
/// 22th test. Dropping the default of one field
/// 23th test. Dropping the default of one field
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -453,7 +468,7 @@ class test extends XMLDBAction {
$tests['drop field default of NULL field'] = $test;
}
/// 23th test. Creating the default for one field
/// 24th test. Creating the default for one field
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -468,7 +483,7 @@ class test extends XMLDBAction {
$tests['add field default of NULL field'] = $test;
}
/// 24th test. Creating the default for one field
/// 25th test. Creating the default for one field
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -484,7 +499,7 @@ class test extends XMLDBAction {
}
/// 25th test. Dropping the default of one NOT NULL field
/// 26th test. Dropping the default of one NOT NULL field
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -499,7 +514,7 @@ class test extends XMLDBAction {
$tests['drop field default of NOT NULL field'] = $test;
}
/// 26th test. Adding one unique index to the table
/// 27th test. Adding one unique index to the table
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -514,7 +529,7 @@ class test extends XMLDBAction {
$tests['add unique index'] = $test;
}
/// 27th test. Adding one not unique index to the table
/// 28th test. Adding one not unique index to the table
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -529,7 +544,7 @@ class test extends XMLDBAction {
$tests['add not unique index'] = $test;
}
/// 28th test. Re-add the same index than previous test. Check find_index_name() works.
/// 29th test. Re-add the same index than previous test. Check find_index_name() works.
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -548,7 +563,7 @@ class test extends XMLDBAction {
$tests['check find_index_name()'] = $test;
}
/// 29th test. Dropping one index from the table
/// 30th test. Dropping one index from the table
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -563,7 +578,7 @@ class test extends XMLDBAction {
$tests['drop index'] = $test;
}
/// 30th test. Adding one unique key to the table
/// 31th test. Adding one unique key to the table
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -578,7 +593,7 @@ class test extends XMLDBAction {
$tests['add unique key'] = $test;
}
/// 31th test. Adding one foreign+unique key to the table
/// 32th test. Adding one foreign+unique key to the table
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -593,7 +608,7 @@ class test extends XMLDBAction {
$tests['add foreign+unique key'] = $test;
}
/// 32th test. Drop one key
/// 33th test. Drop one key
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -608,7 +623,7 @@ class test extends XMLDBAction {
$tests['drop foreign+unique key'] = $test;
}
/// 33th test. Adding one foreign key to the table
/// 34th test. Adding one foreign key to the table
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -623,7 +638,7 @@ class test extends XMLDBAction {
$tests['add foreign key'] = $test;
}
/// 34th test. Drop one foreign key
/// 35th test. Drop one foreign key
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -638,7 +653,7 @@ class test extends XMLDBAction {
$tests['drop foreign key'] = $test;
}
/// 35th test. Adding one complex enum field
/// 36th test. Adding one complex enum field
if ($test->status) {
/// Create a new field with complex specs (enums are good candidates)
$field = new XMLDBField('type');
@@ -653,7 +668,7 @@ class test extends XMLDBAction {
$tests['add field with enum'] = $test;
}
/// 36th test. Dropping the enum of one field
/// 37th test. Dropping the enum of one field
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -668,7 +683,7 @@ class test extends XMLDBAction {
$tests['delete enumlist from one field'] = $test;
}
/// 37th test. Creating the enum for one field
/// 38th test. Creating the enum for one field
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -682,7 +697,7 @@ class test extends XMLDBAction {
$tests['add enumlist to one field'] = $test;
}
/// 38th test. Renaming one index
/// 39th test. Renaming one index
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -697,7 +712,7 @@ class test extends XMLDBAction {
$tests['rename index (experimental. DO NOT USE IT)'] = $test;
}
/// 39th test. Renaming one key
/// 40th test. Renaming one key
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -712,13 +727,13 @@ class test extends XMLDBAction {
$tests['rename key (experimental. DO NOT USE IT)'] = $test;
}
/// 40th test. Renaming one field
/// 41th test. Renaming one field
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
$field = new XMLDBField('type');
$field->setAttributes(XMLDB_TYPE_CHAR, '20', null, XMLDB_NOTNULL, null, XMLDB_ENUM, array('single', 'news', 'general', 'social', 'eachuser', 'teacher', 'qanda'), 'general', 'course');
$test->sql = $table->getRenameFieldSQL($CFG->dbtype, $CFG->prefix, $field, 'newnameforthefield', true);
$test->status = rename_field($table, $field, 'newnameforthefield', false, false);
if (!$test->status) {
@@ -727,11 +742,11 @@ class test extends XMLDBAction {
$tests['rename field'] = $test;
}
/// 41th test. Renaming one table
/// 42th test. Renaming one table
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
$test->sql = $table->getRenameTableSQL($CFG->dbtype, $CFG->prefix, 'newnameforthetable', true);
$test->status = rename_table($table, 'newnameforthetable', false, false);
if (!$test->status) {
@@ -740,7 +755,7 @@ class test extends XMLDBAction {
$tests['rename table'] = $test;
}
/// 42th test. Getting the PK sequence name for one table
/// 43th test. Getting the PK sequence name for one table
if ($test->status) {
$test = new stdClass;
$table->setName('newnameforthetable');
@@ -755,13 +770,13 @@ class test extends XMLDBAction {
$tests['find sequence name'] = $test;
}
/// 43th test. Inserting TEXT contents
/// 44th test. Inserting TEXT contents
$textlib = textlib_get_instance();
if ($test->status) {
$test = new stdClass;
$test->status = false;
$test->sql = array();
$basetext = '日本語 • Русский • Deutsch • English • Español • Français • Italiano • Nederlands • Polski • Português • Svenska • العربية • فارسی 한국어 • עברית • ไทย中文 Ελληνικά • Български • Српски • Українська • Bosanski • Català • Česky • Dansk • Eesti • Simple English • Esperanto • Euskara • Galego • Hrvatski • Ido • Bahasa Indonesia • Íslenska • Lëtzebuergesch • Lietuvių • Magyar • Bahasa Melayu اردو • ئۇيغۇرچه • हिन्दी • नेपाल भाषा मराठी • தமிழ் Հայերեն • Беларуская • Чăваш • Ирон æвзаг • Македонски • Сибирской говор • Afrikaans • Aragonés • Arpitan • Asturianu • Kreyòl Ayisyen • Azərbaycan • Bân-lâm-gú • Basa Banyumasan • Brezhoneg • Corsu • Cymraeg • Deitsch • Føroyskt • Frysk • Furlan • Gaeilge • Gàidhlig • Ilokano • Interlingua • Basa Jawa • Kapampangan • Kernewek • Kurdî كوردی • Ladino לאדינו • Latina • Latviešu • Limburgs • Lumbaart • Nedersaksisch • Nouormand • Occitan • Ozbek • Piemontèis • Plattdüütsch • Ripoarisch • Sámegiella • Scots • Shqip • Sicilianu • Sinugboanon • Srpskohrvatski / Српскохрватски • Basa Sunda • Kiswahili • Tagalog • Tatarça • Walon • Winaray Авар • Башҡорт • Кыргызча Монгол • Қазақша • Тоҷикӣ • Удмурт • Armãneashce • Bamanankan • Eald Englisc • Gaelg • Interlingue • Kaszëbsczi • Kongo • Ligure • Lingála • lojban • Malagasy • Malti • Māori • Nāhuatl • Ekakairũ Naoero • Novial • Pangasinán • Tok Pisin • Romani / रोमानी • Rumantsch • Runa Simi • Sardu • Tetun • Türkmen / تركمن / Туркмен • Vèneto • Volapük • Võro • West-Vlaoms • Wollof • Zazaki • Žemaitėška';
$basetext = "\\ ''語 • Русский • Deutsch • English • Español • Français • Italiano • Nederlands • Polski • Português • Svenska • العربية • فارسی 한국어 • עברית • ไทย中文 Ελληνικά • Български • Српски • Українська • Bosanski • Català • Česky • Dansk • Eesti • Simple English • Esperanto • Euskara • Galego • Hrvatski • Ido • Bahasa Indonesia • Íslenska • Lëtzebuergesch • Lietuvių • Magyar • Bahasa Melayu اردو • ئۇيغۇرچه • हिन्दी • नेपाल भाषा मराठी • தமிழ் Հայերեն • Беларуская • Чăваш • Ирон æвзаг • Македонски • Сибирской говор • Afrikaans • Aragonés • Arpitan • Asturianu • Kreyòl Ayisyen • Azərbaycan • Bân-lâm-gú • Basa Banyumasan • Brezhoneg • Corsu • Cymraeg • Deitsch • Føroyskt • Frysk • Furlan • Gaeilge • Gàidhlig • Ilokano • Interlingua • Basa Jawa • Kapampangan • Kernewek • Kurdî كوردی • Ladino לאדינו • Latina • Latviešu • Limburgs • Lumbaart • Nedersaksisch • Nouormand • Occitan • Ozbek • Piemontèis • Plattdüütsch • Ripoarisch • Sámegiella • Scots • Shqip • Sicilianu • Sinugboanon • Srpskohrvatski / Српскохрватски • Basa Sunda • Kiswahili • Tagalog • Tatarça • Walon • Winaray Авар • Башҡорт • Кыргызча Монгол • Қазақша • Тоҷикӣ • Удмурт • Armãneashce • Bamanankan • Eald Englisc • Gaelg • Interlingue • Kaszëbsczi • Kongo • Ligure • Lingála • lojban • Malagasy • Malti • Māori • Nāhuatl • Ekakairũ Naoero • Novial • Pangasinán • Tok Pisin • Romani / रोमानी • Rumantsch • Runa Simi • Sardu • Tetun • Türkmen / تركمن / Туркмен • Vèneto • Volapük • Võro • West-Vlaoms • Wollof • Zazaki • Žemaitėška";
/// Create one big text (1.500.000 chars)
$fulltext = '';
for ($i=0; $i<1000; $i++) { //1500 * 1000 chars
@@ -794,7 +809,7 @@ class test extends XMLDBAction {
$tests['insert record '. $textlen . ' cc. (text)'] = $test;
}
/// 44th test. Inserting BINARY contents
/// 45th test. Inserting BINARY contents
if ($test->status) {
$test = new stdClass;
$test->status = false;
@@ -823,7 +838,7 @@ class test extends XMLDBAction {
$tests['insert record '. $textlen . ' bytes (binary)'] = $test;
}
/// 45th test. update_record with TEXT and BINARY contents
/// 46th test. update_record with TEXT and BINARY contents
if ($test->status) {
$test = new stdClass;
$test->status = false;
@@ -863,7 +878,7 @@ class test extends XMLDBAction {
$tests['update record '. $textlen . ' cc. (text) and ' . $imglen . ' bytes (binary)'] = $test;
}
/// 46th test. set_field with TEXT contents
/// 47th test. set_field with TEXT contents
if ($test->status) {
$test = new stdClass;
$test->status = false;
@@ -893,7 +908,7 @@ class test extends XMLDBAction {
$tests['set field '. $textlen . ' cc. (text)'] = $test;
}
/// 47th test. set_field with BINARY contents
/// 48th test. set_field with BINARY contents
if ($test->status) {
$test = new stdClass;
$test->status = false;
@@ -80,7 +80,7 @@ class view_table_sql extends XMLDBAction {
/// Get parameters
$tableparam = required_param('table', PARAM_PATH);
if (!$table =& $structure->getTable($tableparam)) {
$this->errormsg = 'Wrong table specified: ' . $tableparm;
$this->errormsg = 'Wrong table specified: ' . $tableparam;
return false;
}
$generatorparam = optional_param('generator', null, PARAM_ALPHANUM);
+3850 -1284
View File
File diff suppressed because it is too large Load Diff
+567 -189
View File
@@ -1,190 +1,568 @@
<?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;
// call the ancestor's method (mark as initialized)
parent::init();
// 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();
}
/** @} */
}
<?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;
// call the ancestor's method (mark as initialized)
parent::init();
// 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();
}
/** @} */
}
?>
+718 -240
View File
@@ -1,240 +1,718 @@
<?php
/**
* @file CAS/PGTStorage/pgt-file.php
* Basic class for PGT file storage
*/
/**
* @class PGTStorageFile
* The PGTStorageFile class is a class for PGT file storage. An instance of
* this class is returned by CASClient::SetPGTStorageFile().
*
* @author Pascal Aubry <pascal.aubry at univ-rennes1.fr>
*
* @ingroup internalPGTStorageFile
*/
class PGTStorageFile extends PGTStorage
{
/**
* @addtogroup internalPGTStorageFile
* @{
*/
/**
* a string telling where PGT's should be stored on the filesystem. Written by
* PGTStorageFile::PGTStorageFile(), read by getPath().
*
* @private
*/
var $_path;
/**
* This method returns the name of the directory where PGT's should be stored
* on the filesystem.
*
* @return the name of a directory (with leading and trailing '/')
*
* @private
*/
function getPath()
{
return $this->_path;
}
/**
* a string telling the format to use to store PGT's (plain or xml). Written by
* PGTStorageFile::PGTStorageFile(), read by getFormat().
*
* @private
*/
var $_format;
/**
* This method returns the format to use when storing PGT's on the filesystem.
*
* @return a string corresponding to the format used (plain or xml).
*
* @private
*/
function getFormat()
{
return $this->_format;
}
// ########################################################################
// 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 "file";
}
/**
* This method returns an informational string giving informations on the
* parameters of the storage.(used for debugging purposes).
*
* @return an informational string.
* @public
*/
function getStorageInfo()
{
return 'path=`'.$this->getPath().'\', format=`'.$this->getFormat().'\'';
}
// ########################################################################
// CONSTRUCTOR
// ########################################################################
/**
* The class constructor, called by CASClient::SetPGTStorageFile().
*
* @param $cas_parent the CASClient instance that creates the object.
* @param $format the format used to store the PGT's (`plain' and `xml' allowed).
* @param $path the path where the PGT's should be stored
*
* @public
*/
function PGTStorageFile($cas_parent,$format,$path)
{
phpCAS::traceBegin();
// call the ancestor's constructor
$this->PGTStorage($cas_parent);
if (empty($format) ) $format = CAS_PGT_STORAGE_FILE_DEFAULT_FORMAT;
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');
}
// 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:
case CAS_PGT_STORAGE_FILE_FORMAT_XML:
$this->_format = $format;
break;
default:
phpCAS::error('unknown PGT file storage format (`'.CAS_PGT_STORAGE_FILE_FORMAT_PLAIN.'\' and `'.CAS_PGT_STORAGE_FILE_FORMAT_XML.'\' allowed)');
}
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;
// call the ancestor's method (mark as initialized)
parent::init();
phpCAS::traceEnd();
}
// ########################################################################
// PGT I/O
// ########################################################################
/**
* This method returns the filename corresponding to a PGT Iou.
*
* @param $pgt_iou the PGT iou.
*
* @return a filename
* @private
*/
function getPGTIouFilename($pgt_iou)
{
phpCAS::traceBegin();
$filename = $this->getPath().$pgt_iou.'.'.$this->getFormat();
phpCAS::traceEnd($filename);
return $filename;
}
/**
* This method stores a PGT and its corresponding PGT Iou into a file. Echoes a
* warning on error.
*
* @param $pgt the PGT
* @param $pgt_iou the PGT iou
*
* @public
*/
function write($pgt,$pgt_iou)
{
phpCAS::traceBegin();
$fname = $this->getPGTIouFilename($pgt_iou);
if ( $f=fopen($fname,"w") ) {
if ( fputs($f,$pgt) === FALSE ) {
phpCAS::error('could not write PGT to `'.$fname.'\'');
}
fclose($f);
} else {
phpCAS::error('could not open `'.$fname.'\'');
}
phpCAS::traceEnd();
}
/**
* This method reads a PGT corresponding to a PGT Iou and deletes the
* corresponding file.
*
* @param $pgt_iou the PGT iou
*
* @return the corresponding PGT, or FALSE on error
*
* @public
*/
function read($pgt_iou)
{
phpCAS::traceBegin();
$pgt = FALSE;
$fname = $this->getPGTIouFilename($pgt_iou);
if ( !($f=fopen($fname,"r")) ) {
phpCAS::trace('could not open `'.$fname.'\'');
} else {
if ( ($pgt=fgets($f)) === FALSE ) {
phpCAS::trace('could not read PGT from `'.$fname.'\'');
}
fclose($f);
}
// delete the PGT file
@unlink($fname);
phpCAS::traceEnd($pgt);
return $pgt;
}
/** @} */
}
?>
<?php
/**
* @file CAS/PGTStorage/pgt-file.php
* Basic class for PGT file storage
*/
/**
* @class PGTStorageFile
* The PGTStorageFile class is a class for PGT file storage. An instance of
* this class is returned by CASClient::SetPGTStorageFile().
*
* @author Pascal Aubry <pascal.aubry at univ-rennes1.fr>
*
* @ingroup internalPGTStorageFile
*/
class PGTStorageFile extends PGTStorage
{
/**
* @addtogroup internalPGTStorageFile
* @{
*/
/**
* a string telling where PGT's should be stored on the filesystem. Written by
* PGTStorageFile::PGTStorageFile(), read by getPath().
*
* @private
*/
var $_path;
/**
* This method returns the name of the directory where PGT's should be stored
* on the filesystem.
*
* @return the name of a directory (with leading and trailing '/')
*
* @private
*/
function getPath()
{
return $this->_path;
}
/**
* a string telling the format to use to store PGT's (plain or xml). Written by
* PGTStorageFile::PGTStorageFile(), read by getFormat().
*
* @private
*/
var $_format;
/**
* This method returns the format to use when storing PGT's on the filesystem.
*
* @return a string corresponding to the format used (plain or xml).
*
* @private
*/
function getFormat()
{
return $this->_format;
}
// ########################################################################
// 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 "file";
}
/**
* This method returns an informational string giving informations on the
* parameters of the storage.(used for debugging purposes).
*
* @return an informational string.
* @public
*/
function getStorageInfo()
{
return 'path=`'.$this->getPath().'\', format=`'.$this->getFormat().'\'';
}
// ########################################################################
// CONSTRUCTOR
// ########################################################################
/**
* The class constructor, called by CASClient::SetPGTStorageFile().
*
* @param $cas_parent the CASClient instance that creates the object.
* @param $format the format used to store the PGT's (`plain' and `xml' allowed).
* @param $path the path where the PGT's should be stored
*
* @public
*/
function PGTStorageFile($cas_parent,$format,$path)
{
phpCAS::traceBegin();
// call the ancestor's constructor
$this->PGTStorage($cas_parent);
if (empty($format) ) $format = CAS_PGT_STORAGE_FILE_DEFAULT_FORMAT;
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');
}
// 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:
case CAS_PGT_STORAGE_FILE_FORMAT_XML:
$this->_format = $format;
break;
default:
phpCAS::error('unknown PGT file storage format (`'.CAS_PGT_STORAGE_FILE_FORMAT_PLAIN.'\' and `'.CAS_PGT_STORAGE_FILE_FORMAT_XML.'\' allowed)');
}
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;
// call the ancestor's method (mark as initialized)
parent::init();
phpCAS::traceEnd();
}
// ########################################################################
// PGT I/O
// ########################################################################
/**
* This method returns the filename corresponding to a PGT Iou.
*
* @param $pgt_iou the PGT iou.
*
* @return a filename
* @private
*/
function getPGTIouFilename($pgt_iou)
{
phpCAS::traceBegin();
$filename = $this->getPath().$pgt_iou.'.'.$this->getFormat();
phpCAS::traceEnd($filename);
return $filename;
}
/**
* This method stores a PGT and its corresponding PGT Iou into a file. Echoes a
* warning on error.
*
* @param $pgt the PGT
* @param $pgt_iou the PGT iou
*
* @public
*/
function write($pgt,$pgt_iou)
{
phpCAS::traceBegin();
$fname = $this->getPGTIouFilename($pgt_iou);
if ( $f=fopen($fname,"w") ) {
if ( fputs($f,$pgt) === FALSE ) {
phpCAS::error('could not write PGT to `'.$fname.'\'');
}
fclose($f);
} else {
phpCAS::error('could not open `'.$fname.'\'');
}
phpCAS::traceEnd();
}
/**
* This method reads a PGT corresponding to a PGT Iou and deletes the
* corresponding file.
*
* @param $pgt_iou the PGT iou
*
* @return the corresponding PGT, or FALSE on error
*
* @public
*/
function read($pgt_iou)
{
phpCAS::traceBegin();
$pgt = FALSE;
$fname = $this->getPGTIouFilename($pgt_iou);
if ( !($f=fopen($fname,"r")) ) {
phpCAS::trace('could not open `'.$fname.'\'');
} else {
if ( ($pgt=fgets($f)) === FALSE ) {
phpCAS::trace('could not read PGT from `'.$fname.'\'');
}
fclose($f);
}
// delete the PGT file
@unlink($fname);
phpCAS::traceEnd($pgt);
return $pgt;
}
/** @} */
}
?>
+188 -188
View File
@@ -1,188 +1,188 @@
<?php
/**
* @file CAS/PGTStorage/pgt-main.php
* Basic class for PGT storage
*/
/**
* @class PGTStorage
* The PGTStorage class is a generic class for PGT storage. This class should
* not be instanciated itself but inherited by specific PGT storage classes.
*
* @author Pascal Aubry <pascal.aubry at univ-rennes1.fr>
*
* @ingroup internalPGTStorage
*/
class PGTStorage
{
/**
* @addtogroup internalPGTStorage
* @{
*/
// ########################################################################
// CONSTRUCTOR
// ########################################################################
/**
* The constructor of the class, should be called only by inherited classes.
*
* @param $cas_parent the CASclient instance that creates the current object.
*
* @protected
*/
function PGTStorage($cas_parent)
{
phpCAS::traceBegin();
if ( !$cas_parent->isProxy() ) {
phpCAS::error('defining PGT storage makes no sense when not using a CAS proxy');
}
phpCAS::traceEnd();
}
// ########################################################################
// DEBUGGING
// ########################################################################
/**
* This virtual method returns an informational string giving the type of storage
* used by the object (used for debugging purposes).
*
* @public
*/
function getStorageType()
{
phpCAS::error(__CLASS__.'::'.__FUNCTION__.'() should never be called');
}
/**
* This virtual method returns an informational string giving informations on the
* parameters of the storage.(used for debugging purposes).
*
* @public
*/
function getStorageInfo()
{
phpCAS::error(__CLASS__.'::'.__FUNCTION__.'() should never be called');
}
// ########################################################################
// ERROR HANDLING
// ########################################################################
/**
* string used to store an error message. Written by PGTStorage::setErrorMessage(),
* read by PGTStorage::getErrorMessage().
*
* @hideinitializer
* @private
* @deprecated not used.
*/
var $_error_message=FALSE;
/**
* This method sets en error message, which can be read later by
* PGTStorage::getErrorMessage().
*
* @param $error_message an error message
*
* @protected
* @deprecated not used.
*/
function setErrorMessage($error_message)
{
$this->_error_message = $error_message;
}
/**
* This method returns an error message set by PGTStorage::setErrorMessage().
*
* @return an error message when set by PGTStorage::setErrorMessage(), FALSE
* otherwise.
*
* @public
* @deprecated not used.
*/
function getErrorMessage()
{
return $this->_error_message;
}
// ########################################################################
// INITIALIZATION
// ########################################################################
/**
* a boolean telling if the storage has already been initialized. Written by
* PGTStorage::init(), read by PGTStorage::isInitialized().
*
* @hideinitializer
* @private
*/
var $_initialized = FALSE;
/**
* This method tells if the storage has already been intialized.
*
* @return a boolean
*
* @protected
*/
function isInitialized()
{
return $this->_initialized;
}
/**
* This virtual method initializes the object.
*
* @protected
*/
function init()
{
$this->_initialized = TRUE;
}
// ########################################################################
// PGT I/O
// ########################################################################
/**
* This virtual method stores a PGT and its corresponding PGT Iuo.
* @note Should never be called.
*
* @param $pgt the PGT
* @param $pgt_iou the PGT iou
*
* @protected
*/
function write($pgt,$pgt_iou)
{
phpCAS::error(__CLASS__.'::'.__FUNCTION__.'() should never be called');
}
/**
* This virtual method reads a PGT corresponding to a PGT Iou and deletes
* the corresponding storage entry.
* @note Should never be called.
*
* @param $pgt_iou the PGT iou
*
* @protected
*/
function read($pgt_iou)
{
phpCAS::error(__CLASS__.'::'.__FUNCTION__.'() should never be called');
}
/** @} */
}
// include specific PGT storage classes
include_once(dirname(__FILE__).'/pgt-file.php');
include_once(dirname(__FILE__).'/pgt-db.php');
?>
<?php
/**
* @file CAS/PGTStorage/pgt-main.php
* Basic class for PGT storage
*/
/**
* @class PGTStorage
* The PGTStorage class is a generic class for PGT storage. This class should
* not be instanciated itself but inherited by specific PGT storage classes.
*
* @author Pascal Aubry <pascal.aubry at univ-rennes1.fr>
*
* @ingroup internalPGTStorage
*/
class PGTStorage
{
/**
* @addtogroup internalPGTStorage
* @{
*/
// ########################################################################
// CONSTRUCTOR
// ########################################################################
/**
* The constructor of the class, should be called only by inherited classes.
*
* @param $cas_parent the CASclient instance that creates the current object.
*
* @protected
*/
function PGTStorage($cas_parent)
{
phpCAS::traceBegin();
if ( !$cas_parent->isProxy() ) {
phpCAS::error('defining PGT storage makes no sense when not using a CAS proxy');
}
phpCAS::traceEnd();
}
// ########################################################################
// DEBUGGING
// ########################################################################
/**
* This virtual method returns an informational string giving the type of storage
* used by the object (used for debugging purposes).
*
* @public
*/
function getStorageType()
{
phpCAS::error(__CLASS__.'::'.__FUNCTION__.'() should never be called');
}
/**
* This virtual method returns an informational string giving informations on the
* parameters of the storage.(used for debugging purposes).
*
* @public
*/
function getStorageInfo()
{
phpCAS::error(__CLASS__.'::'.__FUNCTION__.'() should never be called');
}
// ########################################################################
// ERROR HANDLING
// ########################################################################
/**
* string used to store an error message. Written by PGTStorage::setErrorMessage(),
* read by PGTStorage::getErrorMessage().
*
* @hideinitializer
* @private
* @deprecated not used.
*/
var $_error_message=FALSE;
/**
* This method sets en error message, which can be read later by
* PGTStorage::getErrorMessage().
*
* @param $error_message an error message
*
* @protected
* @deprecated not used.
*/
function setErrorMessage($error_message)
+6232 -2078
View File
File diff suppressed because it is too large Load Diff
+498 -277
View File
@@ -1,277 +1,498 @@
<?php
/**
* @file domxml-php4-php5.php
* Require PHP5, uses built-in DOM extension.
* To be used in PHP4 scripts using DOMXML extension.
* Allows PHP4/DOMXML scripts to run on PHP5/DOM.
* (Requires PHP5/XSL extension for domxml_xslt functions)
*
* Typical use:
* <pre>
* {
* if (version_compare(PHP_VERSION,'5','>='))
* require_once('domxml-php4-to-php5.php');
* }
* </pre>
*
* Version 1.5.5, 2005-01-18, http://alexandre.alapetite.net/doc-alex/domxml-php4-php5/
*
* ------------------------------------------------------------------<br>
* Written by Alexandre Alapetite, http://alexandre.alapetite.net/cv/
*
* Copyright 2004, Licence: Creative Commons "Attribution-ShareAlike 2.0 France" BY-SA (FR),
* http://creativecommons.org/licenses/by-sa/2.0/fr/
* http://alexandre.alapetite.net/divers/apropos/#by-sa
* - Attribution. You must give the original author credit
* - Share Alike. If you alter, transform, or build upon this work,
* you may distribute the resulting work only under a license identical to this one
* - The French law is authoritative
* - Any of these conditions can be waived if you get permission from Alexandre Alapetite
* - Please send to Alexandre Alapetite the modifications you make,
* in order to improve this file for the benefit of everybody
*
* If you want to distribute this code, please do it as a link to:
* http://alexandre.alapetite.net/doc-alex/domxml-php4-php5/
*/
function domxml_new_doc($version) {return new php4DOMDocument('');}
function domxml_open_file($filename) {return new php4DOMDocument($filename);}
function domxml_open_mem($str)
{
$dom=new php4DOMDocument('');
$dom->myDOMNode->loadXML($str);
return $dom;
}
function xpath_eval($xpath_context,$eval_str,$contextnode=null) {return $xpath_context->query($eval_str,$contextnode);}
function xpath_new_context($dom_document) {return new php4DOMXPath($dom_document);}
class php4DOMAttr extends php4DOMNode
{
function php4DOMAttr($aDOMAttr) {$this->myDOMNode=$aDOMAttr;}
function Name() {return $this->myDOMNode->name;}
function Specified() {return $this->myDOMNode->specified;}
function Value() {return $this->myDOMNode->value;}
}
class php4DOMDocument extends php4DOMNode
{
function php4DOMDocument($filename='')
{
$this->myDOMNode=new DOMDocument();
if ($filename!='') $this->myDOMNode->load($filename);
}
function create_attribute($name,$value)
{
$myAttr=$this->myDOMNode->createAttribute($name);
$myAttr->value=$value;
return new php4DOMAttr($myAttr,$this);
}
function create_cdata_section($content) {return new php4DOMNode($this->myDOMNode->createCDATASection($content),$this);}
function create_comment($data) {return new php4DOMNode($this->myDOMNode->createComment($data),$this);}
function create_element($name) {return new php4DOMElement($this->myDOMNode->createElement($name),$this);}
function create_text_node($content) {return new php4DOMNode($this->myDOMNode->createTextNode($content),$this);}
function document_element() {return new php4DOMElement($this->myDOMNode->documentElement,$this);}
function dump_file($filename,$compressionmode=false,$format=false) {return $this->myDOMNode->save($filename);}
function dump_mem($format=false,$encoding=false) {return $this->myDOMNode->saveXML();}
function get_element_by_id($id) {return new php4DOMElement($this->myDOMNode->getElementById($id),$this);}
function get_elements_by_tagname($name)
{
$myDOMNodeList=$this->myDOMNode->getElementsByTagName($name);
$nodeSet=array();
$i=0;
if (isset($myDOMNodeList))
while ($node=$myDOMNodeList->item($i))
{
$nodeSet[]=new php4DOMElement($node,$this);
$i++;
}
return $nodeSet;
}
function html_dump_mem() {return $this->myDOMNode->saveHTML();}
function root() {return new php4DOMElement($this->myDOMNode->documentElement,$this);}
}
class php4DOMElement extends php4DOMNode
{
function get_attribute($name) {return $this->myDOMNode->getAttribute($name);}
function get_elements_by_tagname($name)
{
$myDOMNodeList=$this->myDOMNode->getElementsByTagName($name);
$nodeSet=array();
$i=0;
if (isset($myDOMNodeList))
while ($node=$myDOMNodeList->item($i))
{
$nodeSet[]=new php4DOMElement($node,$this->myOwnerDocument);
$i++;
}
return $nodeSet;
}
function has_attribute($name) {return $this->myDOMNode->hasAttribute($name);}
function remove_attribute($name) {return $this->myDOMNode->removeAttribute($name);}
function set_attribute($name,$value) {return $this->myDOMNode->setAttribute($name,$value);}
function tagname() {return $this->myDOMNode->tagName;}
}
class php4DOMNode
{
var $myDOMNode;
var $myOwnerDocument;
function php4DOMNode($aDomNode,$aOwnerDocument)
{
$this->myDOMNode=$aDomNode;
$this->myOwnerDocument=$aOwnerDocument;
}
function __get($name)
{
if ($name=='type') return $this->myDOMNode->nodeType;
elseif ($name=='tagname') return $this->myDOMNode->tagName;
elseif ($name=='content') return $this->myDOMNode->textContent;
else
{
$myErrors=debug_backtrace();
trigger_error('Undefined property: '.get_class($this).'::$'.$name.' ['.$myErrors[0]['file'].':'.$myErrors[0]['line'].']',E_USER_NOTICE);
return false;
}
}
function append_child($newnode) {return new php4DOMElement($this->myDOMNode->appendChild($newnode->myDOMNode),$this->myOwnerDocument);}
function append_sibling($newnode) {return new php4DOMElement($this->myDOMNode->parentNode->appendChild($newnode->myDOMNode),$this->myOwnerDocument);}
function attributes()
{
$myDOMNodeList=$this->myDOMNode->attributes;
$nodeSet=array();
$i=0;
if (isset($myDOMNodeList))
while ($node=$myDOMNodeList->item($i))
{
$nodeSet[]=new php4DOMAttr($node,$this->myOwnerDocument);
$i++;
}
return $nodeSet;
}
function child_nodes()
{
$myDOMNodeList=$this->myDOMNode->childNodes;
$nodeSet=array();
$i=0;
if (isset($myDOMNodeList))
while ($node=$myDOMNodeList->item($i))
{
$nodeSet[]=new php4DOMElement($node,$this->myOwnerDocument);
$i++;
}
return $nodeSet;
}
function children() {return $this->child_nodes();}
function clone_node($deep=false) {return new php4DOMElement($this->myDOMNode->cloneNode($deep),$this->myOwnerDocument);}
function first_child() {return new php4DOMElement($this->myDOMNode->firstChild,$this->myOwnerDocument);}
function get_content() {return $this->myDOMNode->textContent;}
function has_attributes() {return $this->myDOMNode->hasAttributes();}
function has_child_nodes() {return $this->myDOMNode->hasChildNodes();}
function insert_before($newnode,$refnode) {return new php4DOMElement($this->myDOMNode->insertBefore($newnode->myDOMNode,$refnode->myDOMNode),$this->myOwnerDocument);}
function is_blank_node()
{
$myDOMNodeList=$this->myDOMNode->childNodes;
$i=0;
if (isset($myDOMNodeList))
while ($node=$myDOMNodeList->item($i))
{
if (($node->nodeType==XML_ELEMENT_NODE)||
(($node->nodeType==XML_TEXT_NODE)&&!ereg('^([[:cntrl:]]|[[:space:]])*$',$node->nodeValue)))
return false;
$i++;
}
return true;
}
function last_child() {return new php4DOMElement($this->myDOMNode->lastChild,$this->myOwnerDocument);}
function new_child($name,$content)
{
$mySubNode=$this->myDOMNode->ownerDocument->createElement($name);
$mySubNode->appendChild($this->myDOMNode->ownerDocument->createTextNode($content));
$this->myDOMNode->appendChild($mySubNode);
return new php4DOMElement($mySubNode,$this->myOwnerDocument);
}
function next_sibling() {return new php4DOMElement($this->myDOMNode->nextSibling,$this->myOwnerDocument);}
function node_name() {return $this->myDOMNode->localName;}
function node_type() {return $this->myDOMNode->nodeType;}
function node_value() {return $this->myDOMNode->nodeValue;}
function owner_document() {return $this->myOwnerDocument;}
function parent_node() {return new php4DOMElement($this->myDOMNode->parentNode,$this->myOwnerDocument);}
function prefix() {return $this->myDOMNode->prefix;}
function previous_sibling() {return new php4DOMElement($this->myDOMNode->previousSibling,$this->myOwnerDocument);}
function remove_child($oldchild) {return new php4DOMElement($this->myDOMNode->removeChild($oldchild->myDOMNode),$this->myOwnerDocument);}
function replace_child($oldnode,$newnode) {return new php4DOMElement($this->myDOMNode->replaceChild($oldnode->myDOMNode,$newnode->myDOMNode),$this->myOwnerDocument);}
function set_content($text)
{
if (($this->myDOMNode->hasChildNodes())&&($this->myDOMNode->firstChild->nodeType==XML_TEXT_NODE))
$this->myDOMNode->removeChild($this->myDOMNode->firstChild);
return $this->myDOMNode->appendChild($this->myDOMNode->ownerDocument->createTextNode($text));
}
}
class php4DOMNodelist
{
var $myDOMNodelist;
var $nodeset;
function php4DOMNodelist($aDOMNodelist,$aOwnerDocument)
{
$this->myDOMNodelist=$aDOMNodelist;
$this->nodeset=array();
$i=0;
if (isset($this->myDOMNodelist))
while ($node=$this->myDOMNodelist->item($i))
{
$this->nodeset[]=new php4DOMElement($node,$aOwnerDocument);
$i++;
}
}
}
class php4DOMXPath
{
var $myDOMXPath;
var $myOwnerDocument;
function php4DOMXPath($dom_document)
{
$this->myOwnerDocument=$dom_document;
$this->myDOMXPath=new DOMXPath($dom_document->myDOMNode);
}
function query($eval_str,$contextnode)
{
if (isset($contextnode)) return new php4DOMNodelist($this->myDOMXPath->query($eval_str,$contextnode->myDOMNode),$this->myOwnerDocument);
else return new php4DOMNodelist($this->myDOMXPath->query($eval_str),$this->myOwnerDocument);
}
function xpath_register_ns($prefix,$namespaceURI) {return $this->myDOMXPath->registerNamespace($prefix,$namespaceURI);}
}
if (extension_loaded('xsl'))
{//See also: http://alexandre.alapetite.net/doc-alex/xslt-php4-php5/
function domxml_xslt_stylesheet($xslstring) {return new php4DomXsltStylesheet(DOMDocument::loadXML($xslstring));}
function domxml_xslt_stylesheet_doc($dom_document) {return new php4DomXsltStylesheet($dom_document);}
function domxml_xslt_stylesheet_file($xslfile) {return new php4DomXsltStylesheet(DOMDocument::load($xslfile));}
class php4DomXsltStylesheet
{
var $myxsltProcessor;
function php4DomXsltStylesheet($dom_document)
{
$this->myxsltProcessor=new xsltProcessor();
$this->myxsltProcessor->importStyleSheet($dom_document);
}
function process($dom_document,$xslt_parameters=array(),$param_is_xpath=false)
{
foreach ($xslt_parameters as $param=>$value)
$this->myxsltProcessor->setParameter('',$param,$value);
$myphp4DOMDocument=new php4DOMDocument();
$myphp4DOMDocument->myDOMNode=$this->myxsltProcessor->transformToDoc($dom_document->myDOMNode);
return $myphp4DOMDocument;
}
function result_dump_file($dom_document,$filename)
{
$html=$dom_document->myDOMNode->saveHTML();
file_put_contents($filename,$html);
return $html;
}
function result_dump_mem($dom_document) {return $dom_document->myDOMNode->saveHTML();}
}
}
?>
<?php
/*
Requires PHP5, uses built-in DOM extension.
To be used in PHP4 scripts using DOMXML extension: allows PHP4/DOMXML scripts to run on PHP5/DOM.
(Optional: requires PHP5/XSL extension for domxml_xslt functions, PHP>=5.1 for XPath evaluation functions, and PHP>=5.1/libxml for DOMXML error reports)
Typical use:
{
if (PHP_VERSION>='5')
require_once('domxml-php4-to-php5.php');
}
Version 1.20a, 2008-11-06, http://alexandre.alapetite.net/doc-alex/domxml-php4-php5/
------------------------------------------------------------------
Written by Alexandre Alapetite, http://alexandre.alapetite.net/cv/
Copyright 2004-2008, GNU Lesser General Public License,
http://www.gnu.org/licenses/lgpl.html
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/lgpl.html>
== Rights and obligations ==
- Attribution: You must give the original author credit.
- Share Alike: If you alter or transform this library,
you may distribute the resulting library only under the same license GNU/LGPL.
- In case of jurisdiction dispute, the French law is authoritative.
- Any of these conditions can be waived if you get permission from Alexandre Alapetite.
- Not required, but please send to Alexandre Alapetite the modifications you make,
in order to improve this file for the benefit of everybody.
If you want to distribute this code, please do it as a link to:
http://alexandre.alapetite.net/doc-alex/domxml-php4-php5/
*/
define('DOMXML_LOAD_PARSING',0);
define('DOMXML_LOAD_VALIDATING',1);
define('DOMXML_LOAD_RECOVERING',2);
define('DOMXML_LOAD_SUBSTITUTE_ENTITIES',4);
//define('DOMXML_LOAD_COMPLETE_ATTRS',8);
define('DOMXML_LOAD_DONT_KEEP_BLANKS',16);
function domxml_new_doc($version) {return new php4DOMDocument();}
function domxml_new_xmldoc($version) {return new php4DOMDocument();}
function domxml_open_file($filename,$mode=DOMXML_LOAD_PARSING,&$error=null)
{
$dom=new php4DOMDocument($mode);
$errorMode=(func_num_args()>2)&&defined('LIBXML_VERSION');
if ($errorMode) libxml_use_internal_errors(true);
if (!$dom->myDOMNode->load($filename)) $dom=null;
if ($errorMode)
{
$error=array_map('_error_report',libxml_get_errors());
libxml_clear_errors();
}
return $dom;
}
function domxml_open_mem($str,$mode=DOMXML_LOAD_PARSING,&$error=null)
{
$dom=new php4DOMDocument($mode);
$errorMode=(func_num_args()>2)&&defined('LIBXML_VERSION');
if ($errorMode) libxml_use_internal_errors(true);
if (!$dom->myDOMNode->loadXML($str)) $dom=null;
if ($errorMode)
{
$error=array_map('_error_report',libxml_get_errors());
libxml_clear_errors();
}
return $dom;
}
function html_doc($html_doc,$from_file=false)
{
$dom=new php4DOMDocument();
if ($from_file) $result=$dom->myDOMNode->loadHTMLFile($html_doc);
else $result=$dom->myDOMNode->loadHTML($html_doc);
return $result ? $dom : null;
}
function html_doc_file($filename) {return html_doc($filename,true);}
function xmldoc($str) {return domxml_open_mem($str);}
function xmldocfile($filename) {return domxml_open_file($filename);}
function xpath_eval($xpath_context,$eval_str,$contextnode=null) {return $xpath_context->xpath_eval($eval_str,$contextnode);}
function xpath_new_context($dom_document) {return new php4DOMXPath($dom_document);}
function xpath_register_ns($xpath_context,$prefix,$namespaceURI) {return $xpath_context->myDOMXPath->registerNamespace($prefix,$namespaceURI);}
function _entityDecode($text) {return html_entity_decode(strtr($text,array('&apos;'=>'\'')),ENT_QUOTES,'UTF-8');}
function _error_report($error) {return array('errormessage'=>$error->message,'nodename'=>'','line'=>$error->line,'col'=>$error->column)+($error->file==''?array():array('directory'=>dirname($error->file),'file'=>basename($error->file)));}
class php4DOMAttr extends php4DOMNode
{
function __get($name)
{
if ($name==='name') return $this->myDOMNode->name;
else return parent::__get($name);
}
function name() {return $this->myDOMNode->name;}
function set_content($text) {}
//function set_value($content) {return $this->myDOMNode->value=htmlspecialchars($content,ENT_QUOTES);}
function specified() {return $this->myDOMNode->specified;}
function value() {return $this->myDOMNode->value;}
}
class php4DOMDocument extends php4DOMNode
{
function php4DOMDocument($mode=DOMXML_LOAD_PARSING)
{
$this->myDOMNode=new DOMDocument();
$this->myOwnerDocument=$this;
if ($mode & DOMXML_LOAD_VALIDATING) $this->myDOMNode->validateOnParse=true;
if ($mode & DOMXML_LOAD_RECOVERING) $this->myDOMNode->recover=true;
if ($mode & DOMXML_LOAD_SUBSTITUTE_ENTITIES) $this->myDOMNode->substituteEntities=true;
if ($mode & DOMXML_LOAD_DONT_KEEP_BLANKS) $this->myDOMNode->preserveWhiteSpace=false;
}
function add_root($name)
{
if ($this->myDOMNode->hasChildNodes()) $this->myDOMNode->removeChild($this->myDOMNode->firstChild);
return new php4DOMElement($this->myDOMNode->appendChild($this->myDOMNode->createElement($name)),$this->myOwnerDocument);
}
function create_attribute($name,$value)
{
$myAttr=$this->myDOMNode->createAttribute($name);
$myAttr->value=htmlspecialchars($value,ENT_QUOTES);
return new php4DOMAttr($myAttr,$this);
}
function create_cdata_section($content) {return new php4DOMNode($this->myDOMNode->createCDATASection($content),$this);}
function create_comment($data) {return new php4DOMNode($this->myDOMNode->createComment($data),$this);}
function create_element($name) {return new php4DOMElement($this->myDOMNode->createElement($name),$this);}
function create_element_ns($uri,$name,$prefix=null)
{
if ($prefix==null) $prefix=$this->myDOMNode->lookupPrefix($uri);
if (($prefix==null)&&(($this->myDOMNode->documentElement==null)||(!$this->myDOMNode->documentElement->isDefaultNamespace($uri)))) $prefix='a'.sprintf('%u',crc32($uri));
return new php4DOMElement($this->myDOMNode->createElementNS($uri,$prefix==null ? $name : $prefix.':'.$name),$this);
}
function create_entity_reference($content) {return new php4DOMNode($this->myDOMNode->createEntityReference($content),$this);} //By Walter Ebert 2007-01-22
function create_processing_instruction($target,$data=''){return new php4DomProcessingInstruction($this->myDOMNode->createProcessingInstruction($target,$data),$this);}
function create_text_node($content) {return new php4DOMText($this->myDOMNode->createTextNode($content),$this);}
function document_element() {return parent::_newDOMElement($this->myDOMNode->documentElement,$this);}
function dump_file($filename,$compressionmode=false,$format=false)
{
$format0=$this->myDOMNode->formatOutput;
$this->myDOMNode->formatOutput=$format;
$res=$this->myDOMNode->save($filename);
$this->myDOMNode->formatOutput=$format0;
return $res;
}
function dump_mem($format=false,$encoding=false)
{
$format0=$this->myDOMNode->formatOutput;
$this->myDOMNode->formatOutput=$format;
$encoding0=$this->myDOMNode->encoding;
if ($encoding) $this->myDOMNode->encoding=$encoding;
$dump=$this->myDOMNode->saveXML();
$this->myDOMNode->formatOutput=$format0;
if ($encoding) $this->myDOMNode->encoding= $encoding0=='' ? 'UTF-8' : $encoding0; //UTF-8 is XML default encoding
return $dump;
}
function free()
{
if ($this->myDOMNode->hasChildNodes()) $this->myDOMNode->removeChild($this->myDOMNode->firstChild);
$this->myDOMNode=null;
$this->myOwnerDocument=null;
}
function get_element_by_id($id) {return parent::_newDOMElement($this->myDOMNode->getElementById($id),$this);}
function get_elements_by_tagname($name)
{
$myDOMNodeList=$this->myDOMNode->getElementsByTagName($name);
$nodeSet=array();
$i=0;
if (isset($myDOMNodeList))
while ($node=$myDOMNodeList->item($i++)) $nodeSet[]=new php4DOMElement($node,$this);
return $nodeSet;
}
function html_dump_mem() {return $this->myDOMNode->saveHTML();}
function root() {return parent::_newDOMElement($this->myDOMNode->documentElement,$this);}
function xpath_new_context() {return new php4DOMXPath($this);}
}
class php4DOMElement extends php4DOMNode
{
function add_namespace($uri,$prefix)
{
if ($this->myDOMNode->hasAttributeNS('http://www.w3.org/2000/xmlns/',$prefix)) return false;
else
{
$this->myDOMNode->setAttributeNS('http://www.w3.org/2000/xmlns/','xmlns:'.$prefix,$uri); //By Daniel Walker 2006-09-08
return true;
}
}
function get_attribute($name) {return $this->myDOMNode->getAttribute($name);}
function get_attribute_node($name) {return parent::_newDOMElement($this->myDOMNode->getAttributeNode($name),$this->myOwnerDocument);}
function get_elements_by_tagname($name)
{
$myDOMNodeList=$this->myDOMNode->getElementsByTagName($name);
$nodeSet=array();
$i=0;
if (isset($myDOMNodeList))
while ($node=$myDOMNodeList->item($i++)) $nodeSet[]=new php4DOMElement($node,$this->myOwnerDocument);
return $nodeSet;
}
function has_attribute($name) {return $this->myDOMNode->hasAttribute($name);}
function remove_attribute($name) {return $this->myDOMNode->removeAttribute($name);}
function set_attribute($name,$value)
{
//return $this->myDOMNode->setAttribute($name,$value); //Does not return a DomAttr
$myAttr=$this->myDOMNode->ownerDocument->createAttribute($name);
$myAttr->value=htmlspecialchars($value,ENT_QUOTES); //Entity problem reported by AL-DesignWorks 2007-09-07
$this->myDOMNode->setAttributeNode($myAttr);
return new php4DOMAttr($myAttr,$this->myOwnerDocument);
}
/*function set_attribute_node($attr)
{
$this->myDOMNode->setAttributeNode($this->_importNode($attr));
return $attr;
}*/
function set_name($name)
{
if ($this->myDOMNode->prefix=='') $newNode=$this->myDOMNode->ownerDocument->createElement($name);
else $newNode=$this->myDOMNode->ownerDocument->createElementNS($this->myDOMNode->namespaceURI,$this->myDOMNode->prefix.':'.$name);
$myDOMNodeList=$this->myDOMNode->attributes;
$i=0;
if (isset($myDOMNodeList))
while ($node=$myDOMNodeList->item($i++))
if ($node->namespaceURI=='') $newNode->setAttribute($node->name,$node->value);
else $newNode->setAttributeNS($node->namespaceURI,$node->nodeName,$node->value);
$myDOMNodeList=$this->myDOMNode->childNodes;
if (isset($myDOMNodeList))
while ($node=$myDOMNodeList->item(0)) $newNode->appendChild($node);
$this->myDOMNode->parentNode->replaceChild($newNode,$this->myDOMNode);
$this->myDOMNode=$newNode;
return true;
}
function tagname() {return $this->tagname;}
}
class php4DOMNode
{
public $myDOMNode;
public $myOwnerDocument;
function php4DOMNode($aDomNode,$aOwnerDocument)
{
$this->myDOMNode=$aDomNode;
$this->myOwnerDocument=$aOwnerDocument;
}
function __get($name)
{
switch ($name)
{
case 'type': return $this->myDOMNode->nodeType;
case 'tagname': return ($this->myDOMNode->nodeType===XML_ELEMENT_NODE) ? $this->myDOMNode->localName : $this->myDOMNode->tagName; //Avoid namespace prefix for DOMElement
case 'content': return $this->myDOMNode->textContent;
case 'value': return $this->myDOMNode->value;
default:
$myErrors=debug_backtrace();
trigger_error('Undefined property: '.get_class($this).'::$'.$name.' ['.$myErrors[0]['file'].':'.$myErrors[0]['line'].']',E_USER_NOTICE);
return false;
}
}
function add_child($newnode) {return append_child($newnode);}
function add_namespace($uri,$prefix) {return false;}
function append_child($newnode) {return self::_newDOMElement($this->myDOMNode->appendChild($this->_importNode($newnode)),$this->myOwnerDocument);}
function append_sibling($newnode) {return self::_newDOMElement($this->myDOMNode->parentNode->appendChild($this->_importNode($newnode)),$this->myOwnerDocument);}
function attributes()
{
$myDOMNodeList=$this->myDOMNode->attributes;
if (!(isset($myDOMNodeList)&&$this->myDOMNode->hasAttributes())) return null;
$nodeSet=array();
$i=0;
while ($node=$myDOMNodeList->item($i++)) $nodeSet[]=new php4DOMAttr($node,$this->myOwnerDocument);
return $nodeSet;
}
function child_nodes()
{
$myDOMNodeList=$this->myDOMNode->childNodes;
$nodeSet=array();
$i=0;
if (isset($myDOMNodeList))
while ($node=$myDOMNodeList->item($i++)) $nodeSet[]=self::_newDOMElement($node,$this->myOwnerDocument);
return $nodeSet;
}
function children() {return $this->child_nodes();}
function clone_node($deep=false) {return self::_newDOMElement($this->myDOMNode->cloneNode($deep),$this->myOwnerDocument);}
//dump_node($node) should only be called on php4DOMDocument
function dump_node($node=null) {return $node==null ? $this->myOwnerDocument->myDOMNode->saveXML($this->myDOMNode) : $this->myOwnerDocument->myDOMNode->saveXML($node->myDOMNode);}
function first_child() {return self::_newDOMElement($this->myDOMNode->firstChild,$this->myOwnerDocument);}
function get_content() {return $this->myDOMNode->textContent;}
function has_attributes() {return $this->myDOMNode->hasAttributes();}
function has_child_nodes() {return $this->myDOMNode->hasChildNodes();}
function insert_before($newnode,$refnode) {return self::_newDOMElement($this->myDOMNode->insertBefore($this->_importNode($newnode),$refnode==null?null:$refnode->myDOMNode),$this->myOwnerDocument);}
function is_blank_node() {return ($this->myDOMNode->nodeType===XML_TEXT_NODE)&&preg_match('%^\s*$%',$this->myDOMNode->nodeValue);}
function last_child() {return self::_newDOMElement($this->myDOMNode->lastChild,$this->myOwnerDocument);}
function new_child($name,$content)
{
$mySubNode=$this->myDOMNode->ownerDocument->createElement($name);
$mySubNode->appendChild($this->myDOMNode->ownerDocument->createTextNode(_entityDecode($content)));
$this->myDOMNode->appendChild($mySubNode);
return new php4DOMElement($mySubNode,$this->myOwnerDocument);
}
function next_sibling() {return self::_newDOMElement($this->myDOMNode->nextSibling,$this->myOwnerDocument);}
function node_name() {return ($this->myDOMNode->nodeType===XML_ELEMENT_NODE) ? $this->myDOMNode->localName : $this->myDOMNode->nodeName;} //Avoid namespace prefix for DOMElement
function node_type() {return $this->myDOMNode->nodeType;}
function node_value() {return $this->myDOMNode->nodeValue;}
function owner_document() {return $this->myOwnerDocument;}
function parent_node() {return self::_newDOMElement($this->myDOMNode->parentNode,$this->myOwnerDocument);}
function prefix() {return $this->myDOMNode->prefix;}
function previous_sibling() {return self::_newDOMElement($this->myDOMNode->previousSibling,$this->myOwnerDocument);}
function remove_child($oldchild) {return self::_newDOMElement($this->myDOMNode->removeChild($oldchild->myDOMNode),$this->myOwnerDocument);}
function replace_child($newnode,$oldnode) {return self::_newDOMElement($this->myDOMNode->replaceChild($this->_importNode($newnode),$oldnode->myDOMNode),$this->myOwnerDocument);}
function replace_node($newnode) {return self::_newDOMElement($this->myDOMNode->parentNode->replaceChild($this->_importNode($newnode),$this->myDOMNode),$this->myOwnerDocument);}
function set_content($text) {return $this->myDOMNode->appendChild($this->myDOMNode->ownerDocument->createTextNode(_entityDecode($text)));} //Entity problem reported by AL-DesignWorks 2007-09-07
//function set_name($name) {return $this->myOwnerDocument->renameNode($this->myDOMNode,$this->myDOMNode->namespaceURI,$name);}
function set_namespace($uri,$prefix=null)
{//Contributions by Daniel Walker 2006-09-08
$nsprefix=$this->myDOMNode->lookupPrefix($uri);
if ($nsprefix==null)
{
$nsprefix= $prefix==null ? $nsprefix='a'.sprintf('%u',crc32($uri)) : $prefix;
if ($this->myDOMNode->nodeType===XML_ATTRIBUTE_NODE)
{
if (($prefix!=null)&&$this->myDOMNode->ownerElement->hasAttributeNS('http://www.w3.org/2000/xmlns/',$nsprefix)&&
($this->myDOMNode->ownerElement->getAttributeNS('http://www.w3.org/2000/xmlns/',$nsprefix)!=$uri))
{//Remove namespace
$parent=$this->myDOMNode->ownerElement;
$parent->removeAttributeNode($this->myDOMNode);
$parent->setAttribute($this->myDOMNode->localName,$this->myDOMNode->nodeValue);
$this->myDOMNode=$parent->getAttributeNode($this->myDOMNode->localName);
return;
}
$this->myDOMNode->ownerElement->setAttributeNS('http://www.w3.org/2000/xmlns/','xmlns:'.$nsprefix,$uri);
}
}
if ($this->myDOMNode->nodeType===XML_ATTRIBUTE_NODE)
{
$parent=$this->myDOMNode->ownerElement;
$parent->removeAttributeNode($this->myDOMNode);
$parent->setAttributeNS($uri,$nsprefix.':'.$this->myDOMNode->localName,$this->myDOMNode->nodeValue);
$this->myDOMNode=$parent->getAttributeNodeNS($uri,$this->myDOMNode->localName);
}
elseif ($this->myDOMNode->nodeType===XML_ELEMENT_NODE)
{
$NewNode=$this->myDOMNode->ownerDocument->createElementNS($uri,$nsprefix.':'.$this->myDOMNode->localName);
foreach ($this->myDOMNode->attributes as $n) $NewNode->appendChild($n->cloneNode(true));
foreach ($this->myDOMNode->childNodes as $n) $NewNode->appendChild($n->cloneNode(true));
$xpath=new DOMXPath($this->myDOMNode->ownerDocument);
$myDOMNodeList=$xpath->query('namespace::*[name()!="xml"]',$this->myDOMNode); //Add old namespaces
foreach ($myDOMNodeList as $n) $NewNode->setAttributeNS('http://www.w3.org/2000/xmlns/',$n->nodeName,$n->nodeValue);
$this->myDOMNode->parentNode->replaceChild($NewNode,$this->myDOMNode);
$this->myDOMNode=$NewNode;
}
}
function unlink_node()
{
if ($this->myDOMNode->parentNode!=null)
{
if ($this->myDOMNode->nodeType===XML_ATTRIBUTE_NODE) $this->myDOMNode->parentNode->removeAttributeNode($this->myDOMNode);
else $this->myDOMNode->parentNode->removeChild($this->myDOMNode);
}
}
protected function _importNode($newnode) {return $this->myOwnerDocument===$newnode->myOwnerDocument ? $newnode->myDOMNode : $this->myOwnerDocument->myDOMNode->importNode($newnode->myDOMNode,true);} //To import DOMNode from another DOMDocument
static function _newDOMElement($aDOMNode,$aOwnerDocument)
{//Check the PHP5 DOMNode before creating a new associated PHP4 DOMNode wrapper
if ($aDOMNode==null) return null;
switch ($aDOMNode->nodeType)
{
case XML_ELEMENT_NODE: return new php4DOMElement($aDOMNode,$aOwnerDocument);
case XML_TEXT_NODE: return new php4DOMText($aDOMNode,$aOwnerDocument);
case XML_ATTRIBUTE_NODE: return new php4DOMAttr($aDOMNode,$aOwnerDocument);
case XML_PI_NODE: return new php4DomProcessingInstruction($aDOMNode,$aOwnerDocument);
default: return new php4DOMNode($aDOMNode,$aOwnerDocument);
}
}
}
class php4DomProcessingInstruction extends php4DOMNode
{
function data() {return $this->myDOMNode->data;}
function target() {return $this->myDOMNode->target;}
}
class php4DOMText extends php4DOMNode
{
function __get($name)
{
if ($name==='tagname') return '#text';
else return parent::__get($name);
}
function tagname() {return '#text';}
function set_content($text) {$this->myDOMNode->nodeValue=$text; return true;}
}
if (!defined('XPATH_NODESET'))
{
define('XPATH_UNDEFINED',0);
define('XPATH_NODESET',1);
define('XPATH_BOOLEAN',2);
define('XPATH_NUMBER',3);
define('XPATH_STRING',4);
/*define('XPATH_POINT',5);
define('XPATH_RANGE',6);
define('XPATH_LOCATIONSET',7);
define('XPATH_USERS',8);
define('XPATH_XSLT_TREE',9);*/
}
class php4DOMNodelist
{
private $myDOMNodelist;
public $nodeset;
public $type=XPATH_UNDEFINED;
public $value;
function php4DOMNodelist($aDOMNodelist,$aOwnerDocument)
{
if (!isset($aDOMNodelist)) return;
elseif (is_object($aDOMNodelist)||is_array($aDOMNodelist))
{
if ($aDOMNodelist->length>0)
{
$this->myDOMNodelist=$aDOMNodelist;
$this->nodeset=array();
$this->type=XPATH_NODESET;
$i=0;
while ($node=$this->myDOMNodelist->item($i++)) $this->nodeset[]=php4DOMNode::_newDOMElement($node,$aOwnerDocument);
}
}
elseif (is_int($aDOMNodelist)||is_float($aDOMNodelist))
{
$this->type=XPATH_NUMBER;
$this->value=$aDOMNodelist;
}
elseif (is_bool($aDOMNodelist))
{
$this->type=XPATH_BOOLEAN;
$this->value=$aDOMNodelist;
}
elseif (is_string($aDOMNodelist))
{
$this->type=XPATH_STRING;
$this->value=$aDOMNodelist;
}
}
}
class php4DOMXPath
{
public $myDOMXPath;
private $myOwnerDocument;
function php4DOMXPath($dom_document)
{
//TODO: If $dom_document is a DomElement, make that default $contextnode and modify XPath. Ex: '/test'
$this->myOwnerDocument=$dom_document->myOwnerDocument;
$this->myDOMXPath=new DOMXPath($this->myOwnerDocument->myDOMNode);
}
function xpath_eval($eval_str,$contextnode=null)
{
if (method_exists($this->myDOMXPath,'evaluate')) $xp=isset($contextnode) ? $this->myDOMXPath->evaluate($eval_str,$contextnode->myDOMNode) : $this->myDOMXPath->evaluate($eval_str);
else $xp=isset($contextnode) ? $this->myDOMXPath->query($eval_str,$contextnode->myDOMNode) : $this->myDOMXPath->query($eval_str);
$xp=new php4DOMNodelist($xp,$this->myOwnerDocument);
return ($xp->type===XPATH_UNDEFINED) ? false : $xp;
}
function xpath_register_ns($prefix,$namespaceURI) {return $this->myDOMXPath->registerNamespace($prefix,$namespaceURI);}
}
if (extension_loaded('xsl'))
{//See also: http://alexandre.alapetite.net/doc-alex/xslt-php4-php5/
function domxml_xslt_stylesheet($xslstring) {return new php4DomXsltStylesheet(DOMDocument::loadXML($xslstring));}
function domxml_xslt_stylesheet_doc($dom_document) {return new php4DomXsltStylesheet($dom_document);}
function domxml_xslt_stylesheet_file($xslfile) {return new php4DomXsltStylesheet(DOMDocument::load($xslfile));}
class php4DomXsltStylesheet
{
private $myxsltProcessor;
function php4DomXsltStylesheet($dom_document)
{
$this->myxsltProcessor=new xsltProcessor();
$this->myxsltProcessor->importStyleSheet($dom_document);
}
function process($dom_document,$xslt_parameters=array(),$param_is_xpath=false)
{
foreach ($xslt_parameters as $param=>$value) $this->myxsltProcessor->setParameter('',$param,$value);
$myphp4DOMDocument=new php4DOMDocument();
$myphp4DOMDocument->myDOMNode=$this->myxsltProcessor->transformToDoc($dom_document->myDOMNode);
return $myphp4DOMDocument;
}
function result_dump_file($dom_document,$filename)
{
$html=$dom_document->myDOMNode->saveHTML();
file_put_contents($filename,$html);
return $html;
}
function result_dump_mem($dom_document) {return $dom_document->myDOMNode->saveHTML();}
}
}
?>
+78 -26
View File
@@ -1,27 +1,79 @@
<?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>).'
);
<?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>).'
);
?>
+81 -27
View File
@@ -1,28 +1,82 @@
<?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;!',
CAS_STR_LOGOUT
=> 'Déconnexion demandée&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.',
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>',
CAS_STR_SERVICE_UNAVAILABLE
=> 'Le service `<b>%s</b>\' est indisponible (<b>%s</b>)'
);
<?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;!',
CAS_STR_LOGOUT
=> 'Déconnexion demandée&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.',
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>',
CAS_STR_SERVICE_UNAVAILABLE
=> 'Le service `<b>%s</b>\' est indisponible (<b>%s</b>)'
);
?>
+78 -26
View File
@@ -1,27 +1,79 @@
<?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>).'
);
<?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>).'
);
?>
+78 -26
View File
@@ -1,27 +1,79 @@
<?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>).'
);
<?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>).'
);
?>
+26
View File
@@ -1,27 +1,53 @@
<?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>).'
);
?>
+69 -23
View File
@@ -1,24 +1,70 @@
<?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);
//@}
<?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);
//@}
?>
+8 -4
View File
@@ -1,4 +1,8 @@
CAS-module README
CAS-module README
+1126 -1258
View File
File diff suppressed because it is too large Load Diff
+24 -12
View File
@@ -1,12 +1,24 @@
<div class="loginbox clearfix">
<div class="loginpanel">
<div>
<a href="<?php echo $CFG->wwwroot.'/login/index.php?authCAS=CAS';?>"><?php print_string("accesCAS","auth");?></a>
</div>
<br/>
<div>
<a href="<?php echo $CFG->wwwroot.'/login/index.php?authCAS=NOCAS';?>"><?php print_string("accesNOCAS","auth");?></a>
</div>
</div>
</div>
<div class="loginbox clearfix">
<div class="loginpanel">
<div>
<a href="<?php echo $CFG->wwwroot.'/login/index.php?authCAS=CAS';?>"><?php print_string("accesCAS","auth");?></a>
</div>
<br/>
<div>
<a href="<?php echo $CFG->wwwroot.'/login/index.php?authCAS=NOCAS';?>"><?php print_string("accesNOCAS","auth");?></a>
</div>
</div>
</div>
+828 -434
View File
File diff suppressed because it is too large Load Diff
+17 -9
View File
@@ -1,9 +1,17 @@
<?PHP
// version $Id$
// List of CAS langages.
// You can add langages in /CAS/langage.
// Please send them to http://esup-phpcas.sourceforge.net
$CASLANGUAGES = array (
"english" => "English",
"french" => "French");
?>
<?PHP
// version $Id$
// List of CAS langages.
// You can add langages in /CAS/langage.
// Please send them to http://esup-phpcas.sourceforge.net
$CASLANGUAGES = array (
"english" => "English",
"french" => "French");
?>
+2
View File
@@ -173,6 +173,7 @@ class auth_plugin_db extends auth_plugin_base {
if ($rs = $authdb->Execute($sql)) {
if ( $rs->RecordCount() == 1 ) {
$fields_obj = rs_fetch_record($rs);
$fields_obj = (object)array_change_key_case((array)$fields_obj , CASE_LOWER);
foreach ($selectfields as $localname=>$externalname) {
$result[$localname] = $textlib->convert($fields_obj->{$localname}, $this->config->extencoding, 'utf-8');
}
@@ -429,6 +430,7 @@ class auth_plugin_db extends auth_plugin_base {
print_error('auth_dbcantconnect','auth');
} else if ( $rs->RecordCount() ) {
while ($rec = rs_fetch_next_record($rs)) {
$rec = (object)array_change_key_case((array)$rec , CASE_LOWER);
array_push($result, $rec->username);
}
}
+3 -3
View File
@@ -88,7 +88,7 @@ class auth_plugin_fc extends auth_plugin_base {
$userinfo = array();
$fpp = new fcFPP($this->config->host, $this->config->port);
$fpp = new fcFPP($this->config->host, $this->config->fppport);
if ($fpp->open()) {
if ($fpp->login($this->config->userid, $this->config->passwd)) {
$userinfo['firstname'] = $fpp->getUserInfo($username,"1202");
@@ -121,7 +121,7 @@ class auth_plugin_fc extends auth_plugin_base {
$fcgroups = array();
$fpp = new fcFPP($this->config->host, $this->config->port);
$fpp = new fcFPP($this->config->host, $this->config->fppport);
if ($fpp->open()) {
if ($fpp->login($this->config->userid, $this->config->passwd)) {
$fcgroups = $fpp->getGroups($username);
@@ -224,7 +224,7 @@ class auth_plugin_fc extends auth_plugin_base {
}
// save settings
set_config('host', $config->user, 'auth/fc');
set_config('host', $config->host, 'auth/fc');
set_config('fppport', $config->fppport, 'auth/fc');
set_config('userid', $config->userid, 'auth/fc');
set_config('passwd', $config->passwd, 'auth/fc');
+1 -1
View File
@@ -50,7 +50,7 @@ class fcFPP
$conn = fsockopen($host, $port, $errno, $errstr, 5);
if (!$conn)
{
print_error('auth_fcconnfail','auth', array($errno, $errstr));
print_error('auth_fcconnfail','auth', '', array($errno, $errstr));
return false;
}
+82 -24
View File
@@ -45,11 +45,36 @@ class auth_plugin_ldap extends auth_plugin_base {
$this->config->{$key} = $value[$this->config->user_type];
}
}
//hack prefix to objectclass
if (empty($this->config->objectclass)) { // Can't send empty filter
$this->config->objectclass='objectClass=*';
} else if (strpos($this->config->objectclass, 'objectClass=') !== 0) {
$this->config->objectclass = 'objectClass='.$this->config->objectclass;
// Hack prefix to objectclass
if (empty($this->config->objectclass)) {
// Can't send empty filter
$this->config->objectclass='(objectClass=*)';
} else if (stripos($this->config->objectclass, 'objectClass=') === 0) {
// Value is 'objectClass=some-string-here', so just add ()
// around the value (filter _must_ have them).
$this->config->objectclass = '('.$this->config->objectclass.')';
} else if (stripos($this->config->objectclass, '(') !== 0) {
// Value is 'some-string-not-starting-with-left-parentheses',
// which is assumed to be the objectClass matching value.
// So build a valid filter with it.
$this->config->objectclass = '(objectClass='.$this->config->objectclass.')';
} else {
// There is an additional possible value
// '(some-string-here)', that can be used to specify any
// valid filter string, to select subsets of users based
// on any criteria. For example, we could select the users
// whose objectClass is 'user' and have the
// 'enabledMoodleUser' attribute, with something like:
//
// (&(objectClass=user)(enabledMoodleUser=1))
//
// This is only used in the functions that deal with the
// whole potential set of users (currently sync_users()
// and get_user_list() only).
//
// In this particular case we don't need to do anything,
// so leave $this->config->objectclass as is.
}
}
@@ -97,7 +122,7 @@ class auth_plugin_ldap extends auth_plugin_base {
}
else {
@ldap_close($ldapconnection);
print_error('auth_ldap_noconnect','auth',$this->config->host_url);
print_error('auth_ldap_noconnect','auth','',$this->config->host_url);
}
return false;
}
@@ -273,7 +298,7 @@ class auth_plugin_ldap extends auth_plugin_base {
$newuser['userpassword'] = $extpassword;
break;
default:
print_error('auth_ldap_unsupportedusertype','auth',$this->config->user_type);
print_error('auth_ldap_unsupportedusertype','auth','',$this->config->user_type);
}
$uadd = ldap_add($ldapconnection, $this->config->user_attribute.'="'.$this->ldap_addslashes($userobject->username).','.$this->config->create_context.'"', $newuser);
ldap_close($ldapconnection);
@@ -303,7 +328,7 @@ class auth_plugin_ldap extends auth_plugin_base {
$ldapconnection = $this->ldap_connect();
$user_dn = $this->ldap_find_userdn($ldapconnection, $extusername);
$search_attribs = array($this->config->expireattr);
$sr = ldap_read($ldapconnection, $user_dn, 'objectclass=*', $search_attribs);
$sr = ldap_read($ldapconnection, $user_dn, '(objectClass=*)', $search_attribs);
if ($sr) {
$info = $this->ldap_get_entries($ldapconnection, $sr);
if (!empty ($info) and !empty($info[0][$this->config->expireattr][0])) {
@@ -400,7 +425,7 @@ class auth_plugin_ldap extends auth_plugin_base {
//// get user's list from ldap to sql in a scalable fashion
////
// prepare some data we'll need
$filter = "(&(".$this->config->user_attribute."=*)(".$this->config->objectclass."))";
$filter = '(&('.$this->config->user_attribute.'=*)'.$this->config->objectclass.')';
$contexts = explode(";",$this->config->contexts);
@@ -431,7 +456,8 @@ class auth_plugin_ldap extends auth_plugin_base {
do {
$value = ldap_get_values_len($ldapconnection, $entry, $this->config->user_attribute);
$value = $textlib->convert($value[0], $this->config->ldapencoding, 'utf-8');
array_push($fresult, $value);
// usernames are __always__ lowercase.
array_push($fresult, moodle_strtolower($value));
if (count($fresult) >= $bulk_insert_records) {
$this->ldap_bulk_insert($fresult, $temptable);
$fresult = array();
@@ -645,6 +671,9 @@ class auth_plugin_ldap extends auth_plugin_base {
$user->confirmed = 1;
$user->auth = 'ldap';
$user->mnethostid = $CFG->mnet_localhost_id;
// get_userinfo_asobj() might have replaced $user->username with the value
// from the LDAP server (which can be mixed-case). Make sure it's lowercase
$user->username = trim(moodle_strtolower($user->username));
if (empty($user->lang)) {
$user->lang = $CFG->lang;
}
@@ -694,7 +723,7 @@ class auth_plugin_ldap extends auth_plugin_base {
$user = get_record('user', 'username', $username, 'mnethostid', $CFG->mnet_localhost_id);
if (empty($user)) { // trouble
error_log("Cannot update non-existent user: ".stripslashes($username));
print_error('auth_dbusernotexist','auth',$username);
print_error('auth_dbusernotexist','auth','',$username);
die;
}
@@ -834,6 +863,21 @@ class auth_plugin_ldap extends auth_plugin_base {
return true; // just change auth and skip update
}
$attrmap = $this->ldap_attributes();
// Before doing anything else, make sure really need to update anything
// in the external LDAP server.
$update_external = false;
foreach ($attrmap as $key => $ldapkeys) {
if (!empty($this->config->{'field_updateremote_'.$key})) {
$update_external = true;
break;
}
}
if (!$update_external) {
return true;
}
$textlib = textlib_get_instance();
$extoldusername = $textlib->convert($olduser->username, 'utf-8', $this->config->ldapencoding);
@@ -841,7 +885,6 @@ class auth_plugin_ldap extends auth_plugin_base {
$search_attribs = array();
$attrmap = $this->ldap_attributes();
foreach ($attrmap as $key => $values) {
if (!is_array($values)) {
$values = array($values);
@@ -862,9 +905,16 @@ class auth_plugin_ldap extends auth_plugin_base {
$user_entry = $this->ldap_get_entries($ldapconnection, $user_info_result);
if (empty($user_entry)) {
$error = 'ldap: Could not find user while updating externally. '.
'Details follow: search base: \''.$user_dn.'\'; search filter: \''.
$this->config->objectclass.'\'; search attributes: ';
foreach ($search_attribs as $attrib) {
$error .= $attrib.' ';
}
error_log($error);
return false; // old user not found!
} else if (count($user_entry) > 1) {
trigger_error("ldap: Strange! More than one user record found in ldap. Only using the first one.");
error_log('ldap: Strange! More than one user record found in ldap. Only using the first one.');
return false;
}
$user_entry = $user_entry[0];
@@ -890,6 +940,7 @@ class auth_plugin_ldap extends auth_plugin_base {
}
$nuvalue = $textlib->convert($newuser->$key, 'utf-8', $this->config->ldapencoding);
empty($nuvalue) ? $nuvalue = array() : $nuvalue;
$ouvalue = $textlib->convert($olduser->$key, 'utf-8', $this->config->ldapencoding);
foreach ($ldapkeys as $ldapkey) {
@@ -1019,7 +1070,7 @@ class auth_plugin_ldap extends auth_plugin_base {
}
//Update password expiration time, grace logins count
$search_attribs = array($this->config->expireattr, 'passwordExpirationInterval','loginGraceLimit' );
$sr = ldap_read($ldapconnection, $user_dn, 'objectclass=*', $search_attribs);
$sr = ldap_read($ldapconnection, $user_dn, '(objectClass=*)', $search_attribs);
if ($sr) {
$info=$this->ldap_get_entries($ldapconnection, $sr);
$newattrs = array();
@@ -1156,7 +1207,7 @@ class auth_plugin_ldap extends auth_plugin_base {
'rfc2307' => 'shadowExpire',
'rfc2307bis' => 'shadowExpire',
'samba' => '', //No support yet
'ad' => '', //No support yet
'ad' => 'pwdLastSet',
'default' => ''
);
return $default;
@@ -1216,7 +1267,8 @@ class auth_plugin_ldap extends auth_plugin_base {
$sec=substr($time,12,2);
$result = mktime($hr,$min,$sec,$mo,$dt,$yr);
break;
case 'posix':
case 'rfc2307':
case 'rfc2307bis':
$result = $time * DAYSECS; //The shadowExpire contains the number of DAYS between 01/01/1970 and the actual expiration date
break;
case 'ad':
@@ -1239,7 +1291,8 @@ class auth_plugin_ldap extends auth_plugin_base {
case 'edir':
$result=date('YmdHis', $time).'Z';
break;
case 'posix':
case 'rfc2307':
case 'rfc2307bis':
$result = $time ; //Already in correct format
break;
default:
@@ -1338,6 +1391,11 @@ class auth_plugin_ldap extends auth_plugin_base {
ldap_set_option($connresult, LDAP_OPT_PROTOCOL_VERSION, $this->config->version);
}
// Fix MDL-10921
if ($this->config->user_type == 'ad') {
ldap_set_option($connresult, LDAP_OPT_REFERRALS, 0);
}
if (!empty($binddn)) {
//bind with search-user
//$debuginfo .= 'Using bind user'.$binddn.'and password:'.$bindpwd;
@@ -1360,7 +1418,7 @@ class auth_plugin_ldap extends auth_plugin_base {
}
//If any of servers are alive we have already returned connection
print_error('auth_ldap_noconnect_all','auth',$this->config->user_type);
print_error('auth_ldap_noconnect_all','auth', '', $debuginfo);
return false;
}
@@ -1451,7 +1509,7 @@ class auth_plugin_ldap extends auth_plugin_base {
$ldapconnection = $this->ldap_connect();
if ($filter=="*") {
$filter = "(&(".$this->config->user_attribute."=*)(".$this->config->objectclass."))";
$filter = '(&('.$this->config->user_attribute.'=*)'.$this->config->objectclass.')';
}
$contexts = explode(";",$this->config->contexts);
@@ -1643,7 +1701,7 @@ class auth_plugin_ldap extends auth_plugin_base {
if (!isset($config->forcechangepassword))
{$config->forcechangepassword = 0; }
if (!isset($config->stdchangepassword))
{$config->forcechangepassword = 0; }
{$config->stdchangepassword = 0; }
if (!isset($config->passtype))
{$config->passtype = 'plaintext'; }
if (!isset($config->changepasswordurl))
@@ -1664,7 +1722,7 @@ class auth_plugin_ldap extends auth_plugin_base {
set_config('bind_dn', $config->bind_dn, 'auth/ldap');
set_config('bind_pw', $config->bind_pw, 'auth/ldap');
set_config('version', $config->version, 'auth/ldap');
set_config('objectclass', $config->objectclass, 'auth/ldap');
set_config('objectclass', trim($config->objectclass), 'auth/ldap');
set_config('memberattribute', $config->memberattribute, 'auth/ldap');
set_config('memberattribute_isdn', $config->memberattribute_isdn, 'auth/ldap');
set_config('creators', $config->creators, 'auth/ldap');
@@ -1731,7 +1789,7 @@ class auth_plugin_ldap extends auth_plugin_base {
// If UF_DONT_EXPIRE_PASSWD flag is set in user's
// userAccountControl attribute, the password doesn't expire.
$sr = ldap_read($ldapconn, $user_dn, 'objectclass=*',
$sr = ldap_read($ldapconn, $user_dn, '(objectClass=*)',
array('userAccountControl'));
if (!$sr) {
error_log("ldap: error getting userAccountControl for $user_dn");
@@ -1777,7 +1835,7 @@ class auth_plugin_ldap extends auth_plugin_base {
// details below).
// ----------------------------------------------------------------
$sr = ldap_read($ldapconn, ROOTDSE, 'objectclass=*',
$sr = ldap_read($ldapconn, ROOTDSE, '(objectClass=*)',
array('defaultNamingContext'));
if (!$sr) {
error_log("ldap: error querying rootDSE for Active Directory");
@@ -1787,7 +1845,7 @@ class auth_plugin_ldap extends auth_plugin_base {
$info = $this->ldap_get_entries($ldapconn, $sr);
$domaindn = $info[0]['defaultNamingContext'][0];
$sr = ldap_read ($ldapconn, $domaindn, 'objectclass=*',
$sr = ldap_read ($ldapconn, $domaindn, '(objectClass=*)',
array('maxPwdAge'));
$info = $this->ldap_get_entries($ldapconn, $sr);
$maxpwdage = $info[0]['maxPwdAge'][0];
+84 -60
View File
@@ -1,4 +1,4 @@
<?php
<?php // $Id$
/**
* @author Martin Dougiamas
@@ -89,7 +89,7 @@ class auth_plugin_mnet extends auth_plugin_base {
}
// session okay, try getting the user
if (!$user = get_complete_user_data('id', $mnet_session->userid)) {
if (!$user = get_record('user', 'id', $mnet_session->userid)) {
echo mnet_server_fault(3, get_string('authfail_usermismatch', 'mnet'));
exit;
}
@@ -115,7 +115,7 @@ class auth_plugin_mnet extends auth_plugin_base {
$userdata['session.gc_maxlifetime'] = ini_get('session.gc_maxlifetime');
$userdata['picture'] = $user->picture;
if (!empty($user->picture)) {
$imagefile = "{$CFG->dataroot}/users/{$user->id}/f1.jpg";
$imagefile = make_user_directory($user->id, true) . "/f1.jpg";
if (file_exists($imagefile)) {
$userdata['imagehash'] = sha1(file_get_contents($imagefile));
}
@@ -244,7 +244,7 @@ class auth_plugin_mnet extends auth_plugin_base {
require_once $CFG->dirroot . '/mnet/xmlrpc/client.php';
// verify the remote host is configured locally before attempting RPC call
if (! $remotehost = get_record('mnet_host', 'wwwroot', $remotewwwroot)) {
if (! $remotehost = get_record('mnet_host', 'wwwroot', $remotewwwroot, 'deleted', 0)) {
error(get_string('notpermittedtoland', 'mnet'));
}
@@ -285,11 +285,11 @@ class auth_plugin_mnet extends auth_plugin_base {
$firsttime = false;
// get the local record for the remote user
$localuser = get_record('user', 'username', $remoteuser->username, 'mnethostid', $remotehost->id);
$localuser = get_record('user', 'username', addslashes($remoteuser->username), 'mnethostid', $remotehost->id);
// add the remote user to the database if necessary, and if allowed
// TODO: refactor into a separate function
if (! $localuser->id) {
if (empty($localuser) || ! $localuser->id) {
if (empty($this->config->auto_add_remote_users)) {
error(get_string('nolocaluser', 'mnet'));
}
@@ -319,7 +319,7 @@ class auth_plugin_mnet extends auth_plugin_base {
// TODO: fetch image if it has changed
if ($key == 'imagehash') {
$dirname = "{$CFG->dataroot}/users/{$localuser->id}";
$dirname = make_user_directory($localuser->id, true);
$filename = "$dirname/f1.jpg";
$localhash = '';
@@ -771,76 +771,76 @@ class auth_plugin_mnet extends auth_plugin_base {
join("\n", $mnet_request->error));
break;
}
$mnethostlogssql = '
SELECT
mhostlogs.remoteid, mhostlogs.time, mhostlogs.userid, mhostlogs.ip,
mhostlogs.course, mhostlogs.module, mhostlogs.cmid, mhostlogs.action,
mhostlogs.url, mhostlogs.info, mhostlogs.username, c.fullname as coursename,
c.modinfo
FROM
(
SELECT
l.id as remoteid, l.time, l.userid, l.ip, l.course, l.module, l.cmid,
l.action, l.url, l.info, u.username
FROM
' . $CFG->prefix . 'user u
INNER JOIN ' . $CFG->prefix . 'log l on l.userid = u.id
WHERE
u.mnethostid = ' . $mnethostid . '
AND l.id > ' . $mnet_request->response['last log id'] . '
ORDER BY remoteid ASC
LIMIT 500
) mhostlogs
INNER JOIN ' . $CFG->prefix . 'course c on c.id = mhostlogs.course
ORDER by mhostlogs.remoteid ASC';
$query = "SELECT
l.id as remoteid,
l.time,
l.userid,
l.ip,
l.course,
l.module,
l.cmid,
l.action,
l.url,
l.info,
c.fullname as coursename,
c.modinfo as modinfo,
u.username
FROM
{$CFG->prefix}user u,
{$CFG->prefix}log l,
{$CFG->prefix}course c
WHERE
l.userid = u.id AND
u.mnethostid = '$mnethostid' AND
l.id > '".$mnet_request->response['last log id']."' AND
c.id = l.course
ORDER BY
remoteid ASC";
$mnethostlogs = get_records_sql($mnethostlogssql);
$results = get_records_sql($query);
if ($mnethostlogs == false) {
continue;
}
if (false == $results) continue;
$processedlogs = array();
$param = array();
foreach($results as $result) {
if (!empty($result->modinfo) && !empty($result->cmid)) {
$modinfo = unserialize($result->modinfo);
unset($result->modinfo);
foreach($mnethostlogs as $hostlog) {
// Extract the name of the relevant module instance from the
// course modinfo if possible.
if (!empty($hostlog->modinfo) && !empty($hostlog->cmid)) {
$modinfo = unserialize($hostlog->modinfo);
unset($hostlog->modinfo);
$modulearray = array();
foreach($modinfo as $module) {
$modulearray[$module->cm] = urldecode($module->name);
}
$result->resource_name = $modulearray[$result->cmid];
$hostlog->resource_name = $modulearray[$hostlog->cmid];
} else {
$result->resource_name = '';
$hostlog->resource_name = '';
}
$param[] = array (
'remoteid' => $result->remoteid,
'time' => $result->time,
'userid' => $result->userid,
'ip' => $result->ip,
'course' => $result->course,
'coursename' => $result->coursename,
'module' => $result->module,
'cmid' => $result->cmid,
'action' => $result->action,
'url' => $result->url,
'info' => $result->info,
'resource_name' => $result->resource_name,
'username' => $result->username
$processedlogs[] = array (
'remoteid' => $hostlog->remoteid,
'time' => $hostlog->time,
'userid' => $hostlog->userid,
'ip' => $hostlog->ip,
'course' => $hostlog->course,
'coursename' => $hostlog->coursename,
'module' => $hostlog->module,
'cmid' => $hostlog->cmid,
'action' => $hostlog->action,
'url' => $hostlog->url,
'info' => $hostlog->info,
'resource_name' => $hostlog->resource_name,
'username' => $hostlog->username
);
}
unset($result);
unset($hostlog);
$mnet_request = new mnet_xmlrpc_client();
$mnet_request->set_method('auth/mnet/auth.php/refresh_log');
// set $token and $useragent parameters
$mnet_request->add_param($param);
$mnet_request->add_param($processedlogs);
if ($mnet_request->send($mnet_peer) === true) {
if ($mnet_request->response['code'] > 0) {
@@ -885,10 +885,12 @@ class auth_plugin_mnet extends auth_plugin_base {
unset($logEntryObj->username);
$logEntryObj = $this->trim_logline($logEntryObj);
$insertok = insert_record('mnet_log', addslashes_object($logEntryObj), false);
if ($insertok) {
$MNET_REMOTE_CLIENT->last_log_id = $logEntryObj->remoteid;
$MNET_REMOTE_CLIENT->updateparams->last_log_id = $logEntryObj->remoteid;
} else {
$returnString .= 'Record with id '.$logEntryObj->remoteid." failed to insert.\n";
}
@@ -1262,8 +1264,8 @@ class auth_plugin_mnet extends auth_plugin_base {
global $CFG;
if ($user = get_record('user', 'username', addslashes($username), 'mnethostid', $CFG->mnet_localhost_id)) {
$filename1 = "{$CFG->dataroot}/users/{$user->id}/f1.jpg";
$filename2 = "{$CFG->dataroot}/users/{$user->id}/f2.jpg";
$filename1 = make_user_directory($user->id, true) . "/f1.jpg";
$filename2 = make_user_directory($user->id, true) . "/f2.jpg";
$return = array();
if (file_exists($filename1)) {
$return['f1'] = base64_encode(file_get_contents($filename1));
@@ -1311,9 +1313,12 @@ class auth_plugin_mnet extends auth_plugin_base {
svc.apiversion,
h2s.id as h2s_id
FROM
{$CFG->prefix}mnet_host h,
{$CFG->prefix}mnet_service svc,
{$CFG->prefix}mnet_host2service h2s
WHERE
h.deleted = '0' AND
h.id = h2s.hostid AND
h2s.hostid = '$mnethostid' AND
h2s.serviceid = svc.id AND
svc.name = '$servicename' AND
@@ -1348,6 +1353,25 @@ class auth_plugin_mnet extends auth_plugin_base {
}
}
/**
* Trims a log line from mnet peer to limit each part to a length which can be stored in our DB
*
* @param object $logline The log information to be trimmed
* @return object The passed logline object trimmed to not exceed storable limits
*/
function trim_logline ($logline) {
$limits = array('ip' => 15, 'coursename' => 40, 'module' => 20, 'action' => 40,
'url' => 255);
foreach ($limits as $property => $limit) {
if (isset($logline->$property)) {
$logline->$property = substr($logline->$property, 0, $limit);
}
}
return $logline;
}
}
?>
+1 -1
View File
@@ -68,7 +68,7 @@ class auth_plugin_pam extends auth_plugin_base {
// call_time_pass_reference of errormessage is deprecated - throws warnings in multiauth
//if (pam_auth($username, $password, &$errormessage)) {
if (pam_auth(stripslashes($username), strislashes($password))) {
if (pam_auth(stripslashes($username), stripslashes($password))) {
return true;
}
else {
+35
View File
@@ -16,6 +16,8 @@ Changes:
Added instructions for IIS
- 11. 2006: User capabilities are now loaded properly as of Moodle 1.7+
- 03. 2007: Adapted authentication method to Moodle 1.8
- 10. 2007: Removed the requirement for email address, surname and given name
attributes on request of Markus Hagman
Moodle Configuration with Dual login
-------------------------------------------------------------------------------
@@ -168,6 +170,39 @@ Example file:
?>
--
How to upgrade your Service Provider to 2.x
-------------------------------------------------------------------------------
In case your upgrade your Service Provider 1.3.x to 2.x, be aware of the fact
that in version 2.0 the default behaviour regarding attribute propagation
changed.
While the Service Provider 1.3.x published the Shibboleth attributes to the
web server environment as HTTP Request headers, the Service Provider 2.x
publishes attributes as environment variables, which increases the security for
some platforms.
However, this change has the effect that the attribute names change.
E.g. while the surname attribute was published as 'HTTP_SHIB_PERSON_SURNAME'
with 1.3.x, this attribute will be available in $_SERVER['Shib-Person-surname']
or depending on your /etc/shibboleth/attribute-map.xml file just as
$_SERVER['sn'].
Because Moodle needs to know what Shibboleth attributes it shall map onto which
Moodle user profile field, one has to make sure the mapping is updated as well
after the Service Provider upgrade.
********************************************************************************
Because you risk locking yourself out of Moodle it is strongly
recommended to use the following approach when upgrading the Service Provider:
1. Enable manual authentication before the upgrade.
2. Make sure that you have at least one manual account with administration
privileges working before upgrading your Service Provider to 2.x.
3. After the SP upgrade, use this account to log into Moodle and adapt the
attribute mapping in 'Site Administration -> Users -> Shibboleth' to reflect
the changed attribute names.
4. Test the login with a Shibboleth account
5. If all is working, disable manual authentication again
********************************************************************************
--------------------------------------------------------------------------------
In case of problems and questions with Shibboleth authentication, contact
Lukas Haemmerle <haemmerle@switch.ch> or Markus Hagman <hagman@hytti.uku.fi>
+16 -9
View File
@@ -18,6 +18,7 @@
* 2006-08-28 File created, code imported from lib.php
* 2006-10-27 Upstream 1.7 changes merged in, added above credits from lib.php :-)
* 2007-03-09 Fixed authentication but may need some other changes
* 2007-10-03 Removed requirement for email address, surname and given name on request of Markus Hagman
*/
if (!defined('MOODLE_INTERNAL')) {
@@ -51,7 +52,7 @@ class auth_plugin_shibboleth extends auth_plugin_base {
// If we are in the shibboleth directory then we trust the server var
if (!empty($_SERVER[$this->config->user_attribute])) {
return ($_SERVER[$this->config->user_attribute] == $username);
return (strtolower($_SERVER[$this->config->user_attribute]) == strtolower($username));
} else {
// If we are not, the user has used the manual login and the login name is
// unknown, so we return false.
@@ -72,12 +73,7 @@ class auth_plugin_shibboleth extends auth_plugin_base {
global $CFG;
// Check whether we have got all the essential attributes
if (
empty($_SERVER[$this->config->user_attribute])
|| empty($_SERVER[$this->config->field_map_firstname])
|| empty($_SERVER[$this->config->field_map_lastname])
|| empty($_SERVER[$this->config->field_map_email])
) {
if ( empty($_SERVER[$this->config->user_attribute]) ) {
error(get_string( 'shib_not_all_attributes_error', 'auth' , "'".$this->config->user_attribute."' ('".$_SERVER[$this->config->user_attribute]."'), '".$this->config->field_map_firstname."' ('".$_SERVER[$this->config->field_map_firstname]."'), '".$this->config->field_map_lastname."' ('".$_SERVER[$this->config->field_map_lastname]."') and '".$this->config->field_map_email."' ('".$_SERVER[$this->config->field_map_email]."')"));
}
@@ -87,7 +83,18 @@ class auth_plugin_shibboleth extends auth_plugin_base {
$search_attribs = array();
foreach ($attrmap as $key=>$value) {
$result[$key] = $this->get_first_string($_SERVER[$value]);
// Check if attribute is present
if (!isset($_SERVER[$value])){
$result[$key] = '';
continue;
}
// Make usename lowercase
if ($key == 'username'){
$result[$key] = strtolower($this->get_first_string($_SERVER[$value]));
} else {
$result[$key] = $this->get_first_string($_SERVER[$value]);
}
}
// Provide an API to modify the information to fit the Moodle internal
@@ -118,7 +125,7 @@ class auth_plugin_shibboleth extends auth_plugin_base {
$moodleattributes = array();
foreach ($fields as $field) {
if ($configarray["field_map_$field"]) {
if (isset($configarray["field_map_$field"])) {
$moodleattributes[$field] = $configarray["field_map_$field"];
}
}
+2 -2
View File
@@ -26,7 +26,7 @@
/// If we can find the Shibboleth attribute, save it in session and return to main login page
if (!empty($_SERVER[$pluginconfig->user_attribute])) { // Shibboleth auto-login
$frm->username = $_SERVER[$pluginconfig->user_attribute];
$frm->username = strtolower($_SERVER[$pluginconfig->user_attribute]);
$frm->password = substr(base64_encode($_SERVER[$pluginconfig->user_attribute]),0,8);
// The random password consists of the first 8 letters of the base 64 encoded user ID
// This password is never used unless the user account is converted to manual
@@ -86,7 +86,7 @@
// If we can find any (user independent) Shibboleth attributes but no user
// attributes we probably didn't receive any user attributes
elseif (!empty($_SERVER['HTTP_SHIB_APPLICATION_ID'])) {
elseif (!empty($_SERVER['HTTP_SHIB_APPLICATION_ID']) || !empty($_SERVER['Shib-Application-ID'])) {
error(get_string( 'shib_no_attributes_error', 'auth' , '\''.$pluginconfig->user_attribute.'\', \''.$pluginconfig->field_map_firstname.'\', \''.$pluginconfig->field_map_lastname.'\' and \''.$pluginconfig->field_map_email.'\''));
} else {
error(get_string( 'shib_not_set_up_error', 'auth'));
+2 -1
View File
@@ -14,13 +14,14 @@
$cancel = optional_param( 'cancel' );
$launch = optional_param( 'launch' );
require_login();
if (!empty($id)) {
require_login($id);
if (!has_capability('moodle/site:backup', get_context_instance(CONTEXT_COURSE, $id))) {
error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php");
}
} else {
require_login();
if (!has_capability('moodle/site:backup', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/index.php");
}
+34 -7
View File
@@ -58,29 +58,56 @@
}
//Here we check if backup_users = None. Then, we switch off every module
//user info, user_files, logs and exercises, workshop and messages backups. A Warning is showed to
//inform the user.
// TODO: Move this logic to one function to be shared by any (manual, scheduled) backup
if ($backupprefs->backup_users == 2) {
if ($allmods = get_records("modules") ) {
if ($allmods = get_records('modules') ) {
foreach ($allmods as $mod) {
/// Reset global user_info settings to "no" (0)
$modname = $mod->name;
$var = "backup_user_info_".$modname;
$var = 'backup_user_info_'.$modname;
if (isset($backupprefs->$var)) {
$backupprefs->$var = 0;
}
$var = "backup_".$modname;
if (isset($backupprefs->$var)) {
if ($modname == "exercise" || $modname == "workshop") {
/// Reset each instance userinfo settings to "no" (0)
if (isset($backupprefs->mods[$modname])) {
/// Set the module userinfo to no (0)
$backupprefs->mods[$modname]->userinfo = 0;
/// Set the instances to no (o)
foreach ($backupprefs->mods[$modname]->instances as $key => $instance) {
$backupprefs->mods[$modname]->instances[$key]->userinfo = 0;
$var = 'backup_user_info_' . $modname . '_instance_' . $key;
$backupprefs->$var = 0;
}
}
/// If modules are workshop or exercise, disable their backup completely
if ($modname == 'exercise' || $modname == 'workshop') {
$var = 'backup_'.$modname;
if (isset($backupprefs->$var)) {
$backupprefs->$var = 0;
/// Reset each instance backup settings to "no" (0)
if (isset($backupprefs->mods[$modname])) {
/// Set the module backup to no (0)
$backupprefs->mods[$modname]->backup = 0;
$var = 'backup_' . $modname . '_instances';
$backupprefs->$var = 0;
/// Set the instances backup to no (o)
foreach ($backupprefs->mods[$modname]->instances as $key => $instance) {
$backupprefs->mods[$modname]->instances[$key]->backup = 0;
$var = 'backup_' . $modname . '_instance_' . $key;
$backupprefs->$var = 0;
}
}
}
}
}
}
$backupprefs->backup_user_files = 0;
$backupprefs->backup_logs = 0;
$backupprefs->backup_messages = 0;
}
print_simple_box("<font color=\"red\">".get_string("backupnoneusersinfo")."</font>","center", "70%", '', "20", "noticebox");
echo "<hr />";
}
+14 -8
View File
@@ -115,6 +115,8 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
<form id="form1" method="post" action="backup.php">
<table cellpadding="5" style="margin-left:auto;margin-right:auto;">
<?php
/// Acummulator for hidden options and proper XHTML output
$hidden_options = '';
//Now, check modules and info and show posibilities
if ($allmods = get_records("modules") ) {
//Print option to select/deselect everything with 1 click.
@@ -189,8 +191,8 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
}
//Line
echo "<tr><td colspan=\"4\"><hr /></td></tr>\n";
if (empty($to)) {
if (empty($to) && !empty($course->metacourse)) {
//Now print the Metacourse tr
echo "<tr>";
echo "<td align=\"right\" colspan=\"2\"><b>";
@@ -202,7 +204,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
echo "</td></tr>";
}
else {
echo '<input type="hidden" name="backup_metacourse" value="0" />';
$hidden_options .= '<input type="hidden" name="backup_metacourse" value="0" />';
}
if (empty($to)) {
@@ -218,7 +220,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
echo "</td></tr>";
}
else {
echo '<input type="hidden" name="backup_users" value="0" />';
$hidden_options .= '<input type="hidden" name="backup_users" value="0" />';
}
if (empty($to)) {
@@ -233,7 +235,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
echo "</td></tr>";
}
else {
echo '<input type="hidden" name="backup_logs" value="0" />';
$hidden_options .= '<input type="hidden" name="backup_logs" value="0" />';
}
if (empty($to)) {
@@ -248,7 +250,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
echo "</td></tr>";
}
else {
echo '<input type="hidden" name="backup_user_files" value="0" />';
$hidden_options .= '<input type="hidden" name="backup_user_files" value="0" />';
}
//Now print the Course Files tr
echo "<tr>";
@@ -272,7 +274,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
echo "</td></tr>";
}
else {
echo '<input type="hidden" name="backup_messages" value="0" />';
$hidden_options .= '<input type="hidden" name="backup_messages" value="0" />';
}
}
@@ -318,6 +320,10 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
//the temp-directory name and records in backup temp tables
?>
</table>
<?php
/// Print captured hidden options, now that we have closed the table
echo $hidden_options;
?>
<div style="text-align:center;margin-left:auto;margin-right:auto">
<input type="hidden" name="id" value="<?php p($id) ?>" />
@@ -328,4 +334,4 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
<input type="submit" value="<?php print_string("continue") ?>" />
<input type="submit" name="cancel" value="<?php print_string("cancel") ?>" />
</div>
</form>
</form>
+33 -13
View File
@@ -177,7 +177,7 @@ function schedule_backup_cron() {
//Reference
if ($count_error != 0 || $count_unfinished != 0) {
$message .= " ".get_string('backupfailed')."\n\n";
$dest_url = $CFG->wwwroot.'/backup/log.php';
$dest_url = "$CFG->wwwroot/$CFG->admin/report/backups/index.php";
$message .= " ".get_string('backuptakealook','',$dest_url)."\n\n";
//Set message priority
$admin->priority = 1;
@@ -192,7 +192,7 @@ function schedule_backup_cron() {
$prefix = $site->shortname.": ";
if ($count_error != 0 || $count_unfinished != 0) {
$prefix .= "[".strtoupper(get_string('error'))."] ";
}
}
$subject = $prefix.get_string("scheduledbackupstatus");
//Send the message
@@ -387,7 +387,7 @@ function schedule_backup_course_configure($course,$starttime = 0) {
}
//Now stores all the mods preferences into an array into preferences
$preferences->mods[$modname]->backup = $$var;
//Check include user info
$var = "backup_user_info_".$modname;
if (!isset($$var)) {
@@ -401,6 +401,7 @@ function schedule_backup_course_configure($course,$starttime = 0) {
}
}
}
// now set instances
if ($coursemods = get_course_mods($course->id)) {
foreach ($coursemods as $mod) {
@@ -415,8 +416,15 @@ function schedule_backup_course_configure($course,$starttime = 0) {
}
}
}
// finally, clean all the $preferences->mods[] not having instances. Nothing to backup about them
foreach ($preferences->mods as $modname => $mod) {
if (!isset($mod->instances)) {
unset($preferences->mods[$modname]);
}
}
}
//Convert other parameters
if ($status) {
$preferences->backup_metacourse = $backup_config->backup_sche_metacourse;
@@ -429,7 +437,7 @@ function schedule_backup_course_configure($course,$starttime = 0) {
$preferences->backup_destination = $backup_config->backup_sche_destination;
$preferences->backup_keep = $backup_config->backup_sche_keep;
}
//Calculate the backup string
if ($status) {
schedule_backup_log($starttime,$course->id," calculating backup name");
@@ -474,7 +482,7 @@ function schedule_backup_course_configure($course,$starttime = 0) {
$keep_name .= moodle_strtolower($backup_shortname)."-";
//And finally, clean everything
$keep_name = clean_filename($keep_name);
$preferences->backup_name = $backup_name;
$preferences->keep_name = $keep_name;
}
@@ -643,10 +651,10 @@ function schedule_backup_course_execute($preferences,$starttime = 0) {
schedule_backup_log($starttime,$preferences->backup_course," categories & questions");
$status = backup_question_categories($backup_file,$preferences);
}
//Print logs if selected
if ($status) {
if ($preferences->backup_logs) {
if ($preferences->backup_logs) {
schedule_backup_log($starttime,$preferences->backup_course," logs");
$status = backup_log_info($backup_file,$preferences);
}
@@ -657,7 +665,13 @@ function schedule_backup_course_execute($preferences,$starttime = 0) {
schedule_backup_log($starttime,$preferences->backup_course," scales");
$status = backup_scales_info($backup_file,$preferences);
}
//Print groupings info
if ($status) {
schedule_backup_log($starttime,$preferences->backup_course," groupings");
$status = backup_groupings_info($backup_file,$preferences);
}
//Print groups info
if ($status) {
schedule_backup_log($starttime,$preferences->backup_course," groups");
@@ -682,9 +696,9 @@ function schedule_backup_course_execute($preferences,$starttime = 0) {
$mods_to_backup = false;
//Check if we have any mod to backup
foreach ($preferences->mods as $module) {
if ($module->backup) {
if ($module->backup) {
$mods_to_backup = true;
}
}
}
//If we have to backup some module
if ($mods_to_backup) {
@@ -703,7 +717,13 @@ function schedule_backup_course_execute($preferences,$starttime = 0) {
}
}
//Prints course end
//Backup course format data, if any.
if ($status) {
schedule_backup_log($starttime,$preferences->backup_course," course format data");
$status = backup_format_data($backup_file,$preferences);
}
//Prints course end
if ($status) {
$status = backup_course_end($backup_file,$preferences);
}
@@ -713,7 +733,7 @@ function schedule_backup_course_execute($preferences,$starttime = 0) {
backup_close_xml($backup_file);
}
}
//Now, if selected, copy user files
if ($status) {
if ($preferences->backup_user_files) {
+140 -188
View File
@@ -2,82 +2,78 @@
//This file contains all the function needed in the backup utility
//except the mod-related funtions that are into every backuplib.php inside
//every mod directory
//Calculate the number of users to backup and put their ids in backup_ids
//Return an array of info (name,value)
function user_check_backup($course,$backup_unique_code,$backup_users,$backup_messages) {
//$backup_users=0-->all
// 1-->course (needed + enrolled)
// 2-->none
global $CFG;
global $db;
/**
* This function calculates the users to be added to backup based in the
* settings defined at backup. All the resulting user ids are sent to
* backup_ids for later usage.
* @param int $courseid id of the course to backup
* @param int $backup_unique_code unique code of the backup being executed
* @param int $backup_unique_code setting specifying what users to export (0=all, 1=needed, 2=none)
* @param int $backup_messages flag (true/false) defining if messages must be
* considered to extract needed users
* @return array one array (key, value) sumarizing the result of the function (number of users)
*/
function user_check_backup($courseid,$backup_unique_code,$backup_users,$backup_messages) {
$context = get_context_instance(CONTEXT_COURSE, $course);
$context = get_context_instance(CONTEXT_COURSE, $courseid);
$count_users = 0;
$backupable_users = array();
//If we've selected none, simply return 0
if ($backup_users == 0 or $backup_users == 1) {
//Calculate needed users (calling every xxxx_get_participants function + scales users)
$needed_users = backup_get_needed_users($course, $backup_messages);
if ($backup_users == 0) { /// All users
$backupable_users = backup_get_all_users();
//Calculate enrolled users (students + teachers)
$enrolled_users = backup_get_enrolled_users($course);
} else if ($backup_users == 1) { /// Needed users
//Calculate all users (every record in users table)
$all_users = backup_get_all_users();
/// Calculate needed users (calling every xxxx_get_participants function + scales users)
$needed_users = backup_get_needed_users($courseid, $backup_messages);
//Calculate course users (needed + enrolled)
//First, needed
$course_users = $needed_users;
//Now, enrolled
/// Calculate enrolled users (having course:view cap)
$enrolled_users = backup_get_enrolled_users($courseid);
/// Calculate backupable users (needed + enrolled)
/// First, needed
$backupable_users = $needed_users;
/// Now, enrolled
if ($enrolled_users) {
foreach ($enrolled_users as $enrolled_user) {
$course_users[$enrolled_user->id]->id = $enrolled_user->id;
$backupable_users[$enrolled_user->id]->id = $enrolled_user->id;
}
}
//Now, depending of parameters, create $backupable_users
if ($backup_users == 0) {
$backupable_users = $all_users;
} else {
$backupable_users = $course_users;
}
//If we have backupable users
if ($backupable_users) {
//Iterate over users putting their roles
foreach ($backupable_users as $backupable_user) {
$backupable_user->info = "";
//Is needed user (exists in needed_users)
if (isset($needed_users[$backupable_user->id])) {
$backupable_user->info .= "needed";
} else if (isset($course_users[$backupable_user->id])) {
$backupable_user->info .= "needed";
} // Yu: also needed because they can view course
// might need another variable
//Now create the backup_id record
$backupids_rec->backup_code = $backup_unique_code;
$backupids_rec->table_name = "user";
$backupids_rec->old_id = $backupable_user->id;
$backupids_rec->info = $backupable_user->info;
//Insert the record id. backup_users decide it.
//When all users
$status = insert_record('backup_ids', $backupids_rec, false);
$count_users++;
}
//Do some output
backup_flush(30);
}
}
//Prepare Info
//Gets the user data
/// If we have backupable users
if ($backupable_users) {
/// Iterate over users putting their roles
foreach ($backupable_users as $backupable_user) {
$backupable_user->info = "";
/// Is needed user or enrolled user, mark it as needed
if (isset($needed_users[$backupable_user->id]) || isset($enrolled_users[$backupable_user->id])) {
$backupable_user->info .= "needed";
} /// Yu: also needed because they can view course
/// might need another variable
/// Now create the backup_id record
$backupids_rec->backup_code = $backup_unique_code;
$backupids_rec->table_name = "user";
$backupids_rec->old_id = $backupable_user->id;
$backupids_rec->info = $backupable_user->info;
/// TODO: Change this call inserting to a standard backup_putid() call
/// And read data acordingly with backup_getid() when needed.
/// TODO: Also analyse it the "needed" info is really needed for anything. Drop if not.
/// Insert the user to the backup_ids table. backup_user_info() will use that info
$status = insert_record('backup_ids', $backupids_rec, false);
$count_users++;
}
/// Do some output
backup_flush(30);
}
/// Prepare Info
/// Gets the user data
$info[0][0] = get_string("users");
$info[0][1] = $count_users;
@@ -313,7 +309,7 @@
global $CFG;
$status = check_dir_exists($CFG->dataroot."/temp/backup/".$backup_unique_code."/user_files",true);
$status = check_dir_exists($CFG->dataroot."/temp/backup/".$backup_unique_code."/user_files",true);
return $status;
}
@@ -634,7 +630,6 @@
fwrite ($bf,full_tag("STUDENTS",3,false,$course->students));
fwrite ($bf,full_tag("GUEST",3,false,$course->guest));
fwrite ($bf,full_tag("STARTDATE",3,false,$course->startdate));
fwrite ($bf,full_tag("ENROLPERIOD",3,false,$course->enrolperiod));
fwrite ($bf,full_tag("NUMSECTIONS",3,false,$course->numsections));
//fwrite ($bf,full_tag("SHOWRECENT",3,false,$course->showrecent)); INFO: This is out in 1.3
fwrite ($bf,full_tag("MAXBYTES",3,false,$course->maxbytes));
@@ -657,11 +652,18 @@
} else {
$status = fwrite ($bf,full_tag("METACOURSE",3,false,$course->metacourse));
}
fwrite ($bf,full_tag("EXPIRENOTIFY",3,false,$course->expirynotify));
fwrite ($bf,full_tag("NOTIFYSTUDENTS",3,false,$course->notifystudents));
fwrite ($bf,full_tag("EXPIRYTHRESHOLD",3,false,$course->expirythreshold));
fwrite ($bf,full_tag("ENROLLABLE",3,false,$course->enrollable));
fwrite ($bf,full_tag("ENROLSTARTDATE",3,false,$course->enrolstartdate));
fwrite ($bf,full_tag("ENROLENDDATE",3,false,$course->enrolenddate));
fwrite ($bf,full_tag("ENROLPERIOD",3,false,$course->enrolperiod));
/// write local course overrides here?
write_role_overrides_xml($bf, $context, 3);
/// write role_assign code here
write_role_assignments_xml($bf, $context, 3);
write_role_assignments_xml($bf, $preferences, $context, 3);
//Print header end
fwrite ($bf,end_tag("HEADER",2,true));
} else {
@@ -912,7 +914,7 @@
$context = get_context_instance(CONTEXT_BLOCK, $instance->id);
write_role_overrides_xml($bf, $context, 4);
/// write role_assign code here
write_role_assignments_xml($bf, $context, 4);
write_role_assignments_xml($bf, $preferences, $context, 4);
//End Block
fwrite ($bf,end_tag('BLOCK',3,true));
}
@@ -1048,9 +1050,9 @@
// get all the role_capabilities overrides in this mod
write_role_overrides_xml($bf, $context, 6);
/// write role_assign code here
write_role_assignments_xml($bf, $context, 6);
write_role_assignments_xml($bf, $preferences, $context, 6);
/// write role_assign code here
fwrite ($bf,end_tag("MOD",5,true));
}
//check for next
@@ -1145,26 +1147,10 @@
/// write assign/override code for context_userid
$user->isneeded = strpos($user->info,"needed");
//Output every user role (with its associated info)
/*
$user->isadmin = strpos($user->info,"admin");
$user->iscoursecreator = strpos($user->info,"coursecreator");
$user->isteacher = strpos($user->info,"teacher");
$user->isstudent = strpos($user->info,"student");
if ($user->isadmin!==false or
$user->iscoursecreator!==false or
$user->isteacher!==false or
$user->isstudent!==false or
$user->isneeded!==false) {
*/
fwrite ($bf,start_tag("ROLES",4,true));
if ($user->info != "needed" && $user->info!="") {
//Begin ROLES tag
//PRINT ROLE INFO
//Admins
$roles = explode(",", $user->info);
foreach ($roles as $role) {
if ($role!="" && $role!="needed") {
@@ -1172,66 +1158,10 @@
//Print Role info
fwrite ($bf,full_tag("TYPE",6,false,$role));
//Print ROLE end
fwrite ($bf,end_tag("ROLE",5,true));
}
fwrite ($bf,end_tag("ROLE",5,true));
}
}
}
/*
if ($user->isadmin!==false) {
//Print ROLE start
fwrite ($bf,start_tag("ROLE",5,true));
//Print Role info
fwrite ($bf,full_tag("TYPE",6,false,"admin"));
//Print ROLE end
fwrite ($bf,end_tag("ROLE",5,true));
}
//CourseCreator
if ($user->iscoursecreator!==false) {
//Print ROLE start
fwrite ($bf,start_tag("ROLE",5,true));
//Print Role info
fwrite ($bf,full_tag("TYPE",6,false,"coursecreator"));
//Print ROLE end
fwrite ($bf,end_tag("ROLE",5,true));
}
//Teacher
if ($user->isteacher!==false) {
//Print ROLE start
fwrite ($bf,start_tag("ROLE",5,true));
//Print Role info
fwrite ($bf,full_tag("TYPE",6,false,"teacher"));
//Get specific info for teachers
$tea = get_record("user_teachers","userid",$user->old_id,"course",$preferences->backup_course);
fwrite ($bf,full_tag("AUTHORITY",6,false,$tea->authority));
fwrite ($bf,full_tag("TEA_ROLE",6,false,$tea->role));
fwrite ($bf,full_tag("EDITALL",6,false,$tea->editall));
fwrite ($bf,full_tag("TIMESTART",6,false,$tea->timestart));
fwrite ($bf,full_tag("TIMEEND",6,false,$tea->timeend));
fwrite ($bf,full_tag("TIMEMODIFIED",6,false,$tea->timemodified));
fwrite ($bf,full_tag("TIMEACCESS",6,false,$tea->timeaccess));
fwrite ($bf,full_tag("ENROL",6,false,$tea->enrol));
//Print ROLE end
fwrite ($bf,end_tag("ROLE",5,true));
}
//Student
if ($user->isstudent!==false) {
//Print ROLE start
fwrite ($bf,start_tag("ROLE",5,true));
//Print Role info
fwrite ($bf,full_tag("TYPE",6,false,"student"));
//Get specific info for students
$stu = get_record("user_students","userid",$user->old_id,"course",$preferences->backup_course);
fwrite ($bf,full_tag("TIMESTART",6,false,$stu->timestart));
fwrite ($bf,full_tag("TIMEEND",6,false,$stu->timeend));
fwrite ($bf,full_tag("TIME",6,false,$stu->time));
fwrite ($bf,full_tag("TIMEACCESS",6,false,$stu->timeaccess));
fwrite ($bf,full_tag("ENROL",6,false,$stu->enrol));
//Print ROLE end
fwrite ($bf,end_tag("ROLE",5,true));
}*/
//Needed
if ($user->isneeded!==false) {
//Print ROLE start
@@ -1264,7 +1194,7 @@
write_role_overrides_xml($bf, $context, 4);
/// write role_assign code here
write_role_assignments_xml($bf, $context, 4);
write_role_assignments_xml($bf, $preferences, $context, 4);
//End User tag
fwrite ($bf,end_tag("USER",3,true));
//Do some output
@@ -1692,9 +1622,15 @@
$status = true;
//Get groups_members
$groups_members = groups_get_member_records($groupid);
//Get groups_members that are being included in backup
$groups_members = get_records_sql("SELECT gm.*
FROM {$CFG->prefix}groups_members gm,
{$CFG->prefix}backup_ids bi
WHERE gm.groupid = $groupid
AND bi.backup_code = $preferences->backup_unique_code
AND bi.table_name = 'user'
AND bi.old_id = gm.userid");
//Pring groups_members header
if ($groups_members) {
//Pring groups_members header
@@ -1843,6 +1779,16 @@
global $CFG,$preferences;
/// MDL-14072: Prevent NULLs, empties and numbers to be processed by the
/// heavy interlinking. Just a few cpu cycles saved.
if ($content === NULL) {
return NULL;
} else if ($content === '') {
return '';
} else if (is_numeric($content)) {
return $content;
}
//Use one static variable to cache all the require_once calls that,
//under PHP5 seems to increase load too much, and we are requiring
//them here thousands of times (one per content). MDL-8700.
@@ -1905,26 +1851,29 @@
//in temp/backup/$backup_code dir
$status = check_and_create_user_files_dir($preferences->backup_unique_code);
//Now iterate over directories under "users" to check if that user must be
//copied to backup
//Now iterate over directories under "user" to check if that user must be copied to backup
// Method to get a list of userid=>array(basedir => $basedir, userfolder => $userfolder)
$userlist = get_user_directories();
$rootdir = $CFG->dataroot."/users";
//Check if directory exists
if (is_dir($rootdir)) {
$list = list_directories ($rootdir);
if ($list) {
//Iterate
foreach ($list as $dir) {
//Look for dir like username in backup_ids
$data = get_record ("backup_ids","backup_code",$preferences->backup_unique_code,
"table_name","user",
"old_id",$dir);
//If exists, copy it
if ($data) {
$status = backup_copy_file($rootdir."/".$dir,
$CFG->dataroot."/temp/backup/".$preferences->backup_unique_code."/user_files/".$dir);
}
foreach ($userlist as $userid => $userinfo) {
//Look for dir like username in backup_ids
$data = count_records("backup_ids","backup_code",$preferences->backup_unique_code, "table_name","user", "old_id",$userid);
//If exists, copy it
if ($data) {
$parts = explode('/', $userinfo['userfolder']);
$status = true;
if (is_array($parts)) {
$group = $parts[0];
$userid = $parts[1];
// Create group dir first
$status = check_dir_exists("$CFG->dataroot/temp/backup/$preferences->backup_unique_code/user_files/". $group, true);
}
$status = $status && backup_copy_file($userinfo['basedir'] . '/' . $userinfo['userfolder'],
"$CFG->dataroot/temp/backup/$preferences->backup_unique_code/user_files/{$userinfo['userfolder']}");
}
}
@@ -2294,40 +2243,43 @@
}
fwrite ($bf, end_tag("ROLES_OVERRIDES", $startlevel, true));
}
/* function to print xml for assignment */
function write_role_assignments_xml($bf, $context, $startlevel) {
function write_role_assignments_xml($bf, $preferences, $context, $startlevel) {
/// write role_assign code here
fwrite ($bf, start_tag("ROLES_ASSIGNMENTS", $startlevel, true));
if ($roles = get_roles_with_assignment_on_context($context)) {
foreach ($roles as $role) {
foreach ($roles as $role) {
fwrite ($bf, start_tag("ROLE", $startlevel+1, true));
fwrite ($bf, full_tag("ID", $startlevel+2, false, $role->id));
fwrite ($bf, full_tag("NAME", $startlevel+2, false, $role->name));
fwrite ($bf, full_tag("SHORTNAME", $startlevel+2, false, $role->shortname));
fwrite ($bf, full_tag("SHORTNAME", $startlevel+2, false, $role->shortname));
fwrite ($bf, start_tag("ASSIGNMENTS", $startlevel+2, true));
if ($assignments = get_users_from_role_on_context($role, $context)) {
foreach ($assignments as $assignment) {
fwrite ($bf, start_tag("ASSIGNMENT", $startlevel+3, true));
fwrite ($bf, full_tag("USERID", $startlevel+4, false, $assignment->userid));
fwrite ($bf, full_tag("HIDDEN", $startlevel+4, false, $assignment->hidden));
fwrite ($bf, full_tag("TIMESTART", $startlevel+4, false, $assignment->timestart));
fwrite ($bf, full_tag("TIMEEND", $startlevel+4, false, $assignment->timeend));
fwrite ($bf, full_tag("TIMEMODIFIED", $startlevel+4, false, $assignment->timemodified));
if (!isset($assignment->modifierid)) {
$assignment->modifierid = 0;
/// Role assignments are only sent to backup if the user is one target user
if (backup_getid($preferences->backup_unique_code, 'user', $assignment->userid)) {
fwrite ($bf, start_tag("ASSIGNMENT", $startlevel+3, true));
fwrite ($bf, full_tag("USERID", $startlevel+4, false, $assignment->userid));
fwrite ($bf, full_tag("HIDDEN", $startlevel+4, false, $assignment->hidden));
fwrite ($bf, full_tag("TIMESTART", $startlevel+4, false, $assignment->timestart));
fwrite ($bf, full_tag("TIMEEND", $startlevel+4, false, $assignment->timeend));
fwrite ($bf, full_tag("TIMEMODIFIED", $startlevel+4, false, $assignment->timemodified));
if (!isset($assignment->modifierid)) {
$assignment->modifierid = 0;
}
fwrite ($bf, full_tag("MODIFIERID", $startlevel+4, false, $assignment->modifierid));
fwrite ($bf, full_tag("ENROL", $startlevel+4, false, $assignment->enrol));
fwrite ($bf, full_tag("SORTORDER", $startlevel+4, false, $assignment->sortorder));
fwrite ($bf, end_tag("ASSIGNMENT", $startlevel+3, true));
}
fwrite ($bf, full_tag("MODIFIERID", $startlevel+4, false, $assignment->modifierid));
fwrite ($bf, full_tag("ENROL", $startlevel+4, false, $assignment->enrol));
fwrite ($bf, full_tag("SORTORDER", $startlevel+4, false, $assignment->sortorder));
fwrite ($bf, end_tag("ASSIGNMENT", $startlevel+3, true));
}
}
}
fwrite ($bf, end_tag("ASSIGNMENTS", $startlevel+2, true));
fwrite ($bf, end_tag("ROLE", $startlevel+1, true));
}
}
fwrite ($bf, end_tag("ROLES_ASSIGNMENTS", $startlevel, true));
fwrite ($bf, end_tag("ROLE", $startlevel+1, true));
}
}
fwrite ($bf, end_tag("ROLES_ASSIGNMENTS", $startlevel, true));
}
?>
+1 -1
View File
@@ -9,7 +9,7 @@ require_once($CFG->dirroot.'/backup/bb/xsl_emulate_xslt.inc');
function get_subdirs($directory){
$opendirectory = opendir( $directory );
while($filename = readdir($opendirectory)) {
while(false !== ($filename = readdir($opendirectory))) {
if (is_dir($directory.$filename) and $filename != ".." and $filename != "."){
$subdirs[] = $filename;
}
+6 -6
View File
@@ -119,7 +119,7 @@
}
// Loop through all directory entries, and construct two temporary arrays containing files and sub directories
while($entry = readdir($handle)) {
while(false !== ($entry = readdir($handle))) {
if (is_dir($dir. $slash .$entry) && $entry != ".." && $entry != "." && $entry != $excludeddir) {
$dir_subdirs[] = $dir. $slash .$entry;
}
@@ -143,7 +143,7 @@
return false;
}
else {
if (rmdir($dir_subdirs[$i]) == FALSE) {
if (remove_dir($dir_subdirs[$i]) == FALSE) {
return false;
}
}
@@ -196,7 +196,7 @@
$results = null;
$dir = opendir($rootdir);
while ($file=readdir($dir)) {
while (false !== ($file=readdir($dir))) {
if ($file=="." || $file=="..") {
continue;
}
@@ -215,7 +215,7 @@
$results = "";
$dir = opendir($rootdir);
while ($file=readdir($dir)) {
while (false !== ($file=readdir($dir))) {
if ($file=="." || $file=="..") {
continue;
}
@@ -299,10 +299,10 @@
if (!is_dir($to_file)) {
//echo "<br />Creating ".$to_file; //Debug
umask(0000);
$status = mkdir($to_file,$CFG->directorypermissions);
$status = mkdir($to_file,$CFG->directorypermissions);
}
$dir = opendir($from_file);
while ($file=readdir($dir)) {
while (false !== ($file=readdir($dir))) {
if ($file=="." || $file=="..") {
continue;
}
+3 -132
View File
@@ -1,142 +1,13 @@
<?php // $Id$
// backup.php - allows admin to edit all configuration variables for scheduled backups
// log.php - old scheduled backups report. Now redirecting
// to the new admin one
require_once("../config.php");
require_once("../backup/lib.php");
$courseid = optional_param('courseid',0,PARAM_INT);
require_login();
require_capability('moodle/site:backup', get_context_instance(CONTEXT_SYSTEM, SITEID));
if (!$site = get_site()) {
error("Site isn't defined!");
}
//Get needed strings
$backuploglaststatus = get_string("backuploglaststatus");
$backuplogdetailed = get_string("backuplogdetailed");
$stradmin = get_string("administration");
$strconfiguration = get_string("configuration");
$strbackup = get_string("backup");
$strbackupdetails = get_string("backupdetails");
$strlogs = get_string("logs");
$strftimedatetime = get_string("strftimerecent");
$strftimetime = get_string("strftimetime").":%S";
$strerror = get_string("error");
$strok = get_string("ok");
$strunfinished = get_string("unfinished");
$strskipped = get_string("skipped");
$strcourse = get_string("course");
$strtimetaken = get_string("timetaken","quiz");
$strstatus = get_string("status");
$strnext = get_string("next");
//Decide when to show last execution logs or detailed logs
//Lastlog view
if (!$courseid) {
print_header("$site->shortname: $strconfiguration: $strbackup", $site->fullname,
"<a href=\"../$CFG->admin/index.php\">$stradmin</a> -> ".
"<a href=\"../$CFG->admin/configure.php\">$strconfiguration</a> -> ".
"<a href=\"../$CFG->admin/backup.php?sesskey=$USER->sesskey\">$strbackup</a> -> ".
$strlogs);
print_heading($backuploglaststatus);
print_simple_box_start('center');
//Now, get every record from backup_courses
$courses = get_records("backup_courses");
if (!$courses) {
notify("No logs found!");
} else {
echo "<table border=\"0\" align=\"center\" cellpadding=\"3\" cellspacing=\"3\">";
//Print table header
echo "<tr>";
echo "<td nowrap=\"nowrap\" align=\"center\"><font size=\"3\">$strcourse</font></td>";
echo "<td nowrap=\"nowrap\" align=\"center\" colspan=\"3\"><font size=\"3\">$strtimetaken</font></td>";
echo "<td nowrap=\"nowrap\" align=\"center\"><font size=\"3\">$strstatus</font></td>";
echo "<td nowrap=\"nowrap\" align=\"center\"><font size=\"3\">$strnext</font></td></tr>";
foreach ($courses as $course) {
//Get the course shortname
$coursename = get_field ("course","fullname","id",$course->courseid);
if ($coursename) {
echo "<tr>";
echo "<td nowrap=\"nowrap\"><font size=\"2\"><a href=\"log.php?courseid=$course->courseid\">".$coursename."</a></font></td>";
echo "<td nowrap=\"nowrap\"><font size=\"2\">".userdate($course->laststarttime,$strftimedatetime)."</font></td>";
echo "<td nowrap=\"nowrap\"><font size=\"2\"> - </font></td>";
echo "<td nowrap=\"nowrap\"><font size=\"2\">".userdate($course->lastendtime,$strftimedatetime)."</font></td>";
if ($course->laststatus == 1) {
echo "<td nowrap=\"nowrap\" align=\"center\"><font size=\"2\" color=\"green\">".$strok."</font></td>";
} else if ($course->laststatus == 2) {
echo "<td nowrap=\"nowrap\" align=\"center\"><font size=\"2\" color=\"red\">".$strunfinished."</font></td>";
} else if ($course->laststatus == 3) {
echo "<td nowrap=\"nowrap\" align=\"center\"><font size=\"2\" color=\"green\">".$strskipped."</font></td>";
} else {
echo "<td nowrap=\"nowrap\" align=\"center\"><font size=\"2\" color=\"red\">".$strerror."</font></td>";
}
echo "<td nowrap=\"nowrap\"><font size=\"2\">".userdate($course->nextstarttime,$strftimedatetime)."</font></td>";
echo "</tr>";
}
}
echo "</table>";
}
print_simple_box_end();
//Detailed View !!
} else {
print_header("$site->shortname: $strconfiguration: $strbackup", $site->fullname,
"<a href=\"../$CFG->admin/index.php\">$stradmin</a> -> ".
"<a href=\"../$CFG->admin/configure.php\">$strconfiguration</a> -> ".
"<a href=\"../$CFG->admin/backup.php?sesskey=$USER->sesskey\">$strbackup</a> -> ".
"<a href=\"log.php\">$strlogs</a> -> ".
$strbackupdetails);
print_heading($backuplogdetailed);
$coursename = get_field("course","fullname","id","$courseid");
print_heading("$strcourse: $coursename");
print_simple_box_start('center');
//First, me get all the distinct backups for that course in backup_log
$executions = get_records_sql("SELECT DISTINCT laststarttime,laststarttime
FROM {$CFG->prefix}backup_log
WHERE courseid = '$courseid'
ORDER BY laststarttime DESC");
//Iterate over backup executions
if (!$executions) {
notify("No logs found!");
} else {
echo "<table border=\"0\" align=\"center\" cellpadding=\"3\" cellspacing=\"3\">";
foreach($executions as $execution) {
echo "<tr>";
echo "<td nowrap=\"nowrap\" align=\"center\" colspan=\"3\">";
print_simple_box("<center>".userdate($execution->laststarttime)."</center>", "center");
echo "</td>";
echo "</tr>";
$logs = get_records_sql("SELECT *
FROM {$CFG->prefix}backup_log
WHERE courseid = '$courseid' AND
laststarttime = '$execution->laststarttime'
ORDER BY id");
if ($logs) {
foreach ($logs as $log) {
echo "<tr>";
echo "<td nowrap=\"nowrap\"><font size=\"2\">".userdate($log->time,$strftimetime)."</font></td>";
$log->info = str_replace("- ERROR!!","- <font color=\"red\">ERROR!!</font>",$log->info);
$log->info = str_replace("- OK","- <font color=\"green\">OK</font>",$log->info);
echo "<td nowrap=\"nowrap\"><font size=\"2\">".str_replace(" ","&nbsp;&nbsp;&nbsp;&nbsp;",$log->info)."</font></td>";
echo "</tr>";
}
}
}
echo "</table>";
}
print_simple_box_end();
}
print_footer();
redirect("$CFG->wwwroot/$CFG->admin/report/backups/index.php", '', 'admin', 1);
?>
+4 -2
View File
@@ -50,11 +50,13 @@
}
if (!empty($id)) {
require_login($id);
if (!has_capability('moodle/site:restore', get_context_instance(CONTEXT_COURSE, $id))) {
if (empty($to)) {
error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php");
} else {
if (!has_capability('moodle/site:restore', get_context_instance(CONTEXT_COURSE, $to))) {
if (!has_capability('moodle/site:restore', get_context_instance(CONTEXT_COURSE, $to))
&& !has_capability('moodle/site:import', get_context_instance(CONTEXT_COURSE, $to))) {
error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php");
}
}
@@ -104,7 +106,7 @@
print_header("$site->shortname: $strcourserestore", $site->fullname,
"<a href=\"$CFG->wwwroot/$CFG->admin/index.php\">$stradministration</a> -> $strcourserestore");
print_heading(get_string("restorecancelled"));
print_continue("$CFG->wwwroot/$CFG->admin/index.php");
print_continue("$CFG->wwwroot/course/view.php?id=".$id);
print_footer();
exit;
}
+29 -12
View File
@@ -18,13 +18,21 @@
if ($form1 = data_submitted()) {
$currentcourseshortname = $course_header->course_shortname; //"store_ShortName";
$course_header->course_shortname = $form1->shortname; //"update_ShortName";
$course_header->course_fullname = $form1->fullname; //"update_FullName";
$form1->startdate = make_timestamp($form1->startyear, $form1->startmonth, $form1->startday);
$currentcoursestartdate = $course_header->course_startdate;
$coursestartdatedateoffset = $form1->startdate - $currentcoursestartdate;
$restore->course_startdateoffset = $coursestartdatedateoffset; //change to restore
}
$course_header->course_shortname = stripslashes_safe($form1->shortname); //"update_ShortName";
$course_header->course_fullname = stripslashes_safe($form1->fullname); //"update_FullName";
/// Roll dates only if the backup course has a start date
/// (some formats like main page, social..., haven't it and rolling dates
/// from 0 produces crazy dates. MDL-10125 and we have passed some custom startyear/month/day. MDL-12922
if ($course_header->course_startdate && !empty($form1->startyear)) {
$form1->startdate = make_timestamp($form1->startyear, $form1->startmonth, $form1->startday);
$currentcoursestartdate = $course_header->course_startdate;
$coursestartdatedateoffset = $form1->startdate - $currentcoursestartdate;
$restore->course_startdateoffset = $coursestartdatedateoffset; //change to restore
} else { // don't roll if the course hasn't start date
$coursestartdatedateoffset = 0;
$restore->course_startdateoffset = 0;
}
}
///Enforce SESSION->course_header rewrite (PHP 4.x needed because assigns are by value) MDL-8298
$SESSION->course_header = $course_header;
@@ -153,6 +161,13 @@
$restore->course_id=$course_id;
}
}
// pass in the course category param
$cat_id = optional_param('restore_restorecatto', 0, PARAM_INT);
if ($cat_id) {
$restore->restore_restorecatto = $cat_id;
}
//We have the object with data, put it in the session
$SESSION->restore = $restore;
@@ -189,7 +204,7 @@
// 2-New course: Create the restore object and launch the execute.
//If the user is a teacher and not a creator
if (!has_capability('moodle/course:create', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
if (!user_can_create_courses()) {
$restore->course_id = $id;
if ($restore->restoreto == 0) {
$restore->deleting = true;
@@ -199,7 +214,8 @@
}
//If the user is a creator (or admin)
if (has_capability('moodle/course:create', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
//if (has_capability('moodle/course:create', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
if (user_can_create_courses()) {
//Set restore->deleting as needed
if ($restore->restoreto == 0) {
$restore->deleting = true;
@@ -209,7 +225,8 @@
}
//Now, select the course if needed
if (($restore->restoreto == 0 or $restore->restoreto == 1) and ($restore->course_id == 0) and has_capability('moodle/course:create', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
//if (($restore->restoreto == 0 or $restore->restoreto == 1) and ($restore->course_id == 0) and get_capability_courses('moodle/site:restore')) {
if (($restore->restoreto == 0 or $restore->restoreto == 1) and ($restore->course_id == 0)) {
if ($courses = get_courses("all","c.fullname","c.id,c.fullname,c.shortname,c.visible")) {
print_heading(get_string("choosecourse"));
print_simple_box_start("center");
@@ -222,7 +239,7 @@
} else {
$optdimmed = '';
}
echo "<a $optdimmed href=\"restore.php?course_id=$course->id&launch=check&id=$id&file=$file\">".format_string($course->fullname).' ('.format_string($course->shortname).')</a><br />'."\n";
echo "<a $optdimmed href=\"restore.php?course_id=$course->id&amp;launch=check&amp;id=$id&amp;file=$file\">".format_string($course->fullname).' ('.format_string($course->shortname).')</a><br />'."\n";
}
print_simple_box_end();
} else {
@@ -232,7 +249,7 @@
//Checks everything and execute restore
} else if ((($restore->restoreto == 0 or $restore->restoreto == 1) and ($restore->course_id != 0)) or ($restore->restoreto == 2)) {
//Final access control check
if ($restore->course_id == 0 and !has_capability('moodle/course:create', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
if ($restore->course_id == 0 and !user_can_create_courses()) {
error("You need to be a creator or admin to restore into new course!");
} else if ($restore->course_id != 0 and !has_capability('moodle/site:backup', get_context_instance(CONTEXT_COURSE, $restore->course_id))) {
error("You need to be an edit teacher or admin to restore into selected course!");
+2 -1
View File
@@ -26,7 +26,8 @@
if (empty($to)) {
error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php");
} else {
if (!has_capability('moodle/site:restore', get_context_instance(CONTEXT_COURSE, $to))) {
if (!has_capability('moodle/site:restore', get_context_instance(CONTEXT_COURSE, $to))
&& !has_capability('moodle/site:import', get_context_instance(CONTEXT_COURSE, $to))) {
error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php");
}
}
+150 -25
View File
@@ -92,14 +92,17 @@
}
if (!isset($restore_restoreto)) {
if (!has_capability('moodle/site:restore', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
if (!user_can_create_courses()) {
$restore_restoreto = 1;
}
if (has_capability('moodle/site:restore', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
} else {
$restore_restoreto = 2;
}
}
if (!isset($course_header->category->id)) {
$course_header->category->id = 0;
}
if(!isset($form1->startdate)) {
$form1->startdate = $course_header->course_startdate; //$course_header->course_startdate;
}
@@ -171,40 +174,91 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
echo get_string("restoreto").":</b>";
echo "</td><td colspan=\"3\">";
if (has_capability('moodle/course:create', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
// permission should have been checked already
/**
* if user has manageactivities in any course, we show
* existingcoursedeleting
* existingcourseadding
* else we show
* currentcoursedeleting
* currentcourse
* if user has course:create in any category, we show
* newcourse
*/
$mycourses = get_capability_courses('moodle/site:restore');
// if the user can manage 2 or more courses,
// or if the only course the user can manage is not the current course
// we show options for existing courses
if (count($mycourses) > 1 || !in_array($id, $mycourses)) {
// if user can manage more than 1 course, or if user can restore to a single different course
$restore_restoreto_options[0] = get_string("existingcoursedeleting");
$restore_restoreto_options[1] = get_string("existingcourseadding");
$restore_restoreto_options[2] = get_string("newcourse");
} else { // fix for MDL-7773
// else if the user can write to current course
} else if (has_capability('moodle/site:restore', get_context_instance(CONTEXT_COURSE, $id))){
$restore_restoreto_options[0] = get_string("currentcoursedeleting");
$restore_restoreto_options[1] = get_string("currentcourseadding");
$restore_restoreto_options[1] = get_string("currentcourseadding");
}
// if user can create any course at all, give the option
if (user_can_create_courses()) {
$restore_restoreto_options[2] = get_string("newcourse");
}
choose_from_menu($restore_restoreto_options, "restore_restoreto", $restore_restoreto, "");
echo "</td></tr>";
if (iscreator()) { //display these fields conditionally
if (user_can_create_courses()) { //display these fields conditionally
// find the list of cates user can edit
echo "<tr valign=\"top\" >";
echo "<td align=\"right\">";
print_string('category');
echo " :</td>";
echo "<td>";
choose_from_menu(get_creatable_categories(), "restore_restorecatto", $course_header->category->id, "");
echo "</td>";
echo "</tr>";
echo "<tr valign=\"top\" >";
echo "<td align=\"right\">";
print_string("shortname");
echo " :</td>";
echo "<td><input type=\"text\" name=\"shortname\" maxlength=\"15\" size=\"10\" value=\"$form1->shortname\" alt=\"".get_string("shortname")."\" />" ;
echo "<td><input type=\"text\" name=\"shortname\" maxlength=\"15\" size=\"10\" value=\"".s($form1->shortname)."\" alt=\"".get_string("shortname")."\" />" ;
helpbutton("courseshortname", get_string("shortname")) ;
if (isset($err["shortname"])) formerr($err["shortname"]);
if (isset($err["shortname"])) formerr($err["shortname"]);
echo "</td>";
echo "</tr>";
echo "<tr valign=\"top\" >";
echo "<td align=\"right\">";
print_string("fullname");
echo " :</td>";
echo "<td><input type=\"text\" name=\"fullname\" maxlength=\"254\" size=\"50\" value=\"$form1->fullname\" alt=\" ".get_string("fullname")."\" />" ;
echo "<td><input type=\"text\" name=\"fullname\" maxlength=\"254\" size=\"50\" value=\"".s($form1->fullname)."\" alt=\" ".get_string("fullname")."\" />" ;
helpbutton("coursefullname", get_string("fullname")) ;
if (isset($err["fullname"])) formerr($err["fullname"]);
echo"</td></tr>";
echo "<tr valign=\"top\"> ";
echo "<td align=\"right\"> ";
print_string("startdate");
echo ":</td><td>";
print_date_selector("startday", "startmonth", "startyear", $form1->startdate);
print_string("startdate");
echo ":</td><td>";
/// Show the roll dates option only if the backup course has a start date
/// (some formats like main page, social..., haven't it and rolling dates
/// from 0 produces crazy dates. MDL-10125
if ($form1->startdate) {
print_date_selector("startday", "startmonth", "startyear", $form1->startdate);
} else {
print_string('notavailable');
echo '<input type="hidden" name="startyear" value="0" />';
echo '<input type="hidden" name="startmonth" value="0" />';
echo '<input type="hidden" name="startday" value="0" />';
}
helpbutton("coursestartdate", get_string("startdate"));
echo "</td></tr>";
} else {
/// If user cannot create course, prevent any change in startyear/month/day (so restore wont calculate any roll. MDL-12922
echo '<input type="hidden" name="startyear" value="0" />';
echo '<input type="hidden" name="startmonth" value="0" />';
echo '<input type="hidden" name="startday" value="0" />';
}
//Line
echo "<tr><td colspan=\"4\"><hr /></td></tr>";
@@ -231,6 +285,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
echo "</tr>";
echo "<tr><td colspan=\"4\"><hr /></td></tr>";
$currentrow = 0;
$nonrestmod = '';
foreach ($allmods as $mod) {
$modname = $mod->name;
$modrestore = $modname."_restore_mods";
@@ -429,6 +484,7 @@ $info = restore_read_xml_info($xml_file);
// fix for MDL-9068, front page course is just a normal course
$siterolesarray = get_assignable_roles (get_context_instance(CONTEXT_COURSE, $course->id), "shortname");
$siterolesnamearray = get_assignable_roles (get_context_instance(CONTEXT_COURSE, $course->id), "name");
$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>');
@@ -483,21 +539,34 @@ if ($info->backup_moodle_version < 2006092801) {
}
foreach ($roles->roles as $roleid=>$role) {
$mappableroles = $siteroleschoicearray;
echo ('<tr><td align="right">');
echo $role->name." (".($role->shortname).")";
echo ('</td><td align="left">');
// see if any short name match
$matchrole = 0;
foreach ($siterolesarray as $siteroleid=>$siteroleshortname) {
if ($siteroleshortname == $role->shortname) {
$matchrole = $siteroleid;
break;
}
/// first, we see if any exact role definition is found
/// if found, that is the only option of restoring to
if ($samerole = restore_samerole($roleid, $role)) {
$matchrole = $samerole->id;
// if an exact role is found, it does not matter whether this user can assign this role or not,
// this will be presented as a valid option regardless
$mappableroles[$samerole->id] = $allroles[$samerole->id]->name." (". $allroles[$samerole->id]->shortname.")";
} else {
// no exact role found, let's try to match shortname
// this is useful in situations where basic roles differ slightly in definition
$matchrole = 0;
foreach ($siterolesarray as $siteroleid=>$siteroleshortname) {
if ($siteroleshortname == $role->shortname) {
$matchrole = $siteroleid;
break;
}
}
}
choose_from_menu ($siteroleschoicearray, "roles_".$roleid, $matchrole, 'new role', '', '0');
echo ('</td></tr>');
choose_from_menu ($mappableroles, "roles_".$roleid, $matchrole, 'new role', '', '0');
echo ('</td></tr>');
}
}
@@ -516,3 +585,59 @@ echo ('</table>'); // end of role mappings table
</div>
</div>
</form>
<?php
/*
* If there is a role with exactly the same definition, we pull it out from db
*/
function restore_samerole($roleid, $role) {
global $CFG;
$systemcontext = get_context_instance(CONTEXT_SYSTEM);
// first let's use the id
if ($trole = get_records_sql("SELECT roleid,capability,permission
FROM {$CFG->prefix}role_capabilities
WHERE roleid = $roleid")) {
if (restore_is_samerole($trole, $role)) {
$firstcap = array_shift($trole);
return get_record('role', 'id', $firstcap->roleid);
}
}
// unfortunately then we have to loop all roles with the same number of capabiltiies
if ($proles = get_records_sql("SELECT roleid, roleid
FROM {$CFG->prefix}role_capabilities
GROUP BY roleid
HAVING COUNT(capability) = ".count($role->capabilities))) {
foreach ($proles as $proleid=>$proleobj) {
if ($prole = get_records('role_capabilities', 'roleid', $proleid)) {
if (restore_is_samerole($prole, $role)) {
return get_record('role', 'id', $proleid);
}
}
}
}
return false;
}
/*
* rolea from db, roleb from xml
*/
function restore_is_samerole($rolea, $roleb) {
if (count($rolea) != count($roleb->capabilities)) {
return false;
}
foreach ($rolea as $cap) {
if ($cap->permission != $roleb->capabilities[$cap->capability]->permission) {
return false;
}
}
return true;
}
?>
+2 -1
View File
@@ -18,7 +18,8 @@
if (empty($to)) {
error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php");
} else {
if (!has_capability('moodle/site:restore', get_context_instance(CONTEXT_COURSE, $to))) {
if (!has_capability('moodle/site:restore', get_context_instance(CONTEXT_COURSE, $to))
&& !has_capability('moodle/site:import', get_context_instance(CONTEXT_COURSE, $to))) {
error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php");
}
}
+300 -118
View File
@@ -71,6 +71,42 @@
echo "<ul>";
}
// Recode links in the course summary.
if (!defined('RESTORE_SILENTLY')) {
echo '<li>' . get_string('from') . ' ' . get_string('course');
}
$course = get_record('course', 'id', $restore->course_id, '', '', '', '', 'id,summary');
$coursesummary = restore_decode_content_links_worker($course->summary, $restore);
if ($coursesummary != $course->summary) {
$course->summary = addslashes($coursesummary);
if (!update_record('course', $course)) {
$status = false;
}
}
if (!defined('RESTORE_SILENTLY')) {
echo '</li>';
}
// Recode links in section summaries.
$sections = get_records('course_sections', 'course', $restore->course_id, 'id', 'id,summary');
if ($sections) {
if (!defined('RESTORE_SILENTLY')) {
echo '<li>' . get_string('from') . ' ' . get_string('sections');
}
foreach ($sections as $section) {
$sectionsummary = restore_decode_content_links_worker($section->summary, $restore);
if ($sectionsummary != $section->summary) {
$section->summary = addslashes($sectionsummary);
if (!update_record('course_sections', $section)) {
$status = false;
}
}
}
if (!defined('RESTORE_SILENTLY')) {
echo '</li>';
}
}
// Restore links in modules.
foreach ($restore->mods as $name => $info) {
//If the module is being restored
@@ -533,8 +569,18 @@
$course_header->course_shortname = $currentshortname;
//Now calculate the category
$category = get_record("course_categories","id",$course_header->category->id,
"name",addslashes($course_header->category->name));
// first try to get it from restore
if ($restore->restore_restorecatto) {
$category = get_record('course_categories', 'id', $restore->restore_restorecatto);
}
// else we try to get it from the xml file
//Now calculate the category
if (!$category) {
$category = get_record("course_categories","id",$course_header->category->id,
"name",addslashes($course_header->category->name));
}
//If no exists, try by name only
if (!$category) {
$category = get_record("course_categories","name",addslashes($course_header->category->name));
@@ -585,7 +631,6 @@
$course->guest = addslashes($course_header->course_guest);
$course->startdate = addslashes($course_header->course_startdate);
$course->startdate += $restore->course_startdateoffset;
$course->enrolperiod = addslashes($course_header->course_enrolperiod);
$course->numsections = addslashes($course_header->course_numsections);
//$course->showrecent = addslashes($course_header->course_showrecent); INFO: This is out in 1.3
$course->maxbytes = addslashes($course_header->course_maxbytes);
@@ -606,6 +651,19 @@
$course->timecreated = addslashes($course_header->course_timecreated);
$course->timemodified = addslashes($course_header->course_timemodified);
$course->metacourse = addslashes($course_header->course_metacourse);
$course->expirynotify = isset($course_header->course_expirynotify) ? addslashes($course_header->course_expirynotify):0;
$course->notifystudents = isset($course_header->course_notifystudents) ? addslashes($course_header->course_notifystudents) : 0;
$course->expirythreshold = isset($course_header->course_expirythreshold) ? addslashes($course_header->course_expirythreshold) : 0;
$course->enrollable = isset($course_header->course_enrollable) ? addslashes($course_header->course_enrollable) : 1;
$course->enrolstartdate = isset($course_header->course_enrolstartdate) ? addslashes($course_header->course_enrolstartdate) : 0;
if ($course->enrolstartdate) { //Roll course dates
$course->enrolstartdate += $restore->course_startdateoffset;
}
$course->enrolenddate = isset($course_header->course_enrolenddate) ? addslashes($course_header->course_enrolenddate) : 0;
if ($course->enrolenddate) { //Roll course dates
$course->enrolenddate += $restore->course_startdateoffset;
}
$course->enrolperiod = addslashes($course_header->course_enrolperiod);
//Calculate sortorder field
$sortmax = get_record_sql('SELECT MAX(sortorder) AS max
FROM ' . $CFG->prefix . 'course
@@ -778,6 +836,11 @@
continue;
}
$getid = backup_getid($restore->backup_unique_code, $parts[1], $instance->pageid);
if (empty($getid->new_id)) {
// Failed, perhaps the module was not included in the restore MDL-13554
continue;
}
$instance->pageid = $getid->new_id;
}
else {
@@ -833,10 +896,22 @@
//Add this instance
$instance->blockid = $blocks[$instance->name]->id;
if ($newid = insert_record('block_instance', $instance)) {
if (!empty($instance->id)) { // this will only be set if we come from 1.7 and above backups
backup_putid ($restore->backup_unique_code,"block_instance",$instance->id,$newid);
if (!empty($instance->id)) {
$oldid = $instance->id;
} else {
$oldid = 0;
}
if ($instance->id = insert_record('block_instance', $instance)) {
// Create block instance
if (!$blockobj = block_instance($instance->name, $instance)) {
$status = false;
break;
}
// Save oldid after block restore process because info will be over-written with blank string
if ($oldid) {
backup_putid ($restore->backup_unique_code,"block_instance",$oldid,$instance->id);
}
} else {
$status = false;
@@ -935,14 +1010,18 @@
// Yu: This part is called repeatedly for every instance,
// so it is necessary to set the granular flag and check isset()
// when the first instance of this type of mod is processed.
if (!isset($restore->mods[$mod->type]->granular) && isset($restore->mods[$mod->type]->instances) && is_array($restore->mods[$mod->type]->instances)) {
// This defines whether we want to restore specific
// instances of the modules (granular restore), or
// whether we don't care and just want to restore
// all module instances (non-granular).
$restore->mods[$mod->type]->granular = true;
} else {
$restore->mods[$mod->type]->granular = false;
//if (!isset($restore->mods[$mod->type]->granular) && isset($restore->mods[$mod->type]->instances) && is_array($restore->mods[$mod->type]->instances)) {
if (!isset($restore->mods[$mod->type]->granular)) {
if (isset($restore->mods[$mod->type]->instances) && is_array($restore->mods[$mod->type]->instances)) {
// This defines whether we want to restore specific
// instances of the modules (granular restore), or
// whether we don't care and just want to restore
// all module instances (non-granular).
$restore->mods[$mod->type]->granular = true;
} else {
$restore->mods[$mod->type]->granular = false;
}
}
//Check if we've to restore this module (and instance)
@@ -1181,7 +1260,7 @@
if (!$preferencescount) {
$continue = false;
if (!defined('RESTORE_SILENTLY')) {
echo '<li>'.get_string('backupwithoutgradebook','grade').'</li>';
echo '<li>'.get_string('backupwithoutgradebook','grades').'</li>';
}
}
@@ -1192,7 +1271,7 @@
if ($pref_rec->value == 0) {
$continue = false;
if (!defined('RESTORE_SILENTLY')) {
echo '<li>'.get_string('respectingcurrentdata','grade').'</li>';
echo '<li>'.get_string('respectingcurrentdata','grades').'</li>';
}
}
}
@@ -1208,7 +1287,7 @@
//Fetch recordset_size records in each iteration
$recs = get_records_select("backup_ids","table_name = 'grade_preferences' AND backup_code = '$restore->backup_unique_code'",
"old_id",
"old_id, old_id",
"old_id",
$counter,
$recordset_size);
if ($recs) {
@@ -1262,7 +1341,7 @@
//Fetch recordset_size records in each iteration
$recs = get_records_select("backup_ids","table_name = 'grade_letter' AND backup_code = '$restore->backup_unique_code'",
"old_id",
"old_id, old_id",
"old_id",
$counter,
$recordset_size);
if ($recs) {
@@ -1312,7 +1391,7 @@
//Fetch recordset_size records in each iteration
$recs = get_records_select("backup_ids","table_name = 'grade_category' AND backup_code = '$restore->backup_unique_code'",
"old_id",
"old_id, old_id",
"old_id",
$countercat,
$recordset_size);
if ($recs) {
@@ -1471,7 +1550,7 @@
//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 records (users, user_students, user_teachers
//user_course_creators and user_admins
@@ -1482,15 +1561,37 @@
$languages = get_list_of_languages();
/// Iterate over all users loaded from xml
$counter = 0;
foreach ($info->users as $userid) {
$rec = backup_getid($restore->backup_unique_code,"user",$userid);
$rec = backup_getid($restore->backup_unique_code,"user",$userid);
$user = $rec->info;
foreach (array_keys(get_object_vars($user)) as $field) {
if (!is_array($user->$field)) {
$user->$field = backup_todb($user->$field);
if (is_null($user->$field)) {
$user->$field = '';
}
}
}
//Now, recode some languages (Moodle 1.5)
if ($user->lang == 'ma_nt') {
$user->lang = 'mi_nt';
}
//Country list updates - MDL-13060
//Any user whose country code has been deleted or modified needs to be assigned a valid one.
$country_update_map = array(
'ZR' => 'CD',
'TP' => 'TL',
'FX' => 'FR',
'KO' => 'RS',
'CS' => 'RS',
'WA' => 'GB');
if (array_key_exists($user->country, $country_update_map)) {
$user->country = $country_update_map[$user->country];
}
//If language does not exist here - use site default
if (!array_key_exists($user->lang, $languages)) {
@@ -1562,17 +1663,13 @@
if ($create_user) {
//Unset the id because it's going to be inserted with a new one
unset ($user->id);
//We addslashes to necessary fields
$user->username = addslashes($user->username);
$user->firstname = addslashes($user->firstname);
$user->lastname = addslashes($user->lastname);
$user->email = addslashes($user->email);
$user->institution = addslashes($user->institution);
$user->department = addslashes($user->department);
$user->address = addslashes($user->address);
$user->city = addslashes($user->city);
$user->url = addslashes($user->url);
$user->description = restore_decode_absolute_links(addslashes($user->description));
// relink the descriptions
$user->description = restore_decode_absolute_links($user->description);
/// Disable pictures based on global setting of existing empty value (old backups can contain wrong empties)
if (!empty($CFG->disableuserimages) || empty($user->picture)) {
$user->picture = 0;
}
//We need to analyse the AUTH field to recode it:
// - if the field isn't set, we are in a pre 1.4 backup and we'll
@@ -1604,7 +1701,7 @@
//We are going to create the user
//The structure is exactly as we need
$newid = insert_record ("user",$user);
$newid = insert_record ("user", addslashes_recursive($user));
//Put the new id
$status = backup_putid($restore->backup_unique_code,"user",$userid,$newid,"new");
}
@@ -1745,9 +1842,20 @@
}
}
}
}
//Do some output
$counter++;
if ($counter % 10 == 0) {
if (!defined('RESTORE_SILENTLY')) {
echo ".";
if ($counter % 200 == 0) {
echo "<br />";
}
}
backup_flush(300);
}
} /// End of loop over all the users loaded from xml
}
return $status;
}
@@ -1790,7 +1898,7 @@
$counter = 0;
while ($counter < $unreadcount) {
//Fetch recordset_size records in each iteration
$recs = get_records_select("backup_ids","table_name = 'message' AND backup_code = '$restore->backup_unique_code'","old_id","old_id, old_id",$counter,$recordset_size);
$recs = get_records_select("backup_ids","table_name = 'message' AND backup_code = '$restore->backup_unique_code'","old_id","old_id",$counter,$recordset_size);
if ($recs) {
foreach ($recs as $rec) {
//Get the full record from backup_ids
@@ -1855,7 +1963,7 @@
$counter = 0;
while ($counter < $readcount) {
//Fetch recordset_size records in each iteration
$recs = get_records_select("backup_ids","table_name = 'message_read' AND backup_code = '$restore->backup_unique_code'","old_id","old_id, old_id",$counter,$recordset_size);
$recs = get_records_select("backup_ids","table_name = 'message_read' AND backup_code = '$restore->backup_unique_code'","old_id","old_id",$counter,$recordset_size);
if ($recs) {
foreach ($recs as $rec) {
//Get the full record from backup_ids
@@ -1922,7 +2030,7 @@
$counter = 0;
while ($counter < $contactcount) {
//Fetch recordset_size records in each iteration
$recs = get_records_select("backup_ids","table_name = 'message_contacts' AND backup_code = '$restore->backup_unique_code'","old_id","old_id, old_id",$counter,$recordset_size);
$recs = get_records_select("backup_ids","table_name = 'message_contacts' AND backup_code = '$restore->backup_unique_code'","old_id","old_id",$counter,$recordset_size);
if ($recs) {
foreach ($recs as $rec) {
//Get the full record from backup_ids
@@ -2182,10 +2290,22 @@
$gro->hidepicture = backup_todb($info['GROUP']['#']['HIDEPICTURE']['0']['#']);
$gro->timecreated = backup_todb($info['GROUP']['#']['TIMECREATED']['0']['#']);
$gro->timemodified = backup_todb($info['GROUP']['#']['TIMEMODIFIED']['0']['#']);
//Now search if that group exists (by name and description field) in
//Now search if that group exists (by name and description field) in
//restore->course_id course
$gro_db = groups_group_matches($restore->course_id, $gro->name, $gro->description);
//Going to compare LOB columns so, use the cross-db sql_compare_text() in both sides.
$description_clause = '';
if (!empty($gro->description)) { /// Only for groups having a description
$literal_description = "'" . $gro->description . "'";
$description_clause = " AND " .
sql_compare_text('description') . " = " .
sql_compare_text($literal_description);
}
$gro_db = get_record_sql("SELECT *
FROM {$CFG->prefix}groups g, {$CFG->prefix}groups_courses_groups gcg
WHERE gcg.courseid = $restore->course_id
AND g.id = gcg.groupid
AND g.name = '{$gro->name}'" . $description_clause, true);
//If it doesn't exist, create
if (!$gro_db) {
$create_group = true;
@@ -2480,19 +2600,6 @@
//Assign it to admin
$eve->userid = $adminid;
}
//We must recode the repeatid if the event has it
if (!empty($eve->repeatid)) {
$repeat_rec = backup_getid($restore->backup_unique_code,"event_repeatid",$eve->repeatid);
if ($repeat_rec) { //Exists, so use it...
$eve->repeatid = $repeat_rec->new_id;
} else { //Doesn't exists, calculate the next and save it
$oldrepeatid = $eve->repeatid;
$max_rec = get_record_sql('SELECT 1, MAX(repeatid) AS repeatid FROM '.$CFG->prefix.'event');
$eve->repeatid = empty($max_rec) ? 1 : $max_rec->repeatid + 1;
backup_putid($restore->backup_unique_code,"event_repeatid", $oldrepeatid, $eve->repeatid);
}
}
//We have to recode the groupid field
$group = backup_getid($restore->backup_unique_code,"groups",$eve->groupid);
@@ -2505,6 +2612,22 @@
//The structure is equal to the db, so insert the event
$newid = insert_record ("event",$eve);
//We must recode the repeatid if the event has it
//The repeatid now refers to the id of the original event. (see Bug#5956)
if ($newid && !empty($eve->repeatid)) {
$repeat_rec = backup_getid($restore->backup_unique_code,"event_repeatid",$eve->repeatid);
if ($repeat_rec) { //Exists, so use it...
$eve->repeatid = $repeat_rec->new_id;
} else { //Doesn't exists, calculate the next and save it
$oldrepeatid = $eve->repeatid;
$eve->repeatid = $newid;
backup_putid($restore->backup_unique_code,"event_repeatid", $oldrepeatid, $eve->repeatid);
}
$eve->id = $newid;
// update the record to contain the correct repeatid
update_record('event',$eve);
}
} else {
//get current event id
$newid = $eve_db->id;
@@ -2532,8 +2655,18 @@
//step in the restore execution, because we need to have it
//finished to know all the oldid, newid equivaleces
function restore_decode_absolute_links($content) {
global $CFG,$restore;
global $CFG,$restore;
/// MDL-14072: Prevent NULLs, empties and numbers to be processed by the
/// heavy interlinking. Just a few cpu cycles saved.
if ($content === NULL) {
return NULL;
} else if ($content === '') {
return '';
} else if (is_numeric($content)) {
return $content;
}
//Now decode wwwroot and file.php calls
$search = array ("$@FILEPHP@$");
@@ -2569,48 +2702,53 @@
$counter = 0;
//First, we check to "users" exists and create is as necessary
// 'users' is the old users folder, 'user' is the new one, with a new hierarchy. Detect which one is here and treat accordingly
//in CFG->dataroot
$dest_dir = $CFG->dataroot."/users";
$dest_dir = $CFG->dataroot."/user";
$status = check_dir_exists($dest_dir,true);
//Now, we iterate over "user_files" records to check if that user dir must be
//copied (and renamed) to the "users" dir.
$rootdir = $CFG->dataroot."/temp/backup/".$restore->backup_unique_code."/user_files";
//Check if directory exists
if (is_dir($rootdir)) {
$list = list_directories ($rootdir);
if ($list) {
//Iterate
$counter = 0;
foreach ($list as $dir) {
//Look for dir like username in backup_ids
$data = get_record ("backup_ids","backup_code",$restore->backup_unique_code,
"table_name","user",
"old_id",$dir);
//If thar user exists in backup_ids
if ($data) {
//Only it user has been created now
//or if it existed previously, but he hasn't image (see bug 1123)
if ((strpos($data->info,"new") !== false) or
(!check_dir_exists($dest_dir."/".$data->new_id,false))) {
//Copy the old_dir to its new location (and name) !!
//Only if destination doesn't exists
if (!file_exists($dest_dir."/".$data->new_id)) {
$status = backup_copy_file($rootdir."/".$dir,
$dest_dir."/".$data->new_id,true);
$counter ++;
}
//Do some output
if ($counter % 2 == 0) {
if (!defined('RESTORE_SILENTLY')) {
echo ".";
if ($counter % 40 == 0) {
echo "<br />";
}
$userlist = array();
if (is_dir($rootdir) && ($list = list_directories ($rootdir))) {
$counter = 0;
foreach ($list as $dir) {
// If there are directories in this folder, we are in the new user hierarchy
if ($newlist = list_directories("$rootdir/$dir")) {
foreach ($newlist as $olduserid) {
$userlist[$olduserid] = "$rootdir/$dir/$olduserid";
}
} else {
$userlist[$dir] = "$rootdir/$dir";
}
}
foreach ($userlist as $olduserid => $backup_location) {
//Look for dir like username in backup_ids
//If that user exists in backup_ids
if ($user = backup_getid($restore->backup_unique_code,"user",$olduserid)) {
//Only if user has been created now or if it existed previously, but he hasn't got an image (see bug 1123)
$newuserdir = make_user_directory($user->new_id, true); // Doesn't create the folder, just returns the location
// restore images if new user or image does not exist yet
if (!empty($user->new) or !check_dir_exists($newuserdir)) {
if (make_user_directory($user->new_id)) { // Creates the folder
$status = backup_copy_file($backup_location, $newuserdir, true);
$counter ++;
}
//Do some output
if ($counter % 2 == 0) {
if (!defined('RESTORE_SILENTLY')) {
echo ".";
if ($counter % 40 == 0) {
echo "<br />";
}
backup_flush(300);
}
backup_flush(300);
}
}
}
@@ -2817,7 +2955,7 @@
while ($counter < $count_logs) {
//Get a chunk of records
//Take old_id twice to avoid adodb limitation
$logs = get_records_select("backup_ids","table_name = 'log' AND backup_code = '$restore->backup_unique_code'","old_id","old_id,old_id",$counter,$recordset_size);
$logs = get_records_select("backup_ids","table_name = 'log' AND backup_code = '$restore->backup_unique_code'","old_id","old_id",$counter,$recordset_size);
//We have logs
if ($logs) {
//Iterate
@@ -3205,6 +3343,18 @@
} else {
$status = false;
}
// MDL-14326 remove empty course modules instance's (credit goes to John T. Macklin from Remote Learner)
$course_modules_inst_zero = get_records_sql("SELECT id, course, instance
FROM {$CFG->prefix}course_modules
WHERE id = '$cm_module->new_id' AND
instance = '0'");
if($course_modules_inst_zero){ // Clean up the invalid instances
foreach($course_modules_inst_zero as $course_modules_inst){
delete_records('course_modules', 'id',$course_modules_inst->id);
}
}
}
}
@@ -3244,7 +3394,7 @@
$this->tree[$this->level] = $tagName;
//Output something to avoid browser timeouts...
backup_flush();
//backup_flush();
//Check if we are into INFO zone
//if ($this->tree[2] == "INFO") //Debug
@@ -3258,7 +3408,7 @@
$this->tree[$this->level] = $tagName;
//Output something to avoid browser timeouts...
backup_flush();
//backup_flush();
//Check if we are into INFO zone
//if ($this->tree[2] == "INFO") //Debug
@@ -3273,7 +3423,7 @@
$this->tree[$this->level] = $tagName;
//Output something to avoid browser timeouts...
backup_flush();
//backup_flush();
//Check if we are into COURSE_HEADER zone
//if ($this->tree[3] == "HEADER") //Debug
@@ -3287,7 +3437,7 @@
$this->tree[$this->level] = $tagName;
//Output something to avoid browser timeouts...
backup_flush();
//backup_flush();
//Check if we are into BLOCKS zone
//if ($this->tree[3] == "BLOCKS") //Debug
@@ -3301,7 +3451,7 @@
$this->tree[$this->level] = $tagName;
//Output something to avoid browser timeouts...
backup_flush();
//backup_flush();
//Check if we are into SECTIONS zone
//if ($this->tree[3] == "SECTIONS") //Debug
@@ -3315,7 +3465,7 @@
$this->tree[$this->level] = $tagName;
//Output something to avoid browser timeouts...
backup_flush();
//backup_flush();
//Accumulate all the data inside this tag
if (isset($this->tree[3]) && $this->tree[3] == "FORMATDATA") {
@@ -3338,7 +3488,7 @@
$this->tree[$this->level] = $tagName;
//Output something to avoid browser timeouts...
backup_flush();
//backup_flush();
//Check if we are into METACOURSE zone
//if ($this->tree[3] == "METACOURSE") //Debug
@@ -3353,7 +3503,7 @@
$this->tree[$this->level] = $tagName;
//Output something to avoid browser timeouts...
backup_flush();
//backup_flush();
//Check if we are into GRADEBOOK zone
//if ($this->tree[3] == "GRADEBOOK") //Debug
@@ -3389,7 +3539,7 @@
$this->tree[$this->level] = $tagName;
//Output something to avoid browser timeouts...
backup_flush();
//backup_flush();
//Check if we are into MESSAGES zone
//if ($this->tree[3] == "MESSAGES") //Debug
@@ -3416,7 +3566,7 @@
//} //Debug
//Output something to avoid browser timeouts...
backup_flush();
//backup_flush();
//Check if we are into QUESTION_CATEGORIES zone
//if ($this->tree[3] == "QUESTION_CATEGORIES") //Debug
@@ -3444,7 +3594,7 @@
//} //Debug
//Output something to avoid browser timeouts...
backup_flush();
//backup_flush();
//Check if we are into SCALES zone
//if ($this->tree[3] == "SCALES") //Debug
@@ -3471,7 +3621,7 @@
//} //Debug
//Output something to avoid browser timeouts...
backup_flush();
//backup_flush();
//Check if we are into GROUPS zone
//if ($this->tree[3] == "GROUPS") //Debug
@@ -3498,7 +3648,7 @@
//} //Debug
//Output something to avoid browser timeouts...
backup_flush();
//backup_flush();
//Check if we are into GROUPINGS zone
//if ($this->tree[3] == "GROUPINGS") //Debug
@@ -3526,7 +3676,7 @@
//} //Debug
//Output something to avoid browser timeouts...
backup_flush();
//backup_flush();
//Check if we are into EVENTS zone
//if ($this->tree[3] == "EVENTS") //Debug
@@ -3554,7 +3704,7 @@
//} //Debug
//Output something to avoid browser timeouts...
backup_flush();
//backup_flush();
//Check if we are into MODULES zone
//if ($this->tree[3] == "MODULES") //Debug
@@ -3582,7 +3732,7 @@
//} //Debug
//Output something to avoid browser timeouts...
backup_flush();
//backup_flush();
//Check if we are into LOGS zone
//if ($this->tree[3] == "LOGS") //Debug
@@ -3605,7 +3755,7 @@
$this->tree[$this->level] = $tagName;
//Output something to avoid browser timeouts...
backup_flush();
//backup_flush();
echo $this->level.str_repeat("&nbsp;",$this->level*2)."&lt;".$tagName."&gt;<br />\n"; //Debug
}
@@ -3831,9 +3981,6 @@
case "STARTDATE":
$this->info->course_startdate = $this->getContents();
break;
case "ENROLPERIOD":
$this->info->course_enrolperiod = $this->getContents();
break;
case "NUMSECTIONS":
$this->info->course_numsections = $this->getContents();
break;
@@ -3882,6 +4029,27 @@
case "METACOURSE":
$this->info->course_metacourse = $this->getContents();
break;
case "EXPIRENOTIFY":
$this->info->course_expirynotify = $this->getContents();
break;
case "NOTIFYSTUDENTS":
$this->info->course_notifystudents = $this->getContents();
break;
case "EXPIRYTHRESHOLD":
$this->info->course_expirythreshold = $this->getContents();
break;
case "ENROLLABLE":
$this->info->course_enrollable = $this->getContents();
break;
case "ENROLSTARTDATE":
$this->info->course_enrolstartdate = $this->getContents();
break;
case "ENROLENDDATE":
$this->info->course_enrolenddate = $this->getContents();
break;
case "ENROLPERIOD":
$this->info->course_enrolperiod = $this->getContents();
break;
}
}
if ($this->tree[4] == "CATEGORY") {
@@ -5420,11 +5588,20 @@
$fp = fopen($xml_file,"r")
or $status = false;
if ($status) {
while ($data = fread($fp, 4096) and !$moodle_parser->finished)
xml_parse($xml_parser, $data, feof($fp))
or die(sprintf("XML error: %s at line %d",
xml_error_string(xml_get_error_code($xml_parser)),
xml_get_current_line_number($xml_parser)));
// MDL-9290 performance improvement on reading large xml
$lasttime = time(); // crmas
while ($data = fread($fp, 4096) and !$moodle_parser->finished) {
if ((time() - $lasttime) > 5) {
$lasttime = time();
backup_flush(1);
}
xml_parse($xml_parser, $data, feof($fp))
or die(sprintf("XML error: %s at line %d",
xml_error_string(xml_get_error_code($xml_parser)),
xml_get_current_line_number($xml_parser)));
}
fclose($fp);
}
//Get info from parser
@@ -5574,6 +5751,11 @@
$info = restore_read_xml_info ($xml_file);
//Reading course_header from file
$course_header = restore_read_xml_course_header ($xml_file);
if(!is_object($course_header)){
// ensure we fail if there is no course header
$course_header = false;
}
}
if (!defined('RESTORE_SILENTLY')) {
@@ -6687,7 +6869,7 @@
$newcontext = get_context_instance($contextlevel, $oldinstance->new_id);
$assignment->contextid = $newcontext->id; // new context id
// might already have same assignment
role_assign($assignment->roleid, $assignment->userid, 0, $assignment->contextid, $assignment->timestart, $assignment->timeend, $assignment->hidden, $assignment->enrol);
role_assign($assignment->roleid, $assignment->userid, 0, $assignment->contextid, $assignment->timestart, $assignment->timeend, $assignment->hidden, $assignment->enrol, $assignment->timemodified);
}
}
@@ -6704,7 +6886,7 @@
foreach ($overrides as $override) {
$override->capability = $override->name;
$oldmodifier = backup_getid($restore->backup_unique_code,"user",$override->modifierid);
$override->modifierid = $oldmodifier->new_id?$oldmodifier->new_id:0; // new modifier id here
$override->modifierid = !empty($oldmodifier->new_id)?$oldmodifier->new_id:0; // new modifier id here
$override->roleid = $role->new_id; // restored new role id
// hack to make the correct contextid for course level imports
+5 -26
View File
@@ -164,38 +164,17 @@ class block_admin extends block_list {
if (empty($course->metacourse) && ($course->id!==SITEID)) {
if (has_capability('moodle/legacy:guest', $context, NULL, false)) { // Are a guest now
$this->content->items[]='<a href="enrol.php?id='.$this->instance->pageid.'">'.get_string('enrolme', '', format_string($course->shortname)).'</a>';
$this->content->items[]='<a href="'.$CFG->wwwroot.'/course/enrol.php?id='.$this->instance->pageid.'">'.get_string('enrolme', '', format_string($course->shortname)).'</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/user.gif" class="icon" alt="" />';
} else if (has_capability('moodle/role:unassignself', $context, NULL, false)) { // Have some role
$this->content->items[]='<a href="unenrol.php?id='.$this->instance->pageid.'">'.get_string('unenrolme', '', format_string($course->shortname)).'</a>';
$this->content->items[]='<a href="'.$CFG->wwwroot.'/course/unenrol.php?id='.$this->instance->pageid.'">'.get_string('unenrolme', '', format_string($course->shortname)).'</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/user.gif" class="icon" alt="" />';
}
}
/// Should the following two be in this block?
/// View own activity report
// if ($course->showreports) {
// $this->content->items[]='<a href="user.php?id='.$this->instance->pageid.'&amp;user='.$USER->id.'">'.get_string('activityreport').'</a>';
// $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/report.gif" alt="" />';
// }
/// Edit your own profile
// $fullname = fullname($USER, has_capability('moodle/site:viewfullnames', $context));
// $editmyprofile = '<a title="'.$fullname.'" href="'.$CFG->wwwroot.'/user/edit.php?id='.$USER->id.'&amp;course='.$this->instance->pageid.'">'.get_string('editmyprofile').'</a>';
// if (empty($USER->description)) {
// //Accessibility: replace non-standard <blink> with CSS (<a> makes title visible in IE).
// $text = get_string('profile').' '.get_string('missingdescription');
// $this->content->items[]= $editmyprofile.' <a title="'.$text.'" class="useredit blink">*<span class="accesshide">'.$text.'</span></a>';
// } else {
// $this->content->items[]= $editmyprofile;
// }
// $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/user.gif" alt="" />';
/// Link to the user own profile
$this->content->items[]='<a href="'.$CFG->wwwroot.'/user/view.php?id='.$USER->id.'&amp;course='.$course->id.'">'.get_string('profile').'</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/user.gif" alt="" />';
return $this->content;
}
+9 -8
View File
@@ -41,7 +41,8 @@ class block_admin_tree extends block_base {
$this->tempcontent .= "&nbsp; &nbsp;";
}
$this->tempcontent .= '<a href="#" onclick="toggle(\'vh_span'. $this->spancounter .'\');return false">';
$this->tempcontent .= '<span id="vh_span' . $this->spancounter . 'indicator"><img src="' . $CFG->wwwroot . '/blocks/admin_tree/open.gif" alt="'.$strfolderopened.'" /></span> ';
$this->tempcontent .= '<span id="vh_span' . $this->spancounter . 'indicator"><img src="' . $CFG->pixpath . '/i/open.gif" alt="'.$strfolderopened.'" /></span> ';
$this->tempcontent .= $visiblename . '</a><br /><span id="vh_span' . $this->spancounter . '">' . "\n";
$this->currentdepth++;
$this->spancounter++;
@@ -66,12 +67,12 @@ class block_admin_tree extends block_base {
if (is_a($content, 'admin_settingpage')) {
if ($content->check_access() and !$content->is_hidden()) {
$class = ($content->name == $this->section) ? 'link current' : 'link';
$this->create_item($content->visiblename,$CFG->wwwroot.'/'.$CFG->admin.'/settings.php?section=' . $content->name,$CFG->wwwroot .'/blocks/admin_tree/item.gif', $class);
$this->create_item($content->visiblename,$CFG->wwwroot.'/'.$CFG->admin.'/settings.php?section=' . $content->name,$CFG->pixpath .'/i/item.gif', $class);
}
} else if (is_a($content, 'admin_externalpage')) {
if ($content->check_access() and !$content->is_hidden()) {
$class = ($content->name == $this->section) ? 'link current' : 'link';
$this->create_item($content->visiblename, $content->url, $CFG->wwwroot . '/blocks/admin_tree/item.gif', $class);
$this->create_item($content->visiblename, $content->url, $CFG->pixpath . '/i/item.gif', $class);
}
} else if (is_a($content, 'admin_category')) {
if ($content->check_access() and !$content->is_hidden()) {
@@ -144,11 +145,11 @@ class block_admin_tree extends block_base {
$this->content->text .= 'function toggle(spanid) {' . "\n";
$this->content->text .= ' if (getspan(spanid).innerHTML == "") {' . "\n";
$this->content->text .= ' getspan(spanid).innerHTML = vh_content[spanid];' . "\n";
$this->content->text .= ' getspan(spanid + "indicator").innerHTML = \'<img src="' . $CFG->wwwroot . '/blocks/admin_tree/open.gif" alt="'.$strfolderopened.'" />\';' . "\n";
$this->content->text .= ' getspan(spanid + "indicator").innerHTML = \'<img src="' . $CFG->pixpath . '/i/open.gif" alt="'.$strfolderopened.'" />\';' . "\n";
$this->content->text .= ' } else {' . "\n";
$this->content->text .= ' vh_content[spanid] = getspan(spanid).innerHTML;' . "\n";
$this->content->text .= ' getspan(spanid).innerHTML = "";' . "\n";
$this->content->text .= ' getspan(spanid + "indicator").innerHTML = \'<img src="' . $CFG->wwwroot . '/blocks/admin_tree/closed.gif" alt="'.$strfolderclosed.'" />\';' . "\n";
$this->content->text .= ' getspan(spanid + "indicator").innerHTML = \'<img src="' . $CFG->pixpath . '/i/closed.gif" alt="'.$strfolderclosed.'" />\';' . "\n";
$this->content->text .= ' }' . "\n";
$this->content->text .= '}' . "\n";
@@ -156,13 +157,13 @@ class block_admin_tree extends block_base {
$this->content->text .= ' if (getspan(spanid).innerHTML !== "") {' . "\n";
$this->content->text .= ' vh_content[spanid] = getspan(spanid).innerHTML;' . "\n";
$this->content->text .= ' getspan(spanid).innerHTML = "";' . "\n";
$this->content->text .= ' getspan(spanid + "indicator").innerHTML = \'<img src="' . $CFG->wwwroot . '/blocks/admin_tree/closed.gif" alt="'.$strfolderclosed.'" />\';' . "\n";
$this->content->text .= ' getspan(spanid + "indicator").innerHTML = \'<img src="' . $CFG->pixpath . '/i/closed.gif" alt="'.$strfolderclosed.'" />\';' . "\n";
$this->content->text .= ' }' . "\n";
$this->content->text .= '}' . "\n";
$this->content->text .= 'function expand(spanid) {' . "\n";
$this->content->text .= ' getspan(spanid).innerHTML = vh_content[spanid];' . "\n";
$this->content->text .= ' getspan(spanid + "indicator").innerHTML = \'<img src="' . $CFG->wwwroot . '/blocks/admin_tree/open.gif" alt="'.$strfolderopened.'" />\';' . "\n";
$this->content->text .= ' getspan(spanid + "indicator").innerHTML = \'<img src="' . $CFG->pixpath . '/i/open.gif" alt="'.$strfolderopened.'" />\';' . "\n";
$this->content->text .= '}' . "\n";
$this->content->text .= 'function expandall() {' . "\n";
@@ -195,7 +196,7 @@ class block_admin_tree extends block_base {
$searchcontent = isset($CFG->adminsearchquery) ? $CFG->adminsearchquery : '';
$this->content->footer = '<div class="adminsearchform">'.
'<form action="'.$CFG->wwwroot.'/admin/search.php" method="get"><div>'.
'<form action="'.$CFG->wwwroot.'/'.$CFG->admin.'/search.php" method="get"><div>'.
'<label for="query" class="accesshide">'.get_string('searchinsettings', 'admin').'</label>'.
'<input type="text" name="query" id="query" size="8" value="'.s($searchcontent).'" />'.
'<input type="submit" value="'.get_string('search').'" /></div>'.
@@ -45,6 +45,12 @@ class block_calendar_month extends block_base {
// We 'll need this later
calendar_set_referring_course($courseshown);
// MDL-9059, set to show this course when admins go into a course, then unset it.
if ($COURSE->id != SITEID && !isset($SESSION->cal_courses_shown[$COURSE->id]) && has_capability('moodle/calendar:manageentries', get_context_instance(CONTEXT_SYSTEM))) {
$courseset = true;
$SESSION->cal_courses_shown[$COURSE->id] = $COURSE;
}
// Be VERY careful with the format for default courses arguments!
// Correct formatting is [courseid] => 1 to be concise with moodlelib.php functions.
calendar_set_filters($courses, $group, $user, $filtercourse, $filtercourse);
@@ -63,6 +69,11 @@ class block_calendar_month extends block_base {
$this->content->text .= '<div class="filters">'.calendar_filter_controls('course', '', $COURSE).'</div>';
}
// MDL-9059, unset this so that it doesn't stay in session
if (!empty($courseset)) {
unset($SESSION->cal_courses_shown[$COURSE->id]);
}
return $this->content;
}
+4 -4
View File
@@ -53,10 +53,10 @@ class block_course_list extends block_list {
if (has_capability('moodle/course:update', get_context_instance(CONTEXT_SYSTEM)) || empty($CFG->block_course_list_hideallcourseslink)) {
$this->content->footer = "<a href=\"$CFG->wwwroot/course/index.php\">".get_string("fulllistofcourses")."</a> ...";
}
$this->get_remote_courses();
if ($this->content->items) { // make sure we don't return an empty list
return $this->content;
}
}
$this->get_remote_courses();
if ($this->content->items) { // make sure we don't return an empty list
return $this->content;
}
}
@@ -208,5 +208,17 @@ class block_glossary_random extends block_base {
return false;
}
/**
* Executed after block instance has been created, we use it to recode
* the glossary config setting to point to the new (restored) one
*/
function after_restore($restore) {
/// We need to transform the glossary->id from the original one to the restored one
if ($rec = backup_getid($restore->backup_unique_code, 'glossary', $this->config->glossary)) {
$this->config->glossary = $rec->new_id;
$this->instance_config_commit();
}
}
}
?>
+8 -3
View File
@@ -12,7 +12,7 @@ class block_html extends block_base {
}
function specialization() {
$this->title = isset($this->config->title) ? $this->config->title : get_string('newhtmlblock', 'block_html');
$this->title = isset($this->config->title) ? format_string($this->config->title) : get_string('newhtmlblock', 'block_html');
}
function instance_allow_multiple() {
@@ -24,8 +24,13 @@ class block_html extends block_base {
return $this->content;
}
$filteropt = new stdClass;
$filteropt->noclean = true;
if (!empty($this->instance->pinned) or $this->instance->pagetype === 'course-view') {
// fancy html allowed only on course page and in pinned blocks for security reasons
$filteropt = new stdClass;
$filteropt->noclean = true;
} else {
$filteropt = null;
}
$this->content = new stdClass;
$this->content->text = isset($this->config->text) ? format_text($this->config->text, FORMAT_HTML, $filteropt) : '';
+9 -2
View File
@@ -1,4 +1,11 @@
<?php $usehtmleditor = can_use_html_editor(); ?>
<?php
$usehtmleditor = can_use_html_editor();
$text = isset($this->config->text) ? $this->config->text : '';
if (empty($this->instance->pinned) and $this->instance->pagetype !== 'course-view') {
$text = clean_text($text, FORMAT_HTML);
}
?>
<table cellpadding="9" cellspacing="0">
<tr valign="top">
<td align="right"><?php print_string('configtitle', 'block_html'); ?>:</td>
@@ -6,7 +13,7 @@
</tr>
<tr valign="top">
<td align="right"><?php print_string('configcontent', 'block_html'); ?>:</td>
<td><?php print_textarea($usehtmleditor, 25, 50, 0, 0, 'text', isset($this->config->text)?$this->config->text:'') ?></td>
<td><?php print_textarea($usehtmleditor, 25, 50, 0, 0, 'text', $text) ?></td>
</tr>
<tr>
<td colspan="3" align="center">

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