Compare commits

..

1096 Commits

Author SHA1 Message Date
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
755 changed files with 40418 additions and 10914 deletions
+2 -1
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,7 +51,7 @@ 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");
/// Get the auth title (from core or own auth lang files)
$authtitle = get_string("auth_{$auth}title", "auth");
+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>";
+3 -3
View File
@@ -224,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)) {
@@ -364,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') {
+46 -6
View File
@@ -117,6 +117,16 @@
<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">
@@ -167,6 +177,16 @@
<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">
@@ -180,6 +200,11 @@
<ON_OK message="questioncwqpfsok" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/customcheckslib.php" function="php_check_register_globals" level="optional">
<FEEDBACK>
<ON_CHECK message="globalswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="2.0" requires="1.9">
@@ -200,8 +225,9 @@
<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.0" level="required">
<PHP version="5.2.4" level="required">
</PHP>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="optional">
@@ -214,9 +240,9 @@
<ON_CHECK message="mbstringrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="optional">
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_CHECK message="curlrecommended" />
<ON_CHECK message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="optional">
@@ -229,12 +255,26 @@
<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="question/upgrade.php" function="question_check_no_rqp_questions" level="optional">
<CUSTOM_CHECK file="lib/customcheckslib.php" function="php_check_register_globals" level="optional">
<FEEDBACK>
<ON_CHECK message="qtyperqpwillberemovedanyway" />
<ON_OK message="qtyperqpwillberemoved" />
<ON_CHECK message="globalswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
+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() {
+24 -5
View File
@@ -282,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" />';
@@ -409,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");
@@ -539,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');
@@ -582,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>';
+1 -1
View File
@@ -46,7 +46,7 @@ print_heading(get_string('mnetsettings', 'mnet'));
</td>
</tr>
</table>
</center>
</div>
<?php
print_footer();
?>
+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);
+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';
+3 -4
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,7 +57,7 @@
<?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)) {
$fullname = fullname($user, true);
echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
+15 -6
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) {
@@ -293,8 +300,9 @@
$availableusers = get_recordset_sql($select . $from . $where . $selectsql . $excsql);
}
$usercount = count_records_sql($countselect . $from . $where) - count($contextusers);
$usercount = $availableusers->_numOfRows;
}
} else {
@@ -320,8 +328,9 @@
AND r.roleid = '.$roleid.'
'.$selectsql.')
ORDER BY lastname ASC, firstname ASC');
$usercount = count_records_select('user', $select) - count($contextusers);
$usercount = $availableusers->_numOfRows;
}
echo '<div style="text-align:center">'.$strcurrentcontext.': '.print_context_name($context).'<br/>';
+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);
}
+1
View File
@@ -35,6 +35,7 @@ $temp->add(new admin_setting_configselect('bloglevel', get_string('bloglevel', '
$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),
+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
-2
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,
+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) {
@@ -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';
+1 -1
View File
@@ -1123,4 +1123,4 @@ if (!empty($this->config->attrcreators)) {
return $text;
}
}
?>
?>
+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);
}
}
+70 -22
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 (stripos($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();
@@ -694,7 +720,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 +860,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 +882,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 +902,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 +937,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 +1067,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 +1204,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;
@@ -1367,7 +1415,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;
}
@@ -1458,7 +1506,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);
@@ -1650,7 +1698,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))
@@ -1671,7 +1719,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');
@@ -1738,7 +1786,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");
@@ -1784,7 +1832,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");
@@ -1794,7 +1842,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];
+10 -7
View File
@@ -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'));
}
@@ -289,7 +289,7 @@ class auth_plugin_mnet extends auth_plugin_base {
// 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 = '';
@@ -1262,8 +1262,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 +1311,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
+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 />";
}
+31 -11
View File
@@ -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) {
+133 -187
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;
}
@@ -667,7 +663,7 @@
/// 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 {
@@ -918,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));
}
@@ -1054,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
@@ -1151,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") {
@@ -1178,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
@@ -1270,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
@@ -1698,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
@@ -1849,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.
@@ -1911,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']}");
}
}
@@ -2300,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 -2
View File
@@ -55,7 +55,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");
}
}
@@ -105,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;
}
+1 -1
View File
@@ -239,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 {
+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");
}
}
+2 -2
View File
@@ -224,7 +224,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
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"]);
echo "</td>";
@@ -233,7 +233,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
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>";
+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");
}
}
+221 -94
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
@@ -800,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 {
@@ -855,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;
@@ -1497,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
@@ -1508,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)) {
@@ -1588,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
@@ -1630,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");
}
@@ -1771,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;
}
@@ -2220,9 +2302,10 @@
sql_compare_text($literal_description);
}
$gro_db = get_record_sql("SELECT *
FROM {$CFG->prefix}groups
WHERE courseid = $restore->course_id AND
name = '{$gro->name}'" . $description_clause);
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;
@@ -2517,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);
@@ -2542,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;
@@ -2569,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@$");
@@ -2606,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);
}
}
}
@@ -3242,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);
}
}
}
}
@@ -3281,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
@@ -3295,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
@@ -3310,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
@@ -3324,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
@@ -3338,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
@@ -3352,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") {
@@ -3375,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
@@ -3390,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
@@ -3426,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
@@ -3453,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
@@ -3481,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
@@ -3508,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
@@ -3535,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
@@ -3563,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
@@ -3591,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
@@ -3619,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
@@ -3642,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
}
@@ -5475,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
@@ -5629,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')) {
@@ -6759,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
+3 -24
View File
@@ -172,30 +172,9 @@ class block_admin extends block_list {
}
}
/// 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;
}
+8 -7
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";
@@ -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();
}
}
}
?>
+2 -2
View File
@@ -15,7 +15,7 @@ class block_loancalc extends block_base {
$this->content->text = '
<script type="text/javascript">
<![CDATA[
//<![CDATA[
function Next()
{
submitScreen("Next");
@@ -148,7 +148,7 @@ function comp(v) { // general entry point for all cases
}
} // function comp
]]>
//]]>
</script>
<h1></h1>
+4
View File
@@ -9,6 +9,10 @@ class block_messages extends block_base {
function get_content() {
global $USER, $CFG;
if (!$CFG->messaging) {
return '';
}
if ($this->content !== NULL) {
return $this->content;
}
+1
View File
@@ -50,6 +50,7 @@ class block_mnet_hosts extends block_list {
WHERE
h.id != '{$CFG->mnet_localhost_id}' AND
h.id = h2s_IDP.hostid AND
h.deleted = 0 AND
h2s_IDP.serviceid = s_IDP.id AND
s_IDP.name = 'sso_idp' AND
h2s_IDP.publish = '1' AND
+11 -11
View File
@@ -259,17 +259,17 @@ class block_base {
$title = '<div class="title">';
if (!empty($CFG->allowuserblockhiding)) {
//Accessibility: added static 'alt' text for the +- icon.
//TODO (nfreear): language string 'hide OR show block'
$title .= '<div class="hide-show">'.
'<a title="'.get_string('showhideblock','access').
'" href="#" onclick="elementToggleHide(this, true, function(el) {'.
'return findParentNode(el, \'DIV\', \'sideblock\'); '.
'}, \''.$CFG->pixpath.'\' ); return false;">'.
'<img src="'.$CFG->pixpath.'/spacer.gif" '.
'id = "togglehide_inst'.$this->instance->id.'" '.
'alt="'.get_string('showhideblock','access').'" class="hide-show-image" /></a></div>';
}
//Accessibility: added 'alt' text for the +- icon.
//Theme the buttons using, Admin - Miscellaneous - smartpix.
$strshow = addslashes_js(get_string('showblocka', 'access', strip_tags($this->title)));
$strhide = addslashes_js(get_string('hideblocka', 'access', strip_tags($this->title)));
$title .= '<input type="image" src="'.$CFG->pixpath.'/t/switch_minus.gif" '.
'id="togglehide_inst'.$this->instance->id.'" '.
'onclick="elementToggleHide(this, true, function(el) {'.
'return findParentNode(el, \'DIV\', \'sideblock\'); },'.
' \''.$strshow.'\', \''.$strhide.'\'); return false;" '.
'alt="'.$strhide.'" title="'.$strhide.'" class="hide-show-image" />';
}
//Accesssibility: added H2 (was in, weblib.php: print_side_block)
$title .= '<h2>'.$this->title.'</h2>';
+1 -1
View File
@@ -89,7 +89,7 @@ class block_online_users extends block_base {
// user has a hidden role assigned at this context or any parent contexts,
// ignore this user
$SQL = "SELECT id,id FROM {$CFG->prefix}role_assignments
$SQL = "SELECT id FROM {$CFG->prefix}role_assignments
WHERE userid = $puser->id
AND contextid $pcontext
AND hidden = 1";
+3 -2
View File
@@ -8,7 +8,7 @@ class block_participants extends block_list {
function get_content() {
global $CFG;
global $CFG, $COURSE;
if (empty($this->instance)) {
$this->content = '';
@@ -20,7 +20,8 @@ class block_participants extends block_list {
return '';
}
if (!$currentcontext = get_context_instance(CONTEXT_COURSE, $this->instance->pageid)) {
/// MDL-13252 Always get the course context or else the context may be incorrect in the user/index.php
if (!$currentcontext = get_context_instance(CONTEXT_COURSE, $COURSE->id)) {
$this->content = '';
return $this->content;
}
+15
View File
@@ -0,0 +1,15 @@
This block is a revamping of the Google Summer Of Code Project (2006) on Global Search engine
for Moodle. New block version is completed and internationalized according to Moodle multilengual support.
This block instanciates a startup database model for the search engine.
## Installing
You need installing the following elements in order the global search to be available :
1. The global search bloc (this block)
2. update the /search root package from CVS
3. The antiword libraries
4. The xpdf libraries
Both last libraries are provided as a patch called "global_search_libraries" in the contrib section.
+27 -13
View File
@@ -1,21 +1,25 @@
<?php
/* This is the global search shortcut block - a single query can be entered, and
the user will be redirected to the query page where they can enter more
advanced queries, and view the results of their search. When searching from
this block, the broadest possible selection of documents is searched.
Author: Michael Champanis (mchampan)
Date: 2006 06 25
Todo: make strings -> get_string()
* the user will be redirected to the query page where they can enter more
* advanced queries, and view the results of their search. When searching from
* this block, the broadest possible selection of documents is searched.
*
*
* Todo: make strings -> get_string()
*
* @package search
* @subpackage search block
* @author: Michael Champanis (mchampan), reengineered by Valery Fremaux
* @date: 2006 06 25
*/
class block_search extends block_base {
function init() {
$this->title = "Global Search"; //get_string()
$this->version = 2006062500;
$this->title = get_string('blockname', 'block_search');
$this->cron = 1;
$this->version = 2008031500;
} //init
// only one instance of this block is required
@@ -45,8 +49,8 @@
//lazy check for the moment
if (check_php_version("5.0.0")) {
//fetch values if defined in admin, otherwise use defaults
$label = (isset($CFG->block_search_text)) ? $CFG->block_search_text : "Search Moodle";
$button = (isset($CFG->block_search_button)) ? $CFG->block_search_button : "Go";
$label = (!empty($CFG->block_search_text)) ? $CFG->block_search_text : get_string('searchmoodle', 'block_search');
$button = (!empty($CFG->block_search_button)) ? $CFG->block_search_button : get_string('go', 'block_search');
//basic search form
$this->content->text =
@@ -68,7 +72,17 @@
function specialisation() {
//empty!
} //specialisation
/**
* wraps up to search engine cron
*
*/
function cron(){
global $CFG;
include($CFG->dirroot.'/search/cron.php');
}
} //block_search
?>
?>
+144 -17
View File
@@ -1,19 +1,146 @@
<div style="text-align:center;">
<label for="block_search_text">Search label</label>
<input id="block_search_text" type="text" name="block_search_text" value="<?php
if(isset($CFG->block_search_text)) {
p($CFG->block_search_text);
} else {
p("Search Moodle");
} ?>"/><br/>
<label for="block_search_button">Button label</label>
<input id="block_search_button" type="text" name="block_search_button" value="<?php
if(isset($CFG->block_search_button)) {
p($CFG->block_search_button);
} else {
p("Go");
} ?>"/><br/><br/>
<input type="submit" value="<?php print_string('savechanges'); ?>" />
<table cellspacing="5">
<tr>
<td valign="top" align="right">
<b><?php print_string('configsearchtext', 'block_search') ?>:</b>
</td>
<td valign="top" align="left">
<input id="block_search_text" type="text" name="block_search_text" value="<?php
if(isset($CFG->block_search_text)) {
p($CFG->block_search_text);
} else {
p(get_string('searchmoodle', 'block_search'));
} ?>"/><br/>
</td>
</tr>
<tr>
<td valign="top" align="right">
<b><?php print_string('configbuttonlabel', 'block_search') ?>:</b>
</td>
<td valign="top" align="left">
<input id="block_search_button" type="text" name="block_search_button" value="<?php
if(isset($CFG->block_search_button)) {
p($CFG->block_search_button);
} else {
p(get_string('go', 'block_search'));
} ?>"/><br/><br/>
</td>
</tr>
<tr>
<td valign="top" align="right">
<b><?php print_string('configenablefileindexing', 'block_search') ?>:</b>
</td>
<td valign="top" align="left">
<input id="block_enable_file_indexing" type="radio" name="block_search_enable_file_indexing" value="1" <?php
if(isset($CFG->block_search_enable_file_indexing) && $CFG->block_search_enable_file_indexing) {
echo " checked=\"checked\" ";
} ?> /> <?php print_string('yes') ?> -
<input id="block_search_enable_file_indexing" type="radio" name="block_search_enable_file_indexing" value="0" <?php
if(!isset($CFG->block_search_enable_file_indexing) || !$CFG->block_search_enable_file_indexing) {
echo " checked=\"checked\" ";
} ?> /> <?php print_string('no') ?>
<br/><br/>
</td>
</tr>
<tr>
<td valign="top" align="right">
<b><?php print_string('configfiletypes', 'block_search') ?>:</b>
</td>
<td valign="top" align="left">
<input id="block_search_filetypes" type="text" name="block_search_filetypes" value="<?php
if(isset($CFG->block_search_filetypes)) {
p($CFG->block_search_filetypes);
} else {
p("PDF,TXT,HTML,PPT,XML,DOC,HTM");
} ?>"/><br/><br/>
</td>
</tr>
<tr>
<td valign="top" align="right">
<b><?php print_string('usemoodleroot', 'block_search') ?>:</b>
</td>
<td valign="top" align="left">
<?php
$usemoodleroot = (isset($CFG->block_search_usemoodleroot)) ? 'checked="checked"' : '' ;
$notusemoodleroot = (!isset($CFG->block_search_usemoodleroot)) ? 'checked="checked"' : '' ;
?>
<input id="block_search_usemoodleroot" type="radio" name="block_search_usemoodleroot" <?php echo $usemoodleroot ?> value="1"/> <?php print_string('yes') ?> -
<input id="block_search_usemoodleroot" type="radio" name="block_search_usemoodleroot" <?php echo $notusemoodleroot ?> value="0"/> <?php print_string('no') ?>
<br/><br/>
</td>
</tr>
<tr>
<td valign="top" align="right">
<b><?php print_string('configpdftotextcmd', 'block_search') ?>:</b>
</td>
<td valign="top" align="left">
<input id="block_search_pdf_to_text_cmd" type="text" size="60" name="block_search_pdf_to_text_cmd" value="<?php
if(isset($CFG->block_search_pdf_to_text_cmd)) {
p($CFG->block_search_pdf_to_text_cmd);
} else {
$encoding = ($CFG->unicodedb) ? "-enc UTF-8" : "-enc ISO-8859-1" ;
if ($CFG->ostype == 'WINDOWS'){
p("lib/xpdf/win32/pdftotext.exe -eol dos $encoding -q");
}
else{
p("lib/xpdf/linux/pdftotext $encoding -eol unix -q");
}
} ?>"/><br/><br/>
</td>
</tr>
<tr>
<td valign="top" align="right">
<b><?php print_string('configwordtotextcmd', 'block_search') ?>:</b>
</td>
<td valign="top" align="left">
<input id="block_search_word_to_text_cmd" type="text" size="60" name="block_search_word_to_text_cmd" value="<?php
if(isset($CFG->block_search_word_to_text_cmd)) {
p($CFG->block_search_word_to_text_cmd);
} else {
if ($CFG->ostype == 'WINDOWS'){
p("lib/antiword/win32/antiword/antiword.exe ");
}
else{
p("lib/antiword/linux/usr/bin/antiword");
}
} ?>"/><br/><br/>
</td>
</tr>
<tr>
<td valign="top" align="right">
<b><?php print_string('configwordtotextenv', 'block_search') ?>:</b>
</td>
<td valign="top" align="left">
<input id="block_search_word_to_text_env" type="text" size="60" name="block_search_word_to_text_env" value="<?php
if(isset($CFG->block_search_word_to_text_env)) {
echo stripslashes($CFG->block_search_word_to_text_env);
} else {
if ($CFG->ostype == 'WINDOWS'){
p("HOME={$CFG->dirroot}\\lib\\antiword\\win32");
}
else{
p("ANTIWORDHOME={$CFG->dirroot}/lib/antiword/linux/usr/share/antiword");
}
} ?>"/><br/><br/>
</td>
</tr>
<tr>
<td valign="top" align="right">
<b><?php print_string('configlimitindexbody', 'block_search') ?>:</b>
</td>
<td valign="top" align="left">
<input id="block_search_limit_index_body" type="text" size="8" name="block_search_limit_index_body" value="<?php
if(isset($CFG->block_search_limit_index_body)) {
p($CFG->block_search_limit_index_body);
} else {
p('');
} ?>"/> <?php print_string('bytes', 'block_search') ?><br/><br/>
</td>
</tr>
<tr>
<td valign="top" align="right" colspan="2">
<input type="submit" value="<?php print_string('savechanges'); ?>" />
</td>
</tr>
</table>
</div>
+30
View File
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8" ?>
<XMLDB PATH="blocks/search/db" VERSION="20070811" COMMENT="XMLDB file for Moodle search engine"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
>
<TABLES>
<TABLE NAME="block_search_documents" COMMENT="table to store search index backups">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="docid"/>
<FIELD NAME="docid" TYPE="char" LENGTH="32" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="doctype"/>
<FIELD NAME="doctype" TYPE="char" LENGTH="32" NOTNULL="true" DEFAULT="none" SEQUENCE="false" ENUM="false" PREVIOUS="docid" NEXT="itemtype"/>
<FIELD NAME="itemtype" TYPE="char" LENGTH="32" NOTNULL="true" DEFAULT="standard" SEQUENCE="false" ENUM="false" PREVIOUS="doctype" NEXT="title"/>
<FIELD NAME="title" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="itemtype" NEXT="url"/>
<FIELD NAME="url" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="title" NEXT="docdate"/>
<FIELD NAME="docdate" TYPE="datetime" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="url" NEXT="updated"/>
<FIELD NAME="updated" TYPE="datetime" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="docdate" NEXT="courseid"/>
<FIELD NAME="courseid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="updated" NEXT="groupid"/>
<FIELD NAME="groupid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="courseid"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" />
</KEYS>
<INDEXES>
<INDEX NAME="mdl_search_docid" UNIQUE="false" FIELDS="docid" NEXT="mdl_search_doctype"/>
<INDEX NAME="mdl_search_doctype" UNIQUE="false" FIELDS="doctype" PREVIOUS="mdl_search_docid" NEXT="mdl_search_itemtype"/>
<INDEX NAME="mdl_search_itemtype" UNIQUE="false" FIELDS="itemtype" PREVIOUS="mdl_search_doctype"/>
</INDEXES>
</TABLE>
</TABLES>
</XMLDB>
-24
View File
@@ -1,24 +0,0 @@
<?php
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// IT IS USED ONLY FOR UPGRADES FROM BEFORE MOODLE 1.7, ALL
// LATER CHANGES SHOULD USE upgrade.php IN THIS DIRECTORY.
//
// This file is tailored to MySQL
function search_upgrade($oldversion=0) {
global $CFG;
$result = true;
if ($oldversion < 2006062500 and $result) {
$result = true; //Nothing to do
}
////// DO NOT ADD NEW THINGS HERE!! USE upgrade.php and the lib/ddllib.php functions.
//Finally, return result
return $result;
}
-24
View File
@@ -1,24 +0,0 @@
<?php
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// IT IS USED ONLY FOR UPGRADES FROM BEFORE MOODLE 1.7, ALL
// LATER CHANGES SHOULD USE upgrade.php IN THIS DIRECTORY.
//
// This file is tailored to pgsql
function search_upgrade($oldversion=0) {
global $CFG;
$result = true;
if ($oldversion < 2006062500 and $result) {
$result = true; //Nothing to do
}
////// DO NOT ADD NEW THINGS HERE!! USE upgrade.php and the lib/ddllib.php functions.
//Finally, return result
return $result;
}
+75
View File
@@ -31,6 +31,81 @@ function xmldb_block_search_upgrade($oldversion=0) {
/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
/// $result = result of "/lib/ddllib.php" function calls
/// }
if ($result && $oldversion < 2007071302) {
/// Define table search_documents to be created
$table = new XMLDBTable('search_documents');
/// Drop it if it existed before
drop_table($table, true, false);
/// Adding fields to table search_documents
$table->addFieldInfo('id', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, XMLDB_SEQUENCE, null, null, null);
$table->addFieldInfo('docid', XMLDB_TYPE_CHAR, '32', null, XMLDB_NOTNULL, null, null, null, null);
$table->addFieldInfo('doctype', XMLDB_TYPE_CHAR, '32', null, XMLDB_NOTNULL, null, null, null, 'none');
$table->addFieldInfo('itemtype', XMLDB_TYPE_CHAR, '32', null, XMLDB_NOTNULL, null, null, null, 'standard');
$table->addFieldInfo('title', XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null, null);
$table->addFieldInfo('url', XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null, null);
$table->addFieldInfo('docdate', XMLDB_TYPE_DATETIME, null, null, XMLDB_NOTNULL, null, null, null);
$table->addFieldInfo('updated', XMLDB_TYPE_DATETIME, null, null, XMLDB_NOTNULL, null, null, null);
$table->addFieldInfo('courseid', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0');
$table->addFieldInfo('groupid', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0');
/// Adding keys to table search_documents
$table->addKeyInfo('primary', XMLDB_KEY_PRIMARY, array('id'));
/// Adding indexes to table search_documents
$table->addIndexInfo('mdl_search_docid', XMLDB_INDEX_NOTUNIQUE, array('docid'));
$table->addIndexInfo('mdl_search_doctype', XMLDB_INDEX_NOTUNIQUE, array('doctype'));
$table->addIndexInfo('mdl_search_itemtype', XMLDB_INDEX_NOTUNIQUE, array('itemtype'));
/// Launch create table for search_documents
$result = $result && create_table($table);
}
/// Rename table search_documents to block_search_documents and
/// fix some defaults (MDL-10572)
if ($result && $oldversion < 2007081100) {
/// Define table search_documents to be renamed to block_search_documents
$table = new XMLDBTable('search_documents');
/// Launch rename table for block_search_documents
$result = $result && rename_table($table, 'block_search_documents');
/// Changing the default of field doctype on table block_search_documents to none
$table = new XMLDBTable('block_search_documents');
$field = new XMLDBField('doctype');
$field->setAttributes(XMLDB_TYPE_CHAR, '32', null, XMLDB_NOTNULL, null, null, null, 'none', 'docid');
/// Launch change of default for field doctype
$result = $result && change_field_default($table, $field);
/// Changing the default of field itemtype on table block_search_documents to standard
$table = new XMLDBTable('block_search_documents');
$field = new XMLDBField('itemtype');
$field->setAttributes(XMLDB_TYPE_CHAR, '32', null, XMLDB_NOTNULL, null, null, null, 'standard', 'doctype');
/// Launch change of default for field itemtype
$result = $result && change_field_default($table, $field);
/// Changing the default of field title on table block_search_documents to drop it
$table = new XMLDBTable('block_search_documents');
$field = new XMLDBField('title');
$field->setAttributes(XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null, null, null, 'itemtype');
/// Launch change of default for field title
$result = $result && change_field_default($table, $field);
/// Changing the default of field url on table block_search_documents to drop it
$table = new XMLDBTable('block_search_documents');
$field = new XMLDBField('url');
$field->setAttributes(XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null, null, null, 'title');
/// Launch change of default for field url
$result = $result && change_field_default($table, $field);
}
return $result;
}
+7
View File
@@ -114,6 +114,13 @@ switch ($filtertype) {
if (!$user = get_record('user', 'id', $filterselect)) {
error('Incorrect user id');
}
if ($user->deleted) {
print_header();
print_heading(get_string('userdeleted'));
print_footer();
die;
}
if ($USER->id == $filterselect) {
if (!has_capability('moodle/blog:create', $sitecontext)
and !has_capability('moodle/blog:view', $sitecontext)) {
+2 -2
View File
@@ -144,9 +144,9 @@
global $USER, $CFG, $COURSE, $ME;
$template['body'] = format_text($blogEntry->summary, $blogEntry->format);
//$template['title'] = '<a name="'. $blogEntry->subject .'"></a>';
$template['title'] = '<a id=b"'. s($blogEntry->id) .'" />';
//enclose the title in nolink tags so that moodle formatting doesn't autolink the text
$template['title'] = '<span class="nolink">'.$blogEntry->subject.'</span>';
$template['title'] .= '<span class="nolink">'. format_string($blogEntry->subject) .'</span>';
$template['userid'] = $blogEntry->userid;
$template['author'] = fullname(get_record('user','id',$blogEntry->userid));
$template['lastmod'] = userdate($blogEntry->lastmodified);
+17 -13
View File
@@ -97,6 +97,8 @@
}
}
$form = null;
switch($action) {
case 'delete':
$title = get_string('deleteevent', 'calendar');
@@ -153,25 +155,23 @@
}
execute_sql('UPDATE '.$CFG->prefix.'event SET '.
'name = '.$db->qstr($form->name).','.
'description = '.$db->qstr($form->description).','.
'name = \''.$form->name.'\','.
'description = \''.$form->description.'\','.
'timestart = '.$timestartoffset.','.
'timeduration = '.$form->timeduration.','.
'timemodified = '.time().' WHERE repeatid = '.$event->repeatid);
/// Log the event update.
$form->name = stripslashes($form->name); //To avoid double-slashes
add_to_log($form->courseid, 'calendar', 'edit all', 'event.php?action=edit&amp;id='.$form->id, $form->name);
add_to_log($form->courseid, 'calendar', 'edit all', 'event.php?action=edit&amp;id='.$form->id, stripslashes($form->name));
}
else {
// Update this
$form->timemodified = time();
update_record('event', $form);
/// Log the event update.
$form->name = stripslashes($form->name); //To avoid double-slashes
add_to_log($form->courseid, 'calendar', 'edit', 'event.php?action=edit&amp;id='.$form->id, $form->name);
add_to_log($form->courseid, 'calendar', 'edit', 'event.php?action=edit&amp;id='.$form->id, stripslashes($form->name));
}
// OK, now redirect to day view
@@ -212,13 +212,14 @@
if (count($err) == 0) {
$form->timemodified = time();
if ($form->repeat) {
$fetch = get_record_sql('SELECT 1, MAX(repeatid) AS repeatid FROM '.$CFG->prefix.'event');
$form->repeatid = empty($fetch) ? 1 : $fetch->repeatid + 1;
}
/// Get the event id for the log record.
$eventid = insert_record('event', $form, true);
/// Use the event id as the repeatid to link repeat entries together
if ($form->repeat) {
$form->repeatid = $form->id = $eventid;
update_record('event', $form); // update the row, to set its repeatid
}
/// Log the event entry.
add_to_log($form->courseid, 'calendar', 'add', 'event.php?action=edit&amp;id='.$eventid, stripslashes($form->name));
@@ -255,6 +256,8 @@
break;
}
$form = stripslashes_recursive($form);
// Let's see if we are supposed to provide a referring course link
// but NOT for the "main page" course
if($SESSION->cal_course_referer != SITEID &&
@@ -297,6 +300,7 @@
}
}
echo '</td></tr></table>';
redirect(CALENDAR_URL.'view.php?view=day&amp;course='.$urlcourse.'&cal_d='.$_REQUEST['d'].'&cal_m='.$_REQUEST['m'].'&cal_y='.$_REQUEST['y']);
}
+1 -1
View File
@@ -40,7 +40,7 @@
<form method="get" action="view.php" id="cancel">
<p>
&nbsp;
<input type="submit" value=" <?php print_string('cancel') ?> ">
<input type="submit" value=" <?php print_string('cancel') ?> " />
<input type="hidden" name="view" value="day" />
<input type="hidden" name="cal_m" value="<?php echo $m; ?>" />
<input type="hidden" name="cal_d" value="<?php echo $d; ?>" />
+3 -3
View File
@@ -47,9 +47,9 @@ function generate_url() {
preset_time = "recentupcoming";
}
url = "<?php echo $CFG->wwwroot; ?>/calendar/export_execute.php?preset_what=" + preset_what + "&amp;preset_time=" + preset_time + "&amp;username=<?php echo $usernameencoded; ?>&amp;authtoken=<?php echo $authtoken; ?>";
document.getElementById("url").innerText = url;
document.getElementById("url").innerHTML = url; //Need this as well, for Firefox
urlstr = "<?php echo $CFG->wwwroot; ?>/calendar/export_execute.php?preset_what=" + preset_what + "&amp;preset_time=" + preset_time + "&amp;username=<?php echo $usernameencoded; ?>&amp;authtoken=<?php echo $authtoken; ?>";
document.getElementById("url").innerText = urlstr;
document.getElementById("url").innerHTML = urlstr; //Need this as well, for Firefox
document.getElementById("urlbox").style.display = "block";
}
+17 -5
View File
@@ -30,12 +30,24 @@ $allowed_time = array('weeknow', 'weeknext', 'monthnow', 'monthnext', 'recentupc
if(!empty($what) && !empty($time)) {
if(in_array($what, $allowed_what) && in_array($time, $allowed_time)) {
$courses = get_my_courses($user->id, NULL, 'id, visible, shortname');
$include_user = ($what == 'all');
if ($include_user) {
//Also include site (global) events
if ($what == 'all') {
$users = $user->id;
$groups = array();
foreach ($courses as $course) {
$course_groups = groups_get_all_groups($course->id, $user->id);
if ($course_groups) {
$groups = $groups + array_keys($course_groups);
}
}
if (empty($groups)) {
$groups = false;
}
$courses[SITEID] = new stdClass;
$courses[SITEID]->shortname = get_string('globalevents', 'calendar');
} else {
$users = false;
$groups = false;
}
switch($time) {
@@ -99,7 +111,7 @@ if(!empty($what) && !empty($time)) {
die();
}
}
$whereclause = calendar_sql_where($timestart, $timeend, $include_user ? array($user->id) : false, false, array_keys($courses), false);
$whereclause = calendar_sql_where($timestart, $timeend, $users, $groups, array_keys($courses), false);
if($whereclause === false) {
$events = array();
}
+5 -4
View File
@@ -294,7 +294,7 @@ function calendar_get_mini($courses, $groups, $users, $cal_month = false, $cal_y
$popup = calendar_get_popup(true, false);
$cell = '<a href="#" '.$popup.'>'.$day.'</a>';
}
$cell = '<span class="accesshide">'.$today.' </span>'.$cell;
$cell = get_accesshide($today.' ').$cell;
}
// Just display it
@@ -1198,13 +1198,14 @@ function calendar_set_filters(&$courses, &$group, &$user, $courseeventsfrom = NU
else if(isset($USER->groupmember[$courseid])) {
//changed to 2D array
foreach ($USER->groupmember[$courseid] as $groupid){
$grouparray[] = $groupid;
$rec = get_record('groups_courses_groups', 'courseid', $courseid, 'groupid', $groupid);
//$grouparray[] = $groupid;
$grouparray[] = $rec->id;
}
}
}
if (!empty($groupids)) {
$sql = "SELECT id, groupid
$sql = "SELECT groupid, groupid
FROM {$CFG->prefix}groups_courses_groups
WHERE courseid IN (".implode(',', $groupids).')';
+2 -2
View File
@@ -60,9 +60,9 @@
if ($course->id != SITEID) {
$navigation = "<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a> ->
<a href=\"view.php\">$strcalendar</a> -> $strpreferences";
<a href=\"view.php?course=$course->id\">$strcalendar</a> -> $strpreferences";
} else {
$navigation = "<a href=\"view.php\">$strcalendar</a> -> $strpreferences";
$navigation = "<a href=\"view.php?course=$course->id\">$strcalendar</a> -> $strpreferences";
}
+3 -5
View File
@@ -81,8 +81,6 @@ class course_edit_form extends moodleform {
$mform->addElement('htmleditor','summary', get_string('summary'), array('rows'=> '10', 'cols'=>'65'));
$mform->setHelpButton('summary', array('text', get_string('helptext')), true);
$mform->setDefault('summary', get_string('defaultcoursesummary'));
$mform->addRule('summary', get_string('missingsummary'), 'required', null, 'client');
$mform->setType('summary', PARAM_RAW);
$courseformats = get_list_of_plugins('course/format');
@@ -253,9 +251,9 @@ class course_edit_form extends moodleform {
$mform->addElement('header','', get_string('groups', 'group'));
$choices = array();
$choices[NOGROUPS] = get_string('no');
$choices[SEPARATEGROUPS] = get_string('separate');
$choices[VISIBLEGROUPS] = get_string('visible');
$choices[NOGROUPS] = get_string('groupsnone', 'group');
$choices[SEPARATEGROUPS] = get_string('groupsseparate', 'group');
$choices[VISIBLEGROUPS] = get_string('groupsvisible', 'group');
$mform->addElement('select', 'groupmode', get_string('groupmode'), $choices);
$mform->setHelpButton('groupmode', array('groupmode', get_string('groupmode')), true);
$mform->setDefault('groupmode', 0);
+2 -2
View File
@@ -204,10 +204,10 @@
echo '<td class="content">';
if (!has_capability('moodle/course:viewhiddensections', $context) and !$thissection->visible) { // Hidden for students
echo '<div class="weekdates">'.$weekperiod.' ('.get_string('notavailable').')</div>';
print_heading($weekperiod.' ('.get_string('notavailable').')', null, 3, 'weekdates');
} else {
echo '<div class="weekdates">'.$weekperiod.'</div>';
print_heading($weekperiod, null, 3, 'weekdates');
echo '<div class="summary">';
$summaryformatoptions->noclean = true;
+4 -2
View File
@@ -228,12 +228,14 @@
}
echo '</div>';
$weekperiod = $weekday.' - '.$endweekday;
echo '<div class="content">';
if (!has_capability('moodle/course:viewhiddensections', $context) and !$thissection->visible) { // Hidden for students
echo '<div class="weekdates">'.$currenttext.$weekday.' - '.$endweekday.' ('.get_string('notavailable').')</div>';
print_heading($currenttext.$weekperiod.' ('.get_string('notavailable').')', null, 3, 'weekdates');
} else {
echo '<div class="weekdates">'.$currenttext.$weekday.' - '.$endweekday.'</div>';
print_heading($currenttext.$weekperiod, null, 3, 'weekdates');
echo '<div class="summary">';
$summaryformatoptions->noclean = true;
+2 -2
View File
@@ -8,7 +8,7 @@
<td valign="top">
<label for="removeselect"><?php echo count($alreadycourses) . " ". $stralreadycourses ?></label>
<br />
<select name="removeselect[]" size="20" id="removeselect" multiple
<select name="removeselect[]" size="20" id="removeselect" multiple="multiple"
onFocus="getElementById('studentform').add.disabled=true;
getElementById('studentform').remove.disabled=false;
getElementById('studentform').addselect.selectedIndex=-1;">
@@ -29,7 +29,7 @@
<td valign="top">
<label for="addselect"><?php echo $numcourses . " " . $strpotentialcourses ?></label>
<br />
<select name="addselect[]" size="20" id="addselect" multiple
<select name="addselect[]" size="20" id="addselect" multiple="multiple"
onFocus="getElementById('studentform').add.disabled=false;
getElementById('studentform').remove.disabled=true;
getElementById('studentform').removeselect.selectedIndex=-1;">
+5 -11
View File
@@ -46,13 +46,13 @@
/// If data for a new category was submitted, then add it
if ($form = data_submitted() and confirm_sesskey() and has_capability('moodle/category:create', $context)) {
if (!empty($form->addcategory)) {
unset($newcategory);
$newcategory->name = stripslashes_safe($form->addcategory);
$newcategory = new object();
$newcategory->name = $form->addcategory;
$newcategory->sortorder = 999;
if (!insert_record('course_categories', $newcategory)) {
notify("Could not insert the new category '" . format_string($newcategory->name) . "'");
notify("Could not insert the new category '" . format_string(stripslashes($newcategory->name)) . "'");
} else {
notify(get_string('categoryadded', '', format_string($newcategory->name)));
notify(get_string('categoryadded', '', format_string(stripslashes($newcategory->name))));
}
}
}
@@ -298,13 +298,7 @@
echo '</table>';
echo '<div class="buttons">';
/// Print link to create a new course
if (has_capability('moodle/course:create', $context)) {
unset($options);
$options['category'] = $category->id;
print_single_button('edit.php', $options, get_string('addnewcourse'), 'get');
}
if (has_capability('moodle/site:approvecourse', get_context_instance(CONTEXT_SYSTEM, SITEID)) and !empty($CFG->enablecourserequests)) {
print_single_button('pending.php',NULL, get_string('coursespending'), 'get');
}
+5 -1
View File
@@ -28,6 +28,11 @@
require_login();
}
$context = get_context_instance(CONTEXT_COURSE, $course->id);
if (!(course_parent_visible($course) || $course->visible) && !has_capability('moodle/course:viewhiddencourses', $context)) {
error(get_string('coursehidden'), $CFG->wwwroot .'/');
}
print_header(get_string("summaryof", "", $course->fullname));
print_heading(format_string($course->fullname) . '<br />(' . format_string($course->shortname) . ')');
@@ -50,7 +55,6 @@
echo filter_text(text_to_html($course->summary),$course->id);
$context = get_context_instance(CONTEXT_COURSE, $course->id);
if ($managerroles = get_config('', 'coursemanager')) {
$coursemanagerroles = split(',', $managerroles);
foreach ($coursemanagerroles as $roleid) {
+30 -26
View File
@@ -326,7 +326,7 @@ function build_mnet_logs_array($hostid, $course, $user=0, $date=0, $order="l.tim
if ($modaction) {
$firstletter = substr($modaction, 0, 1);
if (ctype_alpha($firstletter)) {
if (preg_match('/[[:alpha:]]/', $firstletter)) {
$where .= " AND\n lower(l.action) LIKE '%" . strtolower($modaction) . "%'";
} else if ($firstletter == '-') {
$where .= " AND\n lower(l.action) NOT LIKE '%" . strtolower(substr($modaction, 1)) . "%'";
@@ -389,7 +389,7 @@ function build_logs_array($course, $user=0, $date=0, $order="l.time ASC", $limit
if ($modaction) {
$firstletter = substr($modaction, 0, 1);
if (ctype_alpha($firstletter)) {
if (preg_match('/[[:alpha:]]/', $firstletter)) {
$joins[] = "lower(l.action) LIKE '%" . strtolower($modaction) . "%'";
} else if ($firstletter == '-') {
$joins[] = "lower(l.action) NOT LIKE '%" . strtolower(substr($modaction, 1)) . "%'";
@@ -463,7 +463,7 @@ function print_log($course, $user=0, $date=0, $order="l.time ASC", $page=0, $per
print_paging_bar($totalcount, $page, $perpage, "$url&amp;perpage=$perpage&amp;");
echo '<table class="logtable genearlbox boxaligncenter" summary="">'."\n";
echo '<table class="logtable generalbox boxaligncenter" summary="">'."\n";
// echo "<table class=\"logtable\" cellpadding=\"3\" cellspacing=\"0\" summary=\"\">\n";
echo "<tr>";
if ($course->id == SITEID) {
@@ -973,7 +973,7 @@ function print_overview($courses) {
if ($modules = get_records('modules')) {
foreach ($modules as $mod) {
if (file_exists(dirname(dirname(__FILE__)).'/mod/'.$mod->name.'/lib.php')) {
require_once(dirname(dirname(__FILE__)).'/mod/'.$mod->name.'/lib.php');
include_once(dirname(dirname(__FILE__)).'/mod/'.$mod->name.'/lib.php');
$fname = $mod->name.'_print_overview';
if (function_exists($fname)) {
$fname($courses,$htmlarray);
@@ -1122,23 +1122,27 @@ function print_recent_activity($course) {
$viewfullnames = has_capability('moodle/site:viewfullnames', $context);
foreach ($mods as $mod) { // Each module gets it's own logs and prints them
include_once($CFG->dirroot.'/mod/'.$mod->name.'/lib.php');
$print_recent_activity = $mod->name.'_print_recent_activity';
if (function_exists($print_recent_activity)) {
//
// NOTE:
// $isteacher (second parameter below) is to be deprecated!
//
// TODO:
// 1) Make sure that all _print_recent_activity functions are
// not using the $isteacher value.
// 2) Eventually, remove the $isteacher parameter from the
// function calls.
//
$modcontent = $print_recent_activity($course, $viewfullnames, $timestart);
if ($modcontent) {
$content = true;
if (file_exists($CFG->dirroot.'/mod/'.$mod->name.'/lib.php')) {
include_once($CFG->dirroot.'/mod/'.$mod->name.'/lib.php');
$print_recent_activity = $mod->name.'_print_recent_activity';
if (function_exists($print_recent_activity)) {
//
// NOTE:
// $isteacher (second parameter below) is to be deprecated!
//
// TODO:
// 1) Make sure that all _print_recent_activity functions are
// not using the $isteacher value.
// 2) Eventually, remove the $isteacher parameter from the
// function calls.
//
$modcontent = $print_recent_activity($course, $viewfullnames, $timestart);
if ($modcontent) {
$content = true;
}
}
} else {
/// Really need to indicate an error here to admins. Is there a way to do this?
}
}
@@ -1486,7 +1490,7 @@ function print_section_add_menus($course, $section, $modnames, $vertical=false,
continue;
}
require_once("$CFG->dirroot/mod/$modname/lib.php");
include_once("$CFG->dirroot/mod/$modname/lib.php");
$gettypesfunc = $modname.'_get_types';
if (function_exists($gettypesfunc)) {
$types = $gettypesfunc();
@@ -1938,15 +1942,15 @@ function print_course_search($value="", $return=false, $format="plain") {
} else if ($format == 'short') {
$output = '<form id="'.$id.'" action="'.$CFG->wwwroot.'/course/search.php" method="get">';
$output .= '<fieldset class="coursesearchbox invisiblefieldset">';
$output .= '<label for="coursesearchbox">'.$strsearchcourses.': </label>';
$output .= '<input type="text" id="coursesearchbox" size="12" name="search" alt="'.s($strsearchcourses).'" value="'.s($value, true).'" />';
$output .= '<label for="shortsearchbox">'.$strsearchcourses.': </label>';
$output .= '<input type="text" id="shortsearchbox" size="12" name="search" alt="'.s($strsearchcourses).'" value="'.s($value, true).'" />';
$output .= '<input type="submit" value="'.get_string('go').'" />';
$output .= '</fieldset></form>';
} else if ($format == 'navbar') {
$output = '<form id="coursesearchnavbar" action="'.$CFG->wwwroot.'/course/search.php" method="get">';
$output .= '<fieldset class="coursesearchbox invisiblefieldset">';
$output .= '<label for="coursesearchbox">'.$strsearchcourses.': </label>';
$output .= '<input type="text" id="coursesearchbox" size="20" name="search" alt="'.s($strsearchcourses).'" value="'.s($value, true).'" />';
$output .= '<label for="navsearchbox">'.$strsearchcourses.': </label>';
$output .= '<input type="text" id="navsearchbox" size="20" name="search" alt="'.s($strsearchcourses).'" value="'.s($value, true).'" />';
$output .= '<input type="submit" value="'.get_string('go').'" />';
$output .= '</fieldset></form>';
}
@@ -2526,7 +2530,7 @@ function move_courses ($courseids, $categoryid) {
// figure out a sortorder that we can use in the destination category
$sortorder = get_field_sql('SELECT MIN(sortorder)-1 AS min
FROM ' . $CFG->prefix . 'course WHERE category=' . $categoryid);
if ($sortorder === false) {
if (is_null($sortorder) || $sortorder === false) {
// the category is empty
// rather than let the db default to 0
// set it to > 100 and avoid extra work in fix_coursesortorder()
+2 -1
View File
@@ -57,8 +57,9 @@
print_error('nologinas');
}
$context = $systemcontext;
} else if (has_capability('moodle/user:loginas', $coursecontext)) {
} else {
require_login($course);
require_capability('moodle/user:loginas', $coursecontext);
if (!has_capability('moodle/course:view', $coursecontext, $userid, false)) {
error('This user is not in this course!');
}
+6 -2
View File
@@ -269,8 +269,12 @@
}
rebuild_course_cache($course->id);
redirect("$CFG->wwwroot/mod/$module->name/view.php?id=$fromform->coursemodule");
if (isset($fromform->submitbutton)) {
redirect("$CFG->wwwroot/mod/$module->name/view.php?id=$fromform->coursemodule");
} else {
redirect("$CFG->wwwroot/course/view.php?id=$course->id");
}
exit;
} else {
+35 -2
View File
@@ -2,7 +2,7 @@
require_once ($CFG->libdir.'/formslib.php');
/**
* This class adds extra methods to form wrapper specific to be used for module
* add / update forms (mod/{modname}.mod_form.php replaces deprecared mod/{modname}/mod.html
* add / update forms (mod/{modname}.mod_form.php replaces deprecated mod/{modname}/mod.html
*
*/
class moodleform_mod extends moodleform {
@@ -150,6 +150,39 @@ class moodleform_mod extends moodleform {
return array('visible'=>$visible);
}
/**
* Overriding formslib's add_action_buttons() method, to add an extra submit "save changes and return" button.
*
* @param bool $cancel
* @param string $submitlabel
* @param string $submit2label
* @return void
*/
function add_action_buttons($cancel=true, $submitlabel=null, $submit2label=null) {
if (is_null($submitlabel)) {
$submitlabel = get_string('savechangesanddisplay');
}
if (is_null($submit2label)) {
$submit2label = get_string('savechangesandreturntocourse');
}
$mform =& $this->_form;
//when two elements we need a group
$buttonarray=array();
$buttonarray[] = &$mform->createElement('submit', 'submitbutton', $submitlabel);
$buttonarray[] = &$mform->createElement('submit', 'submitbutton2', $submit2label);
if ($cancel) {
$buttonarray[] = &$mform->createElement('cancel');
}
$mform->addGroup($buttonarray, 'buttonar', '', array(' '), false);
$mform->setType('buttonar', PARAM_RAW);
$mform->closeHeaderBefore('buttonar');
}
}
?>
?>
+6 -3
View File
@@ -22,10 +22,13 @@
// place at beginning of category
fix_course_sortorder();
if (empty($CFG->defaultrequestedcategory)) {
$CFG->defaultrequestedcategory = 1; //yuk, but default to miscellaneous.
if (empty($CFG->defaultrequestcategory) or !record_exists('course_categories', 'id', $CFG->defaultrequestcategory)) {
// default to first top level directory, hacky but means things don't break
$CFG->defaultrequestcategory = get_field('course_categories', 'id', 'parent', '0');
}
$course->category = $CFG->defaultrequestedcategory;
$course->category = $CFG->defaultrequestcategory;
$course->sortorder = get_field_sql("SELECT min(sortorder)-1 FROM {$CFG->prefix}course WHERE category=$course->category");
if (empty($course->sortorder)) {
$course->sortorder = 1000;
+1 -1
View File
@@ -154,7 +154,7 @@
$module = get_record('modules','id',$moduleid);
$modulename = get_string('modulename',$module->name);
require_once($CFG->dirroot.'/mod/'.$module->name.'/lib.php');
include_once($CFG->dirroot.'/mod/'.$module->name.'/lib.php');
$viewfun = $module->name.'_get_view_actions';
$postfun = $module->name.'_get_post_actions';
+2
View File
@@ -83,6 +83,7 @@ switch($_SERVER['REQUEST_METHOD']) {
move_section($course, $id, $value);
break;
}
rebuild_course_cache($course->id);
break;
case 'resource':
@@ -130,6 +131,7 @@ switch($_SERVER['REQUEST_METHOD']) {
moveto_module($mod, $section, $beforemod);
break;
}
rebuild_course_cache($course->id);
break;
case 'course':
+3 -1
View File
@@ -127,7 +127,9 @@
$courses = array();
foreach ($blocks as $block) {
$courseid = $block->pageid;
if ($courseid==0) {
// MDL-11167, blocks can be placed on mymoodle, or the blogs page
// and it should not show up on course search page
if ($courseid==0 || $block->pagetype != 'course-view') {
continue;
}
if (!$course = get_record('course', 'id', $courseid)) {
+7
View File
@@ -14,6 +14,13 @@
$userid = optional_param('user', 0, PARAM_INT); //course
$confirm = optional_param('confirm', 0, PARAM_BOOL);
if($userid == $USER->id){
// the rest of this code assumes $userid=0 means
// you are unassigning yourself, so set this for the
// correct capabiliy checks & language later
$userid = 0;
}
if (! $course = get_record('course', 'id', $id) ) {
error('Invalid course id');
}
+11 -1
View File
@@ -17,12 +17,22 @@
error("Course id is incorrect.");
}
require_login($course);
//require_login($course);
$COURSE = clone($course);
if (! $user = get_record("user", "id", $user)) {
error("User ID is incorrect");
}
require_login();
if ($user->deleted) {
print_header();
print_heading(get_string('userdeleted'));
print_footer();
die;
}
$coursecontext = get_context_instance(CONTEXT_COURSE, $id);
$personalcontext = get_context_instance(CONTEXT_USER, $user->id);
+6 -11
View File
@@ -198,21 +198,17 @@ function authorize_action(&$order, &$message, &$extra, $action=AN_ACTION_NONE, $
$message = "Order must be settled. Try VOID, check Cut-Off time if it fails!";
return AN_RETURNZERO;
}
if (empty($extra->amount)) {
$message = "No valid amount!";
return AN_RETURNZERO;
}
$timenowsettle = authorize_getsettletime(time());
$timediff = $timenowsettle - (120 * 3600 * 24);
if ($order->settletime < $timediff) {
$message = "Order must be credited within 120 days!";
return AN_RETURNZERO;
}
if (empty($extra)) {
$message = "Need extra fields to REFUND!";
return AN_RETURNZERO;
}
$total = floatval($extra->sum) + floatval($extra->amount);
if (($extra->amount == 0) || ($total > $order->amount)) {
$message = "Can be credited up to original amount.";
return AN_RETURNZERO;
}
$poststring .= '&x_type=CREDIT&x_trans_id=' . urlencode($order->transid);
$poststring .= '&x_currency_code=' . urlencode($order->currency);
$poststring .= '&x_invoice_num=' . urlencode($extra->orderid);
@@ -299,7 +295,7 @@ function authorize_action(&$order, &$message, &$extra, $action=AN_ACTION_NONE, $
$responsecode = intval($response[0]);
if ($responsecode == AN_APPROVED || $responsecode == AN_REVIEW)
{
$transid = intval($response[6]);
$transid = floatval($response[6]);
if ($test || $transid == 0) {
return $responsecode; // don't update original transaction in test mode.
}
@@ -336,7 +332,6 @@ function authorize_action(&$order, &$message, &$extra, $action=AN_ACTION_NONE, $
$extra->status = AN_STATUS_CREDIT;
$extra->transid = $transid;
$extra->settletime = authorize_getsettletime(time());
unset($extra->sum); // this is not used in refunds table.
if (! $extra->id = insert_record('enrol_authorize_refunds', $extra)) {
unset($extra->id);
email_to_admin("Error while trying to insert data " .
+4 -16
View File
@@ -69,18 +69,6 @@ if (!isset($frm->acceptechecktypes)) {
</td>
</tr>
<?php if (substr($CFG->wwwroot, 0, 5) !== 'https') { /* https && loginhttps */ ?>
<tr valign="top">
<td align="right">loginhttps:</td>
<td><?php
echo (empty($CFG->loginhttps) ? "<span style=\"color:red\"><b>off</b></span>" : "<font color=\"green\">on</font>");
$a->url = "$CFG->wwwroot/$CFG->admin/settings.php?section=httpsecurity";
echo '<br />'; print_string("logindesc", "enrol_authorize", $a);
?>
</td>
</tr>
<?php } /* end: https && loginhttps */ ?>
<tr valign="top"><td colspan="2"><h4><?php print_string("adminauthorizesettings", "enrol_authorize") ?></h4></td></tr>
<tr valign="top">
@@ -130,7 +118,7 @@ if (!isset($frm->acceptechecktypes)) {
<tr valign="top">
<td align="right">an_authcode:</td>
<td><?php print_checkbox('an_authcode', '1', !empty($frm->an_authcode)) ?>
<?php helpbutton('authcode', '', 'enrol/authorize'); ?><br />
<?php helpbutton('authcode', 'authcode', 'enrol/authorize'); ?><br />
<?php print_string("adminauthcode", "enrol_authorize") ?></td>
</tr>
@@ -148,7 +136,7 @@ if (!isset($frm->acceptechecktypes)) {
foreach ($allpaymentmethods as $key) {
if ($key == AN_METHOD_CC) {
print_checkbox('acceptmethods[]', AN_METHOD_CC, in_array(AN_METHOD_CC, $paymentmethodsenabled), get_string('method'.AN_METHOD_CC,'enrol_authorize'));
echo("<ul>"); // blockquote breaks <span> and <br> tags
echo("<ul>"); // blockquote breaks <span> and <br> tags
$acceptedccs = array_keys(get_list_of_creditcards());
$allccs = get_list_of_creditcards(true);
foreach ($allccs as $key => $val) {
@@ -160,7 +148,7 @@ if (!isset($frm->acceptechecktypes)) {
}
elseif ($key == AN_METHOD_ECHECK) {
print_checkbox('acceptmethods[]', AN_METHOD_ECHECK, in_array(AN_METHOD_ECHECK, $paymentmethodsenabled), get_string('method'.AN_METHOD_ECHECK,'enrol_authorize'));
echo("<ul>"); // blockquote breaks <span> and <br> tags
echo("<ul>"); // blockquote breaks <span> and <br> tags
$echecktypesenabled = get_list_of_bank_account_types();
$allechecktypes = get_list_of_bank_account_types(true);
foreach ($allechecktypes as $key) {
@@ -175,7 +163,7 @@ if (!isset($frm->acceptechecktypes)) {
</tr>
<tr valign="top"><td colspan="2"><h4><?php print_string("adminauthorizeccapture", "enrol_authorize") ?>
<?php helpbutton('orderreview', '', 'enrol/authorize'); ?>
<?php helpbutton('orderreview', 'orderreview', 'enrol/authorize'); ?>
</h4></td></tr>
<tr valign="top">
+3 -3
View File
@@ -12,7 +12,7 @@
<FIELD NAME="ccname" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="refundinfo" NEXT="courseid"/>
<FIELD NAME="courseid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="ccname" NEXT="userid"/>
<FIELD NAME="userid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="courseid" NEXT="transid"/>
<FIELD NAME="transid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="userid" NEXT="status"/>
<FIELD NAME="transid" TYPE="int" LENGTH="20" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="userid" NEXT="status"/>
<FIELD NAME="status" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="transid" NEXT="timecreated"/>
<FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="status" NEXT="settletime"/>
<FIELD NAME="settletime" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="timecreated" NEXT="amount"/>
@@ -35,7 +35,7 @@
<FIELD NAME="orderid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="status"/>
<FIELD NAME="status" TYPE="int" LENGTH="1" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="orderid" NEXT="amount"/>
<FIELD NAME="amount" TYPE="char" LENGTH="10" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="status" NEXT="transid"/>
<FIELD NAME="transid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="amount" NEXT="settletime"/>
<FIELD NAME="transid" TYPE="int" LENGTH="20" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="amount" NEXT="settletime"/>
<FIELD NAME="settletime" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="transid"/>
</FIELDS>
<KEYS>
@@ -47,4 +47,4 @@
</INDEXES>
</TABLE>
</TABLES>
</XMLDB>
</XMLDB>
+3 -3
View File
@@ -2,7 +2,7 @@
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// IT IS USED ONLY FOR UPGRADES FROM BEFORE MOODLE 1.7, ALL
// IT IS USED ONLY FOR UPGRADES FROM BEFORE MOODLE 1.7, ALL
// LATER CHANGES SHOULD USE upgrade.php IN THIS DIRECTORY.
// MySQL commands for upgrading this enrolment module
@@ -56,7 +56,7 @@ function enrol_authorize_upgrade($oldversion=0) {
PRIMARY KEY (`id`),
KEY `orderid` (`orderid`));");
// defaults.
if ($courses = get_records_select('course', '', '', 'id, cost, currency')) {
if (($courses = get_records_select('course', '', '', 'id, cost, currency'))) {
foreach ($courses as $course) {
execute_sql("UPDATE {$CFG->prefix}enrol_authorize
SET amount = '$course->cost', currency = '$course->currency'
@@ -70,7 +70,7 @@ function enrol_authorize_upgrade($oldversion=0) {
table_column('enrol_authorize_refunds', '', 'settletime', 'integer', '10', 'unsigned', '0', 'not null', 'transid');
table_column('enrol_authorize', 'timeupdated', 'settletime', 'integer', '10', 'unsigned', '0', 'not null');
$status = AN_STATUS_AUTH | AN_STATUS_CAPTURE;
if ($settlements = get_records_select('enrol_authorize', "status='$status'", '', 'id, settletime')) {
if (($settlements = get_records_select('enrol_authorize', "status='$status'", '', 'id, settletime'))) {
include_once("$CFG->dirroot/enrol/authorize/authorizenetlib.php");
foreach ($settlements as $settlement) {
execute_sql("UPDATE {$CFG->prefix}enrol_authorize SET settletime = '" .
+3 -3
View File
@@ -2,7 +2,7 @@
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// IT IS USED ONLY FOR UPGRADES FROM BEFORE MOODLE 1.7, ALL
// IT IS USED ONLY FOR UPGRADES FROM BEFORE MOODLE 1.7, ALL
// LATER CHANGES SHOULD USE upgrade.php IN THIS DIRECTORY.
// PostgreSQL commands for upgrading this enrolment module
@@ -67,7 +67,7 @@ function enrol_authorize_upgrade($oldversion=0) {
);");
modify_database("","CREATE INDEX prefix_enrol_authorize_refunds_orderid_idx ON prefix_enrol_authorize_refunds (orderid);");
// defaults.
if ($courses = get_records_select('course', '', '', 'id, cost, currency')) {
if (($courses = get_records_select('course', '', '', 'id, cost, currency'))) {
foreach ($courses as $course) {
execute_sql("UPDATE {$CFG->prefix}enrol_authorize
SET amount = '$course->cost', currency = '$course->currency'
@@ -81,7 +81,7 @@ function enrol_authorize_upgrade($oldversion=0) {
table_column('enrol_authorize_refunds', '', 'settletime', 'integer', '10', 'unsigned', '0', 'not null', 'transid');
table_column('enrol_authorize', 'timeupdated', 'settletime', 'integer', '10', 'unsigned', '0', 'not null');
$status = AN_STATUS_AUTH | AN_STATUS_CAPTURE;
if ($settlements = get_records_select('enrol_authorize', "status='$status'", '', 'id, settletime')) {
if (($settlements = get_records_select('enrol_authorize', "status='$status'", '', 'id, settletime'))) {
include_once("$CFG->dirroot/enrol/authorize/authorizenetlib.php");
foreach ($settlements as $settlement) {
execute_sql("UPDATE {$CFG->prefix}enrol_authorize SET settletime = '" .
+40
View File
@@ -59,6 +59,46 @@ function xmldb_enrol_authorize_upgrade($oldversion=0) {
}
}
if ($result && $oldversion < 2006112902) {
/// enrol_authorize.transid
/// Define index transid (not unique) to be dropped form enrol_authorize
$table = new XMLDBTable('enrol_authorize');
$index = new XMLDBIndex('transid');
$index->setAttributes(XMLDB_INDEX_NOTUNIQUE, array('transid'));
drop_index($table, $index);
/// Changing precision of field transid on table enrol_authorize to (20)
$table = new XMLDBTable('enrol_authorize');
$field = new XMLDBField('transid');
$field->setAttributes(XMLDB_TYPE_INTEGER, '20', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0', 'userid');
change_field_precision($table, $field);
/// Launch add index transid again
$table = new XMLDBTable('enrol_authorize');
$index = new XMLDBIndex('transid');
$index->setAttributes(XMLDB_INDEX_NOTUNIQUE, array('transid'));
add_index($table, $index);
/// enrol_authorize_refunds.transid
/// Define index transid (not unique) to be dropped form enrol_authorize_refunds
$table = new XMLDBTable('enrol_authorize_refunds');
$index = new XMLDBIndex('transid');
$index->setAttributes(XMLDB_INDEX_NOTUNIQUE, array('transid'));
drop_index($table, $index);
/// Changing precision of field transid on table enrol_authorize_refunds to (20)
$table = new XMLDBTable('enrol_authorize_refunds');
$field = new XMLDBField('transid');
$field->setAttributes(XMLDB_TYPE_INTEGER, '20', XMLDB_UNSIGNED, null, null, null, null, '0', 'amount');
change_field_precision($table, $field);
/// Launch add index transid again
$table = new XMLDBTable('enrol_authorize_refunds');
$index = new XMLDBIndex('transid');
$index->setAttributes(XMLDB_INDEX_NOTUNIQUE, array('transid'));
add_index($table, $index);
}
return $result;
}
+22 -19
View File
@@ -96,7 +96,6 @@ class enrolment_plugin_authorize
if ($course->password) {
$password = '';
$teacher = get_teacher($course->id);
include($CFG->dirroot.'/enrol/manual/enrol.html');
}
@@ -104,6 +103,13 @@ class enrolment_plugin_authorize
}
function print_enrolmentkeyfrom($course)
{
$manual = enrolment_factory::factory('manual');
$manual->print_enrolmentkeyfrom($course);
}
/**
* Validates registration forms and enrols student to course.
*
@@ -212,7 +218,7 @@ class enrolment_plugin_authorize
redirect($CFG->wwwroot, get_string("reviewnotify", "enrol_authorize"), '30');
}
else {
enrol_into_course($course, $USER, 'manual');
enrol_into_course($course, $USER, 'authorize');
redirect("$CFG->wwwroot/course/view.php?id=$course->id");
}
return;
@@ -235,7 +241,7 @@ class enrolment_plugin_authorize
$a->orderid = $order->id;
$emailsubject = get_string('adminnewordersubject', 'enrol_authorize', $a);
$context = get_context_instance(CONTEXT_COURSE, $course->id);
if ($paymentmanagers = get_users_by_capability($context, 'enrol/authorize:managepayments')) {
if (($paymentmanagers = get_users_by_capability($context, 'enrol/authorize:managepayments'))) {
foreach ($paymentmanagers as $paymentmanager) {
email_to_user($paymentmanager, $USER, $emailsubject, $emailmessage);
}
@@ -245,7 +251,7 @@ class enrolment_plugin_authorize
}
// Credit card captured, ENROL student now...
if (enrol_into_course($course, $USER, 'manual')) {
if (enrol_into_course($course, $USER, 'authorize')) {
if (!empty($CFG->enrol_mailstudents)) {
send_welcome_messages($order->id);
}
@@ -407,7 +413,7 @@ class enrolment_plugin_authorize
global $CFG;
$mconfig = get_config('enrol/authorize');
if (! check_openssl_loaded()) {
if (!check_openssl_loaded()) {
notify('PHP must be compiled with SSL support (--with-openssl)');
}
@@ -430,13 +436,14 @@ class enrolment_plugin_authorize
$captureday = intval($frm->an_capture_day);
$emailexpired = intval($frm->an_emailexpired);
if ($captureday > 0 || $emailexpired > 0) {
if ((time() - intval($mconfig->an_lastcron) > 3600 * 24)) {
$lastcron = get_field_sql('SELECT max(lastcron) FROM ' . $CFG->prefix . 'modules');
if ((time() - intval($lastcron) > 3600 * 24)) {
notify(get_string('admincronsetup', 'enrol_authorize'));
}
}
}
if ($count = count_records('enrol_authorize', 'status', AN_STATUS_AUTH)) {
if (($count = count_records('enrol_authorize', 'status', AN_STATUS_AUTH))) {
$a = new stdClass;
$a->count = $count;
$a->url = $CFG->wwwroot."/enrol/authorize/index.php?status=".AN_STATUS_AUTH;
@@ -505,7 +512,8 @@ class enrolment_plugin_authorize
$emailexpired = ($emailexpired > 5) ? 5 : (($emailexpired < 0) ? 0 : $emailexpired);
if (!empty($reviewval) && ($captureday > 0 || $emailexpired > 0)) {
if (time() - intval($mconfig->an_lastcron) > 3600 * 24) {
$lastcron = get_field_sql('SELECT max(lastcron) FROM ' . $CFG->prefix . 'modules');
if (time() - intval($lastcron) > 3600 * 24) {
return false;
}
}
@@ -517,8 +525,7 @@ class enrolment_plugin_authorize
set_config('an_sorttype', $sorttype);
// https and openssl library is required
if ((substr($CFG->wwwroot, 0, 5) !== 'https' and empty($CFG->loginhttps)) or
!check_openssl_loaded()) {
if ((substr($CFG->wwwroot, 0, 5) !== 'https' and empty($CFG->loginhttps)) or !check_openssl_loaded()) {
return false;
}
@@ -574,7 +581,6 @@ class enrolment_plugin_authorize
$settlementtime = authorize_getsettletime($timenow);
$timediff30 = $settlementtime - (30 * $oneday);
$mconfig = get_config('enrol/authorize');
set_config('an_lastcron', $timenow, 'enrol/authorize');
mtrace("Processing authorize cron...");
@@ -586,10 +592,7 @@ class enrolment_plugin_authorize
}
mtrace(" scheduled capture", ": ");
if (empty($CFG->an_review) or
(!empty($CFG->an_test)) or
(intval($CFG->an_capture_day) < 1) or
(!check_openssl_loaded())) {
if (empty($CFG->an_review) or (!empty($CFG->an_test)) or (intval($CFG->an_capture_day) < 1) or (!check_openssl_loaded())) {
mtrace("disabled");
return; // order review disabled or test mode or manual capture or openssl wasn't loaded.
}
@@ -615,6 +618,7 @@ class enrolment_plugin_authorize
mtrace("blocked");
return;
}
set_config('an_lastcron', $timenow, 'enrol/authorize');
mtrace(" $ordercount orders are being processed now", ": ");
@@ -641,7 +645,7 @@ class enrolment_plugin_authorize
$timeend = $order->settletime + $course->enrolperiod;
}
$user = get_record('user', 'id', $order->userid);
if (role_assign($role->id, $user->id, 0, $context->id, $timestart, $timeend, 0, 'manual')) {
if (role_assign($role->id, $user->id, 0, $context->id, $timestart, $timeend, 0, 'authorize')) {
$this->log .= "User($user->id) has been enrolled to course($course->id).\n";
if (!empty($CFG->enrol_mailstudents)) {
$sendem[] = $order->id;
@@ -717,8 +721,7 @@ class enrolment_plugin_authorize
// get_users_by_capability() does not handling user level resolving
// After user resolving, get_admin() to get_users_by_capability()
$adminuser = get_admin();
$select = "status IN(".AN_STATUS_UNDERREVIEW.",".AN_STATUS_APPROVEDREVIEW.") " .
"AND (timecreated<'$onepass') AND (timecreated>'$timediff60')";
$select = "status IN(".AN_STATUS_UNDERREVIEW.",".AN_STATUS_APPROVEDREVIEW.") AND (timecreated<'$onepass') AND (timecreated>'$timediff60')";
$count = count_records_select('enrol_authorize', $select);
if ($count) {
$a = new stdClass;
@@ -780,7 +783,7 @@ class enrolment_plugin_authorize
foreach($courseinfos as $courseinfo) {
$lastcourse = $courseinfo->courseid;
$context = get_context_instance(CONTEXT_COURSE, $lastcourse);
if ($paymentmanagers = get_users_by_capability($context, 'enrol/authorize:managepayments')) {
if (($paymentmanagers = get_users_by_capability($context, 'enrol/authorize:managepayments'))) {
$a = new stdClass;
$a->course = $courseinfo->shortname;
$a->pending = $courseinfo->cnt;
+29 -28
View File
@@ -17,9 +17,10 @@ class enrol_authorize_form extends moodleform
$mform =& $this->_form;
$course = $this->_customdata['course'];
$mform->addElement('header', '', '&nbsp;&nbsp;' . get_string('paymentrequired'), '');
if ($othermethodstr = $this->other_method_available($paymentmethod)) {
$mform->addElement('static', '', '<div align="right">' . $othermethodstr . '&nbsp;&nbsp;</div>', '');
$mform->addElement('header', 'general', get_string('paymentrequired'));
$othermethodstr = $this->other_method_available($paymentmethod);
if ($othermethodstr) {
$mform->addElement('static', '', '<div align="right">' . $othermethodstr . '</div>', '');
}
$mform->addElement('hidden', 'id', $course->id);
@@ -28,11 +29,10 @@ class enrol_authorize_form extends moodleform
$mform->addElement('hidden', 'paymentmethod', $paymentmethod);
$mform->setType('paymentmethod', PARAM_ALPHA);
$firstlastnamestr = (AN_METHOD_CC == $paymentmethod) ?
get_string('nameoncard', 'enrol_authorize') : get_string('echeckfirslasttname', 'enrol_authorize');
$firstlastnamestr = (AN_METHOD_CC == $paymentmethod) ? get_string('nameoncard', 'enrol_authorize') : get_string('echeckfirslasttname', 'enrol_authorize');
$firstlastnamegrp = array();
$firstlastnamegrp[] = &MoodleQuickForm::createElement('text', 'firstname', '', 'size="8"');
$firstlastnamegrp[] = &MoodleQuickForm::createElement('text', 'lastname', '', 'size="8"');
$firstlastnamegrp[] = &$mform->createElement('text', 'firstname', '', 'size="16"');
$firstlastnamegrp[] = &$mform->createElement('text', 'lastname', '', 'size="16"');
$mform->addGroup($firstlastnamegrp, 'firstlastgrp', $firstlastnamestr, '&nbsp;', false);
$firstlastnamegrprules = array();
$firstlastnamegrprules['firstname'][] = array(get_string('missingfirstname'), 'required', null, 'client');
@@ -45,31 +45,26 @@ class enrol_authorize_form extends moodleform
if (AN_METHOD_CC == $paymentmethod)
{
$mform->addElement('text', 'cc', get_string('ccno', 'enrol_authorize'), 'size="20"');
$mform->addElement('passwordreveal', 'cc', get_string('ccno', 'enrol_authorize'), 'size="20"');
$mform->setType('cc', PARAM_ALPHANUM);
$mform->setDefault('cc', '');
$mform->addRule('cc', get_string('missingcc', 'enrol_authorize'), 'required', null, 'client');
$mform->addRule('cc', get_string('ccinvalid', 'enrol_authorize'), 'numeric', null, 'client');
$creditcardsmenu = array('' => get_string('choose')) + get_list_of_creditcards();
$mform->addElement('select', 'cctype', get_string('cctype', 'enrol_authorize'), $creditcardsmenu);
$mform->setType('cctype', PARAM_ALPHA);
$mform->addRule('cctype', get_string('missingcctype', 'enrol_authorize'), 'required', null, 'client');
$mform->setDefault('cctype', '');
$monthsmenu = array('' => get_string('choose'));
for ($i = 1; $i <= 12; $i++) {
$monthsmenu[$i] = userdate(gmmktime(12, 0, 0, $i, 15, 2000), "%B");
}
$yearsmenu = array('' => get_string('choose'));
$nowdate = getdate();
$nowyear = $nowdate["year"] - 1;
for ($i = $nowyear; $i <= $nowyear + 11; $i++) {
$yearsmenu[$i] = $i;
$startyear = $nowdate["year"] - 1;
$endyear = $startyear + 20;
$yearsmenu = array('' => get_string('choose'));
for ($i = $startyear; $i < $endyear; $i++) {
$yearsmenu[$i] = $i;
}
$ccexpiregrp = array();
$ccexpiregrp[] = &MoodleQuickForm::createElement('select', 'ccexpiremm', '', $monthsmenu);
$ccexpiregrp[] = &MoodleQuickForm::createElement('select', 'ccexpireyyyy', '', $yearsmenu);
$ccexpiregrp[] = &$mform->createElement('select', 'ccexpiremm', '', $monthsmenu);
$ccexpiregrp[] = &$mform->createElement('select', 'ccexpireyyyy', '', $yearsmenu);
$mform->addGroup($ccexpiregrp, 'ccexpiregrp', get_string('ccexpire', 'enrol_authorize'), '&nbsp;', false);
$ccexpiregrprules = array();
$ccexpiregrprules['ccexpiremm'][] = array(get_string('missingccexpire', 'enrol_authorize'), 'required', null, 'client');
@@ -79,7 +74,13 @@ class enrol_authorize_form extends moodleform
$mform->setType('ccexpireyyyy', PARAM_INT);
$mform->setDefault('ccexpiremm', '');
$mform->setDefault('ccexpireyyyy', '');
$creditcardsmenu = array('' => get_string('choose')) + get_list_of_creditcards();
$mform->addElement('select', 'cctype', get_string('cctype', 'enrol_authorize'), $creditcardsmenu);
$mform->setType('cctype', PARAM_ALPHA);
$mform->addRule('cctype', get_string('missingcctype', 'enrol_authorize'), 'required', null, 'client');
$mform->setDefault('cctype', '');
$mform->addElement('text', 'cvv', get_string('ccvv', 'enrol_authorize'), 'size="4"');
$mform->setHelpButton('cvv', array('cvv',get_string('ccvv', 'enrol_authorize'),'enrol/authorize'), true);
$mform->setType('cvv', PARAM_ALPHANUM);
@@ -89,11 +90,12 @@ class enrol_authorize_form extends moodleform
if (!empty($CFG->an_authcode)) {
$ccauthgrp = array();
$ccauthgrp[] = &MoodleQuickForm::createElement('checkbox', 'haveauth', null, get_string('haveauthcode', 'enrol_authorize'));
$ccauthgrp[] = &MoodleQuickForm::createElement('static', 'nextline', null, '<br />');
$ccauthgrp[] = &MoodleQuickForm::createElement('text', 'ccauthcode', '', 'size="8"');
$ccauthgrp[] = &$mform->createElement('checkbox', 'haveauth', null, get_string('haveauthcode', 'enrol_authorize'));
$ccauthgrp[] = &$mform->createElement('static', 'nextline', null, '<br />');
$ccauthgrp[] = &$mform->createElement('text', 'ccauthcode', '', 'size="8"');
$mform->addGroup($ccauthgrp, 'ccauthgrp', get_string('authcode', 'enrol_authorize'), '&nbsp;', false);
$mform->setHelpButton('ccauthgrp', array('authcode',get_string('authcode', 'enrol_authorize'),'enrol/authorize'), true);
$ccauthgrprules = array();
$ccauthgrprules['ccauthcode'][] = array(get_string('missingccauthcode', 'enrol_authorize'), 'numeric', null, 'client');
$mform->addGroupRule('ccauthgrp', $ccauthgrprules);
@@ -110,9 +112,9 @@ class enrol_authorize_form extends moodleform
$mform->addRule('ccaddress', get_string('missingaddress', 'enrol_authorize'), 'required', null, 'client');
$citystategrp = array();
$citystategrp[] = &MoodleQuickForm::createElement('text', 'cccity', '', 'size="14"');
$citystategrp[] = &MoodleQuickForm::createElement('static', 'sep', null, ' - ');
$citystategrp[] = &MoodleQuickForm::createElement('text', 'ccstate', '', 'size="8"');
$citystategrp[] = &$mform->createElement('text', 'cccity', '', 'size="14"');
$citystategrp[] = &$mform->createElement('static', 'sep', null, ' - ');
$citystategrp[] = &$mform->createElement('text', 'ccstate', '', 'size="8"');
$mform->addGroup($citystategrp, 'citystategrp', get_string('city') . ' - ' . get_string('state'), '&nbsp;', false);
$citystategrprules = array();
$citystategrprules['cccity'][] = array(get_string('missingcity'), 'required', null, 'client');
@@ -170,7 +172,6 @@ class enrol_authorize_form extends moodleform
$mform->setType('cczip', PARAM_ALPHANUM);
$mform->setDefault('cczip', '');
$mform->addRule('cczip', get_string('missingzip', 'enrol_authorize'), 'required', null, 'client');
$mform->addRule('cczip', get_string('missingzip', 'enrol_authorize'), 'numeric', null, 'client');
$this->add_action_buttons(false, get_string('sendpaymentbutton', 'enrol_authorize'));
}
+3
View File
@@ -2,7 +2,10 @@
/// Load libraries
require_once('../../config.php');
require_once('const.php');
require_once('locallib.php');
require_once('localfuncs.php');
require_once('authorizenetlib.php');
/// Parameters
$orderid = optional_param('order', 0, PARAM_INT);
+1 -1
View File
@@ -40,7 +40,7 @@ function prevent_double_paid($course)
$sql .= 'AND status='.AN_STATUS_NONE;
}
if ($recid = get_field_sql($sql)) {
if (($recid = get_field_sql($sql))) {
$a = new stdClass;
$a->orderid = $recid;
$a->url = "$CFG->wwwroot/enrol/authorize/index.php?order=$a->orderid";
+11 -15
View File
@@ -4,9 +4,6 @@ if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.');
}
require_once('const.php');
require_once('authorizenetlib.php');
define('ORDER_CAPTURE', 'capture');
define('ORDER_DELETE', 'delete');
define('ORDER_REFUND', 'refund');
@@ -53,7 +50,7 @@ function authorize_print_orders($courseid, $userid)
$sql .= "WHERE (e.userid='$userid') ";
}
$sql .= "ORDER BY c.sortorder, c.fullname";
if ($popupcrs = get_records_sql_menu($sql)) {
if (($popupcrs = get_records_sql_menu($sql))) {
$popupcrs = array($SITE->id => $SITE->fullname) + $popupcrs;
echo "<table border='0' width='100%' cellspacing='0' cellpadding='3' class='generaltable generalbox'>";
echo "<tr>";
@@ -155,7 +152,7 @@ function authorize_print_orders($courseid, $userid)
$where .= "AND (e.userid = '" . $userid . "') ";
}
if ($sort = $table->get_sql_sort()) {
if (($sort = $table->get_sql_sort())) {
$sort = ' ORDER BY ' . $sort;
}
@@ -163,7 +160,7 @@ function authorize_print_orders($courseid, $userid)
$table->initialbars($totalcount > $perpage);
$table->pagesize($perpage, $totalcount);
if ($records = get_records_sql($select . $from . $where . $sort, $table->get_page_start(), $table->get_page_size())) {
if (($records = get_records_sql($select . $from . $where . $sort, $table->get_page_start(), $table->get_page_size()))) {
foreach ($records as $record) {
$actionstatus = authorize_get_status_action($record);
$color = authorize_get_status_color($actionstatus->status);
@@ -279,7 +276,7 @@ function authorize_print_order_details($orderno)
else {
if (empty($CFG->an_test)) {
$user = get_record('user', 'id', $order->userid);
if (enrol_into_course($course, $user, 'manual')) {
if (enrol_into_course($course, $user, 'authorize')) {
if (!empty($CFG->enrol_mailstudents)) {
send_welcome_messages($order->id);
}
@@ -305,17 +302,14 @@ function authorize_print_order_details($orderno)
error(get_string('youcantdo', 'enrol_authorize', $a));
}
$extra = new stdClass;
$extra->sum = 0.0;
$extra->orderid = $orderno;
$refunded = 0.0;
$sql = "SELECT SUM(amount) AS refunded FROM {$CFG->prefix}enrol_authorize_refunds " .
"WHERE (orderid = '" . $orderno . "') AND (status = '" . AN_STATUS_CREDIT . "')";
if ($refund = get_record_sql($sql)) {
$extra->sum = floatval($refund->refunded);
if (($refundval = get_field_sql($sql))) {
$refunded = floatval($refundval);
}
$upto = format_float($order->amount - $extra->sum, 2);
$upto = format_float($order->amount - $refunded, 2);
if ($upto <= 0) {
error("Refunded to original amount.");
}
@@ -334,6 +328,8 @@ function authorize_print_order_details($orderno)
$strcanbecredit<br /><input type='submit' name='".ORDER_REFUND."' value='$authstrs->refund' />");
}
else {
$extra = new stdClass;
$extra->orderid = $orderno;
$extra->amount = $amount;
$message = '';
$success = authorize_action($order, $message, $extra, AN_ACTION_CREDIT);
@@ -565,7 +561,7 @@ function authorize_get_status_action($order)
$canmanage = has_capability('enrol/authorize:managepayments', get_context_instance(CONTEXT_COURSE, $order->courseid));
if (intval($order->transid) == 0) { // test transaction or new order
if (floatval($order->transid) == 0) { // test transaction or new order
if ($order->timecreated < $newordertime) {
if ($canmanage) {
$ret->actions = array(ORDER_DELETE);
+5 -5
View File
@@ -16,7 +16,7 @@
print_heading_with_help($struploadcsv, 'uploadcsv', 'enrol/authorize');
/// Handle CSV file
if ($form = data_submitted() && confirm_sesskey()) {
if (($form = data_submitted()) && confirm_sesskey()) {
$um = new upload_manager('csvfile', false, false, null, false, 0);
if ($um->preprocess_files()) {
$filename = $um->files['csvfile']['tmp_name'];
@@ -115,7 +115,7 @@ function authorize_process_csv($filename)
$settlementdate = strtotime($data[$csvfields['Settlement Date/Time']]);
if ($transstatus == 'Approved Review' || $transstatus == 'Review Failed') {
if ($order = get_record('enrol_authorize', 'transid', $transid)) {
if (($order = get_record('enrol_authorize', 'transid', $transid))) {
$order->status = ($transstatus == 'Approved Review') ? AN_STATUS_APPROVEDREVIEW : AN_STATUS_REVIEWFAILED;
update_record('enrol_authorize', $order);
$updated++; // Updated order status
@@ -124,7 +124,7 @@ function authorize_process_csv($filename)
}
if (!empty($reftransid) && is_numeric($reftransid) && 'Settled Successfully' == $transstatus && 'Credit' == $transtype) {
if ($order = get_record('enrol_authorize', 'transid', $reftransid)) {
if (($order = get_record('enrol_authorize', 'transid', $reftransid))) {
if (AN_METHOD_ECHECK == $order->paymentmethod) {
$refund = get_record('enrol_authorize_refunds', 'transid', $transid);
if ($refund) {
@@ -195,14 +195,14 @@ function authorize_process_csv($filename)
}
// If user wasn't enrolled, enrol now. Ignore otherwise. Because admin user might submit this file again.
if ($role = get_default_course_role($course)) {
if (($role = get_default_course_role($course))) {
if (! user_has_role_assignment($user->id, $role->id, $coursecontext->id)) {
$timestart = $timeend = 0;
if ($course->enrolperiod) {
$timestart = time();
$timeend = $timestart + $course->enrolperiod;
}
if (role_assign($role->id, $user->id, 0, $coursecontext->id, $timestart, $timeend, 0, 'manual')) {
if (role_assign($role->id, $user->id, 0, $coursecontext->id, $timestart, $timeend, 0, 'authorize')) {
$imported++;
if (!empty($CFG->enrol_mailstudents)) {
$sendem[] = $order->id;
+1 -1
View File
@@ -1,6 +1,6 @@
<?php // $Id$
$plugin->version = 2006112901;
$plugin->version = 2006112902;
$plugin->requires = 2006100401;
?>
+1 -1
View File
@@ -56,7 +56,7 @@
<tr>
<td align="right">enrol_dbpass:</td>
<td>
<input size="15" type="text" name="enrol_dbpass" value="<?php echo $frm->enrol_dbpass ?>" />
<input size="15" type="password" name="enrol_dbpass" value="<?php echo $frm->enrol_dbpass ?>" />
</td>
<td>
<?php print_string("dbpass","enrol_database") ?>
+61 -57
View File
@@ -4,11 +4,11 @@ require_once($CFG->dirroot.'/enrol/enrol.class.php');
class enrolment_plugin_database {
var $log;
var $log;
/*
* For the given user, let's go out and look in an external database
* for an authoritative list of enrolments, and then adjust the
* for an authoritative list of enrolments, and then adjust the
* local Moodle assignments to match.
*/
function setup_enrolments(&$user) {
@@ -32,7 +32,7 @@ function setup_enrolments(&$user) {
//error_log('[ENROL_DB] found ' . count($roles) . ' roles:');
foreach($roles as $role) {
//error_log('[ENROL_DB] setting up enrolments for '.$role->shortname);
/// Get the authoritative list of enrolments from the external database table
@@ -45,10 +45,10 @@ function setup_enrolments(&$user) {
/// Check if a particular role has been forced by the plugin site-wide
/// (if we aren't doing a role-based select)
if (!$have_role && $CFG->enrol_db_defaultcourseroleid) {
if (!$have_role && $CFG->enrol_db_defaultcourseroleid) {
$role = get_record('role', 'id', $CFG->enrol_db_defaultcourseroleid);
}
/// Whether to fetch the default role on a per-course basis (below) or not.
$use_default_role = !$role;
@@ -60,7 +60,7 @@ function setup_enrolments(&$user) {
} else {
error_log('[ENROL_DB] Using config default for roles: '.$role->shortname);
}*/
if ($rs = $enroldb->Execute("SELECT {$CFG->enrol_remotecoursefield} as enrolremotecoursefield
FROM {$CFG->enrol_dbtable}
WHERE {$CFG->enrol_remoteuserfield} = " . $useridfield .
@@ -84,6 +84,7 @@ function setup_enrolments(&$user) {
$courselist = array();
while ($fields_obj = rs_fetch_next_record($rs)) { // Make a nice little array of courses to process
$fields_obj = (object)array_change_key_case((array)$fields_obj , CASE_LOWER);
$courselist[] = $fields_obj->enrolremotecoursefield;
}
rs_close($rs);
@@ -120,14 +121,14 @@ function setup_enrolments(&$user) {
if ($use_default_role) {
$role = get_default_course_role($course);
}
$context = get_context_instance(CONTEXT_COURSE, $course->id);
// Couldn't get a role or context, skip.
if (!$role || !$context) {
continue;
}
// Search the role assignments to see if this user
// already has this role in this context. If it is, we
// skip to the next course.
@@ -139,7 +140,7 @@ function setup_enrolments(&$user) {
continue 2;
}
}
//error_log('[ENROL_DB] Enrolling user in course '.$course->idnumber);
role_assign($role->id, $user->id, 0, $context->id, 0, 0, 0, 'database');
}
@@ -156,7 +157,7 @@ function setup_enrolments(&$user) {
} else {
error_log('[ENROL_DB] Couldn\'t get rows from external db: '.$enroldb->ErrorMsg());
}
}
}
$this->enrol_disconnect($enroldb);
}
@@ -173,7 +174,7 @@ function sync_enrolments($role = null) {
// Connect to the external database
$enroldb = $this->enrol_connect();
if (!$enroldb) {
if (!$enroldb) {
notify("enrol/database cannot connect to server");
return false;
}
@@ -183,12 +184,12 @@ function sync_enrolments($role = null) {
} else {
echo "=== Syncing enrolments for default role ===\n";
}
// first, pack the sortorder...
fix_course_sortorder();
list($have_role, $remote_role_name, $remote_role_value) = $this->role_fields($enroldb, $role);
if (!$have_role) {
if (!empty($CFG->enrol_db_defaultcourseroleid)
and $role = get_record('role', 'id', $CFG->enrol_db_defaultcourseroleid)) {
@@ -197,7 +198,7 @@ function sync_enrolments($role = null) {
echo "!!! WARNING: Role specified by caller, but no (or invalid) role configuration !!!\n";
}
}
// get enrolments per-course
$sql = "SELECT DISTINCT {$CFG->enrol_remotecoursefield} " .
" FROM {$CFG->enrol_dbtable} " .
@@ -216,10 +217,11 @@ function sync_enrolments($role = null) {
begin_sql();
$extcourses = array();
while ($extcourse_obj = rs_fetch_next_record($rs)) { // there are more course records
$extcourse = $extcourse_obj->{$CFG->enrol_remotecoursefield};
$extcourse_obj = (object)array_change_key_case((array)$extcourse_obj , CASE_LOWER);
$extcourse = $extcourse_obj->{strtolower($CFG->enrol_remotecoursefield)};
array_push($extcourses, $extcourse);
// does the course exist in moodle already?
// does the course exist in moodle already?
$course = false;
$course = get_record( 'course',
$CFG->enrol_localcoursefield,
@@ -253,7 +255,7 @@ function sync_enrolments($role = null) {
if (!$have_role) {
$role = get_default_course_role($course);
}
// get a list of the student ids the are enrolled
// in the external db -- hopefully it'll fit in memory...
$extenrolments = array();
@@ -261,7 +263,7 @@ function sync_enrolments($role = null) {
" FROM {$CFG->enrol_dbtable} " .
" WHERE {$CFG->enrol_remotecoursefield} = " . $enroldb->quote($extcourse) .
($have_role ? ' AND '.$remote_role_name.' = '.$remote_role_value : '');
$crs = $enroldb->Execute($sql);
if (!$crs) {
trigger_error($enroldb->ErrorMsg() .' STATEMENT: '. $sql);
@@ -273,12 +275,13 @@ function sync_enrolments($role = null) {
// slurp results into an array
while ($crs_obj = rs_fetch_next_record($crs)) {
array_push($extenrolments, $crs_obj->{$CFG->enrol_remoteuserfield});
$crs_obj = (object)array_change_key_case((array)$crs_obj , CASE_LOWER);
array_push($extenrolments, $crs_obj->{strtolower($CFG->enrol_remoteuserfield)});
}
rs_close($crs); // release the handle
//
// prune enrolments
// prune enrolments to users that are no longer in ext auth
// hopefully they'll fit in the max buffer size for the RDBMS
//
// TODO: This doesn't work perfectly. If we are operating without
@@ -298,7 +301,7 @@ function sync_enrolments($role = null) {
AND ra.roleid = ". $role->id . ($extenrolments
? " AND u.{$CFG->enrol_localuserfield} NOT IN (".join(", ", array_map(array(&$db, 'quote'), $extenrolments)).")"
: ''));
if ($to_prune) {
foreach ($to_prune as $role_assignment) {
if (role_unassign($role->id, $role_assignment->userid, 0, $role_assignment->contextid)){
@@ -308,9 +311,9 @@ function sync_enrolments($role = null) {
}
}
}
//
// insert current enrolments
// insert current enrolments
// bad we can't do INSERT IGNORE with postgres...
//
foreach ($extenrolments as $member) {
@@ -321,7 +324,7 @@ function sync_enrolments($role = null) {
LEFT OUTER JOIN {$CFG->prefix}role_assignments ra ON u.id = ra.userid
AND ra.roleid = {$role->id}
AND ra.contextid = {$context->id}
WHERE u.{$CFG->enrol_localuserfield} = ".$db->quote($member) .
WHERE u.{$CFG->enrol_localuserfield} = ".$db->quote($member) .
" AND (u.deleted IS NULL OR u.deleted=0) ";
$ers = $db->Execute($sql);
@@ -330,7 +333,7 @@ function sync_enrolments($role = null) {
return false;
}
if ( $ers->RecordCount() == 0 ) { // if this returns empty, it means we don't have the student record.
// should not happen -- but skip it anyway
// should not happen -- but skip it anyway
trigger_error('weird! no user record entry?');
continue;
}
@@ -342,7 +345,7 @@ function sync_enrolments($role = null) {
if ($enrolmentid) { // already enrolled - skip
continue;
}
if (role_assign($role->id, $userid, 0, $context->id, 0, 0, 0, 'database')){
error_log( "Assigned role {$role->shortname} to user {$userid} in course {$course->id} (" . format_string($course->shortname) . ")");
} else {
@@ -367,13 +370,13 @@ function sync_enrolments($role = null) {
$sql = "
SELECT ra.roleid, ra.userid, ra.contextid
FROM {$CFG->prefix}role_assignments ra
LEFT OUTER JOIN ({$CFG->prefix}context cn
JOIN {$CFG->prefix}course c ON cn.contextlevel = ".CONTEXT_COURSE." AND cn.instanceid = c.id)
ON ra.contextid = cn.id
WHERE ra.enrol = 'database'" .
JOIN {$CFG->prefix}context cn ON cn.id = ra.contextid
JOIN {$CFG->prefix}course c ON c.id = cn.instanceid
WHERE ra.enrol = 'database'
AND cn.contextlevel = ".CONTEXT_COURSE." " .
($have_role ? ' AND ra.roleid = '.$role->id : '') .
($extcourses
? " AND (c.id IS NULL OR c.{$CFG->enrol_localcoursefield} NOT IN (" . join(",", array_map(array(&$db, 'quote'), $extcourses)) . "))"
? " AND c.{$CFG->enrol_localcoursefield} NOT IN (" . join(",", array_map(array(&$db, 'quote'), $extcourses)) . ")"
: '');
$ers = $db->Execute($sql);
@@ -381,8 +384,9 @@ function sync_enrolments($role = null) {
trigger_error($db->ErrorMsg() .' STATEMENT: '. $sql);
return false;
}
if ( $ers->RecordCount() > 0 ) {
if ( $ers->RecordCount() > 0 ) {
while ($user_obj = rs_fetch_next_record($ers)) {
$user_obj = (object)array_change_key_case((array)$user_obj , CASE_LOWER);
$roleid = $user_obj->roleid;
$user = $user_obj->userid;
$contextid = $user_obj->contextid;
@@ -390,15 +394,15 @@ function sync_enrolments($role = null) {
error_log( "Unassigned role {$roleid} from user $user in context $contextid");
} else {
error_log( "Failed unassign role {$roleid} from user $user in context $contextid");
}
}
}
rs_close($ers); // release the handle
}
commit_sql();
// we are done now, a bit of housekeeping
fix_course_sortorder();
$this->enrol_disconnect($enroldb);
return true;
}
@@ -412,19 +416,19 @@ function get_access_icons($course) {
function config_form($frm) {
global $CFG;
$vars = array('enrol_dbhost', 'enrol_dbuser', 'enrol_dbpass',
'enrol_dbname', 'enrol_dbtable',
'enrol_localcoursefield', 'enrol_localuserfield',
$vars = array('enrol_dbhost', 'enrol_dbuser', 'enrol_dbpass',
'enrol_dbname', 'enrol_dbtable',
'enrol_localcoursefield', 'enrol_localuserfield',
'enrol_remotecoursefield', 'enrol_remoteuserfield',
'enrol_db_autocreate', 'enrol_db_category', 'enrol_db_template',
'enrol_db_autocreate', 'enrol_db_category', 'enrol_db_template',
'enrol_db_localrolefield', 'enrol_db_remoterolefield',
'enrol_remotecoursefield', 'enrol_remoteuserfield',
'enrol_db_ignorehiddencourse');
'enrol_db_ignorehiddencourse', 'enrol_db_defaultcourseroleid');
foreach ($vars as $var) {
if (!isset($frm->$var)) {
$frm->$var = '';
}
}
}
include("$CFG->dirroot/enrol/database/config.html");
}
@@ -486,7 +490,7 @@ function process_config($config) {
$config->enrol_db_autocreate = '';
}
set_config('enrol_db_autocreate', $config->enrol_db_autocreate);
if (!isset($config->enrol_db_category)) {
$config->enrol_db_category = '';
}
@@ -506,7 +510,7 @@ function process_config($config) {
$config->enrol_db_localrolefield = '';
}
set_config('enrol_db_localrolefield', $config->enrol_db_localrolefield);
if (!isset($config->enrol_db_remoterolefield)) {
$config->enrol_db_remoterolefield = '';
}
@@ -522,7 +526,7 @@ function process_config($config) {
// will create the moodle course from the template
// course_ext is an array as obtained from ldap -- flattened somewhat
// NOTE: if you pass true for $skip_fix_course_sortorder
// NOTE: if you pass true for $skip_fix_course_sortorder
// you will want to call fix_course_sortorder() after your are done
// with course creation
function create_course ($course,$skip_fix_course_sortorder=0){
@@ -558,15 +562,15 @@ function create_course ($course,$skip_fix_course_sortorder=0){
if (empty($course->$key)) {
$course->$key = $template[$key];
}
}
}
$course->category = 1; // the misc 'catch-all' category
if (!empty($CFG->enrol_db_category)){ //category = 0 or undef will break moodle
$course->category = $CFG->enrol_db_category;
}
// define the sortorder
$sort = get_field_sql('SELECT COALESCE(MAX(sortorder)+1, 100) AS max ' .
// define the sortorder
$sort = get_field_sql('SELECT COALESCE(MAX(sortorder)+1, 100) AS max ' .
' FROM ' . $CFG->prefix . 'course ' .
' WHERE category=' . $course->category);
$course->sortorder = $sort;
@@ -575,14 +579,14 @@ function create_course ($course,$skip_fix_course_sortorder=0){
$course->startdate = time() + 3600 * 24;
$course->timecreated = time();
$course->visible = 1;
// clear out id just in case
unset($course->id);
unset($course->id);
// truncate a few key fields
$course->idnumber = substr($course->idnumber, 0, 100);
$course->shortname = substr($course->shortname, 0, 15);
// store it and log
if ($newcourseid = insert_record("course", addslashes_object($course))) { // Set up new course
$section = NULL;
@@ -593,8 +597,8 @@ function create_course ($course,$skip_fix_course_sortorder=0){
blocks_repopulate_page($page); // Return value no
if(!$skip_fix_course_sortorder){
fix_course_sortorder();
if(!$skip_fix_course_sortorder){
fix_course_sortorder();
}
add_to_log($newcourseid, "course", "new", "view.php?id=$newcourseid", "enrol/database auto-creation");
} else {
@@ -602,7 +606,7 @@ function create_course ($course,$skip_fix_course_sortorder=0){
notify("Serious Error! Could not create the new course!");
return false;
}
return $newcourseid;
}
@@ -622,7 +626,7 @@ function enrol_connect() {
trigger_error("Error connecting to enrolment DB backend with: "
. "$CFG->enrol_dbhost,$CFG->enrol_dbuser,$CFG->enrol_dbpass,$CFG->enrol_dbname");
return false;
}
}
}
/// DB Disconnect
@@ -642,7 +646,7 @@ function enrol_disconnect($enroldb) {
*/
function role_fields($enroldb, $role) {
global $CFG;
if ($have_role = !empty($role)
&& !empty($CFG->enrol_db_remoterolefield)
&& !empty($CFG->enrol_db_localrolefield)
+2 -2
View File
@@ -667,7 +667,7 @@ function process_person_tag($tagcontents){
$person->picture = 1;
//Llibreria creada per nosaltres mateixos.
require_once($CFG->dirroot.'/lib/gdlib.php');
if ($usernew->picture = save_profile_image($id, $person->urlphoto,'users', true)) {
if ($usernew->picture = save_profile_image($id, $person->urlphoto,'user')) {
set_field('user', 'picture', $usernew->picture, 'id', $id); /// Note picture in DB
}
}
@@ -804,7 +804,7 @@ function process_membership_tag($tagcontents){
}elseif($CFG->enrol_imsunenrol){
// Unenrol
if (! role_unassign($moodleroleid, $memberstoreobj->userid, 0, $rolecontext)) {
if (! role_unassign($moodleroleid, $memberstoreobj->userid, 0, $rolecontext, 'imsenterprise')) {
$this->log_line("Error unenrolling $memberstoreobj->userid from role $moodleroleid in course");
}else{
$membersuntally++;
+1 -1
View File
@@ -129,7 +129,7 @@ if (!isset($frm->enrol_ldap_template)) {
<tr>
<td align="right">ldap_bind_pw:</td>
<td>
<input name="enrol_ldap_bind_pw" type="text" size="30" value="<?php echo $frm->enrol_ldap_bind_pw?>" />
<input name="enrol_ldap_bind_pw" type="password" size="30" value="<?php echo $frm->enrol_ldap_bind_pw?>" />
<?php if (isset($err["enrol_ldap_bind_pw"])) formerr($err["enrol_ldap_bind_pw"]); ?>
</td><td>
<?php print_string("enrol_ldap_bind_pw","enrol_ldap") ?>

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