Compare commits

...

1679 Commits

Author SHA1 Message Date
moodler 7d7ca8e169 Bumped for release 2009-01-28 09:19:05 +00:00
stronk7 2f33962df9 MDL-17365 forum rate - validate rating against scale values. Backported from 18_STABLE 2009-01-27 18:04:14 +00:00
gbateson 035699d459 MDL-17679: implement course reset for HotPot module (thanks to Albert Gasset) 2009-01-27 08:36:37 +00:00
moodlerobot fb59fff8d0 Automatic installer.php lang files by installer_builder (20090127) 2009-01-26 23:42:06 +00:00
moodlerobot 898267d8e7 Automatic installer.php lang files by installer_builder (20090124) 2009-01-23 23:42:07 +00:00
moodlerobot 376454ea6b Automatic installer.php lang files by installer_builder (20090123) 2009-01-22 23:43:03 +00:00
moodlerobot e69fb98dbc Automatic installer.php lang files by installer_builder (20090122) 2009-01-21 23:43:54 +00:00
moodlerobot 14420c8aaf Automatic installer.php lang files by installer_builder (20090121) 2009-01-20 23:41:30 +00:00
moodlerobot faaf4b4b4d Automatic installer.php lang files by installer_builder (20090120) 2009-01-19 23:41:06 +00:00
moodlerobot 14054e093c Automatic installer.php lang files by installer_builder (20090119) 2009-01-18 23:39:16 +00:00
moodlerobot ff7f3a8880 Automatic installer.php lang files by installer_builder (20090118) 2009-01-17 23:49:32 +00:00
moodlerobot 233101c5a4 Automatic installer.php lang files by installer_builder (20090117) 2009-01-16 23:52:53 +00:00
moodlerobot 8215f4b97d Automatic installer.php lang files by installer_builder (20090116) 2009-01-16 03:23:44 +00:00
moodlerobot 98efc065d4 Automatic installer.php lang files by installer_builder (20090110) 2009-01-09 23:42:20 +00:00
skodak a973dea1bc MDL-17799 proper log url sanitisation - big thanks to Full Name hacker ;-) backported from HEAD 2009-01-07 23:02:31 +00:00
skodak 51dcac7ccc MDL-17789 prevent potential XSS problems through PHP_SELF; backported from HEAD 2009-01-06 13:11:11 +00:00
moodlerobot 82fbdcd19c Automatic installer.php lang files by installer_builder (20090106) 2009-01-05 23:41:26 +00:00
moodlerobot e4b44f2b28 Automatic installer.php lang files by installer_builder (20090103) 2009-01-02 23:45:48 +00:00
moodlerobot 6fc7f7dde3 Automatic installer.php lang files by installer_builder (20090102) 2009-01-01 23:43:03 +00:00
moodlerobot 63ebcf17fe Automatic installer.php lang files by installer_builder (20081227) 2008-12-26 23:43:47 +00:00
moodlerobot 726295fb6c Automatic installer.php lang files by installer_builder (20081224) 2008-12-23 23:42:08 +00:00
moodlerobot 30ef17c443 Automatic installer.php lang files by installer_builder (20081222) 2008-12-21 16:46:04 +00:00
stronk7 63443e197a Adding kk_utf8 to installer langs. Backported from HEAD. 2008-12-21 16:03:52 +00:00
stronk7 1e0d95e9c5 file installer.php was added on branch MOODLE_17_STABLE on 2008-12-21 16:03:52 +0000 2008-12-21 16:02:16 +00:00
gbateson c5090097f4 MDL-6467 add "swf" and "flv" to the list of files for which relative urls are converted to absolute urls 2008-12-21 01:45:43 +00:00
moodlerobot c983949fa5 Automatic installer.php lang files by installer_builder (20081218) 2008-12-17 23:42:21 +00:00
moodlerobot 6d8fc58dec Automatic installer.php lang files by installer_builder (20081216) 2008-12-15 23:40:18 +00:00
tjhunt b54a4b0d76 Flatfile enrolment: MDL-11418 SQL error. Thanks to Patrick Pollet.
I don't know exactly how this works, but it looks like a good fix to me, so committing.
2008-12-15 02:53:33 +00:00
moodlerobot 329aced2bb Automatic installer.php lang files by installer_builder (20081215) 2008-12-14 23:39:54 +00:00
moodlerobot 7c2a1dfa15 Automatic installer.php lang files by installer_builder (20081213) 2008-12-12 23:40:36 +00:00
tjhunt f4fca14fe6 match qtype: MDL-17326 backup and restore problems
* The shuffleanswers options was not backed up or restored.

* Responses were not properly recoded on restore.
2008-12-12 06:44:54 +00:00
tjhunt 92e387abbc matching qtype: MDL-17496 With filterall and multilang, the contents of the dropdowns was not being properly filtered
This was caused becuse the solution to MDL-9005 was not quite right.
2008-12-12 04:39:44 +00:00
moodlerobot 7bf643ec7e Automatic installer.php lang files by installer_builder (20081212) 2008-12-11 23:40:08 +00:00
skodak 8406cf8ca8 MDL-17368 removing unused html area spell checker - we have our own implementation; backported from MOODLE_19_STABLE 2008-12-08 00:17:43 +00:00
moodlerobot 0fb9aeb3a6 Automatic installer.php lang files by installer_builder (20081208) 2008-12-07 23:39:59 +00:00
moodlerobot 5e2f637d4e Automatic installer.php lang files by installer_builder (20081206) 2008-12-05 23:39:49 +00:00
tjhunt 3330322360 quiz settings: MDL-16781 Avoid concatenating and calling strtolower on language strings. 2008-12-05 04:20:07 +00:00
moodlerobot dc1e4157ea Automatic installer.php lang files by installer_builder (20081205) 2008-12-04 23:39:56 +00:00
pichetp 58c748b355 MDL-17524 Merging from HEAD
Deleting a calculated question delete datasetdefinitions shared by other question
2008-12-04 17:04:10 +00:00
moodlerobot da24670d05 Automatic installer.php lang files by installer_builder (20081204) 2008-12-03 18:18:18 +00:00
ericmerrill 29249d96dc weblib: MDL-16293: background-color attribute stripped from html. Adding 'background-color' attribute to $ALLOWED_PROTOCOLS array so kses doesn't drop it.
Including:
weblib: MDL-15963: Backporting the addition of font-family and text-decoration while i'm here for consistency.
2008-12-03 16:54:08 +00:00
tjhunt 3ac1efe7fc fix notices: MDL-15974 Some systems that were upgraded have nullable columns, leading to notices
A new install has NOT NULL DEFAULT 0.
2008-11-27 05:11:53 +00:00
tjhunt 2207d52d32 quiz item analysis report: MDL-13427 <br> tags in the headers of some columns. 2008-11-27 04:47:58 +00:00
moodlerobot 772b9415e9 Automatic installer.php lang files by installer_builder (20081126) 2008-11-26 01:45:51 +00:00
moodlerobot 35d34756ce Automatic installer.php lang files by installer_builder (20081123) 2008-11-23 01:38:29 +00:00
moodlerobot 75f9079d78 Automatic installer.php lang files by installer_builder (20081122) 2008-11-22 01:51:18 +00:00
skodak 6f147be325 MDL-17236 html block: proper cleanup of html; backported from HEAD 2008-11-19 16:47:58 +00:00
skodak d4e98fcfbd MDL-17274 security: register globals not supported- now we are preventing upgrades and installs too; backported from HEAD 2008-11-19 09:49:22 +00:00
moodlerobot 7d145624ae Automatic installer.php lang files by installer_builder (20081119) 2008-11-19 01:55:07 +00:00
skodak 9e8f86699e MDL-17143 fixed undefined $userid, in any case moodle/user:editprofile is not usable - so this will not probably work anyway 2008-11-18 21:09:57 +00:00
dongsheng 32a73b3b64 "MDL-17143, remove debug code" 2008-11-18 02:21:29 +00:00
moodlerobot 6bdd68053a Automatic installer.php lang files by installer_builder (20081118) 2008-11-18 01:40:56 +00:00
stronk7 228835fecf MDL-17227 forum: seekey-ize forum prune (split). Backported from HEAD 2008-11-16 22:49:10 +00:00
moodlerobot 0d1060f4bb Automatic installer.php lang files by installer_builder (20081115) 2008-11-15 01:39:50 +00:00
stronk7 df09bb83a1 MDL-17227 forum: add sesskey to post/discussion deletion. Backported from HEAD 2008-11-14 09:01:32 +00:00
moodlerobot 9173d81bbc Automatic installer.php lang files by installer_builder (20081114) 2008-11-14 01:46:58 +00:00
wildgirl 702498fae7 profilesforenrolledusersonly setting: MDL-17143 lang string rewording 2008-11-13 22:21:26 +00:00
moodlerobot 45cdeb0565 Automatic installer.php lang files by installer_builder (20081113) 2008-11-13 01:43:45 +00:00
dongsheng 0750703375 MDL-17143
don't display the user description at all when user isn't enrolled in any courses, backported to 1.7
2008-11-12 03:50:09 +00:00
moodlerobot e37e029ff2 Automatic installer.php lang files by installer_builder (20081112) 2008-11-12 01:56:30 +00:00
moodlerobot 1b93204ec8 Automatic installer.php lang files by installer_builder (20081111) 2008-11-11 01:53:11 +00:00
moodlerobot 8d1b8b2ab4 Automatic installer.php lang files by installer_builder (20081104) 2008-11-04 01:50:37 +00:00
skodak 7c09e5d507 MDL-17110 snoopy: imported new version 1.2.4; backported from HEAD 2008-11-03 07:59:06 +00:00
moodlerobot ca8123897e Automatic installer.php lang files by installer_builder (20081102) 2008-11-02 01:33:49 +00:00
gbateson 501cdba3a7 use "md5key" as secondary key on hotpot_strings table; allow for non-unique secondary keys on hotpot tables (can happen on hotpot_strings) 2008-10-30 06:21:13 +00:00
moodlerobot c85e70f08c Automatic installer.php lang files by installer_builder (20081027) 2008-10-27 01:31:45 +00:00
tjhunt 4ca712272c moodlelib iprange checks: MDL-16986 If the user makes a mistake and types something like 172.16.1.143/148, with something greater than 32 after the slash, treat it as /32. 2008-10-24 02:54:03 +00:00
fmarier 2631a4f3e9 moodlelib/welcome message: MDL-16947 use the userid that was passed in for the profile URL 2008-10-22 02:46:20 +00:00
stronk7 780a3237ac Bumped to 1.7.6+ (before weekly build) 2008-10-21 23:05:39 +00:00
moodlerobot 2885b6246c Automatic installer.php lang files by installer_builder (20081019) 2008-10-19 01:32:26 +00:00
moodlerobot e045c25873 Bumped to 1.7.6 2008-10-15 16:52:54 +00:00
moodlerobot 9fb9a19634 Automatic installer.php lang files by installer_builder (20081013) 2008-10-13 01:38:57 +00:00
moodlerobot ac45cb6868 Automatic installer.php lang files by installer_builder (20081009) 2008-10-09 01:41:27 +00:00
moodlerobot d6398c1aa7 Automatic installer.php lang files by installer_builder (20081005) 2008-10-05 01:30:06 +00:00
tjhunt b959c6e367 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:57 +00:00
moodlerobot c2a020b29c Automatic installer.php lang files by installer_builder (20080928) 2008-09-28 01:33:58 +00:00
stronk7 979078fd7e Backporting MDL-15896 (tabs and recent activity) from HEAD 2008-09-26 09:50:11 +00:00
stronk7 5cb0b4571b Protect message settings with sesskey. MDL-16688 ; backported from 18_STABLE 2008-09-25 22:38:19 +00:00
moodlerobot 3e91a8c1c6 Automatic installer.php lang files by installer_builder (20080925) 2008-09-25 01:35:03 +00:00
moodlerobot 947398763d Automatic installer.php lang files by installer_builder (20080924) 2008-09-24 01:37:34 +00:00
moodlerobot eb09bdfc8f Automatic installer.php lang files by installer_builder (20080922) 2008-09-22 01:27:13 +00:00
moodlerobot 80f906ef5b Automatic installer.php lang files by installer_builder (20080921) 2008-09-21 01:29:12 +00:00
pichetp df5fd088ce MDL-15358 negative data between () bad } closing... 2008-09-20 20:29:54 +00:00
pichetp a7b41a3858 MDL-15358 negative data between () merge from 1.9 as this file is no more in HEAD 2008-09-20 20:16:55 +00:00
moodlerobot 8729b26e66 Automatic installer.php lang files by installer_builder (20080902) 2008-09-02 01:33:13 +00:00
tjhunt 4c01616d7e 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:17:01 +00:00
moodlerobot d7a113ccf6 Automatic installer.php lang files by installer_builder (20080829) 2008-08-29 01:33:21 +00:00
tjhunt 16cebcc326 MDL-16243 Implement a health-centre check that the question categories are arranged properly in tree structures. 2008-08-28 05:06:20 +00:00
moodlerobot 01642a7176 Automatic installer.php lang files by installer_builder (20080828) 2008-08-28 01:36:24 +00:00
moodlerobot fb24b67aa0 Automatic installer.php lang files by installer_builder (20080825) 2008-08-25 01:27:15 +00:00
moodlerobot faf39f00fc Automatic installer.php lang files by installer_builder (20080824) 2008-08-24 01:25:34 +00:00
moodlerobot eeb562d148 Automatic installer.php lang files by installer_builder (20080823) 2008-08-23 01:27:00 +00:00
moodlerobot b3c5d55d51 Automatic installer.php lang files by installer_builder (20080822) 2008-08-22 01:31:55 +00:00
moodlerobot e0c4317044 Automatic installer.php lang files by installer_builder (20080821) 2008-08-21 01:32:09 +00:00
tjhunt 2abc0d001d MDL-15605 merge problem. 2008-08-20 08:56:38 +00:00
tjhunt f285be0eaf 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:52:47 +00:00
tjhunt 55954755f4 MDL-16141 Need an sql_position function to do POSITION(needle IN haystack) on crappy databases. Backported from HEAD. 2008-08-20 08:51:03 +00:00
moodlerobot cdeb1274c4 Automatic installer.php lang files by installer_builder (20080819) 2008-08-19 01:29:50 +00:00
moodlerobot d658317313 Automatic installer.php lang files by installer_builder (20080818) 2008-08-18 01:26:22 +00:00
moodlerobot 297c72fd2f Automatic installer.php lang files by installer_builder (20080817) 2008-08-17 01:22:23 +00:00
tjhunt ef40013c24 MDL-16056 - Aiken format should treat input as plain text, and so escape HTML special characters. 2008-08-15 03:13:31 +00:00
tjhunt 9ed313978a MDL-16056 - Backporting comment changes before merging the acutal fix. 2008-08-15 03:08:12 +00:00
tjhunt 2caa535789 Oops! RISK_DATALOSS did not exist before 1.9. 2008-08-14 02:09:19 +00:00
tjhunt e38099e42d MDL-15819 - Review the RISK_XXX flags on all quiz and question capabilites. 2008-08-13 07:05:27 +00:00
moodlerobot 579ef29363 Automatic installer.php lang files by installer_builder (20080812) 2008-08-12 01:34:25 +00:00
moodlerobot 321cc00de4 Automatic installer.php lang files by installer_builder (20080811) 2008-08-11 01:05:52 +00:00
moodlerobot 66a1817c9c Automatic installer.php lang files by installer_builder (20080809) 2008-08-09 01:26:18 +00:00
moodlerobot 0561809c5d Automatic installer.php lang files by installer_builder (20080808) 2008-08-08 01:30:55 +00:00
moodlerobot 863b73aff3 Automatic installer.php lang files by installer_builder (20080807) 2008-08-07 01:33:51 +00:00
moodlerobot 14439b54d0 Automatic installer.php lang files by installer_builder (20080806) 2008-08-06 01:32:30 +00:00
moodlerobot ecbd19b23a Automatic installer.php lang files by installer_builder (20080805) 2008-08-05 01:27:57 +00:00
moodlerobot bf5ee9d9d6 Automatic installer.php lang files by installer_builder (20080802) 2008-08-02 01:26:52 +00:00
skodak 00e1dce31e 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:10:09 +00:00
moodlerobot a7f0a47456 Automatic installer.php lang files by installer_builder (20080728) 2008-07-28 01:28:26 +00:00
skodak 3e4fae4d8d MDL-15823 format_string() improvements; merged from MOODLE_19_STABLE 2008-07-25 22:45:46 +00:00
moodlerobot 84ca389754 Automatic installer.php lang files by installer_builder (20080723) 2008-07-23 01:27:23 +00:00
moodlerobot 4874505398 Automatic installer.php lang files by installer_builder (20080722) 2008-07-22 01:35:06 +00:00
moodlerobot c1dcb5d292 Automatic installer.php lang files by installer_builder (20080721) 2008-07-21 01:22:48 +00:00
moodlerobot ce4c57764c Added autogenerated bn_utf8 installer file. 2008-07-20 21:21:35 +00:00
moodlerobot d46a3b303d file installer.php was added on branch MOODLE_17_STABLE on 2008-07-20 21:21:35 +0000 2008-07-20 21:20:08 +00:00
moodlerobot 66ef299f5e Automatic installer.php lang files by installer_builder (20080719) 2008-07-19 01:23:49 +00:00
moodler 603cf45886 MDL-6850 Removed apparent-size from du 2008-07-18 06:38:32 +00:00
gbateson 81a74ce130 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:16:31 +00:00
moodler bf1e6b85f5 BUmped post release 2008-07-11 05:45:41 +00:00
moodler 7055e88f97 Bumped to release 2008-07-11 05:29:10 +00:00
dongsheng 7d8c97dcc4 MDL-14932, improve accessibility in role assigning page. 2008-07-11 04:56:38 +00:00
skodak 2d60f585aa MDL-15450 CSRF prevention; merged from MOODLE_16_STABLE 2008-07-08 13:05:09 +00:00
moodlerobot 95416b9889 Automatic installer.php lang files by installer_builder (20080708) 2008-07-08 01:27:21 +00:00
skodak 6649c902cd MDL-15516 prevent access to deleted profiles; backported from HEAD 2008-07-05 14:59:44 +00:00
moodlerobot 2fd1b1a9a3 Automatic installer.php lang files by installer_builder (20080705) 2008-07-05 01:28:32 +00:00
arborrow 1e5575ae9e MDL-7571 - shuffles 'mode' before displaying, merged from 18STABLE 2008-07-04 22:24:40 +00:00
moodlerobot 41f7e89fb6 Automatic installer.php lang files by installer_builder (20080704) 2008-07-04 01:25:22 +00:00
gbateson e6da58fb3c MDL-15184: fix sql injection vulnerability 2008-07-01 10:47:40 +00:00
moodlerobot 81590f6553 Automatic installer.php lang files by installer_builder (20080701) 2008-07-01 01:23:06 +00:00
moodlerobot 30c6a88aee Automatic installer.php lang files by installer_builder (20080630) 2008-06-30 01:27:27 +00:00
scyrma cd4a340157 MDL-15392: fix output sanitization. 2008-06-27 03:35:44 +00:00
moodlerobot 7446f0d0ff Automatic installer.php lang files by installer_builder (20080626) 2008-06-26 01:29:34 +00:00
Francois Marier 478503ba0f Fix drift between CVS and git (deleted files only) 2008-06-24 01:26:46 +00:00
moodlerobot ec573b8969 Automatic installer.php lang files by installer_builder (20080624) 2008-06-24 01:26:46 +00:00
tjhunt 886ef74dff 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:24 +00:00
moodlerobot 860a2858f4 Automatic installer.php lang files by installer_builder (20080623) 2008-06-23 01:23:38 +00:00
moodlerobot 06ecd61c8b Automatic installer.php lang files by installer_builder (20080621) 2008-06-21 01:26:25 +00:00
gbateson 88010c44ce replace get_jmatch_items by set_jmatch_items 2008-06-20 22:26:51 +00:00
gbateson fc7de9bb75 allow <img> and other tags in LHS side of JMatch in "v6" output format 2008-06-19 05:53:30 +00:00
tjhunt 70484742a9 MDL-15290 - Missing question types not handled properly on backup. 2008-06-18 14:29:38 +00:00
moodlerobot 52b6a471c5 Automatic installer.php lang files by installer_builder (20080616) 2008-06-16 01:28:20 +00:00
moodlerobot e7288e1e7e Automatic installer.php lang files by installer_builder (20080612) 2008-06-12 01:40:47 +00:00
moodlerobot e487fa20dc Automatic installer.php lang files by installer_builder (20080610) 2008-06-10 01:38:31 +00:00
gbateson 92bb71dcec 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:40:01 +00:00
moodlerobot 21a6060f3d Automatic installer.php lang files by installer_builder (20080531) 2008-05-31 01:36:23 +00:00
mchurch 3a5677d49c MDL-15035 - Changed error message to more meaningful one. 2008-05-28 14:57:24 +00:00
moodlerobot 6494eb8fe0 Automatic installer.php lang files by installer_builder (20080523) 2008-05-23 01:39:47 +00:00
moodlerobot 1b8dbf5466 Automatic installer.php lang files by installer_builder (20080522) 2008-05-22 01:40:41 +00:00
moodlerobot aafb64be36 Automatic installer.php lang files by installer_builder (20080521) 2008-05-21 01:44:01 +00:00
tjhunt dfd00d9d32 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:42 +00:00
moodlerobot 0c76f8bc3a Automatic installer.php lang files by installer_builder (20080520) 2008-05-20 01:35:47 +00:00
moodlerobot e1ecf0a918 Automatic installer.php lang files by installer_builder (20080517) 2008-05-17 01:37:20 +00:00
stronk7 4f75c6c949 Avoid $_REQUEST["id"] usage. MDL-14806 ; backported from 19_STABLE 2008-05-13 01:52:25 +00:00
tjhunt d02317b6da 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:54 +00:00
tjhunt 9ba3aacb99 MDL-14797 - Error when moving a course to an empty category on Postgres 2008-05-12 10:44:46 +00:00
moodlerobot fb6099f56d Automatic installer.php lang files by installer_builder (20080512) 2008-05-12 01:36:50 +00:00
moodlerobot 45e83c7913 New uz installer lang 2008-05-10 02:58:25 +00:00
moodlerobot 895ac595b7 file installer.php was added on branch MOODLE_17_STABLE on 2008-05-10 02:58:25 +0000 2008-05-10 02:57:14 +00:00
tjhunt 34710324e5 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:45 +00:00
moodlerobot eed364d080 Automatic installer.php lang files by installer_builder (20080509) 2008-05-09 01:39:33 +00:00
moodlerobot 2422634052 Automatic installer.php lang files by installer_builder (20080508) 2008-05-08 01:37:34 +00:00
tjhunt 4340e07b2c 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:49 +00:00
moodlerobot 468eff4e21 Automatic installer.php lang files by installer_builder (20080504) 2008-05-04 01:44:13 +00:00
moodlerobot fc74c5674a New lang supported by installer: cy_utf8 2008-05-04 00:45:01 +00:00
moodlerobot dc8320a6f8 file installer.php was added on branch MOODLE_17_STABLE on 2008-05-04 00:45:01 +0000 2008-05-04 00:42:16 +00:00
moodlerobot 6b7b9ad10c Automatic installer.php lang files by installer_builder (20080503) 2008-05-03 01:32:40 +00:00
jerome e18bc77b56 MDL-11382 added a link 'Profil' to the administration block 2008-05-02 06:14:36 +00:00
scyrma 8440f947ca MDL-8592: Get spellchecking to work over https (backport from 1.9) 2008-05-02 03:38:22 +00:00
moodlerobot 11abfe0569 Automatic installer.php lang files by installer_builder (20080501) 2008-05-01 01:38:01 +00:00
moodlerobot ad08d64332 Automatic installer.php lang files by installer_builder (20080430) 2008-04-30 01:34:41 +00:00
moodlerobot f468c0e4c1 Automatic installer.php lang files by installer_builder (20080429) 2008-04-29 01:36:36 +00:00
moodlerobot 1c8e6588aa Automatic installer.php lang files by installer_builder (20080425) 2008-04-25 01:35:38 +00:00
tjhunt 443fd25436 MDL-13982 - Performance problem when deleting questions from large question banks. Thanks to Michael Spall for this fix. 2008-04-23 13:44:29 +00:00
tjhunt 3c956dbd60 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:13 +00:00
tjhunt bdda301ebf MDL-14352 - General feedback for descriptions not showing up on the review page, as it should. 2008-04-22 16:17:03 +00:00
moodler fbdc843096 MDL-11142 Roles upgrade was losing timestart and timeend for teachers and students :-( 2008-04-18 03:28:27 +00:00
gbateson 7f3c24f40b removed setting of timeclose and timeopen when course format == "weeks" 2008-04-18 00:58:07 +00:00
moodlerobot 5834d7813a Automatic installer.php lang files by installer_builder (20080417) 2008-04-17 01:32:05 +00:00
dongsheng ca0908b961 check.gif should keep in this mod 2008-04-15 03:37:26 +00:00
dongsheng d40e15ee7a MDL-8188, moved from mod/glossary/check.gif 2008-04-15 03:33:05 +00:00
dongsheng 207c5454b9 MDL-8188, move check.gif to pix/i/approve.gif 2008-04-15 03:31:56 +00:00
moodlerobot 0875ca82c2 Automatic installer.php lang files by installer_builder (20080414) 2008-04-14 01:36:45 +00:00
moodlerobot a1a85b1779 Automatic installer.php lang files by installer_builder (20080413) 2008-04-13 01:30:30 +00:00
moodlerobot f15a666f64 Automatic installer.php lang files by installer_builder (20080412) 2008-04-12 01:29:50 +00:00
gbateson 1b81ef9090 do not show hidden HotPots in mod/hotpot/index.php 2008-04-11 05:14:10 +00:00
moodlerobot 4b0ce9f3b7 Automatic installer.php lang files by installer_builder (20080408) 2008-04-08 01:36:50 +00:00
stronk7 cca8a446da Fix wrong conversion from '0' to '' in oracle_diry_hack. MDL-14182 ; backported from HEAD 2008-04-04 11:28:04 +00:00
moodlerobot db3568deb4 Automatic installer.php lang files by installer_builder (20080404) 2008-04-04 01:18:42 +00:00
moodlerobot 2240b6c451 Automatic installer.php lang files by installer_builder (20080326) 2008-03-26 03:19:28 +00:00
moodlerobot ebe6a497eb Automatic installer.php lang files by installer_builder (20080325) 2008-03-25 03:16:44 +00:00
moodlerobot b7b280b44c Automatic installer.php lang files by installer_builder (20080315) 2008-03-15 03:15:41 +00:00
moodlerobot 7da25cbffe Automatic installer.php lang files by installer_builder (20080314) 2008-03-14 03:16:01 +00:00
nicolasconnault 817a4d47b1 MDL-13919 Fixed undefined variable. Merging from MOODLE_16_STABLE 2008-03-13 14:01:37 +00:00
moodlerobot 9609d14e81 Automatic installer.php lang files by installer_builder (20080312) 2008-03-12 03:25:38 +00:00
ethem 13b8d2e6eb 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:38:04 +00:00
moodlerobot 9228301b3f Automatic installer.php lang files by installer_builder (20080311) 2008-03-11 03:25:24 +00:00
pichetp b6630ed3dc MDL-12503 Loguniform merging from head 2008-03-10 21:51:37 +00:00
andreabix d0f3b3f6fc Fixed [MDL-12830] 2008-03-10 15:58:03 +00:00
gbateson 42e5c3de66 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:36:13 +00:00
moodlerobot 70efd67049 Automatic installer.php lang files by installer_builder (20080308) 2008-03-08 03:32:19 +00:00
moodlerobot 7e836fe858 Automatic installer.php lang files by installer_builder (20080307) 2008-03-07 03:31:48 +00:00
moodlerobot 328f98af9b Automatic installer.php lang files by installer_builder (20080304) 2008-03-04 03:41:17 +00:00
skodak 5a045ae328 MDL-13705 2008-03-01 13:12:40 +00:00
moodlerobot a45e386284 Automatic installer.php lang files by installer_builder (20080229) 2008-02-29 03:29:15 +00:00
skodak e5375362ac MDL-13705 2008-02-28 21:19:15 +00:00
skodak 052547f2e7 MDL-13705 2008-02-28 21:02:41 +00:00
moodlerobot ff29df4190 Automatic installer.php lang files by installer_builder (20080228) 2008-02-28 03:33:49 +00:00
moodlerobot b02d7ca8fd Automatic installer.php lang files by installer_builder (20080227) 2008-02-27 03:35:07 +00:00
moodlerobot 1a38880ad2 Automatic installer.php lang files by installer_builder (20080223) 2008-02-23 03:20:48 +00:00
moodlerobot 03ccee2431 Automatic installer.php lang files by installer_builder (20080222) 2008-02-22 03:31:11 +00:00
tjhunt f4f3ac35a5 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:47 +00:00
moodler 02bbdb1a05 MDLSITE-359 FIxed bad installer strings 2008-02-21 05:54:45 +00:00
moodlerobot b055ae802b Automatic installer.php lang files by installer_builder (20080221) 2008-02-21 03:34:10 +00:00
moodlerobot e3ce6d9434 Automatic installer.php lang files by installer_builder (20080220) 2008-02-20 03:30:26 +00:00
moodlerobot ae933e4f1f Automatic installer.php lang files by installer_builder (20080218) 2008-02-18 03:28:46 +00:00
moodlerobot 0b920406c8 Automatic installer.php lang files by installer_builder (20080215) 2008-02-15 03:32:11 +00:00
ethem d1620b4c11 Moved libraries to index.php 2008-02-11 15:25:45 +00:00
ethem 3abe79ff52 Moved libraries to index.php 2008-02-11 15:18:48 +00:00
moodlerobot 7614a54d59 Automatic installer.php lang files by installer_builder (20080209) 2008-02-09 03:27:12 +00:00
moodlerobot c617406e19 Automatic installer.php lang files by installer_builder (20080208) 2008-02-08 03:23:10 +00:00
ethem 58d2845b5c 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 ()
2008-02-07 16:03:48 +00:00
moodler 2bff64d017 Fix subject lines and corrupted emails from messages MDL-13364 (merged) 2008-02-07 05:20:57 +00:00
gbateson 678165c2f5 MDL-13328 correct the counting of attempts when clickreporting has been enabled 2008-02-07 04:18:32 +00:00
moodlerobot 2b298ce72c Added lang 2008-02-07 03:29:59 +00:00
moodlerobot 9a3bb4366c Automatic installer.php lang files by installer_builder (20080207) 2008-02-07 03:19:49 +00:00
nicolasconnault 85ca3686cb MDL-12158 Applied Matt's patch, merging from 1.6 2008-02-05 10:38:32 +00:00
gbateson 84620a0041 MDL-10451 remove extraneous closing </b> tag from lang/en_utf8/help/hotpot/outputformat.html 2008-02-05 04:21:58 +00:00
gbateson 95fcbce2a1 MDL-13048 fix undefined course id when importing a Hot Potatoes quiz into the Lesson module 2008-02-05 04:09:16 +00:00
scyrma 40777e9fd0 MDL-13060 - removing old entries fro VA and CD 2008-02-04 00:48:28 +00:00
moodler 26c2a9b587 Automatic installer.php lang files by installer_builder (20080203) 2008-02-03 03:29:35 +00:00
moodler 68d87c70d4 Automatic installer.php lang files by installer_builder (20080202) 2008-02-02 03:38:19 +00:00
moodler da837fdb78 Automatic installer.php lang files by installer_builder (20080201) 2008-02-01 03:32:41 +00:00
gbateson 162e13cc89 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:27 +00:00
moodler 59d4af490e Automatic installer.php lang files by installer_builder (20080131) 2008-01-31 03:38:43 +00:00
tjhunt 7e555c8958 MDL-13110 - Manually grading random questions does not work. Fix thanks to Ken Burres. 2008-01-30 18:18:40 +00:00
mchurch becdc870ed MDL-13252 Fix context to always use course context, rather than instance->page. 2008-01-30 16:54:38 +00:00
mchurch ebf2deff6a MDL-13252 Fix context to always use course context, rather than instance->page. 2008-01-30 16:48:09 +00:00
scyrma 75407fe763 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:42:13 +00:00
moodler 7c437a57e0 Automatic installer.php lang files by installer_builder (20080130) 2008-01-30 03:35:01 +00:00
scyrma a8a80afccd Upgrade path for MDL-13060. 2008-01-29 05:48:53 +00:00
moodler 23c58c6375 Automatic installer.php lang files by installer_builder (20080129) 2008-01-29 03:30:45 +00:00
moodler 8d45fcc505 Merged pdf php5 fix from MDL-13207 2008-01-28 05:28:54 +00:00
moodler 70e1cd76c8 Automatic installer.php lang files by installer_builder (20080128) 2008-01-28 03:34:32 +00:00
gbateson 79c57d1b99 fix for MDL-13173: quotes in HotPot activity name 2008-01-26 08:26:17 +00:00
moodler 70c7e67dcb Automatic installer.php lang files by installer_builder (20080126) 2008-01-26 03:26:40 +00:00
tjhunt ff073582cf MDL-13096 - Student can view all text for all questions in a course. 2008-01-24 15:26:56 +00:00
moodler 1d3318d93f Automatic installer.php lang files by installer_builder (20080124) 2008-01-24 04:00:24 +00:00
moodler 39ca046247 Automatic installer.php lang files by installer_builder (20080123) 2008-01-23 03:38:33 +00:00
moodler fb0d5a229e Automatic installer.php lang files by installer_builder (20080122) 2008-01-22 03:32:22 +00:00
moodler 0ff0cbe326 Automatic installer.php lang files by installer_builder (20080121) 2008-01-21 03:31:48 +00:00
moodler cdae66cbad Automatic installer.php lang files by installer_builder (20080120) 2008-01-20 03:29:49 +00:00
moodler f639d4fdae Automatic installer.php lang files by installer_builder (20080118) 2008-01-18 03:34:04 +00:00
nicolasconnault 85c62f1c93 MDL-4218 Added require_once deprecatedlib.php 2008-01-17 08:45:57 +00:00
nicolasconnault a0f6fa7987 MDL-4218 Disabling the check for admin dir 2008-01-17 08:09:52 +00:00
nicolasconnault 4a1cbc606d MDL-4218 Disabling the check for web root URL 2008-01-17 07:48:21 +00:00
moodler 5c457d48e9 Automatic installer.php lang files by installer_builder (20080117) 2008-01-17 03:34:47 +00:00
moodler 509f1f07a9 Automatic installer.php lang files by installer_builder (20080116) 2008-01-16 03:31:39 +00:00
Martin Langhoff 8885b483cb cvsimport fixups - binary 2008-01-14 08:54:34 +00:00
Martin Langhoff 773242671f cvsimport fixups 2008-01-14 08:54:34 +00:00
moodler 47cc17f258 Moved to + after release 2008-01-14 08:54:34 +00:00
moodler 6450b75034 Automatic installer.php lang files by installer_builder (20080114) 2008-01-14 03:45:36 +00:00
poltawski e4cfa65450 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 20:07:06 +00:00
moodler 3b798d4e6c Automatic installer.php lang files by installer_builder (20080113) 2008-01-13 03:28:04 +00:00
skodak 6253ee1ef2 MDL-12914 Register globals trouble; backported from MOODLE_19_STABLE 2008-01-11 23:25:41 +00:00
moodler cda4480961 Bump to 1.7.4 release 2008-01-11 14:42:09 +00:00
moodler 94fdd21d38 Automatic installer.php lang files by installer_builder (20080111) 2008-01-11 03:33:00 +00:00
moodler 77aafcbbfb Automatic installer.php lang files by installer_builder (20080110) 2008-01-10 03:31:20 +00:00
poltawski 137c04383f MDL-12889 - fix bad invalid capability check
backported from MOODLE_18_STABLE
2008-01-09 15:44:45 +00:00
arborrow 00a2ce3bf9 MDL-12889 - uncommitting previous change - since grade:viewall is new to 1.9 (my bad) 2008-01-09 15:18:44 +00:00
arborrow a789bed6ef MDL-12889 - bad capability check [thanks Tim!] in assignment recent activity report
merged from MOODLE_19_STABLE
2008-01-09 15:09:59 +00:00
moodler 897e6a3507 Automatic installer.php lang files by installer_builder (20080108) 2008-01-08 03:31:18 +00:00
moodler a49d9fe97f Automatic installer.php lang files by installer_builder (20080107) 2008-01-07 03:28:44 +00:00
moodler ec5e9fc647 Automatic installer.php lang files by installer_builder (20080106) 2008-01-06 03:18:49 +00:00
iarenaza 4abc7c0630 MDL-10921 Fix backport of patch to 1.7.x (was using the new plugin settings syntax).
Thanks to Patrick Pollet for pointing this out and providing a fix.
2008-01-05 14:33:55 +00:00
moodler 528ddea1b3 Automatic installer.php lang files by installer_builder (20080104) 2008-01-04 03:25:21 +00:00
moodler a9608e5795 Automatic installer.php lang files by installer_builder (20080103) 2008-01-03 03:17:47 +00:00
skodak e8b2de8d18 MDL-12793 PARAM_HOST incorrect cleaning; backported from MOODLE_19_STABLE 2008-01-01 17:27:14 +00:00
stronk7 abc597e27b Better behaviour for "-" course searches under MSSQL and Oracle. MDL-7312 2008-01-01 11:28:19 +00:00
moodler 296f1fc6c3 Automatic installer.php lang files by installer_builder (20080101) 2008-01-01 03:09:25 +00:00
moodler ccf77fbe00 Automatic installer.php lang files by installer_builder (20071231) 2007-12-31 03:13:19 +00:00
moodler a5db1182c4 Automatic installer.php lang files by installer_builder (20071230) 2007-12-30 03:10:18 +00:00
moodler ce4da52bb8 Automatic installer.php lang files by installer_builder (20071229) 2007-12-29 03:11:44 +00:00
iarenaza 2f2dafc16a MDL-12323 MDL-4061 Don't connect to the LDAP server if update external is not set for any field.
Backported from MOODLE_18_STABLE.
2007-12-28 23:15:16 +00:00
stronk7 e21492da15 Prevent race condition in event creation. MDL-5956.
Credit goes to Penny, Luke and Martin @ Catalyst.

Merged from MOODLE_16_STABLE
2007-12-28 18:37:50 +00:00
moodler 34ca70feba Automatic installer.php lang files by installer_builder (20071228) 2007-12-28 03:28:21 +00:00
moodler c83adc965f Automatic installer.php lang files by installer_builder (20071225) 2007-12-25 03:12:06 +00:00
moodler d5c871bbd0 Automatic installer.php lang files by installer_builder (20071224) 2007-12-24 03:15:25 +00:00
moodler 2bbe9bcb1c Automatic installer.php lang files by installer_builder (20071221) 2007-12-21 03:18:33 +00:00
tjhunt 3e2d9e9567 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:36 +00:00
moodler 40beb0f097 Automatic installer.php lang files by installer_builder (20071218) 2007-12-18 03:21:04 +00:00
tjhunt 1bc05922bc Fix Javascript error from essay questions on the review page. 2007-12-12 18:10:46 +00:00
tjhunt fb18d9cab7 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:38 +00:00
moodler 4520a06ef1 Automatic installer.php lang files by installer_builder (20071206) 2007-12-06 05:10:40 +00:00
moodler 3514c326aa Automatic installer.php lang files by installer_builder (20071204) 2007-12-04 05:17:07 +00:00
fmarier 93bb63f06f ddllib: Mark table_column() as deprecated
Signed-off-by: Eloy Lafuente
2007-12-03 23:14:47 +00:00
moodler 8d43fd582f New installer files added - stronk7
Backported from HEAD
2007-11-29 17:01:25 +00:00
moodler 5ce3dfb28e file installer.php was added on branch MOODLE_17_STABLE on 2007-11-29 17:01:25 +0000 2007-11-29 16:59:26 +00:00
moodler e76d70aaef Automatic installer.php lang files by installer_builder (20071129) 2007-11-29 05:54:46 +00:00
moodler 1910bda1d6 Automatic installer.php lang files by installer_builder (20071125) 2007-11-25 03:51:23 +00:00
moodler 8d81931a47 Automatic installer.php lang files by installer_builder (20071123) 2007-11-23 04:56:35 +00:00
ikawhero f37cb203d8 Reverting previous changes to MOODLE_17_STABLE
$configvar is an object so need to work with $configvar-value
2007-11-21 03:07:33 +00:00
moodler 3f5c88c898 Automatic installer.php lang files by installer_builder (20071120) 2007-11-20 05:11:29 +00:00
moodler a85da4da7e Automatic installer.php lang files by installer_builder (20071118) 2007-11-18 04:43:01 +00:00
arborrow 0c412f3b3c 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 23:52:36 +00:00
gbateson e0d2d6ec88 replaced use of CFG->dbfamily with CFG->dbtype, because CFG->dbfmaily is only available Moodle 1.8 and later 2007-11-13 03:41:21 +00:00
gbateson 9d9a65e9af 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:53:09 +00:00
skodak 845df47c11 MFC: MDL-12079 fixed use of clean_param() 2007-11-10 14:52:42 +00:00
fmarier abe9371c58 Add missing fields when upgrading/installing on Postgres
mod/exercise, mod/scorm and question/type/rqp
MDL-12023
2007-11-09 01:21:56 +00:00
moodler 3e79f5f4f9 Automatic installer.php lang files by installer_builder (20071108) 2007-11-08 05:18:45 +00:00
moodler 8fefbc38ad Simple grammar fix 2007-11-07 07:08:14 +00:00
nicolasconnault 7c534ccd8a MDL-8853 Applied Ann's Patch 2007-11-06 13:25:34 +00:00
moodler d8c68f7860 New installer file added to CVS repo. 2007-11-04 17:05:25 +00:00
moodler 2dbe84a629 Automatic installer.php lang files by installer_builder (20071103) 2007-11-03 05:04:03 +00:00
pichetp 9a94ae5494 MDL-11867 setting real null when response is null in calculated question merged from
head
2007-11-01 00:40:01 +00:00
moodler 3af6627e64 Automatic installer.php lang files by installer_builder (20071031) 2007-10-31 04:31:57 +00:00
tjhunt 8d9e5477a4 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:21 +00:00
mchurch 0e3dd76c50 Removing the questionnaire language file from main release. 2007-10-29 21:33:08 +00:00
mchurch 0820aedbf7 Removing the questionnaire language file from main release. 2007-10-29 21:04:04 +00:00
tjhunt ce26bd19ea 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:05 +00:00
joseph_rezeau 691d35efc2 removed mistakenly committed regexp plugin 2007-10-28 08:38:23 +00:00
joseph_rezeau a0a1aeb694 committed from 18_stable 2007-10-28 08:30:38 +00:00
moodler cb1113b7c8 Automatic installer.php lang files by installer_builder (20071028) 2007-10-28 05:09:00 +00:00
moodler d36088f711 Automatic installer.php lang files by installer_builder (20071023) 2007-10-23 05:07:23 +00:00
tjhunt 40cc3341ad MDL-11824 - Literal asterisk (\*) in shortanswer question not handled correctly by get_correct_responses + Unit tests. Backported from MOODLE_18_STABLE.
Also backported the fix for MDL-11703.
2007-10-22 15:38:10 +00:00
tjhunt d7414e9068 file testquestiontype.php was added on branch MOODLE_17_STABLE on 2007-10-22 15:38:10 +0000 2007-10-22 15:37:32 +00:00
moodler f5563d1efd Automatic installer.php lang files by installer_builder (20071021) 2007-10-21 04:18:27 +00:00
moodler 67e9830697 Automatic installer.php lang files by installer_builder (20071018) 2007-10-18 05:35:42 +00:00
tjhunt d01b47381b 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:46 +00:00
nicolasconnault c6a10296eb MDL-10905 iterating properly through readdir() 2007-10-15 05:53:20 +00:00
moodler 3674039ca0 Automatic installer.php lang files by installer_builder (20071015) 2007-10-15 04:28:49 +00:00
gbateson f0417bf3cb 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 01:03:30 +00:00
moodler 13e60ec63c POst 1.73 2007-10-14 08:23:03 +00:00
moodler 07cd3ecabd 1.7.3 2007-10-14 08:22:17 +00:00
moodler 1d68f3cd73 Automatic installer.php lang files by installer_builder (20071011) 2007-10-11 04:15:52 +00:00
iarenaza 23290eea4d Fix MDL-11632: Multiple files with emtpy lines outside PHP open/close tags
There are multiple issues with Moodle files containing empty or blank lines
(lines consisting of white spaces or tabs only) and/or white space before or
after the PHP open and close tags, notably with config.php and theme files.
2007-10-10 21:33:29 +00:00
moodler f050e82eb6 Automatic installer.php lang files by installer_builder (20071010) 2007-10-10 04:45:55 +00:00
nfreear 8aa669ca72 Fixes MDL-11676, Skip block links are broken in Internet Explorer 6. Merged. 2007-10-09 16:06:59 +00:00
skodak 8abba9e902 MDL-11663 sanitise submitted data when editing users; merged from MOODLE_16_STABLE 2007-10-08 19:57:39 +00:00
gbateson 023dc2c338 added escaping of quotes in TimesUp message, so that apostrophes do not cause Javascript errors 2007-10-08 06:40:37 +00:00
pichetp 11db0ce1ec checking that there remain $oldwrappedids before deleting them lines 87-..
add         if(is_array($oldwrappedids) && count($oldwrappedids)){
2007-10-06 20:59:49 +00:00
stronk7 c9379ddbaa MDL-11597. Backported from HEAD to 17_STABLE 2007-10-04 22:20:54 +00:00
moodler 2bd2bb878d Automatic installer.php lang files by installer_builder (20071004) 2007-10-04 05:19:09 +00:00
moodler fe8aad143d Automatic installer.php lang files by installer_builder (20071003) 2007-10-03 05:13:24 +00:00
whchuang cae4cdb309 added missing string definition for sectionerror. Fixed MDL-10766 2007-10-03 00:02:37 +00:00
gbateson 8809ff2b35 use new function "hotpot_stripslashes()" instead of PHP's "stripslashes()" to remove slashes after preg_replace with "e" modifier, because when MSSQL Server is installed, PHP's "stripslashes()" does not remove slashes, even if the Moodle database is not MSSQL 2007-09-30 04:18:18 +00:00
toyomoyo 6bea13a914 MDL-11391, grades are not displayed because gradebookroles can not be set 2007-09-27 02:57:44 +00:00
gbateson 0e04dc36c2 change CONTEXT_MODULE to CONTEXT_COURSE in order to fix "Invalid context creation for level 50 instance" error on "mod/hotpot/index.php" caused by get_context_instance(CONTEXT_MODULE, $course->id) in "mod/hotpot/lib.php" 2007-09-26 07:14:33 +00:00
iarenaza 68d924ce8a MDL-10921 LDAP Auth to Active Directory requires LDAP_OPT_REFERRALS option set; backported from HEAD 2007-09-25 21:05:57 +00:00
skodak bf5cc256fd MDL-11413 I hope now it is correct solution; backported from HEAD 2007-09-25 14:06:59 +00:00
nfreear 247958fbe9 MDL-1149 Accessibility: Current week/topic is NOT indicated non-visually, only in styling. Merged. 2007-09-25 12:45:29 +00:00
nfreear bf4fe92223 MDL-11436 Accessibility: Encapsulate "accesshide" HTML class in function, and use. Merged partial fix - just weblib. 2007-09-25 12:35:37 +00:00
skodak 9bcbf6a743 MDL-11237 raising memory limit for preg_xxxx(), backported from HEAD 2007-09-24 16:35:40 +00:00
skodak 7c84c844f9 MDL-11413 revisited; backported from HEAD 2007-09-24 15:26:58 +00:00
tjhunt 676dbd7285 MDL-10916 - Import and Export of Cloze question misses out "generalfeedback" column. 2007-09-24 14:16:58 +00:00
skodak 81ac2c8630 MDL-11414 fixed handling of log urls (problem reported by Andreas Nolden); backported from HEAD; fixing previous commit :-( 2007-09-23 13:20:36 +00:00
skodak 55f9f1432f MDL-11414 fixed handling of log urls (problem reported by Andreas Nolden); backported from HEAD 2007-09-23 13:15:26 +00:00
skodak 9f476e5fe2 MDL-11413 improved text cleaning (problem reported by Andreas Nolden); backported from HEAD 2007-09-23 12:29:58 +00:00
skodak 4663bd9f09 MDL-11413 improved text cleaning (problem reported by Andreas Nolden); backported from HEAD 2007-09-23 12:24:39 +00:00
moodler bde6d304f9 Automatic installer.php lang files by installer_builder (20070920) 2007-09-20 04:29:46 +00:00
iarenaza 764d44c11e MDL-11299 - Make objectClass string comparison case insensitive.
LDAP serves accept attribute names in a case insensitive way, so don't
force the users to use any particular spelling. (backported from HEAD).
2007-09-18 09:18:16 +00:00
moodler c2c3f6e885 Automatic installer.php lang files by installer_builder (20070918) 2007-09-18 04:27:50 +00:00
stronk7 22f8303fc7 Interlinking from/to data module added. MDL-9576
Backported from HEAD
2007-09-17 22:06:12 +00:00
stronk7 b0cfc7cbd5 Now, under quick grading, when new assignment_submissions records are
created, we provide a default for data1 and data2 text not null
columns. MDL-11268
2007-09-17 16:57:54 +00:00
moodler 118a639ff3 Automatic installer.php lang files by installer_builder (20070917) 2007-09-17 05:00:46 +00:00
stronk7 f4989ae561 Backported from MOODLE_18_STABLE
Show the roll dates option only if the backup course has a start date
(some formats like main page, social..., haven't it and rolling dates
from 0 produces crazy dates. MDL-10125
2007-09-16 17:40:55 +00:00
moodler 4ff82c1505 Automatic installer.php lang files by installer_builder (20070916) 2007-09-16 04:19:16 +00:00
iarenaza e2a7235da8 Remove additional check when dealing with hidden courses in LDAP enrolment.
The check is superfluous and uses an inexistant variable ($type) that
was removed when we switched to role based enrolment.

Fixes MDL-11098 MDL-10282 and MDL-8346. (backported from HEAD)
2007-09-15 21:59:11 +00:00
stronk7 062c59e346 Now using one cross-db solution to be able to
simulate the status boolean ins assignment
submissions. MDL-8164 & MDL-10846

Backported from MOODLE_HEAD
2007-09-13 18:01:05 +00:00
tjhunt 3cc55cab9e MDL-11081 and MDL-11211 - Implement quiz_question_list_instances. The lach of this function was causing a horrible dataloss bug: MDL-11211. Fix thanks to Janne Mikkonen, refined by me. Merged from MOODLE_16_STABLE. 2007-09-13 17:29:02 +00:00
tjhunt 3742f86ac1 Take out duplicate $Id$ CVS tags. 2007-09-10 11:06:12 +00:00
moodler 9a28eacb84 Automatic installer.php lang files by installer_builder (20070908) 2007-09-08 04:02:56 +00:00
moodler 446b5e025c Automatic installer.php lang files by installer_builder (20070907) 2007-09-07 04:45:11 +00:00
pichetp 5c89371717 Correcting a little error: datesetitem = array(); instead of datasetitem = array();
line +-550 $question->dataset[$datasetname]->datasetitem = array();
2007-09-07 02:46:12 +00:00
stronk7 2b27d0a946 Now restoring groups is cross-db (the detection of existing groups) 2007-09-05 18:37:34 +00:00
stronk7 15ef45da52 Repeated fields aren't necessary at all since Moodle 1.7
and, in fact, they throw error if using limits! MDL-9592
2007-09-05 15:25:33 +00:00
skodak 3444317011 MDL-11053 Course object not escaped before insert - patch by Aaron C Spike; backported from HEAD 2007-08-29 13:55:10 +00:00
stronk7 e17d507d5a Now Moodle >= 1.9 requires PostgreSQL >= 8.0. MDL-11033 2007-08-28 15:31:34 +00:00
nicolasconnault 7db37fd580 MDL-9005 Fixed this and another multilang issue (module name in preview didn't filter multilang tags either). 2007-08-28 13:22:16 +00:00
moodler 6497764c84 Automatic installer.php lang files by installer_builder (20070828) 2007-08-28 05:53:27 +00:00
nicolasconnault 37829534f6 MDL-7574 Applying Matthew Davidson's patch. 2007-08-27 17:04:56 +00:00
nicolasconnault 554fbddf7d MDL-7574 Applying the patch as is, with a bit extra code formatting for the JS section (indents etc.) 2007-08-27 15:36:37 +00:00
moodler 529d7f47bf Automatic installer.php lang files by installer_builder (20070827) 2007-08-27 06:08:41 +00:00
moodler 45b3a8554a Automatic installer.php lang files by installer_builder (20070826) 2007-08-26 05:51:58 +00:00
moodler 8f3d4e4ef5 Automatic installer.php lang files by installer_builder (20070825) 2007-08-25 04:10:45 +00:00
gbateson a067240cbf fixed results not being sent caused by commenting out of "interceptFeedback" (probably left over from debugging) 2007-08-25 01:42:16 +00:00
nicolasconnault ef2f763ee8 MDL-10970 Someone was using
$locations = array('location1');
$locations += array('location2', 'location3', 'location4');

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

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

$locations: array('location1', 'location3', 'location4');
2007-08-24 07:18:13 +00:00
moodler 56d3da5a01 Automatic installer.php lang files by installer_builder (20070824) 2007-08-24 05:59:47 +00:00
moodler 1aa8ff170f Automatic installer.php lang files by installer_builder (20070823) 2007-08-23 05:59:35 +00:00
moodler 8ec088f738 Automatic installer.php lang files by installer_builder (20070822) 2007-08-22 09:02:48 +00:00
nicolasconnault e7c13fcb46 MDL-10177 Applied lovely hack (not ugly!) suggested by Pablo. It's lovely because it solves an ugly design error in the previous code: modifying a parameter variable in the function body. 2007-08-20 17:57:44 +00:00
nfreear 343a1ea8e0 MDL-5400 "Accessibility modifications..." - fixing the 4 themes that don't use <h1>. Merged. 2007-08-20 11:00:10 +00:00
moodler 216237369e Automatic installer.php lang files by installer_builder (20070816) 2007-08-16 06:46:47 +00:00
tjhunt 10fc5f6e22 MDL-10834 - Restore of quiz module may create calendar events without a date/time. Fix thanks to Derek Woolhead. 2007-08-14 13:33:09 +00:00
moodler 462f360429 Automatic installer.php lang files by installer_builder (20070814) 2007-08-14 06:10:46 +00:00
tjhunt c0ea84fbf3 Accessign wrong field of $mod from course.modinfo. 2007-08-10 10:36:35 +00:00
tjhunt 3a6b6c0d74 MDL-10759 - Bogus get_context_instance call in quiz_print_recent_mod_activity 2007-08-08 11:30:16 +00:00
pichetp 64aa333345 Merging MDL-10680 resolved by thepurplebob from 1.9 2007-08-08 02:09:32 +00:00
moodler ea41587638 Automatic installer.php lang files by installer_builder (20070806) 2007-08-06 03:52:37 +00:00
stronk7 fbadfe0295 fix insert_record() call using arrays instead of objects 2007-08-05 22:47:20 +00:00
moodler 4b1edf80c1 Automatic installer.php lang files by installer_builder (20070804) 2007-08-04 05:42:43 +00:00
moodler 1286c71e5a Automatic installer.php lang files by installer_builder (20070803) 2007-08-03 07:12:18 +00:00
gbateson 62eefc5487 fix javascript error: "parseint not defined" 2007-08-01 05:26:09 +00:00
moodler aafc01514e Fixed typo from MDL-9222 2007-08-01 05:13:32 +00:00
stronk7 671b83e238 Since now, Moodle 2.0 will require PHP 5.2. MDL-10390 2007-07-30 16:37:31 +00:00
moodler 0197c39ba1 Automatic installer.php lang files by installer_builder (20070730) 2007-07-30 04:35:43 +00:00
toyomoyo 40168efe75 fix for MDL-10640, adding missing index during upgrade fo mdl_role_capabilities table 2007-07-30 02:40:14 +00:00
wildgirl dfa4162d8a MDL-4912 docs directory clean-up 2007-07-28 20:27:21 +00:00
moodler 0c05267ff4 Automatic installer.php lang files by installer_builder (20070728) 2007-07-28 06:08:50 +00:00
mchurch 992c135e19 Bug #MDL-10632, fixing the use of 'delete_event'. 2007-07-27 18:45:24 +00:00
moodler b3c7ea0c94 Automatic installer.php lang files by installer_builder (20070726) 2007-07-26 05:14:01 +00:00
toyomoyo 1e281f706a merged fix for MDL-10564, wrong userid used for get_my_courses in blogs 2007-07-26 02:45:40 +00:00
stronk7 9ae0b39497 Adding two missing strings. MDL-6017
NOTE: These are OUT for Moodle 1.9 and new Grade System, so don't
      translate them!

Merged from MOODLE_16_STABLE
2007-07-25 22:09:21 +00:00
stronk7 137fcd2015 Fixing two get_string() calls when restoring gradebook preferences. MDL-6017
Merged from MOODLE_16_STABLE
2007-07-25 21:32:46 +00:00
moodler 7ccfee94ad Automatic installer.php lang files by installer_builder (20070724) 2007-07-24 06:16:45 +00:00
moodler 5e7ee078a9 Automatic installer.php lang files by installer_builder (20070721) 2007-07-21 05:32:34 +00:00
moodler 28dcf434c6 Automatic installer.php lang files by installer_builder (20070719) 2007-07-19 05:51:35 +00:00
toyomoyo 0042320984 merged fix for MDL-10149, prevent the deletion of the last admin role 2007-07-19 05:20:57 +00:00
toyomoyo 8da1406e3a DML-10461, timemodified in role_assignements not preserved during restore 2007-07-19 03:38:59 +00:00
moodler 0ef8d9cab6 Automatic installer.php lang files by installer_builder (20070718) 2007-07-18 06:24:56 +00:00
moodler d55f1be549 Bye bye CHANGES http://moodle.org/mod/forum/discuss.php?d=75777 2007-07-17 02:21:26 +00:00
stronk7 d4097a429c Now the glossary->allowcoments setting is respected. MDL-8056
Credit goes to Matt Clarkson. Thanks.

Backported from HEAD
2007-07-15 22:31:09 +00:00
tjhunt 9b4327c71d MDL-10452 - start quiz UI is confusing if you have quiz:preview capability. Change the 'start/continue attempt button' to say 'start/continue preview' in this case. 2007-07-13 15:57:29 +00:00
moodler 097eb89c65 Automatic installer.php lang files by installer_builder (20070713) 2007-07-13 08:29:04 +00:00
nfreear 8c21e87a7b Part fix of bug MDL-10332 "Data module not filtering list by group on .." - restore bug. Merged. 2007-07-12 14:25:25 +00:00
moodler 253f9eee33 Merged changes from MDL-8451 from 1.8 2007-07-11 09:14:54 +00:00
moodler bb803227f1 Automatic installer.php lang files by installer_builder (20070710) 2007-07-10 06:31:44 +00:00
poltawski f0d60d1631 MDL-10356 - typo in player.php in MOODLE_17_STABLE 2007-07-08 00:15:39 +00:00
moodler 99c4cc6fdf Automatic installer.php lang files by installer_builder (20070706) 2007-07-06 04:50:20 +00:00
moodler 58e24e2f1a Automatic installer.php lang files by installer_builder (20070705) 2007-07-05 05:50:55 +00:00
skodak bca26abf4c MDL-10341 fixed user search cleaning; backported from MOODLE_18_STABLE 2007-07-04 08:33:04 +00:00
bobopinna 9241a50fb7 Refixed bug MLD-7325 2007-07-03 14:11:20 +00:00
bobopinna 6d1bb31cda Added missing help file 2007-07-03 12:34:53 +00:00
bobopinna 661406a466 file maxattempt.html was added on branch MOODLE_17_STABLE on 2007-07-03 12:34:53 +0000 2007-07-03 12:13:52 +00:00
bobopinna cd57295a36 file whatgrade.html was added on branch MOODLE_17_STABLE on 2007-07-03 12:34:54 +0000 2007-07-03 12:04:18 +00:00
bobopinna 6acef6e30b file skipview.html was added on branch MOODLE_17_STABLE on 2007-07-03 12:34:54 +0000 2007-07-03 12:04:18 +00:00
bobopinna 1610eb0f85 Fixed bug MDL-9486 2007-07-03 09:24:38 +00:00
bobopinna 6cf7303684 Added some missing strings
bug MDL-9720
2007-07-03 08:05:57 +00:00
moodler 4ed23b4f9e Automatic installer.php lang files by installer_builder (20070702) 2007-07-02 04:53:58 +00:00
moodler fabdbdb3f6 Automatic installer.php lang files by installer_builder (20070629) 2007-06-29 04:56:09 +00:00
moodler 43e2896e63 Automatic installer.php lang files by installer_builder (20070628) 2007-06-28 05:33:39 +00:00
skodak 025451ff7d MDL-10276 Text cleaning trouble; backported from HEAD 2007-06-27 12:05:05 +00:00
gbateson cafaa207ef make sure $hotpot->id is set when adding calendar events for new HotPot 2007-06-26 12:02:34 +00:00
moodler e59461215d Implemented fix for MDL-10254, thanks Valery! 2007-06-26 09:06:44 +00:00
moodler 0ebee25007 Automatic installer.php lang files by installer_builder (20070626) 2007-06-26 07:51:48 +00:00
gbateson ce197abbef in XML source files of HP quizzes, convert relative URLs to absolute URLs in links using window.open(...) 2007-06-26 05:02:03 +00:00
gbateson 9036033b8a change relative URLs to absolute URLs in window.open(...) 2007-06-26 02:31:57 +00:00
urs_hunkler 81bf069328 changed navmenuwidth to the standard value 2007-06-25 12:21:58 +00:00
moodler 9ff8ae7953 Automatic installer.php lang files by installer_builder (20070625) 2007-06-25 06:43:38 +00:00
moodler 4527713fdc Automatic installer.php lang files by installer_builder (20070623) 2007-06-23 05:57:55 +00:00
tjhunt ae4dc90cb7 MDL-10213 - layuout problem for question in IE in Moodle 1.7. I'm taking the opportunity to clean up the CSS in 1.8 and HEAD to match what I did in 1.7. Fix and CSS cleanup back-ported from MOODLE_18_STABLE. 2007-06-22 13:46:32 +00:00
jamiesensei 7ab78c274b making environment colours css selector refer to table class instead of body id. So that colours show up on other pages besides admin page. 2007-06-22 11:04:58 +00:00
gbateson 20f08456a8 allow display of results by group 2007-06-21 03:54:45 +00:00
gbateson 94bbc1f5e2 fix selection of individual students in the report conditions selector panel, (use PARAM_ALPHANUM instead of PARAM_ALPHA for reportusers parameter) 2007-06-21 02:53:23 +00:00
moodler 4610edf1b6 Automatic installer.php lang files by installer_builder (20070620) 2007-06-20 08:43:38 +00:00
jamiesensei 847da17ddb added styles to install.php for colours for environment table 2007-06-20 06:34:08 +00:00
stronk7 f3fa18a199 Now calendar export have some correct defaults. MDL-10175
Backported from MOODLE_18_STABLE
2007-06-19 18:58:23 +00:00
jamiesensei 8b85c2cf5d accidentally added these, removing them 2007-06-19 18:01:01 +00:00
jamiesensei c309cf8612 *** empty log message *** 2007-06-19 17:40:31 +00:00
jamiesensei 2685a2eee1 MDL-10168 improvements to display of results from environment checks 2007-06-19 16:25:59 +00:00
jamiesensei 416622f005 elaborated phpdoc comment slightly for doc_link 2007-06-19 15:18:22 +00:00
jamiesensei 8f95983a3e refactored page_doc_link into two functions. doc_link returns a link to docs. page_doc_link returns the link for this page. 2007-06-19 14:59:22 +00:00
poltawski 0a16e0f268 MDL-10148 - hard coded lang strings in user/message.html 2007-06-18 19:17:57 +00:00
bobopinna 37646f6f0e Fixed a typo added during last commit 2007-06-18 12:08:55 +00:00
ethem aa7b876f03 MDL-9836
Authorize.net / SSL Config Bug prevents display of options from enrol/authorize/enrol.php
2007-06-15 17:52:28 +00:00
csantossaenz 16f89f2ccf Fixed bug mdl-7516 2007-06-15 09:03:47 +00:00
pichetp 524e369670 Removing question/type/datasetdependent/categorydatasetdefinitions.php MDL-10072 2007-06-13 07:49:59 +00:00
toyomoyo c72ab7a328 fixing a bug when setting granular bug during restore 2007-06-13 06:33:15 +00:00
pichetp c74677ca95 solving lost of dataitems MDL-10087 merging from 1.8 2007-06-13 03:44:13 +00:00
pichetp 0f8c983585 giving to questiondatasets.html all the features of datasetdefinitions_form.php of HTML
QuickForm
2007-06-12 03:27:40 +00:00
pichetp 59a6d971a4 replacing "saveas" by "next page" and a greater size to answers formula <input> 2007-06-11 20:12:04 +00:00
moodler 45e948f87e Automatic installer.php lang files by installer_builder (20070611) 2007-06-11 06:11:26 +00:00
pichetp c0226d096a correcting the custom_genrator line 610-611 2007-06-11 00:17:57 +00:00
pichetp aaf3348589 Adding various improvements (MDL-8565, MDL-9496, MDL10070 etc.)to calculated question 2007-06-10 22:45:34 +00:00
moodler 158c4b5c80 Added two recent installer langs to CVS 2007-06-09 08:22:46 +00:00
moodler a3eba6f2d2 Automatic installer.php lang files by installer_builder (20070609) 2007-06-09 04:47:52 +00:00
martinlanghoff 8d7e790de7 moodlelib:moodle_request_shutdown() - only call apache_child_terminate if child_terminate is true - MDL-9350
Apparently there _is_ a PHP ini setting controlling
it -- defaults to off.
2007-06-07 21:22:36 +00:00
poltawski ed289f97e5 MDL-8080 Grade exceptions broken for teacher by invalid capability check.i
Thanks to Paul Ortman for the patch.
2007-06-04 22:52:05 +00:00
mark-nielsen 5d7ce9bf29 Fix for MDL-9947, remap activity links during restore process 2007-05-28 17:18:54 +00:00
jamiesensei fbb5ad35e7 MDL-9734 fix for clean_param PARAM_LOCALURL bug 2007-05-27 11:21:55 +00:00
moodler 9e2df8519a Automatic installer.php lang files by installer_builder (20070527) 2007-05-27 04:33:24 +00:00
moodler e4cc5dbc7f Automatic installer.php lang files by installer_builder (20070526) 2007-05-26 04:08:44 +00:00
moodler 34e92f9b8b Automatic installer.php lang files by installer_builder (20070525) 2007-05-25 04:33:33 +00:00
tjhunt 6e2284138b MDL-9878 - fix call-time pass by references. Backported from HEAD. 2007-05-22 14:11:16 +00:00
moodler 73a4864b82 Automatic installer.php lang files by installer_builder (20070522) 2007-05-22 05:22:03 +00:00
gbateson 1a6a597fff use PARAM_ALPHANUM on "section" parameter so that "section=all" is allowed 2007-05-22 04:27:28 +00:00
moodler 9df49de633 Merged fix for MDL-9859 2007-05-21 14:45:05 +00:00
sam_marshall 404d380856 MDL-8227 Merged wiki locking fix 2007-05-21 12:02:24 +00:00
moodler cbc0bc50b1 Fix from MDL-7233 for LDAP change passwords 2007-05-21 05:27:54 +00:00
moodler ae767e7bd3 Automatic installer.php lang files by installer_builder (20070521) 2007-05-21 04:50:35 +00:00
moodler 2ccbd6ccf1 Automatic installer.php lang files by installer_builder (20070519) 2007-05-19 04:43:42 +00:00
skodak 8dbf6bb9e0 MDL-9418 use proper addslashes before each insert; backported from MOODLE_18_STABLE 2007-05-16 20:09:32 +00:00
poltawski 652fab8576 MDL-9819 - Restoring numerical questions was broken 2007-05-15 14:49:14 +00:00
moodler 31942aff61 Automatic installer.php lang files by installer_builder (20070515) 2007-05-15 04:52:50 +00:00
pichetp 5006792896 merging from head so that calculated questions can be imported and other improvments 2007-05-15 03:30:33 +00:00
pichetp 786542c572 merging from head so that calculated questions can be imported and other improvments 2007-05-15 03:23:32 +00:00
pichetp edaaa46655 merging small modifications from head mostly for calculated questions 2007-05-15 03:13:38 +00:00
moodler c0bea40aaf Automatic installer.php lang files by installer_builder (20070512) 2007-05-12 05:47:40 +00:00
csantossaenz 7dd535056e Deleted addslashes_js() because it was impossible to add it to weblib.php 2007-05-11 11:10:10 +00:00
csantossaenz 555bfa16d0 Added function addslashes_js() to make the javacript receive the strings correctly 2007-05-11 10:57:20 +00:00
moodler 470be2688b Automatic installer.php lang files by installer_builder (20070511) 2007-05-11 06:33:10 +00:00
gbateson 135d93ec9e when inserting 'Give Up' button, if site encoding is not iso-8859-1, then set page encoding to get_string('thischarset') 2007-05-11 05:17:42 +00:00
moodler 75943600ed Added CSS for current language MDL-9750 2007-05-09 06:46:37 +00:00
gbateson 7fd3f594da modified "hpNewFunction" to allow Rottmeier quizze (Find-It, Dropdown) s to run on Safari (Mac) 2007-05-07 02:47:17 +00:00
poltawski 55904e49dc MDL-8971 - Fixed typo 2007-05-06 09:39:46 +00:00
moodler 4c5da8022e Automatic installer.php lang files by installer_builder (20070506) 2007-05-06 04:56:05 +00:00
gbateson 2f47a361ff remove duplicate id attribute from body tag; microincrement version to 2006091203 (release 2.2.2) 2007-05-04 02:43:35 +00:00
gbateson 9197627ade set default body font size to "small" 2007-05-03 00:55:20 +00:00
gbateson 4b168cfabc add HP 6.2 templates; add compatability with Safari (Mac browser); microincrement version to 2006091202 (release 2.2.1) 2007-05-02 23:49:59 +00:00
moodler ffa6c35826 Automatic installer.php lang files by installer_builder (20070501) 2007-05-01 04:21:00 +00:00
moodler b0e924a51e Automatic installer.php lang files by installer_builder (20070429) 2007-04-29 04:32:54 +00:00
moodler 58a9623c54 Automatic installer.php lang files by installer_builder (20070428) 2007-04-28 04:25:04 +00:00
tjhunt 1bde9b823c Fix comedy require_once. Merged from MOODLE_16_STABLE. 2007-04-24 21:16:10 +00:00
stronk7 76eea68b9e Now resource/view.php?r=XXX links are recoded properly in backup/restore. MDL-9450
Backported from MOODLE_18_STABLE
2007-04-22 22:07:49 +00:00
skodak 8c0a6839f2 MDL-9483 Problem with question restore relinking when quiz not selected 2007-04-21 12:36:57 +00:00
thepurpleblob a1f951f3a4 MDL-9395:
Trued to call function that did not exist. Old function has been modified
to return valid list of categories and we call that instead.
2007-04-20 12:59:36 +00:00
thepurpleblob 72449953e4 MDL-9395:
Tried to call function that didn't exist. Made old function have
the functionality to return valid categories list and used that.
2007-04-20 12:57:55 +00:00
tjhunt f359daab58 MDL-9432 - Forgot to return success/failure in two places. 2007-04-19 17:37:20 +00:00
tjhunt b33888d124 Fix error message to say the right thing. 2007-04-19 17:16:29 +00:00
skodak 1a5e85a22c fixed MDL-9411 : MDL-9012 has partially wrong fix; backporting of MDL-9207 2007-04-19 12:10:38 +00:00
tjhunt 0dd1becdc7 MDL-9432 - When restoring questions, links are not recoded. Merged from OU moodle. 2007-04-18 15:56:30 +00:00
donal72 61e35a87da MDL-9424 Removing call to MDL1.8 function 2007-04-18 06:56:33 +00:00
cataluke 0c34a17b09 admin/uploaduser.php: Fixed not enrolling user into course if user already exists
Author: Patrick Li <patrick@catalyst.net.nz>
Committer: Luke Hudson <luke@catalyst.net.nz>
2007-04-18 02:45:14 +00:00
donal72 52f24bfec6 Fix for MDL-9216 ("Login as" doesn't work) backported from head 2007-04-18 01:09:15 +00:00
cataluke b2787982b7 MDL-7856 - make database search case-insensitive for PostgreSQL too.
Signed-off-by: Luke Hudson <luke@catalyst.net.nz>


Author: Andrew Walbran <andrew.walbran@catalyst.net.nz>
Committer: Luke Hudson <luke@catalyst.net.nz>
2007-04-17 05:57:06 +00:00
stronk7 8f4c3dae23 Fixed quesry to work agains Oracle. Repeated fields + limit
are incompatible for Oracle. MDL-9321
2007-04-16 14:42:30 +00:00
moodler a8c2fc5dee Automatic installer.php lang files by installer_builder (20070416) 2007-04-16 04:23:55 +00:00
martinlanghoff a3b2f4cbeb moodle_request_shutdown(): silence errors when apache_child_terminate() is disallowed - (MDL-9350) 2007-04-16 00:24:44 +00:00
tjhunt 1e066cbf29 MDL-5799 - quiz previews were sometimes showing up in the quiz overview report. 2007-04-12 20:10:47 +00:00
jamiesensei 79dd326093 making notifytiny style a little bigger 2007-04-12 15:35:57 +00:00
stronk7 1f775e8c46 Fixing typo causing some (a few) sites to break on upgrade. Credit
goes to Rafa Gutierrez. MDL-9316

Merged from MOODLE_16_STABLE
2007-04-12 15:31:21 +00:00
martinlanghoff 7b6c65a560 moodle_request_shutdown(): raise $CFG->apachemaxmem to 25MiB for 1.7 and newer 2007-04-12 03:30:20 +00:00
toyomoyo c935b991a1 MDL-9291, temporarily disabling blog this link 2007-04-12 02:17:09 +00:00
martinlanghoff 28ca56c93d Fixed 'off by one' month bug in month select boxes generated by
print_date_selector when users time zone set to GMT-13.


Author: Matt Clarkson <mattc@catalyst.net.nz>
Committer: Matt <mattc@catalyst.net.nz>
2007-04-12 00:45:35 +00:00
mjollnir_ ec3200262d merged: fixing warnings in stats lib - rather than doing an include_once and noticing for every missing mod, check the file exists first from MOODLE_16_STABLE, and fixed up some weirdness in the reports 2007-04-11 23:52:31 +00:00
tjhunt 8539018ed4 MDL-9079 - Paging broken in quiz overview report. 2007-04-11 20:37:36 +00:00
tjhunt 245de1a597 MDL-9303 - General Feedback not shown for essay questions on review screen. 2007-04-11 19:03:34 +00:00
thepurpleblob 3fdd49a75a MDL-9123:
Added language string for error message
2007-04-11 12:19:16 +00:00
thepurpleblob 3ff6c931ee MDL-9123:
No check was made of the validity of the category id read from the form.
So it could theoretically have been spoofed.
2007-04-11 11:02:48 +00:00
toyomoyo c7da0d864e fix for MDL-9268 2007-04-10 05:15:14 +00:00
moodler e97c7b28c5 Automatic installer.php lang files by installer_builder (20070410) 2007-04-10 03:31:59 +00:00
mjollnir_ 2ffbe91234 add support for https source for popups
previously fullscreen.php tried to load any javascript files that were
running in the popup's parent.
If the source of the script didn't start with "http:" it was assumed
that it must be a relative path. This caused problems when it tried to
make it into an absolute path.
Fixed Regex to include support for https
Credit: Peter Bulmer <peterb@catalyst.net.nz>
2007-04-09 20:38:49 +00:00
stronk7 4f3835b601 Now $CFG->apachemaxmem is respected.
Merged from MOODLE_16_STABLE
2007-04-07 16:05:54 +00:00
skodak 445a3c1233 MDL-9227 Inconsistent HTTPS for profile edit page 2007-04-06 07:46:41 +00:00
jamiesensei 4989bc7951 added a style for the required field description that was forgotten. More are missing judging by appearances. 2007-04-06 06:45:16 +00:00
jamiesensei 8eb102ff1c see MDL-8886.
fixes bug that meant :

       $mform->disabledIf('studentfeedbackurl', 'studentfeedback', 'eq', 0);
       $mform->disabledIf('studentfeedbackurl', 'studentfeedback', 'eq', 3);
       $mform->disabledIf('studentfeedbackurl', 'studentfeedback', 'eq', 4);

didn't work.
2007-04-06 06:08:19 +00:00
toyomoyo 9b6cf38c96 fix for MDL-9186, capability fix for calendar 2007-04-05 08:00:40 +00:00
toyomoyo 203743c638 added missing string 2007-04-05 06:06:45 +00:00
toyomoyo c691deff3a fix for MDL-9165, admins should see private blogs 2007-04-05 06:04:24 +00:00
martinlanghoff bf01ed8211 lib/setup moodelib: Introducing moodle_request_shutdown()
Now Moodle will have a 'shutdown_function' function. Right now
registered (and useful) only when running under apache + mod_php.

This initial function checks whether memory usage in this process exceeded
10MiB or $CFG->apachemaxmem (int, in bytes). This is really useful to prevent
using more RAM than we have.
2007-04-05 05:00:23 +00:00
toyomoyo 93cc66aeae fix for MDL-9197, multilang filter not applied to default role in course settings 2007-04-05 03:55:51 +00:00
moodler f103bb199e Automatic installer.php lang files by installer_builder (20070405) 2007-04-05 03:35:14 +00:00
nicolasconnault 476f7cc8ee MDL-9204 New submission wasn't given a timemodified upon creation. 2007-04-05 03:25:27 +00:00
skodak e9a1bffc8f MDL-8802 fixed byteserving broken by adobe anti xss patch; backported from MOODLE_18_STABLE 2007-04-04 19:46:14 +00:00
jamiesensei 377d7c7515 fixes MDL-9195 mform->hardFreeze() doesn't remove id attribute of label for checkbox 2007-04-04 10:29:41 +00:00
moodler 7bc643ebaf Automatic installer.php lang files by installer_builder (20070404) 2007-04-04 03:59:55 +00:00
nicolasconnault 184f9c2b66 MDL-9192:
a.dimmed:link,
a.dimmed:visited {
  color:#AAAAAA;
}
2007-04-04 02:38:19 +00:00
nicolasconnault 93fa4ca922 MDL-9193 2007-04-04 02:20:43 +00:00
nicolasconnault 552de335d0 MDL-9147 2007-04-03 08:41:51 +00:00
toyomoyo 9e6e743dfc fix for broken blog utf8 migration 2007-04-02 08:41:57 +00:00
moodler f9bbb1031e More changes to make mforms compatible in 1.7 with 1.8 MDL-9159 2007-04-02 05:38:04 +00:00
moodler 290b74fd49 Removed conflicts 2007-04-02 05:29:33 +00:00
moodler 7122026066 Fixed a conflict 2007-04-02 05:27:52 +00:00
moodler 70cade16e3 Complete port of Moodle 1.8 formslib.php back into 1.7 to aid development of any modules that may use formslib in 1.7
MDL-9159
2007-04-02 05:26:03 +00:00
toyomoyo 9146dd83de backporting more efficient get_my_courses 2007-04-02 03:50:15 +00:00
toyomoyo 9e162a23da admins should not need course:view 2007-04-02 02:37:09 +00:00
moodler 3df033ca4a Better handling of coursemanagers when none are being shown MDL-9139 2007-04-01 15:51:05 +00:00
moodler 5241345d02 Merged solution for MDL-6458 typo 2007-03-31 05:24:50 +00:00
stronk7 62cf504bdd fixing check of environmental tests. 2007-03-30 15:59:42 +00:00
moodler cf47a79c1d Merged changes from 1.8 for "course creators" problem MDL-8093 2007-03-30 15:39:55 +00:00
stronk7 12e91437f3 Adding a missing parameter to the "add new course" button. MDL-9129
Backported from MOODLE_18_STABLE
2007-03-30 15:38:32 +00:00
tjhunt a065fdd6f9 Backporting a layout fix from Moodle 1.8 2007-03-30 13:50:47 +00:00
tjhunt e0ddea8b8f Small code cleanup to fix an obscure warning. If you got an error in the middle of creating a quiz attempt, you could get an attempt with no states. Then that caused an error when the attempt was deleted. 2007-03-30 10:17:06 +00:00
tjhunt d7df238204 Fix notice. 2007-03-30 09:33:37 +00:00
moodler db2105c889 Bumping after 1.7.2 release 2007-03-30 09:00:54 +00:00
moodler 367dfbd905 Updating for 1.7.2 release 2007-03-30 08:40:02 +00:00
toyomoyo b17e52001c fix for MDL-9021, missing add_to_log() call 2007-03-30 08:04:07 +00:00
gbateson 153fd875b5 fix the display of the special chars keypad (in JCloze and JQuiz) 2007-03-30 03:41:04 +00:00
moodler a43dc9df02 Automatic installer.php lang files by installer_builder (20070330) 2007-03-30 03:35:59 +00:00
toyomoyo f9f150290f adding a missing string 2007-03-30 02:27:27 +00:00
toyomoyo 8779cb8b46 changing help file as helen suggested 2007-03-30 02:23:19 +00:00
tjhunt d7378d19ec MDL-9094 - Penalty factor is meaningless for Essay questions, so remove it from the editing form. 2007-03-29 22:59:09 +00:00
skodak 6219022575 MDL-4313 LDAP doesn't properly escape extra quotes in course details; backported from MOODLE_18_STABLE 2007-03-29 21:57:11 +00:00
andreabix d9ec40f57f Fixed "Call to undefined function print_box()" 2007-03-29 18:42:20 +00:00
tjhunt ea790c7db1 MDL-6269, MDL-8958, MDL-8990 - Major fix to do with each attempt builds on last:
It used not to work with random questions, and there were problems with the computation of the grade, and regrading. Fix thanks to Paulo Matos, who not only fixed the bug and tested it, but was also incredibly patient waiting for me to have time to commit the changes to CVS.

This commit also includes a backport of a small state logic changes to the 1.7 stable branch.
2007-03-29 16:35:14 +00:00
csantossaenz f0403cbba2 Fixed problem with the popup window options. Now, they are saved when you update an SCORM activity and you change those options. 2007-03-29 08:18:35 +00:00
toyomoyo 88b5f9b726 fix for MDL-8983. hidden assignment requires a help file 2007-03-29 06:39:11 +00:00
toyomoyo 4d0ec2a375 file hiddenassign.html was added on branch MOODLE_17_STABLE on 2007-03-29 06:39:11 +0000 2007-03-29 06:38:35 +00:00
tjhunt 7cb4fb6a88 MDL-9061 - Only show global assign roles warning if you are assigning roles in the global context! Also, change name of admin menu entry to reduce confusion. Backported from MOODLE_18_STABLE. 2007-03-28 16:57:45 +00:00
csantossaenz 504317a519 Fixed backup problem for scorm module. Now, it includes needed files in moddata/scorm. even though the backup is done without user data and files 2007-03-28 15:04:57 +00:00
toyomoyo 110351a2a6 fix for MDL-7764, site role definitions not passed down 2007-03-28 07:50:35 +00:00
moodler 9599ee24b9 dos2unix and removed some XHTML brokenness 2007-03-28 02:47:12 +00:00
moodler 78baa1aaad Latest cornflower from Jeff for MDL-9009 2007-03-28 02:40:28 +00:00
moodler 1f4025a70e file hdbgend.jpg was added on branch MOODLE_17_STABLE on 2007-03-28 02:40:30 +0000 2007-03-28 02:24:36 +00:00
moodler 7e147392e1 file hdbg.jpg was added on branch MOODLE_17_STABLE on 2007-03-28 02:40:30 +0000 2007-03-28 02:24:35 +00:00
moodler b7f0d27621 file cornflower.css was added on branch MOODLE_17_STABLE on 2007-03-28 02:40:28 +0000 2007-03-28 02:24:34 +00:00
nicolasconnault 0428d11d76 MDL-9061 2007-03-27 07:28:20 +00:00
nicolasconnault b5a5a482bd MDL-9034: Brought lang file up to sync. The field_mapping string doesn't exist anywhere, it was a typo in enrol/database/config.html, and should have been remote_fields_mapping. 2007-03-27 05:46:11 +00:00
moodler 699768ebbc Merged fix for MDL-9052 from 1.8 2007-03-27 05:14:18 +00:00
moodler 6bd9066b7f Automatic installer.php lang files by installer_builder (20070327) 2007-03-27 03:52:08 +00:00
toyomoyo 6af4e1c8c4 applying inaki's patch for MDL-9012, course autocreation doesn't work in enrol/database 2007-03-26 06:50:56 +00:00
toyomoyo a5c41b6a5a fix for MDL-9010, course request button should not appear if it's disabled 2007-03-26 05:51:28 +00:00
toyomoyo 0bffc5576e fix for MDL-8336, lacking of viewuseractivitiesreport 2007-03-26 04:11:48 +00:00
toyomoyo 21982b71a6 fix for MDL-9035, backporting get_role_users() with hidden param 2007-03-26 02:11:45 +00:00
stronk7 41a5c34f91 Fix a problem with glossary not being able to sort by firstname.
Backported from MOODLE_18_STABLE
2007-03-24 01:00:29 +00:00
stronk7 d08b6757e6 One default was causing author view not being able to sortby firstname or lastname.
Backported from MOODLE_18_STABLE
2007-03-24 00:39:30 +00:00
skodak dfeb385672 MDL-9017 add mime type for ico files; backported from MOODLE_18_STABLE 2007-03-23 13:07:50 +00:00
toyomoyo b36064f742 fix for MDL-9016, clearing context cache after remove_course_content() 2007-03-23 07:20:16 +00:00
moodler 3dfb5e4379 Automatic installer.php lang files by installer_builder (20070323) 2007-03-23 03:42:39 +00:00
toyomoyo 7f9f7ec944 fix for MDL-8987, guests should not be allowed to view blogs flagged as site blogs 2007-03-23 01:42:19 +00:00
skodak 1828849b1e MDL-8347 Cannot create new glossary category if category with same name exists in another course on site; patch by Ray Lawrence; backported from MOODLE_18_STABLE 2007-03-22 22:45:51 +00:00
tjhunt ff7253c2c1 MDL-7241 - Manual grading report, sort by completed time didn't. Merged from MOODLE_16_STABLE. 2007-03-22 21:31:27 +00:00
moodler 52257f15d7 Automatic installer.php lang files by installer_builder (20070322) 2007-03-22 03:56:14 +00:00
toyomoyo 4c1af19cf6 MDL-7164, Mark Nielson's patch for remove_course_content not calling instance_destroy() 2007-03-22 02:09:54 +00:00
tjhunt 48a2b5ad42 MDL-7259 - Item analysis report does not use the right format_text settings. Merged from MOODLE_16_STABLE. 2007-03-21 23:25:23 +00:00
tjhunt 9e8cabd7eb Fix whitespace problems and Eclipse warnings in Item Analysis quiz report. 2007-03-21 23:04:27 +00:00
skodak e28cc09b24 MDL-7647 Broken links on confirmation email (or others) - patch by Paulo Matos 2007-03-21 21:57:00 +00:00
thepurpleblob 6282be2fd9 Check for empty text strings. Thanks to Quedoc. 2007-03-21 11:13:48 +00:00
toyomoyo e6b8565063 adding a string 2007-03-21 06:19:08 +00:00
toyomoyo bce83e8c76 backporting changes for MDL-8981, roles assigned at site level may result in a lot of default subscriptions 2007-03-21 06:05:13 +00:00
moodler e2bf5eec99 Automatic installer.php lang files by installer_builder (20070321) 2007-03-21 03:51:04 +00:00
toyomoyo 87ab475575 fix for MDL-7552, hidden assignments for 1.7 2007-03-21 00:48:41 +00:00
tjhunt 9022696d6d MDL-8978 - Regression from MDL-6386. Merged from MOODLE_16_STABLE. 2007-03-21 00:13:33 +00:00
tjhunt 418cc2032b MDL-8299 - Wrong capability on review.php. 2007-03-20 22:44:32 +00:00
tjhunt 25769ccd61 MDL-8140 Other units disappear from the editing form when there is no unit with multiplier 1. 2007-03-20 22:22:00 +00:00
skodak d0e6183436 MDL-8975 fix parameter handling in repository plugin; backported from MOODLE_18_STABLE 2007-03-20 19:47:58 +00:00
skodak ca3c1ddf40 SC#374 removing obsoleted utf8migration code 2007-03-20 16:24:11 +00:00
tjhunt ec9f7c117e MDL-6386/MDL-6462 - yet more special character issues with multianswer. I think I have got them all this time. Backported from HEAD. 2007-03-20 14:31:26 +00:00
moodler 7f0984c1f3 Automatic installer.php lang files by installer_builder (20070320) 2007-03-20 03:36:20 +00:00
stronk7 dc8207c52a small typo in var name
Merged from MOODLE_16_STABLE
2007-03-19 16:11:01 +00:00
skodak 4419fe33a5 MDL-8759 reverted + backported fix for cron logs 2007-03-19 10:11:27 +00:00
toyomoyo ba0dabcc31 backporting coursemanagers to 1.7 2007-03-19 06:40:59 +00:00
martinlanghoff 3810ca294d Auto-linking filters: fix serious caching bug in forum mailouts
Autolinking of glossaries, activity, resources and wiki names were using a
trivial single-entry cache implemented with static vars. The cache was _not_
keyed on course.

This bug was visible during forum_cron() which walks many courses. The cache
would get "stuck" on the first course that had something to put in the cache.
All mailouts from there onwards would autolink to stuff in the wrong course.
2007-03-19 06:13:13 +00:00
toyomoyo f493763e04 backporting MDL-8578, students can post and reply in news forum 2007-03-19 02:47:30 +00:00
toyomoyo 3140dc600d backporting MDL-8578 students can post and reply in news forums 2007-03-19 02:46:33 +00:00
moodler 30739f6651 Automatic installer.php lang files by installer_builder (20070318) 2007-03-18 03:29:57 +00:00
poltawski 071d36c917 MDL-6386 - Regression from MDL-6462, lost stripslashes in CLOZE question,
thanks to Joseph Joseph Rézeau  for his attention to this issue
Backported from MOODLE_18_STABLE
2007-03-17 22:57:06 +00:00
pichetp 0540d3479c adding </p> lines 110,112 2007-03-16 22:34:06 +00:00
skodak 721a2de984 MDL-8883 fixed double backslashes problem in filter settings; backported from MOODLE_18_STABLE 2007-03-16 22:19:07 +00:00
mark-nielsen 78d68eb5b2 Was missing context in has_capability() call. This was found in MDL-8196 2007-03-16 03:44:04 +00:00
toyomoyo 5c5cb3ec7e back porting changes for MDL-8820, users with moodle/user:editprofile assigned at user context should be able to edit them 2007-03-16 01:35:34 +00:00
bobopinna b06855297c Changed coursepacket string with package 2007-03-15 20:42:41 +00:00
stronk7 dbd0f586a2 Fix small bug only reproduced in tests about changing field names and
amldb_field object becoming modified. Novice OOP bug :-(
2007-03-15 19:58:47 +00:00
bobopinna eb2a36fb55 Fixed the problem with asset and review mode checkbox in view.php 2007-03-15 19:35:25 +00:00
stronk7 a45296043e Testing comments and default clauses containing chars to be escaped. 2007-03-15 19:13:17 +00:00
stronk7 4bf57cbfa6 DB escaping comments. MDL-8918 2007-03-15 18:59:02 +00:00
bobopinna 43d78a231d Removed the last word course in scorm module 2007-03-15 17:40:45 +00:00
bobopinna 45d44e7e80 Fixed a problem with external packages 2007-03-15 15:54:36 +00:00
bobopinna ff6bc9fbc2 Fixed bug MDL-8161 also here 2007-03-15 15:49:33 +00:00
bobopinna 4bdf76ae71 removed a couple of debugging print 2007-03-15 15:25:51 +00:00
tjhunt 97feab527e MDL-6462 - Cloze (multianswer) question special character issues. Merged from MOODLE_16_STABLE. 2007-03-15 12:59:20 +00:00
tjhunt 903f3f54ed Fix notice. 2007-03-15 12:53:07 +00:00
bobopinna a1fec0e3ce fixed a typo (ThaNck Andrea) 2007-03-15 10:49:39 +00:00
toyomoyo e07f4ac436 fix for MDL-8908, draft blogs should not be visible 2007-03-15 06:14:08 +00:00
toyomoyo 25a37d70ff fix for MDL-7939, teachers, non-editting teachers and course creators should see hidden courses 2007-03-15 04:24:28 +00:00
moodler 5446beaa73 Automatic installer.php lang files by installer_builder (20070315) 2007-03-15 03:32:10 +00:00
tjhunt cb6281b339 MDL-8127 - bad use of DESCRIPTION constant in quiz module causes upgrade to fail. Thanks to Pavel Krejci for the fix. Merged from MOODLE_17_STABLE. 2007-03-14 21:24:54 +00:00
tjhunt 3696a3723e Oops, reverting. Eloy had already fixed it. 2007-03-14 21:10:59 +00:00
tjhunt 8fa821d514 MDL-8232 - can't use = on TEXT colums with MSSQL - was breaking numerical question type upgrade. 2007-03-14 21:08:23 +00:00
poltawski 9bb4b97e3d Fixed check for section for MDL-8360, merged from MOODLE_18_STABLE 2007-03-14 16:35:10 +00:00
thepurpleblob 87c39bf549 Fixed true/false bug due to new 'correctanswer' field. 2007-03-14 15:15:27 +00:00
ethem 91f54796bd Code cleanup 2007-03-14 13:43:19 +00:00
poltawski fd52f257ff MDL-8360 - Currently can't bookmark admin searches, so disable the ability to bookmark
the search page
2007-03-14 11:50:53 +00:00
skodak 94c9630d78 MDL-8897 fixed shell commands in tex and algebra filters 2007-03-14 11:10:22 +00:00
toyomoyo 84718c0056 fix for MDL-8885, teachers should not be able to hide courses if they can not view hidden courses 2007-03-14 04:34:54 +00:00
moodler 0a16d1722a Automatic installer.php lang files by installer_builder (20070314) 2007-03-14 03:50:40 +00:00
toyomoyo abb8f34ecf MDL-8885, do not show bulk messaging option if user has no capability 2007-03-14 01:52:36 +00:00
toyomoyo 8af16cbfdb MDL-8885 editting teachers should be able to see all messages in a course 2007-03-14 01:39:43 +00:00
bobopinna 54c5ce36db Fixed bug MDL-8725
Just a typo in regular expression
2007-03-13 21:04:44 +00:00
tjhunt 0b17d072cf Eliminate bizarre use of function_exists. 2007-03-13 17:42:51 +00:00
tjhunt cd4469af52 Entity decoding only done the right number of times on import, not once too often.
Also, fix a notice and and Eclipse warning.
Backported from HEAD.
2007-03-13 16:27:52 +00:00
tjhunt 01d0a4f289 Use the right string processing when outputting question text on import/export. Backported from HEAD 2007-03-13 16:24:36 +00:00
tjhunt 8f8f6e7c92 Use the right string processing functions when outputting question names. Backported from HEAD 2007-03-13 16:21:07 +00:00
poltawski 90fe299739 Regression using the wrong config variables, see MDL-8257 2007-03-13 14:31:56 +00:00
moodler bceb6eb9d8 MERGED MDL-8872 from 1.8 removed "course" mentions from scorm interface 2007-03-13 08:47:52 +00:00
toyomoyo 7989f2ee28 allow guests to see the reply link 2007-03-13 04:46:55 +00:00
toyomoyo 78a0f36730 fixing a warning 2007-03-13 04:33:54 +00:00
toyomoyo b2a48214f8 fix for MDL-8864, reply link bug for users with replypost set to prevent 2007-03-13 04:28:39 +00:00
toyomoyo 76d9513015 fix for MDL-8767, when doing forum_cron, loop by user instead of post, backporting to 1.7 2007-03-13 03:38:06 +00:00
moodler 4d89cba698 Automatic installer.php lang files by installer_builder (20070313) 2007-03-13 03:33:55 +00:00
moodler e8189c3074 fixing a broken has_capability call 2007-03-13 00:54:25 +00:00
thepurpleblob af17ae8a1b MDL-8857
Make numerical and essay question formats more consistent.
2007-03-12 16:29:45 +00:00
skodak 8626d4bc24 MDL-5229 and MDL-6196 adding gb18030 mime header encoding; partial backport from MOODLE_18_STABLE 2007-03-12 08:45:02 +00:00
moodler f0b99a9fec fix for forceloginforprofile for parents 2007-03-12 01:20:32 +00:00
skodak fcb9e23701 MDL-8849 use proper value quoting; backported from MOODLE_18_STABLE 2007-03-11 20:01:15 +00:00
moodler ab496d313c Merged from head MDL-8842 2007-03-10 14:51:51 +00:00
moodler 0e53408ad7 Automatic installer.php lang files by installer_builder (20070310) 2007-03-10 03:29:07 +00:00
tjhunt 4b1f48e2ae MDL-8177 - Random questions selected deleted questions. Backported from MOODLE_18_STABLE. 2007-03-10 00:34:35 +00:00
pichetp 5530732c16 merge from 18 merged 2007-03-09 06:02:16 +00:00
moodler 5b4e26864a Automatic installer.php lang files by installer_builder (20070309) 2007-03-09 03:46:00 +00:00
moodler 1081ccc99b back porting MDL-8681 course import creates duplicate role into 1.7 2007-03-09 02:41:48 +00:00
skodak c0ad0e5a98 MDL-8814 fixed typo; backported from MOODLE_18_STABLE 2007-03-08 15:24:44 +00:00
moodler b6db8ab49d fix for MDL-7552, backporting hidden assignments (teacher) for 1.7 2007-03-08 05:25:42 +00:00
moodler ce455a9a79 merged do not force parents to log in 2007-03-07 06:25:36 +00:00
moodler b6d3fccd59 Merged fixes for MDL-8785 from 1.8
BIG SPEED INCREASE!!!!!!
2007-03-07 05:00:05 +00:00
moodler 78be3cdb8b backporting code to fix hidden teacher upgrade 2007-03-07 01:38:41 +00:00
tjhunt 837588a772 MDL-8349 - responses not being filtered in history display. Backported from MOODLE_18_STABLE. 2007-03-06 18:00:39 +00:00
nicolasconnault f398c77963 MDL-8759 - Unset $USER 2007-03-06 06:09:44 +00:00
nicolasconnault 2fd2fdbdb9 MDL-8771 - Restricted has_capability() sanity checks to DEVELOPER debug mode 2007-03-06 05:29:00 +00:00
moodler 92d3d576fb fix for MDL-8589, found more than one record in get_record_sql 2007-03-06 01:37:54 +00:00
moodler ef06f7f85b Added new string locations to 1.7 2007-03-05 12:28:58 +00:00
moodler e7a5ad8da9 Fix for MDL-8318, show cost info on info page 2007-03-05 05:41:21 +00:00
moodler d8882ec822 Automatic installer.php lang files by installer_builder (20070304) 2007-03-04 03:41:18 +00:00
gbateson e21f0b1042 set JQuiz[7]=false, to fix checking answers for JQuiz Hybrid questions when in ShortAnswer mode 2007-03-04 01:19:42 +00:00
skodak b6057d4afa MDL-8733 fixed approving logic when editing; merged from MOODLE_16_STABLE 2007-03-03 12:25:40 +00:00
pichetp bf18b2aa09 ggrading small numbers MDL-8478 merge from 18_STABLE 2007-03-02 21:14:48 +00:00
skodak db365a121d sesskey added to logout.php MDL-8727 ; backported from HEAD 2007-03-02 17:05:25 +00:00
moodler d243cd17c5 Commenting this out for now for performance reasons, should be fixed soon!
See MDL-8385
2007-03-02 10:10:52 +00:00
stronk7 01be5c29cc Skipping thousands of require_once() calls because PHP5
is really slow (and heavy) with them. MDL-8700
2007-03-02 09:39:50 +00:00
moodler 1ac2df9163 adding backward compatibility for question restore 2007-03-02 08:01:47 +00:00
nicolasconnault 800fa68224 MDL-8633 - Initialised $output at head of function. 2007-03-02 05:48:03 +00:00
moodler 4876f94726 should be manualcomment 2007-03-02 05:20:39 +00:00
moodler c5c47d0c43 fix for MDL-8491, feed back for essay questions not backed up 2007-03-02 04:51:31 +00:00
mjollnir_ 731f877fdb Merged from MOODLE_16_STABLE: fixing bug MDL-8651: import course data should clean up after itself 2007-03-02 01:43:15 +00:00
moodler acb417721d Fixed unenrol_student MDL-8591 2007-03-01 08:04:03 +00:00
moodler 60f8f5bf42 Don't redirect guests to mymoodle page! MDL-8594 2007-03-01 07:56:24 +00:00
nicolasconnault df18c3141e MDL-8693 Fixed the double-equal typos (2) 2007-03-01 07:28:20 +00:00
defacer 4edc434002 Merging from MOODLE_16_STABLE:
Fix for MDL-8515: Prefixing chat messages with a slash should not hide the
user's name unless it's a special command we handle.

I completely removed the emoticon handling case, but it seems like it was
not needed for a long time now? Emoticons work just fine without it.
2007-03-01 07:03:29 +00:00
martinlanghoff 3ce66e9f7b MDL-7385 - stats_cron_daily() - If a module is missing, continue processing 2007-02-28 03:04:05 +00:00
martinlanghoff fb3501f935 Fixing MDL-6795 - Stats never runs. stats_monthly table gets very full - avoid double tz calculations in stats_getmidnight() 2007-02-28 02:51:11 +00:00
martinlanghoff 757d66b504 Stopping warning and possible errors in graphlib.php caused by bugs in statsgraph.php
Ported from LDC (1.5) branch


Author: Andrew Walbran <andrew.walbran@catalyst.net.nz>
2007-02-28 00:32:16 +00:00
martinlanghoff 9861a3997a hotpot: Fixing db upgrade script
Note MySQL upgrade (earlier on by version)


Author: Andrew Walbran <andrew.walbran@catalyst.net.nz>
2007-02-28 00:28:39 +00:00
martinlanghoff e05e5d132e (Fixing upgrade script) Only try to disable lams if it is installed
Author: Andrew Walbran <andrew.walbran@catalyst.net.nz>
2007-02-28 00:25:46 +00:00
martinlanghoff 6488b3be2e blocks: Making UTF8 migration script work with blocks not on course page, etc.
Author: Andrew Walbran <andrew.walbran@catalyst.net.nz>
2007-02-28 00:10:12 +00:00
martinlanghoff 748e20f006 Fixing 1.5->1.7 upgrade bug (get_courses was used unnecessarily in upgrade process, and relies on roles)
Author: Andrew Walbran <andrew.walbran@catalyst.net.nz>
2007-02-28 00:07:22 +00:00
stronk7 da0dcaef1b Fixing RSS link to source. http://moodle.org/mod/forum/discuss.php?d=65762 2007-02-27 18:19:47 +00:00
stronk7 9babd808f8 Fix some warnings generated after enrol because of the LAMS module. MDL-8078 2007-02-27 17:39:48 +00:00
defacer 57c07037a7 Not needing this anymore, we now have Moodle Docs. 2007-02-27 14:40:55 +00:00
defacer 2eb862ba18 Merging from MOODLE_16_STABLE:
Fix for MDL-4701: Event URLs now include anchor so that the event is immediately visible.
2007-02-27 14:30:33 +00:00
defacer e5c482b517 Merging from MOODLE_16_STABLE:
Bugfix: skodak's fix for MDL-5991 is needed here as well.
2007-02-27 13:58:56 +00:00
defacer 61c7621b80 Changing email addresses that caught my eye in the comments. 2007-02-27 13:48:49 +00:00
defacer 595687a2f1 Fix for MDL-8402:
$CFG->calendar_weekdays wasn't saved correctly and misbehaved.

I took the opportunity to rewrite a little HTML too.
2007-02-27 12:17:58 +00:00
moodler 6e2e65e499 fixing wrong capability check 2007-02-27 05:48:15 +00:00
moodler 997a36bb09 fix for MDL-8666, groups import broken 2007-02-27 05:42:01 +00:00
moodler 8b03cdac79 fixing typos 2007-02-27 04:38:05 +00:00
defacer 6b0bfc914c Bugfix: $CFG->calendar_adminseesall was not working at all, Moodle behaved
as if it were always on. Reported at http://moodle.org/mod/forum/discuss.php?d=65500.
2007-02-27 00:33:18 +00:00
moodler 9f5ceda372 Automatic installer.php lang files by installer_builder (20070226) 2007-02-26 03:39:18 +00:00
mjollnir_ d550a1409b fixing MDL-8662 2007-02-26 00:18:02 +00:00
defacer e56a129d56 Merged from MOODLE_16_STABLE:
Fix for MDL-4940: Social Activities block disappears when editing course settings.
2007-02-24 23:24:43 +00:00
moodler 9a8d870765 Automatic installer.php lang files by installer_builder (20070224) 2007-02-24 03:37:11 +00:00
mark-nielsen be724f381e [Fixed] MDL-8637: lesson_answers answer field can be null 2007-02-23 17:27:13 +00:00
thepurpleblob c6a0fc48df MDL-8602
Don't count modules where course=0 (ie, they must exist in real courses)
2007-02-21 14:57:18 +00:00
tjhunt 61e6471fce Another wretched adslashes problem. Roll on placeholder. Thanks to Howard Miller. 2007-02-20 15:17:45 +00:00
moodler 3ad11e88b2 fix for MDL-8568, users in modules with sepearate groups can not revert to all participants mode 2007-02-20 03:13:37 +00:00
moodler 156f63c804 applying nick's patch to MDL-8534, typo in restorelib.php 2007-02-20 01:02:32 +00:00
lamsdev ca9de648a8 Changed from using lib/soap/nusoap.lib library directly to using lib/soaplib.php.
Fix for MDL-6224
2007-02-20 00:34:57 +00:00
stronk7 66d6716a02 Changing iso-8859-1 encoding of excel files to windows-1252. It adds support for
some more (a few) characters. MDL-7993

Merged from MOODLE_16_STABLE
2007-02-19 23:21:33 +00:00
stronk7 19906f7074 Backporting excellib with support to $CFG->excelisofiles to 17_STABLE.
MDL-7993. http://moodle.org/mod/forum/discuss.php?d=53302
2007-02-19 22:26:54 +00:00
skodak b8dececceb MDL-8570 outdate flv player; backported from HEAD 2007-02-19 13:59:12 +00:00
ethem 068be51fa0 Removed unnecesary code. 2007-02-19 12:01:54 +00:00
tjhunt 85a430d5be MDL-8145 - Add more options to the add random questions dropdown. 2007-02-19 04:24:09 +00:00
moodler 3b00cdbff0 Automatic installer.php lang files by installer_builder (20070219) 2007-02-19 03:33:45 +00:00
koenr 9e0bad4909 MDL-8400 Changed currency of peru to Nuevo Sol 2007-02-17 23:37:03 +00:00
tjhunt b430f84c4c MDL-8154 - Typo in course search code. Fix thanks to Anthony Borrow. 2007-02-17 17:16:41 +00:00
vyshane 014161956c Fix for MDL-7796 "Default permissions for Course Creators are too permissive". Changed some permissions from allow to inherit. Changed course deletion checks to allow course creators to delete courses. 2007-02-16 08:15:02 +00:00
moodler 5f842b21bd Automatic installer.php lang files by installer_builder (20070216) 2007-02-16 03:38:46 +00:00
moodler ca3a97b8c1 adding missing capability check for manage roles page 2007-02-16 02:39:28 +00:00
moodler 5b6af116c1 fixed wrong context, it should be possible to manage a single block 2007-02-16 01:24:30 +00:00
skodak a9fd5db642 MDL-7722 fixed wrong cleaning in backup paths; backported from HEAD 2007-02-15 10:06:10 +00:00
moodler 2f26b36af3 Merged environment checks during upgrade from 1.8 and 1.9 2007-02-15 06:59:32 +00:00
moodler c2fe49c5e7 Added new strings for upgrade environment checks. MDL-8527 2007-02-15 06:52:34 +00:00
vyshane 7df5ccc871 Fix for MDL-8072 - 'In the "Quiz" activity with the "Adaptive Mode" on, the "Multiple Choice" a message informing the student was penalized with the Penalty Factor is displayed when the answer given by the student is correct.' 2007-02-15 06:05:01 +00:00
stronk7 cf507be4c0 PHP 4 assignment is by value so course_header (containing edited names)
wasn't being modified. MDL-8298
2007-02-14 23:50:04 +00:00
skodak 9e8bc0e590 MDL-8268 fixed block get_string, patch by Mark Nielsen; backported from HEAD 2007-02-14 23:02:15 +00:00
skodak b50965414e MDL-8268 fixed get_user_capability_course(), patch by Mark Nielsen; backported from HEAD 2007-02-14 22:51:17 +00:00
skodak f2592eb65e MDL-8469 increase memory limit in cron due to changed calculation of used memory in PHP 5.2.x - the real memory useage is the same, but the reported size of used memory is now more accurate; backported from HEAD 2007-02-14 21:00:58 +00:00
vyshane e9d837a1a2 Fix for MDL-3681 "Duplicate Message-IDs in Forum mail". 2007-02-14 07:20:18 +00:00
moodler a650e7bb3a Automatic installer.php lang files by installer_builder (20070214) 2007-02-14 03:49:50 +00:00
vyshane 974dde3777 Simple fix for MDL-3583 "tabs text confusing". 2007-02-14 02:54:48 +00:00
vyshane 0ba544e97d Fix for MDL-3370. Forum: Unread messages shouldn't link to read. 2007-02-14 01:57:34 +00:00
stronk7 72395f4d2a Some minor js problems. MDL-7811 and MDL-6481
Merged from MOODLE_16_STABLE
2007-02-13 23:39:21 +00:00
watcanz 74780decb8 Corrected for 1.6.4 2007-02-13 21:05:41 +00:00
skodak f167056a18 MDL-8490 Glossary student not being able to edit entries; backported from HEAD 2007-02-13 19:29:51 +00:00
nfreear 375016e822 Fix for MDL-8507 "Local language pack-name can appear in language code" (merge from HEAD.) 2007-02-13 13:40:58 +00:00
nfreear ec6c6dae3f Fixes bug MDL-7257, "stylesheet bug: text color undefined" (merged from HEAD). 2007-02-13 12:12:36 +00:00
skodak 463b6cbe64 MDL-8498 Assignment - Notification of feedback e-mails to students not being sent 2007-02-13 08:41:26 +00:00
moodler 08f4e03f53 FIxes so that no-one can "login as" users who have "doanything". MDL-8411 2007-02-13 08:30:25 +00:00
vyshane 593d5992c0 Fix for MDL-8431 "In qanda forum: Undefined property: object::$id" 2007-02-13 05:24:32 +00:00
moodler 671a35735b Automatic installer.php lang files by installer_builder (20070213) 2007-02-13 03:51:43 +00:00
toyomoyo c7bbf43c12 fix for MDL-8480, external db user lang sync problem 2007-02-13 03:09:01 +00:00
vyshane 8dd4116941 Added get_my_courses() to forum_get_readable_forums(). Thanks Eloy for patch :-) This is related to MDL-8385. See tracker for discussion. 2007-02-13 02:22:05 +00:00
toyomoyo 821a2a750b fix for MDL-8358, wrong count for not graded assignments 2007-02-12 06:49:37 +00:00
moodler 4351ce8a6b Automatic installer.php lang files by installer_builder (20070212) 2007-02-12 03:51:39 +00:00
vyshane d97feb678a Fix for MDL-8459 (Indent left bug). 2007-02-09 05:15:52 +00:00
toyomoyo 1f49b80193 fix for MDL-8399, can not unassign admin at course level 2007-02-09 03:08:17 +00:00
vyshane 2edb2fbaf1 Fixes for MDL-8420 and MDL-8385. 2007-02-09 01:35:46 +00:00
vyshane 7aa8c1329f Small cleanup 2007-02-09 01:27:34 +00:00
stronk7 04f64ffbe0 Limit table comments to 60cc for MySQL. MDL-7765 2007-02-09 00:32:32 +00:00
stronk7 bdc1bb3358 Delete backup records on course delete. MDL-8314
Merged from MOODLE_16_STABLE
2007-02-09 00:11:45 +00:00
vyshane 8e42353e0e Added new function get_all_subcategories() 2007-02-08 08:04:35 +00:00
vyshane 1ab3830750 Removed IE-specific hack for resource deletion. 2007-02-08 05:34:44 +00:00
vyshane 45ce915b79 Updated YUI Library to 0.12.2. This seems to have fixed MDL-8287. 2007-02-08 05:30:18 +00:00
vyshane 2a28db59c3 file yahoo-dom-event.js was added on branch MOODLE_17_STABLE on 2007-02-08 05:30:57 +0000 2007-02-08 05:19:48 +00:00
vyshane f18d2309fb file utilities.js was added on branch MOODLE_17_STABLE on 2007-02-08 05:30:52 +0000 2007-02-08 05:19:48 +00:00
vyshane bc516d11c1 file README was added on branch MOODLE_17_STABLE on 2007-02-08 05:30:56 +0000 2007-02-08 05:19:48 +00:00
vyshane 75ee3dfa69 file README was added on branch MOODLE_17_STABLE on 2007-02-08 05:30:51 +0000 2007-02-08 05:19:48 +00:00
vyshane 7dac46e80c file tabview.js was added on branch MOODLE_17_STABLE on 2007-02-08 05:30:41 +0000 2007-02-08 05:19:47 +00:00
vyshane 23cbd7e82b file tabview-min.js was added on branch MOODLE_17_STABLE on 2007-02-08 05:30:40 +0000 2007-02-08 05:19:47 +00:00
vyshane e2612a5522 file tabview-debug.js was added on branch MOODLE_17_STABLE on 2007-02-08 05:30:40 +0000 2007-02-08 05:19:47 +00:00
vyshane 41fd2c3924 file reset-fonts-grids.css was added on branch MOODLE_17_STABLE on 2007-02-08 05:30:37 +0000 2007-02-08 05:19:47 +00:00
vyshane 7020a2ac33 file border_tabs.css was added on branch MOODLE_17_STABLE on 2007-02-08 05:30:42 +0000 2007-02-08 05:19:47 +00:00
vyshane cf3f87a641 file README was added on branch MOODLE_17_STABLE on 2007-02-08 05:30:39 +0000 2007-02-08 05:19:47 +00:00
vyshane 2500eb7ead file README was added on branch MOODLE_17_STABLE on 2007-02-08 05:30:37 +0000 2007-02-08 05:19:47 +00:00
thepurpleblob 0115262560 MDL-8349 Some of the overidden methods had got out of sync with parent class. 2007-02-07 11:34:53 +00:00
thepurpleblob 7c944b7cbe MDL-8450 Added support for including question categories in a quiz export. Also a bit of format tidy up and fix a misshandled sesskey. 2007-02-07 10:27:13 +00:00
thepurpleblob e264752381 MDL-8450 Added support for including question categories in a quiz export. 2007-02-07 10:12:36 +00:00
thepurpleblob 075f61025c MDL-8450 Added support for including question categories in a quiz export. 2007-02-07 09:56:57 +00:00
vyshane 085fecaf86 Changed require to require_once to fix function redeclaration error. 2007-02-07 07:08:02 +00:00
moodler 970d2432d7 Automatic installer.php lang files by installer_builder (20070207) 2007-02-07 03:34:57 +00:00
stronk7 0d8057b119 Fixed two schema-fk typos. MDL-8427 2007-02-06 15:50:03 +00:00
stronk7 2786c8fd73 Generators can use ddllib.php stuff (I missed this some days ago) 2007-02-05 17:01:37 +00:00
moodler e1555199db Merged site name apostrophe problem in MDL-8416 2007-02-05 06:53:22 +00:00
stronk7 6defede491 Fixing one little-little bug about user->ajax being nullable. MDL-8421 2007-02-04 20:05:09 +00:00
gbateson 47e1151f92 allow empty JQuiz questions (which have at least one answer) 2007-02-03 01:12:05 +00:00
gbateson e8dc4c6cb1 omit empty answers from JQuiz import 2007-02-03 00:35:54 +00:00
vyshane db8598ca48 Made default for forceloginforprofiles to be 1. Related to MDL-8385. 2007-02-02 08:13:07 +00:00
vyshane b0252a5c00 Fix for MDL-8385. 2007-02-02 07:55:30 +00:00
moodler 47cc07674c Added some help link text for Moodle 1.7 MDL-8378 2007-02-02 06:22:47 +00:00
moodler 29f26fd747 Added missing help file to MOodle 1.7 MDL-8378 2007-02-02 06:16:48 +00:00
moodler 9c336062b7 file switchrole.html was added on branch MOODLE_17_STABLE on 2007-02-02 06:16:48 +0000 2007-02-02 06:15:39 +00:00
mark-nielsen 594f4f574a The main layout table was left aligning in safari. Now matches that in action/continue.html 2007-02-02 03:57:13 +00:00
moodler 3802128b59 Automatic installer.php lang files by installer_builder (20070202) 2007-02-02 03:48:09 +00:00
mark-nielsen 657ed64b03 BugFix for MDL-8390: Changing nullability of field useranswer on table lesson_attempts to null. 2007-02-02 03:42:26 +00:00
mark-nielsen b39a349ec4 BugFix for MDL-8375:
* Student answer and teacher response are now cleaned using PARAM_RAW and are always passed through s() before printing
2007-02-02 02:16:59 +00:00
stronk7 8c30f7fc26 Delete some non cros-db boolean uses from queries, delegating them to PHP. MDL-8164 2007-02-01 23:53:47 +00:00
stronk7 81de99d733 Adding missing tags in code. Credit goes to Greg Lyon. MDL-8383. 2007-02-01 22:35:06 +00:00
moodler 7235680eed $switchroleactive is now passed recursively so switchroles actually works now :-/ 2007-02-01 08:11:32 +00:00
moodler ce5a0d7b65 Automatic installer.php lang files by installer_builder (20070201) 2007-02-01 03:31:34 +00:00
skodak 89719f7030 MDL-8366 not possible to use old en with iso-8859-1 encoding in 1.7 2007-01-31 23:17:51 +00:00
skodak 1d03d41680 MDL-8376 Course list option missing in frontpageloggedin when there are more than 200 courses; backported from HEAD 2007-01-31 22:38:45 +00:00
stronk7 de161d3c49 Restoring one deleted by error }. Grrr. 2007-01-31 18:44:57 +00:00
stronk7 509b0c983d Changing nullability of field response on table lesson_answers to null.
Versions in 17_STABLE are the same, so no problems. MDL-8351
2007-01-31 18:36:53 +00:00
thepurpleblob 877d109b01 MDL-8342 PHP5 migration thing causing string offset fatal error when data not present in XML file. Added some checks. 2007-01-30 15:12:49 +00:00
thepurpleblob dc5ea21614 Changed remark about additional formats to direct to Modules & Plugins database. 2007-01-30 14:03:33 +00:00
thepurpleblob 4a08d3bac9 Output was missing utf8 meta tag. 2007-01-30 13:54:43 +00:00
stronk7 f555bfac15 nothing interesting, just a comment. 2007-01-30 00:21:22 +00:00
stronk7 5fb8a656c1 Applying new rs_xxx() functions everywhere. MDL-8134 2007-01-29 23:55:42 +00:00
stronk7 bfc8a717df Applying new rs_xxx() functions everywhere. MDL-8134 2007-01-29 23:44:58 +00:00
stronk7 b65b99cab8 Applying new rs_xxx() functions everywhere. MDL-8134 2007-01-29 22:14:36 +00:00
koenr 296f9b6a82 typo MDL-8350 2007-01-29 20:41:08 +00:00
stronk7 7409a0e99a Applying new rs_xxx() functions everywhere. MDL-8134 2007-01-29 19:14:49 +00:00
tjhunt f08318d7fb Fix type on close tag. 2007-01-29 16:22:29 +00:00
stronk7 890cdce488 Applying new rs_xxx() functions everywhere. MDL-8134 2007-01-29 12:07:14 +00:00
stronk7 5a739340da Applying new rs_xxx() functions everywhere. MDL-8134 2007-01-29 11:20:44 +00:00
stronk7 751ad21e9c Applying new rs_xxx() functions everywhere. MDL-8134 2007-01-29 11:05:15 +00:00
stronk7 a9a72d76f9 Applying new rs_xxx() functions everywhere. MDL-8134 2007-01-29 10:53:14 +00:00
stronk7 31e0c05036 Applying new rs_xxx() functions everywhere. MDL-8134 2007-01-29 10:44:45 +00:00
vyshane 2a0d5695b3 Made non-AJAX deletion of resources only apply to IE browsers. 2007-01-29 07:54:48 +00:00
vyshane cf9281719f Fix for MDL-7847. 2007-01-29 07:36:07 +00:00
mark-nielsen 8cde300d8c Fix for MDL-8137: turned off autocomplete for all forms for which students enter data. 2007-01-29 06:32:17 +00:00
vyshane 50d1bd1c2a Fix for MDL-7415. 2007-01-29 06:00:23 +00:00
vyshane 58cac329b7 Temporarily disabling ajax for module/resource deletions. Related to MDL-8287. 2007-01-29 02:21:12 +00:00
stronk7 011dd960f4 This seems to be the damned line! db must be CFG 2007-01-29 01:11:43 +00:00
stronk7 0389288693 First real test of the new rs_fetchXXX() functions. Applying it
to get_my_courses(). MDL-8134
2007-01-29 00:15:14 +00:00
stronk7 e5b094bed6 Added Oracle DIRTY HACK to both rs_fetchXX functions.
Detecting of EOF in rs_fetch_record()
Big improvement of rs_fetch_next_record() by using FethRow()
with speeds near native fields[]. MDL-8134
2007-01-28 23:08:14 +00:00
skodak 4a0d23143a MDL-6128 special chars and messaging system; backported from HEAD 2007-01-28 21:46:14 +00:00
stronk7 bdd5bba791 Initial commit of the new rs_XXX() functions to fetch, advance and close
ADOdb recordsets in a standard way. Not finished yet but I need them in CVS.
MDL-8134
2007-01-28 20:10:33 +00:00
stronk7 1159927f08 Backported fix for annoying typo from HEAD. 2007-01-28 18:30:42 +00:00
gbateson b9a69f5b1f correct the display of the "Update this Hot Potatoes Quiz" button in Danish (da_utf8) and German (de_utf8) - see mdl-8322 2007-01-28 00:02:55 +00:00
moodler 947e63afb8 Automatic installer.php lang files by installer_builder (20070127) 2007-01-27 03:20:44 +00:00
skodak d221dc7482 MDL-8308 placement of load_all_capabilities() in login page; backported from HEAD 2007-01-26 21:15:25 +00:00
stronk7 14da408e08 Adding two helper functions and modify upgrade to
work properly under MSSQL and Oracle. MDL-8303
2007-01-26 20:44:57 +00:00
stronk7 4ca9e54f7f Oracle doesn't like ; at the end of execute_sql() 2007-01-26 19:25:53 +00:00
vyshane 154877b2ff Some small cleanups. 2007-01-25 04:28:07 +00:00
vyshane 303c064224 Commented out text node addition while moving resources. No idea why it was needed? This was adding extra vertical spaces and screwing up the display after a move in IE 7. 2007-01-24 05:58:14 +00:00
gbateson e521d0f799 added "print_standard_coursemodule_settings" (group and visible settings) to add/update HotPot page, "mod.html" 2007-01-24 02:52:14 +00:00
gbateson 4d4b237efb remove DB dependant code and references to NULL in field values mdl-8169 2007-01-24 02:44:23 +00:00
vyshane 727929f1fa Fixes for MDL-6966. 2007-01-23 06:10:48 +00:00
moodler 26e8b7a96e Fixed site identifier 2007-01-23 04:59:22 +00:00
moodler 4d59b9d9fa Automatic installer.php lang files by installer_builder (20070123) 2007-01-23 03:26:10 +00:00
stronk7 7c018f428c Changing some stripslashes() to stripslashes_safe() because it
was causing some real backslashes to be lost in some qtypes. MDL-8217
2007-01-22 23:13:47 +00:00
moodler 3c3ff8ace3 Automatic installer.php lang files by installer_builder (20070119) 2007-01-19 03:22:34 +00:00
bobopinna 70c6b92b97 Fixed an error in $score initialization 2007-01-18 20:33:02 +00:00
skodak b27229da41 do not send passowrd hashes to other sites SC#353; merged from MOODLE_16_STABLE 2007-01-17 20:10:25 +00:00
skodak 0801278026 force login in course calendar SC#349; backported from HEAD 2007-01-17 19:54:35 +00:00
moodler d9bda8a421 Bump to post 1.7.1 2007-01-17 04:31:01 +00:00
moodler 42f8e247d2 Bump to 1.7.1 2007-01-17 04:11:14 +00:00
moodler ed3ee5e357 Automatic installer.php lang files by installer_builder (20070117) 2007-01-17 03:21:07 +00:00
mchurch 8b4a8f616f Fixing bug where quizzes from 1.4 will lose their answers when upgraded to later versions.
Fixes MDL-8207.
2007-01-16 21:31:14 +00:00
tjhunt f470cf47b7 Fix multiple-choice multiple-answer grading code. 2007-01-16 17:50:18 +00:00
thepurpleblob e43202e7a3 MDL-8100, defaultgrade not imported. Question obect initialisation and value import wrong way round - whoops! 2007-01-16 12:10:40 +00:00
thepurpleblob e70d37080c MDL-8130 Number of improvements to check name length and improve HTML Entity handling. Thanks to Paul Ortman. 2007-01-16 11:19:49 +00:00
moodler 98d6d9288b Automatic installer.php lang files by installer_builder (20070116) 2007-01-16 03:18:51 +00:00
vyshane 1c2ecdd3dd Fix for MDL-8099. 2007-01-16 02:43:12 +00:00
martinlanghoff 1d94add47e enrol/database: fix fields not read from external database MDL-7712 2007-01-15 20:00:01 +00:00
martinlanghoff dd1ac4af5c auth/db: fix fields not read from external database MDL-7712 2007-01-15 19:58:58 +00:00
stronk7 9982cf19c9 Avoiding some itarations. MDL-7902. Thanks Samuli! 2007-01-14 12:10:37 +00:00
moodler 7d72568ba9 Automatic installer.php lang files by installer_builder (20070113) 2007-01-13 10:22:57 +00:00
moodler 2ad6c7b8fe Automatic installer.php lang files by installer_builder (20070113) 2007-01-12 17:49:16 +00:00
moodler c73628d1dc file installer.php was added on branch MOODLE_17_STABLE on 2007-01-12 17:49:16 +0000 2007-01-12 17:43:29 +00:00
vyshane d976a7d9dc Fix for MDL-8146. Clicking on "No" when asked to confirm deletion of a post will now always take the user back to that post in the relevant discussion. 2007-01-12 05:03:57 +00:00
moodler 2683c51739 Automatic installer.php lang files by installer_builder (20070112) 2007-01-12 03:18:54 +00:00
ethem 7262b0c5a9 MDL-7861 xhtml transient fixes for not closed input fields; Backported from HEAD 2007-01-11 10:13:14 +00:00
moodler 26be3a96c4 Very likely fix for MDL-8067 2007-01-09 04:58:46 +00:00
skodak 33ca51fbdf backported fixes for warnings when exporting logs in excel format 2007-01-08 22:24:16 +00:00
skodak 642a7105e5 fixed options array initialisation 2007-01-08 21:55:14 +00:00
skodak 4233e8b7b6 MDL-8115 fixed $$submission typo 2007-01-08 21:42:17 +00:00
stronk7 f7352c8340 Environment checks support mysqli. MDL-8113 2007-01-08 19:53:34 +00:00
stronk7 90b7248055 Minor change to be able to install 1.7 unicode under mysqli
(mysqli is going to be supported only by Moodle 1.8. This is
one exception to be able to have 1.7 working in dev environments)
2007-01-08 18:59:21 +00:00
moodler 3c13c14e59 Automatic installer.php lang files by installer_builder (20070108) 2007-01-08 03:22:26 +00:00
gbateson 0cf15fb3e6 prevent backslashes being inserted before #-sign in HTML entities by converting html-entities to UTF-8 when importing from Hot Potatoes quizzes into Moodle 's standard Quiz module 2007-01-07 12:37:37 +00:00
skodak c966aa2c71 revised adobe XSS protection SC#346 - backported from HEAD 2007-01-06 15:24:14 +00:00
thepurpleblob d367b64be3 MDL-6769 and http://moodle.org/mod/forum/discuss.php?d=60209 the default for shuffleanswers is now set to the configured value. 2007-01-05 11:55:01 +00:00
thepurpleblob 862dd9d01a MDL-7913 Improved category detection (again) to extract all characters. 2007-01-05 10:33:05 +00:00
thepurpleblob 675c2419d1 Added some cleaning to the category path for some safety. 2007-01-05 10:05:27 +00:00
moodler 3453faf411 Automatic installer.php lang files by installer_builder (20070105) 2007-01-05 03:31:39 +00:00
skodak 9fcb7001e6 Adobe Acrobat JavaScript Execution Bug SC#346 2007-01-04 00:05:07 +00:00
moodler 6a9c63b3c4 Strict DOCTYPE 2007-01-03 09:01:03 +00:00
moodler f248698fed Automatic installer.php lang files by installer_builder (20070103) 2007-01-03 03:23:27 +00:00
moodler 5510929c42 Automatic installer.php lang files by installer_builder (20070102) 2007-01-02 03:17:18 +00:00
moodler 8cbaea4f7a Automatic installer.php lang files by installer_builder (20061231) 2006-12-31 03:20:32 +00:00
skodak bb52c312de MDL-7829 zipping with binary zip broken under windows when moodledata on different disk; backported from HEAD 2006-12-29 22:53:35 +00:00
skodak 152fa94009 MDL-7828 Backup with error PCLZIP_ERR_MISSING_FILE (-4) under windows when moodledata on different disk - patch by Yves Roy; backported from HEAD 2006-12-29 22:36:38 +00:00
skodak a59462f1a4 MDL-7837 auth_ldap_bulk_insert() fails when user data contains single quotes - patch by Iñaki Arenaza; backported from HEAD 2006-12-29 21:18:37 +00:00
skodak 8f08bf55d9 MDL-8007 mimetype support for htc files, see http://support.microsoft.com/kb/306231; backported from HEAD 2006-12-29 20:59:36 +00:00
skodak 85c23c24f6 MDL-8021 resource "Link to a file or web site", when created, doesn't open in a new window - fixed recourse typo; backported from HEAD 2006-12-29 20:17:14 +00:00
moodler 174e5dfc05 Automatic installer.php lang files by installer_builder (20061229) 2006-12-29 03:12:45 +00:00
moodler 3ed3433efd Automatic installer.php lang files by installer_builder (20061228) 2006-12-28 03:14:53 +00:00
martinlanghoff 6cb344928f redirect(): fix protocol name in redirection header() 2006-12-27 01:48:22 +00:00
martinlanghoff 2c56bea007 raise_memory_limit() earlier -- resolves OOM on 64-bit platforms
On 64-bit platforms the in-memory footprint of our libraries is quite a bit
larger than usual, and we hit the 8MB default memory limit before we call
raise_memory_limit(). This patch moves raise_memory_limit() and
get_realsize() to setuplib so we can call them earlier, and moves the
call to _before_ we include the libraries.

On AMD64, for MOODLE_17_STABLE the footprint is about 9.5MB. Diet time? :-)
2006-12-26 22:47:36 +00:00
moodler 6ac70d87d4 Automatic installer.php lang files by installer_builder (20061226) 2006-12-26 03:17:04 +00:00
stronk7 e58d9e9f8e Add support for multilang titles in forum->posts 2006-12-20 16:40:12 +00:00
stronk7 80f91aad31 Added one missing format_string() to post->subject 2006-12-20 09:57:08 +00:00
vyshane fa1df4db7b Fixed some warnings with role mappings. 2006-12-19 04:59:42 +00:00
skodak ce499284a0 MDL-7903 Guests can not enter course that allows guests with key 2006-12-18 19:20:14 +00:00
skodak 5359b97581 MDL-7974 Weekend Days Settings Chooses Wrong Day after Saving; backported from HEAD 2006-12-18 18:08:53 +00:00
tjhunt f3f60456ff MDL-7975 - Make import and export of truefalse questions more reliable. Merged from MOODLE_16_STABLE. 2006-12-18 18:06:56 +00:00
tjhunt e0e1d29889 MDL-7972 - improve GIFT import export for truefalse questions.
Also clean up whitespace in question/format/gift/format.php - Merged from MOODLE_16_STABLE.

MDL-7928 - Numerical question type should use * for the match anything answer - GIFT format part.
2006-12-18 16:38:02 +00:00
vyshane 42ce3dfc9f Fix for cases where the resource being removed is the only DOM node in the section's div. 2006-12-18 06:24:53 +00:00
moodler 71338fc369 Automatic installer.php lang files by installer_builder (20061218) 2006-12-18 03:45:21 +00:00
moodler 7aae797ec1 And another bit of MDL-7961 2006-12-18 02:00:38 +00:00
moodler c5749e312f Fixed a backwards logic bug preventing format changes sometimes MDL-7961 2006-12-18 01:58:59 +00:00
skodak 17f32ca725 MDL-7941Installation on Windows makes reference to libgd.dll in php.ini; backported from HEAD 2006-12-17 22:26:36 +00:00
gbateson 7648eae997 Modified the README.TXT to reflect the fact that this version fo the HotPot module, v2.2.x, is only compatible with Moodle 1.7 2006-12-17 02:11:43 +00:00
tjhunt 62a29aa8e0 MDL-7928 - Numerical question type should use * for the match anything answer. 2006-12-15 18:30:14 +00:00
tjhunt 93727c9b8e MDL-7926 - set_field_select function 2006-12-15 18:23:15 +00:00
tjhunt b2681766d7 MDL-7925 - description question types were being created with defaultgrade = 1. It should be zero, so fix the bug, and reset any wrong ones in the database. 2006-12-15 15:41:32 +00:00
moodler afd38cb133 Automatic installer.php lang files by installer_builder (20061215) 2006-12-15 03:19:57 +00:00
mits d3fcae7237 Fixed a missing closing brace }. 2006-12-14 20:12:48 +00:00
tjhunt 6b66913982 Correct comment punctuation. 2006-12-14 11:45:28 +00:00
skodak 68875532e6 SC#341 fixed initilaization of navtail variable; backported from HEAD 2006-12-14 08:15:11 +00:00
vyshane 519c36a6fb Fixes for MDL-7674. 2006-12-14 08:09:29 +00:00
vyshane 93f30556b3 Fix for MDL-7753. Credits to Andrew Walker. 2006-12-14 07:45:44 +00:00
vyshane b3f180f91b Added missing / in link tag 2006-12-14 04:46:32 +00:00
vyshane ac76e8c5bf Fix for MDL-6980. 2006-12-14 03:03:21 +00:00
tjhunt 3c4e7ea962 MDL-7602 - Multianswer question type only works with invalid HTML. 2006-12-12 08:58:25 +00:00
tjhunt 3d83f4255a MDL-7896 - error from random question type in adaptive mode. Merged from MOODLE_16_STABLE. 2006-12-11 23:46:01 +00:00
mark-nielsen 21e5dd9414 Fix for MDL-7477 2006-12-11 18:42:10 +00:00
tjhunt 9b6b1f3afa MDL-7886 - typo in overview report javascript. 2006-12-11 14:03:09 +00:00
toyomoyo 148c0decf6 adding missing helpfile 2006-12-11 06:28:59 +00:00
toyomoyo 0df7a3d616 removed warning 2006-12-11 05:30:25 +00:00
toyomoyo 46385c64bd fix for MDL-7270, fixing warnings 2006-12-11 03:13:07 +00:00
skodak 91b890f705 MDL-7857 uninitialized context in mod/data/index.php; backported from HEAD 2006-12-10 20:21:58 +00:00
skodak 683b038d09 MDL-6668 Database mod search error on Postgres; patch by Lorenzo Nicora; backported from HEAD 2006-12-10 19:28:17 +00:00
skodak a04aa7c7df MDL-6613 Apostrophe in locked field prevents user updating profile - patch by Iñaki Arenaza; backported from HEAD 2006-12-10 17:41:12 +00:00
skodak 8e2958d1a1 MDL-7855 Sanitize field type when importing presents into data mod; backported from HEAD 2006-12-10 17:31:17 +00:00
gbateson 39d860b52d added details of the columns in the hotpot click report table 2006-12-10 05:28:38 +00:00
moodler 7c37e6755c Automatic installer.php lang files by installer_builder (20061210) 2006-12-10 03:06:58 +00:00
skodak d21dbfd55d MDL-7734 fixed warning when $course not defined when printing help button 2006-12-09 13:33:09 +00:00
moodler 723a084744 Automatic installer.php lang files by installer_builder (20061209) 2006-12-09 03:15:45 +00:00
skodak 1ace15420e MDL-6519 Dollar ($) signs in data module text fields not preserved; backported from HEAD 2006-12-08 22:36:42 +00:00
skodak 1df5e775ff MDL-7848 Database presets import breaks non-null restriction on description; backported from HEAD 2006-12-08 22:25:22 +00:00
mark-nielsen b547c1396f Added more information regarding supported file types. Related to MDL-7418 fix 2006-12-08 18:46:38 +00:00
mark-nielsen ffbbe44116 Added lang entry for MDL-7418 fix 2006-12-08 18:45:55 +00:00
mark-nielsen 7a7056e0bb Fixed MDL-7418: added support for images and added a default support which is that the file is available for download 2006-12-08 18:45:08 +00:00
toyomoyo ab505564c9 fix for MDL-7766 calenar not displaying course events 2006-12-08 07:54:27 +00:00
toyomoyo 527bd0664c fix for MDL-7819, admins still in participants list 2006-12-08 04:26:47 +00:00
gbateson 6285e5af65 abandoned attempts are now included in all reports 2006-12-08 04:18:17 +00:00
toyomoyo 792f362b93 fix for MDL-7794, inconsistent field length for city 2006-12-08 03:07:45 +00:00
moodler db69332665 Automatic installer.php lang files by installer_builder (20061208) 2006-12-08 03:06:22 +00:00
gbateson 94a7bfecb0 fix undefined property "cr_timefinish", when viewing click report 2006-12-08 02:42:51 +00:00
toyomoyo 8665733354 fix for MDL-7592, get_course_students() bug 2006-12-08 02:21:32 +00:00
skodak a6abb7fda7 MDL-7839 Fixed use of capabilities in database entry rating; backported from HEAD 2006-12-07 20:12:14 +00:00
toyomoyo 380199a948 implementing moodle/user:viewdetails 2006-12-07 06:08:02 +00:00
toyomoyo 2da1b09809 fix for MDL-7770, prevent users with no capability to view user profile 2006-12-07 05:05:18 +00:00
toyomoyo a75dde8a5c fix for MDL-7696, adding addslash for bulk messaging 2006-12-07 03:01:16 +00:00
toyomoyo 3c98b96d40 fix for MDL-7734, making help links respect course langs 2006-12-07 02:17:11 +00:00
skodak 3bd8388689 MDL-7821 wrong use of cm in data mod and added proper require_login(); backported from HEAD 2006-12-06 20:24:19 +00:00
skodak 5ceee287f3 MDL-7812 warning in sorting form in data module when no fields defined; backported from HEAD 2006-12-06 09:58:43 +00:00
skodak 319e0b4d9a MDL-7806 Login results in fatal PHP error on enrol/database connect failure (patch by Clinton Graham); backported from HEAD 2006-12-06 09:49:55 +00:00
toyomoyo 84bed3d71b avoid the use of deprecated functions 2006-12-06 06:24:20 +00:00
toyomoyo 381b712d96 fix for MDL-7784, reference to user_student tables 2006-12-06 06:07:19 +00:00
moodler 87c9582273 It's now impossible to access the home page if:
- mymoodleredirect is active, and
   - you are logged on, and
   - you don't have site config ability

MDL-7584   MDL-7583
2006-12-06 05:07:11 +00:00
toyomoyo ae9910b3aa multiple assignments should only be counted once 2006-12-06 04:26:50 +00:00
mark-nielsen 91607e97ed Media file link was being squished. Gave it 150px space 2006-12-06 02:25:09 +00:00
moodler 71c7eb7260 Non-editing teachers should NOT have course import rights by default 2006-12-06 02:23:37 +00:00
mark-nielsen 5b6037f3ac Fix for MDL-2006 2006-12-06 01:59:53 +00:00
tjhunt d2ae521e17 MDL-7804 - Essay questions do not backup properly. Merged from MOODLE_16_STABLE. 2006-12-05 18:47:12 +00:00
tjhunt 11f0eb9979 Add $level parameters to each backup method. Merged from MOODLE_16_STABLE. 2006-12-05 18:14:32 +00:00
skodak 4e1af8f1b3 require_login not working properly MDL-7800; backported from HEAD 2006-12-05 09:21:39 +00:00
vyshane a68c438d5c Removed extra ; 2006-12-05 08:14:42 +00:00
vyshane 9a7b7e38b9 Fixed bug: cannot edit post in each user forum type. 2006-12-05 08:12:27 +00:00
moodler 43e57712eb Clear the capability cache when adding roles to current user, just to be sure 2006-12-05 07:12:22 +00:00
moodler 55ebb7277b Fixed last access time for my moodle, MDL-7609. 2006-12-05 06:59:34 +00:00
moodler 0ca2898178 FIx for MDL-7605 where switchroles was not working properly
There were two issues:

1) When switch roles is active we don't want to progress up to parents of the
   course looking for capabilities


2) We need to clear the capability cache after switching roles because the
   cached values may not be accurate (because of the above difference)
2006-12-05 05:39:11 +00:00
moodler d1910944e2 Automatic installer.php lang files by installer_builder (20061205) 2006-12-05 03:22:50 +00:00
tjhunt 257343b354 MDL-7719 - Essay question feedback box too small. 2006-12-04 16:21:31 +00:00
tjhunt 7989c3edc6 Typo in help. Thanks to Ken Wilson. 2006-12-04 16:07:52 +00:00
tjhunt accaf2e9f6 Typo. 2006-12-04 11:54:35 +00:00
skodak 15f93e462f MDL-7767 Guests should not be able to hide course sections - section hiding is not stored in db for guests, only session is used now 2006-12-04 08:53:21 +00:00
vyshane d628dcedd2 Fix for MDL-7760 2006-12-04 08:02:57 +00:00
moodler 8b42d3bbb7 Added new DST timezone changes for Perth, Western Australia
(Yes, we have joined the rest of the world with DST ... :-(   )
2006-12-04 06:59:24 +00:00
moodler c92a464165 Automatic installer.php lang files by installer_builder (20061204) 2006-12-04 03:14:45 +00:00
toyomoyo 08410ed897 stop admins from showing up in participants list 2006-12-04 03:04:04 +00:00
toyomoyo aea1aa849b fixed a bug where admin can't unassign himself from non admin roles at site context 2006-12-04 01:53:43 +00:00
toyomoyo fe2f0270d3 fix for MDL-7773, restore_to options not set for creators 2006-12-04 01:13:35 +00:00
skodak bd6cea2f98 MDL-7783 Non-internal authentication change password URL doesn't work - patch by Iñaki Arenaza; backported from HEAD 2006-12-03 20:08:03 +00:00
skodak b13b2b54a6 MDL-7757 URL check is too restrictive, allow port; backported from HEAD 2006-12-03 10:24:59 +00:00
stronk7 5a16abc079 Dictionary name wasn't being saved, so aspell didn't worked under 1.7
if the setting had been edited. MDL-7762
2006-12-01 17:32:20 +00:00
thepurpleblob 0dd1864b73 Added/improved help re. switching categories in import files. 2006-12-01 16:18:02 +00:00
thepurpleblob c23b03b50c Improved regexp for category switch 2006-12-01 16:04:46 +00:00
skodak c5c150c146 MDL-7234 Smilies don't load in HTML editor for some languages; backported from HEAD 2006-12-01 09:50:44 +00:00
skodak a555df3d69 Forgotten password page does not check secret MDL-7755; backported from HEAD 2006-12-01 09:15:12 +00:00
vyshane 87b270ef6a Added check for guest user in forum_subscribed_users. Guest user should never be subsctibed to a forum. 2006-12-01 05:20:14 +00:00
vyshane 3f8f8601e2 We check for gecko build number when deciding whether ajax should be enabled or not. This is more reliable since the advent of Iceweasel etc. 2006-12-01 03:46:02 +00:00
vyshane ad0957be6d Fix for MDL-7732. Patch by Andrew Walker. 2006-12-01 02:39:15 +00:00
skodak 5bdb86e23b MDL-7749 fixed stripslashes when saving admin configuration values; backported from HEAD 2006-11-30 20:39:35 +00:00
urs_hunkler cb55f92d17 'added clear:left and a little top distance to the htmlarea in adminsettings. If this works in all places a more general rule for all quickforms should be entered' 2006-11-30 12:10:57 +00:00
ethem 9c3d643dad No urlencode 2006-11-30 09:14:15 +00:00
ethem af053ebd3e Brushed up a string. 2006-11-30 08:43:32 +00:00
ethem f241382c56 + More more more security.
* Don't show login name, password and transaction key at the configuration page.
* RC4Encrypt these fields and move to the config_plugins table from the config table.
* Config page is fully https.

Backported from HEAD.
2006-11-30 08:11:22 +00:00
skodak 055d04ad68 MDL-7741 missing ? in start php tag; backported from HEAD 2006-11-29 22:31:36 +00:00
thepurpleblob 02cac21426 Question category can now be specified in Moodle XML format. 2006-11-29 14:26:47 +00:00
thepurpleblob ee031ca12d Added ability to specify destination category within GIFT file.
MDL-4163
2006-11-29 13:33:44 +00:00
thepurpleblob 2332c5b8da Fixed a notice. Tidied up format class call a bit. Added provision
for categories to be specified within import files - MDL-4163.
2006-11-29 13:30:41 +00:00
thepurpleblob a2842bc86c Added function to find or add a path of categories.
For categories specified in import files. MDL-4163
2006-11-29 13:27:40 +00:00
thepurpleblob 8d0db8766b Help information for specifying categories in GIFT file. MDL-4163 2006-11-29 13:22:54 +00:00
thepurpleblob 746be7faee Added strings for selecting category inside import file. MDL-4163 2006-11-29 13:06:10 +00:00
tjhunt 3b117ede45 MDL-7720 - non-unicode-safe case-insensitive string comparison in shortanswer question type. 2006-11-28 18:43:44 +00:00
tjhunt af5f09db42 Put back spaces in code that Martin Dougiamass stripped out of the lang strings without thinking about the consequences. 2006-11-28 18:38:59 +00:00
nfreear 48988ba271 Fix for MDL-6685 (and MDL-7122 "breadcrumb separator missing"). 2006-11-28 15:25:00 +00:00
thepurpleblob 1060c5998e Fix for MDL-7703 - scope problem sorted by moving all functions inside the class
Also fixed a bunch of notices
2006-11-28 15:13:25 +00:00
thepurpleblob 9f5d13105d Examview 'SA' type questions now supported. Maps to Essay questions 2006-11-28 11:49:58 +00:00
thepurpleblob 777816e6c7 Fixed typo and a notice when question type is not supported. 2006-11-28 09:25:52 +00:00
mark-nielsen 0e0fd96278 Fix for MDL-7707. Also had to update index.php to show students the same score as in the gradebook. 2006-11-28 05:45:52 +00:00
mark-nielsen 5aa3fe9c10 Missing help file from MDL-7352 2006-11-28 03:54:34 +00:00
mark-nielsen 882a1343ab [Fixed] MDL-7614 2006-11-28 03:39:52 +00:00
moodler cb48f665eb Automatic installer.php lang files by installer_builder (20061128) 2006-11-28 03:17:33 +00:00
moodler 0a786db090 Better checks when loading datamodel 2006-11-28 03:02:38 +00:00
moodler e9dec637ff the version was blank on a package I tried ... this now gives it some sort of
reasonable default (scorm_12)
2006-11-28 02:50:37 +00:00
skodak 954e74f2dd Broken handling of magic quotes in admin settings and set_config in general MDL-7668; backported from HEAD 2006-11-27 08:48:52 +00:00
vyshane dc3906acce Fix for MDL-7676 2006-11-27 04:48:06 +00:00
ikawhero 4fc9ea71f9 Added missing string 2006-11-27 04:05:40 +00:00
vyshane abe58b4a43 Fix for MDL-7682 2006-11-27 03:21:26 +00:00
moodler 662231384d Automatic installer.php lang files by installer_builder (20061127) 2006-11-27 03:16:41 +00:00
skodak c76465c42b MDL-7631 Incorrect grading when Each attempt builds on the last and questions on more than one page; backported from HEAD 2006-11-26 23:02:06 +00:00
skodak e2a73d8a93 Double quotes breaking short answers in a multianswer/cloze question MDL-6676; backported from HEAD 2006-11-26 21:58:31 +00:00
skodak 7764cd6cc7 incorrect table width in Exercise MDL-7690; backported from HEAD 2006-11-26 21:38:03 +00:00
stronk7 0a870ce21a Typo causing continue button in closed quizzes to fail. MDL-7685 2006-11-25 17:12:06 +00:00
moodler 55be7faa95 Automatic installer.php lang files by installer_builder (20061125) 2006-11-25 03:21:13 +00:00
skodak 60afff1419 Fix course overview graph broken by notices MDL-7680; backported from HEAD 2006-11-24 18:32:38 +00:00
thepurpleblob 1c8d340d1b Added note that : is a control character and can be escaped. 2006-11-24 13:02:07 +00:00
thepurpleblob 31d3c58089 Colon characters in GIFT files can now be escaped.
Resolves MDL-6915
2006-11-24 12:02:08 +00:00
moodler 4a900a1e3b fix for MDL-7448, added enableForm() call to prevent chat lock up. Thanks Kok Chee Kean! 2006-11-24 04:17:15 +00:00
toyomoyo 2564d898d3 fixing a warning 2006-11-24 01:59:48 +00:00
skodak cea03e39c7 Missing s() on current value in admin_setting_configtext class MDL-7666; backported from HEAD 2006-11-23 21:01:23 +00:00
skodak e38e49335c Students cannot enrol with PayPal plugin when using PHP4 MDL-7529; backported from HEAD 2006-11-23 20:17:23 +00:00
ethem 8d137d3be6 We are expecting multiple records! 2006-11-23 16:26:07 +00:00
moodler 766b1926ed Removed two unenecessary lines from a cut-and-paste 2006-11-23 09:09:28 +00:00
vyshane 842721d87f Fixed bug in IE for resources/activities indentation. 2006-11-23 08:35:19 +00:00
moodler 247147c8dd Automatic installer.php lang files by installer_builder (20061123) 2006-11-23 03:12:06 +00:00
urs_hunkler 75108f21ad 'removed overflow:hidden because there are some display issues on some pages. min-width: 0 is enough to trigger IE7 hasLayout to avoid collapsing divs' 2006-11-22 20:37:38 +00:00
urs_hunkler 9fa06fc780 'removed overflow:hidden because there are some display issues on some pages. min-width: 0 is enough to trigger IE7 hasLayout to avoid collapsing divs' 2006-11-22 20:37:14 +00:00
vyshane ed90d891a1 Fix for MDL-7627. Credited to Andrew Walker. 2006-11-22 08:25:24 +00:00
ethem d8f6207bee MDL-7642 2006-11-22 08:18:06 +00:00
vyshane 381fd47442 Added POST connection for left and right indents. 2006-11-22 07:37:59 +00:00
vyshane f868caa529 Added indent left and indent right for resources 2006-11-22 07:35:53 +00:00
vyshane 4378a0456e Code for ajax indentation of activities and resources. 2006-11-22 07:01:16 +00:00
skodak f829d4a446 Social activities block always appears in edit mode to admin without turning editing on MDL-7639 2006-11-21 20:35:04 +00:00
urs_hunkler b49d086945 ajax move icon added 2006-11-21 13:50:45 +00:00
toyomoyo 0aa07c2fa0 adding capability checks 2006-11-21 05:31:03 +00:00
toyomoyo 4d15a1932a fix for MDL-7426, remove teacher.php link 2006-11-21 04:44:35 +00:00
vyshane c2540e76e1 Added class names in the html output for editing mode buttons. These will be used as hooks in the ajax course formats. 2006-11-21 04:22:47 +00:00
vyshane c3c4013f08 Editing mode buttons now check for class names instead of titiles when searching for the buttons to be 'ajaxified'. 2006-11-21 04:20:17 +00:00
vyshane 210deee299 Fixed button spacing. 2006-11-21 04:13:58 +00:00
toyomoyo 9c71a2396b fix for MDL-7540 wrong usage of context levels 2006-11-21 03:22:33 +00:00
moodler 6ba16921db Automatic installer.php lang files by installer_builder (20061121) 2006-11-21 03:19:26 +00:00
toyomoyo 245505f928 removing hardcoded auth method "ldap" 2006-11-21 02:08:13 +00:00
tjhunt d086c991ee Fix column names - backported from head. 2006-11-20 18:04:24 +00:00
skodak c8c625a0be bellow spelling fixed; backported from HEAD 2006-11-20 17:40:45 +00:00
skodak a71dd3f315 Advanced uploading of file interface typo MDL-7628; backported from HEAD 2006-11-20 17:36:26 +00:00
ethem a40fe0a766 Daily echeck order notification 2006-11-20 14:53:17 +00:00
skodak b2a39ba822 fixed problem with apostrophe in role names and description when creating roles during install and restore MDL-7611; backported from HEAD 2006-11-20 14:11:39 +00:00
ethem 845c5d725b Help file: Uploading Authorize.net CSV file 2006-11-20 13:47:53 +00:00
skodak ac12e36125 PARAM_PATH can be used only for relative paths, there is no parameter type for absolute paths that would be compatible with win32 - use PARAM_RAW for now, add file_exists validation later MDL-7617; backported from HEAD 2006-11-20 13:35:36 +00:00
thepurpleblob 08a7bbc9ff Various improvements to Examview input.
Fixes MDL-7087 and MDL-7349. Partial fix for MDL-7184 (Examview part)
2006-11-20 13:00:34 +00:00
ethem 52b0b2684c Reference Transaction ID refers enrol_authorize.transid, not enrol_authorize_refunds.transid 2006-11-20 11:14:08 +00:00
ethem 7c96968699 It is time to refund for echeck (business checking). 2006-11-20 09:54:44 +00:00
ethem c629a2ef7f It is time to refund for echeck (business checking). 2006-11-20 09:54:44 +00:00
vyshane d500edf243 Removed subclass activity_class. The only logic in that class was for handling of groupmode buttons. These are now handled in resource_class.prototype.init_buttons() and resource_class.prototype.toggle_groupmode().
We basially look at whether the button is present in the html output, and if it is, we add it to the ajax frontend. We do not make the distinction that activities should have the button (as opposed to resources). The advantage is that some activities might not have groupmode.

This fixes MDL-6916.
2006-11-20 09:18:33 +00:00
vyshane b666f6f3aa Passing some more language strings to ajax frontend. Part of the fix for MDL-6916. 2006-11-20 09:15:24 +00:00
ethem f66e4015b8 Business checkings can be refunded only for echeck method. Not saving nor checking. 2006-11-20 08:07:42 +00:00
vyshane a84533fee3 Fix for MDL-7620 2006-11-20 02:28:07 +00:00
tjhunt b49beecf63 Fix function arguments. 2006-11-19 21:28:11 +00:00
moodler 74b111bc7f Automatic installer.php lang files by installer_builder (20061119) 2006-11-19 03:13:23 +00:00
stronk7 a8c5a14b7c Prevent some false-positives detecting uses of old user_XXX tables.
See http://moodle.org/mod/forum/discuss.php?d=58976
2006-11-18 20:25:52 +00:00
stronk7 f9ad31d809 PHP generated code must use $result instead of $status. MDL-7533 2006-11-18 19:02:13 +00:00
stronk7 db26bf99f5 PHP generated code must use $result instead of $status. MDL-7533 2006-11-18 18:51:42 +00:00
gbateson e4857c41fb fix sort order of questions in legend, which caused mismatch between question numbers used in Detailed Statistics report and those used in the legend 2006-11-18 08:54:00 +00:00
moodler 37d9720b15 Automatic installer.php lang files by installer_builder (20061118) 2006-11-18 03:14:19 +00:00
ethem 24e6ae8cc6 MDL-7533
Use $result instead of $status
2006-11-17 17:23:00 +00:00
ethem e31d492145 Changed db column(cclastfour) as refundinfo.
Because this field will be used to refund both cc and echeck.
Business checkings can be refunded, too; so mark as 1 this field for business checkings.
That is; refundinfo: is last four digit for credit cards, business checking for echecks.
2006-11-17 15:42:25 +00:00
vyshane e5708be88c Formatting cleanups. 2006-11-17 09:07:30 +00:00
ethem c34713bfca Business checks can be refunded. Point a flag for it. The cclastfour field will be renamed to refundinfo later. 2006-11-17 06:53:36 +00:00
vyshane 364f72aa05 Fix for MDL-7574. 2006-11-17 05:51:37 +00:00
moodler 4e5d63c403 Renamed function name that conflicted with PHP function MDL-7594 2006-11-17 04:02:11 +00:00
moodler 79bad718b6 Automatic installer.php lang files by installer_builder (20061117) 2006-11-17 03:13:25 +00:00
vyshane 01ed826fff Fix for MDL-7563. Added call to removeFromGroup() from block_class.delete_button(). Thanks Andrew Walker for the patch! 2006-11-17 02:56:58 +00:00
moodler d842884534 Removed B) smiley MDL-7589 2006-11-17 02:10:46 +00:00
tjhunt b51bfdd111 Typo in function name. 2006-11-16 16:45:55 +00:00
ethem db47e0ffbb choosemethod is too long for heading, added <br /> 2006-11-16 14:16:20 +00:00
tjhunt ceab443d08 MDL-7576 - review link does not work after attempt is closed. Thanks to Chad Badiyan for the fix. 2006-11-16 12:43:00 +00:00
vyshane 5675d86412 Changed http requests to uppercase: post to POST, delete to DELETE. 2006-11-16 05:29:16 +00:00
toyomoyo ad0d007abd fixed a problem where user is not shown when the user has not visited a course page. changed get_user_roles to take in additional parameter 2006-11-16 05:16:07 +00:00
vyshane 69e5d0ef95 Fix for MDL-7293. Added new function blocks_move_block() to replace blocks_execute_repositioning_atomic(). Reverted blocks_execute_repositioning() to what it was before the changes made whenblocks_execute_repositioning_atomic() was introduced. 2006-11-16 03:23:05 +00:00
vyshane f32f831749 Fix for MDL-7224. Switched from blocks_execute_repositioning_atomic() to blocks_move_block() for moving blocks. 2006-11-16 03:11:05 +00:00
vyshane cdd0bfcc1a MDL-7293. Switching the order of the classes around 2006-11-16 02:21:01 +00:00
skodak 6153b68ff9 Response file not uploading when grading student submission when using secureforms MDL-7566 2006-11-15 20:56:23 +00:00
skodak 716f1ef9f1 Broken next button when grading assignments MDL-7569 2006-11-15 19:38:07 +00:00
tjhunt 101fb762f1 MDL-7428 - Quiz regrade removes student answers from essay questions that have been graded. Merged from MOODLE_16_STABLE. 2006-11-15 17:32:54 +00:00
tjhunt 368cc39e7e MDL-7567 Numerical questions occasionally mix up the order of their answers. Merged from MOODLE_16_STABLE. 2006-11-15 16:56:02 +00:00
tjhunt 806b78fd12 MDL-7309 Add error checking to the Quiz DB upgrade script. This should prevent the mysterious failures that some people are seeing when upgrading quizzes from 1.5.x to 1.6.x. Merged from MOODLE_16_STABLE. 2006-11-15 12:58:00 +00:00
vyshane 6c619b41c8 Doh.. Should be a string 2006-11-15 08:33:24 +00:00
vyshane f02f53f09b Fix for MDL-7192. Added camino check. 2006-11-15 08:10:14 +00:00
vyshane c4acc71042 Added Camino check in check_browser_version() 2006-11-15 08:06:20 +00:00
toyomoyo a5fe571a1c adding missing fields 2006-11-15 06:27:53 +00:00
toyomoyo 9fa998f63b replacing deprecated functions 2006-11-15 06:22:28 +00:00
toyomoyo 4b6776536a fix for MDL-6928, correcting auth_iscreator check 2006-11-15 03:36:07 +00:00
vyshane b7a99c865f Fix for MDL-7293 2006-11-15 03:34:09 +00:00
vyshane 059c9be198 Fix for MDL-7293. We do not block_add() blocks that are pinned - for the ajax course formats. 2006-11-15 03:29:59 +00:00
moodler f132783767 Automatic installer.php lang files by installer_builder (20061115) 2006-11-15 03:17:44 +00:00
vyshane 26ee0fa9cd Small css selector change to accomdate fix for blocks move handle (should not be shown for pinned blocks in ajax course format). Thanks to Andrew Walker for suggested fix. 2006-11-15 02:41:17 +00:00
vyshane d3c653c13f Fix for move handle. The move handle should not be added for pinned blocks. See MDL-7293. Suggested fix by Andew Walker. 2006-11-15 02:39:46 +00:00
skodak 1f6823d18f MDL-7536 add proper slashing to data from paypal callback; backported from HEAD 2006-11-14 21:24:14 +00:00
moodler 4d833069bd Initial commit of gu_utf8 installer file 2006-11-14 19:57:27 +00:00
moodler 03b17f7a0d file installer.php was added on branch MOODLE_17_STABLE on 2006-11-14 19:57:26 +0000 2006-11-14 19:52:55 +00:00
stronk7 5b549b306d while working, it's better to compare with original data (un-slashed) 2006-11-14 16:27:20 +00:00
tjhunt 6c9ac19b6f MDL-7531 Fix SQL that does not work in Oracle. Thanks to Mark Hetherington for the fix. 2006-11-14 15:40:29 +00:00
vyshane 83523cccd6 MDL-7284 2006-11-14 05:33:37 +00:00
vyshane 4846e7e856 Fixed javascript error that occurs during the appending of block buttons. Some code formatting cleanups as well. 2006-11-14 05:03:14 +00:00
vyshane ad9c1a9966 Fix for MDL-7440. Suggested by Andrew Walker. 2006-11-14 03:05:38 +00:00
vyshane 67c80485b9 Fix for MDL-6969. Patch by Andrew Walker. 2006-11-14 02:04:26 +00:00
stronk7 b764301306 Set Assoc mode always after DB connection. Discovered by MDL-7443. 2006-11-13 22:58:59 +00:00
stronk7 993c547bd6 Fetchmode needs to be explicity set to ASSOC. Plus 1 missing library
added. MDL-7443
2006-11-13 22:44:54 +00:00
skodak 558bfc50fe MDL-7389 paypal plugin reports error when student correctly enrolled 2006-11-13 22:25:14 +00:00
exe-cutor dc13c4f8a3 User capabilities are now properly loaded. 2006-11-13 11:52:18 +00:00
ethem d485515725 Align right upload csv button. 2006-11-13 08:39:58 +00:00
ethem f8a7befdd5 New feature: Show my payments only for users who has_capability('enrol/authorize:managepayments') 2006-11-13 07:55:31 +00:00
ethem ad5cbccfd3 New feature: Show my payments only for users who has_capability('enrol/authorize:managepayments') 2006-11-13 07:43:49 +00:00
vyshane f07794ae81 Added error message string 2006-11-13 07:35:49 +00:00
vyshane 9930ae9e6b $SITE is not needed 2006-11-13 07:34:18 +00:00
vyshane 6bcb0ad140 Fix for MDL-7461. Related to MDL-7383. We still show the add discussion button to guests, but only if we are not in the site news. 2006-11-13 07:28:34 +00:00
ikawhero 78066f113a Replacing with working image 2006-11-13 06:29:29 +00:00
vyshane e2e91ea8ce Fixes for MDL-7461. Removed checks for legacy guest capability as well (redundant). 2006-11-13 06:02:49 +00:00
toyomoyo 3b0b90d5c1 fix for MDL-7441 wrong size for roles icon 2006-11-13 05:42:43 +00:00
vyshane ad890b4490 Fix for MDL-7383. Edit and Delete links aren't shown when printing posts if the user should not be able to do these (checks were already done in post.php as well). 2006-11-13 03:14:58 +00:00
stronk7 ea369699c4 This change wan't backported from HEAD and was causing unicode test
to fail always, showing some incorrect info to users. MDL-7475
2006-11-12 19:33:14 +00:00
ethem 87db2759da Merge fix 2006-11-12 13:23:34 +00:00
ethem 6bd4ab8c5e Get course before require_login(); Merged from 16stable. 2006-11-12 13:21:11 +00:00
moodler c887b2c522 Prevent admins from unassigning themselves MDL-7462 2006-11-12 06:10:47 +00:00
moodler 02f54468a8 Automatic installer.php lang files by installer_builder (20061112) 2006-11-12 03:12:32 +00:00
moodler d9316decdd Automatic installer.php lang files by installer_builder (20061111) 2006-11-11 03:17:37 +00:00
urs_hunkler 39cc4b9f1a 'added 11x11 size for roles icon in sideblock commands bar' 2006-11-10 12:33:15 +00:00
urs_hunkler 9cd9700ad6 changed icons 2006-11-10 12:31:29 +00:00
moodler 6c9ceb3c2e Automatic installer.php lang files by installer_builder (20061110) 2006-11-10 09:49:15 +00:00
urs_hunkler d52eafd9ae roles icon added 2006-11-10 09:01:03 +00:00
toyomoyo 14f409f698 fields should be backed up regardless of whether userdata is selected 2006-11-10 04:17:02 +00:00
toyomoyo 762b68827e fields should be restored regardless of user data is selected or not 2006-11-10 04:10:11 +00:00
moodler c4257b0ff9 Automatic installer.php lang files by installer_builder (20061110) 2006-11-10 03:18:38 +00:00
skodak 76e4168089 code improvement in count_courses_notin_metacourse() MDL-7424 - thanks Eloy! backported from HEAD 2006-11-09 23:36:07 +00:00
skodak a58e869ce2 Child courses import list empty MDL-7424; added new count_courses_notin_metacourse() function, the old one was kept for BC; backported from HEAD 2006-11-09 21:14:20 +00:00
moodler 8798f3049f FIxed problem where capability forum:nothrottling was not fully renamed and
was thus left useless.   MDL-7414
2006-11-09 09:26:32 +00:00
toyomoyo 0d163e9ece category page cleaning, MDL-7409 2006-11-09 06:21:06 +00:00
moodler cb7e142c73 Bumping post 1.7 2006-11-08 16:46:44 +00:00
moodler 17e05203ff Patch from Stefano Bagnatica, MDL-7121 (missing header) 2006-11-08 15:29:21 +00:00
moodler 92ac252418 Fix for missing "reply" links for guests doh! MDL-7393 2006-11-08 09:42:41 +00:00
toyomoyo c9dc31afe8 fix upgrading from 1.6 not redirecting problem 2006-11-08 06:23:06 +00:00
toyomoyo 493dd6c934 fix for MDL-6788, reformating blog edit page 2006-11-08 05:14:13 +00:00
toyomoyo a2adf92023 fixing wrong default gradebook role when upgrading from < 1.7 2006-11-08 02:41:58 +00:00
koenr 005072a3ef MDL-7379 typo 2006-11-08 00:03:43 +00:00
watcanz 8bed6c33cd Updated for 1.6/1.7 2006-11-07 13:49:18 +00:00
mudrd8mz 0ac7fcd7da Fixed bug MDL-7361 (creates $CFG->dataroot/lang if it does not exist). 2006-11-07 12:52:13 +00:00
moodler 8aec60b652 Fix for emoticon icon size MDL-7375 2006-11-07 12:49:07 +00:00
moodler d4f4fa2abe Better check for mssql, to cope with ODBTP (thanks, Eloy!) 2006-11-07 12:38:55 +00:00
moodler 7620c403ec Tweaked some strings for Unicode upgrade info 2006-11-07 09:29:06 +00:00
moodler df1a564fa6 Bumped to 1.7 2006-11-07 09:10:54 +00:00
skodak e20fd196ce new unicode environment check for 1.8 and 1.7 MDL-6332 2006-11-07 09:03:37 +00:00
toyomoyo fd10b9422d fixing MDL-6855 4b) changing not null to true for defaultrole 2006-11-07 08:58:53 +00:00
moodler 80f7504f86 New tags 2006-11-07 07:16:50 +00:00
toyomoyo a203cb09be fixing wrong comment 2006-11-07 03:12:33 +00:00
moodler 131015e234 Automatic installer.php lang files by installer_builder (20061107) 2006-11-07 03:12:00 +00:00
moodler 8494b4356c Temporary fix to hide simpletest when unsupported databases are active MDL-7337 2006-11-07 02:52:38 +00:00
mjollnir_ 3b1bd3405b fixed the journal upgrade. renaming a null column to not null is unhappy 2006-11-07 00:09:18 +00:00
skodak d4e2861046 prevent duplicate content in search engines MDL-7299 2006-11-06 21:48:04 +00:00
koenr 008809ad21 MDL-7328 - miner fix on quotes 2006-11-06 21:27:19 +00:00
skodak 89a750dbeb better param handling SC#331 2006-11-06 20:33:54 +00:00
moodler c0db85f0b2 Fix for googlebot detection ($USER was never empty) 2006-11-06 17:53:50 +00:00
stronk7 ef02670d09 Simple bump 2006-11-06 17:43:28 +00:00
stronk7 7764e1afe0 And, finally, IE is able to display IMS packages properly! B-)
One of the worst to solve bugs in my life! MDL-6417
2006-11-06 17:20:11 +00:00
moodler 2c36ba5bb8 Fixed up the URL after posting (too many #hash) 2006-11-06 16:28:20 +00:00
moodler 1f046e1625 Added upgrade_language_pack() for upgrade in non-english MDL-7351 2006-11-06 12:46:17 +00:00
toyomoyo 31a8a7e4e1 taking out warning 2006-11-06 08:26:56 +00:00
toyomoyo 120f722403 fixing capability of block contexts 2006-11-06 06:15:11 +00:00
toyomoyo 2854559b92 taking out extra isteahcer() 2006-11-06 02:32:35 +00:00
skodak 696d638772 MDL-7176 fixed comment 2006-11-05 18:27:03 +00:00
moodler 2e0b0c94f8 Dan's fix from MDL-7263 2006-11-05 12:39:39 +00:00
moodler d6070215b8 Checked in Dan's fix for MDL-7266 ... missing string 2006-11-05 12:25:32 +00:00
stronk7 7ca5f47dcb modify_database() will show the deprecated debugging after 2006101007
(Moodle 1.7 release version) MDL-5919
2006-11-05 09:44:05 +00:00
moodler 008c431636 DOn't show reply links to logged-in users if they can't reply 2006-11-05 09:34:09 +00:00
moodler 17e44aad44 Fix loginas at site level 2006-11-05 06:43:34 +00:00
moodler cad170cba8 Automatic installer.php lang files by installer_builder (20061105) 2006-11-05 03:16:55 +00:00
stronk7 b215544c31 Now GD is checked before displaying course overview graphs. MDL-7204 2006-11-04 23:28:51 +00:00
wildgirl 5d10e3f43d MDL-6474 fix 2006-11-04 22:21:00 +00:00
wildgirl 354cd59314 file langswitchstorage.html was added on branch MOODLE_17_STABLE on 2006-11-04 22:21:00 +0000 2006-11-04 21:56:42 +00:00
stronk7 1ede3a6712 Now all the get_records() functions support only one field
to be specified in the SELECT clause. Not needed anymore to
write double "SELECT id, id..." queries. Results returned
follow exactly the same structure than normal recordsets
(first field = key) MDL-5877
2006-11-04 16:59:52 +00:00
stronk7 8558e34ed5 Deprecating modify_database(). It shows debugging info
if release > 2006101004 (Beta2 +01) MDL-5919
2006-11-04 16:21:30 +00:00
moodler 614b05ec8b Bump release name to Beta 2 2006-11-03 16:32:45 +00:00
sam_marshall ed2bc33154 MDL-7344 Change 'import child course' timeout to 180 seconds per course because role creation takes a while for thousands of users. 2006-11-03 14:37:41 +00:00
ethem 1ab501974f Show site name at top when selecting courses. 2006-11-03 12:39:48 +00:00
ethem 87753e76d1 Get payment managers at COURSE level. 2006-11-03 12:04:57 +00:00
ethem 0b06840128 get_teacher() to get_users_by_capability(). Merged with HEAD. 2006-11-03 11:28:26 +00:00
toyomoyo 9abc42b262 fix for MDL-7300, mssql not null problem 2006-11-03 08:45:44 +00:00
moodler 90080d990a FIxed some problems with blog entries when not logged in (eg rss) 2006-11-03 08:37:46 +00:00
toyomoyo e7fcbec49e fix for MDL-7300, mssql query error on group creation 2006-11-03 08:17:33 +00:00
urs_hunkler 1576c4d233 'CSS update, mainly for MDL-7330' 2006-11-03 07:44:44 +00:00
urs_hunkler 6ac068ae5c 'CSS update, mainly for MDL-7330' 2006-11-03 07:44:17 +00:00
toyomoyo 7074cb559f fix for MDL-7031, removing control tags from add template 2006-11-03 03:26:33 +00:00
moodler 9138c1f9a8 Automatic installer.php lang files by installer_builder (20061103) 2006-11-03 03:06:18 +00:00
stronk7 98ed0ea1af Ending fied/key/index PHP generators. 2006-11-02 23:07:44 +00:00
stronk7 6abfa47012 Enablig rename_table() PHP generator 2006-11-02 22:43:16 +00:00
bobopinna 59b08215b2 removed white spaces 2006-11-02 15:55:56 +00:00
bobopinna c7c1adeb8d Fixed a small problem with whatgrade field 2006-11-02 15:19:40 +00:00
bobopinna 9230c9417b Added a missing variable definition 2006-11-02 15:17:48 +00:00
bobopinna 23f0f6f72d Fixed a storic problem with & in prerequisites definition
Now finally Moodle has a complete aicc_script conformity with SCORM 1.2
2006-11-02 15:15:06 +00:00
bobopinna 7eb1d32847 Fixed several RegExp to fit ADL Test Suite 2006-11-02 15:12:49 +00:00
bobopinna fadb4b239b Removed isadmin() calls 2006-11-02 15:10:20 +00:00
ethem f319b5bf61 Fix for enrolurl(admin/users.php). 2006-11-02 13:22:49 +00:00
toyomoyo 4a373dbaf9 fix for MDL-6721, wiki broken for SPG 2006-11-02 08:49:55 +00:00
moodler c612f884dc Petr's patch for MDL-7327 to modify require_capability login a bit 2006-11-02 08:11:39 +00:00
toyomoyo b543159952 fixing paging bar problem 2006-11-02 05:53:28 +00:00
toyomoyo 667fdd514e fix for MDL-7140, duplicate course name in header 2006-11-02 03:16:50 +00:00
moodler 951f480ab9 Automatic installer.php lang files by installer_builder (20061102) 2006-11-02 03:07:13 +00:00
toyomoyo bcbb41a0fa fix for MDL-7112 select distinct on text fields 2006-11-02 02:16:52 +00:00
toyomoyo ba39176b59 fix for MDL-7112 select distinct on text fields 2006-11-02 02:09:42 +00:00
toyomoyo 4305306220 fix for MDL 7112 select distinct on text field 2006-11-02 02:01:58 +00:00
skodak 8864d0f442 hack for problems with concurrent use of $nomoodlecookie and capabilities in RSS feeds, see MDL-7243 - it should be replaced once we get to codes in urls 2006-11-01 21:02:11 +00:00
ethem 741162fbbe Make authorize.net config page secure.
See: http://moodle.org/mod/forum/discuss.php?d=56728
Merged with HEAD.
2006-11-01 13:02:00 +00:00
ethem f1e4622ccb Make authorize.net config page secure.
See: http://moodle.org/mod/forum/discuss.php?d=56728
Merged with HEAD.
2006-11-01 12:46:19 +00:00
stronk7 4241549aed in/on/at too many ways to say "en" in Spanish. :-P 2006-11-01 11:51:13 +00:00
moodler 9e0d96f36b Tidied up string files 2006-11-01 09:37:06 +00:00
moodler 7e5b0b4e9c Clean up strings 2006-11-01 09:26:54 +00:00
moodler 9be2fc8f19 Cleaned up data.php 2006-11-01 09:24:15 +00:00
moodler f8cbf4713a Cleaned up language file 2006-11-01 09:19:21 +00:00
moodler 1a7d693572 Sorted and cleaned up this file 2006-11-01 09:18:04 +00:00
moodler 31922db550 Sorted and cleaned up language files 2006-11-01 09:15:50 +00:00
moodler 3cf94d16ed Added some strings that had been deleted MDL-6645 2006-11-01 09:14:24 +00:00
moodler ae471b7ab6 An untested patch for MDL-7211 to fix firstclass hole 2006-11-01 06:54:07 +00:00
moodler f00c241f7d Fixed SQL for Oracle (forum searching) MDL-7317 2006-11-01 06:29:08 +00:00
toyomoyo cbd20ae8ba fix for MDL-6928 LDAP course creation capability error 2006-11-01 03:50:21 +00:00
toyomoyo 7bbe252c59 restore fix for supporting pre granular version of moodle backups 2006-11-01 03:31:02 +00:00
skodak a7d6e5b0f7 fixed notice during restore 2006-10-31 22:45:28 +00:00
skodak e4edbb9e0b Fix errors in quiz overview download MDL-7316 2006-10-31 22:17:50 +00:00
skodak 80895066a2 fixed incorrect use of require_capability() in lesson mod MDL-7314 2006-10-31 22:01:24 +00:00
skodak 40385816cd fixed gradebookroles cfg default value MDL-7253 2006-10-31 21:51:20 +00:00
skodak 1be6adbd3e fixed capabilities in chat recent activity, removed broken optimization from message insert, fixed closing of box MDL-7313 2006-10-31 21:05:05 +00:00
stronk7 d416d809a1 Prevent +/- operators (REGEXP) on glossary searches for MSSQL and Oracle. MDL-7312 2006-10-31 20:33:25 +00:00
skodak bf3c381651 fixed group related typo in has_capability() 2006-10-31 20:22:52 +00:00
stronk7 9338d432f9 Prevent +/- operators (REGEXP) on messages search. MDL-7312 2006-10-31 20:21:13 +00:00
stronk7 b2ef8fc07e transform TOKEN searches into STRING searches and trim +- chars. MDL-7312 2006-10-31 20:15:23 +00:00
stronk7 53ff8d79ee Prevent +/- operators (REGEXP) on course searches for MSSQL and Oracle. MDL-7312 2006-10-31 19:53:25 +00:00
skodak ed55a25fd5 Commented out session dump in user profile when in debug mode MDL-7311 2006-10-31 19:31:26 +00:00
ethem c92727ae6b Show notice at bottom. Merged with HEAD. 2006-10-31 19:28:18 +00:00
stronk7 5cc8148eb8 Fixed searches, list of results and simplified SQL logic. All
those while trying to fix one LCASE() use. MDL-7310
2006-10-31 19:15:30 +00:00
danmarsden 92b2d0f2dd MDL-7171 Location of guest form should be above results - where the form for submitting results would appear. 2006-10-31 18:59:38 +00:00
stronk7 ec27637e08 Now wiki supports Unicode searches 2006-10-31 17:47:52 +00:00
tjhunt 319047dfb1 Improved help file as per Ralf Hilgenstock's suggestion: http://moodle.org/mod/forum/discuss.php?d=57400 2006-10-31 15:12:56 +00:00
moodler 67145bac78 Improved display of grades when grades should not be shown MDL-7150 2006-10-31 15:06:02 +00:00
moodler 7675f212ee Fix for MDL-7238 to hide authorize interface when necessary 2006-10-31 14:04:57 +00:00
tjhunt 25e0480339 MDL-5811 - Quiz editing outputs nasty junk before print_header sometimes. Second attempt at fixing. I forgot to mention the bug number in the previous commit to mod/quiz/edit.php. 2006-10-31 12:03:43 +00:00
tjhunt 8a286fda3e Make the close_window function better. 2006-10-31 11:54:14 +00:00
bobopinna 5e73ea768b Fixed a typo 2006-10-31 11:37:40 +00:00
tjhunt fdecc5c6da Fix junk being output before print_header, which happened sometimes. 2006-10-31 10:40:07 +00:00
tjhunt f3e4a7a514 Add return option to notify() 2006-10-31 10:37:38 +00:00
skodak f966e024ef Change name when file name contains more of a point MDL-6897 - patch submitted by Toni Mas 2006-10-31 10:15:23 +00:00
moodler f3410ae74b Fix for MDL-6975 2006-10-31 09:14:43 +00:00
skodak 7e70535f09 adding of user events into calendar and posting of blogs is now enabled by default - MDL-7297 and MDL-7245 2006-10-31 09:08:27 +00:00
moodler 8def180d7a Added information about guest exception 2006-10-31 08:59:41 +00:00
toyomoyo e123a4e191 fix for MDL-7302, tagid lost when turning on/off editting 2006-10-31 08:49:46 +00:00
moodler df5ee47979 Added some styles to make role descriptions a bit smaller MDL-6923 2006-10-31 08:10:29 +00:00
moodler b18207cd3a Added help links to Roles pages MDL-6923 2006-10-31 08:09:29 +00:00
moodler f750f104ca New help files for Roles MDL-6923 2006-10-31 08:04:14 +00:00
toyomoyo cc1b52fddf removing evil semicolon 2006-10-31 07:32:21 +00:00
urs_hunkler e6f1411d72 'changed header.html to the accessibility version as standardwhite' 2006-10-31 07:31:23 +00:00
martinlanghoff 90f08155c5 lib/textlib.class: Cache dir is now created correctly, allowing speed increase (SR# 595)
Previous logic had dir created only when mbstring wasn't used, but the
typo3 lib needs to cache some data regardless, for the specCharsToASCII
function, which uses internal translation tables.


Author: Luke Hudson <luke@catalyst.net.nz>
2006-10-31 05:00:32 +00:00
moodler 24f49eaa7e Killed infinite loop when upgrading teachers! 2006-10-31 04:37:55 +00:00
moodler 086617bac8 DIsplay count for all participants 2006-10-31 01:20:00 +00:00
stronk7 088f9942ef Oracle optimization. Texts under 4000cc can be handled directly as varchar2,
so they don't need the 2-phase (insert/update) handling of LOBs
2006-10-30 23:12:41 +00:00
stronk7 6befbe8050 Fixed one bug on Oracle produced when we were inserting
records with returnid disabled and containing LOBs
2006-10-30 22:58:04 +00:00
skodak 62385afcd3 Adding of calendar events broken MDL-7297 2006-10-30 22:32:27 +00:00
skodak b9f7637ea8 fixed double enableajax in previous commit MDL-7296 2006-10-30 21:03:08 +00:00
skodak 5e435e4635 Disabled global search by default and marked as experimental MDL-7296 and AJAX moved to experimental too 2006-10-30 20:57:08 +00:00
urs_hunkler 362af1586a 'changed header.html to the accessibility version as standardwhite' 2006-10-30 20:02:26 +00:00
urs_hunkler c8305b464f 'added table.navbar {width:100%;} again for themes still using tables in the header.' 2006-10-30 19:56:50 +00:00
stronk7 f5303bd518 Prevent Oracle to fail when inserting records with log->info empty
(will be solved once we got all those NOT NULL fields fixed)
2006-10-30 19:51:44 +00:00
stronk7 d040f940a2 Fixing display of pivots when they are author names 2006-10-30 19:31:33 +00:00
stronk7 c97ab4b00a Fixing some queries with duplicate column names. MDL-7294 2006-10-30 19:01:02 +00:00
stronk7 5e8720e3a3 Now glossary is using the proper sql_substr() function 2006-10-30 18:33:04 +00:00
stronk7 3cef39f10a New function sql_substr() returns the proper substr() function for each DB 2006-10-30 18:28:47 +00:00
stronk7 0e938d8e6c Now lcase() and ucase() are out from glossary 2006-10-30 17:58:56 +00:00
stronk7 6a9781ab1f sql_as() is deprecated. Column aliases ALWAYS must use the AS keyword. 2006-10-30 17:43:40 +00:00
stronk7 18ecdd56aa Deprecating sql_as (now the AS keyword os required in COLUMN aliases) 2006-10-30 17:39:55 +00:00
stronk7 f9452850dd Updating wood to show the nav-bar properly. 2006-10-30 16:51:34 +00:00
tjhunt d2925a9397 Make General feedback more tolerant of whitespace. 2006-10-30 16:35:21 +00:00
thepurpleblob 537cef4fdd Fixed notice 2006-10-30 16:21:16 +00:00
stronk7 8319d93b45 Added enablerecordcache setting to control the get_record() cache.
Note that some parts of Moodle can enable/disable it selectively.
2006-10-30 15:55:48 +00:00
stronk7 41a96d7c4d Added some strings for the enablerecordcache setting. 2006-10-30 15:52:04 +00:00
skodak 1b88c2ef22 Wrong "settings" link in course Administration block on module pages MDL-7286 2006-10-30 14:56:11 +00:00
ethem 0d4057f406 New string: All Pending Orders 2006-10-30 11:22:57 +00:00
ethem 07182b5324 New string: All Pending Orders 2006-10-30 11:12:32 +00:00
skodak 0070770144 Journal Module fixes fro 1.7 MDL-7159 2006-10-30 11:11:34 +00:00
sam_marshall 03240ae37b [MDL-7287] Lesson - tweaked continue.php to include a file via filesystem not HTTP because I couldn't see any reason to do it the latter way and it breaks under our loadbalancing system 2006-10-30 11:00:39 +00:00
ethem 0ee01f0cda Show a link for echeck payments if an user has_capability('enrol/authorize:uploadcsv'). 2006-10-30 10:14:57 +00:00
urs_hunkler 23febf1491 'changed the property to activate the move curser to the new body class drag: body#course-view.drag' 2006-10-30 09:54:25 +00:00
moodler cf299069d4 Added "drag" hook at the page level when dragging is enabled to make sure
the blocks have the right cursor styles.
2006-10-30 09:39:58 +00:00
gbateson b3abd77235 corrected the setting of fixed flag in JMatch quizzes 2006-10-30 08:54:22 +00:00
toyomoyo 45c65f2b7e fixing new gradebookroles settings 2006-10-30 08:43:41 +00:00
ethem 6ef50f6983 Get only courses made transactions. This lessens the course list; Merged from 16stable. 2006-10-30 08:25:41 +00:00
moodler 378d834f44 Made the AJAX setting look a little better when AJAX is off 2006-10-30 08:19:30 +00:00
moodler 9a1e5c1750 FIxed a typo 2006-10-30 07:56:07 +00:00
moodler 6a691a2dba Ooops. how did this get left in? MDL-7281 2006-10-30 07:47:05 +00:00
toyomoyo a44d38fc25 do not delete context information when removing the site course 2006-10-30 06:33:25 +00:00
toyomoyo 826153a73d fixing progress count 2006-10-30 05:39:52 +00:00
toyomoyo 1e76d6529c ignore site level course teacher assignments during upgrade from 1.6 or below 2006-10-30 05:25:53 +00:00
moodler 6dce2448c4 Better default for gradebookroles 2006-10-30 03:56:25 +00:00
toyomoyo 828a4b2350 fix for MDL-6895, adding optional_param, thanks for the patch 2006-10-30 03:45:19 +00:00
toyomoyo 8300665144 fixing keyword pivot by changing into glossarypivot, MDL-7267 2006-10-30 03:36:46 +00:00
moodler 4ccdd406cb Automatic installer.php lang files by installer_builder (20061030) 2006-10-30 03:08:23 +00:00
moodler fc5711d43c Tidied up Metal theme 2006-10-30 02:58:56 +00:00
koenr 1e35150951 MDL-6864 The links 'Language editing' could be more descriptive for 1.7 stable 2006-10-29 22:35:03 +00:00
koenr af6ca730d4 MDL-7042 Missing string on admin/roles/manage.php adding to 1.7 stable 2006-10-29 22:07:54 +00:00
moodler e60154c553 Users not logged in may have capabilities but no id 2006-10-29 15:56:36 +00:00
moodler b2a2b9af0c Slight bump for gradebookroles 2006-10-29 15:06:03 +00:00
moodler a3fcc4d416 Changed gradebook_roles to gradebookroles and fixed storage/defaults for
this setting.   And also better docs.  MDL-7253
2006-10-29 14:59:43 +00:00
moodler 1809c83ef3 Added a string that had been removed - MDL-7258 2006-10-29 13:55:21 +00:00
andreabix 88b5a2a15c Fix bug MDL-7248 2006-10-29 10:07:33 +00:00
moodler ee9534257d Added some help links 2006-10-29 08:13:38 +00:00
moodler 4b612862c7 Merged to stable 2006-10-29 08:09:59 +00:00
moodler 75bf99a13c file permissions.html was added on branch MOODLE_17_STABLE on 2006-10-29 08:09:59 +0000 2006-10-29 08:07:16 +00:00
moodler fd10cafb1a Enable record caching for workshop cron (which is sloow) 2006-10-29 07:22:38 +00:00
moodler 831a8bae99 Extra caching and efficiency in forum_cron 2006-10-29 05:39:26 +00:00
moodler 36b84580e0 Fixed up the appearance of user profiles when access is not allowed 2006-10-29 04:13:32 +00:00
moodler 4bb8788c44 Make regiatration code a bit more unique 2006-10-29 02:32:34 +00:00
stronk7 e8e5f86657 Adding PIVOT as MSSQL reserved word 2006-10-28 23:11:57 +00:00
stronk7 be310ffda8 Now record_cache is controlled by $CFG->enablerecordcache 2006-10-28 19:51:57 +00:00
stronk7 cacc23f041 Moved cache cleaning code near the begin of functions. Sometimes
it wasnt' executed due to function ending. MDL-7196
2006-10-28 17:51:43 +00:00
stronk7 72a4c9a290 Updating backup release to 1.7 final (to avoid forgetting it) 2006-10-28 11:02:09 +00:00
stronk7 5d68b50a62 Improve error output of install_from_xmldb_file(). Part of MDL-7262 2006-10-28 10:36:04 +00:00
moodler 6a1055bf37 Automatic installer.php lang files by installer_builder (20061028) 2006-10-28 03:13:13 +00:00
skodak 67e43279bb fix loginsteps string in moodle.php MDL-7249 2006-10-27 21:47:58 +00:00
skodak 3f4bcbd03a Blog RSS is not being generated MDL-7256 2006-10-27 21:41:36 +00:00
skodak 74acff4411 Finish strings for graderoles MDL-7253 2006-10-27 21:04:44 +00:00
skodak d6a54ada6e Turn AJAX off for now at site level MDL-7254 2006-10-27 20:32:01 +00:00
urs_hunkler d556c2aeaa 'changed top margin for h2 in sideblock content from 0 to 1.5 em' 2006-10-27 17:49:13 +00:00
stronk7 df313f0e94 Counting extra updates performed by Oracle & MSSQL in PERF 2006-10-27 17:48:41 +00:00
urs_hunkler 4d4ef0e0b8 1.7 updates 2006-10-27 17:24:28 +00:00
stronk7 9717970b60 I forgot to globalize $record_cache in delete_record_XXX() functions. 2006-10-27 17:13:36 +00:00
stronk7 4f2ae57c31 Minor improvements to the get_record() cache. Part of MDL-7196
1) Check the cache issset() before unset() it.
2) In the set_field() function, if fieldX = 'id',
   just delete such element from the cache,
   else the whole table
3) Add some more unset() operations against the cache in
   the delete_xxxx() dmllib functions.
2006-10-27 16:51:35 +00:00
sam_marshall 6266a81cf7 MDL-7250 typo ARGH sorry. 2006-10-27 16:26:02 +00:00
sam_marshall d0f6aa914a MDL-7250 update to previous change to do in SQL as suggested 2006-10-27 16:24:26 +00:00
moodler 4c7701a6d9 Made RSS feeds work again for blogs MDL-7251 2006-10-27 16:21:39 +00:00
sam_marshall b1d476b800 MDL-7250 Slight change to load_defaultuser_role so that it doesn't load 0s into $USER->capabilities. 2006-10-27 16:16:35 +00:00
urs_hunkler eae483c5a4 'added min-width: 0; and overflow: hidden; to clearfix to make clearing work in IE7 - better way than previous one.' 2006-10-27 13:30:54 +00:00
skodak 22da58c579 Comments in data print the "by" and then the date but no username MDL-7235 2006-10-27 07:49:25 +00:00
urs_hunkler 9b657e0dec 'corrected the collapsing navbar for IE7. I thought I had corrected that some time ago??? Set the navbar width to 98% and removed those different width settings.' 2006-10-27 07:33:15 +00:00
toyomoyo 8e6f38a406 taking care of a warning 2006-10-27 02:14:20 +00:00
gbateson 537515d8e8 fixed detection and display of fixed JMatch items (in jmt files) 2006-10-27 01:34:08 +00:00
stronk7 3c5f492e9d Deprecating old "upgrade" files. MDL-7214 2006-10-26 22:25:21 +00:00
stronk7 1301de5879 New upgrade.php file added for this module. MDL-7214
Merged from HEAD
2006-10-26 18:18:35 +00:00
stronk7 87698fefb6 file upgrade.php was added on branch MOODLE_17_STABLE on 2006-10-26 18:18:36 +0000 2006-10-26 18:12:43 +00:00
stronk7 7fd096aa14 file upgrade.php was added on branch MOODLE_17_STABLE on 2006-10-26 18:18:35 +0000 2006-10-26 18:12:42 +00:00
stronk7 78dea37dbc New upgrade.php file added for this module. MDL-7214
Merged from HEAD
2006-10-26 17:43:05 +00:00
stronk7 8117a6dc8a file upgrade.php was added on branch MOODLE_17_STABLE on 2006-10-26 17:43:11 +0000 2006-10-26 17:33:45 +00:00
stronk7 866002a1ef file upgrade.php was added on branch MOODLE_17_STABLE on 2006-10-26 17:43:09 +0000 2006-10-26 17:33:44 +00:00
stronk7 c4a0e8dab6 file upgrade.php was added on branch MOODLE_17_STABLE on 2006-10-26 17:43:08 +0000 2006-10-26 17:33:43 +00:00
stronk7 b3f66a5f13 file upgrade.php was added on branch MOODLE_17_STABLE on 2006-10-26 17:43:07 +0000 2006-10-26 17:33:42 +00:00
stronk7 78fb084d02 file upgrade.php was added on branch MOODLE_17_STABLE on 2006-10-26 17:43:06 +0000 2006-10-26 17:33:41 +00:00
stronk7 08f1de55d0 file upgrade.php was added on branch MOODLE_17_STABLE on 2006-10-26 17:43:05 +0000 2006-10-26 17:33:40 +00:00
stronk7 29949f0031 New upgrade.php file added for this module. MDL-7214
Merged from HEAD
2006-10-26 17:04:36 +00:00
stronk7 24dea5f76b file upgrade.php was added on branch MOODLE_17_STABLE on 2006-10-26 17:04:36 +0000 2006-10-26 17:02:31 +00:00
stronk7 f5f53ceb7a New upgrade.php file added for this module. MDL-7214
Merged from HEAD
2006-10-26 16:53:08 +00:00
stronk7 3638683cdd file upgrade.php was added on branch MOODLE_17_STABLE on 2006-10-26 16:53:11 +0000 2006-10-26 16:33:59 +00:00
stronk7 ed1061fd15 file upgrade.php was added on branch MOODLE_17_STABLE on 2006-10-26 16:53:10 +0000 2006-10-26 16:33:51 +00:00
stronk7 fab77ea872 file upgrade.php was added on branch MOODLE_17_STABLE on 2006-10-26 16:53:09 +0000 2006-10-26 16:33:50 +00:00
stronk7 ebb351fa65 file upgrade.php was added on branch MOODLE_17_STABLE on 2006-10-26 16:53:08 +0000 2006-10-26 16:33:49 +00:00
stronk7 c8bf751abf New upgrade.php file added for this module. MDL-7214
Merged from MOODLE_17_STABLE
2006-10-26 15:44:50 +00:00
stronk7 fc10786ff1 file upgrade.php was added on branch MOODLE_17_STABLE on 2006-10-26 15:44:50 +0000 2006-10-26 15:38:18 +00:00
moodler 841c716376 Search engines need to have all the capabilities of a guest user MDL-7229 2006-10-26 14:52:17 +00:00
ethem ca36c9581f I found a new function: user_has_role_assignment() 2006-10-26 14:38:22 +00:00
sam_marshall c03b88f607 The 'Activity is currently hidden' check in mod/forum/post.php incorrectly used 'manageactivities' capability instead of 'viewhiddenactivities', fixing. 2006-10-26 14:12:40 +00:00
skodak abf7820411 fixed breadcrums link 2006-10-26 10:32:54 +00:00
moodler 6cdd66e3c5 Added a top-level cache to has_capability() to make it perform better
in cases where it's called a lot with repetitive values (which happens
a lot in things like forum mailouts) with only a small memory cost.
2006-10-26 09:42:58 +00:00
skodak 316e201245 Cron.php workaround for IE & RFC2616 - MDL-7221 2006-10-26 08:53:59 +00:00
ethem 54c9dab53b get_courses() is only getting visible courses. This is a problem when an user wants to view old payments. 2006-10-26 08:47:48 +00:00
moodler c60272d855 Variation of Sam Marshall's patch to cache simple get_record calls MDL-7196 2006-10-26 07:52:00 +00:00
vyshane d7895072ac Turning ajax off because of backend issues found in rest.php 2006-10-26 07:34:58 +00:00
vyshane 3a1d81851f Some refactoring. 2006-10-26 07:34:13 +00:00
martinlanghoff 3e82837cc0 lib/locallib: changed local db upgrades now xmldb friendly (like lib/db)
Author: Jonathan Harker <jonathan@catalyst.net.nz>
2006-10-26 04:12:49 +00:00
toyomoyo 6f0c99c7a8 fixing a bug where context with override and assignments are adding 2006-10-26 03:56:38 +00:00
moodler 7dbf7695da Automatic installer.php lang files by installer_builder (20061026) 2006-10-26 03:23:28 +00:00
stronk7 0c64299b01 First model of new upgrade.php scripts and comments in old ones.
Need validation before extending them everywhere across core. MDL-7214
2006-10-25 23:26:54 +00:00
skodak 70f97a5995 MDL-7190 fixed wrong closing ) in cache md5 calculation, sorry! 2006-10-25 23:16:44 +00:00
skodak a9530ec147 MDL-7137 permission UI improvements merged into role overrides; s() used instead of htmlentities() 2006-10-25 21:17:33 +00:00
skodak fe5cf88b17 editting of permissions enabled when adding new role MDL-7137 2006-10-25 19:19:20 +00:00
moodler 9f79ed8a3c More rogue AS keywords MDL-7207 2006-10-25 09:02:30 +00:00
moodler 868d207889 Removed use of table as xxx MDL-7207 2006-10-25 08:50:25 +00:00
toyomoyo c28941370e added new config variables for what roles to be displayed in gradebooks. It is accessbile from admin->appearance->gradebookroles. 2006-10-25 08:49:54 +00:00
moodler 5c0cd26dbf ALtered new SQL in load_user_capability to make it more friendly with MS SQL 2006-10-25 08:33:40 +00:00
moodler 8e9aa7d060 Just some tidy-ups, removed redundant SITEIDs etc 2006-10-25 08:31:09 +00:00
skodak 49cb76f312 fixed add new blog entry and tag edit in blog block 2006-10-25 08:16:36 +00:00
toyomoyo d91d2fa6d3 use limited fields instead of u.* 2006-10-25 07:19:30 +00:00
martinlanghoff 20dbeadfb3 auth/fc/config.html: cleanup double newlines (leftover from whitespace cleanup) 2006-10-25 06:13:51 +00:00
moodler 8ed24b7dda Fixed CAS login to use new roles ... see MDL-6931 2006-10-25 05:46:12 +00:00
toyomoyo 1ca7a8001b fix for load_user_capability() when 2 contexts in overrides are not related 2006-10-25 03:47:05 +00:00
skodak 5aab521e4d better cleaning of rss feeds SC#328 2006-10-24 22:38:53 +00:00
skodak a1332df845 Strip ##TRUSTTEXT## when not in developer debug mode MDL-7190; minor format_text speedup; changed in md5 text cache calculation 2006-10-24 22:18:19 +00:00
stronk7 eb2d09c49c DeLIMITing Moodle core. Now the new $limitfrom,
$limitnum parameters are used instead. MDL-7168
2006-10-24 21:55:54 +00:00
skodak e2c0f78d63 select_color.php popup should specify charset MDL-7193 2006-10-24 21:37:36 +00:00
skodak d7440e481e Lang file for auth specifies incorrect file path in lang/en_utf8/auth.php MDL-7205 revisited - new patch by Martin Langhoff 2006-10-24 21:28:55 +00:00
skodak 5fd7a8cc89 Lang file for auth specifies incorrect file path in lang/en_utf8/auth.php MDL-7205 - found by Inaki Arenaza 2006-10-24 20:48:32 +00:00
skodak 7429a293b7 fixed When unassigning a role, forum_role_unassign unsubscribes the user even if you have other roles there MDL-7120 2006-10-24 20:20:50 +00:00
stronk7 a31fec1556 Dropping some hardocded "mdl" prefixes. MDL-7202 2006-10-24 18:27:31 +00:00
moodler a8cecdc232 It's OK to be a guest when looking at a discussion :-) 2006-10-24 15:55:52 +00:00
moodler b0d3c33001 Guests should always see two days of recent activity 2006-10-24 14:35:22 +00:00
vyshane b3ede2a6f5 Modified course page print_header function to accept more arguments. Needed for the AJAX course formats. 2006-10-24 09:40:48 +00:00
moodler a804689232 QUick checkin of some roles GUI improvements from Petr which I hacked on 2006-10-24 09:39:36 +00:00
vyshane 62e0242116 AJAX config for course format. 2006-10-24 08:15:09 +00:00
vyshane 0321eb66d0 AJAX config for course format 2006-10-24 08:14:09 +00:00
vyshane 604c996ca6 AJAX fixes. 2006-10-24 08:07:56 +00:00
skodak ba7b72a53d fixed risks associated with capabilitites in modules MDL-7174 2006-10-24 08:04:53 +00:00
skodak 077b7e99c1 fixed risks associated with main capabilitites MDL-7174 2006-10-24 08:00:32 +00:00
moodler 7099595c4d FIxed problem which was unenrolling some assigns at the site level! MDL-7189 2006-10-24 07:06:56 +00:00
toyomoyo e723db1680 fixing capabilities 2006-10-24 04:26:06 +00:00
vyshane 19043b2c61 Changed <noscript> to <div> since document.getElementById() can't seem to be able to access the <noscript> element in safari, and possibly in IE as well. See bug MDL-7057. 2006-10-24 03:25:48 +00:00
moodler 97b0c002ec Make the glossary block deal with trust text 2006-10-24 02:35:29 +00:00
moodler 3c9367fb62 Guests can't enrol. MDL-7182 2006-10-24 02:12:26 +00:00
toyomoyo a064e86c8b blog tag clean up 2006-10-24 02:09:45 +00:00
stronk7 f0cb717a7e Moving deprecated uses of sql_paging_limit() to the new $limitfrom,
$limitnum parameters in all the get_recordXXX() functions. MDL-7167
2006-10-23 22:56:41 +00:00
skodak ed14ae8128 fixed moodle/calendar:manageentries capability in calendar 2006-10-23 22:27:17 +00:00
skodak 05888cfc84 Assignment Reports incomplete MDL-6301 2006-10-23 21:01:41 +00:00
skodak cca1df961b Excel export returns a zero bytes file when system temp not writable MDL-7176 2006-10-23 19:25:13 +00:00
skodak fb4f768789 error message when adding a link in editor MDL-7180 2006-10-23 18:30:13 +00:00
stronk7 1fda1af9d2 Now insert_record() is using $db->GenID() to retrieve
sequence numbers for Oracle. Just wondering if the same
function should be used by PostgreSQL too.
2006-10-23 17:38:47 +00:00
stronk7 6d338ba5f9 Suppress all the uses of LIMIT in the get_field_sql() calls. MDL-7173 2006-10-23 15:55:22 +00:00
moodler 63d4e986d0 This new function called load_all_capabilities() should be used whenever
you want to completely reload the capabilities for the current user.

Basically it will deal nicely with the default site-wide permissions
depending on the current user.

More background in the comments on MDL-6963
2006-10-23 15:14:23 +00:00
moodler 9595f6a388 FIxed some rogue &nbsp characters (thanks, Samuli!) MDL-7179 2006-10-23 13:41:27 +00:00
moodler c50d4d9039 Make sure that guests see the button to add a new discussion (it will
prompt them to enrol later)
2006-10-23 13:19:46 +00:00
skodak 1a5d7ed12e Checkbox value not saved when saving changes from admin search page MDL-7177 + other fixes to make it behave more like settings.php 2006-10-23 12:04:30 +00:00
skodak e18bb176e1 yet another context fix for Roles tab - I hope this one is final 2006-10-23 11:26:12 +00:00
skodak 42fd053ddc glossary tabs (when updating a glossary) is not aligned properly MDL-7172 2006-10-23 11:16:26 +00:00
moodler d873273749 Several little fixes for online users
Guest user appears in local language and no links

sql_paging_limit not used
2006-10-23 07:42:49 +00:00
stronk7 cba3313110 strip "old" harcoded "limit" clauses from the sql passed and
debug about them. MDL-7173
2006-10-23 07:09:51 +00:00
moodler 122ea396cf Tidied up Choice a bit and now you can save choices again ;-) 2006-10-23 07:00:29 +00:00
moodler 1b068b9049 FIxed guest enrolment using course key MDL-6881 2006-10-23 06:37:06 +00:00
moodler 8069349d65 Fix strange zero lines in stats ... I thought the function above was supposed
to do that?   Penny, help!    MDL-7151
2006-10-23 05:17:38 +00:00
moodler 1de8317f92 Better handling for guest in forums MDL-7125 2006-10-23 04:53:56 +00:00
moodler 0ff7b38264 FIxed a bad capability ratepost -> rate 2006-10-23 03:28:53 +00:00
toyomoyo 9fc48040ba replacing studentcanpost with proper capability 2006-10-23 03:22:23 +00:00
moodler 1752044872 Unenrol now does the right thing after you unenrol yourself 2006-10-23 03:09:11 +00:00
moodler 685ecea312 Automatic installer.php lang files by installer_builder (20061023) 2006-10-23 03:03:57 +00:00
moodler ef90bd2c06 Improvements to the logic used when displaying choices and coping with
guests and various permission combinations    MDL-7171
2006-10-23 02:58:21 +00:00
toyomoyo bcf99ba3b9 replacing studentcanpost with capability 2006-10-23 02:48:24 +00:00
toyomoyo 48e385f582 student_can_post should be done properly using capabilities 2006-10-23 02:24:28 +00:00
stronk7 f9baa9c1cc Prevent MSSQL to return from insert_record() before
trying to execute the updating of LOBs.
2006-10-23 00:00:46 +00:00
stronk7 564f9b03e6 Debugging sql_paging_limit() as deprecated and
enforcing get_field_sql() to return 1 record max
2006-10-22 23:20:14 +00:00
stronk7 a270bb477a Killing all sql_paging_limit() uses 2006-10-22 22:57:27 +00:00
stronk7 23f4b83ec6 Killing all sql_paging_limit() uses 2006-10-22 22:47:58 +00:00
stronk7 28c5a47afc Adding limitfrom and limitnum parameters to a bunch of
rarely executed functions...
2006-10-22 22:35:26 +00:00
skodak b52e9a106c fixed incorrect context in user Outline report 2006-10-22 20:02:00 +00:00
skodak 0d2fdd9cd9 fixed $usercontext creation needed for Role tab when viewing user data 2006-10-22 19:58:06 +00:00
skodak 591234f350 fixed sql error when searching only by one letter and two radio buttons selected at the same time (visible in Konqueror) fixed as part of MDL-7160 2006-10-22 19:41:07 +00:00
skodak 1b2f2b82f0 fixed moodle/site:readallmessages MDL-7160 ; commented out unfinished buggy code 2006-10-22 19:17:48 +00:00
moodler 85e21f03a1 FIxed this script to match prtin_recent_activity MDL-7134 2006-10-22 08:29:50 +00:00
moodler 864dbb4ae7 Fixed a missing </span> 2006-10-22 08:25:19 +00:00
moodler 247475fc9f Fixed some HTML errors about & 2006-10-22 08:18:46 +00:00
moodler 2fb18d1cdc FIxed some HTML warnings 2006-10-22 08:12:14 +00:00
moodler 74f65d5ef6 FIxed some HTML warnings & -> &amp; 2006-10-22 08:11:55 +00:00
moodler 3443f0a7b2 Removed a HTML warning & --> &amp; 2006-10-22 07:59:04 +00:00
moodler ab05be1a23 Recent activity now again shows all the activity since your last session in
the course.   MDL-7134
2006-10-22 07:40:51 +00:00
moodler 0aba3fd198 Automatic installer.php lang files by installer_builder (20061022) 2006-10-22 03:11:23 +00:00
skodak 2466ff5d77 Seeing ####TRUSTTEXT#### in RSS feeds MDL-7147 - fixed RSS feeds in glossary 2006-10-21 21:14:30 +00:00
skodak fc0966ba1f Seeing ####TRUSTTEXT#### in RSS feeds MDL-7147 - fixed RSS discussion feed type too 2006-10-21 21:04:29 +00:00
skodak 83e674cd7f fix has_capability() to work when $nomoodlecookie = true; MDL-7156 - needed for RSS file.php that is serving feeds 2006-10-21 20:41:41 +00:00
skodak 9468a32a8e fixed undefined modcontext in forum 2006-10-21 20:29:30 +00:00
stronk7 01cd957389 Deleting some old oci8po files from CVS. 2006-10-21 18:31:00 +00:00
stronk7 d0d30cb9a0 Prevent add_field() to work if we are adding one not null field
to one non-empty table without specifying its default value.
2006-10-21 18:18:24 +00:00
stronk7 3bbc55a650 Added two more tests:
- To check adding numerial fields not null + default = 0
- To test set_field() with TEXT data
2006-10-21 17:22:31 +00:00
stronk7 0f1d2d8c94 Minor typo fixed. 2006-10-21 17:17:44 +00:00
moodler da8b22453c Fix for the My courses list (remove things you might be able to access but
aren't really enrolled as such)
2006-10-21 16:32:10 +00:00
stronk7 d490ba1476 One typo (!==) was preventing defaults to be properly calculated for integers.
Thanks to Nigel McNie for being on that!
2006-10-21 16:31:44 +00:00
moodler 408a5a1b03 Fix for the My courses list (remove things you might be able to access but
aren't really enrolled as such)
2006-10-21 16:30:23 +00:00
moodler 0ec5eaa5ca LAMS is now disabled by default so it doesn't confuse the heck out of
everyone.
2006-10-21 16:10:07 +00:00
moodler e4173bf72a Fixed a notice (not important) 2006-10-21 15:59:23 +00:00
moodler 55a96b2f3e Please please please be defensive about values returned from the database. Always.
In this case moodle.org had some bad data that caused this code to crash.

MDLSITE-55
2006-10-21 14:51:56 +00:00
moodler 1a42831794 Strip trusttext markers from text ... MDL-7147
Petr, can you review the whole thing?
2006-10-21 14:11:33 +00:00
moodler 571acdabaa Automatic installer.php lang files by installer_builder (20061021) 2006-10-21 03:03:54 +00:00
moodler f7396c7867 WHen a guest hits reply, they now get told they have to enrol and
get sent there.   In manual enrolment they are returned to the post
(eventually all the plugins should do that).
2006-10-20 17:48:59 +00:00
moodler c1bfa6076c Enrol/unenrol buttons in courses 2006-10-20 17:47:14 +00:00
moodler f9e8f1118d Exclude admins from the participant listing (site-wide doanything people)
(related to MDL-7117)
2006-10-20 08:25:39 +00:00
toyomoyo 8d1ea9fbed fix for MDL-7119, users with no role assign capability should not see roles tab 2006-10-20 08:09:09 +00:00
moodler 9197f258b9 Added Javascript, CSS etc on edit page for database. MDL-7100 2006-10-20 07:34:14 +00:00
toyomoyo bbaae076fa fix for MDL-7106, glossary capability check 2006-10-20 07:00:49 +00:00
moodler 7ba21c9f41 CHanged default capability for database to allow guests to view by default
MDL-7118
2006-10-20 06:58:28 +00:00
moodler 8f211852b7 New automatic installer lang file added (from HEAD) 2006-10-20 06:55:03 +00:00
moodler 0a1dc0b126 file installer.php was added on branch MOODLE_17_STABLE on 2006-10-20 06:55:03 +0000 2006-10-20 06:52:11 +00:00
moodler 104b23ff7f I've fixed how the forums look when guest is logged in, so that they
see the Reply link and if they press it get asked to log in properly.
2006-10-20 06:07:33 +00:00
toyomoyo d7355da165 fix for MDL-7115, teacher page replaced by generic role assign page 2006-10-20 05:47:49 +00:00
moodler 64a985181b Link to roles interface needs site context, not site id 2006-10-20 05:17:39 +00:00
moodler 9fb2199303 Don't let people message the user account 2006-10-20 05:14:12 +00:00
toyomoyo 0e4429dfec fixed an infinite loop 2006-10-20 05:08:42 +00:00
moodler 09a47d4232 Slight tidy-up for forum search form 2006-10-20 03:33:18 +00:00
vyshane f39c91312f Formatting fixes. 2006-10-20 03:16:40 +00:00
toyomoyo f0769c5367 fix for MDL-7107, missing capability check for assignroles link 2006-10-20 03:14:49 +00:00
moodler 68199074d8 Automatic installer.php lang files by installer_builder (20061020) 2006-10-20 03:05:31 +00:00
toyomoyo 8807ea9497 fix for MDL-7113, removing DISTINCT on TEXT fields 2006-10-20 02:43:32 +00:00
toyomoyo 60061f9d34 setting $CFG->unicodedb after successful db conversion, chaning order of if clause to save sqls executed 2006-10-20 02:07:00 +00:00
skodak 4cbb779866 temporary patch for the forum trouble that is breaking installs MDL-7114 2006-10-19 22:42:44 +00:00
skodak 7add89d356 fixed rolesactive notice during installation 2006-10-19 22:17:12 +00:00
skodak a3faf996f5 Internal zipping broken on win32 MDL-7105 ; we are now using the new method to specify file names in zip archive because the old PCLZIP_OPT_REMOVE_PATH option is broken on win32 platforms ; backported from HEAD 2006-10-19 22:14:42 +00:00
stronk7 1dd6d5a8a2 Adding support for the new mssql_n driver 2006-10-19 22:12:55 +00:00
stronk7 c4020445c4 Adding support for the new mssql_n driver 2006-10-19 22:01:56 +00:00
stronk7 3b455ec7d2 New ADOdb driver that extends the standard mssql one. All it does is
to prepend the 'N' char before any SQL literal sent to DB, mainly
because nobody (ODBTP, FreeTDS, ODBC, SQL*Server) seems to be doing
this task, and it prevents, in an high degree true cross-db compatibility.

Once we've moved to prepared statements and some of the developers for
any of the products above (hopefully MS, at server level) will avoid
the 'N', we'll be able to go back to another mssql drivers.

More info at:
  - http://docs.moodle.org/en/XMLDB_Problems (point 8)
  - http://tracker.moodle.org/browse/MDL-6877

Merged from HEAD
2006-10-19 21:58:54 +00:00
stronk7 760f271b07 file adodb-mssql_n.inc.php was added on branch MOODLE_17_STABLE on 2006-10-19 21:58:54 +0000 2006-10-19 21:57:23 +00:00
stronk7 bf28e6d08a Adding support for the new mssql_n driver
Two new strings added: mssql_n, databasesettingssub_mssql_n
One string modified: databasesettingssub_mssql
2006-10-19 18:55:39 +00:00
stronk7 13f366f87b Adding support for the new mssql_n driver 2006-10-19 18:44:07 +00:00
stronk7 c9c2c6df00 Adding support for the new mssql_n driver 2006-10-19 18:28:05 +00:00
stronk7 ba1fa71220 Addding support for the new mssql_n ADOdb driver that,
transparently, prepends the N char for all the string
literals being set to MSSQL (until MS Unicode - standard-
support will arrive).
2006-10-19 17:26:09 +00:00
thepurpleblob 08afbd8644 Focus is now loaded into Name edit box 2006-10-19 13:05:09 +00:00
tjhunt 3e1a16bbbc Fix problem with multichoice question grading. 2006-10-19 11:54:05 +00:00
tjhunt 2620831e61 Missing addslashes. 2006-10-19 10:22:38 +00:00
toyomoyo 040c22892d fix for MDL-6549, wrong publish to menu problem 2006-10-19 06:41:04 +00:00
toyomoyo 43059890b7 making the site context same as the site course context 2006-10-19 06:15:42 +00:00
vyshane 03796898f6 Fix for MDL-7086.
Some versions of IE choke if the second argument of insertBefore() is null. The code in section_class.prototype.insert_resource() wrongly assumed that the value of targetel would be null if that parameter was not passed to the function. The value is actually 'undefined' in this case. The checks that relied on comparison with null were therefore failing in IE (but worked fine in other browsers anyway). Two problems - wrong assumption in code, and IE being stupid.
2006-10-19 04:29:55 +00:00
moodler ecaa25ff09 Automatic installer.php lang files by installer_builder (20061019) 2006-10-19 03:03:48 +00:00
toyomoyo 9a055d09c9 adding check to change_db_encoding to make sure the db is not already in unicode. attempts to configure correct set names upon successful conversion 2006-10-19 02:13:32 +00:00
skodak c95fff4fa9 Delete user fails if apostrophe in email address MDL-4762 ; found and solution provided by Inaki Arenaza 2006-10-18 21:45:10 +00:00
skodak 324480d4b2 fixed access check when editting notes in advanced upload assignment type 2006-10-18 21:32:50 +00:00
skodak 4d4a11fd68 fixed Notices after assignment deletion in Recent Activity MDL-7089 2006-10-18 21:01:25 +00:00
skodak 89a8bdc8cc improved validation when deleting comments from glossary SC#325 2006-10-18 20:20:18 +00:00
skodak 8a2bccf264 Notice when creating one forum... MDL-7063 2006-10-18 19:58:13 +00:00
skodak f697f01e35 changed email obfuscation character to * MDL-6935 2006-10-18 19:40:27 +00:00
thepurpleblob 976fe7c655 Put cursor in edit box rather than do nothing for labels. 2006-10-18 13:02:53 +00:00
ethem e6ecbb498b Show results and send email to admin. 2006-10-18 12:38:44 +00:00
skodak 37e6138a3c Deleting uploaded files when deleting an assignment instance + fixed quoting style + trailing whitespace MDL-6387 2006-10-18 11:13:32 +00:00
skodak e7514ae3f1 Deleting uploaded files when deleting an assignment instance + fixed quoting style MDL-6387 2006-10-18 11:12:49 +00:00
skodak 81f9b42660 Deleting uploaded files when deleting an assignment instance MDL-6387 2006-10-18 11:11:53 +00:00
vyshane 7c5bebadf1 More IE timing issues 2006-10-18 09:43:12 +00:00
skodak d1a0531ca4 fix course reset unenrollment in to work with roles MDL-7069 2006-10-18 09:18:36 +00:00
vyshane 5f536e23ed Because IE is stupid. 2006-10-18 08:39:34 +00:00
toyomoyo 16d42c3776 fix for MDL-7067, proper capability for forum attachments 2006-10-18 08:00:00 +00:00
toyomoyo ca108ade8d fix for MDL-7066, users with replypost set to prohibit can not edit own post 2006-10-18 07:49:13 +00:00
vyshane 8997698305 Logger has issues with IE. Turning off first until new version of YUI has been tested. 2006-10-18 07:41:32 +00:00
toyomoyo 9cb996a977 added code to force chaging of mysql db to utf8 before fresh installation 2006-10-18 07:24:49 +00:00
vyshane 6f7fcae9f2 Removed YUI debug since this is handled in lib/ajaxlib.php 2006-10-18 07:09:54 +00:00
vyshane 44089f2cb4 Removed YUI debug since this is handled in lib/ajaxlib 2006-10-18 07:09:22 +00:00
vyshane 5140419a14 Added YUI logger console if debugging level is DEBUG_DEVELOPER. 2006-10-18 07:06:39 +00:00
vyshane d0bc1c59ae .error class is defined in Moodle as red colour. We want it to be black here because the yui error class has a red backgroun. 2006-10-18 07:02:58 +00:00
toyomoyo f3726ba3b2 fix for MDL-7055 - prohibts at site level not working 2006-10-18 06:44:45 +00:00
toyomoyo e1079fc4f1 fix for MDL-7065 adding translation string for breadcrumb 2006-10-18 05:40:39 +00:00
moodler a8500a96f8 Automatic installer.php lang files by installer_builder (20061018) 2006-10-18 03:04:33 +00:00
stronk7 325bbaaa17 Now insert/update/set of BINATY fields is supported by MSSQL
(and easier to add new DB in the furure) MDL-7062
2006-10-17 23:34:52 +00:00
stronk7 12961dfd4d Added 4 more tests to check CLOB/BLOB handling across all DBs. MDL-7062 2006-10-17 23:28:08 +00:00
tjhunt c646026617 MDL-6315 - Manually grading a question 0 marks was not being registered. I took the opportunity to clean up the logic in this function a bit. Merged from MOODLE_16_STABLE. 2006-10-17 23:21:24 +00:00
tjhunt 6dfa18dff6 MDL-6848 - Display problem with < > characters in shortanswer when outputting the correct answer. Merged from MOODLE_16_STABLE. 2006-10-17 22:17:05 +00:00
tjhunt 269a213980 MDL-6386 - stripslashes missing in multianswer qustions. Thank to Joseph Rezeau. Merged from MOODLE_16_STABLE. 2006-10-17 22:01:13 +00:00
tjhunt 311a061ce1 MDL-7054 - Prevent creation of question categories with blank names. Merged from MOODLE_16_STABLE. 2006-10-17 21:42:50 +00:00
skodak f152f333d0 fixed role_capabilities table name typo 2006-10-17 21:39:59 +00:00
skodak 24ec651269 Fix forum reset - remove "DELETE .. USING ... " mysqlisms MDL-7053 2006-10-17 21:05:34 +00:00
skodak 8abe956ca8 Automatic deletion of users when deleteunconfirmed is setted to 'never' MDL-6726 2006-10-17 20:42:49 +00:00
skodak 8e1ae566f2 Activitynames filter case insensitive again for non-ascii languages MDL-6054 - I hope it will not be choking on invalid UTF-8 data 2006-10-17 19:45:34 +00:00
skodak b0b359cd73 Broken longtimenosee option - PHP notice errors during cron MDL-7058; found and solution submitted by Jenny Gray 2006-10-17 19:15:38 +00:00
skodak 1ad395e023 moodle.php strings for log file restore needs some fix - xhtml compliance and removed \n - MDL-7056 again :-( 2006-10-17 18:52:19 +00:00
skodak b1e07b8879 moodle.php strings for log file restore needs some fix - xhtml compliance and removed \n - MDL-7056 2006-10-17 18:50:20 +00:00
stronk7 4d78c38a37 Fixed typo that was preventing correct BLOB storage under Oracle. 2006-10-17 18:29:35 +00:00
tjhunt bb9cae5afc MDL-6760 - cannot insert the string 'null' into the database. You can now. 2006-10-17 15:58:00 +00:00
tjhunt 9051e08619 Fix bug with numerical questions with multiple answers. 2006-10-17 15:56:40 +00:00
thepurpleblob cec1b35f86 fix for bug MDL-7070. Form focus not defined 2006-10-17 12:40:26 +00:00
tjhunt 2fe45c4a0a Fix bugs with GIFT import. 2006-10-17 10:51:44 +00:00
moodler b40e18c325 Cleaned up some navigation when posting 2006-10-17 09:07:26 +00:00
moodler d72975122f Fixed slashes problem on re-editing new post MDL-7052 2006-10-17 08:58:00 +00:00
vyshane 7508d0918f Merged from 1.6. Fixes for MDL-6363 2006-10-17 07:19:19 +00:00
skodak a91a3c5c79 RSS update and caching broken for some feeds MDL-7045 2006-10-17 07:07:37 +00:00
skodak a30e48bc6a Typo improvement in assignment.php string MDL-7046 2006-10-17 06:28:00 +00:00
toyomoyo 6cb0f10970 fix for MDL-6884 2006-10-17 06:24:54 +00:00
vyshane a0de778c07 Added browser check for AJAX 2006-10-17 05:31:36 +00:00
toyomoyo b866247504 fix for MDL-6968 2006-10-17 05:18:02 +00:00
toyomoyo 33dc359ccc proper fix for MDL-6926 2006-10-17 04:45:21 +00:00
toyomoyo 9b6c468b16 fix for MDL-6926 2006-10-17 04:37:18 +00:00
vyshane de028f7715 Added marker that shows the new position of a resource/activity being moved. Part of the fix for MDL-6991. 2006-10-17 03:57:42 +00:00
moodler 4be0a0c1b5 Automatic installer.php lang files by installer_builder (20061017) 2006-10-17 03:06:23 +00:00
stronk7 7873f331ea Added one more XMLDB test for find_sequence_name() 2006-10-16 17:56:30 +00:00
stronk7 f8961f9bc0 Added support for getSequenceFromDB() to PG. 2006-10-16 17:33:24 +00:00
tjhunt d0949f39e9 Changes to dmllib seem to have broken quiz backup. This makes it work again. 2006-10-16 14:53:34 +00:00
tjhunt 042699bf23 Related to MDL-6249 - unit tests for address_in_subnet. 2006-10-16 13:40:19 +00:00
tjhunt 49163d4fb6 MDL-6249 - easier way for human beings (as opposed to network engineers) to specify IP ranges. 2006-10-16 13:35:51 +00:00
urs_hunkler 6ad9639961 'changed the body border due to a YUI bug and added Bitstream Vera Serif for better display in Linux browsers. It looks better than Georgia on Windows ;-)' 2006-10-16 12:24:44 +00:00
urs_hunkler 694c70e8e6 'changed the body border due to a YUI bug and added Bitstream Vera Serif for better display in Linux browsers. It looks better than Georgia on Windows ;-)' 2006-10-16 12:16:42 +00:00
tjhunt 4398b01077 MDL-6650 - Previewing individual random questions from the quiz editing screen was not working, and anyway, I'm not sure it makes any sense, so I removed that preview link. 2006-10-16 11:04:18 +00:00
thompson697 95df21e3ae Apply modularity to the creation of the log file during restore to a new course.
Remove the responsibility for loging the application of the course start date offset,
from activity modules to the backup module.
2006-10-16 10:40:48 +00:00
tjhunt 6fe671e94a MDL-6984 - Problem with Blackboard 5 import in PHP5. Fix based on a suggestion from Arthur Manning. Merged from MOODLE_16_STABLE. 2006-10-16 10:13:38 +00:00
ethem 92fa909b5e + New consts for authorize_action() function:
* AN_RETURNZERO: No connection was made on authorize.net.
  * AN_APPROVED: The transaction was accepted.
  * AN_DECLINED: The transaction was declined.
  * AN_REVIEW: The transaction was held for review.

+ Fix: Speacial handling for echecks: REVIEW; 'Under Review', 'Approved Review', 'Review Failed'
+ New feature: Upload a CSV file for echecks (capability: enrol/authorize:uploadcsv level: user)
+ New feature: Search payments by orderid and transid
+ New function: send_welcome_messages()

merged from 17stable.
2006-10-16 09:43:15 +00:00
ethem 7b23572651 + New consts for authorize_action() function:
* AN_RETURNZERO: No connection was made on authorize.net.
  * AN_APPROVED: The transaction was accepted.
  * AN_DECLINED: The transaction was declined.
  * AN_REVIEW: The transaction was held for review.

+ Fix: Speacial handling for echecks: REVIEW; 'Under Review', 'Approved Review', 'Review Failed'
+ New feature: Upload a CSV file for echecks (capability: enrol/authorize:uploadcsv level: user)
+ New feature: Search payments by orderid and transid
+ New function: send_welcome_messages()
2006-10-16 09:26:04 +00:00
ethem e9369e5282 + New consts for authorize_action() function:
* AN_RETURNZERO: No connection was made on authorize.net.
  * AN_APPROVED: The transaction was accepted.
  * AN_DECLINED: The transaction was declined.
  * AN_REVIEW: The transaction was held for review.

+ Fix: Speacial handling for echecks: REVIEW; 'Under Review', 'Approved Review', 'Review Failed'
+ New feature: Upload a CSV file for echecks (capability: enrol/authorize:uploadcsv level: user)
+ New feature: Search payments by orderid and transid
+ New function: send_welcome_messages()
2006-10-16 09:09:14 +00:00
skodak 74b0c7ac01 MDL-6444 Typo in Course/Report/Participation/index.php, patch by Stephen Bourget 2006-10-16 09:05:48 +00:00
skodak e01a96ef15 reverting moved $SITE reinitialisation into setting method, it was not a good idea after all 2006-10-16 08:52:52 +00:00
skodak 00d69809d4 backported new adodb 4.93 from HEAD 2006-10-16 08:42:51 +00:00
skodak 02d7853dab MDL-6985 Role Short name cannot be modified 2006-10-16 08:33:45 +00:00
skodak 7f5f0ae62b fixed error message when empty site full or short name - moved $SITE reinitialisation into setting method 2006-10-16 07:52:52 +00:00
skodak b5a814308a PARAM_MULTILANG is now alias of PARAM_TEXT 2006-10-16 07:45:32 +00:00
skodak f22675fed9 fixed error message when empty site full or short name 2006-10-16 07:35:12 +00:00
skodak 1f45359727 moved header after the redirects and require_logout 2006-10-16 06:51:08 +00:00
moodler 7fe0a5d596 Automatic installer.php lang files by installer_builder (20061016) 2006-10-16 03:06:22 +00:00
vyshane e83bdb2c03 Removed 'student' from lang string for module visibility. 2006-10-16 02:52:15 +00:00
vyshane 3b253287d7 Removed 'student' from lang string for module visibility 2006-10-16 02:51:38 +00:00
vyshane bf252c1d4a Added rebuild_course_cache() call when a resource is deleted. Related to MDL-6912. 2006-10-16 02:42:59 +00:00
danmarsden cf0d9e996b Fix for MDL-6550 - patch from Graeme Byrne thanks! :-) 2006-10-15 23:59:18 +00:00
stronk7 670eea76db New block upgrade functions must be called:
xmldb_block_BLOCKNAME_upgrade()

Part of MDL-6786, just for consistency.
2006-10-15 23:02:07 +00:00
stronk7 59359cde79 Now set_field() supports Oracle LOBs. Better error handling of oracle_update_lobs() 2006-10-15 20:11:14 +00:00
stronk7 2794229c55 Now update_record() supports LOBs under Oracle. Plus prevent empty objects to be updated. 2006-10-15 19:37:58 +00:00
stronk7 626caefd89 Minor changes + debug info in UpdateXlob() 2006-10-15 18:34:38 +00:00
stronk7 6880e3bb16 - Introducing the first version of the new mssql_n adodb driver (not finished, just for experimenting).
- Now insert_record() is handling Oracle CLOBS and BLOBS properly (really annoying the number of hacks needed).
- Creating one new global object to cache $db->MetaColumns() calls per request, because it's being used
in a lot of places inside dmllib.
TODO: hack update_record() and set_field() to allow Oracle LOBs
      enclose all the Oracle function calls into one db transaction
2006-10-15 16:38:22 +00:00
moodler ed0dd58cf2 Automatic installer.php lang files by installer_builder (20061015) 2006-10-15 03:03:20 +00:00
moodler 1c52f98506 Removed fucks 2006-10-14 07:27:30 +00:00
moodler 5aac129459 Automatic installer.php lang files by installer_builder (20061014) 2006-10-14 03:05:28 +00:00
stronk7 43efbf3deb Now admin/index.php checks for proper prefixes (MDL-6230) 2006-10-13 23:47:19 +00:00
gustav_delius 408964a73b When javascript was turned off the group menu did not work because the Go button linked to course/view.php rather than mod/forum/view.php 2006-10-13 23:28:09 +00:00
stronk7 b0c015e156 Now installer:(MDL-6823)
- performs Oracle charset checks (both client and server)
- prefix checks
- shows differnt information foreach DB flavour
- provide one link to Moodle Docs for MSSQL and Oracle
- the ODBC connector has been marked as experimental due
  to confirmed problems by MS
2006-10-13 18:18:44 +00:00
stronk7 b47138f834 Some more strings added to the installer to make it more resposible. 2006-10-13 17:22:14 +00:00
stronk7 40652b156b Added new strings for DB select/configure. 2006-10-13 11:32:42 +00:00
nfreear afa39a8fa8 Fixes bug MDL-6896, "Global search block - relative form URL broken". Merged from MOODLE_17_STABLE branch. 2006-10-13 09:15:24 +00:00
moodler c52128df17 Automatic installer.php lang files by installer_builder (20061013) 2006-10-13 03:06:54 +00:00
toyomoyo c0234d300b fix warnings during restore 2006-10-13 02:53:03 +00:00
stronk7 ddc35e5bd5 First cut of the modified installer. TODO:
- Create the new databasesettingssub_XXXX strings with info foreach db.
- Check prefix rules (mandatory to everybody but MySQL and no longer than 2cc for Oracle
- Ignore "database" for odbc_mssql driver
- Check "oci8po" DB character set
- Beautify the strings showed in the popupmenu (Oracle, SQL*Server....) instead of
  showing the driver name
2006-10-12 17:42:42 +00:00
moodler fb904d1889 Automatic installer.php lang files by installer_builder (20061012) 2006-10-12 12:36:10 +00:00
stronk7 5d7850d42e Small change in rename_field() so objects won't become modified at all
in the process.
2006-10-12 12:25:03 +00:00
toyomoyo 52657c4298 fixing warnings 2006-10-12 08:32:16 +00:00
toyomoyo bd2930f2b1 fixing warnings 2006-10-12 08:25:46 +00:00
toyomoyo 6cebd028b9 fixing warnings during restore 2006-10-12 08:01:27 +00:00
toyomoyo 1e006c3d5f removing warnings during restore 2006-10-12 07:32:29 +00:00
moodler d5ebb85dce Made the page a lot friendlier when you access a course in a switched Guest role.
MDL-6885 has details
2006-10-12 07:27:18 +00:00
vyshane be653a00cc Some cleanups (mostly formatting). 2006-10-12 07:08:16 +00:00
moodler a1dfc10135 Documentation for stable branch numbering 2006-10-12 07:05:49 +00:00
toyomoyo e67dfebaca fixing notices 2006-10-12 06:57:39 +00:00
toyomoyo 33a9f3495e fixing warnings during restore 2006-10-12 06:12:00 +00:00
moodler e1f8632d26 Added some tooltips to the role buttons to help when you down the bottom of
the list and can't see the headings.   MDL-6886
2006-10-12 03:54:48 +00:00
toyomoyo 82192c1bd8 fix warnings during restore 2006-10-12 03:36:13 +00:00
toyomoyo b59efda13c fixing warnings during restore 2006-10-12 03:30:00 +00:00
moodler 044f9df97e Saving settings is now faster (no redirect), and you get better feedback on errors. 2006-10-12 03:24:49 +00:00
toyomoyo 3743bfe506 fixing warnings during restore 2006-10-12 02:48:47 +00:00
toyomoyo 90beaec2eb fixing warnings during restore 2006-10-12 02:39:17 +00:00
toyomoyo f758baa9ac fixing warnings during restore 2006-10-12 02:30:38 +00:00
toyomoyo 42a5861017 getting rid of wawrnings 2006-10-12 02:13:06 +00:00
tjhunt c9ddd414c7 Take out 8) smiliey that interfeers with ligitimate content like (1998). 2006-10-11 16:29:54 +00:00
moodler 6b0ee8e3d7 Merged version from MOODLE_16_STABLE which never got into HEAD 2006-10-11 09:21:30 +00:00
toyomoyo e4db399ca5 fix for MDL-6900 2006-10-11 07:38:14 +00:00
vyshane 43b3cb4230 Fix for MDL-6674. <ul> was being added before the wrong node when sections are initialised on page load. 2006-10-11 06:56:55 +00:00
toyomoyo 8bf4dbe31c just in case you don't have roles assignable 2006-10-11 06:34:22 +00:00
moodler 471a2de79c Non-editing teachers can't manage activities! MDL-6910 2006-10-11 06:24:10 +00:00
moodler a0ba79ded7 All the PREVENTS from the legacy roles have been removed
(and thus are treated as INHERIT by default).

See MDL-6907 for details.
2006-10-11 06:16:16 +00:00
moodler 252b76e7aa Switch roles now works properly for admins at module level! 2006-10-11 05:47:36 +00:00
vyshane fe6ed5c2c2 Fix for MDL-6912. The script was not deleting module instances properly. We need to call the module cleanup function <modname>_delete_instance() whenever we delete a module instance. 2006-10-11 05:41:41 +00:00
jamiesensei ea95720fe5 *** empty log message *** 2006-10-11 05:32:35 +00:00
toyomoyo 916ad6bf7e fix for MDL-6882 context check broken for calendar 2006-10-11 05:23:14 +00:00
toyomoyo ef10c059ef fixed wrong capability checks 2006-10-11 03:47:14 +00:00
toyomoyo 770f2e2ab1 fixed assign_capability() function so that it's no longer writing '0's into db 2006-10-11 02:13:46 +00:00
sam_marshall e364a5368d Wiki: fixed issue if you tried to set a page content to completely blank (you need to switch the html editor into text mode to get this, otherwise it puts in <br/>, but one of our QA people managed to find it anyway).
Also corrected whitespace on some of the lock stuff (weird - how did those tabs get in there? hrm)
2006-10-10 17:15:40 +00:00
1228 changed files with 113400 additions and 107616 deletions
-12256
View File
File diff suppressed because it is too large Load Diff
-185
View File
@@ -1,185 +0,0 @@
<?php // $Id$
// config.php - allows admin to edit all configuration variables
require_once('../config.php');
$focus = '';
if ($site = get_site()) { // If false then this is a new installation
require_login();
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
}
/// This is to overcome the "insecure forms paradox"
if (isset($secureforms) and $secureforms == 0) {
$match = 'nomatch';
} else {
$match = '';
}
/// If data submitted, then process and store.
if ($config = data_submitted($match)) {
if (!empty($USER->id)) { // Additional identity check
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
}
}
validate_form($config, $err);
if (count($err) == 0) {
foreach ($config as $name => $value) {
if ($name == "sessioncookie") {
$value = eregi_replace("[^a-zA-Z0-9_]", "", $value);
}
if ($name == "defaultallowedmodules") {
$value = implode(',',$value);
}
if ($name == 'hiddenuserfields') {
if (in_array('none', $value)) {
$value = '';
} else {
$value = implode(',',$value);
}
}
if ($name == "locale") {
$value = trim($value);
}
$conf = new object();
$conf->name = $name;
$conf->value = $value;
if ($current = get_record('config', 'name', $name)) {
$conf->id = $current->id;
if (! update_record('config', $conf)) {
error("Error: Could not update $name to $value");
}
} else {
if (! insert_record('config', $conf)) {
error("Error: could not add new variable $name !");
}
}
}
redirect('index.php');
exit;
} else {
foreach ($err as $key => $value) {
$focus = "form.$key";
}
}
}
/// Otherwise fill and print the form.
if (empty($config)) {
$config = $CFG;
}
$sesskey = !empty($USER->id) ? $USER->sesskey : '';
$stradmin = get_string('administration');
$strconfiguration = get_string('configuration');
$strconfigvariables = get_string('configvariables', 'admin');
if ($site) {
print_header("$site->shortname: $strconfigvariables", $site->fullname,
"<a href=\"index.php\">$stradmin</a> -> ".
"<a href=\"configure.php\">$strconfiguration</a> -> $strconfigvariables", $focus);
print_heading($strconfigvariables);
} else {
print_header();
print_heading($strconfigvariables);
print_simple_box(get_string('configintro', 'admin'), 'center', "50%");
echo '<br />';
}
/// Get all the configuration fields and helptext
require('configvars.php');
/// Cycle through the sections to get the sectionnames
$linktext = '';
foreach($configvars as $sectionname=>$section) {
if ($linktext !== '') {
$linktext .= ' | ';
}
$linktext .= '<a href="#configsection'.$sectionname.'">'.get_string('configsection'.$sectionname, 'admin').'</a>';
}
echo "<center>$linktext</center>\n";
echo '<form method="post" action="config.php" name="form">';
echo '<center><input type="submit" value="'.get_string('savechanges').'" /></center>';
/// Cycle through each section of the configuration
foreach ($configvars as $sectionname=>$section) {
print_heading('<a name="configsection'.$sectionname.'"></a>'.get_string('configsection'.$sectionname, 'admin'));
$table = NULL;
$table->data = array();
foreach ($section as $configvariable=>$configobject) {
$table->data[] = array ( $configvariable.': ',
$configobject->field
);
if ($configobject->display_warning()) {
$table->data[] = array ( '&nbsp;',
'<span class="configwarning">'.$configobject->warning.'</span>'
);
}
$table->data[] = array ( '&nbsp;',
'<span class="confighelp">'.$configobject->help.'</span>'
);
$table->align = array ('right', 'left');
}
print_table($table);
}
echo '<center>';
echo '<input type="hidden" name="sesskey" value="'.$sesskey.'" />';
echo '<input type="submit" value="'.get_string('savechanges').'" />';
echo '</center>';
echo '</form>';
/// Lock some options
$httpsurl = str_replace('http://', 'https://', $CFG->wwwroot);
if ($httpsurl != $CFG->wwwroot) {
if (ini_get('allow_url_fopen')) {
if ((($fh = @fopen($httpsurl, 'r')) == false) and ($config->loginhttps == 0)) {
echo '<script type="text/javascript">'."\n";
echo '<!--'."\n";
echo "eval('document.form.loginhttps.disabled=true');\n";
echo '-->'."\n";
echo '</script>'."\n";
}
}
}
if ($site) {
print_footer();
}
exit;
/// Functions /////////////////////////////////////////////////////////////////
function validate_form(&$form, &$err) {
// Currently no checks are needed ...
return true;
}
?>
-660
View File
@@ -1,660 +0,0 @@
<?php // $Id$
// Shane Elliott
defined('MOODLE_INTERNAL') or die('Direct access to this script is forbidden.');
/// Add new sitewide configuration variables to this file.
/// $configvars is parsed by config.php
/// It is an array of arrays of objects
/// $configvars[sectionname][configvariablename] = configvar object
$configvars = array();
/// no, yes strings and menu options are used in a number of places
/// so we define them here to save time on repeatedly calling
/// get_string()
$stryes = get_string('yes');
$strno = get_string('no');
$noyesoptions[0] = $strno;
$noyesoptions[1] = $stryes;
/// A class to hold the configurable information
/// $field - the html code for the form field
/// $help - help text for the field
/// $warning - optional warning text to be displayed
/// method display_warning() - a generic function that can be used in an extended class
/// e.g. enablerssfeeds
class configvar {
var $field;
var $help;
var $warning;
function configvar($help, $field, $warning='') {
$this->help = $help;
$this->field = $field;
$this->warning = $warning;
}
function display_warning() {
return false;
}
}
////////////////////////////////////////////////////////////////////
/// Miscellaneous config variables
////////////////////////////////////////////////////////////////////
$misc = array();
/// maxeditingtime
unset($options);
$options[3600] = get_string('numminutes', '', 60);
$options[2700] = get_string('numminutes', '', 45);
$options[1800] = get_string('numminutes', '', 30);
$options[900] = get_string('numminutes', '', 15);
$options[300] = get_string('numminutes', '', 5);
$options[60] = get_string('numminutes', '', 1);
$misc['maxeditingtime'] = new configvar (get_string('configmaxeditingtime', 'admin'),
choose_from_menu ($options, 'maxeditingtime', $config->maxeditingtime, '', '', '', true) );
/// debug
unset($options);
$options[5] = $strno;
$options[15] = $stryes;
$misc['debug'] = new configvar (get_string('configdebug', 'admin'),
choose_from_menu ($options, 'debug', $config->debug, '', '', '', true) );
$misc['perfdebug'] = new configvar (get_string('configperfdebug', 'admin'),
choose_from_menu ($options, 'perfdebug', $config->perfdebug, '', '', '', true) );
/// enablerssfeeds
class configvarrss extends configvar {
function display_warning() {
return (!function_exists('utf8_encode'));
}
}
$misc['enablerssfeeds'] = new configvarrss (get_string('configenablerssfeeds', 'admin'),
choose_from_menu ($noyesoptions, 'enablerssfeeds', $config->enablerssfeeds, '', '', '', true),
'<font color="red"> You need to add XML support to your PHP installation.</font>' );
$misc['mymoodleredirect'] = new configvar (get_string('configmymoodleredirect','admin'),
choose_from_menu($noyesoptions,'mymoodleredirect',$config->mymoodleredirect,'','','',true));
unset($options);
$options[5] = get_string('worldblogs','blog');
$options[4] = get_string('siteblogs','blog');
$options[3] = get_string('courseblogs','blog');
$options[2] = get_string('groupblogs','blog');
$options[1] = get_string('personalblogs','blog');
$options[0] = get_string('disableblogs','blog');
$misc['bloglevel'] = new configvar (get_string('configbloglevel', 'admin'),
choose_from_menu ($options, 'bloglevel', $config->bloglevel,'','','',true));
////////////////////////////////////////////////////////////////////
/// OPERATING SYSTEM config variables
////////////////////////////////////////////////////////////////////
$operatingsystem = array();
/// gdversion
unset($options);
$options[0] = get_string('gdnot');
$options[1] = get_string('gd1');
$options[2] = get_string('gd2');
$installed = check_gd_version();
$operatingsystem['gdversion'] = new configvar (get_string('configgdversion', 'admin'),
choose_from_menu ($options, 'gdversion', $installed, '', '', '', true) );
/// dbsessions
$operatingsystem['dbsessions'] = new configvar (get_string('configdbsessions', 'admin'),
choose_from_menu ($noyesoptions, 'dbsessions', $config->dbsessions, '', '', '', true) );
/// sessiontimeout
unset($options);
$options[14400] = get_string('numhours', '', 4);
$options[10800] = get_string('numhours', '', 3);
$options[7200] = get_string('numhours', '', 2);
$options[5400] = get_string('numhours', '', '1.5');
$options[3600] = get_string('numminutes', '', 60);
$options[2700] = get_string('numminutes', '', 45);
$options[1800] = get_string('numminutes', '', 30);
$options[900] = get_string('numminutes', '', 15);
$options[300] = get_string('numminutes', '', 5);
$operatingsystem['sessiontimeout'] = new configvar (get_string('configsessiontimeout', 'admin'),
choose_from_menu ($options, 'sessiontimeout', $config->sessiontimeout, '', '', '', true) );
/// sessioncookie
$operatingsystem['sessioncookie'] = new configvar (get_string('configsessioncookie', 'admin'),
'<input name="sessioncookie" type="text" size="10" value="'.s($config->sessioncookie).'" alt="sessioncookie" />' );
$operatingsystem['sessioncookiepath'] = new configvar (get_string('configsessioncookiepath', 'admin'),
'<input name="sessioncookiepath" type="text" size="10" value="'.s($config->sessioncookiepath).'" alt="sessioncookiepath" />' );
/// zip
$operatingsystem['zip'] = new configvar (get_string('configzip', 'admin'),
'<input name="zip" type="text" size="30" value="'.s($config->zip).'" alt="zip" />' );
/// unzip
$operatingsystem['unzip'] = new configvar (get_string('configunzip', 'admin'),
'<input name="unzip" type="text" size="30" value="'.s($config->unzip).'" alt="unzip" />' );
$operatingsystem['pathtodu'] = new configvar(get_string('configpathtodu', 'admin'),
'<input name="pathtodu" type="text" size="30" value="'.s($config->pathtodu).'" alt="pathtodu" />');
/// slasharguments
unset($options);
$options[0] = "file.php?file=/1/pic.jpg";
$options[1] = "file.php/1/pic.jpg";
$operatingsystem['slasharguments'] = new configvar (get_string('configslasharguments', 'admin'),
choose_from_menu ($options, 'slasharguments', $config->slasharguments, '', '', '', true) );
/// proxyhost
$operatingsystem['proxyhost'] = new configvar (get_string('configproxyhost', 'admin'),
'<input name="proxyhost" type="text" size="30" value="'.s($config->proxyhost).'" alt="proxyhost" />' );
/// proxyport
$operatingsystem['proxyport'] = new configvar ('',
'<input name="proxyport" type="text" size="5" value="'.s($config->proxyport).'" alt="proxyport" />' );
////////////////////////////////////////////////////////////////////
/// PERMISSIONS config variables
////////////////////////////////////////////////////////////////////
$permissions = array();
/// teacherassignteachers
$permissions['teacherassignteachers'] = new configvar (get_string('configteacherassignteachers', 'admin'),
choose_from_menu ($noyesoptions, 'teacherassignteachers', $config->teacherassignteachers, '', '', '', true) );
/// allowunenroll
$permissions['allowunenroll'] = new configvar (get_string('configallowunenroll', 'admin'),
choose_from_menu ($noyesoptions, 'allowunenroll', $config->allowunenroll, '', '', '', true) );
/// allusersaresitestudents
$permissions['allusersaresitestudents'] = new configvar (get_string('configallusersaresitestudents', 'admin'),
choose_from_menu ($noyesoptions, 'allusersaresitestudents', $config->allusersaresitestudents, '', '', '', true) );
/// showsiteparticipantslist
unset($options);
$options[0] = get_string('siteteachers');
$options[1] = get_string('allteachers');
$options[2] = get_string('studentsandteachers');
$permissions['showsiteparticipantslist'] = new configvar (get_string('configshowsiteparticipantslist', 'admin'),
choose_from_menu ($options, 'showsiteparticipantslist', $config->showsiteparticipantslist, '', '', '', true) );
/// forcelogin
$permissions['forcelogin'] = new configvar (get_string('configforcelogin', 'admin'),
choose_from_menu ($noyesoptions, 'forcelogin', $config->forcelogin, '', '', '', true) );
/// forceloginforprofiles
$permissions['forceloginforprofiles'] = new configvar (get_string('configforceloginforprofiles', 'admin'),
choose_from_menu ($noyesoptions, 'forceloginforprofiles', $config->forceloginforprofiles, '', '', '', true) );
/// opentogoogle
$permissions['opentogoogle'] = new configvar (get_string('configopentogoogle', 'admin'),
choose_from_menu ($noyesoptions, 'opentogoogle', $config->opentogoogle, '', '', '', true) );
/// maxbytes
$options = get_max_upload_sizes();
$permissions['maxbytes'] = new configvar (get_string('configmaxbytes', 'admin'),
choose_from_menu ($options, 'maxbytes', $config->maxbytes, '', '', 0, true) );
/// messaging
$permissions['messaging'] = new configvar (get_string('configmessaging', 'admin'),
choose_from_menu ($noyesoptions, 'messaging', $config->messaging, '', '', '', true) );
/// allowobjectembed
$permissions['allowobjectembed'] = new configvar (get_string('configallowobjectembed', 'admin'),
choose_from_menu ($noyesoptions, 'allowobjectembed', $config->allowobjectembed, '', '', '', true) );
/// enabletrusttext
$permissions['enabletrusttext'] = new configvar (get_string('configenabletrusttext', 'admin'),
choose_from_menu ($noyesoptions, 'enabletrusttext', $config->enabletrusttext, '', '', '', true) );
unset($options);
$options['none'] = 'No courses';
$options['all'] = 'All courses';
$options['requested'] = 'Requested courses';
$permissions['restrictmodulesfor'] = new configvar (get_string('configrestrictmodulesfor','admin'),
' <script language="JavaScript">
function togglemodules(index) {
if (index == 0) {
document.getElementById(\'allowedmodules\').disabled=true;
}
else {
document.getElementById(\'allowedmodules\').disabled=false;
}
}
</script>'.
choose_from_menu($options,'restrictmodulesfor',$config->restrictmodulesfor,'','togglemodules(this.selectedIndex);','',true) );
$permissions['restrictbydefault'] = new configvar (get_string('configrestrictbydefault','admin'),
choose_from_menu($noyesoptions, 'restrictbydefault',$config->restrictbydefault,'','','',true) );
$allowstr = '<select name="defaultallowedmodules[]" id="allowedmodules" multiple="multiple" size="10"'.((empty($config->restrictmodulesfor)) ? "disabled=\"disabled\"" : "").'>';
$allowedmodules = array();
if (!empty($config->defaultallowedmodules)) {
$allowedmodules = explode(',',$config->defaultallowedmodules);
}
// On a fresh install of Moodle, this could be empty; prevent a warning on the following loop.
if (!$mods = get_records("modules")) {
$mods = array();
}
$s = "selected=\"selected\"";
$allowstr .= '<option value="0" '.((empty($allowedmodules)) ? $s : '').'>'.get_string('allownone').'</option>'."\n";
foreach ($mods as $mod) {
$selected = "";
if (in_array($mod->id,$allowedmodules))
$selected = $s;
$allowstr .= '<option '.$selected.' value="'.$mod->id.'">'.$mod->name.'</option>'."\n";
}
$allowstr .= '</select>';
$permissions['defaultallowedmodules'] = new configvar (get_string('configdefaultallowedmodules','admin'),$allowstr);
/// course requests
$reqcourse['enablecourserequests'] = new configvar (get_string('configenablecourserequests', 'admin'),
choose_from_menu ($noyesoptions,'enablecourserequests',$config->enablecourserequests,'','','',true) );
/// default category for course requests
require_once($CFG->dirroot.'/course/lib.php');
$reqcourse['defaultrequestedcategory'] = new configvar (get_string('configdefaultrequestedcategory', 'admin'),
choose_from_menu (make_categories_options(), 'defaultrequestedcategory',$config->defaultrequestedcategory,'','','',true) );
$reqcourse['requestedteachername'] = new configvar (get_string('configrequestedteachername','admin'),
'<input type="text" name="requestedteachername" size="20" maxlength="100" value="'.s($config->requestedteachername).'" />');
$reqcourse['requestedteachersname'] = new configvar (get_string('configrequestedteachersname','admin'),
'<input type="text" name="requestedteachersname" size="20" maxlength="100" value="'.s($config->requestedteachersname).'" />');
$reqcourse['requestedstudentname'] = new configvar (get_string('configrequestedstudentname','admin'),
'<input type="text" name="requestedstudentname" size="20" maxlength="100" value="'.s($config->requestedstudentname).'" />');
$reqcourse['requestedstudentsname'] = new configvar (get_string('configrequestedstudentsname','admin'),
'<input type="text" name="requestedstudentsname" size="20" maxlength="100" value="'.s($config->requestedstudentsname).'" />');
////////////////////////////////////////////////////////////////////
/// INTERFACE config variables
////////////////////////////////////////////////////////////////////
$interface = array();
/// language settings
$interface['lang'] = new configvar ( get_string('configlang', 'admin'),
choose_from_menu(get_list_of_languages(), 'lang', $config->lang, '', '', '', true) );
/// language menu
$interface['langmenu'] = new configvar ( get_string('configlangmenu', 'admin'),
choose_from_menu($noyesoptions, 'langmenu', $config->langmenu, '', '', '', true) );
/// language list
$interface['langlist'] = new configvar ( get_string('configlanglist', 'admin'),
'<input name="langlist" type="text" size="60" value="'.s($config->langlist).'" alt="langlist" />' );
/// language menu
$interface['langcache'] = new configvar ( get_string('configlangcache', 'admin'),
choose_from_menu($noyesoptions, 'langcache', $config->langcache, '', '', '', true) );
/// locale
$interface['locale'] = new configvar ( get_string('configlocale', 'admin'),
'<input name="locale" type="text" size="15" value="'.s($config->locale).'" alt="locale" />' );
/// docroot
$interface['docroot'] = new configvar ( get_string('configdocroot', 'admin'),
'<input name="docroot" type="text" size="60" value="'.s($config->docroot).'" alt="docroot" />' );
/// doctonewwindow
$interface['doctonewwindow'] = new configvar ( get_string('configdoctonewwindow', 'admin'),
choose_from_menu($noyesoptions, 'doctonewwindow', $config->doctonewwindow, '', '', '', true) );
/// timezone
$interface['timezone'] = new configvar ( get_string('configtimezone', 'admin'),
choose_from_menu (get_list_of_timezones(), 'timezone', $config->timezone, get_string('serverlocaltime'), '', '99', true ) );
/// country
$interface['country'] = new configvar ( get_string('configcountry', 'admin'),
choose_from_menu (get_list_of_countries(), 'country', $config->country, get_string('selectacountry'), '', 0, true) );
/// framename
if (empty($config->framename)) {
$config->framename = "_top";
}
$interface['framename'] = new configvar (get_string('configframename', 'admin'),
'<input name="framename" type="text" size="15" value="'.s($config->framename).'" alt="framename" />' );
/// language list
$interface['themelist'] = new configvar ( get_string('configthemelist', 'admin'),
'<input name="themelist" type="text" size="60" value="'.s($config->themelist).'" alt="themelist" />' );
/// user themes
$interface['allowuserthemes'] = new configvar (get_string('configallowuserthemes', 'admin'),
choose_from_menu ($noyesoptions, 'allowuserthemes', $config->allowuserthemes, '', '', '', true) );
/// course themes
$interface['allowcoursethemes'] = new configvar (get_string('configallowcoursethemes', 'admin'),
choose_from_menu ($noyesoptions, 'allowcoursethemes', $config->allowcoursethemes, '', '', '', true) );
/// allowuserblockhiding
$interface['allowuserblockhiding'] = new configvar (get_string('configallowuserblockhiding', 'admin'),
choose_from_menu ($noyesoptions, 'allowuserblockhiding', $config->allowuserblockhiding, '', '', '', true) );
/// showblocksonmodpages
$interface['showblocksonmodpages'] = new configvar (get_string('configshowblocksonmodpages', 'admin'),
choose_from_menu ($noyesoptions, 'showblocksonmodpages', $config->showblocksonmodpages, '', '', '', true) );
/// tabselectedtofront
$interface['tabselectedtofront'] = new configvar (get_string('tabselectedtofront', 'admin'),
choose_from_menu ($noyesoptions, 'tabselectedtofront', $config->tabselectedtofront, '', '', '', true) );
////////////////////////////////////////////////////////////////////
/// USER config variables
////////////////////////////////////////////////////////////////////
$user = array();
/// sitepolicy
$user['sitepolicy'] = new configvar (get_string('configsitepolicy', 'admin'),
'<input type="text" name="sitepolicy" size="60" value="'.$config->sitepolicy.'" alt="sitepolicy" />' );
/// fullnamedisplay
unset($options);
$options['language'] = get_string('language');
$options['firstname lastname'] = get_string('firstname') . ' + ' . get_string('lastname');
$options['lastname firstname'] = get_string('lastname') . ' + ' . get_string('firstname');
$options['firstname'] = get_string('firstname');
$user['fullnamedisplay'] = new configvar (get_string('configfullnamedisplay', 'admin'),
choose_from_menu ($options, 'fullnamedisplay', $config->fullnamedisplay, '', '', '', true) );
/// extendedusernamechars
$user['extendedusernamechars'] = new configvar (get_string('configextendedusernamechars', 'admin'),
choose_from_menu ($noyesoptions, 'extendedusernamechars', $config->extendedusernamechars, '', '', '', true) );
/// autologinguests
$user['autologinguests'] = new configvar (get_string('configautologinguests', 'admin'),
choose_from_menu ($noyesoptions, 'autologinguests', $config->autologinguests, '', '', '', true) );
/// hiddenuserfields
$fields = array('none', 'description', 'city', 'country', 'webpage', 'icqnumber', 'skypeid', 'yahooid', 'aimid', 'msnid', 'lastaccess');
if (empty($config->hiddenuserfields)) {
$config->hiddenuserfields = 'none';
}
$configfields = array_flip(explode(',', $config->hiddenuserfields));
$fieldoptions = '';
foreach ($fields as $value) {
$fieldoptions .= '<option value="'.$value.'"';
if (isset($configfields[$value])) {
$fieldoptions .= ' selected="selected"';
}
$fieldoptions .= '>'.get_string($value).'</option>';
}
$user['hiddenuserfields'] = new configvar (get_string('confighiddenuserfields', 'admin'),
'<select id="menuhiddenuserfields" name="hiddenuserfields[]" size="10" multiple="multiple">'.$fieldoptions.'</select>' );
////////////////////////////////////////////////////////////////////
/// SECURITY config variables
////////////////////////////////////////////////////////////////////
$security = array();
/// displayloginfailures
unset($options);
$options[''] = get_string('nobody');
$options['admin'] = get_string('administrators');
$options['teacher'] = get_string('administratorsandteachers');
$options['everybody'] = get_string('everybody');
$security['displayloginfailures'] = new configvar (get_string('configdisplayloginfailures', 'admin'),
choose_from_menu($options, 'displayloginfailures', $config->displayloginfailures, '', '', '', true) );
/// notifyloginfailures
unset($options);
$options[''] = get_string('nobody');
$options['mainadmin'] = get_string('administrator');
$options['alladmins'] = get_string('administratorsall');
$security['notifyloginfailures'] = new configvar (get_string('confignotifyloginfailures', 'admin'),
choose_from_menu($options, 'notifyloginfailures', $config->notifyloginfailures, '', '', '', true) );
/// notifyloginthreshold
unset($options);
for ($i=1; $i<=100; $i++) {
$options[$i] = "$i";
}
$security['notifyloginthreshold'] = new configvar (get_string('confignotifyloginthreshold', 'admin'),
choose_from_menu($options, 'notifyloginthreshold', $config->notifyloginthreshold, '', '', '', true) );
/// secureforms
$security['secureforms'] = new configvar (get_string('configsecureforms', 'admin'),
choose_from_menu ($noyesoptions, 'secureforms', $config->secureforms, '', '', '', true) );
/// loginhttps
$security['loginhttps'] = new configvar (get_string('configloginhttps', 'admin'),
choose_from_menu ($noyesoptions, 'loginhttps', $config->loginhttps, '', '', '', true) );
/// runclamonupload
$security['runclamonupload'] = new configvar (get_string('configrunclamonupload', 'admin'),
choose_from_menu($noyesoptions, 'runclamonupload', $config->runclamonupload, '', '', '', true) );
/// pathtoclam
$security['pathtoclam'] = new configvar (get_string('configpathtoclam', 'admin'),
'<input type="text" name="pathtoclam" size="30" value="'.$config->pathtoclam.'" alt="pathtoclam" />' );
/// quarantinedir
$security['quarantinedir'] = new configvar (get_string('configquarantinedir', 'admin'),
'<input type="text" name="quarantinedir" size="30" value="'.$config->quarantinedir.'" alt="quarantinedir" />' );
/// clamfailureonupload
unset($options);
$options['donothing'] = get_string('configclamdonothing', 'admin');
$options['actlikevirus'] = get_string('configclamactlikevirus', 'admin');
$security['clamfailureonupload'] = new configvar (get_string('configclamfailureonupload', 'admin'),
choose_from_menu($options, 'clamfailureonupload', $config->clamfailureonupload, '', '', '', true) );
////////////////////////////////////////////////////////////////////
/// MAINTENANCE config variables
////////////////////////////////////////////////////////////////////
$maintenance = array();
/// longtimenosee
unset($options);
$options[0] = get_string('never');
$options[1000] = get_string('numdays', '', 1000);
$options[365] = get_string('numdays', '', 365);
$options[180] = get_string('numdays', '', 180);
$options[150] = get_string('numdays', '', 150);
$options[120] = get_string('numdays', '', 120);
$options[90] = get_string('numdays', '', 90);
$options[60] = get_string('numdays', '', 60);
$options[30] = get_string('numdays', '', 30);
$options[21] = get_string('numdays', '', 21);
$options[14] = get_string('numdays', '', 14);
$options[7] = get_string('numdays', '', 7);
$maintenance['longtimenosee'] = new configvar (get_string('configlongtimenosee', 'admin'),
choose_from_menu ($options, 'longtimenosee', $config->longtimenosee, '', '', '', true) );
/// deleteunconfirmed
unset($options);
$options[0] = get_string('never');
$options[168] = get_string('numdays', '', 7);
$options[144] = get_string('numdays', '', 6);
$options[120] = get_string('numdays', '', 5);
$options[96] = get_string('numdays', '', 4);
$options[72] = get_string('numdays', '', 3);
$options[48] = get_string('numdays', '', 2);
$options[24] = get_string('numdays', '', 1);
$options[12] = get_string('numhours', '', 12);
$options[6] = get_string('numhours', '', 6);
$options[1] = get_string('numhours', '', 1);
$maintenance['deleteunconfirmed'] = new configvar (get_string('configdeleteunconfirmed', 'admin'),
choose_from_menu ($options, 'deleteunconfirmed', $config->deleteunconfirmed, '', '', '', true) );
/// loglifetime
unset($options);
$options[0] = get_string('neverdeletelogs');
$options[1000] = get_string('numdays', '', 1000);
$options[365] = get_string('numdays', '', 365);
$options[180] = get_string('numdays', '', 180);
$options[150] = get_string('numdays', '', 150);
$options[120] = get_string('numdays', '', 120);
$options[90] = get_string('numdays', '', 90);
$options[60] = get_string('numdays', '', 60);
$options[30] = get_string('numdays', '', 30);
$maintenance['loglifetime'] = new configvar (get_string('configloglifetime', 'admin'),
choose_from_menu ($options, 'loglifetime', $config->loglifetime, '', '', '', true) );
////////////////////////////////////////////////////////////////////
/// MAIL config variables
////////////////////////////////////////////////////////////////////
$mail = array();
/// smtphosts
$mail['smtphosts'] = new configvar (get_string('configsmtphosts', 'admin'),
'<input name="smtphosts" type="text" size="30" value="'.s($config->smtphosts).'" alt="smtphosts" />' );
/// smtpuser
$mail['smtpuser'] = new configvar (get_string('configsmtpuser', 'admin'),
'<input name="smtpuser" type="text" size="10" value="'.s($config->smtpuser).'" alt="smtpuser" />' );
/// smtppass
$mail['smtppass'] = new configvar ('',
'<input name="smtppass" type="password" size="10" value="'.s($config->smtppass).'" alt="smtppass" />' );
/// noreplyaddress
$mail['noreplyaddress'] = new configvar (get_string('confignoreplyaddress', 'admin'),
'<input name="noreplyaddress" type="text" size="30" value="'.s($config->noreplyaddress).'" alt="noreplyaddress" />' );
/// digestmailtime
$hours = array();
for ($i=0; $i<=23; $i++) {
$hours[$i] = sprintf("%02d",$i);
}
$mail['digestmailtime'] = new configvar (get_string('configdigestmailtime', 'admin'),
choose_from_menu($hours, 'digestmailtime', $config->digestmailtime, '', '', 0, true) );
/// allowemailaddresses
$mail['allowemailaddresses'] = new configvar (get_string('configallowemailaddresses', 'admin'),
'<input name="allowemailaddresses" type="text" size="60" value="'.s($config->allowemailaddresses).'" alt="allowemailaddresses" />' );
/// denyemailaddresses
$mail['denyemailaddresses'] = new configvar (get_string('configdenyemailaddresses', 'admin'),
'<input name="denyemailaddresses" type="text" size="60" value="'.s($config->denyemailaddresses).'" alt="denyemailaddresses" />' );
if (!empty($CFG->unicodedb)) { ///These options are only available if running under unicodedb
/// sitemailcharset
unset($options);
unset($charsets);
$charsets = get_list_of_charsets();
$options['0'] = get_string('none');
$options = array_merge($options, $charsets);
$mail['sitemailcharset'] = new configvar (get_string('configsitemailcharset', 'admin'),
choose_from_menu($options, 'sitemailcharset', $config->sitemailcharset, '', '', '', true));
/// allowusermailcharset
$mail['allowusermailcharset'] = new configvar (get_string('configallowusermailcharset', 'admin'),
choose_from_menu($noyesoptions, 'allowusermailcharset', $config->allowusermailcharset, '', '', '', true));
}
/// enable stats
if (empty($CFG->disablestatsprocessing)) {
$stats['enablestats'] = new configvar (get_string('configenablestats','admin'),
choose_from_menu($noyesoptions, 'enablestats', $config->enablestats, '', '', '', true) );
unset($options);
$options['none'] = get_string('none');
$options[60*60*24*7] = get_string('numweeks','moodle',1);
$options[60*60*24*14] = get_string('numweeks','moodle',2);
$options[60*60*24*21] = get_string('numweeks','moodle',3);
$options[60*60*24*28] = get_string('nummonths','moodle',1);
$options[60*60*24*56] = get_string('nummonths','moodle',2);
$options[60*60*24*84] = get_string('nummonths','moodle',3);
$options[60*60*24*112] = get_string('nummonths','moodle',4);
$options[60*60*24*140] = get_string('nummonths','moodle',5);
$options[60*60*24*168] = get_string('nummonths','moodle',6);
$options['all'] = get_string('all');
$stats['statsfirstrun'] = new configvar (get_string('configstatsfirstrun','admin'),
choose_from_menu($options,'statsfirstrun',$config->statsfirstrun,'','','',true) );
unset($options);
$options[0] = get_string('untilcomplete');
$options[60*60] = '1 '.get_string('hour');
$options[60*60*2] = '2 '.get_string('hours');
$options[60*60*3] = '3 '.get_string('hours');
$options[60*60*4] = '4 '.get_string('hours');
$options[60*60*5] = '5 '.get_string('hours');
$options[60*60*6] = '6 '.get_string('hours');
$options[60*60*7] = '7 '.get_string('hours');
$options[60*60*8] = '8 '.get_string('hours');
if (empty($config->statsruntimestarthour)) {
$config->statsruntimestarthour = 0;
}
if (empty($config->statsruntimestartminute)) {
$config->statsruntimestartminute = 0;
}
$stats['statsmaxruntime'] = new configvar (get_string('configstatsmaxruntime','admin'),
choose_from_menu($options,'statsmaxruntime',$config->statsmaxruntime,'','','',true) );
$stats['statsruntimestart'] = new configvar (get_string('configstatsruntimestart','admin'),
print_time_selector("statsruntimestarthour","statsruntimestartminute",make_timestamp(2000,1,1,$config->statsruntimestarthour,$config->statsruntimestartminute),5,true) );
$stats['statsuserthreshold'] = new configvar (get_string('configstatsuserthreshold','admin'),
'<input type="text" name="statsuserthreshold" size="4" value="'.$config->statsuserthreshold.'" />');
}
////////////////////////////////////////////////////////////////////
$configvars['interface'] = $interface;
$configvars['security'] = $security;
$configvars['operatingsystem'] = $operatingsystem;
$configvars['maintenance'] = $maintenance;
$configvars['mail'] = $mail;
$configvars['user'] = $user;
$configvars['permissions'] = $permissions;
$configvars['requestedcourse'] = $reqcourse;
$configvars['misc'] = $misc;
if (empty($CFG->disablestatsprocessing)) {
$configvars['stats'] = $stats;
}
?>
+54 -17
View File
@@ -53,7 +53,17 @@
moodle_setlocale();
/// send mime type and encoding
@header('Content-Type: text/plain; charset='.current_charset());
if (check_browser_version('MSIE')) {
//ugly IE hack to work around downloading instead of viewing
@header('Content-Type: text/html; charset='.current_charset());
echo "<xmp>"; //<pre> is not good enough for us here
} else {
//send proper plaintext header
@header('Content-Type: text/plain; charset='.current_charset());
}
/// increase memory limit (PHP 5.2 does different calculation, we need more memory now)
@raise_memory_limit('128M');
/// Start output log
@@ -77,6 +87,8 @@
mtrace("Error: could not update timestamp for $mod->fullname");
}
}
/// Reset possible changes by modules to time_limit. MDL-11597
@set_time_limit(0);
mtrace("done.");
}
}
@@ -101,19 +113,35 @@
mtrace('Error: could not update timestamp for '.$block->name);
}
}
/// Reset possible changes by blocks to time_limit. MDL-11597
@set_time_limit(0);
mtrace('done.');
}
}
}
}
mtrace("Finished blocks");
mtrace('Finished blocks');
if (!empty($CFG->langcache)) {
mtrace('Updating languages cache');
get_list_of_languages();
}
mtrace('Removing expired enrolments ...', ''); // See MDL-8785
$timenow = time();
if ($oldenrolments = get_records_select('role_assignments', "timeend > 0 AND timeend < '$timenow'")) {
mtrace(count($oldenrolments).' to delete');
foreach ($oldenrolments as $oldenrolment) {
if (role_unassign($oldenrolment->roleid, $oldenrolment->userid, 0, $oldenrolment->contextid)) {
mtrace("Deleted expired role assignment $oldenrolment->roleid for user $oldenrolment->userid from context $oldenrolment->contextid");
}
}
mtrace('Done');
} else {
mtrace('none found');
}
/// Run all core cron jobs, but not every time since they aren't too important.
/// These don't have a timer to reduce load, so we'll use a random number
@@ -132,8 +160,8 @@
if ($assigns = get_users_longtimenosee($longtime)) {
foreach ($assigns as $assign) {
if ($context = get_context_instance(CONTEXT_COURSE, $assign->courseid)) {
if (role_unassign(0, $assign->userid, 0, $context->id)) {
mtrace("Deleted student enrolment for user $assign->userid from course $assign->courseid");
if (role_unassign(0, $assign->id, 0, $context->id)) {
mtrace("Deleted student enrolment for user $assign->id from course $assign->courseid");
}
}
}
@@ -143,11 +171,13 @@
/// Delete users who haven't confirmed within required period
$oneweek = $timenow - ($CFG->deleteunconfirmed * 3600);
if ($users = get_users_unconfirmed($oneweek)) {
foreach ($users as $user) {
if (delete_records('user', 'id', $user->id)) {
mtrace("Deleted unconfirmed user for ".fullname($user, true)." ($user->id)");
if (!empty($CFG->deleteunconfirmed)) {
$oneweek = $timenow - ($CFG->deleteunconfirmed * 3600);
if ($users = get_users_unconfirmed($oneweek)) {
foreach ($users as $user) {
if (delete_records('user', 'id', $user->id)) {
mtrace("Deleted unconfirmed user for ".fullname($user, true)." ($user->id)");
}
}
}
}
@@ -157,11 +187,13 @@
/// Delete users who haven't completed profile within required period
$oneweek = $timenow - ($CFG->deleteunconfirmed * 3600);
if ($users = get_users_not_fully_set_up($oneweek)) {
foreach ($users as $user) {
if (delete_records('user', 'id', $user->id)) {
mtrace("Deleted not fully setup user $user->username ($user->id)");
if (!empty($CFG->deleteunconfirmed)) {
$oneweek = $timenow - ($CFG->deleteunconfirmed * 3600);
if ($users = get_users_not_fully_set_up($oneweek)) {
foreach ($users as $user) {
if (delete_records('user', 'id', $user->id)) {
mtrace("Deleted not fully setup user $user->username ($user->id)");
}
}
}
}
@@ -224,7 +256,7 @@
//Execute backup's cron
//Perhaps a long time and memory could help in large sites
@set_time_limit(0);
@raise_memory_limit("128M");
@raise_memory_limit("192M");
if (function_exists('apache_child_terminate')) {
// if we are running from Apache, give httpd a hint that
// it can recycle the process after it's done. Apache's
@@ -279,7 +311,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)
@@ -287,7 +319,7 @@
if (!empty($CFG->statsmaxruntime)) {
$time = $CFG->statsmaxruntime+(60*30); // add on half an hour just to make sure (it could take that long to break out of the loop)
}
if (!get_field_sql('SELECT id FROM '.$CFG->prefix.'stats_daily LIMIT 1')) {
if (!get_field_sql('SELECT id FROM '.$CFG->prefix.'stats_daily')) {
// first run, set another lock. we'll check for this in subsequent runs to set the timeout to later for the normal lock.
set_cron_lock('statsfirstrunlock',true,$time,true);
$firsttime = true;
@@ -330,4 +362,9 @@
$difftime = microtime_diff($starttime, microtime());
mtrace("Execution took ".$difftime." seconds");
/// finishe the IE hack
if (check_browser_version('MSIE')) {
echo "</xmp>";
}
?>
+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') {
+110
View File
@@ -35,6 +35,11 @@
</PHP_EXTENSIONS>
</MOODLE>
<MOODLE version="1.7">
<UNICODE level="optional">
<FEEDBACK>
<ON_CHECK message="unicoderecommended" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mysql" version="4.1.16">
<FEEDBACK>
@@ -45,6 +50,7 @@
<VENDOR name="postgres" version="7.4" />
<VENDOR name="mssql" version="9.0" />
<VENDOR name="odbc_mssql" version="9.0" />
<VENDOR name="mssql_n" version="9.0" />
<VENDOR name="oracle" version="9.0" />
</DATABASE>
<PHP version="4.3.0" level="required">
@@ -63,4 +69,108 @@
</PHP_EXTENSION>
</PHP_EXTENSIONS>
</MOODLE>
<MOODLE version="1.8">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mysql" version="4.1.16">
<FEEDBACK>
<ON_ERROR message="mysql416required" />
</FEEDBACK>
<BYPASS function="bypass_mysql416_reqs" message="mysql416bypassed" />
</VENDOR>
<VENDOR name="postgres" version="7.4" />
<VENDOR name="mssql" version="9.0" />
<VENDOR name="odbc_mssql" version="9.0" />
<VENDOR name="mssql_n" version="9.0" />
<VENDOR name="oracle" version="9.0" />
</DATABASE>
<PHP version="4.3.0" level="required">
<RESTRICT function="restrict_php50_version" message="php50restricted" />
</PHP>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="optional">
<FEEDBACK>
<ON_CHECK message="iconvrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
<FEEDBACK>
<ON_CHECK message="mbstringrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
</PHP_EXTENSIONS>
</MOODLE>
<MOODLE version="1.9">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mysql" version="4.1.16">
<FEEDBACK>
<ON_ERROR message="mysql416required" />
</FEEDBACK>
<BYPASS function="bypass_mysql416_reqs" message="mysql416bypassed" />
</VENDOR>
<VENDOR name="postgres" version="8.0" />
<VENDOR name="mssql" version="9.0" />
<VENDOR name="odbc_mssql" version="9.0" />
<VENDOR name="mssql_n" version="9.0" />
<VENDOR name="oracle" version="9.0" />
</DATABASE>
<PHP version="4.3.0" level="required">
<RESTRICT function="restrict_php50_version" message="php50restricted" />
</PHP>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="optional">
<FEEDBACK>
<ON_CHECK message="iconvrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
<FEEDBACK>
<ON_CHECK message="mbstringrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
</PHP_EXTENSIONS>
</MOODLE>
<MOODLE version="2.0">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mysql" version="4.1.16">
<FEEDBACK>
<ON_ERROR message="mysql416required" />
</FEEDBACK>
<BYPASS function="bypass_mysql416_reqs" message="mysql416bypassed" />
</VENDOR>
<VENDOR name="postgres" version="8.0" />
<VENDOR name="mssql" version="9.0" />
<VENDOR name="odbc_mssql" version="9.0" />
<VENDOR name="mssql_n" version="9.0" />
<VENDOR name="oracle" version="9.0" />
</DATABASE>
<PHP version="5.2.4" level="required">
</PHP>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="optional">
<FEEDBACK>
<ON_CHECK message="iconvrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
<FEEDBACK>
<ON_CHECK message="mbstringrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
</PHP_EXTENSIONS>
</MOODLE>
</COMPATIBILITY_MATRIX>
+2 -4
View File
@@ -59,10 +59,10 @@
// run through submitted data
// reject if does not start with filter_
foreach ($config as $name => $value) {
set_config( $name,$value );
set_config($name, stripslashes($value));
}
}
redirect( "$CFG->wwwroot/$CFG->admin/filters.php", get_string('changessaved'), 1);
redirect("$CFG->wwwroot/$CFG->admin/filters.php");
exit;
}
@@ -94,7 +94,5 @@
<?php
print_simple_box_end();
print_simple_box_end();
admin_externalpage_print_footer($adminroot);
?>
+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() {
+52 -17
View File
@@ -27,6 +27,7 @@
$id = optional_param('id', '', PARAM_ALPHANUM);
$confirmupgrade = optional_param('confirmupgrade', 0, PARAM_BOOL);
$confirmrelease = optional_param('confirmrelease', 0, PARAM_BOOL);
$agreelicence = optional_param('agreelicence',0, PARAM_BOOL);
$ignoreupgradewarning = optional_param('ignoreupgradewarning', 0, PARAM_BOOL);
@@ -52,6 +53,13 @@
error("The PHP server variable 'file_uploads' is not turned On - $documentationlink");
}
if (empty($CFG->prefix) && $CFG->dbtype != 'mysql') { //Enforce prefixes for everybody but mysql
error('$CFG->prefix can\'t be empty for your target DB (' . $CFG->dbtype . ')');
}
if ($CFG->dbtype == 'oci8po' && strlen($CFG->prefix) > 2) { //Max prefix length for Oracle is 2cc
error('$CFG->prefix maximum allowed length for Oracle DBs is 2cc.');
}
/// Check that config.php has been edited
@@ -133,6 +141,8 @@
/// Both old .sql files and new install.xml are supported
/// But we prioritise install.xml (XMLDB) if present
change_db_encoding(); // first try to change db encoding to utf8
$status = false;
if (file_exists("$CFG->libdir/db/install.xml")) {
$status = install_from_xmldb_file("$CFG->libdir/db/install.xml"); //New method
@@ -214,19 +224,50 @@
}
if (empty($confirmupgrade)) {
print_header($strdatabasechecking, $stradministration, $strdatabasechecking,
"", "", false, "&nbsp;", "&nbsp;");
notice_yesno(get_string('upgradesure', 'admin', $a->newversion), 'index.php?confirmupgrade=yes', 'index.php');
exit;
} else if (empty($confirmrelease)) {
$strcurrentrelease = get_string("currentrelease");
print_header($strcurrentrelease, $strcurrentrelease, $strcurrentrelease, "", "", false, "&nbsp;", "&nbsp;");
print_heading("Moodle $release");
print_simple_box(get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/en/Release_Notes'), 'center');
require_once($CFG->libdir.'/environmentlib.php');
print_heading(get_string('environment', 'admin'));
if (!check_moodle_environment($release, $environment_results, true)) {
notice_yesno(get_string('environmenterrorupgrade', 'admin'),
'index.php?confirmupgrade=1&confirmrelease=1', 'index.php');
} else {
notify(get_string('environmentok', 'admin'), 'notifysuccess');
echo '<form action="index.php">';
echo '<input type="hidden" name="confirmupgrade" value="1" />';
echo '<input type="hidden" name="confirmrelease" value="1" />';
echo '<div class="continuebutton"><input type="submit" value="'.get_string('continue').'" /></div>';
echo '</form>';
}
print_footer('none');
exit;
} else {
$strdatabasesuccess = get_string("databasesuccess");
print_header($strdatabasechecking, $stradministration, $strdatabasechecking,
"", $linktoscrolltoerrors, false, "&nbsp;", "&nbsp;");
/// return to original debugging level
$CFG->debug = $origdebug;
error_reporting($CFG->debug);
upgrade_log_start();
/// Upgrade current language pack if we can
upgrade_language_pack();
print_heading($strdatabasechecking);
$db->debug=true;
/// Launch the old main upgrade (if exists)
@@ -280,13 +321,9 @@
/// Updated human-readable release version if necessary
if ($release <> $CFG->release) { // Update the release version
$strcurrentrelease = get_string("currentrelease");
print_header($strcurrentrelease, $strcurrentrelease, $strcurrentrelease, "", "", false, "&nbsp;", "&nbsp;");
print_heading("Moodle $release");
if (!set_config("release", $release)) {
notify("ERROR: Could not update release version in database!!");
error("ERROR: Could not update release version in database!!");
}
notice(get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/en/Release_Notes'), 'index.php', 'none');
}
/// Find and check all main modules and load them up or upgrade them if necessary
@@ -382,7 +419,7 @@
/// Define the unique site ID code if it isn't already
if (empty($CFG->siteidentifier)) { // Unique site identification code
set_config('siteidentifier', random_string(32));
set_config('siteidentifier', random_string(32).$_SERVER['HTTP_HOST']);
}
/// Check if the guest user exists. If not, create one.
@@ -451,14 +488,21 @@
print_spacer(10,10);
}
if (ini_get_bool('register_globals') && !ini_get_bool('magic_quotes_gpc')) {
print_simple_box(get_string('globalsquoteswarning', 'admin'), 'center', '60%');
if (ini_get_bool('register_globals')) {
print_simple_box(get_string('globalswarning', 'admin'), 'center', '60%');
}
if (is_dataroot_insecure()) {
print_simple_box(get_string('datarootsecuritywarning', 'admin', $CFG->dataroot), 'center', '60%');
}
if (substr($CFG->wwwroot, -1) == '/') {
print_simple_box(get_string('cfgwwwrootslashwarning', 'admin'), 'center', '60%');
}
if (strpos($ME, $CFG->httpswwwroot.'/') === false) {
print_simple_box(get_string('cfgwwwrootwarning', 'admin'), 'center', '60%');
}
/// If no recently cron run
$lastcron = get_field_sql('SELECT max(lastcron) FROM ' . $CFG->prefix . 'modules');
if (time() - $lastcron > 3600 * 24) {
@@ -511,15 +555,6 @@
echo '</div>';
}
if (optional_param('dbmigrate')) { // ??? Is this actually used?
print_simple_box_start('center','60%');
require_once($CFG->dirroot.'/'.$CFG->admin.'/utfdbmigrate.php');
db_migrate2utf8();
print_simple_box_end();
}
admin_externalpage_print_footer($adminroot);
+15 -3
View File
@@ -4,6 +4,9 @@
*
* CHANGES
*
* 2006/11/07 mudrd8mz
* Fixed bug MDL-7361. Thanks to Dan Poltawski for the patch proposal.
*
* 2006/06/08 mudrd8mz
* 1) Fixed bug 5745 reported by Harry Smith so now can edit en_utf8_local pack
* 2) More notification messages included
@@ -133,13 +136,14 @@
// Get a list of all the root files in the English directory
$langbase = $CFG->dataroot . '/lang';
$enlangdir = "$CFG->dirroot/lang/en_utf8";
if ($currentlang == 'en_utf8') {
$langdir = $enlangdir;
} else {
$langdir = "$CFG->dataroot/lang/$currentlang";
$langdir = "$langbase/$currentlang";
}
$locallangdir = "$CFG->dataroot/lang/{$currentlang}_local";
$locallangdir = "$langbase/{$currentlang}_local";
if (! $stringfiles = get_directory_list($enlangdir, "", false)) {
error("Could not find English language pack!");
@@ -256,6 +260,14 @@
} else if ($mode == "compare") {
if (!file_exists($langbase) ){
if (!lang_make_directory($langbase) ){
error('ERROR: Could not create base lang directory ' . $langbase);
} else {
echo '<div class="notifysuccess" align="center">Created directory '.
$langbase .'</div>'."<br />\n";
}
}
if (!$uselocal && !file_exists($langdir)) {
if (!lang_make_directory($langdir)) {
error('ERROR: Could not create directory '.$langdir);
@@ -573,7 +585,7 @@ function lang_fix_value_from_file($value='') {
* Try and create a new language directory.
*
* @uses $CFG
* @param string $directory directory name under $CFG->dataroot/lang eg cs_utf8_local
* @param string $directory full path to the directory under $langbase
* @return string|false Returns full path to directory if successful, false if not
*/
function lang_make_directory($dir, $shownotices=true) {
+1 -1
View File
@@ -168,7 +168,7 @@
$settings = "";
}
$count = count_records("$module->name");
$count = count_records_select("$module->name",'course<>0');
if ($module->visible) {
$visible = "<a href=\"modules.php?hide=$module->name&amp;sesskey=$USER->sesskey\" title=\"$strhide\">".
+1 -1
View File
@@ -46,7 +46,7 @@ function online_assignment_cleanup($output=false) {
/// get a list of all courses on this site
$courses = get_courses();
$courses = get_records('course');
/// cycle through each course
foreach ($courses as $course) {
+1 -1
View File
@@ -24,7 +24,7 @@
}
if (empty($CFG->siteidentifier)) { // Unique site identification code
set_config('siteidentifier', random_string(32));
set_config('siteidentifier', random_string(32).$_SERVER['HTTP_HOST']);
}
+11 -8
View File
@@ -31,9 +31,9 @@
$tableprefix = $CFG->prefix.'stats_';
$earliestday = get_field_sql('SELECT timeend FROM '.$tableprefix.'daily ORDER BY timeend LIMIT 1');
$earliestweek = get_field_sql('SELECT timeend FROM '.$tableprefix.'weekly ORDER BY timeend LIMIT 1');
$earliestmonth = get_field_sql('SELECT timeend FROM '.$tableprefix.'monthly ORDER BY timeend LIMIT 1');
$earliestday = get_field_sql('SELECT timeend FROM '.$tableprefix.'daily ORDER BY timeend');
$earliestweek = get_field_sql('SELECT timeend FROM '.$tableprefix.'weekly ORDER BY timeend');
$earliestmonth = get_field_sql('SELECT timeend FROM '.$tableprefix.'monthly ORDER BY timeend');
if (empty($earliestday)) $earliestday = time();
if (empty($earliestweek)) $earliestweek = time();
@@ -66,24 +66,27 @@
$param = stats_get_parameters($time,$report,SITEID,STATS_MODE_RANKED);
if (!empty($param->sql)) {
$sql = $param->sql ." LIMIT ".$numcourses;
$sql = $param->sql;
} else {
$sql = "SELECT courseid,".$param->fields." FROM ".$CFG->prefix.'stats_'.$param->table
." WHERE timeend >= ".$param->timeafter.' AND stattype = \'activity\''
." GROUP BY courseid "
.$param->extras
." ORDER BY ".$param->orderby
." LIMIT ".$numcourses;
." ORDER BY ".$param->orderby;
}
error_log($sql);
$courses = get_records_sql($sql);
$courses = get_records_sql($sql, 0, $numcourses);
if (empty($courses)) {
notify(get_string('statsnodata'));
} else {
echo '<div align="center"><img src="'.$CFG->wwwroot.'/'.$CFG->admin.'/report/courseoverview/reportsgraph.php?time='.$time.'&report='.$report.'&numcourses='.$numcourses.'" /></div>';
if (empty($CFG->gdversion)) {
echo '<div align="center">(' . get_string("gdneed") .')</div>';
} else {
echo '<div align="center"><img src="'.$CFG->wwwroot.'/'.$CFG->admin.'/report/courseoverview/reportsgraph.php?time='.$time.'&report='.$report.'&numcourses='.$numcourses.'" /></div>';
}
$table = new StdClass;
$table->align = array('left','center','center','center');
+5 -4
View File
@@ -17,17 +17,16 @@
$param = stats_get_parameters($time,$report,SITEID,STATS_MODE_RANKED);
if (!empty($param->sql)) {
$sql = $param->sql ." LIMIT ".$numcourses;
$sql = $param->sql;
} else {
$sql = "SELECT courseid,".$param->fields." FROM ".$CFG->prefix.'stats_'.$param->table
." WHERE timeend >= ".$param->timeafter.' AND stattype = \'activity\''
." GROUP BY courseid "
.$param->extras
." ORDER BY ".$param->orderby
." LIMIT ".$numcourses;
." ORDER BY ".$param->orderby;
}
$courses = get_records_sql($sql);
$courses = get_records_sql($sql, 0, $numcourses);
if (empty($courses)) {
error(get_string('statsnodata'),$CFG->wwwroot.'/'.$CFG->admin.'/report/course/index.php');
@@ -40,6 +39,8 @@
$graph->parameter['legend_size'] = 10;
$graph->parameter['x_axis_angle'] = 90;
$graph->parameter['title'] = false; // moodle will do a nicer job.
$graph->y_tick_labels = null;
$graph->offset_relation = null;
if ($report != STATS_REPORT_ACTIVE_COURSES) {
$graph->parameter['y_decimal_left'] = 2;
}
+1 -1
View File
@@ -67,7 +67,7 @@
// $strstats";
// print_header("$course->shortname: $strstats", "$course->fullname",
// $crumb, '', '', true, '&nbsp', $menu);
// $crumb, '', '', true, '&nbsp;', $menu);
require_once($CFG->dirroot.'/course/report/stats/report.php');
+24 -13
View File
@@ -23,18 +23,33 @@
document.assignform.remove.disabled=false;
document.assignform.addselect.selectedIndex=-1;" />
<?php
foreach ($contextusers as $contextuser) {
$fullname = fullname($contextuser, true);
echo "<option value=\"$contextuser->id\">".$fullname.", ".$contextuser->email."</option>\n";
}
$i = 0;
foreach ($contextusers as $contextuser) {
$fullname = fullname($contextuser, true);
if ($contextuser->hidden) {
$hidden=' ('.get_string('hiddenassign').') ';
} else {
$hidden="";
}
echo "<option value=\"$contextuser->id\">".$fullname.", ".$contextuser->email.$hidden."</option>\n";
$i++;
}
if ($i==0) {
echo '<option/>'; // empty select breaks xhtml strict
}
?>
</select></td>
<td valign="top">
<label title="<?php print_string('hiddenassign') ?>">
<input type="checkbox" name="hidden" value="1" />
<img src="<?php echo $CFG->pixpath; ?>/t/hide.gif" alt="<?php print_string('hiddenassign') ?>" class="hide-show-image" /> <?
helpbutton ('hiddenassign', get_string('hiddenassign'));
?>
</label>
<br />
<input name="add" type="submit" id="add" value="&larr;" />
<br />
<input name="remove" type="submit" id="remove" value="&rarr;" />
<input name="add" id="add" type="submit" value="<?php echo '&nbsp;&nbsp;&nbsp;'.$THEME->larrow.'&nbsp;'.get_string('add'); ?>" title="<?php print_string('add'); ?>" /><br />
<input name="remove" id="remove" type="submit" value="<?php echo '&nbsp;&nbsp;&nbsp;'.get_string('remove'). '&nbsp;'.$THEME->rarrow.'&nbsp;'; ?>" title="<?php print_string('remove'); ?>" />
<br />
</td>
<td valign="top">
@@ -46,13 +61,11 @@
if (!empty($searchtext)) {
echo "<optgroup label=\"$strsearchresults (" . $availableusers->_numOfRows . ")\">\n";
while (! $availableusers->EOF) {
$user = $availableusers->FetchObj();
while ($user = rs_fetch_next_record($availableusers)) {
if (!isset($contextusers[$user->id])) {
$fullname = fullname($user, true);
echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
}
$availableusers->MoveNext();
}
echo "</optgroup>\n";
@@ -61,13 +74,11 @@
echo '<optgroup label="'.get_string('toomanytoshow').'"><option></option></optgroup>'."\n"
.'<optgroup label="'.get_string('trysearching').'"><option></option></optgroup>'."\n";
} else {
while (! $availableusers->EOF) {
$user = $availableusers->FetchObj();
while ($user = rs_fetch_next_record($availableusers)) {
if (!isset($contextusers[$user->id])) {
$fullname = fullname($user, true);
echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
}
$availableusers->MoveNext();
}
}
}
+31 -7
View File
@@ -116,7 +116,6 @@
$adminroot = admin_get_root();
admin_externalpage_setup('assignroles', $adminroot);
admin_externalpage_print_header($adminroot);
print_heading($straction);
} else {
$currenttab = '';
$tabsmode = 'assign';
@@ -158,8 +157,25 @@
} else if ($remove and !empty($frm->removeselect) and confirm_sesskey()) {
$sitecontext = get_context_instance(CONTEXT_SYSTEM);
$topleveladmin = false;
// we only worry about this if the role has doanything capability at site level
if ($context->id == $sitecontext->id && $adminroles = get_roles_with_capability('moodle/site:doanything', CAP_ALLOW, $sitecontext)) {
foreach ($adminroles as $adminrole) {
if ($adminrole->id == $roleid) {
$topleveladmin = true;
}
}
}
foreach ($frm->removeselect as $removeuser) {
$removeuser = clean_param($removeuser, PARAM_INT);
if ($topleveladmin && ($removeuser == $USER->id)) { // Prevent unassigning oneself from being admin
continue;
}
if (! role_unassign($roleid, $removeuser, 0, $context->id)) {
$errors[] = "Could not remove user with id $removeuser from this role!";
} else if ($inmeta) {
@@ -179,12 +195,19 @@
}
}
print_heading_with_help(get_string('assignroles', 'role'), 'assignroles');
if ($context->contextlevel==CONTEXT_SYSTEM) {
print_simple_box(get_string('globalroleswarning', 'role'));
}
if ($roleid) { /// prints a form to swap roles
/// Get all existing participants in this context.
// Why is this not done with get_users???
if (!$contextusers = get_role_users($roleid, $context, false, 'u.id, u.firstname, u.lastname, u.email')) {
if (!$contextusers = get_role_users($roleid, $context, false, 'u.id, u.firstname, u.lastname, u.email, r.hidden')) {
$contextusers = array();
}
@@ -243,14 +266,15 @@
$table->tablealign = 'center';
$table->cellpadding = 5;
$table->cellspacing = 0;
$table->width = '20%';
$table->head = array(get_string('roles', 'role'), get_string('users'));
$table->wrap = array('nowrap', 'nowrap');
$table->align = array('right', 'center');
$table->width = '60%';
$table->head = array(get_string('roles', 'role'), get_string('description'), get_string('users'));
$table->wrap = array('nowrap', '', 'nowrap');
$table->align = array('right', 'left', 'center');
foreach ($assignableroles as $roleid => $rolename) {
$countusers = count_role_users($roleid, $context);
$table->data[] = array('<a href="'.$baseurl.'&amp;roleid='.$roleid.'">'.$rolename.'</a>', $countusers);
$description = format_string(get_field('role', 'description', 'id', $roleid));
$table->data[] = array('<a href="'.$baseurl.'&amp;roleid='.$roleid.'">'.$rolename.'</a>',$description, $countusers);
}
print_table($table);
+37 -22
View File
@@ -52,17 +52,24 @@
</tr>
</table>
<?php print_heading(get_string('permissions','role')) ?>
<?php
print_heading_with_help(get_string('permissions','role'), 'permissions');
$strinherit = get_string('inherit','role');
$strallow = get_string('allow','role');
$strprevent = get_string('prevent','role');
$strprohibit = get_string('prohibit','role');
?>
<table class="rolecap" align="center">
<tr>
<th class="name" align="left"><?php print_string('capability','role') ?></th>
<th class="inherit"><?php print_string('inherit','role') ?></th>
<th class="allow"><?php print_string('allow','role') ?></th>
<th class="prevent"><?php print_string('prevent','role') ?></th>
<th class="prohibit"><?php print_string('prohibit','role') ?></th>
<th class="risk"><?php print_string('risks','role') ?></th>
<th class="inherit"><?php p($strinherit); ?></th>
<th class="allow"><?php p($strallow); ?></th>
<th class="prevent"><?php p($strprevent); ?></th>
<th class="prohibit"><?php p($strprohibit); ?></th>
<th class="risk" colspan="5"><?php print_string('risks','role') ?></th>
</tr>
<?php
@@ -71,10 +78,13 @@
$contextlevel = 0;
$component = '';
$strrisks = s(get_string('risks', 'role'));
$strcapabilities = s(get_string('capabilities', 'role'));
foreach ($capabilities as $capability) {
// prints a breaker if component or name or context level
if ($capability->component != $component or $capability->contextlevel != $contextlevel) {
echo ('<tr class="rolecapheading header"><td colspan="6" class="header"><strong>'.
echo ('<tr class="rolecapheading header"><td colspan="10" class="header"><strong>'.
get_component_string($capability->component, $capability->contextlevel).'</strong></td></tr>');
}
@@ -91,42 +101,47 @@ foreach ($capabilities as $capability) {
$localoverride->permission = $role->{$capability->name};
}
$disabled = ($action != 'edit') ? ' disabled="disabled" ' : '';
$disabled = ($action != 'edit' and $action != 'add') ? ' disabled="disabled" ' : '';
$riskinfo = '';
$riskinfo = '<td class="risk managetrust">';
$rowclasses = '';
if (RISK_MANAGETRUST & (int)$capability->riskbitmask) {
$riskinfo .= '<a title="'.get_string('riskmanagetrust', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/Risks">T</a>';
$riskinfo .= '<a target="docspopup" title="'.get_string('riskmanagetrust', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">T</a>';
$rowclasses .= ' riskmanagetrust';
}
$riskinfo .= '</td><td class="risk config">';
if (RISK_CONFIG & (int)$capability->riskbitmask) {
$riskinfo .= '<a title="'.get_string('riskconfig', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/Risks">C</a>';
$riskinfo .= '<a target="docspopup" title="'.get_string('riskconfig', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">C</a>';
$rowclasses .= ' riskconfig';
}
$riskinfo .= '</td><td class="risk xss">';
if (RISK_XSS & (int)$capability->riskbitmask) {
$riskinfo .= '<a title="'.get_string('riskxss', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/Risks">X</a>';
$riskinfo .= '<a target="docspopup" title="'.get_string('riskxss', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">X</a>';
$rowclasses .= ' riskxss';
}
$riskinfo .= '</td><td class="risk personal">';
if (RISK_PERSONAL & (int)$capability->riskbitmask) {
$riskinfo .= '<a title="'.get_string('riskpersonal', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/Risks">P</a>';
$riskinfo .= '<a target="docspopup" title="'.get_string('riskpersonal', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">P</a>';
$rowclasses .= ' riskpersonal';
}
$riskinfo .= '</td><td class="risk spam">';
if (RISK_SPAM & (int)$capability->riskbitmask) {
$riskinfo .= '<a title="'.get_string('riskspam', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/Risks">S</a>';
$riskinfo .= '<a target="docspopup" title="'.get_string('riskspam', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">S</a>';
$rowclasses .= ' riskspam';
}
$riskinfo .= '</td>';
?>
<tr class="rolecap <?php echo $rowclasses; ?>">
<td class="name"><span title="<?php echo $capability->name ?>"><?php echo get_capability_string($capability->name); ?></span></td>
<td class="inherit"><input type="radio" name="<?php echo $capability->name; ?>" value="<?php echo CAP_INHERIT ?>" <?php if (!isset($localoverride->permission) || $localoverride->permission==CAP_INHERIT){ echo 'checked="checked"'; }?> <?php echo $disabled; ?>/></td>
<td class="allow"><input type="radio" name="<?php echo $capability->name; ?>" value="<?php echo CAP_ALLOW ?>" <?php if (isset($localoverride->permission) && $localoverride->permission==CAP_ALLOW){ echo 'checked="checked"'; }?> <?php echo $disabled; ?>/></td>
<td class="prevent" ><input type="radio" name="<?php echo $capability->name; ?>" value="<?php echo CAP_PREVENT ?>" <?php if (isset($localoverride->permission) && $localoverride->permission==CAP_PREVENT){ echo 'checked="checked"'; }?> <?php echo $disabled; ?>/></td>
<td class="prohibit" ><input type="radio" name="<?php echo $capability->name; ?>" value="<?php echo CAP_PROHIBIT ?>" <?php if (isset($localoverride->permission) && $localoverride->permission==CAP_PROHIBIT){ echo 'checked="checked"'; }?> <?php echo $disabled; ?>/></td>
<td class="risk"><?php
echo $riskinfo;
?></td>
<td class="name"><span class="cap-desc"><a target="docspopup" href="<?php echo $CFG->docroot.'/'.$lang.'/'.$strcapabilities.'/'.$capability->name ?>"><?php echo get_capability_string($capability->name); ?></a><span class="cap-name"><?php echo $capability->name ?></span></label></td>
<td class="inherit"><input type="radio" title="<?php p($strinherit); ?>" name="<?php echo $capability->name; ?>" value="<?php echo CAP_INHERIT ?>" <?php if (!isset($localoverride->permission) || $localoverride->permission==CAP_INHERIT){ echo 'checked="checked"'; }?> <?php echo $disabled; ?>/></td>
<td class="allow"><input type="radio" title="<?php p($strallow); ?>" name="<?php echo $capability->name; ?>" value="<?php echo CAP_ALLOW ?>" <?php if (isset($localoverride->permission) && $localoverride->permission==CAP_ALLOW){ echo 'checked="checked"'; }?> <?php echo $disabled; ?>/></td>
<td class="prevent" ><input type="radio" title="<?php p($strprevent); ?>" name="<?php echo $capability->name; ?>" value="<?php echo CAP_PREVENT ?>" <?php if (isset($localoverride->permission) && $localoverride->permission==CAP_PREVENT){ echo 'checked="checked"'; }?> <?php echo $disabled; ?>/></td>
<td class="prohibit" ><input type="radio" title="<?php p($strprohibit); ?>" name="<?php echo $capability->name; ?>" value="<?php echo CAP_PROHIBIT ?>" <?php if (isset($localoverride->permission) && $localoverride->permission==CAP_PROHIBIT){ echo 'checked="checked"'; }?> <?php echo $disabled; ?>/></td>
<?php echo $riskinfo; ?>
</tr>
<?php } ?>
+9 -5
View File
@@ -16,6 +16,7 @@
$cancel = optional_param('cancel', 0, PARAM_BOOL);
$sitecontext = get_context_instance(CONTEXT_SYSTEM, SITEID);
require_capability('moodle/role:manage', $sitecontext);
if ($cancel) {
redirect('manage.php');
@@ -171,6 +172,7 @@
// update normal role settings
$role->id = $roleid;
$role->name = $name;
$role->shortname = $shortname;
$role->description = $description;
if (!update_record('role', $role)) {
@@ -223,9 +225,9 @@
if (array_key_exists($roleid, $roles) and confirm_sesskey()) {
$role = $roles[$roleid];
if ($role->sortorder + 1 < $rolescount) {
$bellow = $roles[$rolesort[$role->sortorder + 1]];
$below = $roles[$rolesort[$role->sortorder + 1]];
if (!switch_roles($role, $bellow)) {
if (!switch_roles($role, $below)) {
error("Cannot move role with ID $roleid");
}
}
@@ -280,13 +282,13 @@
switch ($action) {
case 'add':
print_heading(get_string('addrole', 'role'));
print_heading_with_help(get_string('addrole', 'role'), 'roles');
break;
case 'view':
print_heading(get_string('viewrole', 'role'));
print_heading_with_help(get_string('viewrole', 'role'), 'roles');
break;
case 'edit':
print_heading(get_string('editrole', 'role'));
print_heading_with_help(get_string('editrole', 'role'), 'roles');
break;
}
@@ -317,6 +319,8 @@
} else {
print_heading_with_help(get_string('roles', 'role'), 'roles');
$table = new object;
$table->tablealign = 'center';
+1 -1
View File
@@ -1,7 +1,7 @@
<?php
// this page deals with the 2 tabs for manage.php and grant.php
$toprow[] = new tabobject('manage', $CFG->wwwroot.'/'.$CFG->admin.'/roles/manage.php', get_string('manageroles', 'role'));
$toprow[] = new tabobject('manage', $CFG->wwwroot.'/'.$CFG->admin.'/roles/manage.php', get_string('manageroles', 'role'),'', true);
$toprow[] = new tabobject('allowassign', $CFG->wwwroot.'/'.$CFG->admin.'/roles/allowassign.php', get_string('allowassign', 'role'));
+34 -19
View File
@@ -1,3 +1,10 @@
<?php
$strinherit = get_string('inherit','role');
$strallow = get_string('allow','role');
$strprevent = get_string('prevent','role');
$strprohibit = get_string('prohibit','role');
?>
<form name="overrideform" action="override.php" method="post">
<input type="hidden" name="contextid" value="<?php p($contextid) ?>">
<input type="hidden" name="roleid" value="<?php p($roleid) ?>">
@@ -8,11 +15,11 @@
<table class="rolecap">
<tr>
<th class="name" align="left"><?php print_string('capability','role') ?></th>
<th class="inherit"><?php print_string('inherit','role') ?></th>
<th class="allow"><?php print_string('allow','role') ?></th>
<th class="prevent"><?php print_string('prevent','role') ?></th>
<th class="prohibit"><?php print_string('prohibit','role') ?></th>
<th class="risk"><?php print_string('risks','role') ?></th>
<th class="inherit"><?php p($strinherit); ?></th>
<th class="allow"><?php p($strallow); ?></th>
<th class="prevent"><?php p($strprevent); ?></th>
<th class="prohibit"><?php p($strprohibit); ?></th>
<th class="risk" colspan="5"><?php print_string('risks','role') ?></th>
</tr>
<?php
@@ -20,10 +27,13 @@
$contextlevel = 0;
$component = '';
$strrisks = s(get_string('risks', 'role'));
$strcapabilities = s(get_string('capabilities', 'role'));
foreach ($capabilities as $capability) {
// prints a breaker if component or name or context level
if ($capability->component != $component or $capability->contextlevel != $contextlevel) {
echo ('<tr class="rolecapheading header"><td colspan="6" class="header"><strong>'.get_component_string($capability->component, $capability->contextlevel).'</strong></td></tr>');
echo ('<tr class="rolecapheading header"><td colspan="10" class="header"><strong>'.get_component_string($capability->component, $capability->contextlevel).'</strong></td></tr>');
}
// these 2 are used to see to group same mod/core capabilities together
@@ -49,63 +59,68 @@
$isdisabled = $isprohibit || islegacy($capability->name);
$riskinfo = '';
$riskinfo = '<td class="risk managetrust">';
$rowclasses = '';
if (RISK_MANAGETRUST & (int)$capability->riskbitmask) {
$riskinfo .= '<a title="'.get_string('riskmanagetrust', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/Risks">T</a>';
$riskinfo .= '<a target="docspopup" title="'.get_string('riskmanagetrust', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">T</a>';
$rowclasses .= ' riskmanagetrust';
}
$riskinfo .= '</td><td class="risk config">';
if (RISK_CONFIG & (int)$capability->riskbitmask) {
$riskinfo .= '<a title="'.get_string('riskconfig', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/Risks">C</a>';
$riskinfo .= '<a target="docspopup" title="'.get_string('riskconfig', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">C</a>';
$rowclasses .= ' riskconfig';
}
$riskinfo .= '</td><td class="risk xss">';
if (RISK_XSS & (int)$capability->riskbitmask) {
$riskinfo .= '<a title="'.get_string('riskxss', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/Risks">X</a>';
$riskinfo .= '<a target="docspopup" title="'.get_string('riskxss', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">X</a>';
$rowclasses .= ' riskxss';
}
$riskinfo .= '</td><td class="risk personal">';
if (RISK_PERSONAL & (int)$capability->riskbitmask) {
$riskinfo .= '<a title="'.get_string('riskpersonal', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/Risks">P</a>';
$riskinfo .= '<a target="docspopup" title="'.get_string('riskpersonal', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">P</a>';
$rowclasses .= ' riskpersonal';
}
$riskinfo .= '</td><td class="risk spam">';
if (RISK_SPAM & (int)$capability->riskbitmask) {
$riskinfo .= '<a title="'.get_string('riskspam', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/Risks">S</a>';
$riskinfo .= '<a target="docspopup" title="'.get_string('riskspam', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">S</a>';
$rowclasses .= ' riskspam';
}
$riskinfo .= '</td>';
?>
<tr class="rolecap <?php echo $rowclasses; ?>">
<td class="name"><?php echo get_capability_string($capability->name); ?></td>
<td class="name"><span class="cap-desc"><a target="docspopup" href="<?php echo $CFG->docroot.'/'.$lang.'/'.$strcapabilities.'/'.$capability->name ?>"><?php echo get_capability_string($capability->name); ?></a><span class="cap-name"><?php echo $capability->name ?></span></label></td>
<td class="inherit">
<input type="radio" name="<?php echo $capability->name; ?>" value="0"
<input type="radio" title="<?php p($strinherit); ?>" name="<?php echo $capability->name; ?>" value="0"
<?php
if ($localpermission == CAP_INHERIT) {echo 'checked="checked"';}
if ($isdisabled) {echo 'disabled="disabled"';}?> />
</td>
<td class="inherit <?php if ($isallow) {echo ' capcurrent';} ?>">
<input type="radio" name="<?php echo $capability->name; ?>"
<td class="allow <?php if ($isallow) {echo ' capcurrent';} ?>">
<input type="radio" title="<?php p($strallow); ?>" name="<?php echo $capability->name; ?>"
<?php echo ' value="'.CAP_ALLOW.'"';
if ($localpermission == CAP_ALLOW) {echo ' checked="checked"';}
if ($isdisabled) {echo ' disabled="disabled"';}?> />
</td>
<td class="prevent <?php if ($isprevent) {echo ' capcurrent';} ?>">
<input type="radio" name="<?php echo $capability->name; ?>"
<input type="radio" title="<?php p($strprevent); ?>" name="<?php echo $capability->name; ?>"
<?php echo ' value="'.CAP_PREVENT.'"';
if ($localpermission == CAP_PREVENT) {echo ' checked="checked"';}
if ($isdisabled) {echo ' disabled="disabled"';}?> />
</td>
<td class="prohibit <?php if ($isprohibit) {echo ' capcurrent';} ?>">
<input type="radio" name="<?php echo $capability->name; ?>"
<input type="radio" title="<?php p($strprohibit); ?>" name="<?php echo $capability->name; ?>"
<?php echo ' value="'.CAP_PROHIBIT.'"';
if ($localpermission == CAP_PROHIBIT) {echo ' checked="checked"';}
if ($isdisabled) {echo ' disabled="disabled"';}?> />
</td>
<td class="risk"><?php echo $riskinfo; ?></td>
<?php echo $riskinfo; ?>
</tr>
<?php } ?>
+7 -5
View File
@@ -141,6 +141,7 @@
include_once('tabs.php');
}
print_heading_with_help(get_string('overrides', 'role'), 'overrides');
$overridableroles = get_overridable_roles($context);
@@ -188,15 +189,16 @@
$table->tablealign = 'center';
$table->cellpadding = 5;
$table->cellspacing = 0;
$table->width = '20%';
$table->head = array(get_string('roles', 'role'), get_string('overrides', 'role'));
$table->wrap = array('nowrap', 'nowrap');
$table->align = array('right', 'center');
$table->width = '60%';
$table->head = array(get_string('roles', 'role'), get_string('description'), get_string('overrides', 'role'));
$table->wrap = array('nowrap', '', 'nowrap');
$table->align = array('right', 'left', 'center');
foreach ($overridableroles as $roleid => $rolename) {
$countusers = 0;
$overridecount = count_records_select('role_capabilities', "roleid = $roleid AND contextid = $context->id");
$table->data[] = array('<a href="'.$baseurl.'&amp;roleid='.$roleid.'">'.$rolename.'</a>', $overridecount);
$description = format_string(get_field('role', 'description', 'id', $roleid));
$table->data[] = array('<a href="'.$baseurl.'&amp;roleid='.$roleid.'">'.$rolename.'</a>', $description, $overridecount);
}
print_table($table);
+23 -15
View File
@@ -13,43 +13,50 @@ admin_externalpage_setup('search', $adminroot); // now hidden page
$CFG->adminsearchquery = $query; // So we can reference it in search boxes later in this invocation
$resultshtml = search_settings_html(admin_get_root(), $query);
// now we'll deal with the case that the admin has submitted the form with changed settings
$statusmsg = '';
if ($data = data_submitted()) {
$data = (array)$data;
$unslashed = (array)stripslashes_recursive($data);
if (confirm_sesskey()) {
$olddbsessions = !empty($CFG->dbsessions);
$changedsettings = search_settings(admin_get_root(), $query);
$errors = '';
foreach($changedsettings as $changedsetting) {
if (isset($data['s_' . $changedsetting->name])) {
$errors .= $changedsetting->write_setting($data['s_' . $changedsetting->name]);
} else {
$errors .= $changedsetting->write_setting($changedsetting->defaultsetting);
if (!isset($unslashed['s_' . $changedsetting->name])) {
$unslashed['s_' . $changedsetting->name] = ''; // needed for checkboxes
}
$errors .= $changedsetting->write_setting($unslashed['s_' . $changedsetting->name]);
}
if ($olddbsessions != !empty($CFG->dbsessions)) {
require_logout();
}
if (empty($errors)) {
// there must be either redirect without message or continue button or else upgrade would be sometimes broken
redirect($CFG->wwwroot . '/' . $CFG->admin . '/search.php?query=' . $query);
die;
$statusmsg = get_string('changessaved');
} else {
error(get_string('errorwithsettings', 'admin') . ' <br />' . $errors);
die;
$statusmsg = get_string('errorwithsettings', 'admin') . ' <br />' . $errors;
}
} else {
error(get_string('confirmsesskeybad', 'error'));
die;
}
// now update $SITE - it might have been changed
$SITE = get_record('course', 'id', $SITE->id);
$COURSE = clone($SITE);
}
// and finally, if we get here, then there are matching settings and we have to print a form
// to modify them
admin_externalpage_print_header($adminroot);
// print_simple_box(get_string('upgradesettingsintro','admin'),'','100%','',5,'generalbox','');
if ($statusmsg != '') {
notify ($statusmsg);
}
$resultshtml = search_settings_html(admin_get_root(), $query);
echo '<form action="search.php" method="post" name="adminsettings" id="adminsettings">';
echo '<input type="hidden" name="sesskey" value="' . sesskey() . '" />';
@@ -62,6 +69,7 @@ if ($resultshtml != '') {
} else {
echo get_string('noresults','admin');
}
echo '</fieldset>';
echo '</form>';
admin_externalpage_print_footer($adminroot);
+20 -10
View File
@@ -49,12 +49,17 @@ if (!($root->check_access())) {
$CFG->pagepath = 'admin/setting/'.$section;
// WRITING SUBMITTED DATA (IF ANY) -------------------------------------------------------------------------------
/// WRITING SUBMITTED DATA (IF ANY) -------------------------------------------------------------------------------
$statusmsg = '';
if ($data = data_submitted()) {
if (confirm_sesskey()) {
$olddbsessions = !empty($CFG->dbsessions);
$errors = $root->write_settings((array)$data);
$unslashed = (array)stripslashes_recursive($data);
$errors = $root->write_settings($unslashed);
//force logout if dbsession setting changes
if ($olddbsessions != !empty($CFG->dbsessions)) {
require_logout();
@@ -66,22 +71,22 @@ if ($data = data_submitted()) {
case 'admin':
redirect("$CFG->wwwroot/$CFG->admin/");
default:
// following redirect should display confirmation message because it redirects
// to the same page, user might not know if save button worked
redirect("$CFG->wwwroot/$CFG->admin/settings.php?section=" . $PAGE->section, get_string('changessaved'),2);
$statusmsg = get_string('changessaved');
}
} else {
error(get_string('errorwithsettings', 'admin') . ' <br />' . $errors);
$statusmsg = get_string('errorwithsettings', 'admin') . ' <br />' . $errors;
}
} else {
error(get_string('confirmsesskeybad', 'error'));
die;
}
// now update $SITE - it might have been changed
$SITE = get_record('course', 'id', $SITE->id);
$COURSE = clone($SITE);
}
// ---------------------------------------------------------------------------------------------------------------
/// print header stuff ------------------------------------------------------------
// header must be printed after the redirects and require_logout
if (!empty($SITE->fullname)) {
$pageblocks = blocks_setup($PAGE);
@@ -90,7 +95,6 @@ if (!empty($SITE->fullname)) {
$preferred_width_right = bounded_number(BLOCK_R_MIN_WIDTH, blocks_preferred_width($pageblocks[BLOCK_POS_RIGHT]),
BLOCK_R_MAX_WIDTH);
// print header stuff
$PAGE->print_header();
echo '<table id="layout-table"><tr>';
@@ -105,6 +109,12 @@ if (!empty($SITE->fullname)) {
}
if ($statusmsg != '') {
notify ($statusmsg);
}
// ---------------------------------------------------------------------------------------------------------------
echo '<form action="settings.php" method="post" name="adminsettings" id="adminsettings">';
echo '<input type="hidden" name="section" value="' . $PAGE->section . '" />';
echo '<input type="hidden" name="sesskey" value="' . $USER->sesskey . '" />';
+12 -2
View File
@@ -17,8 +17,8 @@ $ADMIN->add('themes', new admin_externalpage('themeselector', get_string('themes
// "frontpage" settingpage
$temp = new admin_settingpage('frontpage', get_string('frontpage','admin'));
$temp->add(new admin_setting_sitesettext('fullname', get_string('fullsitename'), '', '', PARAM_NOTAGS));
$temp->add(new admin_setting_sitesettext('shortname', get_string('shortsitename'), '', PARAM_NOTAGS));
$temp->add(new admin_setting_sitesettext('fullname', get_string('fullsitename'), '', ''));
$temp->add(new admin_setting_sitesettext('shortname', get_string('shortsitename'), '', ''));
$temp->add(new admin_setting_special_frontpagedesc());
$temp->add(new admin_setting_courselist_frontpage(false)); // non-loggedin version of the setting (that's what the parameter is for :) )
$temp->add(new admin_setting_courselist_frontpage(true)); // loggedin version of the setting
@@ -118,6 +118,16 @@ $temp = new admin_settingpage('mymoodle', get_string('mymoodle', 'admin'));
$temp->add(new admin_setting_configcheckbox('mymoodleredirect', get_string('mymoodleredirect', 'admin'), get_string('configmymoodleredirect', 'admin'), 0));
$ADMIN->add('appearance', $temp);
// new CFG variable for gradebook (what roles to display)
$temp = new admin_settingpage('gradebook', get_string('gradebook', 'admin'));
$temp->add(new admin_setting_special_gradebookroles());
$ADMIN->add('appearance', $temp);
// new CFG variable for coursemanager (what roles to display)
$temp = new admin_settingpage('coursemanager', get_string('coursemanager', 'admin'));
$temp->add(new admin_setting_special_coursemanager());
$ADMIN->add('appearance', $temp);
$ADMIN->add('appearance', new admin_externalpage('stickyblocks', get_string('stickyblocks', 'admin'), "$CFG->wwwroot/$CFG->admin/stickyblocks.php"));
?>
-1
View File
@@ -5,7 +5,6 @@ $temp = new admin_settingpage('locationsettings', get_string('locationsettings',
$options = get_list_of_timezones();
$options[99] = get_string('serverlocaltime');
$temp->add(new admin_setting_configselect('timezone', get_string('timezone','admin'), get_string('configtimezone', 'admin'), 99, $options));
$options = get_list_of_timezones();
$options[99] = get_string('timezonenotforced', 'admin');
$temp->add(new admin_setting_configselect('forcetimezone', get_string('forcetimezone', 'admin'), get_string('helpforcetimezone', 'admin'), 99, $options));
$options = get_list_of_countries();
+9 -1
View File
@@ -1,9 +1,17 @@
<?php // $Id$
// * Miscellaneous settings (still to be sorted)
// * Miscellaneous settings
// Experimental settings page
$temp = new admin_settingpage('experimental', get_string('experimental', 'admin'));
$temp->add(new admin_setting_configcheckbox('enableajax', get_string('enableajax', 'admin'), get_string('configenableajax', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('enableglobalsearch', get_string('enableglobalsearch', 'admin'), get_string('configenableglobalsearch', 'admin'), 0));
$ADMIN->add('misc', $temp);
// XMLDB editor
$ADMIN->add('misc', new admin_externalpage('xmldbeditor', get_string('xmldbeditor'), "$CFG->wwwroot/$CFG->admin/xmldb/"));
// hidden scripts linked from elsewhere
$ADMIN->add('misc', new admin_externalpage('oacleanup', 'Online Assignment Cleanup', $CFG->wwwroot.'/'.$CFG->admin.'/oacleanup.php', 'moodle/site:config', true));
$ADMIN->add('misc', new admin_externalpage('upgradeforumread', 'Upgrade forum', $CFG->wwwroot.'/'.$CFG->admin.'/upgradeforumread.php', 'moodle/site:config', true));
+4 -3
View File
@@ -6,7 +6,7 @@
$temp = new admin_settingpage('sitepolicies', get_string('sitepolicies', 'admin'));
$temp->add(new admin_setting_configcheckbox('protectusernames', get_string('protectusernames', 'admin'), get_string('configprotectusernames', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('forcelogin', get_string('forcelogin', 'admin'), get_string('configforcelogin', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('forceloginforprofiles', get_string('forceloginforprofiles', 'admin'), get_string('configforceloginforprofiles', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('forceloginforprofiles', get_string('forceloginforprofiles', 'admin'), get_string('configforceloginforprofiles', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('opentogoogle', get_string('opentogoogle', 'admin'), get_string('configopentogoogle', 'admin'), 0));
$temp->add(new admin_setting_configtext('maxbytes', get_string('maxbytes', 'admin'), get_string('configmaxbytes', 'admin'), 0, PARAM_INT));
$temp->add(new admin_setting_configcheckbox('messaging', get_string('messaging', 'admin'), get_string('configmessaging','admin'), 1));
@@ -32,6 +32,7 @@ $temp->add(new admin_setting_configselect('bloglevel', get_string('bloglevel', '
2 => get_string('groupblogs','blog'),
1 => get_string('personalblogs','blog'),
0 => get_string('disableblogs','blog'))));
$temp->add(new admin_setting_configcheckbox('profilesforenrolledusersonly', get_string('profilesforenrolledusersonly','admin'),get_string('configprofilesforenrolledusersonly', 'admin'),'1'));
$ADMIN->add('security', $temp);
@@ -87,8 +88,8 @@ $ADMIN->add('security', $temp);
// "antivirus" settingpage
$temp = new admin_settingpage('antivirus', get_string('antivirus', 'admin'));
$temp->add(new admin_setting_configcheckbox('runclamonupload', get_string('runclamavonupload', 'admin'), get_string('configrunclamavonupload', 'admin'), 0));
$temp->add(new admin_setting_configtext('pathtoclam', get_string('pathtoclam', 'admin'), get_string('configpathtoclam', 'admin'), '', PARAM_PATH));
$temp->add(new admin_setting_configtext('quarantinedir', get_string('quarantinedir', 'admin'), get_string('configquarantinedir', 'admin'), '', PARAM_PATH));
$temp->add(new admin_setting_configtext('pathtoclam', get_string('pathtoclam', 'admin'), get_string('configpathtoclam', 'admin'), '', PARAM_RAW)); // TODO: add path validation
$temp->add(new admin_setting_configtext('quarantinedir', get_string('quarantinedir', 'admin'), get_string('configquarantinedir', 'admin'), '', PARAM_RAW)); // TODO: add path validation
$temp->add(new admin_setting_configselect('clamfailureonupload', get_string('clamfailureonupload', 'admin'), get_string('configclamfailureonupload', 'admin'), 'donothing', array('donothing' => get_string('configclamdonothing', 'admin'),
'actlikevirus' => get_string('configclamactlikevirus', 'admin'))));
$ADMIN->add('security', $temp);
+9 -4
View File
@@ -7,10 +7,10 @@ $temp = new admin_settingpage('systempaths', get_string('systempaths','admin'));
$temp->add(new admin_setting_configselect('gdversion', get_string('gdversion','admin'), get_string('configgdversion', 'admin'), check_gd_version(), array('0' => get_string('gdnot'),
'1' => get_string('gd1'),
'2' => get_string('gd2'))));
$temp->add(new admin_setting_configtext('zip', get_string('pathtozip','admin'), get_string('configzip', 'admin'), '', PARAM_PATH));
$temp->add(new admin_setting_configtext('unzip', get_string('pathtounzip','admin'), get_string('configunzip', 'admin'), '', PARAM_PATH));
$temp->add(new admin_setting_configtext('pathtodu', get_string('pathtodu', 'admin'), get_string('configpathtodu', 'admin'), '', PARAM_PATH));
$temp->add(new admin_setting_configtext('aspellpath', get_string('aspellpath', 'admin'), get_string('edhelpaspellpath'), '', PARAM_PATH));
$temp->add(new admin_setting_configtext('zip', get_string('pathtozip','admin'), get_string('configzip', 'admin'), '', PARAM_RAW)); // TODO: add path validation
$temp->add(new admin_setting_configtext('unzip', get_string('pathtounzip','admin'), get_string('configunzip', 'admin'), '', PARAM_RAW)); // TODO: add path validation
$temp->add(new admin_setting_configtext('pathtodu', get_string('pathtodu', 'admin'), get_string('configpathtodu', 'admin'), '', PARAM_RAW)); // TODO: add path validation
$temp->add(new admin_setting_configtext('aspellpath', get_string('aspellpath', 'admin'), get_string('edhelpaspellpath'), '', PARAM_RAW)); // TODO: add path validation
$ADMIN->add('server', $temp, 0);
@@ -175,6 +175,11 @@ $ADMIN->add('server', new admin_externalpage('environment', get_string('environm
$ADMIN->add('server', new admin_externalpage('phpinfo', get_string('phpinfo'), "$CFG->wwwroot/$CFG->admin/phpinfo.php"));
// "performance" settingpage
$temp = new admin_settingpage('performance', get_string('performance', 'admin'));
$temp->add(new admin_setting_configcheckbox('enablerecordcache', get_string('enablerecordcache', 'admin'), get_string('configenablerecordcache', 'admin'), 1));
$ADMIN->add('server', $temp);
if (file_exists("$CFG->dirroot/$CFG->admin/mysql/frame.php")) {
$ADMIN->add('server', new admin_externalpage('database', get_string('managedatabase'), "$CFG->wwwroot/$CFG->admin/mysql/frame.php"));
}
+6 -1
View File
@@ -28,7 +28,12 @@ $ADMIN->add('root', new admin_category('appearance', get_string('appearance','ad
$ADMIN->add('root', new admin_category('server', get_string('server','admin')));
$ADMIN->add('root', new admin_category('reports', get_string('reports')));
foreach(get_list_of_plugins('admin/report') as $plugin) {
foreach (get_list_of_plugins('admin/report') as $plugin) {
/// This snippet is temporary until simpletest can be fixed to use xmldb. See MDL-7377 XXX TODO
if ($plugin == 'simpletest' && $CFG->dbtype != 'mysql' && $CFG->dbtype != 'postgres7') {
continue;
}
/// End of removable snippet
$ADMIN->add('reports', new admin_externalpage('report'.$plugin, get_string($plugin, 'admin'), "$CFG->wwwroot/$CFG->admin/report/$plugin/index.php"));
}
+2 -1
View File
@@ -16,7 +16,8 @@ $ADMIN->add('accounts', new admin_externalpage('uploadusers', get_string('upload
// stuff under the "roles" subcategory
$ADMIN->add('users', new admin_category('roles', get_string('permissions', 'role')));
$ADMIN->add('roles', new admin_externalpage('defineroles', get_string('defineroles', 'role'), "$CFG->wwwroot/$CFG->admin/roles/manage.php"));
$ADMIN->add('roles', new admin_externalpage('assignroles', get_string('assignroles', 'role'), "$CFG->wwwroot/$CFG->admin/roles/assign.php?contextid=" . SITEID));
$sitecontext = get_context_instance(CONTEXT_SYSTEM);
$ADMIN->add('roles', new admin_externalpage('assignroles', get_string('assignglobalroles', 'role'), "$CFG->wwwroot/$CFG->admin/roles/assign.php?contextid=" . $sitecontext->id));
// "userpolicies" settingpage
+3 -3
View File
@@ -24,14 +24,14 @@ if ($newsettingshtml == '') {
// now we'll deal with the case that the admin has submitted the form with new settings
if ($data = data_submitted()) {
$data = (array)$data;
$unslashed = (array)stripslashes_recursive($data);
if (confirm_sesskey()) {
$newsettings = find_new_settings(admin_get_root());
$errors = '';
foreach($newsettings as $newsetting) {
if (isset($data['s_' . $newsetting->name])) {
$errors .= $newsetting->write_setting($data['s_' . $newsetting->name]);
if (isset($unslashed['s_' . $newsetting->name])) {
$errors .= $newsetting->write_setting($unslashed['s_' . $newsetting->name]);
} else {
$errors .= $newsetting->write_setting($newsetting->defaultsetting);
}
-2
View File
@@ -270,7 +270,6 @@ if ($um->preprocess_files() && confirm_sesskey()) {
//This can be used to obtain a list of userids for existing users
notify("$olduser->id ".get_string('usernotaddedregistered', 'error', $username));
$userserrors++;
continue;
}
} else { // new user
@@ -424,4 +423,3 @@ function my_file_get_contents($filename, $use_include_path = 0) {
}
?>
+10 -5
View File
@@ -19,7 +19,7 @@
redirect('index.php');
}
if (!$CFG->rolesactive) { // No admin user yet.
if (empty($CFG->rolesactive)) { // No admin user yet.
$user = new object();
$user->firstname = get_string('admin');
@@ -65,7 +65,7 @@
sesskey(); // For added security, used to check script parameters
load_user_capability();
load_all_capabilities();
redirect("$CFG->wwwroot/user/edit.php?id=$user->id&amp;course=$site->id"); // Edit thyself
exit;
@@ -86,6 +86,11 @@
admin_externalpage_setup('editusers', $adminroot);
}
if (empty($CFG->loginhttps)) {
$securewwwroot = $CFG->wwwroot;
} else {
$securewwwroot = str_replace('http:','https:',$CFG->wwwroot);
}
if ($newuser) { // Create a new user
@@ -111,7 +116,7 @@
}
}
redirect("$CFG->wwwroot/user/edit.php?id=$user->id&amp;course=$site->id");
redirect("$securewwwroot/user/edit.php?id=$user->id&amp;course=$site->id");
} else { // List all users for editing
@@ -169,7 +174,7 @@
$updateuser = new object();
$updateuser->id = $user->id;
$updateuser->deleted = 1;
$updateuser->username = "$user->email.".time(); // Remember it just in case
$updateuser->username = addslashes("$user->email.".time()); // Remember it just in case
$updateuser->email = ''; // Clear this field to free it up
$updateuser->idnumber = ''; // Clear this field to free it up
$updateuser->timemodified = time();
@@ -330,7 +335,7 @@
}
if (has_capability('moodle/user:update', $sitecontext)) {
$editbutton = "<a href=\"../user/edit.php?id=$user->id&amp;course=$site->id\">$stredit</a>";
$editbutton = "<a href=\"$securewwwroot/user/edit.php?id=$user->id&amp;course=$site->id\">$stredit</a>";
if ($user->confirmed == 0) {
$confirmbutton = "<a href=\"user.php?confirmuser=$user->id&amp;sesskey=$USER->sesskey\">" . get_string('confirm') . "</a>";
} else {
+2 -2
View File
@@ -594,8 +594,8 @@ function db_migrate2utf8(){ //Eloy: Perhaps some type of limit parameter here
* converting each record *
**************************/
while(($counter < $totalrecords) and ($fieldname !='dummy') and ($method!='NO_CONV')) { //while there is still something
$SQL = 'SELECT * FROM '.$prefix.$dbtablename.' ORDER BY id ASC '.sql_paging_limit($counter, $recordsetsize);
if ($records = get_records_sql($SQL)) {
$SQL = 'SELECT * FROM '.$prefix.$dbtablename.' ORDER BY id ASC';
if ($records = get_records_sql($SQL, $counter, $recordsetsize)) {
foreach ($records as $record) {
//if we are up this far, either no crash, or crash with same table, field name.
+242 -42
View File
@@ -93,7 +93,7 @@ class test extends XMLDBAction {
$table->addFieldInfo('type', XMLDB_TYPE_CHAR, '20', null, XMLDB_NOTNULL, null, XMLDB_ENUM, array('single', 'news', 'general', 'social', 'eachuser', 'teacher', 'qanda'), 'general');
$table->addFieldInfo('name', XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null, null, '');
$table->addFieldInfo('intro', XMLDB_TYPE_TEXT, 'small', null, XMLDB_NOTNULL, null, null, null, '');
$table->addFieldInfo('logo', XMLDB_TYPE_BINARY, 'big', null, XMLDB_NOTNULL, null, null, null, '');
$table->addFieldInfo('logo', XMLDB_TYPE_BINARY, 'big', null, XMLDB_NOTNULL, null, null, null);
$table->addFieldInfo('assessed', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0');
$table->addFieldInfo('assesstimestart', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0');
$table->addFieldInfo('assesstimefinish', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0');
@@ -114,6 +114,8 @@ class test extends XMLDBAction {
$table->addIndexInfo('course', XMLDB_INDEX_NOTUNIQUE, array('course'));
$table->addIndexInfo('rsstype', XMLDB_INDEX_UNIQUE, array('rsstype'));
$table->setComment("This is a test'n drop table. You can drop it safely");
/// Get SQL code and execute it
$test = new stdClass;
$test->sql = $table->getCreateTableSQL($CFG->dbtype, $CFG->prefix, true);
@@ -142,8 +144,9 @@ class test extends XMLDBAction {
$table->addFieldInfo('course', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0');
$table->addFieldInfo('name', XMLDB_TYPE_CHAR, '30', null, null, null, null, null, 'Moodle');
$table->addFieldInfo('secondname', XMLDB_TYPE_CHAR, '30', null, XMLDB_NOTNULL, null, null, null, null);
$table->addFieldInfo('intro', XMLDB_TYPE_TEXT, 'small', null, XMLDB_NOTNULL, null, null, null, null);
$table->addFieldInfo('grade', XMLDB_TYPE_NUMBER, '20,10', null, null, null, null, null, '');
$table->addFieldInfo('intro', XMLDB_TYPE_TEXT, 'medium', null, XMLDB_NOTNULL, null, null, null, null);
$table->addFieldInfo('avatar', XMLDB_TYPE_BINARY, 'medium', null, null, null, null, null, null);
$table->addFieldInfo('grade', XMLDB_TYPE_NUMBER, '20,10', null, null, null, null, null);
$table->addKeyInfo('primary', XMLDB_KEY_PRIMARY, array('id'));
/// Get SQL code and execute it
$test = new stdClass;
@@ -181,7 +184,7 @@ class test extends XMLDBAction {
if (!$test->status) {
$test->error = $db->ErrorMsg();
}
$tests['add field'] = $test;
$tests['add enum field'] = $test;
}
/// 5th test. Dropping one complex enum field
@@ -193,7 +196,7 @@ class test extends XMLDBAction {
if (!$test->status) {
$test->error = $db->ErrorMsg();
}
$tests['drop field'] = $test;
$tests['drop enum field'] = $test;
}
/// 6th test. Adding one complex enum field
@@ -208,22 +211,38 @@ class test extends XMLDBAction {
if (!$test->status) {
$test->error = $db->ErrorMsg();
}
$tests['add field again'] = $test;
$tests['add enum field again'] = $test;
}
/// 7th test. Dropping one complex enum field
/// 7th test. Adding one numeric field
if ($test->status) {
/// Create a new field (numeric)
$field = new XMLDBField('onenumber');
$field->setAttributes(XMLDB_TYPE_INTEGER, '6', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, 0, 'type');
/// Get SQL code and execute it
$test = new stdClass;
$test->sql = $table->getAddFieldSQL($CFG->dbtype, $CFG->prefix, $field, true);
$test->status = add_field($table, $field, false, false);
if (!$test->status) {
$test->error = $db->ErrorMsg();
}
$tests['add numeric field'] = $test;
}
/// 8th test. Dropping one complex enum field
if ($test->status) {
/// Create a new field with complex specs (enums are good candidates)
$field = new XMLDBField('type');
$test = new stdClass;
$test->sql = $table->getDropFieldSQL($CFG->dbtype, $CFG->prefix, $field, true);
$test->status = drop_field($table, $field, false, false);
if (!$test->status) {
$test->error = $db->ErrorMsg();
}
$tests['drop field again'] = $test;
$tests['drop enum field again'] = $test;
}
/// 8th test. Change the type of one column from integer to varchar
/// 9th test. Change the type of one column from integer to varchar
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -238,7 +257,7 @@ class test extends XMLDBAction {
$tests['change field type (int2char)'] = $test;
}
/// 9th test. Change the type of one column from varchar to integer
/// 10th test. Change the type of one column from varchar to integer
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -253,12 +272,12 @@ class test extends XMLDBAction {
$tests['change field type (char2int)'] = $test;
}
/// 10th test. Change the type of one column from number to varchar
/// 11th test. Change the type of one column from number to varchar
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
$field = new XMLDBField('grade');
$field->setAttributes(XMLDB_TYPE_CHAR, '20', null, XMLDB_NOTNULL, null, null, null, 'test');
$field->setAttributes(XMLDB_TYPE_CHAR, '20', null, XMLDB_NOTNULL, null, null, null, "test'n drop");
$test->sql = $table->getAlterFieldSQL($CFG->dbtype, $CFG->prefix, $field, true);
$test->status = change_field_type($table, $field, false, false);
@@ -268,7 +287,7 @@ class test extends XMLDBAction {
$tests['change field type (number2char)'] = $test;
}
/// 11th test. Change the type of one column from varchar to float
/// 12th test. Change the type of one column from varchar to float
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -283,7 +302,7 @@ class test extends XMLDBAction {
$tests['change field type (char2float)'] = $test;
}
/// 12th test. Change the type of one column from float to char
/// 13th test. Change the type of one column from float to char
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -298,7 +317,7 @@ class test extends XMLDBAction {
$tests['change field type (float2char)'] = $test;
}
/// 13th test. Change the type of one column from char to number
/// 14th test. Change the type of one column from char to number
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -314,7 +333,7 @@ class test extends XMLDBAction {
}
/// 14th test. Change the precision of one text field
/// 15th test. Change the precision of one text field
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -329,7 +348,7 @@ class test extends XMLDBAction {
$tests['change field precision (text)'] = $test;
}
/// 15th test. Change the precision of one char field
/// 16th test. Change the precision of one char field
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -344,7 +363,7 @@ class test extends XMLDBAction {
$tests['change field precision (char)'] = $test;
}
/// 16th test. Change the precision of one numeric field
/// 17th test. Change the precision of one numeric field
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -359,7 +378,7 @@ class test extends XMLDBAction {
$tests['change field precision (number)'] = $test;
}
/// 17th test. Change the sign of one numeric field to unsigned
/// 18th test. Change the sign of one numeric field to unsigned
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -374,7 +393,7 @@ class test extends XMLDBAction {
$tests['change field sign (unsigned)'] = $test;
}
/// 18th test. Change the sign of one numeric field to signed
/// 19th test. Change the sign of one numeric field to signed
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -389,7 +408,7 @@ class test extends XMLDBAction {
$tests['change field sign (signed)'] = $test;
}
/// 19th test. Change the nullability of one char field to not null
/// 20th test. Change the nullability of one char field to not null
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -404,7 +423,7 @@ class test extends XMLDBAction {
$tests['change field nullability (not null)'] = $test;
}
/// 20th test. Change the nullability of one char field to null
/// 21th test. Change the nullability of one char field to null
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -419,7 +438,7 @@ class test extends XMLDBAction {
$tests['change field nullability (null)'] = $test;
}
/// 21th test. Dropping the default of one field
/// 22th test. Dropping the default of one field
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -434,7 +453,7 @@ class test extends XMLDBAction {
$tests['drop field default of NULL field'] = $test;
}
/// 22th test. Creating the default for one field
/// 23th test. Creating the default for one field
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -449,7 +468,7 @@ class test extends XMLDBAction {
$tests['add field default of NULL field'] = $test;
}
/// 23th test. Creating the default for one field
/// 24th test. Creating the default for one field
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -465,7 +484,7 @@ class test extends XMLDBAction {
}
/// 24th test. Dropping the default of one NOT NULL field
/// 25th test. Dropping the default of one NOT NULL field
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -480,7 +499,7 @@ class test extends XMLDBAction {
$tests['drop field default of NOT NULL field'] = $test;
}
/// 25th test. Adding one unique index to the table
/// 26th test. Adding one unique index to the table
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -495,7 +514,7 @@ class test extends XMLDBAction {
$tests['add unique index'] = $test;
}
/// 26th test. Adding one not unique index to the table
/// 27th test. Adding one not unique index to the table
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -510,7 +529,7 @@ class test extends XMLDBAction {
$tests['add not unique index'] = $test;
}
/// 27th test. Re-add the same index than previous test. Check find_index_name() works.
/// 28th test. Re-add the same index than previous test. Check find_index_name() works.
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -529,7 +548,7 @@ class test extends XMLDBAction {
$tests['check find_index_name()'] = $test;
}
/// 28th test. Dropping one index from the table
/// 29th test. Dropping one index from the table
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -544,7 +563,7 @@ class test extends XMLDBAction {
$tests['drop index'] = $test;
}
/// 29th test. Adding one unique key to the table
/// 30th test. Adding one unique key to the table
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -559,7 +578,7 @@ class test extends XMLDBAction {
$tests['add unique key'] = $test;
}
/// 30th test. Adding one foreign+unique key to the table
/// 31th test. Adding one foreign+unique key to the table
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -574,7 +593,7 @@ class test extends XMLDBAction {
$tests['add foreign+unique key'] = $test;
}
/// 31th test. Drop one key
/// 32th test. Drop one key
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -589,7 +608,7 @@ class test extends XMLDBAction {
$tests['drop foreign+unique key'] = $test;
}
/// 32th test. Adding one foreign key to the table
/// 33th test. Adding one foreign key to the table
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -604,7 +623,7 @@ class test extends XMLDBAction {
$tests['add foreign key'] = $test;
}
/// 33th test. Drop one foreign key
/// 34th test. Drop one foreign key
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -619,7 +638,7 @@ class test extends XMLDBAction {
$tests['drop foreign key'] = $test;
}
/// 34th test. Adding one complex enum field
/// 35th test. Adding one complex enum field
if ($test->status) {
/// Create a new field with complex specs (enums are good candidates)
$field = new XMLDBField('type');
@@ -634,7 +653,7 @@ class test extends XMLDBAction {
$tests['add field with enum'] = $test;
}
/// 35th test. Dropping the enum of one field
/// 36th test. Dropping the enum of one field
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -649,7 +668,7 @@ class test extends XMLDBAction {
$tests['delete enumlist from one field'] = $test;
}
/// 36th test. Creating the enum for one field
/// 37th test. Creating the enum for one field
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -663,7 +682,7 @@ class test extends XMLDBAction {
$tests['add enumlist to one field'] = $test;
}
/// 37th test. Renaming one index
/// 38th test. Renaming one index
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -678,7 +697,7 @@ class test extends XMLDBAction {
$tests['rename index (experimental. DO NOT USE IT)'] = $test;
}
/// 38th test. Renaming one key
/// 39th test. Renaming one key
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -693,7 +712,7 @@ class test extends XMLDBAction {
$tests['rename key (experimental. DO NOT USE IT)'] = $test;
}
/// 39th test. Renaming one field
/// 40th test. Renaming one field
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -708,7 +727,7 @@ class test extends XMLDBAction {
$tests['rename field'] = $test;
}
/// 40th test. Renaming one table
/// 41th test. Renaming one table
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -721,7 +740,188 @@ class test extends XMLDBAction {
$tests['rename table'] = $test;
}
/// 42th test. Getting the PK sequence name for one table
if ($test->status) {
$test = new stdClass;
$table->setName('newnameforthetable');
$test->sql = array(find_sequence_name($table));
$test->status = find_sequence_name($table);
if (!$test->status) {
if (!$test->error = $db->ErrorMsg()) { //If no db errors, result is ok. Just the driver doesn't support this
$test->sql = array('not needed for this DB');
$test->status = true;
}
}
$tests['find sequence name'] = $test;
}
/// 43th test. Inserting TEXT contents
$textlib = textlib_get_instance();
if ($test->status) {
$test = new stdClass;
$test->status = false;
$test->sql = array();
$basetext = '日本語 • Русский • Deutsch • English • Español • Français • Italiano • Nederlands • Polski • Português • Svenska • العربية • فارسی 한국어 • עברית • ไทย中文 Ελληνικά • Български • Српски • Українська • Bosanski • Català • Česky • Dansk • Eesti • Simple English • Esperanto • Euskara • Galego • Hrvatski • Ido • Bahasa Indonesia • Íslenska • Lëtzebuergesch • Lietuvių • Magyar • Bahasa Melayu اردو • ئۇيغۇرچه • हिन्दी • नेपाल भाषा मराठी • தமிழ் Հայերեն • Беларуская • Чăваш • Ирон æвзаг • Македонски • Сибирской говор • Afrikaans • Aragonés • Arpitan • Asturianu • Kreyòl Ayisyen • Azərbaycan • Bân-lâm-gú • Basa Banyumasan • Brezhoneg • Corsu • Cymraeg • Deitsch • Føroyskt • Frysk • Furlan • Gaeilge • Gàidhlig • Ilokano • Interlingua • Basa Jawa • Kapampangan • Kernewek • Kurdî كوردی • Ladino לאדינו • Latina • Latviešu • Limburgs • Lumbaart • Nedersaksisch • Nouormand • Occitan • Ozbek • Piemontèis • Plattdüütsch • Ripoarisch • Sámegiella • Scots • Shqip • Sicilianu • Sinugboanon • Srpskohrvatski / Српскохрватски • Basa Sunda • Kiswahili • Tagalog • Tatarça • Walon • Winaray Авар • Башҡорт • Кыргызча Монгол • Қазақша • Тоҷикӣ • Удмурт • Armãneashce • Bamanankan • Eald Englisc • Gaelg • Interlingue • Kaszëbsczi • Kongo • Ligure • Lingála • lojban • Malagasy • Malti • Māori • Nāhuatl • Ekakairũ Naoero • Novial • Pangasinán • Tok Pisin • Romani / रोमानी • Rumantsch • Runa Simi • Sardu • Tetun • Türkmen / تركمن / Туркмен • Vèneto • Volapük • Võro • West-Vlaoms • Wollof • Zazaki • Žemaitėška';
/// Create one big text (1.500.000 chars)
$fulltext = '';
for ($i=0; $i<1000; $i++) { //1500 * 1000 chars
$fulltext .= $basetext;
}
/// Build the record to insert
$rec->intro = addslashes($fulltext);
$rec->name = 'texttest';
/// Calculate its length
$textlen = $textlib->strlen($fulltext, current_charset());
if ($rec->id = insert_record('newnameforthetable', $rec)) {
if ($new = get_record('newnameforthetable', 'id', $rec->id)) {
delete_records('newnameforthetable', 'id', $new->id);
$newtextlen = $textlib->strlen($new->intro, current_charset());
if ($fulltext === $new->intro) {
$test->sql = array($newtextlen . ' cc. (text) sent and received ok');
$test->status = true;
} else {
$test->error = $db->ErrorMsg();
$test->sql = array($newtextlen . ' cc. (text) transfer failed. Data changed!');
$test->status = false;
}
} else {
$test->error = $db->ErrorMsg();
}
} else {
$test->error = $db->ErrorMsg();
}
$tests['insert record '. $textlen . ' cc. (text)'] = $test;
}
/// 44th test. Inserting BINARY contents
if ($test->status) {
$test = new stdClass;
$test->status = false;
/// Build the record to insert
$rec->avatar = addslashes($fulltext);
$rec->name = 'binarytest';
/// Calculate its length
$textlen = strlen($fulltext);
if ($rec->id = insert_record('newnameforthetable', $rec)) {
if ($new = get_record('newnameforthetable', 'id', $rec->id)) {
$newtextlen = strlen($new->avatar);
if ($fulltext === $new->avatar) {
$test->sql = array($newtextlen . ' bytes (binary) sent and received ok');
$test->status = true;
} else {
$test->error = $db->ErrorMsg();
$test->sql = array($newtextlen . ' bytes (binary) transfer failed. Data changed!');
$test->status = false;
}
} else {
$test->error = $db->ErrorMsg();
}
} else {
$test->error = $db->ErrorMsg();
}
$tests['insert record '. $textlen . ' bytes (binary)'] = $test;
}
/// 45th test. update_record with TEXT and BINARY contents
if ($test->status) {
$test = new stdClass;
$test->status = false;
$test->sql = array();
/// Build the record to insert
$rec->intro = addslashes($basetext);
$rec->avatar = addslashes($basetext);
$rec->name = 'updatelobs';
/// Calculate its length
$textlen = $textlib->strlen($basetext, current_charset());
$imglen = strlen($basetext);
if (update_record('newnameforthetable', $rec)) {
if ($new = get_record('newnameforthetable', 'id', $rec->id)) {
$newtextlen = $textlib->strlen($new->intro, current_charset());
$newimglen = strlen($new->avatar);
if ($basetext === $new->avatar && $basetext === $new->intro) {
$test->sql = array($newtextlen . ' cc. (text) sent and received ok',
$newimglen . ' bytes (binary) sent and received ok');
$test->status = true;
} else {
if ($rec->avatar !== $new->avatar) {
$test->error = $db->ErrorMsg();
$test->sql = array($newimglen . ' bytes (binary) transfer failed. Data changed!');
$test->status = false;
} else {
$test->error = $db->ErrorMsg();
$test->sql = array($newtextlen . ' cc. (text) transfer failed. Data changed!');
$test->status = false;
}
}
} else {
$test->error = $db->ErrorMsg();
}
} else {
$test->error = $db->ErrorMsg();
}
$tests['update record '. $textlen . ' cc. (text) and ' . $imglen . ' bytes (binary)'] = $test;
}
/// 46th test. set_field with TEXT contents
if ($test->status) {
$test = new stdClass;
$test->status = false;
$test->sql = array();
/// Build the record to insert
$rec->intro = addslashes($fulltext);
$rec->name = 'updatelobs';
/// Calculate its length
$textlen = $textlib->strlen($fulltext, current_charset());
if (set_field('newnameforthetable', 'intro', $rec->intro, 'name', $rec->name)) {
if ($new = get_record('newnameforthetable', 'id', $rec->id)) {
$newtextlen = $textlib->strlen($new->intro);
if ($fulltext === $new->intro) {
$test->sql = array($newtextlen . ' cc. (text) sent and received ok');
$test->status = true;
} else {
$test->error = $db->ErrorMsg();
$test->sql = array($newtextlen . ' cc. (text) transfer failed. Data changed!');
$test->status = false;
}
} else {
$test->error = $db->ErrorMsg();
}
} else {
$test->error = $db->ErrorMsg();
}
$tests['set field '. $textlen . ' cc. (text)'] = $test;
}
/// 47th test. set_field with BINARY contents
if ($test->status) {
$test = new stdClass;
$test->status = false;
$test->sql = array();
/// Build the record to insert
$rec->avatar = addslashes($fulltext);
$rec->name = 'updatelobs';
/// Calculate its length
$textlen = strlen($fulltext);
if (set_field('newnameforthetable', 'avatar', $rec->avatar, 'name', $rec->name)) {
if ($new = get_record('newnameforthetable', 'id', $rec->id)) {
$newtextlen = strlen($new->avatar);
if ($fulltext === $new->avatar) {
$test->sql = array($newtextlen . ' bytes (binary) sent and received ok');
$test->status = true;
} else {
$test->error = $db->ErrorMsg();
$test->sql = array($newtextlen . ' bytes (binary) transfer failed. Data changed!');
$test->status = false;
}
} else {
$test->error = $db->ErrorMsg();
}
} else {
$test->error = $db->ErrorMsg();
}
$tests['set field '. $textlen . ' bytes (binary)'] = $test;
}
/// TODO: Check here values of the inserted records to see that everything ha the correct value
@@ -133,7 +133,7 @@ class view_reserved_words extends XMLDBAction {
/// The textarea showing all the reserved words
$o.= ' <table id="formelements" align="center" cellpadding="5">';
$o.= ' <tr><td align="center">' . $this->str['listreservedwords'];
$o.= ' <tr><td align="center">' . $this->str['listreservedwords'].'</td></tr>';
$o.= ' <tr><td><textarea cols="80" rows="32">';
$o.= s(implode(', ', $reserved_words));
$o.= '</textarea></td></tr>';
@@ -99,7 +99,7 @@ class view_structure_php extends XMLDBAction {
/// Calculate the popup of commands
$commands = array('create_table',
'drop_table',
'rename_table (not imp!)');
'rename_table');
foreach ($commands as $command) {
$popcommands[$command] = str_replace('_', ' ', $command);
}
@@ -211,7 +211,7 @@ class view_structure_php extends XMLDBAction {
/// Launch the proper DDL
$result .= XMLDB_LINEFEED;
$result .= ' /// Launch create table for ' . $table->getName() . XMLDB_LINEFEED;
$result .= ' $status = $status && create_table($table);' . XMLDB_LINEFEED;
$result .= ' $result = $result && create_table($table);' . XMLDB_LINEFEED;
/// Add standard PHP footer
$result .= XMLDB_PHP_FOOTER;
@@ -249,7 +249,7 @@ class view_structure_php extends XMLDBAction {
/// Launch the proper DDL
$result .= XMLDB_LINEFEED;
$result .= ' /// Launch drop table for ' . $table->getName() . XMLDB_LINEFEED;
$result .= ' $status = $status && drop_table($table);' . XMLDB_LINEFEED;
$result .= ' $result = $result && drop_table($table);' . XMLDB_LINEFEED;
/// Add standard PHP footer
$result .= XMLDB_PHP_FOOTER;
@@ -287,7 +287,7 @@ class view_structure_php extends XMLDBAction {
/// Launch the proper DDL
$result .= XMLDB_LINEFEED;
$result .= ' /// Launch rename table for ' . $table->getName() . XMLDB_LINEFEED;
$result .= ' $status = $status && rename_table($table, ' . "'NEWNAMEGOESHERE'" . ');' . XMLDB_LINEFEED;
$result .= ' $result = $result && rename_table($table, ' . "'NEWNAMEGOESHERE'" . ');' . XMLDB_LINEFEED;
/// Add standard PHP footer
$result .= XMLDB_PHP_FOOTER;
@@ -119,13 +119,12 @@ class view_table_php extends XMLDBAction {
$commands = array('Fields',
$optionspacer . 'add_field',
$optionspacer . 'drop_field',
$optionspacer . 'rename_field (not imp!)',
$optionspacer . 'rename_field',
$optionspacer . 'change_field_type',
$optionspacer . 'change_field_precision',
$optionspacer . 'change_field_unsigned',
$optionspacer . 'change_field_notnull',
$optionspacer . 'change_field_sequence (not imp!)',
$optionspacer . 'change_field_enum (not imp!)',
$optionspacer . 'change_field_enum',
$optionspacer . 'change_field_default',
'Keys',
$optionspacer . 'add_key',
@@ -229,6 +228,13 @@ class view_table_php extends XMLDBAction {
$o.= $this->str['mustselectonefield'];
}
break;
case 'change_field_enum':
if ($fieldkeyindexinitial == 'f') { //Only if we have got one field
$o.= s($this->change_field_enum_php($structure, $tableparam, $fieldkeyindexparam));
} else {
$o.= $this->str['mustselectonefield'];
}
break;
case 'change_field_default':
if ($fieldkeyindexinitial == 'f') { //Only if we have got one field
$o.= s($this->change_field_default_php($structure, $tableparam, $fieldkeyindexparam));
@@ -330,7 +336,7 @@ class view_table_php extends XMLDBAction {
/// Launch the proper DDL
$result .= XMLDB_LINEFEED;
$result .= ' /// Launch add field ' . $field->getName() . XMLDB_LINEFEED;
$result .= ' $status = $status && add_field($table, $field);' . XMLDB_LINEFEED;
$result .= ' $result = $result && add_field($table, $field);' . XMLDB_LINEFEED;
/// Add standard PHP footer
$result .= XMLDB_PHP_FOOTER;
@@ -373,7 +379,7 @@ class view_table_php extends XMLDBAction {
/// Launch the proper DDL
$result .= XMLDB_LINEFEED;
$result .= ' /// Launch drop field ' . $field->getName() . XMLDB_LINEFEED;
$result .= ' $status = $status && drop_field($table, $field);' . XMLDB_LINEFEED;
$result .= ' $result = $result && drop_field($table, $field);' . XMLDB_LINEFEED;
/// Add standard PHP footer
$result .= XMLDB_PHP_FOOTER;
@@ -416,7 +422,7 @@ class view_table_php extends XMLDBAction {
/// Launch the proper DDL
$result .= XMLDB_LINEFEED;
$result .= ' /// Launch rename field ' . $field->getName() . XMLDB_LINEFEED;
$result .= ' $status = $status && rename_field($table, $field, ' . "'" . 'NEWNAMEGOESHERE' . "'" . ');' . XMLDB_LINEFEED;
$result .= ' $result = $result && rename_field($table, $field, ' . "'" . 'NEWNAMEGOESHERE' . "'" . ');' . XMLDB_LINEFEED;
/// Add standard PHP footer
$result .= XMLDB_PHP_FOOTER;
@@ -469,7 +475,7 @@ class view_table_php extends XMLDBAction {
/// Launch the proper DDL
$result .= XMLDB_LINEFEED;
$result .= ' /// Launch change of type for field ' . $field->getName() . XMLDB_LINEFEED;
$result .= ' $status = $status && change_field_type($table, $field);' . XMLDB_LINEFEED;
$result .= ' $result = $result && change_field_type($table, $field);' . XMLDB_LINEFEED;
/// Add standard PHP footer
$result .= XMLDB_PHP_FOOTER;
@@ -519,7 +525,7 @@ class view_table_php extends XMLDBAction {
/// Launch the proper DDL
$result .= XMLDB_LINEFEED;
$result .= ' /// Launch change of precision for field ' . $field->getName() . XMLDB_LINEFEED;
$result .= ' $status = $status && change_field_precision($table, $field);' . XMLDB_LINEFEED;
$result .= ' $result = $result && change_field_precision($table, $field);' . XMLDB_LINEFEED;
/// Add standard PHP footer
$result .= XMLDB_PHP_FOOTER;
@@ -565,7 +571,7 @@ class view_table_php extends XMLDBAction {
/// Launch the proper DDL
$result .= XMLDB_LINEFEED;
$result .= ' /// Launch change of sign for field ' . $field->getName() . XMLDB_LINEFEED;
$result .= ' $status = $status && change_field_unsigned($table, $field);' . XMLDB_LINEFEED;
$result .= ' $result = $result && change_field_unsigned($table, $field);' . XMLDB_LINEFEED;
/// Add standard PHP footer
$result .= XMLDB_PHP_FOOTER;
@@ -611,7 +617,54 @@ class view_table_php extends XMLDBAction {
/// Launch the proper DDL
$result .= XMLDB_LINEFEED;
$result .= ' /// Launch change of nullability for field ' . $field->getName() . XMLDB_LINEFEED;
$result .= ' $status = $status && change_field_notnull($table, $field);' . XMLDB_LINEFEED;
$result .= ' $result = $result && change_field_notnull($table, $field);' . XMLDB_LINEFEED;
/// Add standard PHP footer
$result .= XMLDB_PHP_FOOTER;
return $result;
}
/**
* This function will generate all the PHP code needed to
* change the enum values (check constraint) of one field
* using XMLDB objects and functions
*
* @param XMLDBStructure structure object containing all the info
* @param string table table name
* @param string field field name to change its enum
*/
function change_field_enum_php($structure, $table, $field) {
$result = '';
/// Validate if we can do it
if (!$table = $structure->getTable($table)) {
return false;
}
if (!$field = $table->getField($field)) {
return false;
}
if ($table->getAllErrors()) {
return false;
}
/// Calculate the enum tip text
$enum = $field->getEnum() ? implode(', ', $field->getEnumValues()) : 'none';
/// Add the standard PHP header
$result .= XMLDB_PHP_HEADER;
/// Add contents
$result .= XMLDB_LINEFEED;
$result .= ' /// Changing list of values (enum) of field ' . $field->getName() . ' on table ' . $table->getName() . ' to ' . $enum . XMLDB_LINEFEED;
$result .= ' $table = new XMLDBTable(' . "'" . $table->getName() . "'" . ');' . XMLDB_LINEFEED;
$result .= ' $field = new XMLDBField(' . "'" . $field->getName() . "'" . ');' . XMLDB_LINEFEED;
$result .= ' $field->setAttributes(' . $field->getPHP(true) . ');' . XMLDB_LINEFEED;
/// Launch the proper DDL
$result .= XMLDB_LINEFEED;
$result .= ' /// Launch change of list of values for field ' . $field->getName() . XMLDB_LINEFEED;
$result .= ' $result = $result && change_field_enum($table, $field);' . XMLDB_LINEFEED;
/// Add standard PHP footer
$result .= XMLDB_PHP_FOOTER;
@@ -657,7 +710,7 @@ class view_table_php extends XMLDBAction {
/// Launch the proper DDL
$result .= XMLDB_LINEFEED;
$result .= ' /// Launch change of default for field ' . $field->getName() . XMLDB_LINEFEED;
$result .= ' $status = $status && change_field_default($table, $field);' . XMLDB_LINEFEED;
$result .= ' $result = $result && change_field_default($table, $field);' . XMLDB_LINEFEED;
/// Add standard PHP footer
$result .= XMLDB_PHP_FOOTER;
@@ -701,7 +754,7 @@ class view_table_php extends XMLDBAction {
/// Launch the proper DDL
$result .= XMLDB_LINEFEED;
$result .= ' /// Launch add key ' . $key->getName() . XMLDB_LINEFEED;
$result .= ' $status = $status && add_key($table, $key);' . XMLDB_LINEFEED;
$result .= ' $result = $result && add_key($table, $key);' . XMLDB_LINEFEED;
/// Add standard PHP footer
$result .= XMLDB_PHP_FOOTER;
@@ -745,7 +798,7 @@ class view_table_php extends XMLDBAction {
/// Launch the proper DDL
$result .= XMLDB_LINEFEED;
$result .= ' /// Launch drop key ' . $key->getName() . XMLDB_LINEFEED;
$result .= ' $status = $status && drop_key($table, $key);' . XMLDB_LINEFEED;
$result .= ' $result = $result && drop_key($table, $key);' . XMLDB_LINEFEED;
/// Add standard PHP footer
$result .= XMLDB_PHP_FOOTER;
@@ -776,6 +829,9 @@ class view_table_php extends XMLDBAction {
return false;
}
/// Prepend warning. This function isn't usable!
$result .= 'DON\'T USE THIS FUNCTION (IT\'S ONLY EXPERIMENTAL). SOME DBs DON\'T SUPPORT IT!' . XMLDB_LINEFEED . XMLDB_LINEFEED;
/// Add the standard PHP header
$result .= XMLDB_PHP_HEADER;
@@ -789,7 +845,7 @@ class view_table_php extends XMLDBAction {
/// Launch the proper DDL
$result .= XMLDB_LINEFEED;
$result .= ' /// Launch rename key ' . $key->getName() . XMLDB_LINEFEED;
$result .= ' $status = $status && rename_key($table, $key, ' . "'" . 'NEWNAMEGOESHERE' . "'" . ');' . XMLDB_LINEFEED;
$result .= ' $result = $result && rename_key($table, $key, ' . "'" . 'NEWNAMEGOESHERE' . "'" . ');' . XMLDB_LINEFEED;
/// Add standard PHP footer
$result .= XMLDB_PHP_FOOTER;
@@ -833,7 +889,7 @@ class view_table_php extends XMLDBAction {
/// Launch the proper DDL
$result .= XMLDB_LINEFEED;
$result .= ' /// Launch add index ' . $index->getName() . XMLDB_LINEFEED;
$result .= ' $status = $status && add_index($table, $index);' . XMLDB_LINEFEED;
$result .= ' $result = $result && add_index($table, $index);' . XMLDB_LINEFEED;
/// Add standard PHP footer
$result .= XMLDB_PHP_FOOTER;
@@ -877,7 +933,7 @@ class view_table_php extends XMLDBAction {
/// Launch the proper DDL
$result .= XMLDB_LINEFEED;
$result .= ' /// Launch drop index ' . $index->getName() . XMLDB_LINEFEED;
$result .= ' $status = $status && drop_index($table, $index);' . XMLDB_LINEFEED;
$result .= ' $result = $result && drop_index($table, $index);' . XMLDB_LINEFEED;
/// Add standard PHP footer
$result .= XMLDB_PHP_FOOTER;
@@ -908,6 +964,9 @@ class view_table_php extends XMLDBAction {
return false;
}
/// Prepend warning. This function isn't usable!
$result .= 'DON\'T USE THIS FUNCTION (IT\'S ONLY EXPERIMENTAL). SOME DBs DON\'T SUPPORT IT!' . XMLDB_LINEFEED . XMLDB_LINEFEED;
/// Add the standard PHP header
$result .= XMLDB_PHP_HEADER;
@@ -921,7 +980,7 @@ class view_table_php extends XMLDBAction {
/// Launch the proper DDL
$result .= XMLDB_LINEFEED;
$result .= ' /// Launch rename index ' . $index->getName() . XMLDB_LINEFEED;
$result .= ' $status = $status && rename_index($table, $index, ' . "'" . 'NEWNAMEGOESHERE' . "'" . ');' . XMLDB_LINEFEED;
$result .= ' $result = $result && rename_index($table, $index, ' . "'" . 'NEWNAMEGOESHERE' . "'" . ');' . XMLDB_LINEFEED;
/// Add standard PHP footer
$result .= XMLDB_PHP_FOOTER;
+1
View File
@@ -52,6 +52,7 @@
/// getting "incomplete" objects
require_once('../../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/ddllib.php'); // Install/upgrade related db functions
$adminroot = admin_get_root();
admin_externalpage_setup('xmldbeditor', $adminroot);
-4
View File
@@ -112,7 +112,3 @@
<?php
include($CFG->dirroot.'/auth/ldap/config.html');
?>
-1
View File
@@ -15,4 +15,3 @@
print_footer();
exit;
?>
+4
View File
@@ -159,6 +159,8 @@ defined('MOODLE_INTERNAL') or die('Direct access to this script is forbidden.');
reset_login_count();
load_all_capabilities(); /// This is what lets the user do anything on the site :-)
redirect($urltogo);
exit;
@@ -266,6 +268,8 @@ defined('MOODLE_INTERNAL') or die('Direct access to this script is forbidden.');
reset_login_count();
load_all_capabilities(); /// This is what lets the user do anything on the site :-)
redirect($urltogo);
exit;
+1 -1
View File
@@ -44,7 +44,7 @@
<tr valign="top" class="required">
<td align="right">auth_dbtype:</td>
<td>
<?php $dbtypes = array("access","ado_access", "ado", "ado_mssql", "borland_ibase", "csv", "db2", "fbsql", "firebird", "ibase", "informix72", "informix", "mssql", "mysql", "mysqlt", "oci805", "oci8", "oci8po", "odbc", "odbc_mssql", "odbc_oracle", "oracle", "postgres64", "postgres7", "postgres", "proxy", "sqlanywhere", "sybase", "vfp");
<?php $dbtypes = array("access","ado_access", "ado", "ado_mssql", "borland_ibase", "csv", "db2", "fbsql", "firebird", "ibase", "informix72", "informix", "mssql", "mssql_n", "mysql", "mysqlt", "oci805", "oci8", "oci8po", "odbc", "odbc_mssql", "odbc_oracle", "oracle", "postgres64", "postgres7", "postgres", "proxy", "sqlanywhere", "sybase", "vfp");
foreach ($dbtypes as $dbtype) {
$dboptions[$dbtype] = $dbtype;
}
+14 -7
View File
@@ -22,7 +22,8 @@ function auth_user_login ($username, $password) {
// Connect to the external database
$authdb = &ADONewConnection($CFG->auth_dbtype);
$authdb->PConnect($CFG->auth_dbhost,$CFG->auth_dbuser,$CFG->auth_dbpass,$CFG->auth_dbname);
$authdb->PConnect($CFG->auth_dbhost,$CFG->auth_dbuser,$CFG->auth_dbpass,$CFG->auth_dbname);
$authdb->SetFetchMode(ADODB_FETCH_ASSOC); ///Set Assoc mode always after DB connection
if ($CFG->auth_dbpasstype === 'internal') {
// lookup username externally, but resolve
@@ -92,6 +93,7 @@ function auth_get_userinfo($username){
ADOLoadCode($CFG->auth_dbtype);
$authdb = &ADONewConnection();
$authdb->PConnect($CFG->auth_dbhost,$CFG->auth_dbuser,$CFG->auth_dbpass,$CFG->auth_dbname);
$authdb->SetFetchMode(ADODB_FETCH_ASSOC); ///Set Assoc mode always after DB connection
$fields = array("firstname", "lastname", "email", "phone1", "phone2",
"department", "address", "city", "country", "description",
@@ -101,15 +103,17 @@ function auth_get_userinfo($username){
foreach ($fields as $field) {
if ($pcfg["field_map_$field"]) {
if ($rs = $authdb->Execute("SELECT ".$pcfg["field_map_$field"]." FROM $CFG->auth_dbtable
if ($rs = $authdb->Execute("SELECT ".$pcfg["field_map_$field"]." as myfield FROM $CFG->auth_dbtable
WHERE $CFG->auth_dbfielduser = '$username'")) {
if ( $rs->RecordCount() == 1 ) {
$fields_obj = rs_fetch_record($rs);
if (!empty($CFG->unicodedb)) {
$result["$field"] = addslashes(stripslashes($rs->fields[0]));
$result["$field"] = addslashes(stripslashes($fields_obj->myfield));
} else {
$result["$field"] = addslashes(stripslashes(utf8_decode($rs->fields[0])));
$result["$field"] = addslashes(stripslashes(utf8_decode($fields_obj->myfield)));
}
}
rs_close($rs);
}
}
}
@@ -302,6 +306,7 @@ function auth_user_exists ($username) {
global $CFG;
$authdb = &ADONewConnection($CFG->auth_dbtype);
$authdb->PConnect($CFG->auth_dbhost,$CFG->auth_dbuser,$CFG->auth_dbpass,$CFG->auth_dbname);
$authdb->SetFetchMode(ADODB_FETCH_ASSOC); ///Set Assoc mode always after DB connection
$rs = $authdb->Execute("SELECT * FROM $CFG->auth_dbtable
WHERE $CFG->auth_dbfielduser = '$username' ");
@@ -334,6 +339,7 @@ function auth_get_userlist() {
// Connect to the external database
$authdb = &ADONewConnection($CFG->auth_dbtype);
$authdb->PConnect($CFG->auth_dbhost,$CFG->auth_dbuser,$CFG->auth_dbpass,$CFG->auth_dbname);
$authdb->SetFetchMode(ADODB_FETCH_ASSOC); ///Set Assoc mode always after DB connection
// fetch userlist
$rs = $authdb->Execute("SELECT $CFG->auth_dbfielduser AS username
@@ -347,9 +353,10 @@ function auth_get_userlist() {
if ( $rs->RecordCount() ) {
$userlist = array();
while ($rec = $rs->FetchRow()) {
array_push($userlist, $rec['username']);
while ($rec = rs_fetch_next_record($rs)) {
array_push($userlist, $rec->username);
}
rs_close($rs);
return $userlist;
} else {
return array();
@@ -459,4 +466,4 @@ function auth_validate_form(&$form, &$err) {
return true;
}
?>
?>
-84
View File
@@ -1,169 +1,85 @@
<?php
if (!isset($config->auth_fchost)) {
$config->auth_fchost = "127.0.0.1";
}
if (!isset($config->auth_fcfppport)) {
$config->auth_fcfppport = "3333";
}
if (!isset($config->auth_fcuserid)) {
$config->auth_fcuserid = "fcMoodle";
}
if (!isset($config->auth_fcpasswd)) {
$config->auth_fcpasswd = "";
}
if (!isset($config->auth_fccreators)) {
$config->auth_fccreators = "";
}
?>
<tr valign="top" class="required">
<td align="right">auth_fchost:</td>
<td>
<input name="auth_fchost" type="text" size="30" value="<?php echo $config->auth_fchost?>" />
<?php if (isset($err["auth_fchost"])) formerr($err["auth_fchost"]); ?>
</td>
<td>
<?php print_string("auth_fchost","auth") ?>
</td>
</tr>
<tr valign="top" class="required">
<td align="right">auth_fcfppport:</td>
<td>
<input name="auth_fcfppport" type="text" size="30" value="<?php echo $config->auth_fcfppport?>" />
<?php if (isset($err["auth_fcfppport"])) formerr($err["auth_fchost"]); ?>
</td>
<td>
<?php print_string("auth_fcfppport","auth") ?>
</td>
</tr>
<tr valign="top" class="required">
<td align="right">auth_fcuserid:</td>
<td>
<input name="auth_fcuserid" type="text" size="30" maxlength="15" value="<?php echo $config->auth_fcuserid?>" />
<?php if (isset($err["auth_fcuserid"])) formerr($err["auth_fcuserid"]); ?>
</td>
<td>
<?php print_string("auth_fcuserid","auth") ?>
</td>
</tr>
<tr valign="top" class="required">
<td align="right">auth_fcpasswd:</td>
<td>
<input name="auth_fcpasswd" type="password" size="30" maxlength="12" value="<?php echo $config->auth_fcpasswd?>" />
<?php if (isset($err["auth_fcpasswd"])) formerr($err["auth_fcpasswd"]); ?>
</td>
<td>
<?php print_string("auth_fcpasswd","auth") ?>
</td>
</tr>
<tr valign="top" class="required">
<td align="right">auth_fccreators:</td>
<td>
<input name="auth_fccreators" type="text" size="30" value="<?php echo $config->auth_fccreators?>" />
<?php if (isset($err["auth_fccreators"])) formerr($err["auth_fccreators"]); ?>
</td>
<td>
<?php print_string("auth_fccreators","auth") ?>
</td>
</tr>
<tr valign="top">
<td align="right"><?php print_string("instructions", "auth") ?>:</td>
<td>
<textarea name="auth_instructions" cols="30" rows="10" wrap="virtual"><?php p($config->auth_instructions) ?></textarea>
</td>
<td>
<?php print_string("authinstructions","auth") ?>
<?php helpbutton("text", get_string("helptext")) ?>
</td>
</tr>
<?php print_auth_lock_options($auth, $user_fields, get_string('auth_fieldlocks_help', 'auth'), false, false); ?>
+7 -6
View File
@@ -108,13 +108,14 @@ class fcFPP
if($this->_debug) echo $line;
if (preg_match ("/^\+0/", $line)) { //+0, user with subadmin privileges
$this->_user = $userid;
$this->_pwd = $passwd;
return TRUE;
} elseif (preg_match ("/^\Sorry/",$line)){ //Denied access but a valid user and password
$this->_user = $userid;
$this->_pwd = $passwd;
return TRUE;
} elseif (strpos($line, 'You are not allowed')){ // Denied access but a valid user and password
// "Sorry. You are not allowed to login with the FPP interface"
return TRUE;
} else { //Invalid user or password
return FALSE;
return FALSE;
}
@@ -215,4 +216,4 @@ class fcFPP
}
?>
?>
+62 -13
View File
@@ -551,7 +551,7 @@ function auth_sync_users ($bulk_insert_records = 1000, $do_updates=1) {
}
if ( $do_updates && !(empty($updatekeys)) ) { // run updates only if relevant
$users = get_records_sql('SELECT u.username, u.id FROM ' . $CFG->prefix . 'user AS u WHERE u.deleted=0 and u.auth=\'' . AUTH_LDAP_NAME . '\'' );
$users = get_records_sql('SELECT u.username, u.id FROM ' . $CFG->prefix . 'user u WHERE u.deleted=0 and u.auth=\'' . AUTH_LDAP_NAME . '\'' );
if (!empty($users)) {
print "User entries to update: ". count($users). "\n";
@@ -713,7 +713,7 @@ function auth_ldap_bulk_insert($users){
// bulk insert -- superfast with $bulk_insert_records
$sql = 'INSERT INTO '.$CFG->prefix.'extuser (idnumber) VALUES ';
// make those values safe
array_map('addslashes', $users);
$users = array_map('addslashes', $users);
// join and quote the whole lot
$sql = $sql . '(\'' . join('\'),(\'', $users) . '\')';
print "+ " . count($users) . " users\n";
@@ -817,13 +817,27 @@ function auth_user_update($olduser, $newuser) {
global $USER , $CFG;
$pcfg = get_config('auth/ldap');
$attrmap = auth_ldap_attributes();
// Before doing anything else, make sure we really need to update anything
// in the external LDAP server.
$update_external = false;
foreach ($attrmap as $key => $ldapkeys) {
if (!empty($pcfg->{'field_updateremote_'.$key})) {
$update_external = true;
break;
}
}
if (!$update_external) {
return true;
}
$ldapconnection = auth_ldap_connect();
$result = array();
$search_attribs = array();
$attrmap = auth_ldap_attributes();
foreach ($attrmap as $key=>$values) {
if (!is_array($values)) {
$values = array($values);
@@ -842,8 +856,18 @@ function auth_user_update($olduser, $newuser) {
if ($user_info_result){
$user_entry = auth_ldap_get_entries($ldapconnection, $user_info_result);
if (count($user_entry) > 1) {
trigger_error("ldap: Strange! More than one user record found in ldap. Only using the first one.");
if (empty($user_entry)) {
$error = 'ldap: Could not find user while updating externally. '.
'Details follow: search base: \''.$user_dn.'\'; search filter: \''.
$CFG->ldap_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) {
error_log('ldap: Strange! More than one user record found in ldap. Only using the first one.');
return false;
}
$user_entry = $user_entry[0];
@@ -1002,15 +1026,33 @@ function auth_user_update_password($username, $newpassword) {
. ldap_err2str(ldap_errno($ldapconnection)));
}
break;
case 'ad':
// Passwords in Active Directory must be encoded as Unicode
// strings (UCS-2 Little Endian format) and surrounded with
// double quotes. See http://support.microsoft.com/?kbid=269190
if (!function_exists('mb_convert_encoding')) {
error_log ('You need the mbstring extension to change passwords in Active Directory');
return false;
}
$newpassword = mb_convert_encoding('"'.$newpassword.'"', "UCS-2LE", "auto");
$result = ldap_modify($ldapconnection, $user_dn, array('unicodePwd' => $newpassword));
if(!$result){
error_log('LDAP Error in auth_user_update_password(). Error code: '
. ldap_errno($ldapconnection) . '; Error string : '
. ldap_err2str(ldap_errno($ldapconnection)));
}
break;
default:
$usedconnection = &$ldapconnection;
// send ldap the password in cleartext, it will md5 it itself
$result = ldap_modify($ldapconnection, $user_dn, array('userPassword' => $newpassword));
if(!$result){
error_log('LDAP Error in auth_user_update_password(). Error code: '
. ldap_errno($ldapconnection) . '; Error string : '
. ldap_err2str(ldap_errno($ldapconnection)));
}
if(!$result){
error_log('LDAP Error in auth_user_update_password(). Error code: '
. ldap_errno($ldapconnection) . '; Error string : '
. ldap_err2str(ldap_errno($ldapconnection)));
}
}
@@ -1162,8 +1204,10 @@ function auth_ldap_init () {
}
}
//hack prefix to objectclass
if ('objectClass=' != substr($CFG->ldap_objectclass, 0, 12)) {
$CFG->ldap_objectclass = 'objectClass='.$CFG->ldap_objectclass;
if (empty($CFG->ldap_objectclass)) { // Can't send empty filter
$CFG->ldap_objectclass = 'objectClass=*';
} else if (stripos($CFG->ldap_objectclass, 'objectClass=') !== 0) {
$CFG->ldap_objectclass = 'objectClass='.$CFG->ldap_objectclass;
}
//all chages go in $CFG , no need to return value
@@ -1318,6 +1362,11 @@ function auth_ldap_connect($binddn='',$bindpwd=''){
ldap_set_option($connresult, LDAP_OPT_PROTOCOL_VERSION, $CFG->ldap_version);
}
// Fix MDL-10921
if ($CFG->ldap_user_type == 'ad') {
ldap_set_option($connresult, LDAP_OPT_REFERRALS, 0);
}
if (!empty($binddn)){
//bind with search-user
//$debuginfo .= 'Using bind user'.$binddn.'and password:'.$bindpwd;
-1
View File
@@ -47,4 +47,3 @@ function auth_user_login ($username, $password) {
$rauth->close();
}
?>
+1 -6
View File
@@ -14,7 +14,7 @@ Changes:
- 10. 2005: Added better error messages and moved text to language directories
- 02. 2006: Simplified authentication so that authorization works properly
Added instructions for IIS
- 11. 2006: User capabilities are now loaded properly as of Moodle 1.7+
Moodle Configuration with Dual login
@@ -164,11 +164,6 @@ Example file:
?>
--
Bugs
--------------------------------------------------------------------------------
Please send bug reports concerning the Shibboleth part to
Lukas Haemmerle <haemmerle@switch.ch>
--------------------------------------------------------------------------------
In case of problems and questions with Shibboleth authentication, contact
Lukas Haemmerle <haemmerle@switch.ch> or Markus Hagman <hagman@hytti.uku.fi>
+9
View File
@@ -56,6 +56,15 @@
$urltogo = $CFG->wwwroot.'/'; /// Go to the standard home page
unset($SESSION->wantsurl); /// Just in case
}
/// Go to my-moodle page instead of homepage if mymoodleredirect enabled
if (!has_capability('moodle/site:config',get_context_instance(CONTEXT_SYSTEM, SITEID)) and !empty($CFG->mymoodleredirect) and !isguest()) {
if ($urltogo == $CFG->wwwroot or $urltogo == $CFG->wwwroot.'/' or $urltogo == $CFG->wwwroot.'/index.php') {
$urltogo = $CFG->wwwroot.'/my/';
}
}
load_all_capabilities(); /// This is what lets the user do anything on the site :-)
redirect($urltogo);
}
+20 -19
View File
@@ -170,25 +170,10 @@
return get_users_by_capability(get_context_instance(CONTEXT_COURSE, $courseid), 'moodle/course:view');
}
//Returns all users (every record in users table)
//Returns all users ids (every record in users table)
function backup_get_all_users() {
global $CFG;
$result = false;
//Get users
$users = get_records_sql("SELECT DISTINCT id,id
FROM {$CFG->prefix}user");
//Add users
if ($users) {
foreach ($users as $user) {
$result[$user->id]->id = $user->id;
}
}
return $result;
return get_records('user', '', '', '', 'id, id');
}
//Calculate the number of log entries to backup
@@ -1751,6 +1736,16 @@
global $CFG,$preferences;
//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.
//Once fixed by PHP, we'll delete this hack
static $includedfiles;
if (!isset($includedfiles)) {
$includedfiles = array();
}
//Check if preferences is ok. If it isn't set, we are
//in a scheduled_backup to we are able to get a copy
//from CFG->backup_preferences
@@ -1770,8 +1765,14 @@
$result = str_replace($search,$replace,$content);
foreach ($mypreferences->mods as $name => $info) {
/// We only include the corresponding backuplib.php if it hasn't been included before
/// This will save some load under PHP5. MDL-8700.
/// Once fixed by PHP, we'll delete this hack
if (!in_array($name, $includedfiles)) {
include_once("$CFG->dirroot/mod/$name/backuplib.php");
$includedfiles[] = $name;
}
//Check if the xxxx_encode_content_links exists
include_once("$CFG->dirroot/mod/$name/backuplib.php");
$function_name = $name."_encode_content_links";
if (function_exists($function_name)) {
$result = $function_name($result,$mypreferences);
@@ -2222,4 +2223,4 @@
}
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;
}
+5 -15
View File
@@ -1,20 +1,9 @@
<?php //$Id$
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// This file keeps track of upgrades to Moodle's
// backup/restore utility.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
// 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
@@ -164,6 +153,7 @@ function backup_upgrade($oldversion=0) {
table_column('backup_ids','info','info','mediumtext','','','','not null');
}
////// DO NOT ADD NEW THINGS HERE!! USE upgrade.php and the lib/ddllib.php functions.
//Finally, return result
return $result;
-130
View File
@@ -1,130 +0,0 @@
rem
rem Table structure for table prefix_backup_files
rem
drop table prefix_backup_files;
CREATE TABLE prefix_backup_files (
backup_code number(10) default '0' NOT NULL,
file_type varchar2(10) default '' NOT NULL,
path varchar2(255) default '' NOT NULL,
old_id number(10) default NULL,
new_id number(10) default NULL
);
ALTER TABLE prefix_backup_files
ADD CONSTRAINT pbf_pk
PRIMARY KEY (backup_code,file_type,path);
COMMENT on table prefix_backup_files is 'To store and recode ids to user and course files.';
rem --------------------------------------------------------
rem
rem Table structure for table prefix_backup_ids
rem
drop table prefix_backup_ids;
CREATE TABLE prefix_backup_ids (
backup_code number(12) default '0' NOT NULL,
table_name varchar2(30) default '' NOT NULL,
old_id number(10) default '0' NOT NULL,
new_id number(10) default NULL,
info varchar2(20)
);
ALTER TABLE prefix_backup_ids
ADD CONSTRAINT pbi_pk
PRIMARY KEY (backup_code,table_name,old_id);
COMMENT on table prefix_backup_ids is 'To store and convert ids in backup/restore';
rem --------------------------------------------------------
rem
rem Table structure for table prefix_backup_config
rem
drop TABLE prefix_backup_config;
CREATE TABLE prefix_backup_config (
id number(10) default '0' not null,
name varchar2(255) default '' not null,
value varchar2(255) default '' not null,
constraint pk_baco primary key (id),
constraint uk_baco_name unique (name)
);
COMMENT on table prefix_backup_config is 'To store backup configuration variables';
drop sequence p_backup_config_seq;
create sequence p_backup_config_seq;
create or replace trigger p_backup_config_trig
before insert on prefix_backup_config
referencing new as new_row
for each row
begin
select p_backup_config_seq.nextval into :new_row.id from dual;
end;
rem --------------------------------------------------------
rem
rem Table structure for table prefix_backup_courses
rem
drop TABLE prefix_backup_courses;
CREATE TABLE prefix_backup_courses (
id number(10) default '0' NOT NULL,
courseid number(10) default '0' NOT NULL,
laststarttime number(10) default '0' NOT NULL,
lastendtime number(10) default '0' NOT NULL,
laststatus varchar2(1) default '0' NOT NULL,
nextstarttime number(10) default '0' NOT NULL,
constraint pk_bacu primary key (id),
constraint uk_bacu_courseid unique (courseid)
);
COMMENT on table prefix_backup_courses is 'To store every course backup status';
drop sequence p_backup_courses_seq;
create sequence p_backup_courses_seq;
create or replace trigger p_backup_courses_trig
before insert on prefix_backup_courses
referencing new as new_row
for each row
begin
select p_backup_courses_seq.nextval into :new_row.id from dual;
end;
rem --------------------------------------------------------
rem
rem Table structure for table prefix_backup_log
rem
drop TABLE prefix_backup_log;
CREATE TABLE prefix_backup_log (
id number(10) default '0' NOT NULL,
courseid number(10) default '0' NOT NULL,
time number(10) default '0' NOT NULL,
laststarttime number(10) default '0' NOT NULL,
info varchar2(255) default '0' NOT NULL,
constraint pk_balo primary key (id)
);
COMMENT on table prefix_backup_log is 'To store every course backup log info';
drop sequence p_backup_log_seq;
create sequence p_backup_log_seq;
create or replace trigger p_backup_log_trig
before insert on prefix_backup_log
referencing new as new_row
for each row
begin
select p_backup_log_seq.nextval into :new_row.id from dual;
end;
/
+6 -16
View File
@@ -1,21 +1,9 @@
<?php //$Id$
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// This file keeps track of upgrades to Moodle's
// backup/restore utility.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
//
// IT IS USED ONLY FOR UPGRADES FROM BEFORE MOODLE 1.7, ALL
// LATER CHANGES SHOULD USE upgrade.php IN THIS DIRECTORY.
function backup_upgrade($oldversion=0) {
@@ -61,6 +49,8 @@ function backup_upgrade($oldversion=0) {
table_column('backup_courses', 'nextstarttime', 'nextstarttime', 'integer', '', '', '0');
}
////// DO NOT ADD NEW THINGS HERE!! USE upgrade.php and the lib/ddllib.php functions.
//Finally, return result
return $result;
+38
View File
@@ -0,0 +1,38 @@
<?php //$Id$
// This file keeps track of upgrades to
// the backup system
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// The commands in here will all be database-neutral,
// using the functions defined in lib/ddllib.php
function xmldb_backup_upgrade($oldversion=0) {
global $CFG, $THEME, $db;
$result = true;
/// And upgrade begins here. For each one, you'll need one
/// block of code similar to the next one. Please, delete
/// this comment lines once this file start handling proper
/// upgrade code.
/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
/// $result = result of "/lib/ddllib.php" function calls
/// }
return $result;
}
?>
+7 -6
View File
@@ -7,10 +7,11 @@
//Sets a name/value pair in backup_config table
function backup_set_config($name, $value) {
if (get_field("backup_config", "name", "name", $name)) {
return set_field("backup_config", "value", $value, "name", $name);
return set_field("backup_config", "value", addslashes($value), "name", $name);
} else {
$config = new object();
$config->name = $name;
$config->value = $value;
$config->value = addslashes($value);
return insert_record("backup_config", $config);
}
}
@@ -118,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;
}
@@ -195,7 +196,7 @@
$results = null;
$dir = opendir($rootdir);
while ($file=readdir($dir)) {
while (false !== ($file=readdir($dir))) {
if ($file=="." || $file=="..") {
continue;
}
@@ -214,7 +215,7 @@
$results = "";
$dir = opendir($rootdir);
while ($file=readdir($dir)) {
while (false !== ($file=readdir($dir))) {
if ($file=="." || $file=="..") {
continue;
}
@@ -301,7 +302,7 @@
$status = mkdir($to_file,$CFG->directorypermissions);
}
$dir = opendir($from_file);
while ($file=readdir($dir)) {
while (false !== ($file=readdir($dir))) {
if ($file=="." || $file=="..") {
continue;
}
+19 -8
View File
@@ -17,15 +17,26 @@
//Detect if we are coming from the restore form
$fromform = optional_param ('fromform', 0, PARAM_INT);
if ($form1 = data_submitted()); {
if ($form1 = data_submitted()) {
$currentcourseshortname = $course_header->course_shortname; //"store_ShortName";
$course_header->course_shortname = $form1->shortname; //"update_ShortName";
$course_header->course_fullname = $form1->fullname; //"update_FullName";
$form1->startdate = make_timestamp($form1->startyear, $form1->startmonth, $form1->startday);
$currentcoursestartdate = $course_header->course_startdate;
$coursestartdatedateoffset = $form1->startdate - $currentcoursestartdate;
$restore->course_startdateoffset = $coursestartdatedateoffset; //change to restore
}
$course_header->course_shortname = $form1->shortname; //"update_ShortName";
$course_header->course_fullname = $form1->fullname; //"update_FullName";
/// Roll dates only if the backup course has a start date
/// (some formats like main page, social..., haven't it and rolling dates
/// from 0 produces crazy dates. MDL-10125
if ($course_header->course_startdate) {
$form1->startdate = make_timestamp($form1->startyear, $form1->startmonth, $form1->startday);
$currentcoursestartdate = $course_header->course_startdate;
$coursestartdatedateoffset = $form1->startdate - $currentcoursestartdate;
$restore->course_startdateoffset = $coursestartdatedateoffset; //change to restore
} else { // don't roll if the course hasn't start date
$coursestartdatedateoffset = 0;
$restore->course_startdateoffset = 0;
}
}
///Enforce SESSION->course_header rewrite (PHP 4.x needed because assigns are by value) MDL-8298
$SESSION->course_header = $course_header;
//If restore session info exists, but we are coming from the form
//it has prioriry
+9
View File
@@ -54,6 +54,15 @@
print_simple_box(get_string("restorefinished"),"center");
} else {
print_simple_box(get_string("importdatafinished"),"center");
$file = $CFG->dataroot . '/'
. $SESSION->import_preferences->backup_course
. '/backupdata/' . $SESSION->import_preferences->backup_name;
if (is_readable($file)) {
unlink($file);
}
else {
error_log("import course data: couldn't unlink $file");
}
unset($SESSION->restore);
}
print_continue("$CFG->wwwroot/course/view.php?id=".$restore->course_id);
+27 -10
View File
@@ -169,15 +169,16 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
echo "<td align=\"right\"><b>";
echo get_string("restoreto").":</b>";
echo "</td><td colspan=\"3\">";
if (!has_capability('moodle/course:create', get_context_instance(CONTEXT_COURSE, $id))) {
$restore_restoreto_options[0] = get_string("currentcoursedeleting");
$restore_restoreto_options[1] = get_string("currentcourseadding");
}
if (has_capability('moodle/course:create', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
$restore_restoreto_options[0] = get_string("existingcoursedeleting");
$restore_restoreto_options[1] = get_string("existingcourseadding");
$restore_restoreto_options[2] = get_string("newcourse");
} else { // fix for MDL-7773
$restore_restoreto_options[0] = get_string("currentcoursedeleting");
$restore_restoreto_options[1] = get_string("currentcourseadding");
}
choose_from_menu($restore_restoreto_options, "restore_restoreto", $restore_restoreto, "");
echo "</td></tr>";
if (iscreator()) { //display these fields conditionally
@@ -200,7 +201,17 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
echo "<td align=\"right\"> ";
print_string("startdate");
echo ":</td><td>";
print_date_selector("startday", "startmonth", "startyear", $form1->startdate);
/// Show the roll dates option only if the backup course has a start date
/// (some formats like main page, social..., haven't it and rolling dates
/// from 0 produces crazy dates. MDL-10125
if ($form1->startdate) {
print_date_selector("startday", "startmonth", "startyear", $form1->startdate);
} else {
print_string('notavailable');
echo '<input type="hidden" name="startyear" value="0" />';
echo '<input type="hidden" name="startmonth" value="0" />';
echo '<input type="hidden" name="startday" value="0" />';
}
helpbutton("coursestartdate", get_string("startdate"));
echo "</td></tr>";
}
@@ -266,7 +277,9 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
echo "<input type=\"hidden\" name=\"$user_info_var\" value=\"0\" />";
}
echo "</td></tr>";
$instances = $info->mods[$modname]->instances;
if (isset($info->mods[$modname]->instances)) {
$instances = $info->mods[$modname]->instances;
}
if (!empty($instances) && is_array($instances)) {
echo '<tr><td></td><td colspan="3"><table class="restore-form-instances">';
foreach ($instances as $instance) {
@@ -422,7 +435,11 @@ $xml_file = $CFG->dataroot."/temp/backup/".$backup_unique_code."/moodle.xml";
$info = restore_read_xml_info($xml_file);
$siterolesarray = get_assignable_roles (get_context_instance(CONTEXT_COURSE, $course->id), "shortname");
if ($course->id == SITEID) {
$siterolesarray = get_assignable_roles (get_context_instance(CONTEXT_SYSTEM, SITEID), "shortname");
} else {
$siterolesarray = get_assignable_roles (get_context_instance(CONTEXT_COURSE, $course->id), "shortname");
}
echo ('<table width="100%" class="restore-form-instances">');
echo ('<tr><td align="right"><b>'.get_string('sourcerole').'</b></td><td align="left"><b>'.get_string('targetrole').'</b></td></tr>');
@@ -439,7 +456,7 @@ if ($info->backup_moodle_version < 2006092801) {
$roles = get_roles_with_capability('moodle/legacy:editingteacher', CAP_ALLOW, get_context_instance(CONTEXT_SYSTEM, SITEID));
$editteacher = array_shift($roles);
choose_from_menu ($siterolesarray, "defaultteacheredit", $editteacher->id);
choose_from_menu ($siterolesarray, "defaultteacheredit", $editteacher->id, 'new role', '', '0');
echo ('</td></tr>');
/// Non-editting teacher
@@ -451,7 +468,7 @@ if ($info->backup_moodle_version < 2006092801) {
$roles = get_roles_with_capability('moodle/legacy:teacher', CAP_ALLOW, get_context_instance(CONTEXT_SYSTEM, SITEID));
$teacher = array_shift($roles);
choose_from_menu ($siterolesarray, "defaultteacher", $teacher->id);
choose_from_menu ($siterolesarray, "defaultteacher", $teacher->id, 'new role', '', '0');
echo ('</td></tr>');
@@ -464,7 +481,7 @@ if ($info->backup_moodle_version < 2006092801) {
$roles = get_roles_with_capability('moodle/legacy:student', CAP_ALLOW, get_context_instance(CONTEXT_SYSTEM, SITEID));
$studentrole = array_shift($roles);
choose_from_menu ($siterolesarray, "defaultstudent", $studentrole->id);
choose_from_menu ($siterolesarray, "defaultstudent", $studentrole->id, 'new role', '', '0');
echo ('</td></tr>');
} else {
+240 -86
View File
@@ -45,7 +45,7 @@
//Iterate
foreach($modules as $name => $module) {
//Only if the module is being restored
if ($module->restore == 1) {
if (isset($module->restore) && $module->restore == 1) {
//Include module library
include_once("$CFG->dirroot/mod/$name/lib.php");
//If module_refresh_events exists
@@ -70,9 +70,47 @@
if (!defined('RESTORE_SILENTLY')) {
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
if ($info->restore == 1) {
if (isset($info->restore) && $info->restore == 1) {
//Check if the xxxx_decode_content_links_caller exists
include_once("$CFG->dirroot/mod/$name/restorelib.php");
$function_name = $name."_decode_content_links_caller";
@@ -85,12 +123,23 @@
}
}
}
// TODO: process all html text also in blocks too
// Restore links in questions.
require_once("$CFG->dirroot/question/restorelib.php");
if (!defined('RESTORE_SILENTLY')) {
echo '<li>' . get_string('from') . ' ' . get_string('questions', 'quiz');
}
$status = question_decode_content_links_caller($restore);
if (!defined('RESTORE_SILENTLY')) {
echo '</li>';
}
if (!defined('RESTORE_SILENTLY')) {
echo "</ul>";
}
// TODO: process all html text also in blocks too
return $status;
}
@@ -365,7 +414,7 @@
} else {
$tab[$elem][1] = get_string("included")." ".get_string("withoutuserdata");
}
if (is_array($mod->instances) && count($mod->instances)) {
if (isset($mod->instances) && is_array($mod->instances) && count($mod->instances)) {
foreach ($mod->instances as $instance) {
if ($instance->backup) {
$elem++;
@@ -565,7 +614,7 @@
$course->lang = addslashes($course_header->course_lang);
$course->theme = addslashes($course_header->course_theme);
$course->cost = addslashes($course_header->course_cost);
$course->currency = addslashes($course_header->course_currency);
$course->currency = isset($course_header->course_currency)?addslashes($course_header->course_currency):'';
$course->marker = addslashes($course_header->course_marker);
$course->visible = addslashes($course_header->course_visible);
$course->hiddensections = addslashes($course_header->course_hiddensections);
@@ -901,18 +950,22 @@
// Yu: This part is called repeatedly for every instance,
// so it is necessary to set the granular flag and check isset()
// when the first instance of this type of mod is processed.
if (!isset($restore->mods[$mod->type]->granular) && is_array($restore->mods[$mod->type]->instances)) {
// This defines whether we want to restore specific
// instances of the modules (granular restore), or
// whether we don't care and just want to restore
// all module instances (non-granular).
$restore->mods[$mod->type]->granular = true;
} else {
$restore->mods[$mod->type]->granular = false;
//if (!isset($restore->mods[$mod->type]->granular) && isset($restore->mods[$mod->type]->instances) && is_array($restore->mods[$mod->type]->instances)) {
if (!isset($restore->mods[$mod->type]->granular)) {
if (isset($restore->mods[$mod->type]->instances) && is_array($restore->mods[$mod->type]->instances)) {
// This defines whether we want to restore specific
// instances of the modules (granular restore), or
// whether we don't care and just want to restore
// all module instances (non-granular).
$restore->mods[$mod->type]->granular = true;
} else {
$restore->mods[$mod->type]->granular = false;
}
}
//Check if we've to restore this module (and instance)
if ($restore->mods[$mod->type]->restore) {
if (!empty($restore->mods[$mod->type]->restore)) {
if (empty($restore->mods[$mod->type]->granular) // we don't care about per instance
|| (array_key_exists($mod->instance,$restore->mods[$mod->type]->instances)
&& !empty($restore->mods[$mod->type]->instances[$mod->instance]->restore))) {
@@ -1111,7 +1164,7 @@
if (!$preferencescount) {
$continue = false;
if (!defined('RESTORE_SILENTLY')) {
echo '<li>'.get_string('backupwithoutgradebook','grade').'</li>';
echo '<li>'.get_string('backupwithoutgradebook','grades').'</li>';
}
}
@@ -1122,7 +1175,7 @@
if ($pref_rec->value == 0) {
$continue = false;
if (!defined('RESTORE_SILENTLY')) {
echo '<li>'.get_string('respectingcurrentdata','grade').'</li>';
echo '<li>'.get_string('respectingcurrentdata','grades').'</li>';
}
}
}
@@ -1138,7 +1191,7 @@
//Fetch recordset_size records in each iteration
$recs = get_records_select("backup_ids","table_name = 'grade_preferences' AND backup_code = '$restore->backup_unique_code'",
"old_id",
"old_id, old_id",
"old_id",
$counter,
$recordset_size);
if ($recs) {
@@ -1192,7 +1245,7 @@
//Fetch recordset_size records in each iteration
$recs = get_records_select("backup_ids","table_name = 'grade_letter' AND backup_code = '$restore->backup_unique_code'",
"old_id",
"old_id, old_id",
"old_id",
$counter,
$recordset_size);
if ($recs) {
@@ -1242,7 +1295,7 @@
//Fetch recordset_size records in each iteration
$recs = get_records_select("backup_ids","table_name = 'grade_category' AND backup_code = '$restore->backup_unique_code'",
"old_id",
"old_id, old_id",
"old_id",
$countercat,
$recordset_size);
if ($recs) {
@@ -1401,21 +1454,42 @@
//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
if (!empty($info->users)) {
//For each user, take its info from backup_ids
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];
}
//Check if it's admin and coursecreator
$is_admin = !empty($user->roles['admin']);
$is_coursecreator = !empty($user->roles['coursecreator']);
@@ -1693,7 +1767,7 @@
$counter = 0;
while ($counter < $unreadcount) {
//Fetch recordset_size records in each iteration
$recs = get_records_select("backup_ids","table_name = 'message' AND backup_code = '$restore->backup_unique_code'","old_id","old_id, old_id",$counter,$recordset_size);
$recs = get_records_select("backup_ids","table_name = 'message' AND backup_code = '$restore->backup_unique_code'","old_id","old_id",$counter,$recordset_size);
if ($recs) {
foreach ($recs as $rec) {
//Get the full record from backup_ids
@@ -1758,7 +1832,7 @@
$counter = 0;
while ($counter < $readcount) {
//Fetch recordset_size records in each iteration
$recs = get_records_select("backup_ids","table_name = 'message_read' AND backup_code = '$restore->backup_unique_code'","old_id","old_id, old_id",$counter,$recordset_size);
$recs = get_records_select("backup_ids","table_name = 'message_read' AND backup_code = '$restore->backup_unique_code'","old_id","old_id",$counter,$recordset_size);
if ($recs) {
foreach ($recs as $rec) {
//Get the full record from backup_ids
@@ -1825,7 +1899,7 @@
$counter = 0;
while ($counter < $contactcount) {
//Fetch recordset_size records in each iteration
$recs = get_records_select("backup_ids","table_name = 'message_contacts' AND backup_code = '$restore->backup_unique_code'","old_id","old_id, old_id",$counter,$recordset_size);
$recs = get_records_select("backup_ids","table_name = 'message_contacts' AND backup_code = '$restore->backup_unique_code'","old_id","old_id",$counter,$recordset_size);
if ($recs) {
foreach ($recs as $rec) {
//Get the full record from backup_ids
@@ -1913,14 +1987,7 @@
foreach ($info as $category) {
//Skip empty categories (some backups can contain them)
if (!empty($category->id)) {
$catrestore = "restore_question_categories";
if (function_exists($catrestore)) {
//print_object ($category); //Debug
$status = $catrestore($category,$restore);
} else {
//Something was wrong. Function should exist.
$status = false;
}
$status = restore_question_categories($category,$restore);
}
}
@@ -1932,15 +1999,14 @@
if ($categories) {
foreach ($categories as $category) {
$restoredcategory = get_record('question_categories','id',$category->new_id);
$restoredcategory = addslashes_object($restoredcategory);
if ($restoredcategory->parent != 0) {
//echo 'Parent '.$restoredcategory->parent.' is '; //Debug
$idcat = backup_getid($restore->backup_unique_code,'question_categories',$restoredcategory->parent);
if ($idcat->new_id) {
$restoredcategory->parent = $idcat->new_id;
} else {
$restoredcategory->parent = 0;
}
//echo $restoredcategory->parent.' now<br />'; //Debug
update_record('question_categories', $restoredcategory);
}
}
@@ -2091,7 +2157,18 @@
//Now search if that group exists (by name and description field) in
//restore->course_id course
$gro_db = get_record("groups","courseid",$restore->course_id,"name",$gro->name,"description",$gro->description);
//Going to compare LOB columns so, use the cross-db sql_compare_text() in both sides.
$description_clause = '';
if (!empty($gro->description)) { /// Only for groups having a description
$literal_description = "'" . $gro->description . "'";
$description_clause = " AND " .
sql_compare_text('description') . " = " .
sql_compare_text($literal_description);
}
$gro_db = get_record_sql("SELECT *
FROM {$CFG->prefix}groups
WHERE courseid = $restore->course_id AND
name = '{$gro->name}'" . $description_clause);
//If it doesn't exist, create
if (!$gro_db) {
$create_group = true;
@@ -2205,10 +2282,7 @@
//Get admin->id for later use
$admin = get_admin();
$adminid = $admin->id;
//First, we check the course_id backup data folder exists
$dest_dir = $CFG->dataroot."/".$restore->course_id."/backupdata";
check_dir_exists($dest_dir,true);
$restorelog_file = fopen("$dest_dir/restorelog.html","a");
//Now, if we have anything in events, we have to restore that
//events
if ($events) {
@@ -2227,6 +2301,11 @@
//print_object ($GLOBALS['traverse_array']); //Debug
//$GLOBALS['traverse_array']=""; //Debug
//if necessary, write to restorelog and adjust date/time fields
if ($restore->course_startdateoffset) {
restore_log_date_changes('Events', $restore, $info['EVENT']['#'], array('TIMESTART'));
}
//Now build the EVENT record structure
$eve->name = backup_todb($info['EVENT']['#']['NAME']['0']['#']);
$eve->description = backup_todb($info['EVENT']['#']['DESCRIPTION']['0']['#']);
@@ -2239,11 +2318,6 @@
$eve->instance = 0;
$eve->eventtype = backup_todb($info['EVENT']['#']['EVENTTYPE']['0']['#']);
$eve->timestart = backup_todb($info['EVENT']['#']['TIMESTART']['0']['#']);
$date = usergetdate($eve->timestart);
fwrite ($restorelog_file,"The Event - ".$eve->name. " - TIMESTART was " .$date['weekday'].", ".$date['mday']." ".$date['month']." ".$date['year']."");
$eve->timestart += $restore->course_startdateoffset;
$date = usergetdate($eve->timestart);
fwrite ($restorelog_file,"&nbsp;&nbsp;&nbsp;the Event TIMESTART is now " .$date['weekday'].", ".$date['mday']." ".$date['month']." ".$date['year']."<br>");
$eve->timeduration = backup_todb($info['EVENT']['#']['TIMEDURATION']['0']['#']);
$eve->visible = backup_todb($info['EVENT']['#']['VISIBLE']['0']['#']);
$eve->timemodified = backup_todb($info['EVENT']['#']['TIMEMODIFIED']['0']['#']);
@@ -2266,19 +2340,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);
@@ -2291,6 +2352,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;
@@ -2603,7 +2680,7 @@
while ($counter < $count_logs) {
//Get a chunk of records
//Take old_id twice to avoid adodb limitation
$logs = get_records_select("backup_ids","table_name = 'log' AND backup_code = '$restore->backup_unique_code'","old_id","old_id,old_id",$counter,$recordset_size);
$logs = get_records_select("backup_ids","table_name = 'log' AND backup_code = '$restore->backup_unique_code'","old_id","old_id",$counter,$recordset_size);
//We have logs
if ($logs) {
//Iterate
@@ -4415,7 +4492,7 @@
break;
}
}
if ($this->level == 6 && $this->tree[5]!="ROLE_ASSIGNMENTS" && $this->tree[5]!="ROLE_OVERRIDES") {
if ($this->level == 6 && $this->tree[5]!="ROLES_ASSIGNMENTS" && $this->tree[5]!="ROLES_OVERRIDES") {
switch ($tagName) {
case "ROLE":
//We've finalized a role, get it
@@ -4430,7 +4507,7 @@
}
}
if ($this->level == 7 && $this->tree[5]!="ROLE_ASSIGNMENTS" && $this->tree[5]!="ROLE_OVERRIDES") {
if ($this->level == 7) {
switch ($tagName) {
case "TYPE":
$this->info->temprole->type = $this->getContents();
@@ -4901,7 +4978,7 @@
$mod_id = $data["MOD"]["#"]["ID"]["0"]["#"];
$mod_type = $data["MOD"]["#"]["MODTYPE"]["0"]["#"];
//Only if we've selected to restore it
if ($this->preferences->mods[$mod_type]->restore) {
if (!empty($this->preferences->mods[$mod_type]->restore)) {
//Save to db
$status = backup_putid($this->preferences->backup_unique_code,$mod_type,$mod_id,
null,$data);
@@ -5350,7 +5427,7 @@
*/
function restore_userdata_selected($restore,$modname,$modid) {
// check first for per instance array
if (!empty($restore->mods[$modname]->instances)) { // supports per instance
if (!empty($restore->mods[$modname]->granular)) { // supports per instance
return array_key_exists($modid,$restore->mods[$modname]->instances)
&& !empty($restore->mods[$modname]->instances[$modid]->userinfo);
}
@@ -5829,9 +5906,9 @@
}
if (!$status = restore_decode_content_links($restore)) {
if (!defined('RESTORE_SILENTLY')) {
notify("Could not refresh events for activities!");
notify("Could not decode content links!");
} else {
$errorstr = "Could not refresh events for activities!";
$errorstr = "Could not decode content links!";
return false;
}
}
@@ -5878,7 +5955,7 @@
// would have loaded it anyway, if there is any assignments.
// fix for MDL-6831
$newcontext = get_context_instance(CONTEXT_COURSE, $restore->course_id);
if (!has_capability('course:manageactivities', $newcontext)) {
if (!has_capability('moodle/course:manageactivities', $newcontext)) {
if ($legacyteachers = get_roles_with_capability('moodle/legacy:editingteacher', CAP_ALLOW, get_context_instance(CONTEXT_SYSTEM, SITEID))) {
if ($legacyteacher = array_shift($legacyteachers)) {
role_assign($legacyteacher->id, $USER->id, 0, $newcontext->id);
@@ -6016,12 +6093,24 @@
// the following code creates new roles
// but we could use more intelligent detection, and role mapping
// get role mapping info from $restore
$rolemappings = array();
$rolemappings = $restore->rolesmapping; // an array
if ($info->roles) {
foreach ($info->roles as $oldroleid=>$roledata) {
if (!empty($restore->rolesmapping)) {
$rolemappings = $restore->rolesmapping;
}
// $info->roles will be empty for backups pre 1.7
if (isset($info->roles) && $info->roles) {
/// first we check if the roles are in the mappings
foreach ($info->roles as $oldroleid=>$roledata) {
if (empty($restore->rolesmapping)) {
// if this is empty altogether, we came from import or there's no roles used in course at all
// in this case, write the same oldid as this is the same site
// no need to do mapping
$status = backup_putid($restore->backup_unique_code,"role",$oldroleid,
$oldroleid); // adding a new id
continue; // do not create additonal roles;
}
// first we check if the roles are in the mappings
// if so, we just do a mapping i.e. update oldids table
if (isset($rolemappings[$oldroleid]) && $rolemappings[$oldroleid]) {
$status = backup_putid($restore->backup_unique_code,"role",$oldroleid,
@@ -6057,7 +6146,7 @@
// done finding a unique name
$newroleid = create_role($roledata->name,$roledata->shortname,'');
$newroleid = create_role(addslashes($roledata->name),addslashes($roledata->shortname),'');
$status = backup_putid($restore->backup_unique_code,"role",$oldroleid,
$newroleid); // adding a new id
foreach ($roledata->capabilities as $capability) {
@@ -6073,7 +6162,6 @@
}
}
}
return true;
}
@@ -6093,7 +6181,13 @@
}
$course = restore_read_xml_course_header($xmlfile);
if (!empty($course->roleassignments)) {
if (!isset($restore->rolesmapping)) {
$isimport = true; // course import from another course, or course with no role assignments
} else {
$isimport = false; // course restore with role assignments
}
if (!empty($course->roleassignments) && !$isimport) {
$courseassignments = $course->roleassignments;
foreach ($courseassignments as $oldroleid => $courseassignment) {
@@ -6104,14 +6198,12 @@
* Restoring from course level overrides *
*****************************************************/
if (!empty($course->roleoverrides)) {
if (!empty($course->roleoverrides) && !$isimport) {
$courseoverrides = $course->roleoverrides;
$rolemappings = $restore->rolesmapping;
foreach ($courseoverrides as $oldroleid => $courseoverride) {
// if not importing into exiting course, or creating new role, we are ok
// local course overrides to be respected (i.e. restored course overrides ignored)
if ($restore->restoreto != 1 || empty($rolemappings[$oldroleid])) {
if ($restore->restoreto != 1 || empty($restore->rolesmapping[$oldroleid])) {
restore_write_roleoverrides($restore, $courseoverride->overrides, "course", CONTEXT_COURSE, $course->course_id, $oldroleid);
}
}
@@ -6131,11 +6223,12 @@
foreach ($secs as $section) {
if (isset($section->mods)) {
foreach ($section->mods as $modid=>$mod) {
if (isset($mod->roleassignments)) {
if (isset($mod->roleassignments) && !$isimport) {
foreach ($mod->roleassignments as $oldroleid=>$modassignment) {
restore_write_roleassignments($restore, $modassignment->assignments, "course_modules", CONTEXT_MODULE, $modid, $oldroleid);
}
}
// role overrides always applies, in import or backup/restore
if (isset($mod->roleoverrides)) {
foreach ($mod->roleoverrides as $oldroleid=>$modoverride) {
restore_write_roleoverrides($restore, $modoverride->overrides, "course_modules", CONTEXT_MODULE, $modid, $oldroleid);
@@ -6157,13 +6250,14 @@
$blocks = restore_read_xml_blocks($xmlfile);
if (isset($blocks->instances)) {
foreach ($blocks->instances as $instance) {
if (isset($instance->roleassignments)) {
if (isset($instance->roleassignments) && !$isimport) {
foreach ($instance->roleassignments as $oldroleid=>$blockassignment) {
restore_write_roleassignments($restore, $blockassignment->assignments, "block_instance", CONTEXT_BLOCK, $instance->id, $oldroleid);
}
}
if (isset($instance->roleoverrides)) {
// likewise block overrides should always be restored like mods
if (isset($instance->roleoverrides)) {
foreach ($instance->roleoverrides as $oldroleid=>$blockoverride) {
restore_write_roleoverrides($restore, $blockoverride->overrides, "block_instance", CONTEXT_BLOCK, $instance->id, $oldroleid);
}
@@ -6179,7 +6273,7 @@
echo "<li>".get_string("creatinguserroles").'</li>';
}
$info = restore_read_xml_users($restore, $xmlfile);
if (!empty($info->users)) {
if (!empty($info->users) && !$isimport) { // no need to restore user assignments for imports (same course)
//For each user, take its info from backup_ids
foreach ($info->users as $userid) {
$rec = backup_getid($restore->backup_unique_code,"user",$userid);
@@ -6212,7 +6306,7 @@
}
$assignment->userid = $olduser->new_id; // new userid here
$oldmodifier = backup_getid($restore->backup_unique_code,"user",$assignment->modifierid);
$assignment->modifierid = $oldmodifier->new_id?$oldmodifier->new_id:0; // new modifier id here
$assignment->modifierid = !empty($oldmodifier->new_id) ? $oldmodifier->new_id : 0; // new modifier id here
$assignment->roleid = $role->new_id; // restored new role id
// hack to make the correct contextid for course level imports
@@ -6225,7 +6319,7 @@
$newcontext = get_context_instance($contextlevel, $oldinstance->new_id);
$assignment->contextid = $newcontext->id; // new context id
// might already have same assignment
role_assign($assignment->roleid, $assignment->userid, 0, $assignment->contextid, $assignment->timestart, $assignment->timeend, $assignment->hidden, $assignment->enrol);
role_assign($assignment->roleid, $assignment->userid, 0, $assignment->contextid, $assignment->timestart, $assignment->timeend, $assignment->hidden, $assignment->enrol, $assignment->timemodified);
}
}
@@ -6259,5 +6353,65 @@
insert_record('role_capabilities', $override);
}
}
}
?>
}
//write activity date changes to the html log file, and update date values in the the xml array
function restore_log_date_changes($recordtype, &$restore, &$xml, $TAGS, $NAMETAG='NAME') {
global $CFG;
$openlog = false;
// loop through time fields in $TAGS
foreach ($TAGS as $TAG) {
// check $TAG has a sensible value
if (!empty($xml[$TAG][0]['#']) && is_string($xml[$TAG][0]['#']) && is_numeric($xml[$TAG][0]['#'])) {
if ($openlog==false) {
$openlog = true; // only come through here once
// open file for writing
$course_dir = "$CFG->dataroot/$restore->course_id/backupdata";
check_dir_exists($course_dir, true);
$restorelog = fopen("$course_dir/restorelog.html", "a");
// start output for this record
$msg = new stdClass();
$msg->recordtype = $recordtype;
$msg->recordname = $xml[$NAMETAG][0]['#'];
fwrite ($restorelog, get_string("backupdaterecordtype", "moodle", $msg));
}
// write old date to $restorelog
$value = $xml[$TAG][0]['#'];
$date = usergetdate($value);
$msg = new stdClass();
$msg->TAG = $TAG;
$msg->weekday = $date['weekday'];
$msg->mday = $date['mday'];
$msg->month = $date['month'];
$msg->year = $date['year'];
fwrite ($restorelog, get_string("backupdateold", "moodle", $msg));
// write new date to $restorelog
$value += $restore->course_startdateoffset;
$date = usergetdate($value);
$msg = new stdClass();
$msg->TAG = $TAG;
$msg->weekday = $date['weekday'];
$msg->mday = $date['mday'];
$msg->month = $date['month'];
$msg->year = $date['year'];
fwrite ($restorelog, get_string("backupdatenew", "moodle", $msg));
// update $value in $xml tree for calling module
$xml[$TAG][0]['#'] = "$value";
}
}
// close the restore log, if it was opened
if ($openlog) {
fclose($restorelog);
}
}
?>
+2 -2
View File
@@ -6,7 +6,7 @@
/// database (backup_version) to determine whether upgrades should
/// be performed (see db/backup_*.php)
$backup_version = 2006082301; // The current version is a date (YYYYMMDDXX)
$backup_release = "1.7dev"; // User-friendly version number
$backup_version = 2006082304; // The current version is a date (YYYYMMDDXX)
$backup_release = "1.7"; // User-friendly version number
?>
-1232
View File
File diff suppressed because it is too large Load Diff
+5 -15
View File
@@ -1,20 +1,8 @@
<?PHP //$Id$
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
// 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
@@ -28,6 +16,8 @@ function activity_modules_upgrade($oldversion=0) {
$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;
}
+6 -15
View File
@@ -1,20 +1,9 @@
<?PHP //$Id$
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
// 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 PostgreSQL
@@ -28,6 +17,8 @@ function activity_modules_upgrade($oldversion=0) {
$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;
}
+38
View File
@@ -0,0 +1,38 @@
<?php //$Id$
// This file keeps track of upgrades to
// the activity_modules block
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// The commands in here will all be database-neutral,
// using the functions defined in lib/ddllib.php
function xmldb_block_activity_modules_upgrade($oldversion=0) {
global $CFG, $THEME, $db;
$result = true;
/// And upgrade begins here. For each one, you'll need one
/// block of code similar to the next one. Please, delete
/// this comment lines once this file start handling proper
/// upgrade code.
/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
/// $result = result of "/lib/ddllib.php" function calls
/// }
return $result;
}
?>
+18 -37
View File
@@ -57,7 +57,7 @@ class block_admin extends block_list {
$this->content->items[]='<a href="view.php?id='.$this->instance->pageid.'&amp;edit=on&amp;sesskey='.sesskey().'">'.get_string('turneditingon').'</a>';
}
$this->content->items[]='<a href="edit.php?id='.$this->instance->pageid.'">'.get_string('settings').'</a>';
$this->content->items[]='<a href="'.$CFG->wwwroot.'/course/edit.php?id='.$this->instance->pageid.'">'.get_string('settings').'</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/settings.gif" alt="" />';
}
@@ -143,16 +143,16 @@ class block_admin extends block_list {
}
/// Authorize hooks
if (has_capability('enrol/authorize:managepayments', $context)) {
if ($course->enrol == 'authorize' || (empty($course->enrol) && $CFG->enrol == 'authorize')) {
require_once($CFG->dirroot.'/enrol/authorize/const.php');
$paymenturl = '<a href="'.$CFG->wwwroot.'/enrol/authorize/index.php?course='.$course->id.'">'.get_string('payments').'</a> ';
if ($course->enrol == 'authorize' || (empty($course->enrol) && $CFG->enrol == 'authorize')) {
require_once($CFG->dirroot.'/enrol/authorize/const.php');
$paymenturl = '<a href="'.$CFG->wwwroot.'/enrol/authorize/index.php?course='.$course->id.'">'.get_string('payments').'</a> ';
if (has_capability('enrol/authorize:managepayments', $context)) {
if ($cnt = count_records('enrol_authorize', 'status', AN_STATUS_AUTH, 'courseid', $course->id)) {
$paymenturl .= '<a href="'.$CFG->wwwroot.'/enrol/authorize/index.php?status='.AN_STATUS_AUTH.'&amp;course='.$course->id.'">'.get_string('paymentpending', 'moodle', $cnt).'</a>';
}
$this->content->items[] = $paymenturl;
$this->content->icons[] = '<img src="'.$CFG->pixpath.'/i/payment.gif" alt="" />';
}
$this->content->items[] = $paymenturl;
$this->content->icons[] = '<img src="'.$CFG->pixpath.'/i/payment.gif" alt="" />';
}
/// View course grades (or just your own grades, same link)
@@ -162,38 +162,19 @@ class block_admin extends block_list {
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/grades.gif" alt="" />';
}
/// Person can unenrol themselves from this course
if (has_capability('moodle/role:unassignself', $context, NULL, false) and empty($course->metacourse)) {
$this->content->items[]='<a href="unenrol.php?id='.$this->instance->pageid.'">'.get_string('unenrolme', '', $course->shortname).'</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/user.gif" alt="" />';
if (empty($course->metacourse)) {
if (has_capability('moodle/legacy:guest', $context, NULL, false)) { // Are a guest now
$this->content->items[]='<a href="enrol.php?id='.$this->instance->pageid.'">'.get_string('enrolme', '', $course->shortname).'</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/user.gif" alt="" />';
} else if (has_capability('moodle/role:unassignself', $context, NULL, false)) { // Have some role
$this->content->items[]='<a href="unenrol.php?id='.$this->instance->pageid.'">'.get_string('unenrolme', '', $course->shortname).'</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/user.gif" alt="" />';
}
}
/// Should the following two be in this block?
/// View own activity report
// if ($course->showreports) {
// $this->content->items[]='<a href="user.php?id='.$this->instance->pageid.'&amp;user='.$USER->id.'">'.get_string('activityreport').'</a>';
// $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/report.gif" alt="" />';
// }
/// Edit your own profile
// $fullname = fullname($USER, has_capability('moodle/site:viewfullnames', $context));
// $editmyprofile = '<a title="'.$fullname.'" href="'.$CFG->wwwroot.'/user/edit.php?id='.$USER->id.'&amp;course='.$this->instance->pageid.'">'.get_string('editmyprofile').'</a>';
// if (empty($USER->description)) {
// //Accessibility: replace non-standard <blink> with CSS (<a> makes title visible in IE).
// $text = get_string('profile').' '.get_string('missingdescription');
// $this->content->items[]= $editmyprofile.' <a title="'.$text.'" class="useredit blink">*<span class="accesshide">'.$text.'</span></a>';
// } else {
// $this->content->items[]= $editmyprofile;
// }
// $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/user.gif" alt="" />';
/// Link to the user own profile
$this->content->items[]='<a href="'.$CFG->wwwroot.'/user/view.php?id='.$USER->id.'&amp;course='.$course->id.'">'.get_string('profile').'</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/user.gif" alt="" />';
return $this->content;
}
+6 -15
View File
@@ -1,20 +1,9 @@
<?PHP //$Id$
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
// 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
@@ -28,6 +17,8 @@ function admin_upgrade($oldversion=0) {
$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;
}
+6 -15
View File
@@ -1,20 +1,9 @@
<?PHP //$Id$
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
// 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 PostgreSQL
@@ -28,6 +17,8 @@ function admin_upgrade($oldversion=0) {
$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;
}
+38
View File
@@ -0,0 +1,38 @@
<?php //$Id$
// This file keeps track of upgrades to
// the admin block
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// The commands in here will all be database-neutral,
// using the functions defined in lib/ddllib.php
function xmldb_block_admin_upgrade($oldversion=0) {
global $CFG, $THEME, $db;
$result = true;
/// And upgrade begins here. For each one, you'll need one
/// block of code similar to the next one. Please, delete
/// this comment lines once this file start handling proper
/// upgrade code.
/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
/// $result = result of "/lib/ddllib.php" function calls
/// }
return $result;
}
?>
@@ -57,7 +57,10 @@ class block_admin_bookmarks extends block_base {
$bookmarks = array();
}
if (($section = (isset($PAGE->section) ? $PAGE->section : '')) && (in_array($section, $bookmarks))) {
if(isset($PAGE->section) and $PAGE->section == 'search'){
// the search page can't be properly bookmarked at present
$this->content->footer = '';
}elseif (($section = (isset($PAGE->section) ? $PAGE->section : '')) && (in_array($section, $bookmarks))) {
$this->content->footer = '<a href="' . $CFG->wwwroot . '/blocks/admin_bookmarks/delete.php?section=' . $section . '&amp;sesskey='.sesskey().'">' . get_string('unbookmarkthispage','admin') . '</a>';
} elseif ($section = (isset($PAGE->section) ? $PAGE->section : '')) {
$this->content->footer = '<a href="' . $CFG->wwwroot . '/blocks/admin_bookmarks/create.php?section=' . $section . '&amp;sesskey='.sesskey().'">' . get_string('bookmarkthispage','admin') . '</a>';
+5 -5
View File
@@ -88,8 +88,8 @@ class block_blog_menu extends block_base {
&& (!$blogmodon || ($blogmodon && $coursearg != ''))
&& $CFG->bloglevel >= BLOG_USER_LEVEL ) {
// show Add entry link - moderation is off, or moderation is on and the user is viewing the block within the context of a course
if (has_capability('moodle/blog:create', $curcontext)) {
// show Add entry link
if (has_capability('moodle/blog:create', $sitecontext)) {
$addentrylink = '<li><a href="'. $CFG->wwwroot. '/blog/edit.php?action=add'
.$coursearg.'">'.get_string('addnewentry', 'blog') ."</a></li>\n";
}
@@ -113,9 +113,9 @@ class block_blog_menu extends block_base {
$output .= get_string('viewsiteentries', 'blog')."</a></li>\n";
}
if (isloggedin() && !isguest()
&& (has_capability('moodle/blog:manageofficialtags', $sitecontext)
|| has_capability('moodle/blog:managepersonaltags', $curcontext))) {
if (has_capability('moodle/blog:manageofficialtags', $sitecontext)
or has_capability('moodle/blog:managepersonaltags', $sitecontext)
or has_capability('moodle/blog:create', $sitecontext)) {
$output .= '<li>'. link_to_popup_window("/blog/tags.php",'popup',get_string('tagmanagement'), 400, 500, 'Popup window', 'none', true) ."</li>\n";
}
+3 -4
View File
@@ -77,16 +77,15 @@ class block_blog_tags extends block_base {
$timewithin = $this->config->timewithin * 24 * 60 * 60; /// convert to seconds
$sql = 'SELECT t.id, t.type, t.text, COUNT(DISTINCT bt.id) as ct ';
$sql .= "FROM {$CFG->prefix}tags as t, {$CFG->prefix}blog_tag_instance as bt, {$CFG->prefix}post as p ";
$sql .= "FROM {$CFG->prefix}tags t, {$CFG->prefix}blog_tag_instance bt, {$CFG->prefix}post p ";
$sql .= 'WHERE t.id = bt.tagid ';
$sql .= 'AND p.id = bt.entryid ';
$sql .= 'AND (p.publishstate = \'site\' or p.publishstate=\'public\') ';
$sql .= "AND bt.timemodified > {$timewithin} ";
$sql .= 'GROUP BY t.id, t.type, t.text ';
$sql .= 'ORDER BY ct DESC, t.text ASC ';
$sql .= "LIMIT {$this->config->numberoftags} ";
$sql .= 'ORDER BY ct DESC, t.text ASC';
if ($tags = get_records_sql($sql)) {
if ($tags = get_records_sql($sql, 0, $this->config->numberoftags)) {
/// There are 2 things to do:
/// 1. tags with the same count should have the same size class
+6 -15
View File
@@ -1,20 +1,9 @@
<?PHP //$Id$
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
// 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
@@ -28,6 +17,8 @@ function calendar_month_upgrade($oldversion=0) {
$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;
}
+6 -15
View File
@@ -1,20 +1,9 @@
<?PHP //$Id$
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
// 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 PostgreSQL
@@ -28,6 +17,8 @@ function calendar_month_upgrade($oldversion=0) {
$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;
}
+38
View File
@@ -0,0 +1,38 @@
<?php //$Id$
// This file keeps track of upgrades to
// the calendar_month block
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// The commands in here will all be database-neutral,
// using the functions defined in lib/ddllib.php
function xmldb_block_calendar_month_upgrade($oldversion=0) {
global $CFG, $THEME, $db;
$result = true;
/// And upgrade begins here. For each one, you'll need one
/// block of code similar to the next one. Please, delete
/// this comment lines once this file start handling proper
/// upgrade code.
/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
/// $result = result of "/lib/ddllib.php" function calls
/// }
return $result;
}
?>
+6 -15
View File
@@ -1,20 +1,9 @@
<?PHP //$Id$
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
// 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
@@ -28,6 +17,8 @@ function calendar_upcoming_upgrade($oldversion=0) {
$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;
}
+6 -15
View File
@@ -1,20 +1,9 @@
<?PHP //$Id$
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
// 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 PostgreSQL
@@ -28,6 +17,8 @@ function calendar_upcoming_upgrade($oldversion=0) {
$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;
}
+38
View File
@@ -0,0 +1,38 @@
<?php //$Id$
// This file keeps track of upgrades to
// the calendar_upcoming block
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// The commands in here will all be database-neutral,
// using the functions defined in lib/ddllib.php
function xmldb_block_calendar_upcoming_upgrade($oldversion=0) {
global $CFG, $THEME, $db;
$result = true;
/// And upgrade begins here. For each one, you'll need one
/// block of code similar to the next one. Please, delete
/// this comment lines once this file start handling proper
/// upgrade code.
/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
/// $result = result of "/lib/ddllib.php" function calls
/// }
return $result;
}
?>
+1 -1
View File
@@ -36,7 +36,7 @@ class block_course_list extends block_list {
if (empty($CFG->disablemycourses) and
!empty($USER->id) and
!(has_capability('moodle/course:update', get_context_instance(CONTEXT_SYSTEM, SITEID)) and $adminseesall)and
!(has_capability('moodle/course:update', get_context_instance(CONTEXT_SYSTEM)) and $adminseesall) and
!isguest()) { // Just print My Courses
if ($courses = get_my_courses($USER->id)) {
foreach ($courses as $course) {
+6 -15
View File
@@ -1,20 +1,9 @@
<?PHP //$Id$
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
// 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
@@ -28,6 +17,8 @@ function course_list_upgrade($oldversion=0) {
$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;
}
+6 -15
View File
@@ -1,20 +1,9 @@
<?PHP //$Id$
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
// 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 PostgreSQL
@@ -28,6 +17,8 @@ function course_list_upgrade($oldversion=0) {
$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;
}
+38
View File
@@ -0,0 +1,38 @@
<?php //$Id$
// This file keeps track of upgrades to
// the course_list block
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// The commands in here will all be database-neutral,
// using the functions defined in lib/ddllib.php
function xmldb_block_course_list_upgrade($oldversion=0) {
global $CFG, $THEME, $db;
$result = true;
/// And upgrade begins here. For each one, you'll need one
/// block of code similar to the next one. Please, delete
/// this comment lines once this file start handling proper
/// upgrade code.
/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
/// $result = result of "/lib/ddllib.php" function calls
/// }
return $result;
}
?>
+6 -15
View File
@@ -1,20 +1,9 @@
<?PHP //$Id$
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
// 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
@@ -28,6 +17,8 @@ function course_summary_upgrade($oldversion=0) {
$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;
}
+6 -15
View File
@@ -1,20 +1,9 @@
<?PHP //$Id$
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
// 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 PostgreSQL
@@ -28,6 +17,8 @@ function course_summary_upgrade($oldversion=0) {
$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;
}
+38
View File
@@ -0,0 +1,38 @@
<?php //$Id$
// This file keeps track of upgrades to
// the course_summary block
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// The commands in here will all be database-neutral,
// using the functions defined in lib/ddllib.php
function xmldb_block_course_summary_upgrade($oldversion=0) {
global $CFG, $THEME, $db;
$result = true;
/// And upgrade begins here. For each one, you'll need one
/// block of code similar to the next one. Please, delete
/// this comment lines once this file start handling proper
/// upgrade code.
/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
/// $result = result of "/lib/ddllib.php" function calls
/// }
return $result;
}
?>
+24 -18
View File
@@ -15,8 +15,13 @@ function migrate2utf8_block_instance_configdata($recordid){
$fromenc = $globallang;
} else {
$sitelang = $CFG->lang;
$courselang = get_course_lang($blockinstance->pageid); //Non existing!
$userlang = get_main_teacher_lang($blockinstance->pageid); //N.E.!!
if ($blockinstance->pagetype == 'course-view') {
$courselang = get_course_lang($blockinstance->pageid); //Non existing!
$userlang = get_main_teacher_lang($blockinstance->pageid); //N.E.!!
} else {
$courselang = false;
$userlang = false;
}
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
}
@@ -42,8 +47,13 @@ function migrate2utf8_block_instance_configdata($recordid){
$fromenc = $globallang;
} else {
$sitelang = $CFG->lang;
$courselang = get_course_lang($blockinstance->pageid); //Non existing!
$userlang = get_main_teacher_lang($blockinstance->pageid); //N.E.!!
if ($blockinstance->pagetype == 'course-view') {
$courselang = get_course_lang($blockinstance->pageid); //Non existing!
$userlang = get_main_teacher_lang($blockinstance->pageid); //N.E.!!
} else {
$courselang = false;
$userlang = false;
}
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
}
@@ -68,8 +78,13 @@ function migrate2utf8_block_instance_configdata($recordid){
$fromenc = $globallang;
} else {
$sitelang = $CFG->lang;
$courselang = get_course_lang($blockinstance->pageid); //Non existing!
$userlang = get_main_teacher_lang($blockinstance->pageid); //N.E.!!
if ($blockinstance->pagetype == 'course-view') {
$courselang = get_course_lang($blockinstance->pageid); //Non existing!
$userlang = get_main_teacher_lang($blockinstance->pageid); //N.E.!!
} else {
$courselang = false;
$userlang = false;
}
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
}
@@ -110,10 +125,7 @@ global $CFG, $globallang;
$fromenc = $globallang;
} else {
$sitelang = $CFG->lang;
$courselang = get_course_lang($blockpinned->pageid); //Non existing!
$userlang = get_main_teacher_lang($blockpinned->pageid); //N.E.!!
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
$fromenc = get_original_encoding($sitelang, false, false);
}
$blah = unserialize(base64_decode($blockpinned->configdata));
@@ -137,10 +149,7 @@ global $CFG, $globallang;
$fromenc = $globallang;
} else {
$sitelang = $CFG->lang;
$courselang = get_course_lang($blockpinned->pageid); //Non existing!
$userlang = get_main_teacher_lang($blockpinned->pageid); //N.E.!!
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
$fromenc = get_original_encoding($sitelang, false, false);
}
$blah = unserialize(base64_decode($blockpinned->configdata));
@@ -163,10 +172,7 @@ global $CFG, $globallang;
$fromenc = $globallang;
} else {
$sitelang = $CFG->lang;
$courselang = get_course_lang($blockpinned->pageid); //Non existing!
$userlang = get_main_teacher_lang($blockpinned->pageid); //N.E.!!
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
$fromenc = get_original_encoding($sitelang, false, false);
}
$blah = unserialize(base64_decode($blockpinned->configdata));
+6 -15
View File
@@ -1,20 +1,9 @@
<?PHP //$Id$
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
// 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
@@ -161,6 +150,8 @@ global $CFG;
modify_database('','ALTER TABLE prefix_block_pinned ADD INDEX pagetype (pagetype);');
}
////// DO NOT ADD NEW THINGS HERE!! USE upgrade.php and the lib/ddllib.php functions.
//Finally, return result
return $result;
}
+6 -15
View File
@@ -1,20 +1,9 @@
<?PHP //$Id$
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
// 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 PostgreSQL
@@ -163,6 +152,8 @@ global $CFG;
modify_database('','CREATE INDEX prefix_block_pinned_pagetype_idx ON prefix_block_pinned (pagetype);');
}
////// DO NOT ADD NEW THINGS HERE!! USE upgrade.php and the lib/ddllib.php functions.
//Finally, return result
return $result;
}
+38
View File
@@ -0,0 +1,38 @@
<?php //$Id$
// This file keeps track of upgrades to
// the blocks system
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// The commands in here will all be database-neutral,
// using the functions defined in lib/ddllib.php
function xmldb_blocks_upgrade($oldversion=0) {
global $CFG, $THEME, $db;
$result = true;
/// And upgrade begins here. For each one, you'll need one
/// block of code similar to the next one. Please, delete
/// this comment lines once this file start handling proper
/// upgrade code.
/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
/// $result = result of "/lib/ddllib.php" function calls
/// }
return $result;
}
?>
@@ -41,11 +41,14 @@ class block_glossary_random extends block_base {
$this->instance_config_commit();
}
$limitfrom = 0;
$limitnum = 1;
switch ($this->config->type) {
case BGR_RANDOMLY:
$i = rand(1,$numberofentries);
$LIMIT = sql_paging_limit($i-1, 1);
$limitfrom = $i-1;
$SORT = 'ASC';
break;
@@ -58,13 +61,13 @@ class block_glossary_random extends block_base {
if ($i > $numberofentries) { // Loop back to beginning
$i = 1;
}
$LIMIT = sql_paging_limit($i-1, 1);
$limitfrom = $i-1;
$SORT = 'ASC';
break;
default: // BGR_LASTMODIFIED
$i = $numberofentries;
$LIMIT = 'LIMIT 1'; // The last one
$limitfrom = 0;
$SORT = 'DESC';
break;
}
@@ -73,7 +76,7 @@ class block_glossary_random extends block_base {
' FROM '.$CFG->prefix.'glossary_entries'.
' WHERE glossaryid = '.$this->config->glossary.
' AND approved = 1 '.
'ORDER BY timemodified '.$SORT.' '.$LIMIT)) {
'ORDER BY timemodified '.$SORT, $limitfrom, $limitnum)) {
$entry = reset($entry);
@@ -82,7 +85,10 @@ class block_glossary_random extends block_base {
} else {
$text = "<h2>".format_string($entry->concept,true)."</h2>";
}
$text .= format_text($entry->definition, $entry->format);
$options = new object;
$options->trusttext = true;
$text .= format_text($entry->definition, $entry->format, $options);
$this->config->nexttime = usergetmidnight(time()) + DAYSECS * $this->config->refresh;
$this->config->previous = $i;
@@ -169,7 +175,6 @@ class block_glossary_random extends block_base {
// place link to glossary in the footer if the glossary is visible
$glossaryid = $this->config->glossary;
$glossary=get_record('glossary', 'id', $glossaryid);
$studentcanpost = $glossary->studentcanpost; //needed to decide on which footer
//Create a temp valid module structure (course,id)
$tempmod->course = $this->course->id;
@@ -178,7 +183,7 @@ class block_glossary_random extends block_base {
//Obtain the visible property from the instance
if (instance_is_visible('glossary', $tempmod)) {
$cm = get_coursemodule_from_instance('glossary',$glossaryid, $this->course->id) ;
if ($studentcanpost) {
if (has_capability('mod/glossary:write', get_context_instance(CONTEXT_MODULE, $cm->id))) {
$this->content->footer = '<a href="'.$CFG->wwwroot.'/mod/glossary/edit.php?id='.$cm->id
.'" title="'.$this->config->addentry.'">'.$this->config->addentry.'</a><br />';
} else {
+8 -3
View File
@@ -12,7 +12,7 @@ class block_html extends block_base {
}
function specialization() {
$this->title = isset($this->config->title) ? $this->config->title : get_string('newhtmlblock', 'block_html');
$this->title = isset($this->config->title) ? format_string($this->config->title) : get_string('newhtmlblock', 'block_html');
}
function instance_allow_multiple() {
@@ -24,8 +24,13 @@ class block_html extends block_base {
return $this->content;
}
$filteropt = new stdClass;
$filteropt->noclean = true;
if (!empty($this->instance->pinned) or $this->instance->pagetype === 'course-view') {
// fancy html allowed only on course page and in pinned blocks for security reasons
$filteropt = new stdClass;
$filteropt->noclean = true;
} else {
$filteropt = null;
}
$this->content = new stdClass;
$this->content->text = isset($this->config->text) ? format_text($this->config->text, FORMAT_HTML, $filteropt) : '';
+9 -2
View File
@@ -1,4 +1,11 @@
<?php $usehtmleditor = can_use_html_editor(); ?>
<?php
$usehtmleditor = can_use_html_editor();
$text = isset($this->config->text) ? $this->config->text : '';
if (empty($this->instance->pinned) and $this->instance->pagetype !== 'course-view') {
$text = clean_text($text, FORMAT_HTML);
}
?>
<table cellpadding="9" cellspacing="0">
<tr valign="top">
<td align="right"><?php print_string('configtitle', 'block_html'); ?>:</td>
@@ -6,7 +13,7 @@
</tr>
<tr valign="top">
<td align="right"><?php print_string('configcontent', 'block_html'); ?>:</td>
<td><?php print_textarea($usehtmleditor, 25, 50, 0, 0, 'text', isset($this->config->text)?$this->config->text:'') ?></td>
<td><?php print_textarea($usehtmleditor, 25, 50, 0, 0, 'text', $text) ?></td>
</tr>
<tr>
<td colspan="3" align="center">
+1 -1
View File
@@ -52,7 +52,7 @@ class block_login extends block_base {
$this->content->text .= '<table align="center" cellpadding="2" cellspacing="0" class="logintable">';
$this->content->text .= '<tr><td class="c0 r0" align="right">'.get_string('username').':</td>';
$this->content->text .= '<td class="c1 r0"><input type="text" name="username" size="10" value="'.$username.'" /></td></tr>';
$this->content->text .= '<td class="c1 r0"><input type="text" name="username" size="10" value="'.s($username).'" /></td></tr>';
$this->content->text .= '<tr><td class="c0 r1" align="right">'.get_string('password').':</td>';
$this->content->text .= '<td class="c1 r1"><input type="password" name="password" size="10" value="" /></td></tr>';
+3 -19
View File
@@ -245,11 +245,6 @@ class block_base {
// The full treatment, please. Include the title text.
print_side_block($this->_title_html(), $this->content->text, NULL, NULL, $this->content->footer, $this->html_attributes(), $this->title);
}
//make a record of the block for the ajax course format to use
if (!empty($COURSE->javascriptportal)) {
$COURSE->javascriptportal->block_add('inst'.$this->instance->id,!$this->instance->visible);
}
}
}
@@ -308,13 +303,7 @@ class block_base {
switch ($this->instance->pagetype) {
case 'course-view':
if ($this->instance->pageid == SITEID) {
$context = get_context_instance(CONTEXT_SYSTEM, $this->instance->pageid);
} else {
$context = get_context_instance(CONTEXT_COURSE, $this->instance->pageid);
}
if (!has_capability('moodle/site:manageblocks', $context)) {
if (!has_capability('moodle/site:manageblocks', $blockcontext)) {
return null;
}
break;
@@ -358,7 +347,7 @@ class block_base {
// place holder for roles button
$movebuttons .= '<a class="icon roles" title="'. $this->str->assignroles .'" href="'.$CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.$blockcontext->id.'">' .
'<img src="'.$CFG->pixpath.'/i/roles.gif" alt="'.$this->str->assignroles.'" /></a>';
'<img src="'.$CFG->pixpath.'/i/roles.gif" alt="'.$this->str->assignroles.'" height="11" width="11" border="0"/></a>';
$movebuttons .= '<a class="icon hide" title="'. $title .'" href="'.$script.'&amp;blockaction=toggle">' .
'<img src="'. $CFG->pixpath.$icon .'" alt="'.$title.'" /></a>';
@@ -706,14 +695,9 @@ class block_list extends block_base {
print_side_block($this->_title_html(), '', $this->content->items, $this->content->icons,
$this->content->footer, $this->html_attributes(), $this->title);
}
//make a record of the block for the ajax course format to use
if (!empty($COURSE->javascriptportal)) {
$COURSE->javascriptportal->block_add('inst'.$this->instance->id,!$this->instance->visible);
}
}
}
}
?>
?>
+6 -15
View File
@@ -1,20 +1,9 @@
<?PHP //$Id$
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
// 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
@@ -28,6 +17,8 @@ function news_items_upgrade($oldversion=0) {
$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;
}
+6 -15
View File
@@ -1,20 +1,9 @@
<?PHP //$Id$
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
// 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 PostgreSQL
@@ -28,6 +17,8 @@ function news_items_upgrade($oldversion=0) {
$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;
}
+38
View File
@@ -0,0 +1,38 @@
<?php //$Id$
// This file keeps track of upgrades to
// the news_items block
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// The commands in here will all be database-neutral,
// using the functions defined in lib/ddllib.php
function xmldb_block_news_items_upgrade($oldversion=0) {
global $CFG, $THEME, $db;
$result = true;
/// And upgrade begins here. For each one, you'll need one
/// block of code similar to the next one. Please, delete
/// this comment lines once this file start handling proper
/// upgrade code.
/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
/// $result = result of "/lib/ddllib.php" function calls
/// }
return $result;
}
?>

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