Compare commits

...

6414 Commits

Author SHA1 Message Date
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
nfreear 1bece9174c Fixes bug, "Warning: Invalid argument supplied for foreach() in /var/www/html/ndf42/head/lib/blocklib.php on line 174" 2006-10-10 11:03:35 +00:00
nfreear 6fbe028442 Fixes bug MDL-6896, "Global search block - relative form URL broken" 2006-10-10 10:58:29 +00:00
toyomoyo 55656968b3 do not write inherit into db! 2006-10-10 09:22:38 +00:00
moodler 39ec6a6f4b Bumped to launch into 1.8 dev 2006-10-10 08:31:44 +00:00
moodler 2179989947 Merged bogon fix from stable 2006-10-10 07:43:19 +00:00
jamiesensei d9dce4e7b1 changed $default to $toform - more meaningful 2006-10-10 07:16:05 +00:00
jamiesensei 461f512795 moved setting of defaults from edit2.php to edit_form.php 2006-10-10 07:05:19 +00:00
moodler 4139c81ab8 Updating to 1.7 Beta 2006-10-10 06:21:59 +00:00
moodler 328af436b4 Latest tags 2006-10-10 06:17:44 +00:00
vyshane 3d044d6012 Removed teacher forum string 2006-10-10 05:24:16 +00:00
vyshane ee5cdf3466 Removed teacher forums from course reset. 2006-10-10 05:23:44 +00:00
vyshane 25b75c6053 Merged fix for MDL-6537 2006-10-10 05:20:43 +00:00
vyshane 5b32e3bc3c Merged from 1.6 stable. 2006-10-10 05:17:12 +00:00
toyomoyo beba128f6d fix for MDL-6831 2006-10-10 03:17:49 +00:00
toyomoyo 4473252d7c changing default capabilities for coursecreators so that they could create courses 2006-10-10 03:03:17 +00:00
toyomoyo 7246585a70 setting default value for backup/restore capabilities for teacheredit and coursecreators 2006-10-10 02:52:08 +00:00
vyshane 3ecc49d495 Turn off display of week dates if we are in editing mode and if ajax is turned on. We do this for now because the ajax code does not yet update the week dates when sections are moved around. Will have to fix later. 2006-10-10 02:38:33 +00:00
cap2501 c4308cfa1b Bug:MDL-6674
made changes to blocks_exeute_repositioning_atomic to fix some logic errors with shifting around the weight list
2006-10-10 02:06:51 +00:00
stronk7 a08a698895 Updated moodle notes to reflect latest change to odbc_mssql driver. 2006-10-09 23:39:32 +00:00
stronk7 d5d50c2d54 Fixed ServerInfo() behaviour for odbc_mssql. We need this working properly NOW!
(will be back once ADOdb code supports it properly)
2006-10-09 23:36:27 +00:00
stronk7 97ab73aad4 Add odbc_msql dbtype to a bunch of places. 2006-10-09 22:55:55 +00:00
stronk7 354bb6035a And now, Moodle is able to work with the odbc_mssql driver. Simple! B-) 2006-10-09 22:29:52 +00:00
stronk7 1c460b0bc9 Show error if the dbtype specified isn't supported by XMLDB 2006-10-09 22:28:22 +00:00
stronk7 cd2acc4aa1 Added MetaIndexes() support to the odbc_mssql driver. We need it NOW!
I've posted one comment about this in ADOdb forums:

http://phplens.com/lens/lensforum/msgs.php?id=15930
2006-10-09 22:26:21 +00:00
stronk7 a3f3ff1b69 Added MetaIndexes() support to the odbc_mssql driver. We need it NOW!
I've posted one comment about this in ADOdb forums:

http://phplens.com/lens/lensforum/msgs.php?id=15930
2006-10-09 22:21:01 +00:00
stronk7 2d31c39397 Not necessary to set unicodedb for each admin/index.php invocation
because setup.php saves it if needed.
2006-10-09 16:33:31 +00:00
stronk7 9b3bacf077 Raising MSSQL min req. to 2005 (9.0)
Merged from MOODLE_16_STABLE
2006-10-09 16:19:29 +00:00
sam_marshall 745c19685c Wiki: some changes to improve error messages and (slightly) behaviour when in group mode 2006-10-09 14:29:14 +00:00
jamiesensei 29f1cae1b0 removed htmleditors array - not needed 2006-10-09 11:34:43 +00:00
jamiesensei 0d26ea7af9 fix for bug that value of restrictmodules field wasn't available which breaks disabling of allowedmods multiple select 2006-10-09 11:23:23 +00:00
skodak a44091bffe Fixing Theme Config Variables MDL-6784 2006-10-09 10:12:41 +00:00
skodak 4dd5d7513d fixed wrong capability name and function name typo 2006-10-09 10:07:15 +00:00
vyshane 3203f10402 Fix for MDL-6889. See bug report for description. 2006-10-09 08:35:39 +00:00
jamiesensei 230a910a0b added 2 new methods to form class data_submitted and setDefault
Fixed bug in id generation
2006-10-09 08:32:30 +00:00
bobopinna 89656c6129 Fixed some bugs in the datamodel definition 2006-10-09 07:36:51 +00:00
skodak c544838d29 index.html of assignment help needs update. MDL-6888 2006-10-08 21:44:59 +00:00
cap2501 2fb6deb574 added main.getString function to better emulate php-moodle. In the future this could be extended to dynamically pull strings from moodle.php. 2006-10-08 21:24:38 +00:00
cap2501 6d9fbe85b6 delete confirmation now useing main.getString function. 2006-10-08 21:23:51 +00:00
cap2501 196fe04635 resolved: MDL-6579
added string for 'resource'
2006-10-08 21:10:14 +00:00
cap2501 f2e3c53ad6 resolved: MDL-6579
created language independant prompt for resource/activity deletion
2006-10-08 21:09:47 +00:00
cap2501 3287cb4cba resolved: MDL-6579
Added strings needed for delete confirmation.
2006-10-08 21:09:18 +00:00
skodak 8b902ba4a0 change_password.php produces JS error fixed typo MDL-6750 2006-10-08 20:29:13 +00:00
cap2501 39d764f932 removed code for the old way of updating the block weight. 2006-10-08 20:26:25 +00:00
cap2501 9e28e05f62 movement of the blocks is now handled completely seperately on the serverside and on the clientside. This was unavoidable. 2006-10-08 20:25:10 +00:00
cap2501 bb781a70c5 made changes to the way the block movment was handled to eliminate some errors that came up. 2006-10-08 20:24:15 +00:00
cap2501 77e65ff786 removed some debugging output accidently left in. 2006-10-08 20:23:30 +00:00
cap2501 e028ed34da created blocks_execute_repositioning_atomic as an extension of blocks_execute_repositioning, the original did adjust the column that the block was coming from but it did not insert it properly into the target column (adjusting the weights of the other blocks). This is currently only really nessicary for the ajax formats. 2006-10-08 20:21:15 +00:00
skodak 78d4711ebb fixed data/index.php when no databases available, initialized array in get_all_instances_in_course() from datalib.php; merged from MOODLE_16_STABLE 2006-10-08 19:45:29 +00:00
skodak d8247de55e problem with incorrect redirect url - wwwroot without the trailning slash in not standard compliant MDL-6193 2006-10-08 18:55:18 +00:00
skodak cefd17e991 docs for advanced uploading of files assignment type 2006-10-08 18:16:18 +00:00
skodak 2597d73128 a small typo 'helpupload' on /lang/en_utf8/assignment.php MDL-6883, found by Mitsuhiro Yoshida 2006-10-08 17:35:27 +00:00
skodak 17e5635c36 fixed 'capabilitities' typos and removed forgotten debug_print_backtrace() commited with MDL-6728 2006-10-08 11:00:49 +00:00
skodak ab61d01b06 Typo in lib/accesslib.php MDL-6728, found by Nicolas Martignoni. 2006-10-08 10:52:54 +00:00
skodak a8f5a8a2e4 Insert a Chinese charachter string to label resource result error MDL-6757 2006-10-08 10:07:03 +00:00
stronk7 5fbab6173a Now Oracle uses the new find_sequence_name() function to find the
correct sequence name for each table on insert.

Also, introduced initial hooks to support Oracle LOBs in insert_record()
2006-10-08 09:58:11 +00:00
skodak badc7070cd removed obsoleted backup configuration scripts 2006-10-08 09:51:22 +00:00
stronk7 c5ac44c69e Added find_sequence_name() to be used by insert_record() to get the correct sequence 2006-10-08 09:38:09 +00:00
stronk7 abbd460ff9 Adding getSequenceFromDB() for Oracle in order to detect the correct
sequence name in the insert_record() function.
2006-10-08 09:36:33 +00:00
skodak 1c55ce748d add note to admin settings to check max_allowed_packet when enabling db sessions in MySQL - MDL-6866 , fixed quotes :-( 2006-10-08 09:20:46 +00:00
skodak 25bbaee716 add note to admin settings to check max_allowed_packet when enabling db sessions in MySQL - MDL-6866 2006-10-08 09:16:38 +00:00
skodak 91b678f306 Grades computed incorrectly if assignment name appears more than twice in a course MDL-6876 , patch submitted by Gary Anderson 2006-10-08 09:04:59 +00:00
skodak b3cbe3a333 fixed wrong strip_slashes() when printing blog entry 2006-10-08 08:52:15 +00:00
skodak b15d469ec2 Error when adding Recent activity as a sticky block MDL-6801 2006-10-08 08:44:32 +00:00
skodak 14df27ad3c fixed wrong redirect when editing blocks in stickyblocks page 2006-10-08 08:36:45 +00:00
skodak cf0c601fb9 fixed encoding header() in messaging frames MDL-6128 - 1.6, special chars and messaging system. 2006-10-08 08:29:35 +00:00
skodak 0ca30166f3 Resource frameset error in IE6 MDL-6842, patch submitted by Chris Fryer. 2006-10-08 08:20:38 +00:00
skodak 4db69ffb82 Scalable Vector Graphics (SVG) files in Moodle are not correctly displayed in many Browsers MDL-6878, patch submitted by Geoffrey Rowland, thanks! 2006-10-08 08:13:41 +00:00
skodak c664a03609 added 'Reviewed' assignment status to My moodle page MDL-6834, patch submitted by Stephen Bourget - thanks! 2006-10-08 08:06:04 +00:00
moodler 67a6156c5a Automatic installer.php lang files by installer_builder (20061008) 2006-10-08 02:52:12 +00:00
skodak 57f1b91497 fixed some incorrect strtolower() calls that were breaking non ascii languages MDL-6135 2006-10-07 20:47:54 +00:00
gustav_delius 6a8b20b790 Don't strip slashes from data send to htmlarea, after all it is not being stripped from data going to the normal textarea either. 2006-10-07 17:20:35 +00:00
gustav_delius 1ca20e0272 Don't use stripslashes on data coming from database 2006-10-07 17:18:15 +00:00
gbateson c0e19266db simplified the javascript to hide "name", "studentfeedbackurl" and dates when not required 2006-10-07 14:57:37 +00:00
stronk7 dd00dbd799 Allow load average to be displayed in servers using the comma as
decimal separator.
2006-10-07 10:33:58 +00:00
gbateson fb414b62e5 added PARAM types for all calls to "optional_param()" and "required_param()" 2006-10-07 08:59:59 +00:00
gbateson cc4782064d adjust "best grade" to range 0 to hotpot->maxgrade 2006-10-07 05:03:52 +00:00
gbateson 1cc9e57b94 removed "thiscourse" and "allmycourses" as they are no longer used in hotpot/report.php 2006-10-07 02:00:53 +00:00
gbateson dee022991a remvoved course selection for admins, and tidied up handling of capabilities 2006-10-07 01:57:57 +00:00
gbateson 967cede92e remove "Selecting a course" section 2006-10-07 01:53:49 +00:00
stronk7 b7e58d8f8c Wood-ising the adminsettings fieldset 2006-10-06 22:25:49 +00:00
tjhunt 13835c77b6 MDL-6731 Can't save manual comment on a quiz question. I had missed one instance of the comment -> manualcomment column rename. 2006-10-06 17:22:08 +00:00
tjhunt 8ff134db82 Typo. 2006-10-06 17:20:37 +00:00
tjhunt b20ea66988 Hopefully improve performance on site with lots of question categories Merged from MOODLE_16_STABLE. 2006-10-06 16:48:54 +00:00
stronk7 29bbfb339a One malformed XML was preventing wiki_logs to be properly UTF8-ised. MDL-6854 2006-10-06 15:26:13 +00:00
stronk7 b695b9106b Typo recently introduced. MDL-6336
(merged from MOODLE_16_STABLE)
2006-10-06 15:03:46 +00:00
skodak e96f2a77db Code cleanup in blog.
MDL-6805  Fixed redirects in blog; MDL-6807  partially fixed use of capabilitites - it needs more testing and possibly minor fixing, the commit contains other blog bugfixes too. In general it should work exactly the same. The introduction of roles makes proper setup more difficult :-(

Expect some more fixes soon, no other bigger changes...
2006-10-06 10:11:52 +00:00
gbateson bd9c7e8473 fix undefined variable $context on line 135 2006-10-06 09:36:40 +00:00
toyomoyo 837bde0cc0 fix for MDL-6336 2006-10-06 08:26:37 +00:00
gbateson a81468432a allow display and deletion of attempts by "All users" including unenrolled students 2006-10-06 08:02:07 +00:00
vyshane 64e5a68d91 Some fixes for MDL-6674. This should fix moving activities (resources).
Thanks to Dan Poltawski for suggestions.
2006-10-06 07:56:37 +00:00
gbateson 8e6461f749 fix typo on line 89: get_context_instance(CONTEXT_COURSE, $course) ... should be ... get_context_instance(CONTEXT_COURSE, $course->id) 2006-10-06 07:09:27 +00:00
moodler 83ea392ee1 Drop the user_xxx tables after Roles install 2006-10-06 06:47:12 +00:00
moodler 47545d4161 Removed some references to user_teachers that will probably cause a bug 2006-10-06 06:42:33 +00:00
moodler f0c9f676db Remove user_students references 2006-10-06 06:39:29 +00:00
moodler cf85513250 Added missing cap strings 2006-10-06 06:37:58 +00:00
moodler 99938ae7b6 Added some defaults to make sure Exercise is off by default 2006-10-06 06:34:08 +00:00
moodler 95056a03f9 Fix some doc links 2006-10-06 06:26:06 +00:00
gbateson 259bcf0c8b added "format_string" and "stripslashes" when print HotPot name to browser 2006-10-06 06:22:15 +00:00
moodler e27a943788 Disable the exercise module as it's not maintained or upgraded for roles 2006-10-06 06:15:57 +00:00
toyomoyo 1b19e8107e fix for MDL-6859, MDL-6860 2006-10-06 06:04:32 +00:00
moodler 010b211f51 Fixes for naming of forms to make them XHTML compatible 2006-10-06 06:02:17 +00:00
moodler e32fb9a4f7 Fixed a misplaced form tag MDL-6861 2006-10-06 05:57:07 +00:00
gbateson 2398e835a8 renamed all $hp to $hotpot; added/update/delete calendar events when adding/updating/deleting hotpots; add functions required for participation report; 2006-10-06 05:56:53 +00:00
moodler 76b41407ea Made alt tags translatable MDL-6861 2006-10-06 05:53:28 +00:00
moodler 46f8bacfc8 Fixed some unencoded & in urls 2006-10-06 05:44:05 +00:00
moodler 670fc5123a MOre fixes to remove erros due to JS 2006-10-06 05:28:57 +00:00
moodler 4418a1125a FIxed some incorrect backslashes MDL-6861 2006-10-06 05:06:25 +00:00
gbateson bf4665c362 In "Selecting Users" section, added "All users" and modified "All participants" and "Existing students" 2006-10-06 04:03:39 +00:00
toyomoyo 0c40e390ad adding utf8 support for new fields 2006-10-06 04:03:02 +00:00
gbateson 7676e965b9 added $string['allusers'] = 'All users'; for "hotpot/report.php" 2006-10-06 03:46:46 +00:00
moodler 86a8eb5841 Automatic installer.php lang files by installer_builder (20061006) 2006-10-06 02:56:20 +00:00
gbateson 85b05f3784 removed all references to obsolete indexes on "hotpot_questions.name" and "hotpot_strings.string" 2006-10-06 02:03:43 +00:00
gbateson cd49109677 reset version number in HotPot v1 with over-advanced version number 2006-10-06 01:25:56 +00:00
gustav_delius 6ac0909983 Incomplete user record (the one where the username is still 'changeme') should not be included in user listing. See bug 4570. For some reason this script is not using get_users() but is instead constructing its own sql, so the change to get_users() had to be duplicated here. 2006-10-05 22:45:01 +00:00
gustav_delius 6bff0453f5 Incomplete user record (the one where the username is still 'changeme') should not be included in user listing. See bug 4570 2006-10-05 22:21:09 +00:00
stronk7 1db1336bd4 Avoid some notices. Part of MDL-6854 2006-10-05 19:51:47 +00:00
stronk7 10f36d68e8 Avoid some notices. Part of MDL-6854 2006-10-05 19:29:39 +00:00
tjhunt ec467c6929 MDL-6837 - move warning about pupup blockers into the lang file. Merged from MOODLE_16_STABLE. 2006-10-05 15:58:08 +00:00
andreabix 446b52f908 overlapping fix 2006-10-05 09:52:38 +00:00
toyomoyo 1e248b442c fixed a bug with user listing where user_lastaccess entries are not set, e.g. after a resotre 2006-10-05 08:54:35 +00:00
vyshane 35b974dae6 Some small formatting changes.
Added some missing semi-colons in js code.
2006-10-05 08:47:13 +00:00
moodler 881a77bfcf Fix to ignore hidden courses when using switchrole in a course MDL-6841 2006-10-05 08:41:06 +00:00
vyshane 191acd5964 Fix for MDL-6682. Removed duplicate string quiz:grade 2006-10-05 08:05:55 +00:00
vyshane d8947f95dc Merged fix for MDL-6819 2006-10-05 07:22:48 +00:00
moodler 04338f9ea1 Removed user_students, user_teachers, user_coursecreators and user_admins
as they are now irrelevant   MDL-6830
2006-10-05 07:05:06 +00:00
moodler 36832f4d41 Moved sticky blocks to Appearance section 2006-10-05 07:01:28 +00:00
bobopinna 04231a9547 Fixed comments_from_learner data element to fit ADL requirements 2006-10-05 06:48:30 +00:00
toyomoyo cfa7cdb958 droppinf utf8 support for user_* tables 2006-10-05 06:05:02 +00:00
toyomoyo 013b90ed92 a few fixes, for MDL-6836, MDL-6835, and MDL-6765 2006-10-05 04:05:07 +00:00
toyomoyo b1e68bff0e removing some debugging statements 2006-10-05 03:26:22 +00:00
vyshane 1a7cdb11b4 Merged fixes for MDL-2583 2006-10-05 03:18:29 +00:00
koenr edb14e52fc closing MDL-5510 2006-10-04 21:40:18 +00:00
skodak f47f4659de fixed nocache option in format_text() 2006-10-04 21:22:57 +00:00
mits 0a1361f61f Soften the color of currently selected admin menu. 2006-10-04 20:42:57 +00:00
urs_hunkler 37e7b362bb 'MDL-6790 Grab handle icon is missing from blocks. Added property to show the move curser for a simmilar signal as for the crosses' 2006-10-04 16:23:44 +00:00
urs_hunkler 57d13c2468 'merged from 1.6 - MDL-6824, redundant declaration: .categorybox .category' 2006-10-04 15:51:48 +00:00
urs_hunkler eef90b805f 'MDL-6824, redundant declaration: .categorybox .category' 2006-10-04 15:51:00 +00:00
moodler 7e6add3eab Was this checked in by accident? 2006-10-04 15:49:54 +00:00
urs_hunkler 9596181286 merged from 1.6 - MDL-6824 2006-10-04 15:49:41 +00:00
moodler acc26e71bd Reverted my changes to ddlib 2006-10-04 15:35:27 +00:00
moodler a9b1f143d2 Undoing my hacks to try and keep this code clean as possible. 2006-10-04 15:30:54 +00:00
thompson697 eb87ac71c5 Change creation of restorelog file location to protected backupdata folder.
Reassign style and language links
2006-10-04 14:50:50 +00:00
moodler 57bdc37ddb Committed a fix for streaming chat from Dan Polawski, MDL-6791
Seems to help!
2006-10-04 12:58:09 +00:00
tjhunt ed586fb863 Typo. 2006-10-04 11:45:48 +00:00
tjhunt 834e58a9d2 Fix indent. 2006-10-04 10:39:42 +00:00
tjhunt b22fc90182 MDL-6814 - Can't change "maximum grade" value on a quiz. Now you can. 2006-10-04 10:21:23 +00:00
sam_marshall b9f67bd23d [MDL-6701] Added closing </form> tags in wiki admin pages (the pages are still not xhtml, but...) 2006-10-04 10:20:21 +00:00
sam_marshall bdbed68baf Wiki: list of pages to strip in the 'are you sure' message was incorrectly URL-encoded on display to user, this fix removes url encoding and html-encodes it instead 2006-10-04 10:11:15 +00:00
sam_marshall 1e4c8535ef Wiki - fixed 'Strip versions' that didn't work in postgres because of GROUP BY a select alias not being allowed. (Even tested in mysql this time...) 2006-10-04 10:03:02 +00:00
moodler 4e423cbf5d Bye-bye to old database upgrade files and hellow to upgrade.php!
First order of business:  drop all the extraneous user_xxx tables.
2006-10-04 09:47:05 +00:00
moodler eb437bd351 Some changes to ddllib.php to make some functions a bit easier to call.
May not be final ... see MDL-6817 for details.
2006-10-04 09:44:38 +00:00
toyomoyo c0c98c7c78 fixing roles support for backup/restore 2006-10-04 09:01:50 +00:00
vyshane e0539647aa Added $restore->mods[$mod->type]->granular to restore_create_sections() and to restore_create_modules(). This defines whether we are doing a granular restore where we care about the individual module instances to be restored, or whether we are not doing a granular restore, in which case we just restore all course module instances. 2006-10-04 08:35:00 +00:00
moodler 3a4c750bcc FIxed up some more references to user tables 2006-10-04 07:36:58 +00:00
moodler 7b37cb9a01 Added new function
function user_has_role_assignment($userid, $roleid, $contextid=0)
2006-10-04 07:07:57 +00:00
bobopinna acba841b09 Fixed a bad error code choose
Rewritten the GetErrorString function to fix bad error code call
2006-10-04 06:22:18 +00:00
bobopinna e743389667 Added API property version required from ADL Test Suite 2006-10-04 06:18:49 +00:00
moodler 3ede4ecbcb Fixes to remove access to user_coursecreators and use roles instead MDL-6800 2006-10-04 05:36:17 +00:00
moodler 7dfa686dbd Added button to turn editing off again ... ugly but ... 2006-10-04 04:49:44 +00:00
moodler c9f8e57f4a FIxed category editing button 2006-10-04 04:45:58 +00:00
moodler 0baf9f0f23 Fixed roles link a bit 2006-10-04 04:40:55 +00:00
moodler 4610e45b11 FIxed for duplicate icons MDL-6811 2006-10-04 04:37:40 +00:00
moodler ceb7638355 Automatic installer.php lang files by installer_builder (20061004) 2006-10-04 02:56:19 +00:00
toyomoyo 9b5d7a463e fixing typo 2006-10-04 02:43:29 +00:00
toyomoyo 7f8691201c fixed a bug where block instances aren't deleted properly 2006-10-04 02:43:11 +00:00
moodler e020c546c7 Fix for access to users at site level MDL-6810 2006-10-04 02:14:25 +00:00
skodak 793a8c3af7 Assignment Module breaks MyMoodle Page MDL-6802, revisited - I hope it is correct now 2006-10-03 23:34:03 +00:00
skodak 93caac3a72 MDL-6805 Fix redirects in blog - edit button now properly redirects to self 2006-10-03 21:07:13 +00:00
skodak db837673df MDL-6805 Fix redirects in blog; MDL-6807 fix blog capability checks 2006-10-03 20:41:15 +00:00
skodak 290cf2f484 fixed broken table layout in blog MDL-6806 2006-10-03 20:18:58 +00:00
ethem dc754f4f56 Put back last commit. Some functions check $extra->id. 2006-10-03 19:39:21 +00:00
skodak ab2f17b05b Completely disable all blog scripts when blog system disabled from site preferences MDL-6803 2006-10-03 19:21:35 +00:00
skodak 9731624c87 Assignment Module breaks MyMoodle Page MDL-6802, please test it 2006-10-03 18:31:51 +00:00
ethem c008cd2fcf If an error occures, id returns 0.
The user, who will be sent email, may be confused for $record->id=0.
Merged from 16stable.
2006-10-03 18:21:14 +00:00
gustav_delius 1dab3c8384 The course upload size limit applies to students only, it should not be imposed for teacher uploads. 2006-10-03 18:19:38 +00:00
ethem 9c59948e63 * enrol_into_course() doesn't send welcome message unless $course->welcomemessage is set.
This is actually good thing, because we can send our welcome message.

* enrol_into_course() added in Moodle(2006091700), so authorize plugin requires this version.
2006-10-03 18:00:48 +00:00
tjhunt 158e545945 MDL-5601 - restoring a course with a multianswer question sometimes causes an error() for a non-fatal contition. Change it to a notify, and everything seems to work. I don't really understand why, but this change does not make matters worse, so I am committing it. Thanks to Joseph Rezeau. Merged from MOODLE_16_STABLE. 2006-10-03 17:57:16 +00:00
tjhunt 54f306788a MDL-6649 Only show the HTML editor for the first essay question on a page, since it is unreliable when there are lots. Merged from MOODLE_16_STABLE. 2006-10-03 17:32:22 +00:00
stronk7 2ddec1f4ac Changed PG rename_index() to use the old ALTER TABLE ... RENAME TO syntax
(pretty strange syntax, but seems to work)
2006-10-03 15:00:55 +00:00
tjhunt 2da448161a MDL-6297 shuffleanswers option not imported correctly for MC questions. 2006-10-03 14:01:38 +00:00
moodler 921a34d61b Added copyright notice (they paid moodle.com for this development)
http://moodle.org/mod/forum/discuss.php?d=55410
2006-10-03 12:51:24 +00:00
ethem b99cb7fd23 No need extra $order->status check. These functions expired() and settled() do it for us. Merged from 16stable. 2006-10-03 09:05:38 +00:00
toyomoyo 5e67946d6c adding support for 1.6->1.7 backups 2006-10-03 08:54:46 +00:00
moodler 31aab450e0 Removed focussing altogether MDL-6750 2006-10-03 07:31:49 +00:00
moodler 088f12e3ff Automatic installer.php lang files by installer_builder (20061003) 2006-10-03 02:55:32 +00:00
moodler 8ea7e7b0f7 Merged endless loop fix from stable 2006-10-03 01:46:16 +00:00
moodler 50e07a4995 Patched login for discussions 2006-10-03 01:19:35 +00:00
stronk7 cc0bf61676 Now blocks deletion looks both for tables without and with the
"block_" part in table names.
This is an interim situation until "block_" will be required. See:
http://docs.moodle.org/en/Development:Coding#Database_structures
http://tracker.moodle.org/browse/MDL-6786

Also, it's the FIRST use of XMLDB DDL functions inside Moodle! B-)
2006-10-02 23:06:36 +00:00
skodak 5fe9a11d96 more diagnostics in has_capability() - number instead of context object detected and debug message displayed 2006-10-02 22:10:36 +00:00
skodak 403ba37a35 fixed has_capability context parameter in blog 2006-10-02 22:06:18 +00:00
skodak 26d038607a moodle/blog:view usage fixed in blog 2006-10-02 21:15:48 +00:00
skodak 11c467d939 some blog problems fixed - non existing capabilitites, pg incompatibilities;
in anycase the blog is still broken :-(
working on some more fixes now...
2006-10-02 20:50:49 +00:00
skodak a44de9c12f fixed print_texarea() capability requirement 2006-10-02 19:47:11 +00:00
skodak 3055079518 fixed sql text quoting, other fixes in blog ahead 2006-10-02 19:21:26 +00:00
stronk7 f8ca405052 re-enabling the rename_field() test 2006-10-02 17:42:31 +00:00
stronk7 ae5a83e6fd rename_field() under mssql completed 2006-10-02 17:42:14 +00:00
moodler 8303eb8447 Fixes related to presets and MDL-6755.
The original code was shocking once I started reviewing it, and even
after heavy editing I'm still not happy with it, but at least it works
more like it was supposed to.

Needs more cleaning up to make it clearer and probably safer.

Also, presets can now contain langage packs and they'll be used.
The image gallery is an example.
2006-10-02 17:24:54 +00:00
moodler 44abaca047 Added another s() to the query strings. Thanks Petr! 2006-10-02 17:09:18 +00:00
stronk7 c562997ff8 rename_field() under oracle completed 2006-10-02 17:06:37 +00:00
tjhunt ec6adca0f4 MDL-6761 Edit qestion link gone from question preview popup. It was checking the wrong capability. 2006-10-02 17:04:12 +00:00
stronk7 86bb076fc4 rename_field() under postgresql completed. 2006-10-02 17:02:35 +00:00
stronk7 dc7c388280 MySQL doesn't have check constraints. We use enums instead. 2006-10-02 17:02:07 +00:00
mits 2afc256919 Changed the currently selected admin menu bgcolor. 2006-10-02 16:51:48 +00:00
stronk7 f14080b0ad Prevent "id" fields to be renamed in generators 2006-10-02 16:47:02 +00:00
stronk7 6fdea1a0bd In my previous commit, "I" was "It" :-D
Plus one typo fixed.
2006-10-02 16:46:12 +00:00
stronk7 af72e37237 Prevent "id" fields to be renamed. I can cause lots of problems. 2006-10-02 16:37:41 +00:00
mits d917ecd46b Highlight the currently selected admin menu.
Changed admin search result color.
2006-10-02 16:35:34 +00:00
stronk7 0e204a1012 Some adjustments to be able to get names without prefix 2006-10-02 16:28:51 +00:00
stronk7 6c02f04b5a rename_table() under postgresql completed 2006-10-02 16:27:18 +00:00
stronk7 3033991184 Set debug off on tests 2006-10-02 16:26:34 +00:00
stronk7 bb7e5c472c rename_table() under oracle completed 2006-10-02 16:19:48 +00:00
moodler 40cbc8bb70 String should be printed using s() MDL-6779 2006-10-02 16:08:16 +00:00
stronk7 2f21754261 With the emotion, I forgot to delete some debug lines... :-P 2006-10-02 15:57:59 +00:00
stronk7 8aaf86642c rename_table() under mssql completed! B-) 2006-10-02 15:56:34 +00:00
moodler f22e389a41 Added language files to default preset as an example 2006-10-02 15:27:24 +00:00
moodler 53d052d029 Be a bit more flexible with the extra paths (can be a string or an array) 2006-10-02 15:15:23 +00:00
moodler b53b73bdb8 Additional paramter for get_string() that allows the calling code to
specify extra locations for strings
2006-10-02 15:08:25 +00:00
moodler 85489a5b42 Various little cleanups 2006-10-02 14:57:00 +00:00
moodler 94de4ab7f5 Fixed some missing strings 2006-10-02 14:30:28 +00:00
moodler 8eed3b30cf Strip slashes from admin search string (it's ok, it never gets near a database) 2006-10-02 13:35:28 +00:00
moodler 86a1dca773 Fixed overzealous cleaning MDL-6779 2006-10-02 13:26:02 +00:00
moodler 173006a313 Change default (old change not checked in) 2006-10-02 13:10:58 +00:00
moodler e9c82dca8f Fixed capability soring on course and coursecat override MDL-6780 2006-10-02 08:57:00 +00:00
toyomoyo 8020a0162f roles and capability support for backups. role mapping is in, please help test, thanks 2006-10-02 08:49:07 +00:00
skodak 8d9425149f fixed directory creation issues in advanced upload assignment 2006-10-02 08:44:58 +00:00
moodler c84ea828c3 Aligning capability override columns 2006-10-02 08:43:40 +00:00
moodler 2fdc2b9e49 FIxed missing string 2006-10-02 08:40:39 +00:00
moodler bf1e4b9cdc Only show search box when there is content in the block 2006-10-02 08:36:25 +00:00
skodak 8704af63b7 Student cannot see handed-in upload single assignment MDL-6770 2006-10-02 08:36:07 +00:00
skodak 8c408f8e46 assignment intro hiding before available date is now optional in advanced upload type ( MDL-6131 ), the rest of types will not be changed 2006-10-02 08:21:35 +00:00
moodler 27160c814b Cleaned up style for background of admin settings 2006-10-02 07:06:47 +00:00
moodler b4bfcc9c50 Added a missing string 2006-10-02 07:03:41 +00:00
moodler 455065f9ed Bring Sticky Blocks into the admin fold 2006-10-02 06:58:46 +00:00
moodler 203abb60b4 FIxed use of reserved SQL words for MDL-6778 2006-10-02 06:52:21 +00:00
moodler 80ee828de3 Fixed typo in capability name 2006-10-02 06:39:55 +00:00
moodler c5d08a1526 Highlight the currently selected admin menu 8-) 2006-10-02 06:37:58 +00:00
moodler 6fadb97b89 Tidy up admin search box, and fixed 4-spaces everywhere 2006-10-02 06:20:14 +00:00
moodler 36e5266fc1 Added search box for searching admin settings 2006-10-02 06:16:50 +00:00
vinkmar 6140dd8403 added strings for admin search 2006-10-02 06:03:51 +00:00
vinkmar e32df7aab1 links added to section titles 2006-10-02 06:02:52 +00:00
vinkmar e898f2b731 changes made for admin search page 2006-10-02 05:53:39 +00:00
vinkmar 1857cd7ff5 Admin search function.
Takes a "query" parameter... will be written into admintree block
2006-10-02 05:52:39 +00:00
moodler 3172faf70e Automatic installer.php lang files by installer_builder (20061002) 2006-10-02 02:56:19 +00:00
stronk7 cba6b7049a Enabling rename_field() test 2006-10-01 23:06:35 +00:00
stronk7 a2851e5f55 Basic rename_field() function added.
TODO: Automatic sequence/trigger/check constraint recreation
      under PG, MSSQL & Oracle
2006-10-01 23:02:39 +00:00
stronk7 7c07a93223 Added rename_field() support.
TODO: Sync sequences, triggers and check constraints
2006-10-01 22:54:51 +00:00
stronk7 4de0723f31 Added rename_field() support for mssql 2006-10-01 22:52:30 +00:00
stronk7 b5d61bfd9d Added rename_field() support for MySQL 2006-10-01 22:44:39 +00:00
skodak 01194b77ec fixed error in assignments when no students enrolled in course 2006-10-01 21:45:54 +00:00
skodak 29889a2a45 partially fixed - assignment intro always avaible even setting available date MDL-6131 2006-10-01 21:35:16 +00:00
tjhunt cc08091300 Fix performance problem with lots of categories. http://moodle.org/mod/forum/discuss.php?d=54945#252145. Merged from MOODLE_16_STABLE. 2006-10-01 20:32:12 +00:00
skodak bee8703ea5 Advanced Upload assignment type - student can't read teacher's uploaded response file MDL-6771 2006-10-01 20:04:53 +00:00
skodak 87a13824e1 fixed MDL-6625 - can't switch courses 2006-10-01 19:55:47 +00:00
skodak 310471950e Cannot add glossary category MDL-6713 2006-10-01 19:35:27 +00:00
skodak 1d4d2cebe0 left-hand pane on image upload screen is missing MDL-6759 2006-10-01 16:38:26 +00:00
moodler 33b17c67c9 Added IP lookup plugin choice to GUI 2006-10-01 16:25:35 +00:00
skodak a3627bb77d incorrect context used in rss_client block upgrade code MDL-6707 - part of the upgrade code is now rerun in existing installations - new upgrades should be ok, the cleanup of stale contexts and overrides will be done later as part on normal maintenance from cron 2006-10-01 16:17:30 +00:00
stronk7 3832682229 Fixed two bugs in the tests... 2006-10-01 16:08:25 +00:00
stronk7 51517ddc6d Avoid some double updates under PG 2006-10-01 16:02:09 +00:00
stronk7 1f0c7fae15 Now PG adds fields in various steps is order to fulfill 7.4 min req 2006-10-01 15:48:29 +00:00
stronk7 2cfea485a6 Added getDefaultValue() for better handling of default values 2006-10-01 15:47:48 +00:00
skodak ef04568ad3 removing obsoleted calendar.* files from admin area 2006-10-01 14:46:56 +00:00
stronk7 f6ebc34100 Fixed one wrong "return false" plus minor code reorder... 2006-10-01 14:39:50 +00:00
moodler 978c243f69 Disabled log 2006-10-01 13:06:40 +00:00
skodak ea580cdfa6 Recent wiki table changes have problems on PostgreSQL 7.4 MDL-6724 2006-10-01 12:04:34 +00:00
moodler c536c6b04c Some quick styles added to match manage.html MDL-6725 2006-10-01 10:15:50 +00:00
moodler 4fef9b76d1 Fixed links to Risks documentation 2006-10-01 09:59:03 +00:00
skodak c58facdd96 New installation with different prefix in one database fails MDL-6614 2006-10-01 09:47:20 +00:00
moodler 8be977c547 Fixed styles for user listings 2006-10-01 09:33:41 +00:00
moodler 2fdcf5e360 FIx the header too by requiring login to the course 2006-10-01 09:31:49 +00:00
moodler 1a5a5b0e04 Fixed a typo causing MDL-6758 2006-10-01 09:26:50 +00:00
moodler 937b63ee52 Adding some serious checks to make Moodle break when there is any
select, insert or update on user_students, user_teachers, user_coursecreators,
or user_admins (once roles is installed), because they should not be used
at all and we will drop them soon.
2006-10-01 09:16:49 +00:00
moodler cbf643f5f0 Make the sorting of the names always by lastname, to match assign roles 2006-10-01 08:48:58 +00:00
stronk7 abf980a587 Now table renaming is working properly on PostgreSQL
(only renaming of check constraints are pending)
2006-10-01 08:44:55 +00:00
moodler 5b1d599514 Tidied up groups interface to make it a bit more intuitive 2006-10-01 08:37:15 +00:00
moodler b16de84980 get_role_users() can now get all the people who have any role in that context,
which is useful
2006-10-01 08:34:36 +00:00
moodler a971a5985a FIxes for the assign screen, to make it a lot faster and able to cope
better with very large numbers of users   MDL-6766
2006-10-01 08:08:26 +00:00
moodler 7ea02fe987 FIxed some typos in get_role_users and count_role_users to do with parent contexts 2006-10-01 07:02:53 +00:00
gbateson 42cd7a105b do not join "hotpot_attempts" and "hotpot_details" tables when displaying "hotpot/index.php". This should speed display when courses have many HotPot activities, especially for students 2006-10-01 06:39:51 +00:00
moodler 0351730630 FIxed a debugging message 2006-10-01 06:39:20 +00:00
gbateson 172ab53650 add/delete calendar events when adding/updating/deleting hotpots 2006-10-01 06:36:50 +00:00
gbateson 6e69ab8afb added "hotpotopens" and "hotpotcloses" for calendar events 2006-10-01 06:35:54 +00:00
moodler 04186cd965 Improvements to the user listing, security and appearance 2006-10-01 06:18:18 +00:00
moodler ecaf56e5c9 Trivial spelling fix up 2006-10-01 05:49:41 +00:00
moodler 6c95827fdf New implementation of loginas see MDL-6626 2006-10-01 05:46:55 +00:00
moodler 9343a7333a Fixed a bug where load_user_capability() was not checking in the
specified context when it was provided (only in the parents)
2006-10-01 05:27:36 +00:00
moodler bad59bc0ee Some tidying and also a check to make sure that the user was a
participant in this particular course
2006-10-01 05:26:38 +00:00
moodler afe6d00384 FIxed a typo mod->id --> mod->cm 2006-10-01 04:56:43 +00:00
stronk7 20c559dd8d Now Oracle supports table renaming (both sequence and triggers
are kept on sync with the new table name)
2006-09-30 23:48:34 +00:00
stronk7 f086dd7da1 Drop one more table if present 2006-09-30 23:09:41 +00:00
stronk7 4702d62e32 Change slighty the style of RenameKey and RenameIndex functions. 2006-09-30 22:59:10 +00:00
stronk7 a59f3a34f3 Initial commit of rename_table(). Not ended! 2006-09-30 22:40:15 +00:00
skodak 8ad2207965 fixed Fatal error: Call to undefined function: print_recent_activity() when adding Recent Activity as a sticky block MDL-6437 and blocks block database MDL-5931 2006-09-30 21:02:09 +00:00
skodak 7208c579fd fixed missing required_login($courseid) that needs to be done to set up proper global $COURSE; MDL-6697 course/mod.php does not show the right navigation 2006-09-30 20:46:31 +00:00
skodak ba8d802720 MDL-6673 duplicate capabilities in list 2006-09-30 20:11:44 +00:00
mark-nielsen 5491947aa1 NO CODE CHANGES. Just added PHPdoc comments at the top of lesson files. 2006-09-30 19:49:40 +00:00
skodak a1069b070a MDL-6696 Default country doesn't display on dropdown menu 2006-09-30 19:46:10 +00:00
stronk7 142d7fb842 Added one more test to check the EXPERIMENTAL rename_key() function 2006-09-30 19:45:51 +00:00
stronk7 9c4ee55b6c Added rename_key()
Note that this is one EXPERIMENTAL function and shouldn't be used
by you in production code EVER!
2006-09-30 19:44:49 +00:00
stronk7 57770f7a50 Adding support to rename_key()
Note that this is one EXPERIMENTAL function and shouldn't be used
by you in production code EVER!
2006-09-30 19:44:16 +00:00
stronk7 e77fd021e6 Implemented rename_key()
Note that this is one EXPERIMENTAL function and shouldn't be used
by you in production code EVER!
2006-09-30 19:43:16 +00:00
mark-nielsen eefa69ce5c Bug Fix: The dependency drop-down was displaying incorrectly. Fixed up code to use API to gather Lessons correctly. 2006-09-30 19:24:22 +00:00
mark-nielsen b3b4bc44ce BugFix for MDL-6730: now blank lessons redirect to edit.php where the user is prompted by a menu of options. 2006-09-30 19:00:07 +00:00
stronk7 6c89dc5514 Added rename_index()
Adding support for index renaming. Note that MySQL doesn't support this
but this shouldn't be important at all, mainly because, under xmldb,
accesses to index-names are always done with find_index_name() and
never explicity.
Anyway, this function could be useful in the future to normalize index
names in some Health center or another similar place.
2006-09-30 18:24:14 +00:00
stronk7 1c86ef5b1c Adding support for index renaming. Note that MySQL doesn't support this
but this shouldn't be important at all, mainly because, under xmldb,
accesses to index-names are always done with find_index_name() and
never explicity.
Anyway, this function could be useful in the future to normalize index
names in some Health center or another similar place.
2006-09-30 18:23:00 +00:00
danstowell 15add7bd29 Fixed PHP 4 compatibility re MDL-6753 2006-09-30 17:46:15 +00:00
stronk7 aa8503fdd0 Added 3 more tests to check change_field_enum() 2006-09-30 17:06:59 +00:00
stronk7 61af97e76b Added new function change_field_enum() 2006-09-30 17:06:20 +00:00
stronk7 b899d9bf1d Added support to change_field_enum() across all RDBMS 2006-09-30 17:03:17 +00:00
julmis 9337f3e48d Merging fixes from MOODLE_16_STABLE 2006-09-30 16:07:43 +00:00
stronk7 3650ba6f58 Using the new table_exists() to initialize tests properly. 2006-09-30 15:51:41 +00:00
stronk7 3e1861cc87 Applying the field_exists() check to add and drop fields. 2006-09-30 15:48:23 +00:00
skodak 55b4d09637 new advanced upload assignmet type - replaces old upload type, existing data and settings not fully compatible 2006-09-30 15:41:20 +00:00
stronk7 342da808c5 New function field_exists() to detect if one field exists 2006-09-30 15:35:32 +00:00
stronk7 73d111a820 Add some checks to detect if one table exists before creating or
dropping it. Part of MDL-6614
2006-09-30 15:19:56 +00:00
stronk7 7471f3f0dd Adding some debugging() for some controlled actions. 2006-09-30 15:15:34 +00:00
stronk7 ed37b15464 Moving some uses of find_index_name() to index_exists() 2006-09-30 15:00:46 +00:00
stronk7 cf9a1a40f1 Fixed typo 2006-09-30 14:59:03 +00:00
stronk7 4103c3545c Prevent tables without prefix to be duplicated at install time. MDL-6614 2006-09-30 14:36:52 +00:00
moodler 2c13082db0 Fixed up Preset name 2006-09-30 14:13:22 +00:00
moodler 26ea488855 Don't show progress bar when there's nothing worth showing 2006-09-30 13:52:15 +00:00
stronk7 2719f3e2c9 Inside ddllib, for consistency we call parameters table, field...
(without the xmldb_ prefix)
2006-09-30 13:04:17 +00:00
stronk7 a504ba0213 Added index_exists(). One wrapper over find_index_name() 2006-09-30 12:56:39 +00:00
stronk7 512a237ff6 One more use of getTableName() added. 2006-09-30 12:34:17 +00:00
stronk7 9af19c728d Extendig use of new getTableName() over all generators 2006-09-30 12:13:07 +00:00
stronk7 97b9178459 New getTableName() function to get normalised table names everywhere 2006-09-30 12:03:19 +00:00
stronk7 68bc165bed Added new function table_exists() to be used later... 2006-09-30 12:01:33 +00:00
stronk7 87c6baf4a1 Ah! forgot to interchange keys and values! 2006-09-30 11:09:44 +00:00
stronk7 ef18962b00 Execute the index_get_name() silently to avoid a lot of
output in the install/upgrade process. Original db->debug
is re-set to their original status once executed.
2006-09-30 10:54:37 +00:00
moodler d4484f3209 IFxed some notices when the block was used on sticky blocks page. MDL-6620 2006-09-30 08:22:17 +00:00
stronk7 4fae686bc2 Enablig PHP generation of code for change_field_type() 2006-09-29 23:12:40 +00:00
stronk7 cec4b7c621 Added to more tests to check float <---> char conversion 2006-09-29 23:10:31 +00:00
skodak 7d47261645 towards new upload assignment - expect brand-new version tomorrow :-) 2006-09-29 21:45:04 +00:00
skodak 03bfaba1fd fixed parameter cleanup SC#318; merged from MOODLE_16_STABLE 2006-09-29 20:54:15 +00:00
stronk7 6e152cc621 Now basic types of conversion (int2char, char2int, number2char, char2number)
are working properly under all RDBMS.
2006-09-29 17:49:04 +00:00
stronk7 b0cd86786b Change one test a bit... 2006-09-29 17:29:08 +00:00
vyshane d1cc283172 Fixed wrong context bug 2006-09-29 08:58:02 +00:00
vyshane 825d73aa33 Fixed missing separator (MDL-3975). 2006-09-29 07:28:11 +00:00
bobopinna aaa267965a Moved to scorm_1x.js.php 2006-09-29 06:45:25 +00:00
bobopinna ea5928ee16 No more used 2006-09-29 06:43:58 +00:00
moodler 76389cec17 Fixed the upgrade from 1.6.x. The role->shortname field was not being created. 2006-09-29 06:43:42 +00:00
bobopinna 5a40140ec4 New icon to support toc bug fix 2006-09-29 06:43:36 +00:00
moodler aae37b638c Added progress bar to role assignments during upgrade 2006-09-29 06:41:10 +00:00
bobopinna cfc74f324c Changes no datadir error message from bad manifest to bad package 2006-09-29 06:29:10 +00:00
bobopinna 3c6c4eaf66 Fixed completed status for launched Asset 2006-09-29 06:27:47 +00:00
bobopinna 172ec29fcc Added _ to version data element 2006-09-29 06:26:36 +00:00
bobopinna 530a61d5d3 Fixed a bug in toc display 2006-09-29 06:25:56 +00:00
bobopinna 98baddf710 Added some strings 2006-09-29 06:20:53 +00:00
moodler 72da504606 Added a progress bar for the role assignments 2006-09-29 06:19:47 +00:00
moodler dcc6b7c483 Add MS-SQL to installer :-) 2006-09-29 06:11:47 +00:00
toyomoyo ae8402fe38 fixing a redundant order by clause 2006-09-29 05:46:02 +00:00
toyomoyo a0db31e7e5 commentary text renamed to general feedback 2006-09-29 05:45:24 +00:00
moodler ea35ab87d9 Header and footer should include $CFG->header and $CFG->footer, just in
case the chosen theme doesn't exist any more
2006-09-29 05:43:48 +00:00
moodler 459c1ff12a Just tidying up code while reading it 2006-09-29 05:35:37 +00:00
toyomoyo 39ecfc7453 added a new temp config variable to help track maint mode before and after migration MDL-6182, not fixing in stable yet due to the lack of support of unset_config function. 2006-09-29 03:10:38 +00:00
moodler 721146820c Slight change to Copyright notice to link to our License page, not Gnu site 2006-09-29 02:39:39 +00:00
toyomoyo ed59cd6ea4 fix for MDL-5670 2006-09-29 02:19:27 +00:00
stronk7 72fa544947 Moving some tests up and down and introducing some more
tests about changing column types. Not working yet unded mssql
2006-09-28 23:16:29 +00:00
stronk7 f020b35705 Moving some change_field_XXX() functions and introducing
change_field_type(). Seems to work everywere but under
mssql (due to some problems with default constraints).
Will see it tomorrow.
2006-09-28 23:14:52 +00:00
stronk7 599caff8c5 prevent nulls to become nulls (oracle error)
and defaults null to become defaults null
when temporary columns are used
2006-09-28 23:06:04 +00:00
stronk7 531bf26489 Adding two more tests (create and drop foreign keys) 2006-09-28 22:11:06 +00:00
stronk7 5adc951c4f Don't rely on index names to decide if we have to drop one key 2006-09-28 22:05:11 +00:00
stronk7 d54f85efa6 minor adjust. keytype to drop keys is not needed anymore. now it's
defined in mysql generator (the only one needing it)
2006-09-28 21:47:36 +00:00
koenr 2c79612205 one more 2006-09-28 21:32:20 +00:00
koenr 2c0d423d8c few typos. Thanks a lot for spotting Mits! 2006-09-28 21:31:34 +00:00
koenr 8f36981c51 fixed MDL-3484 2006-09-28 20:58:55 +00:00
stronk7 ac5ff0e787 fixed one wrong constant 2006-09-28 20:12:00 +00:00
stronk7 9c46a7e6f9 changed mysql drop index syntax. Nothing relevant. 2006-09-28 20:11:30 +00:00
stronk7 71ea93e023 Argh! More than 3 hours searching for this error! I was calling one
constructor with wrong number of parameters and PHP said nothing at
all (with DEVELOPER level of debugging). Horrible OOP !
2006-09-28 20:06:08 +00:00
stronk7 53d3b80798 prevent some warnings on tables without indexes 2006-09-28 19:43:17 +00:00
stronk7 4690f076ca Now keys and indexes are PERFECT (argh, Oracle, once more was causing problems) 2006-09-28 18:56:21 +00:00
stronk7 4df8b6cdfc some more settings go to XMLDBGenerator (as they are default) 2006-09-28 18:39:33 +00:00
stronk7 1a275daaaf some more settings go to XMLDBGenerator (as they are default) 2006-09-28 18:31:28 +00:00
skodak 30fce5000a removed one more unneeded file from adodb library 2006-09-28 18:29:54 +00:00
mits 15cfddc323 Fixed addmin setting colors. 2006-09-28 17:48:12 +00:00
stronk7 a8b7de48fe Adding some more tests about adding and dropping keys 2006-09-28 17:35:52 +00:00
stronk7 55c4b9435d add_key() and drop_key() are working (with sync of undelying
indexes automated)
2006-09-28 17:30:14 +00:00
stronk7 fac17f427f add_key() and drop_key() are working (with sync of undelying
indexes automated)
2006-09-28 17:25:00 +00:00
stronk7 0852990f9b Deleting some parameters that aren't needed anymore. Code will
decide if creating underlying indexes for keys automatically now.

Also, add_key() and drop_key() are working (with sync of undelying
indexes automated)
2006-09-28 17:20:21 +00:00
stronk7 662244cb77 Deleting some parameters that aren't needed anymore. Code will
decide if creating underlying indexes for keys automatically now.
2006-09-28 17:02:49 +00:00
stronk7 b399c397bf Added PHP 5.0.x restriction to Moodle 1.7. MDL-5653 2006-09-28 16:46:52 +00:00
skodak 8ba4cbd2a3 reverting last commit, expect new fixes soon 2006-09-28 15:34:54 +00:00
moodler b7b0afb87f Fixed a capability name: MDL-6727 2006-09-28 15:06:07 +00:00
moodler 5e6893720e Guest should not see My Courses MDL-6736 2006-09-28 14:48:29 +00:00
gbateson f7f630bce7 added PARAM types to calls using "required_param" and "optional_param" functions 2006-09-28 13:24:36 +00:00
jamiesensei 909ec807cb moved styles in theme\standard\styles_form.css to theme\standard\styles_layout.css and removed theme\standard\styles_form.css and all references to it. In line with discussion here : http://moodle.org/mod/forum/discuss.php?d=54907 2006-09-28 10:32:23 +00:00
toyomoyo 89a66e5405 changes in backup/restore for roles. fixed bug related to wrong context in backuplib.php added code to handle addition of new roles in restorelib.php, added code to do role overrides in restore.php new functionalities requires proper handling 2006-09-28 09:15:14 +00:00
moodler 8d73640e7f Unenrol fixed to support other users too and better workflow 2006-09-28 08:55:04 +00:00
moodler 41763b02da One more debugging removed 2006-09-28 08:38:27 +00:00
moodler 130672189c Removed excess debugging that is no longer very useful 2006-09-28 08:37:19 +00:00
vyshane 9ed7d7e162 Merged fix for MDL-6681 2006-09-28 08:29:17 +00:00
vyshane cef1ce6abf Fixes for MDL-3975
Changes to discuss.php and post.php so that the single discussion type forums are handled more consistently.
2006-09-28 07:29:50 +00:00
moodler eae2bad46f Updated tags 2006-09-28 07:22:36 +00:00
moodler 2d14e8a8fe Removed duplicate capability moodle/course:managequestions MDL-6610 2006-09-28 07:17:39 +00:00
moodler 9e27d59600 Documentation and strings for Default Role 2006-09-28 07:07:54 +00:00
moodler 605522f315 FIxed heading on assign roles in course context 2006-09-28 07:00:28 +00:00
moodler 70ce923e0a Fixed a typo 2006-09-28 06:48:50 +00:00
moodler 77c645df28 Started out fixing MDL-6624 and it turned into a fairly major cleanup
of the participant listing.  I think it's a lot better now.

Bulk messaging fixed too, and is controlled by a new capability

      moodle/course:bulkmessaging
2006-09-28 06:41:07 +00:00
moodler 3e21903846 Cleaning up user index a bit 2006-09-28 06:04:39 +00:00
vinkmar 3b904bc94f calendar admin page cleaned up 2006-09-28 04:46:09 +00:00
moodler b90e2f199f First cut at an overview page for the user listing (when you first arrive) 2006-09-28 04:45:39 +00:00
moodler bac2f88ae8 Added count_role_users() as a more efficient thing to do than get_role_users() 2006-09-28 04:42:49 +00:00
jamiesensei 15fdf6199e wrapping group element in a fieldset tag 2006-09-28 04:19:56 +00:00
jamiesensei ec929cd596 now wrapping a group element in a fieldset tag, brought id tag on checkboxes and radio boxes in line with moodle universal form structure 2006-09-28 04:18:35 +00:00
martinlanghoff f5896f0fb6 enrol/db/enrol.php ignore delt'd usrs when enroling
Previously the import process would throw a non-fatal error when it found a
non-one number of users with the remote key.  This meant that
when there was a deleted user with the same remote key as an existing user, it
would throw an error, and report that there were no users for that remote key.
Fixed it so that it now ignores deleted users, and provides more accurate
and more precise error messages in the event that there are further
problems.

Author: Peter Bulmer
2006-09-28 01:20:42 +00:00
martinlanghoff 13e8d6e46f auth/db/lib (bugfix) only update mdl fields during login if 'onlogin' set
Previous operation was update all moodle fields from the external database
during each login & sync ignoring this setting. Now if this setting is
'oncreation' then the field is only copied once (on creation of user).
2006-09-28 01:05:10 +00:00
martinlanghoff 897e0712e8 Comments. 2006-09-28 00:13:07 +00:00
martinlanghoff c0adb54de4 Allow Chinese/Japanese UTF-8 strings to be truncated at character
boundaries instead of word boundaries. (fix MDL-5378)
2006-09-28 00:10:23 +00:00
martinlanghoff 6402cd4679 Fix for breadcrumb problem (MDL-6271). 2006-09-28 00:08:50 +00:00
skodak 250934b8e0 fixed logic of moodle_install_roles() - it now calls update_capabilities() after creation of default roles, but before first role_assign(). The problem was that role_assign calls code from forum lib which already uses capabilities, this might cause even bigger problems later. 2006-09-27 22:59:37 +00:00
jgraham909 6fc73d59b8 Merging in changes from Doug Dixon and Mike Lee to update the codebase 2006-09-27 22:57:33 +00:00
skodak 6727c1753f added default settings for admin_setting_special_backupdays() 2006-09-27 22:25:15 +00:00
skodak 5d0df39db4 fixed array_shift($roles) warning during upgrade from 1.6 2006-09-27 22:16:23 +00:00
skodak 1cd3eba948 fixed validation of course category for site course MDL-6715 2006-09-27 20:43:04 +00:00
jamiesensei 49c5368707 changes to html structure for rendering of forms in line with http://moodle.org/mod/forum/discuss.php?d=54907#250816 2006-09-27 19:12:52 +00:00
jamiesensei 57a763a733 changes to style sheet in line with http://moodle.org/mod/forum/discuss.php?d=54907#250816 2006-09-27 19:10:31 +00:00
stronk7 97bd35b284 Fixed bug in PHP generation of indexes. 2006-09-27 18:47:24 +00:00
skodak 7bfa3101df add checks for stale contextid in role_assignments and overrides into load_user_capability() MDL-6708 2006-09-27 18:11:36 +00:00
skodak a36a3a3f98 added strict context level checks to get_context_instance() MDL-6709 , the reason is to find typos and buggy code that would be otherwise unnoticed 2006-09-27 17:58:17 +00:00
skodak 3ca2dea51d sanitise request in create_context() and show debug info when appropriate MDL-6715 2006-09-27 17:50:53 +00:00
stronk7 13e9de1c67 Fixed Bug MDL-6647 - PG version not being fetched properly.
(http://tracker.moodle.org/browse/MDL-6647)
2006-09-27 17:48:45 +00:00
moodler 05e8f81eeb A notice about versions 2006-09-27 16:45:40 +00:00
jamiesensei f0e2d0ac80 upgraded tableless pear quickform packages 2006-09-27 16:31:11 +00:00
jamiesensei 04ad8eee82 added empty setHelpButton method to moodleform_hidden 2006-09-27 16:09:15 +00:00
jamiesensei e249661fbb fixed small typo 2006-09-27 16:07:37 +00:00
jamiesensei ef625b6bac added comments to show how to add nested fieldset container for groups of items 2006-09-27 16:06:56 +00:00
jamiesensei 42f248e659 new security features added acceptGet, optional_param, required_param, clean_param, methods added to form class 2006-09-27 16:00:19 +00:00
jamiesensei 5f2256f3ee modifications made to demo new security features 2006-09-27 15:58:45 +00:00
jamiesensei 7b9cdb60cf demos new security features optional_param, acceptGet 2006-09-27 15:57:21 +00:00
moodler 924ccd683a Fixed up some wrong entries in the log_display table MDL-6516
NOTE:  The dates are a month in advance for $version here!  We need
to increment very slowly until it catches up, and make sure that we
manage the versions in HEAD very carefully after we branch for 1.7
2006-09-27 14:08:17 +00:00
moodler bd10f85d94 Add eu to allowed domains 2006-09-27 12:57:33 +00:00
sam_marshall 4db1861a8d Wiki: Improve page locking to make it more robust and support non-javascript users (not very friendlily, though...) 2006-09-27 11:22:57 +00:00
sam_marshall 5c135dd4fd Wiki: correct behaviour in Postgres with pages that have ' in name 2006-09-27 11:21:59 +00:00
sam_marshall 13ef403f3b Wiki: correct column type on Postgres update (fixes Search and Links tabs, matches what's in install.xml anyhow) 2006-09-27 11:21:01 +00:00
sam_marshall 228501678b Wiki: Fix wiki-linking to not be case-sensitive. 2006-09-27 11:20:16 +00:00
sam_marshall 86ec052fa5 Changed wiki help to clarify that the wiki markup only works when not using the WYSIWYG editor. (This was seriously confusing our users!) 2006-09-27 11:18:40 +00:00
skodak 90eca94be8 fixed incorrectly quoted $LIKE in forum recent activity sql 2006-09-27 10:44:25 +00:00
skodak 421f60f9c9 fixed default proxyport value 2006-09-27 10:30:54 +00:00
skodak 3c8ecb0cbb fixed incorrect user id when updating in uploaduser.php 2006-09-27 09:50:48 +00:00
moodler 4e03aa7a00 FIxed up log headers etc MDL-6714 2006-09-27 09:22:29 +00:00
toyomoyo a2a020ea6b adding support for roles in backups 2006-09-27 08:59:27 +00:00
moodler bea0bd7725 CHecking Enrique Castro's fix for MDL-6366, to help wiki pagenames not get reset 2006-09-27 08:49:42 +00:00
moodler 0cfafdc769 Fixed MDL-6334 by removing the group-setting popup 2006-09-27 08:29:24 +00:00
moodler 1bbcb7c01a Some more debugging in course/rest.php (to error log) 2006-09-27 08:02:26 +00:00
moodler bccdf22764 Fixed a possible notice 2006-09-27 08:01:22 +00:00
moodler 15a169222b Some extra changes from the duplicate work I did on upgradesettings.php
main change is that adminsettings is now an ID on the form
2006-09-27 07:49:34 +00:00
moodler 2b2d182aa7 Fixes for empty logs array MDL-6145 2006-09-27 07:41:38 +00:00
vyshane acad3401f1 Reverting first until we have a fix for converting the wrong context levels 2006-09-27 07:18:25 +00:00
vyshane 4b69085833 CONTEXT_MODULE should really be CONTEXT_BLOCK 2006-09-27 07:11:06 +00:00
bobopinna e54a9c39cf Added skipview field backup and restore 2006-09-27 06:58:28 +00:00
stronk7 d335bebc06 Added support for add_index() and drop_index() 2006-09-26 23:17:24 +00:00
stronk7 42d1fc2f3f XMLDBTable wrappers to create and drop indexes 2006-09-26 23:16:09 +00:00
stronk7 618a982eed Now all the generators support creating and dropping indexes 2006-09-26 23:15:20 +00:00
stronk7 0c31ba2813 Adding test for create index and drop index. 2006-09-26 23:08:44 +00:00
stronk7 b0d8444349 Fix one place where index->type was being used instead of index->unique 2006-09-26 22:46:05 +00:00
skodak 6859360cd4 coverted /admin/ to proper /$CFG->admin/ in paths 2006-09-26 21:10:14 +00:00
skodak eee90c06b8 upgradesettings.php now using the same CSS as settings.php , part II. 2006-09-26 20:54:05 +00:00
skodak d8c5baee04 upgradesettings.php now using the same CSS as settings.php 2006-09-26 20:51:28 +00:00
urs_hunkler 86f5774d0b 'changed width of label from 40% to 30% to make the textarea fit' 2006-09-26 19:30:57 +00:00
urs_hunkler f2e101239b 'added width and height to qfrow to make it render correcly in FF, changed qfelement to display:block' 2006-09-26 19:23:28 +00:00
skodak fbc88f3886 fixed legacy comment upgrade code in assignment and journal 2006-09-26 19:18:21 +00:00
stronk7 ceac2552ef Added support for PHP generation on create/drop/rename indexes and keys 2006-09-26 19:05:55 +00:00
stronk7 48eac31328 Replaced XMLDB own implementation of the concat function to use
the new, ultra-cool, ADOdb based, concat_sql(). Thanks, Martin Langhoff!
2006-09-26 18:34:48 +00:00
stronk7 66841aed29 One wrong use of onespace2empty() - an strange function - :-/
in the DIRTY HACK was causing not info to be returned under Oracle
by the get_field_sql() function, so sequence numbers were broken.
2006-09-26 18:27:44 +00:00
stronk7 1d5071a57e Don't CREATE OR REPLACE TRIGGER but just CREATE it
(so we'll be able to detect duplicate name with an
error instead of getting false success)
2006-09-26 18:10:27 +00:00
mits e88ecd1b08 Brushed up theme oceanblue. 2006-09-26 18:00:27 +00:00
stronk7 2efd67bf5f Increasing log_display->field because sql_concat() (one
wrapper over ADOdb Concat() generates really long
expressions for MSSQL.
2006-09-26 17:43:37 +00:00
stronk7 7bd1b4f5ba Ops, scorm->skipview default must be 1 2006-09-26 16:58:49 +00:00
jamiesensei 5ae7038594 modified api to create an htmleditor element 2006-09-26 16:40:35 +00:00
stronk7 59e3e96277 copy/paste typo 2006-09-26 16:27:39 +00:00
stronk7 d5a28fdae9 Adding scorm->skipview to PostgreSQL 2006-09-26 15:56:18 +00:00
stronk7 d107d19057 Adding scorm->skipview to XMLDB file! 2006-09-26 15:25:29 +00:00
bobopinna 8e45ba4522 Added the new features MDL-4482 and MDL-6534 (Course structure view.php skip) 2006-09-26 14:40:00 +00:00
bobopinna 57d52eebfa Fixed a bug in mode selection 2006-09-26 14:37:13 +00:00
bobopinna 32cfa4dbf8 Added skip view page feature 2006-09-26 14:25:59 +00:00
jamiesensei f8857b4925 adding static element class to registry of Moodleform elements 2006-09-26 13:55:51 +00:00
urs_hunkler d345a18967 'added space before styles_form to correct CSS loading' 2006-09-26 13:48:00 +00:00
jamiesensei eb476e4adb file describing a static form element for moodle with setHelpButton method 2006-09-26 13:32:15 +00:00
moodler f1dcf0000a Checked in Nick's patch from MDL-6699 to aid installation when there
are a LOT of students (it was running out of memory)
2006-09-26 13:31:57 +00:00
moodler d22130f36d Added a PEAR extension that was missing, and permission from
Mark Wiesemann for his renderers.   Yay!
2006-09-26 12:07:48 +00:00
jamiesensei 2462a50af3 changed some assignments to assignment by reference when instantiating objects. 2006-09-26 11:13:51 +00:00
bobopinna a9d22c84b6 Fixed a problem with Firefox 2006-09-26 10:26:03 +00:00
bobopinna c9a2f27e80 Downgraded a new feature to fix the module 2006-09-26 10:23:37 +00:00
jamiesensei 80f962df90 * added error message for setHelpButton method not existing
* modified htmleditor class so that differences in formatting for this element are defined by css but use the same html
* added type name of element classes to css wrapper class names
2006-09-26 09:42:42 +00:00
mits 51d59bbb08 Brushed up theme oceanblue. 2006-09-26 09:39:10 +00:00
skodak 62f62bf984 admin bookmark cleanup 2006-09-26 09:25:37 +00:00
moodler a3d23679e6 We have permission for HTML_Quickform and HTML_Common
...


Bertrand Mansion
http://www.mamasam.com      - creative internet solutions
http://golgote.freeflux.net - blog
2006-09-26 09:12:21 +00:00
toyomoyo 1ad590e153 more changes, restoring of role assignments now work in course, mods and blocks instances (less user instance), restoring local overrides do not work 2006-09-26 09:05:44 +00:00
skodak 6de2a7b6c8 fixed another missing global $CFG 2006-09-26 08:49:47 +00:00
vyshane 83da3d286c Fix for MDL-3975. Also added function in rsslib.php to delete cached RSS feeds for the source and destination forums when moving a discussion between 2 forums. 2006-09-26 08:37:56 +00:00
bobopinna d292466ca6 Moved in datamodels directory 2006-09-26 08:21:46 +00:00
bobopinna 9096a47876 Not used for now 2006-09-26 08:20:23 +00:00
skodak 9e24fbd14d basic validation fix for text admin settings 2006-09-26 08:16:17 +00:00
bobopinna dc383b6f23 Splitted all the scorm/aicc library in type separeted files 2006-09-26 08:00:16 +00:00
bobopinna d380567f82 Fixed a problem with reporting and multiattempts 2006-09-26 07:57:33 +00:00
bobopinna a30b6819fc Fixed some problems with reporting and multiattempts 2006-09-26 07:56:07 +00:00
skodak 8e00b731e1 fixed defaults 2006-09-26 07:39:04 +00:00
moodler f67f8e8cb5 Updated README for MDL-6693 2006-09-26 07:17:54 +00:00
skodak 9a76d7b9ea fixed autologinguests warning 2006-09-26 06:34:29 +00:00
skodak 05f8f7e76b fixed missing global $CFG 2006-09-26 06:31:18 +00:00
skodak 2c1f712c16 file delete and rename warnings polished 2006-09-26 06:29:04 +00:00
toyomoyo 912c1fd5a2 correct xml parsing for mod level assignment and override 2006-09-26 06:02:10 +00:00
martinlanghoff c4121640be user: remove deprecated sql_paging_limit(), use offset, limit parameters 2006-09-26 05:11:50 +00:00
martinlanghoff ea9a729f80 mod/lesson, mod/quiz: remove deprecated sql_paging_limit(), use offset, limit parameters 2006-09-26 05:11:29 +00:00
martinlanghoff 1ad5c6380f mod/quiz: remove deprecated sql_paging_limit(), use offset, limit parameters 2006-09-26 05:11:05 +00:00
martinlanghoff 1e7368e782 dmlib: set_field() now has the Oracle DIRTY HACK too! 2006-09-26 05:10:39 +00:00
martinlanghoff 5a55af6097 dmlib: Add Oracle dirty hack cleanup to recordset_to_menu() get_field_sql() and get_fieldset_sql()
This covers most (all?) the gaps in data retrieval except get_recordset_sql().

To tackle get_recordset_sql,  where the actual data retrieval is done within
AdoDB, we would have to to wrap around AdoDB with a subclass, but that would
be dirty, dirty, dirtier.
2006-09-26 05:10:18 +00:00
martinlanghoff 44f9885044 sql_concat(): fixed param order thinko -- and now it works too! 2006-09-26 05:09:48 +00:00
martinlanghoff b4dd303a97 search: removed dbtype-specific select - MySQL can now handle grownup syntax 2006-09-26 05:09:26 +00:00
martinlanghoff 47dc28e53c search: fixed mysql-isms - tablenames without prefix and with backticks 2006-09-26 05:09:01 +00:00
martinlanghoff 7e034f29a0 searchlib can use sql_ilike too! 2006-09-26 05:08:39 +00:00
martinlanghoff a8f4522dfa data, forum, glossary: use sql_ilike() for a portable LIKE operator 2006-09-26 05:08:18 +00:00
martinlanghoff 95008f81c6 sql_ilike() -- added notes on Oracle support or lack thereof 2006-09-26 05:07:28 +00:00
martinlanghoff 6eb7722f93 message/lib.php: use sql_ilike() 2006-09-26 05:07:05 +00:00
martinlanghoff d2715c70b6 mod/glossary, mod/hotpot: use sql_concat() and sql_concat_join()
Cleaned up several dbtype conditionals too.
2006-09-26 05:06:44 +00:00
martinlanghoff 38e02f4c32 Introducing sql_concat_join($sep, $array) helper
returns the SQL to do the equivalente of a join() or implode()
on the DB server. Watch the RDBMS work! ;-)
2006-09-26 05:05:54 +00:00
martinlanghoff 92a2d92a82 message_history_link() - replace use sql_concat() and sql_like() 2006-09-26 05:05:32 +00:00
martinlanghoff 27176468fe mod/quiz: replace $db->Concat() with sql_concat() 2006-09-26 05:05:10 +00:00
martinlanghoff ea59864f45 course/lib.php: remove unused global 2006-09-26 05:04:40 +00:00
martinlanghoff 4068bedb83 Use sql_concat() in course/lib.php 2006-09-26 05:03:46 +00:00
martinlanghoff 0ce96669c9 Introducing sql_concat() - and use it in sql_fullname()
sql_concat() is just a passthrough to $db->Concat() -- it doesn't
add any value, and I think the dispatching is somewhat expensive.

Just using $db->Concat() should be good enough, were it not for
consistency in our DM API.
2006-09-26 05:02:59 +00:00
mjollnir_ 6e58026b29 recredited the sql_primary_role_subselect function to correct author (much as I would like to claim it) 2006-09-26 04:41:45 +00:00
moodler 74b345880d Changing error to notify so that it's not fatal (and doesn't leak server data) 2006-09-26 04:38:00 +00:00
moodler 867f5adb73 Moved Penny's funky sql function into dmllib.php 2006-09-26 04:33:59 +00:00
toyomoyo 637644fbd1 fixing a get_record bug (multiple instances) 2006-09-26 04:10:33 +00:00
moodler 329f40b003 Changed CONTEXT_SITE to CONTEXT_SYSTEM MDL-6506 2006-09-26 03:57:05 +00:00
mits 9c7f2782c6 Brushed up theme oceanblue. 2006-09-26 03:20:40 +00:00
moodler 3c9188cad2 Automatic installer.php lang files by installer_builder (20060926) 2006-09-26 02:47:16 +00:00
vyshane ee8e000823 Fixed bug in forum_make_mail_post() 2006-09-26 02:02:27 +00:00
toyomoyo 71dd89ff09 fixing missing $ 2006-09-26 01:50:17 +00:00
toyomoyo 4c81f5511e adding roles support for restore 2006-09-26 01:43:07 +00:00
mits 720353b2c9 Fixed visibility. 2006-09-26 01:38:17 +00:00
mjollnir_ 87c75906ed update enrol/ldap to work with roles.
Credit: Alastair Pharo <alastair@catalyst.net.nz>

1) Some config settings have changed (ones that related specifically to
teachers and students).  There is a check in place however to migrate
old configurations to new ones.

2) Perviously two syncs happened - one for students, one for teachers.
Now sync gets called the same number of times as there are roles.
Those roles that have config settings associated with them then run
through all the records.  This means syncing takes longer the more
roles you configure (which is expected anyway I suppose).
2006-09-26 01:31:33 +00:00
mjollnir_ 7ccf89f50a update enrol/database to use roles.
Credit: Alastair Pharo <alastair@catalyst.net.nz>

Database
--------

1) This plugin previously only worked for students.  I have made it so
that you can _optionally_ specify a third column in your external
database that contains some kind of role information (similar to the
other two fields, you can choose any column in the mdl_role table
to map to).  If you do this, then the code loops over for each different
kind of role and queries the external database.

2) There is a *slight* problem to be aware of, if a moodle
configuration was upgraded to use the new role columns, then downgraded
again, some roles might get left behind in the database when the
large-scale sync thing goes through (that is, record pruning doesn't
scale back quite properly). These would be cleaned away by
setup_enrolments at login time, however, and the scenario was unlikely
enough for me to decide to leave it for now.

3) If you don't have role columns there is a 'default role' setting
that you can set (made by Martin D).  This will only be obeyed when no
role columns are specified.  If this is set to 'default', then the
course default role is used, on a per-course basis (which usually
means student apparently).

4) From (3), my understanding is that if no config settings are
changed, and the default role for all upgraded courses is student, that
a smooth upgrade to 1.7 will occur for users of the database enrolment
plugin.
2006-09-26 01:30:32 +00:00
mjollnir_ 7d49253f40 Here's a little patch for auth/ldap/lib.php... just stops some
errors from popping up.
Credit: Alastair Pharo <alastair@catalyst.net.nz>
2006-09-26 01:26:27 +00:00
mjollnir_ 75673b93f8 fixing the participants report to work with roles 2006-09-26 01:23:57 +00:00
moodler cfd6b5053f Fix for typo MDL-6537 2006-09-26 01:11:53 +00:00
stronk7 ef47a3eb5b Fixed display of files 2006-09-25 23:09:16 +00:00
stronk7 8e81509277 Added one woody style for all the admin fieldsets 2006-09-25 22:57:20 +00:00
stronk7 313b5a3550 Minor changes to improve behaviour of selections. 2006-09-25 22:53:39 +00:00
stronk7 b017120ce0 Ops! I forgot to commit this 2 days ago! Now a lot of
data fields will be null!
2006-09-25 22:48:43 +00:00
stronk7 0db2d6bb98 Prevent NOT NULL fields to have one DEFAULT NULL clause 2006-09-25 21:44:21 +00:00
stronk7 a653016d94 Some notes:
- Foreign keys are really cool (at the XMLDB Editor). Define them as necessary
  as they allow as one "formal" structure of the DB. They won't cause problems
  on generation, mainly because only the underlying index will be created.
- Please, put comments inside each table/field/key/index field, mainly because
  XML comments will be deleted if the file is edited by
- The XMLDB Editor. Please use it ;-)
- Also, one unique index was wrong in the XML file, fixed now.
2006-09-25 21:37:29 +00:00
mjollnir_ 4834fe627b fixing a string that referred to students and teachers in the config settings for stats 2006-09-25 20:59:00 +00:00
skodak c9a49ceab4 major cleanup of unsupported and legacy external pages in admin/; created new hidden unsupported category; some other minor fixes and changes 2006-09-25 20:22:55 +00:00
stronk7 6caa705dad Some more strings added...related with the View PHP utility 2006-09-25 19:26:16 +00:00
skodak 7d1df3a49d moodle specific developer debug messages disabled in admin/dbperformance.php page, because they might interfere with frames 2006-09-25 19:05:04 +00:00
skodak fa323030fa XMLDB editor now has admin-tree block 2006-09-25 18:29:50 +00:00
stronk7 812e363a39 Now generators support to add/drop column defaults 2006-09-25 18:22:06 +00:00
skodak c0a1aae3e2 admin/upgradesettings.php is now proper hidden external page with correct breadcrums ;-) 2006-09-25 18:21:59 +00:00
stronk7 aa134ecf17 Now the tests are performed with real data (2 records). Added 4
more tests to check compatibility of set/drop defaults...
2006-09-25 18:20:08 +00:00
sam_marshall 98a7359506 change from UNIQUE KEY to UNIQUE INDEX 2006-09-25 17:49:33 +00:00
sam_marshall 5cee80e183 (prev. wiki fix) Fixed broken constant defines 2006-09-25 17:47:35 +00:00
skodak d249e478d4 fixed hidden misc sectionin admin tree block, sorry 2006-09-25 17:44:43 +00:00
sam_marshall 22e846cde2 Wiki enhancement: edit locking (uses AJAX) 2006-09-25 17:42:32 +00:00
danstowell f775a510d6 Updated IMS Enterprise enrolment to Moodle 1.7 role infrastructure - MDL-6656 2006-09-25 17:21:07 +00:00
danstowell 26ba09125b Updated IMS Enterprise enrolment to Moodle 1.7 role infrastructure 2006-09-25 16:58:06 +00:00
sam_marshall 4488daf7ad File had a UTF-8 BOM at the start, was causing problems, now removed 2006-09-25 14:59:21 +00:00
jamiesensei 1629424dbb added styles_form to $DEFAULT_SHEET_LIST part of the code necessary so that every theme loads styles_form 2006-09-25 14:56:45 +00:00
moodler a06c8c2cd1 Fixed some width="*" in layout tables 2006-09-25 14:40:26 +00:00
sam_marshall 479eea4149 Removed trailing blank line at end of file (was breaking things) 2006-09-25 14:35:41 +00:00
moodler 1beed35f71 Added some form-groups on the htmleditor page 2006-09-25 14:34:33 +00:00
moodler fc52aa6e14 Cleaning up the id and class for each setting 2006-09-25 14:18:16 +00:00
skodak 499c621417 fixed quoting error 2006-09-25 14:15:55 +00:00
skodak a69be0d861 improved handling of resource file/directory references when renaming and deleting files in file manager. It is now fully configurable too. MDL-6132 2006-09-25 14:12:46 +00:00
vyshane 7c900d5d62 Changed to require_capability where possible 2006-09-25 13:14:50 +00:00
moodler 86328d5821 Added strings for Trusted Content 2006-09-25 13:14:40 +00:00
vyshane 7fa8296f01 Bug fixes 2006-09-25 13:05:18 +00:00
moodler 2e0c11dda3 Fixed display of times in admin settings using form-group 2006-09-25 12:48:07 +00:00
urs_hunkler 74bd2abd78 'added CSS for admin pages' 2006-09-25 11:59:00 +00:00
urs_hunkler 26620ae2d0 'separated CSS properties to color/fonts/layout/' 2006-09-25 11:56:45 +00:00
sam_marshall 20e1b1e5c0 Quick fix to the me() fix to the redirect function (for relative redirects). 2006-09-25 11:23:15 +00:00
urs_hunkler 30b14256e6 'added general settings for items within .form-groups to display:inline and float:none' 2006-09-25 11:22:36 +00:00
jamiesensei 864cc1de64 moved code turning on pear error printing if in debug mode to the top of formslib.php 2006-09-25 11:08:44 +00:00
urs_hunkler 1bd306206d 'added styling for textarea in adminsetting pages' 2006-09-25 10:59:18 +00:00
nfreear 542022f2eb Fixes bug MDL-6685 (Breadcrumb separator, only certain fonts support &#x25BA;). 2006-09-25 10:35:41 +00:00
urs_hunkler 7c47564df2 'added CSS for statsruntimestarthour to place hour and minute beside each other' 2006-09-25 09:44:31 +00:00
moodler a1d526438c FIxed some XHTML notices 2006-09-25 09:32:25 +00:00
urs_hunkler 91362d003f 'added float-left for form-group' 2006-09-25 09:13:04 +00:00
toyomoyo 3f1c7233c7 restore is NOT WORKING!!! role assignment and capability overrides are not in 2006-09-25 09:10:19 +00:00
moodler 0a7e84c341 Added form-group 2006-09-25 09:06:51 +00:00
moodler 841d5d4b94 Added some CSS to contain the html editor 2006-09-25 08:54:16 +00:00
skodak 0cd482e54d fix for MDL-6599 - problem with hiding of resource when $CFG->preventaccesstohiddenfiles enabled 2006-09-25 08:53:10 +00:00
vyshane dcd8e5890e Abstracted query in a new function forum_discussions_user_has_posted_in() 2006-09-25 08:50:00 +00:00
moodler 14f358562d Fixed div around submit button 2006-09-25 08:44:22 +00:00
vyshane cac40c2716 Added $forums[$i]->type == 'qanda' check to make things more explicit 2006-09-25 08:41:31 +00:00
moodler 3c6f7a7828 Remove size=X from admin settings (do it in CSS) 2006-09-25 08:33:10 +00:00
vyshane d50704bf19 Fix for MDL-6212. Forum searches now respect the qanda forums. In these forums, the user should not be able to see posts from discussions where the user has not yet posted, unless a post is the first post in the discussion (the question), or unless the user has the capabilitiy mod/forum:viewqandawithoutposting. 2006-09-25 08:25:58 +00:00
moodler 87a801e2ec Removed a typo 2006-09-25 08:22:05 +00:00
moodler afee986420 Updates for better CSS hooks 2006-09-25 08:20:14 +00:00
moodler 0462b3589e Temporary fix 2006-09-25 08:01:05 +00:00
moodler fa040029f0 Fix the editor and the surrounding table for settings 2006-09-25 07:55:10 +00:00
toyomoyo c76e095f70 some fixes for the main load_user_capablitiies() function, need pair c1, c2 to impose uniqueness. should use c2.id instead for override. no restriction on c2 for assignments 2006-09-25 07:50:03 +00:00
moodler edb6cba4b2 Fixed missing div properly this time :-) 2006-09-25 07:45:02 +00:00
moodler 23586acab5 Fixed miossing divs 2006-09-25 07:40:50 +00:00
moodler 6153cf5800 Moving all the admin settings to a tableless design MDL-6678
Thanks Urs for the CSS help!
2006-09-25 07:35:43 +00:00
moodler f94ced1010 Fix sort on get_teacher to get the most senior teacher 2006-09-25 06:15:31 +00:00
moodler 0a3e970319 FIxed some problems when getting teacher lists for print_course 2006-09-25 06:09:06 +00:00
moodler 73b998684b FIxes related to strange default languages 2006-09-25 06:04:02 +00:00
vyshane 77dc6d0b26 Discussions from a forum of type 'single' should not be splittable. Merge from 1.6 branch. 2006-09-25 05:12:01 +00:00
vyshane 66035aafd9 Merged fix for MDL-6521 2006-09-25 05:00:36 +00:00
mjollnir_ af5d9f6a06 bugsquish! stats aggregates and weird missing dates bug 2006-09-25 04:50:17 +00:00
vyshane 10b6398401 Fixed - wrong constant name 2006-09-25 04:11:41 +00:00
vyshane 87c7fce004 Merged fix for MDL-6363 2006-09-25 04:03:18 +00:00
moodler 1d546bb125 Fix for get_users_by_capability() so the caller can choose whether
they want users with doanything included or not
2006-09-25 03:00:50 +00:00
vyshane 1b54fb36ba Error printing for cron should be done with mtrace() 2006-09-25 02:44:54 +00:00
vyshane 2a692058d0 Fix in forum_make_mail_post() 2006-09-25 02:34:52 +00:00
vyshane 4be6bced7f Fixed sql query in assignment_get_unmailed_submissions() - we can't rely on user_students anymore. 2006-09-25 02:04:11 +00:00
moodler 01c65218a2 Restoring table_column which was mistakenly deleted I think 2006-09-25 01:55:06 +00:00
moodler 218eb65122 Changed the flag to be on a given user basis (just in case it gets called
for a lot of users)
2006-09-25 01:42:41 +00:00
vyshane 0ee186d9ca Typo in capability name. 2006-09-25 01:35:49 +00:00
moodler e4ec4e4149 Added a checking flag to check_enrolment_plugins() to make sure that it
never repeats more than once in an invocation.  Otherwise it's sometimes
possible for role_assign() during the enrolment process to cause loops.
2006-09-25 01:34:21 +00:00
stronk7 e920529bf8 Quick Fix. It should be 24! 2006-09-24 22:15:57 +00:00
stronk7 26b82be252 Drop all the unique keys inside PostgreSQL DB and convert them to
their equivalest unique indexes. We aren't going to allow unique
keys from 1.7 and upwards (until we decide to enforce referential
intregrity and until ADOdb support it)
2006-09-24 22:14:23 +00:00
mjollnir_ 32da8f410f fixed the dropdown menus in the detailed (user) reports (WHICH WORK!) 2006-09-24 22:13:31 +00:00
skodak a8a66c96ab it is now possible to hide parts of admin tree - not used yet, but it will be soon used for those hidden unsupported scripts in admin/ directory 2006-09-24 20:23:40 +00:00
stronk7 7253d30810 Added one new function find_key_name() to retrieve the
name og any key in the DB. This hasn't too much sense
for now (until we start to use referencial integrity) and
it is far from perfect, because it doesn't seach for the
key really in DB (due to the lack of support for this of ADOdb).
2006-09-24 19:39:53 +00:00
skodak 9fd9df205d fixed scheduled backup time setting 2006-09-24 19:37:34 +00:00
skodak aade3a4b6a fix for MDL-6680 redirect function is broken when running php as CGI, me() now used instead of SCRIPT_NAME + minor coding style changes 2006-09-24 19:10:13 +00:00
skodak 1cc309df9d fixes for recent incorrect index updates 2006-09-24 19:04:32 +00:00
stronk7 11b75afe8b Now Oracle generator is able to change the precision and decimals of
one column by using one temp column. This prevents ORA-1440 errors.
2006-09-24 17:39:20 +00:00
jamiesensei 01963b9552 This is a demo of the experimental formslib. It is used here to print and process the course settings form. 2006-09-24 17:14:44 +00:00
jamiesensei da6f876395 This is a first cut of a new formslib.php a library of classes for creating and securely processing forms in Moodle, based on PEAR QuickForms. Only uses XHTML and CSS and no table tags.
This is NOT YET PART OF THE MOODLE API it is here for experimental purposes.
2006-09-24 17:04:51 +00:00
moodler e836a7ddd8 When getting users by capability then exclude those with doanything at site level 2006-09-24 16:14:39 +00:00
stronk7 cc3779694a MSSQL alter field is exactly the standard one but with alter_column_skip_default enabled 2006-09-24 15:54:46 +00:00
stronk7 c1761c4292 XMLDB generators can return empty arrays if there is nothing to do. 2006-09-24 15:34:18 +00:00
stronk7 c02a561f97 Minor change to test to exclusively test the change of nullability 2006-09-24 15:28:32 +00:00
vyshane b343df8690 Merged fix for MDL-6615. 2006-09-24 15:28:16 +00:00
stronk7 d3b93bd26a Add skip parameters to one getFieldSQL call requiring them 2006-09-24 15:26:49 +00:00
stronk7 ff936e2c2d Finally PostgreSQL seems to be working now.... I've tried to do
it as clever as possible detecting when column specs change in
order to reduce the number of temp-update-drop-rename operations
2006-09-24 15:25:49 +00:00
vyshane 3f8a38343b Removed isteacher from function print_recent_activity_note() 2006-09-24 14:35:48 +00:00
moodler 9e38e94047 More tidy-ups 2006-09-24 14:35:45 +00:00
moodler 8173517648 Giving the capabilities a bit more room on smaller screens 2006-09-24 14:26:50 +00:00
moodler bc28fcd8fc Remaining capability strings 2006-09-24 14:20:44 +00:00
moodler 7fe6ddbab5 Add header classes to headers 2006-09-24 14:15:57 +00:00
vyshane 1172e5db68 Updated comment 2006-09-24 14:03:34 +00:00
vyshane 583b57b42d Changed <module>_print_recent_activity() functions so that they don't use $isteacher. However, I've left the $isteacher parameter in the functions, for backward compatibility so as not to break thrid party modules. Should we remove the parameter now? 2006-09-24 14:01:50 +00:00
vyshane 57244db359 Removed the following module configurations (converted to use roles):
participants, assesspublic and ratings. Changed assessed field to only use 1 (ratings on) or 0 (off).
2006-09-24 13:58:54 +00:00
moodler 847a041fb7 Better use of mod/quiz:view to hide quiz information (they already have the
name from the course page etc)
2006-09-24 13:54:22 +00:00
moodler 3e28f9bc07 Various new strings, mostly capability names 2006-09-24 13:51:06 +00:00
skodak d4121c5605 one more sanity check for role overrides 2006-09-24 13:34:52 +00:00
moodler b144aaa4dc Add some more checking of input and permissions 2006-09-24 13:30:43 +00:00
moodler 11ac79ff0e Extend the require_login in require_capability a bit 2006-09-24 13:15:13 +00:00
skodak 6df3c7df7a user upload cap renamed to moodle/site:uploadusers 2006-09-24 12:54:53 +00:00
skodak cc891abe88 uploading of users has new capability 'moodle/user:upload' now also with admin block integrated 2006-09-24 12:31:49 +00:00
moodler 0c19750c72 Fixed a notice 2006-09-24 12:13:58 +00:00
moodler df206ef87f Corrected accidental language-changing because of lang in POST 2006-09-24 12:07:44 +00:00
moodler bf7288a2c0 Simplified a bit and removed a notice 2006-09-24 12:02:00 +00:00
skodak 856f7cb7e6 do not display guest when browsing users 2006-09-24 11:58:28 +00:00
skodak 38d2d43b01 roles fixed in user browsing page; admin section now accepts array of capabilities for external and settings pages 2006-09-24 11:55:11 +00:00
moodler f365252121 Handle site-level block names in capability settings too 2006-09-24 11:32:11 +00:00
moodler 2c8766dff2 Function stub, as suggestion towards MDL-6678 2006-09-24 11:11:40 +00:00
moodler 9ac93e31f1 Added some strings describing risks 2006-09-24 10:47:27 +00:00
stronk7 f46e2c8cbc Changed one LIMIT to a cross-db WHERE clause 2006-09-24 09:59:25 +00:00
moodler ff439b30af Added styles to the role editing/viewing list, as well as some links and tooltips 2006-09-24 09:44:51 +00:00
stronk7 b0ec41af8a Prevent Unique Keys generation. Instead use unique indexes at DB level.
With this, all we'll have are PRIMARY KEYS + INDEXES, that are pretty
well supported by ADODB MetaXXX functions.
Both Unique and Foreign Keys will be used once ADODB support them and
the relational mode was enforced.
2006-09-24 09:38:56 +00:00
moodler d13c1aed4a When not editing, then let's disable the radio buttons 2006-09-24 09:02:30 +00:00
stronk7 70a8ac6666 Given one xmldb_field, finds its name in DB 2006-09-24 08:26:24 +00:00
skodak 189bb4a628 fixed warning in hotpot lib when running cron from commandline 2006-09-24 07:38:15 +00:00
skodak 25d8040ec5 added trustbitmask column to user table 2006-09-24 07:32:49 +00:00
mjollnir_ 931ab7be83 fixes to activity stats processing for dailies 2006-09-24 07:15:22 +00:00
mjollnir_ 96edb010da more work on stats reports ... 2006-09-24 07:13:33 +00:00
moodler be91f51dab Make sure buttons don't wrap 2006-09-24 06:54:52 +00:00
moodler 975211bb0a Removed the "then" string, no need for it 2006-09-24 06:47:53 +00:00
moodler c7731ab5e2 Fixed notice() so that you can pass a course if you want 2006-09-24 06:21:15 +00:00
moodler 978abb4291 Removed some possible notices 2006-09-24 06:06:24 +00:00
moodler 13e21433a4 Better errors 2006-09-24 05:53:45 +00:00
moodler b6e7b09c7b Tidied up error reporting in course overview 2006-09-24 04:29:12 +00:00
mjollnir_ 11887b6d5e more fixing on reports 2006-09-24 03:15:52 +00:00
stronk7 dcf9c14c2b Typo 2006-09-24 00:13:22 +00:00
stronk7 3fb145e061 Change slighty the tests... 2006-09-24 00:11:53 +00:00
stronk7 19c8321e07 Now Oracle supports the first part of alter table alter column statements 2006-09-24 00:02:34 +00:00
stronk7 27bb1be29d Inserted two more test 2006-09-24 00:01:02 +00:00
mjollnir_ 32baf47939 accidently left in debugging stuff in stats reports 2006-09-23 21:43:11 +00:00
stronk7 05002031d5 adding some more tests 2006-09-23 21:30:36 +00:00
stronk7 1934b52236 adding support for some more options 2006-09-23 21:29:31 +00:00
stronk7 8e895ae5c7 mark rename table as not implemented 2006-09-23 21:28:16 +00:00
stronk7 0e9e0b3bb3 adding support for alter columns
(not finished yet)
2006-09-23 21:24:51 +00:00
stronk7 f8c485b071 mysql alter table alter column is "modify column" 2006-09-23 21:23:05 +00:00
stronk7 c282203d84 mssql doesn't support default clause in alter table alter column 2006-09-23 21:22:02 +00:00
mark-nielsen 31b50f6442 Fix for MDL-6628: the lesson object was not being cloned correctly. 2006-09-23 19:57:35 +00:00
mark-nielsen 6707a280a9 Moved endofbranch redirect up to avoid double printing of messages. 2006-09-23 19:32:25 +00:00
mark-nielsen c7c404b964 Fixed alignment issue in IE 2006-09-23 18:51:49 +00:00
mark-nielsen 563106f0a8 Fixed branch table buttons to work with JavaScript turned off. This fix lead to some minor changes to the button output, but hopefully simplified things.
Also, removed .hidden-label class because it was no longer in use due to label fixes earlier.
2006-09-23 18:45:59 +00:00
moodler 3e1e2b6968 Putting the files back to plain JS files 2006-09-23 15:11:37 +00:00
moodler 3febabd888 Use AJAX for weekly formats too. HOWEVER, there are some remaining
bugs with it so for now it only works in DEBUG_DEVELOPER mode
2006-09-23 14:38:01 +00:00
moodler 354e11303e Just tidying up the code 2006-09-23 14:34:59 +00:00
moodler 9bb7417805 Further centralising of course AJAX and cleanup of code formatting, names etc 2006-09-23 14:03:48 +00:00
moodler 75dc25855c Now using the generic course/rest.php instead of the local commands.php 2006-09-23 13:24:10 +00:00
moodler b205403813 Moved the REST interface for course modification from
course/format/topics/commands.php to a more generic place
2006-09-23 13:23:18 +00:00
moodler 748390cd30 be a bit more forgiving of lang parameter 2006-09-23 13:14:25 +00:00
moodler 350b5fb6c8 Strip all tags from role names before use 2006-09-23 12:57:48 +00:00
skodak ece4945bd2 role sortorder column now has unique index; new function get_all_roles() that returns all roles with correct sort 2006-09-23 12:51:00 +00:00
moodler 65b0c132ed When getting lists of roles, put role names through format_string
(ie for multilang filter)
2006-09-23 12:46:53 +00:00
mjollnir_ 67f3be726e fixes to the stats processing. Credit: Geoff Cant <geoff@catalyst.net.nz> (sql ninja) 2006-09-23 12:42:35 +00:00
mjollnir_ afc97d5349 fixing reports 2006-09-23 12:10:42 +00:00
mjollnir_ 0dd5bf422b more work on stats - reports this time 2006-09-23 12:08:46 +00:00
skodak 8420bee94e towards unique role sortorder - fixes for create_role() and new delete_role() 2006-09-23 10:43:24 +00:00
mjollnir_ 09cf1c9b55 follow correct naming convention when fetching legacy teacher role 2006-09-23 09:47:11 +00:00
skodak 7eb0b60a1f debugging and error reporting level fixes and improvements MDL-6671 2006-09-23 09:38:39 +00:00
stronk7 b8547480b7 Moving a bunch of database module fields to NULLable
(http://docs.moodle.org/en/XMLDB_Problems#NOT_NULL_fields_using_a_DEFAULT_.27.27_clause)
2006-09-23 09:37:53 +00:00
mjollnir_ 88d7e6218e fixing typo in stats upgrade I just made 2006-09-23 09:02:37 +00:00
mjollnir_ 0f259f63d9 lots of fixes to stats, more to come 2006-09-23 08:52:12 +00:00
moodler c1ddecab49 Rewrote much of this to add
- more validation of incoming data
   - error logging in the PHP log

I've tested every function and it works for me without errors.
2006-09-23 07:52:09 +00:00
moodler 9991d157ea Further fixes for MDL-6601 ... that should be complete now. 2006-09-23 06:10:48 +00:00
moodler ea9fda2f88 Automatic installer.php lang files by installer_builder (20060923) 2006-09-23 02:43:18 +00:00
mark-nielsen 9b5274b96d Fixed a label 2006-09-23 01:01:14 +00:00
skodak 16e2e2f394 fixed error in fetch_context_capabilities() when no local capabilities defined in context 2006-09-22 21:31:19 +00:00
skodak adbffcb9fe role ui minor cleanup 2006-09-22 21:17:43 +00:00
skodak 305ef971fc role assign and override code fixes + other minor changes 2006-09-22 20:09:47 +00:00
stronk7 2a2905fb6f Now using ADOdb standard transactions. Some day, we should switch to
Smart Transactions (http://phplens.com/adodb/tutorial.smart.transactions.html)
as they autodetect errors and are nestable and easier to write
2006-09-22 20:05:44 +00:00
skodak a17c57b5e3 Partially reversed patch for http://tracker.moodle.org/browse/MDL-5136, caching of filtered uploaded html files is disabled now MDL-5136 , Eloy is changing the column type in cache_text back to TEXT. 2006-09-22 18:08:53 +00:00
moodler eaa79489a8 First pass at a fix for MDL-6601 (delete contexts when deleting course) 2006-09-22 17:49:45 +00:00
moodler 78850d9e7d Fixing MDL-6636, reference to file that is now gone (site.html) 2006-09-22 17:27:19 +00:00
stronk7 0700134df5 Detect Oracle Database Encoding in order to set CFG->unicodedb properly 2006-09-22 17:23:09 +00:00
moodler 721b750ff4 Replacing some old strings I should not have deleted MDL-6645 2006-09-22 17:12:09 +00:00
ethem 37f9ca4e8f Some cleanup for cron. 2006-09-22 16:19:53 +00:00
moodler bc492d185c Fixes to user new Roles 2006-09-22 16:19:24 +00:00
stronk7 4feeadeb59 Minor fix to be able to drop tables without prefix properly (adodb_log) 2006-09-22 16:16:48 +00:00
moodler 22003adac5 SOme changes for Roles 2006-09-22 16:11:52 +00:00
moodler 96fc0072b4 Removed some old debugging 2006-09-22 15:54:03 +00:00
stronk7 37a7859855 mini-bump 2006-09-22 15:46:40 +00:00
stronk7 0e1412cea5 Now cache_text->formattedtext is a longtext again.
(both PG and the UTF8 migration script were
working with it as text, so impact should be minimal)
2006-09-22 15:43:42 +00:00
ethem f0f8e34c5d isguest() to has_capability('moodle/legacy:guest', get_context_instance(CONTEXT_SYSTEM, SITEID), $USER->id, false) 2006-09-22 15:31:04 +00:00
urs_hunkler 65e2d1f0df 'merged from 1.6 - reduced the distance above the footer from 100px to 40px' 2006-09-22 15:19:38 +00:00
nfreear fd2339cfd6 Fixes bug MDL-6548 "blog_menu block should use lists"
- also blocks: rss_client, admin_bookmark.
 - also fixed &/&amp; validation error in rss_client footer.
2006-09-22 15:15:48 +00:00
ethem 778326bef8 Some cleanup. 2006-09-22 14:04:11 +00:00
ethem 33f9bffe90 Last commit for enrol_student().
enrol_student($order->userid, $order->courseid, $timestart, $timeend, 'manual')
to
role_assign($role->id, $user->id, 0, $context->id, $timestart, $timeend, 0, 'manual'))
2006-09-22 13:50:10 +00:00
ethem fddf3cfb56 + Changed deprecated enrol_student() function to enrol_into_course().
+ No need extra check: if (!empty($CFG->enrol_mailstudents)):  enrol_into_course calls email_welcome_message_to_user() internally.
2006-09-22 13:33:37 +00:00
moodler d7e8ffebbf Merged fixes from 1.6 2006-09-22 13:27:56 +00:00
moodler e2183037b3 Fixed a typo for enrol_into_course(), thanks Ethem 2006-09-22 13:16:32 +00:00
ethem b001dec454 No need get_student_courses() and get_teacher_courses() anymore. 2006-09-22 13:11:49 +00:00
ethem 16dbf42695 Changed deprecated enrol_student() function to enrol_into_course(). 2006-09-22 12:18:58 +00:00
mjollnir_ 0e3404aabd fixing stats_get_course_users. my brain hurts 2006-09-22 11:34:25 +00:00
dwoolhead 12490fc2b3 Prevent 'Warning: Invalid argument supplied for foreach() in ...' for get_courses_page function when there are no courses in the required category. 2006-09-22 11:15:10 +00:00
mjollnir_ b4713311d4 set config statsupgraded during install so we don't try upgrade later 2006-09-22 11:09:15 +00:00
sam_marshall ecfdc901fc Ooops. The following-HTTP-standard absolute-path redirect thing didn't work with URLs that begin / (i.e. it couldn't redirect to /moodle/whatever although it was fine redirecting to http://thing/moodle or to plain old whatever/something.) Fixed. 2006-09-22 10:48:37 +00:00
mjollnir_ f5aa20162c added missing indexes in stats upgrade, fixed discrepency between stattype enrolment or enrolments 2006-09-22 10:43:04 +00:00
mjollnir_ 1282edc826 fixing up the stats table enums 2006-09-22 10:18:33 +00:00
stronk7 d4b86c90dc Fixed bug about all chars being created with length 255. Penny found this! 2006-09-22 10:15:51 +00:00
mjollnir_ bd2b8ddecd moved call to upgrade stats until after all the roles stuff has been set up 2006-09-22 10:00:34 +00:00
moodler 6e208cd2fe FIxed up longtimenosee processing in cron 2006-09-22 09:54:43 +00:00
stronk7 373dc4406b Killing some not needed references 2006-09-22 09:54:02 +00:00
moodler cc7c0592e4 Fixes for get_users_longtimenosee 2006-09-22 09:49:26 +00:00
vyshane 938c039e52 Suggested changes from MDL-6654 2006-09-22 09:23:50 +00:00
vyshane 66b0b1042b Added comment regarding $isteacher being deprecated in print_recent_activity() 2006-09-22 09:11:46 +00:00
mjollnir_ 504e6fd41f proper install.xml schema for new stats tables 2006-09-22 08:58:40 +00:00
toyomoyo 65c6fd8b2d backup changes for roles 2006-09-22 08:56:25 +00:00
urs_hunkler 9d147a038f 'added 16px height to the commands to correct the wrapping issue in the sideblock header' 2006-09-22 07:51:23 +00:00
vyshane 242a445fdf Fix for MDL-6654 2006-09-22 07:08:43 +00:00
vyshane 1febf1a77a Replaced isteacher & co. Fixed some issues. 2006-09-22 06:29:40 +00:00
moodler a19beac32e new tags for new functions 2006-09-22 06:27:51 +00:00
moodler 9f73cdabf7 renamed field in context table 2006-09-22 06:21:48 +00:00
moodler aad2ba95d1 Upgrading table to rename the context->aggregatelevel field which was
really bugging me.   Code should be a little bit more readable now.

Apologies to those with non-core code already using this field.
2006-09-22 06:19:32 +00:00
moodler b988fe5f94 DOn't terminate upgrade if stats didn't work 2006-09-22 06:10:42 +00:00
mjollnir_ 20c59467a5 schema files for stats changes (install.xml still to come). Credit: Nigel McNie <nigel@catalyst.net.nz> 2006-09-22 06:05:07 +00:00
moodler 82396e5b1f Improved error messages for role_assign to be more helpful 2006-09-22 05:23:59 +00:00
moodler 9d829c681d Removing some notices 2006-09-22 05:17:57 +00:00
moodler 6ed4afb351 Merged support for personal dictionaries in spellchecker 2006-09-22 04:38:32 +00:00
moodler e84ea106f9 function_names() might not like the egg 2006-09-22 03:49:49 +00:00
moodler 1a030f5112 Fix for MDL-6319, to fix opposite-state links for unread tracking settings 2006-09-22 03:36:31 +00:00
vyshane 7ce56c1282 Removed mod/workshop:view 2006-09-22 03:28:56 +00:00
mjollnir_ 29bbc6e730 As well as a credit to Nigel for the stats schema upgrade and data migration, the previous commit here should have had a HUGE credit to Geoff Cant <geoff@catalyst.net.nz> for NINJA SQL 2006-09-22 03:15:52 +00:00
vyshane 73ebd5e23a Removed mod/wiki:view 2006-09-22 03:14:08 +00:00
vyshane af94faf492 Removed mod/scorm:view 2006-09-22 03:07:29 +00:00
vyshane b1e06f5fa0 Removed mod/resource:view 2006-09-22 03:05:46 +00:00
vyshane 94bcea7983 Removed mod/lesson:view 2006-09-22 02:58:39 +00:00
mjollnir_ e5d83d6fc1 stats rework: 1. upgrade schema and move data to new schema. (credit: Nigel McNie <nigel@catalyst.net.nz>). 2. Stats processing uses new schema. THIS NEEDS TESTING ON MYSQL. Still to do: schema files (install.xml,*.sql still to be committed), reports to use new schema. 2006-09-22 02:54:21 +00:00
vyshane 7949f21b5f Removed 'mod/glossary:view' capability 2006-09-22 02:52:48 +00:00
moodler 2eb662d261 A real easter egg ;-) 2006-09-22 02:28:13 +00:00
toyomoyo ef61c5f964 fixed a bug, override in user should not record userid as a capability 2006-09-22 02:17:59 +00:00
moodler 35cf8b7938 Some easter eggs :-) 2006-09-22 02:11:00 +00:00
toyomoyo c58adde069 fixing bogus function calls 2006-09-22 01:49:23 +00:00
toyomoyo 5b5781f4f5 some new functions to help backuo 2006-09-22 01:46:45 +00:00
toyomoyo ab1e2556ba code to support roles (roleassignments and roleoverrides) for backup in all 4 roles course, mod, block, userid contexts. not working yet 2006-09-22 01:35:35 +00:00
moodler ac4c51bef5 Make it easier to get out of a switched role in case viewing is not allowed 2006-09-22 01:29:11 +00:00
mits e8928a65fd Changed breadcrumb and blog tag color. 2006-09-22 01:23:49 +00:00
moodler 988ad08450 Use role sortorder when getting role lists 2006-09-22 01:21:01 +00:00
skodak 0c88b9acf7 improved coding style 2006-09-21 23:15:45 +00:00
skodak f3245d0952 improved coding style 2006-09-21 23:08:58 +00:00
skodak fa1fbbdc40 minor allignment change in role list 2006-09-21 23:00:48 +00:00
stronk7 cac97946d6 adjusting breadcrumb separator... 2006-09-21 23:00:45 +00:00
skodak b5959f3071 partial rewrite of role manage script, improved notice_yesno(), other minor fixes and changes; I will work on assign and overide tomorrow ;-) 2006-09-21 22:34:45 +00:00
cap2501 e78a3505c5 MDL-6544
resolved issue by passing strings into new main.portal.strings for delocalization.
2006-09-21 18:38:54 +00:00
stronk7 94e65cc36c Now all the insert_record() and update_record() calls under
Oracle DB use the oracle_dirty_hack() function to transform
empty strings into something different ' ' in order to avoid
the problems with the empty=NULL stupid norm of Oracle.

With this change, Oracle installation works completely.

Now we need to implement everywhere the opposite hack: transforming
all those ' ' (1 whitespace) back to the '' (empty string). Working
on it now.
2006-09-21 18:30:50 +00:00
stronk7 85f101fa26 SQL ANDs mus be, always, "AND" :-P 2006-09-21 17:18:56 +00:00
moodler 669d3ecd7c Some fixes to move Javascript files to PHP script, so that we can
tweak the contents better.

This was supposed to fix MDL-6544 but it didn't work.  Checking it in
because it will help a fix later.
2006-09-21 17:17:00 +00:00
stronk7 d7d05cf2f3 SQL ORs must be, always, "OR" 2006-09-21 17:09:28 +00:00
stronk7 7f5f956cf5 Allow to specify NULL clauses for some generators, mainly because
some mssql drivers use to create everything as NOT NULL by default.
2006-09-21 17:04:28 +00:00
moodler f098f122ca New string , used in registering 2006-09-21 16:49:15 +00:00
moodler f8b0d22a5e Fixes to make registering work ;-) 2006-09-21 16:48:46 +00:00
moodler 67171ec800 Fixed typo in capability name 2006-09-21 16:46:10 +00:00
skodak f59208a745 fixed typos in capabiltiy names 2006-09-21 16:27:37 +00:00
moodler 8cb5bc2b26 People under switched roles should not be able to unenrol 2006-09-21 16:11:31 +00:00
moodler 861fdcaa28 Changing defaults for role assigning (teachers, coursecreators allowed) 2006-09-21 16:02:39 +00:00
moodler 2d07587b4c Improvements to switchroles
1) You can have separate switchroles active in every course

2) Admins get a better view (doanything is supressed when switchroles active)
2006-09-21 15:58:59 +00:00
sam_marshall fd2fff1e24 Changed the redirect() version with no message (that sends a redirect header) so that it sends an absolute URL as per HTTP spec, even if the argument to the function is a relative URL. 2006-09-21 15:13:27 +00:00
moodler 91ea292e65 Changed the login info string when a user is using 'switch roles' 2006-09-21 14:42:45 +00:00
moodler 09edb3794b Fixed a capability name typo 2006-09-21 14:07:27 +00:00
moodler b32c8ddadd Fixed typos in capability names 2006-09-21 14:05:58 +00:00
moodler 0cef8a37fa Changed logic slightly in switchrole_form 2006-09-21 14:04:32 +00:00
moodler 0c05b71f58 Fix typo 2006-09-21 13:11:05 +00:00
sam_marshall a82e9bc3bb Added feature to blocks (and restorelib) so that blocks get a method call (default does nothing) after they are restored. This allows blocks to change their settings if necessary in respect of the new course roll-forward 'restore and change start date' feature that Al implemented recently. The core blocks happen not to store dates anyway so don't need this, but contributed blocks may well do. 2006-09-21 12:07:15 +00:00
stronk7 db33348f53 When journal to assignment migration is performed, journal
upgrade hasn't been upgraded yet so the journal_entries->comment
field is still called "comment"
2006-09-21 10:04:49 +00:00
stronk7 0bc94c9990 Last reserved word is out now!
journal_entries->comment to entrycomment

Only 2 tables have reserved names but they aren't
a problem if we force $CFG->prefix always
2006-09-21 09:54:00 +00:00
stronk7 ea6432fede Moved assignment_submission->comment to submissioncomment
(because comment is DB reserved word)
2006-09-21 09:35:20 +00:00
moodler 1888245ee6 More strings 2006-09-21 09:16:56 +00:00
moodler 3a52e764e4 New "Switch Role" functionality to replace the old "Student view".
It's not well-tested yet and probably doesn't quite work.  I will keep debugging this tonight from home.
2006-09-21 09:16:41 +00:00
toyomoyo 01e52ac70a changes to backups (where the roles info are stored) 2006-09-21 09:09:16 +00:00
vyshane 9222e72167 Removed capability mod/forum:viewforum. We will use moodle/course:viewhiddenactivities and hide/unhide forums instead. 2006-09-21 08:32:05 +00:00
vyshane 986dc51c00 Removed string for mod/forum:viewforum 2006-09-21 08:30:59 +00:00
skodak fd98800ea2 another admin ui cleanup 2006-09-21 08:28:25 +00:00
skodak 2ce38b70d8 capability related changes in new admin tree 2006-09-21 08:18:14 +00:00
skodak db51ddc52e old admin configuration cleanup - MDL-6595 MDL-6449 MDL-6447 2006-09-21 08:05:50 +00:00
stronk7 0ce61c841f Force ANSI NULLs under mssql. It's not critical to work
but it avoids some problems when changing nullability
of fields in the future.
2006-09-21 07:44:56 +00:00
moodler 20dd4cf5a1 Added new capability to switch roles (replaces old student view) 2006-09-21 07:44:53 +00:00
vyshane 2b15a08dc9 Added some notes for future reference 2006-09-21 07:40:24 +00:00
moodler 1c1e7af4e2 FIxed defaults for frontpage format 2006-09-21 07:38:13 +00:00
toyomoyo 4929302769 adding roles support for backups 2006-09-21 06:57:14 +00:00
skodak 2464c592e3 removed moodle specific debug messages from file.php 2006-09-21 06:38:27 +00:00
vyshane 49a0ba9438 Cleanups in view.php. Also moved logging of a forum view so that the event is not logged if the user does not have permission to view discussions in a forum (user never sees the discussions, so not counted as a view).
Tidy up of error display in discuss.php for when a user does not have permission to view the discussion.
2006-09-21 05:42:35 +00:00
vyshane c095178c84 Added message string for when a user does not have permissions to view forum discussions in a forum. 2006-09-21 05:39:17 +00:00
vyshane 9ae965d379 Removed column ratings from data table 2006-09-21 04:10:36 +00:00
toyomoyo e38f38c326 fix for MDL-6571, added get_roles_on_exact_context() for backup 2006-09-21 03:21:33 +00:00
moodler 2aab9d4000 Automatic installer.php lang files by installer_builder (20060921) 2006-09-21 02:44:10 +00:00
toyomoyo e959a34b48 fixing syntex errors 2006-09-21 02:03:39 +00:00
toyomoyo a4a877d890 trying to add some role support, not sure things are at the right place yet. 2006-09-21 01:56:59 +00:00
mjollnir_ a3081bfdba Flatfile enrolment plugin upgraded to new use roles. Credit: Alastair Pharo, new Catalyst ninja ;) <alastair@catalyst.net.nz> 2006-09-21 00:04:43 +00:00
stronk7 db8bd7a66f Now XMLDB installation is enabled! Old mysql.php and postgres7.php can
continue being used as previously until we finish all the required
DDL functions.

Also, this implies that *.sql files aren't needed anymore. Now all we have to do
is to maintain the install.xml files from the editor.
2006-09-20 22:36:21 +00:00
stronk7 8e6a09bd2b Updated comment... :-/ 2006-09-20 22:03:45 +00:00
stronk7 1b25502133 Forcing ADODB_FETCH_ASSOC explicity now for any DB. 2006-09-20 22:00:49 +00:00
skodak f50c2b4ee0 fix for old email confirmation - spotted by Dirk Grunwald; merged from MOODLE_16_STABLE 2006-09-20 21:48:33 +00:00
skodak d43d749a1b forum throttling capability meaning reversed 2006-09-20 21:25:51 +00:00
skodak eef868d17d major whitespace cleanup - fixed trailng whitespace in new files and admin area 2006-09-20 21:00:45 +00:00
skodak 6124048972 major whitespace cleanup - fixed tabs 2006-09-20 20:31:09 +00:00
skodak c78f13f8dc major whitespace cleanup - fixed \r line-ending 2006-09-20 20:16:10 +00:00
skodak 03f5a0f87c major whitespace cleanup - fixed \r\n line-ending 2006-09-20 19:46:52 +00:00
skodak 6c450d9f7e test commit for lineending cleanup 2006-09-20 19:20:34 +00:00
koenr 6e0d4e854a Adding Slovak Koruna MDL-6604 2006-09-20 19:06:57 +00:00
skodak daa588aa52 merged changes in moodlelib.php from MOODLE_16_STABLE 2006-09-20 18:40:22 +00:00
vyshane 36acdd6df9 Updated to reflect changes to data table 2006-09-20 18:08:30 +00:00
skodak ba4e0b059d fixed warning caused by missing fields in $course; tweaked mime info for firefox when forcing download - it should use default system mime associations which should be safe in case of firefox. 2006-09-20 17:51:59 +00:00
vyshane 741c4d0b04 Upgrade to roles code for data module. 2006-09-20 17:46:20 +00:00
tjhunt e7d57d9e6c MDL-6380 - added required include to make blocks work on the quiz pages. 2006-09-20 17:22:38 +00:00
tjhunt 15995c4ab6 Fix typos in string concatenation. 2006-09-20 17:01:19 +00:00
vyshane 7f2586640e Upgrade to roles code, as well as restoring from 1.6 on a 1.7 install code. 2006-09-20 16:57:01 +00:00
vyshane 2a1b4af377 Added course module groupmodes in convertion to roles logic 2006-09-20 16:54:50 +00:00
tjhunt df44078448 Another typo.
A pity, I would love to know what a delect_records function did ;-)
2006-09-20 16:36:40 +00:00
stronk7 a6e0172869 renaming question_dataset_items->number to itemnumber (reserved word) and
question->commentarytext to question->generalfeedback
2006-09-20 16:22:19 +00:00
tjhunt 9fd73f0c26 Fixed typo CONTEXT_COUSE -> CONTEXT_COURSE 2006-09-20 16:19:57 +00:00
tjhunt 40cc892b6a Fix bug with getting the capability. 2006-09-20 16:17:27 +00:00
sam_marshall 027d048574 Update to static JS - 'hitem' hidden fields now optional for lockoptions. 2006-09-20 15:04:57 +00:00
skodak 43a8ceeaf1 fixed missing ; 2006-09-20 15:04:01 +00:00
ikawhero d096e0d8b5 Bump for new tables. See MDL-474 2006-09-20 14:18:37 +00:00
ikawhero adecf1c475 Adding tables for customisable user profile fields. See MDL-474 2006-09-20 14:17:21 +00:00
martinlanghoff d7e901c669 dmlib: changed array access to keyed instead of ordinal.
This supports the move to ADODB_FETCH_ASSOC instead of ADODB_FETCH_BOTH.
see:
http://docs.moodle.org/en/XMLDB_Problems#ADOdb_fetch_mode_.28ASSOC.2C_NUM_and_BOTH.29

Author: Luke Hudson <luke@catalyst.net.nz>
2006-09-20 11:26:47 +00:00
koenr 0647422475 updated Guinea MDL-3909 2006-09-20 09:33:11 +00:00
toyomoyo dc5586907d replacing deprecated calls and references to capability calls 2006-09-20 09:00:04 +00:00
vyshane 759ac72de1 Added new function function fetch_context_independent_capabilities(). Modified fetch_context_capabilities() to use the former.
Fixed get_roles_used_in_context() sql query. r.sortorder must be selected if it is to be used in an ORDER BY clause.
2006-09-20 08:30:49 +00:00
tjhunt 1da5a36294 More capability name typos. 2006-09-20 08:01:59 +00:00
urs_hunkler c954040189 'updated CSS for the breadcrumb and calendar arrows' 2006-09-20 07:40:55 +00:00
skodak 1d126f4fe4 mostly removed old isadmin() calls 2006-09-20 06:59:32 +00:00
moodler 54a7469271 Removed some obsolete stuff 2006-09-20 06:52:54 +00:00
skodak 8521d83aff role_context_capabilities should handle current context too and role override simply use parent context 2006-09-20 06:24:55 +00:00
vinkmar bcaa8d9322 admin page cleanup -- added missing strings 2006-09-20 04:48:39 +00:00
vinkmar 43ba7a1388 admin page cleanup - added most missing strings 2006-09-20 04:47:57 +00:00
vyshane 6adc1e975d Added more overrides during restore process for forums from 1.6. Plus some bug fixes. 2006-09-20 02:59:43 +00:00
moodler a914213a45 Automatic installer.php lang files by installer_builder (20060920) 2006-09-20 02:59:20 +00:00
vyshane 689b19297f Fixed notice 2006-09-20 02:47:57 +00:00
moodler c4381ef5d2 FIxed a bug where $context had not been defined in enrol_into_course 2006-09-20 02:19:08 +00:00
moodler b0270f84eb Added unset_config as a companion to set_config 2006-09-20 02:17:27 +00:00
moodler 7f7cacdf4e Made the debugging message a bit less passive 2006-09-20 01:52:49 +00:00
tjhunt f3fb11f378 And another typo in capability name. 2006-09-19 22:58:12 +00:00
tjhunt df5e4d3106 Another typo in capability name. 2006-09-19 22:57:38 +00:00
tjhunt a8a7300acc In debug mode, warn people if they are asking for an unknown capability. 2006-09-19 22:57:17 +00:00
tjhunt 8cd402f900 Typo in capability name. 2006-09-19 22:35:40 +00:00
tjhunt 6fceebea95 Always print the question list, so you can add questions to a quiz, even if you are not allowed to edit them. 2006-09-19 22:35:02 +00:00
tjhunt 3fccd7fa8d Typo in capability names. You do not want to know how long I had to stare at the code to spot that! 2006-09-19 22:31:13 +00:00
koenr f2137ac2a5 fixed MDL-6551 2006-09-19 22:14:57 +00:00
tjhunt f866df1c4f allowassign.php was submitting to allowoverride.php 2006-09-19 21:53:37 +00:00
tjhunt 15677ae4a5 Fix JavaScript problem reported in this thread: http://moodle.org/mod/forum/discuss.php?d=54432. Merged from MOODLE_16_STABLE. 2006-09-19 21:48:16 +00:00
koenr 28efcc8b63 fix for mdl-3909
cleaned up the file completely
2006-09-19 21:45:13 +00:00
skodak a14049f107 metacourse role assignment fixes 2006-09-19 20:39:55 +00:00
skodak 681729b16e various minor Role UI fixes 2006-09-19 17:34:29 +00:00
moodler 946cbe7029 Added some docs 2006-09-19 16:38:53 +00:00
moodler 6051c68d4b Deleted the old students-based function and created the
new-style setup_enrolments() function that uses roles
to do the tasks required when a user logs in.

Other enrolment plugins should use this as an example/guide

The sync parts of this plugin are not yet fixed.
2006-09-19 16:29:43 +00:00
moodler 33f857405b Slight extensions to get_my_courses() API to make it more useful in general 2006-09-19 14:23:43 +00:00
toyomoyo 9ce384ba1e relacing deprecated functions with capability checks 2006-09-19 14:16:40 +00:00
moodler 0dde27bb52 More efficient get_my_courses() 2006-09-19 14:14:32 +00:00
tjhunt a4514d91de Renamed new commentary feature to 'general feedback'. 2006-09-19 13:35:42 +00:00
nfreear 57100a9098 Fixes bug MDL-6360 "Resizable image in breadcrumb trail..."
- files block_search_forums.php, calendar/lib.php, lang/en_utf8/access.php, weblib.php, theme/standard/config.php, styles_color.css
2006-09-19 11:36:21 +00:00
tjhunt 717cfb0a7b Rename column question_dataset_items->number to itemnumber, to avoid reserved word. 2006-09-19 10:56:00 +00:00
skodak b22c03ce99 RISK_ADMIN replaced with RISK_CONFIG, part 2. 2006-09-19 10:26:35 +00:00
toyomoyo 9c37662f22 replacing deprecated funciton calls with capability calls 2006-09-19 09:16:24 +00:00
vyshane 285f94f506 Few small fixes 2006-09-19 08:16:26 +00:00
vyshane f2269f311d Typos 2006-09-19 08:10:46 +00:00
skodak 45b9781ed4 fixed missing shortname pg upgrade code, sorry 2006-09-19 07:35:48 +00:00
skodak a6b02b652b RISK_ADMIN replaced with RISK_CONFIG 2006-09-19 07:33:22 +00:00
vyshane 0fd332a811 More typos... 2006-09-19 07:16:04 +00:00
vyshane 5ddc81b973 Fixed typo 2006-09-19 07:13:57 +00:00
moodler 3f5edbdfa3 If the search and replace affected course->modinfo then courses may not work,
so clear the cache
2006-09-19 07:08:19 +00:00
skodak 92ab23875a fixed missing dot 2006-09-19 06:38:17 +00:00
toyomoyo 9fe3be1b01 fixed a bug where wrong parameters is passed 2006-09-19 06:36:54 +00:00
skodak b79da3ac68 moodle/course:managemetacourse is now singular 2006-09-19 06:35:52 +00:00
mark-nielsen 096a664c01 Attempted to improve the display of the table in collapsed view 2006-09-19 05:57:57 +00:00
mark-nielsen 7c03355aab Fix for the instance mentioned in MDL-3058 2006-09-19 05:11:57 +00:00
mark-nielsen ef37bd6851 Corrected a lang entry for better translation 2006-09-19 05:10:24 +00:00
moodler b725019e3f Merged fix related to MDL-6020 2006-09-19 04:53:56 +00:00
mark-nielsen 4bea0828a2 Got ahead of myself, fixed by bug fix 2006-09-19 04:49:45 +00:00
mark-nielsen 51c870d253 Notice fix in report for numerical question types 2006-09-19 04:48:13 +00:00
mark-nielsen 9ae4e9f5de Fix in addpage.php when one deletes all pages in a lesson then adds a new one
Fix numerical questions were not displaying the student's answer in the feedback
2006-09-19 04:45:18 +00:00
toyomoyo 5f10f77505 took out a comment, for proper debugging use the new debugging() function 2006-09-19 04:31:36 +00:00
mark-nielsen b14123498f Saw several problems with lesson_choose_from_menu, so finally replaced its use with choose_from_menu in lib/weblib.php 2006-09-19 04:06:32 +00:00
mark-nielsen f08769317f Removed hard-coded strings and fixed labels 2006-09-19 03:47:49 +00:00
mark-nielsen 63d4c906c7 Removed a hard-coded string and added PHPdoc comments for the page 2006-09-19 02:54:57 +00:00
mark-nielsen 7adb975062 removed some unecessary comments 2006-09-19 02:48:29 +00:00
toyomoyo 2d9965e1dc function should be looking up parent contexts too 2006-09-19 02:47:55 +00:00
mark-nielsen 2817bc1aed Fixed a bug when detecting a user as eligible for posting their name for high scores 2006-09-19 02:41:10 +00:00
mark-nielsen 8271e5cec8 Fixed alignment problem with the buttons for password protected lessons 2006-09-19 02:29:42 +00:00
toyomoyo d76a5a7fed replacing references to user_* tables 2006-09-19 01:44:33 +00:00
tomflannaghan f33beb0b3d Preset added. This is a basic javascript based preset. 2006-09-19 01:21:13 +00:00
skodak 21b6db6eff added capabilty risks into access.php and GUI for define role and override; minor fixes for capability types in forum 2006-09-18 21:32:49 +00:00
skodak 31f267963a MDL-6568 shortname added to roles 2006-09-18 17:40:22 +00:00
ethem 7dbc351e11 unenrol_student() -> role_unassign() 2006-09-18 17:32:43 +00:00
vyshane 20821a1266 Added new capabilities, renamed mod/data:readentry to mod/data:viewentry to make capability name more consistent with the rest of moodle. 2006-09-18 13:46:09 +00:00
moodler a229726a11 Fixing debugging 2006-09-18 13:36:17 +00:00
moodler 779ef7fc0b Fixed up some more debug statements 2006-09-18 13:26:58 +00:00
moodler 0e1cc9070b Fixed a some debugging statements 2006-09-18 13:24:45 +00:00
vyshane e51e3fcb34 Fixed notice 2006-09-18 12:48:00 +00:00
toyomoyo 38079c83eb removing get_creators(), no more reference to the function 2006-09-18 12:04:16 +00:00
urs_hunkler aaf281d1eb 'merged from 1.6 - MDL-6020 - CSS changes to align text beside images' 2006-09-18 12:01:16 +00:00
toyomoyo 492e507f7b no more refernece to remove_creator() function 2006-09-18 11:55:04 +00:00
tomflannaghan b8fb348277 Adds Javascript Support for the presets. 2006-09-18 11:45:12 +00:00
tomflannaghan d6ef0526f3 <?php // $Id: preset.php,v 1.5 2006/08/30 09:17:40 skodak Exp $
/* Preset Menu
 *
 * This is the page that is the menu item in the config database
 * pages.
 */

require_once('../../config.php');
require_once('lib.php');
require_once($CFG->libdir.'/uploadlib.php');
require_once($CFG->libdir.'/xmlize.php');


$id      = optional_param('id', 0, PARAM_INT);    // course module id
$d       = optional_param('d', 0, PARAM_INT);     // database activity id
$action  = optional_param('action', 'base', PARAM_RAW); // current action
$file    = optional_param('file', false, PARAM_PATH); // path of file to upload

if ($id) {
    if (! $cm = get_record('course_modules', 'id', $id)) {
        error('Course Module ID Incorrect');
    }
    if (! $course = get_record('course', 'id', $cm->course)) {
        error('Course is misconfigured');
    }
    if (! $data = get_record('data', 'id', $cm->instance)) {
        error('Module Incorrect');
    }
} else if ($d) {
    if (! $data = get_record('data', 'id', $d)) {
        error('Database ID Incorrect');
    }
    if (! $course = get_record('course', 'id', $data->course)) {
        error('Course is misconfigured');
    }
    if (! $cm = get_coursemodule_from_instance('data', $data->id, $course->id)) {
        error('Course Module ID was incorrect');
    }
} else {
    error('Parameter missing');
}

require_login($course->id);

require_capability('mod/data:managetemplates', get_context_instance(CONTEXT_MODULE, $cm->id));

/* get the list of standard presets found in /mod/data/preset */
$presets = array();


if ($presetdir = opendir($CFG->dirroot.'/mod/data/preset')) {

    while ($userdir = readdir($presetdir)) {

        $fulluserdir = '/mod/data/preset/'.$userdir;

        if ($userdir == '.' || $userdir == '..') {
            continue;
        }

        /* Global Standard Presets */
        if (is_directory_a_preset($CFG->dirroot.$fulluserdir)) {
            $preset = new StdClass;
            $preset->path = $fulluserdir;
            $preset->name = $userdir;
            if (file_exists($fulluserdir.'/screenshot.jpg')) {
                $preset->screenshot = $CFG->wwwroot.'/mod/data/preset/'.$userdir.'/screenshot.jpg';
            }
            $presets[] = $preset;
            unset($preset);
        }

        /* User made presets stored in user folders */
        else if (get_record('user', 'id', $userdir)) {
            $userdirh = opendir($CFG->dirroot.$fulluserdir);
            while ($userpresetdir = readdir($userdirh)) {
                $fulluserpresetdir = $fulluserdir.'/'.$userpresetdir;
                if ($userpresetdir != '.' && $userpresetdir != '..' && is_directory_a_preset($CFG->dirroot.$fulluserpresetdir)) {
                    $preset = new StdClass;
                    $preset->path = $fulluserpresetdir;
                    $preset->name = $userpresetdir;
                    $preset->user = $userdir;
                    if (file_exists($fulluserpresetdir.'/screenshot.jpg')) {
                        $preset->screenshot = $CFG->wwwroot.'/mod/data/preset/'.$userdir.'/'.$userpresetdir.'/screenshot.jpg';
                    }
                    $presets[] = $preset;
                    unset($preset);
                }
            }
        }
    }
    closedir($presetdir);
}

/* Need sesskey security check here for import instruction */
$sesskey = sesskey();

/********************************************************************/
/* Output */
data_presets_print_header($course, $cm, $data);

echo "<center>";
switch ($action) {
    /* Main selection menu - default mode also. */
 default:
 case 'base':
     $strimport = get_string('import');
     $strfromfile = get_string('fromfile', 'data');
     $strchooseorupload = get_string('chooseorupload', 'data');
     $strok = get_string('ok');
     $strusestandard = get_string('usestandard', 'data');
     $strchoose = get_string('choose');
     $strexport = get_string('export', 'data');
     $strexportaszip = get_string('exportaszip', 'data');
     $strsaveaspreset = get_string('saveaspreset', 'data');
     $strdelete = get_string('delete');

     echo "<table cellpadding=7>";
     echo "<tr><td><h3>$strimport</h3></td>";
     echo "<td><form name='form' method='POST' action='?d=$data->id&action=importzip&sesskey=$sesskey' enctype='multipart/form-data'>";
     helpbutton('importfromfile', '', 'data');
     echo " $strfromfile:</td><td><input name=\"file\" size=\"20\" value=\"\" alt=\"file\" type=\"text\"><input name=\"coursefiles\" title=\"Choose or upload a file\" value=\"$strchooseorupload\" onclick=\"return openpopup('/files/index.php?id=2&choose=form.file', 'coursefiles', 'menubar=0,location=0,scrollbars,resizable,width=750,height=500', 0);\" type=\"button\">";
     echo "<input type=\"submit\" value=\"$strok\"/>";
     echo "</form></td></tr>";

     echo "<tr valign=top><td></td><td>";
     helpbutton('usepreset', '', 'data');
     echo " $strusestandard: </td><td>";
     echo "<table width=100%>";
     foreach ($presets as $id => $preset) {
	 echo "<tr><form action='' method='POST'>";
	 echo "<input type='hidden' name='file' value=\"$preset->path\">";
	 echo "<input type='hidden' name='action' value='importpreset'>";
	 echo "<input type='hidden' name='d' value='$data->id'>";
	 echo "<input type='hidden' name='sesskey' value='$sesskey'>";
	 echo "<td>";
	 if ($preset->screenshot) {
	     echo "<img src='$preset->screenshot' alt='$preset->screenshot' />";
	 }
	 echo "</td><td>$preset->name";
	 if ($preset->user) {
	     $user = get_record('user', 'id', $preset->user);
	     echo " by $user->firstname $user->lastname";
	 }
	 echo "</td><td><input type='submit' value='$strchoose'></td></form>";
	 echo "<td>";
	 if ($preset->user == $USER->id || isadmin()) {
	     echo "<form action='' method='POST'>";
	     echo "<input type='hidden' name='d' value='$data->id' />";
	     echo "<input type='hidden' name='action' value='confirmdelete' />";
	     echo "<input type='hidden' name='sesskey' value='$sesskey' />";
	     echo "<input type='hidden' name='deleteid' value='$id' />";
	     echo "<input type='hidden' name='deletename' value=\"$preset->name\" />";
	     echo "<input type='submit' value='$strdelete' /></form>";
	 }
	 echo "</td></tr>";
     }
     echo "</table></td></tr>";

     echo "<tr><td valign=top><h3>$strexport</h3></td>";
     echo "<td><form action='' method='POST'>";
     helpbutton('exportzip', '', 'data');
     echo " <input type='hidden' name='action' value='export' />";
     echo "<input type='hidden' name='d' value='$data->id' />";
     echo "<input type='submit' value='$strexportaszip' />";
     echo "</form>";

     echo "<form action='' method='POST'>";
     helpbutton('savepreset', '', 'data');
     echo " <input type='hidden' name='action' value='save1' />";
     echo "<input type='hidden' name='d' value='$data->id' />";
     echo "<input type='hidden' name='sesskey' value='$sesskey' />";
     echo "<input type='submit' value='$strsaveaspreset' />";
     echo "</form>";

     echo "</table>";
     break;



     /***************** Deleting *****************/
 case 'confirmdelete' :
     if (!confirm_sesskey()) {
	 error("Sesskey Invalid");
     }

     $deletename = required_param('deletename', PARAM_RAW);
     $deleteid = required_param('deleteid', PARAM_INT);

     $strwarning = get_string('deletewarning', 'data');
     $strdelete = get_string('delete');
     notify($strwarning);
     echo "<form action='' method='POST'>";
     echo "<input type='hidden' name='d' value='$data->id' />";
     echo "<input type='hidden' name='action' value='delete' />";
     echo "<input type='hidden' name='sesskey' value='$sesskey' />";
     echo "<input type='hidden' name='deleteid' value='$deleteid' />";
     echo "<input type='hidden' name='deletename' value=\"$deletename\" />";
     echo "<input type='submit' value='$strdelete' /></form>";
     break;

 case 'delete' :
     if (!confirm_sesskey()) {
	 error('Sesskey Invalid');
     }

     $deletename = required_param('deletename', PARAM_RAW);
     $deleteid = required_param('deleteid', PARAM_INT);

     if (!empty($presets[$deleteid])) {
	 if ($presets[$deleteid]->name == $deletename) {
	     if (!clean_preset($CFG->dirroot.$presets[$deleteid]->path)) error("Error deleting");
	 }
	 rmdir($CFG->dirroot.$presets[$deleteid]->path);
     }
     else {
	 error('Invalid delete');
     }

     $strdelete = get_string('deleted', 'data');
     notify("$deletename $strdeleted");

     break;



     /***************** Importing *****************/
 case 'importpreset' :
     if (!confirm_sesskey()) {
	 error("Sesskey Invalid");
     }

     $pimporter = new PresetImporter($course, $cm, $data, $CFG->dirroot.$file);
     $pimporter->import_options();
     break;

     /* Imports a zip file. */
 case 'importzip' :
     if (!confirm_sesskey()) {
	 error("Sesskey Invalid");
     }

     if (!make_upload_directory('temp/data/'.$USER->id)) {
	 error("Can't Create Directory");
     }

     $presetfile = $CFG->dataroot."/temp/data/".$USER->id;
     clean_preset($presetfile);

     if (!unzip_file($CFG->dataroot."/$course->id/$file",
		     $presetfile, false))
	 error("Can't unzip file");

     $pimporter = new PresetImporter($course, $cm, $data, $presetfile);
     $pimporter->import_options();
     break;

 case 'finishimport':
     if (!confirm_sesskey()) {
	 error('Sesskey Invalid');
     }

     $pimporter = new PresetImporter($course, $cm, $data, $file);
     $pimporter->import();

     $strimportsuccess = get_string('importsuccess', 'data');
     $straddentries = get_string('addentries', 'data');
     $strtodatabase = get_string('todatabase', 'data');
     if (!get_records('data_records', 'dataid', $data->id)) {
	 notify("$strimportsuccess <a href='edit.php?d=$data->id'>$straddentries</a> $strtodatabase", 'notifysuccess');
     }
     else {
	 notify("$strimportsuccess", 'notifysuccess');
     }
     break;

     /* Exports as a zip file ready for download. */
 case 'export':
     $file = data_presets_export($course, $cm, $data);
     echo get_string('exportedtozip', 'data')."<br>";
     $perminantfile = $CFG->dataroot."/$course->id/moddata/data/$data->id/preset.zip";
     @unlink($perminantfile);
     /* is this created elsewhere? sometimes its not present... */
     make_upload_directory("$course->id/moddata/data/$data->id");

     /* now just move the zip into this folder to allow a nice download */
     if (!rename($file, $perminantfile)) error("Can't move zip");
     echo "<a href='$CFG->wwwroot/file.php/$course->id/moddata/data/$data->id/preset.zip'>".get_string('download', 'data')."</a>";
     break;



     /***************** Exporting *****************/
 case 'save1':
     if (!confirm_sesskey()) {
	 error("Sesskey Invalid");
     }

     $strcontinue = get_string('continue');
     $strwarning = get_string('presetwarning', 'data');

     echo "<div align=center>";
     echo "<p>$strwarning</p>";
     echo "<form action='' method='POST'>";
     echo "Name: <input type='textbox' name='name' value=\"$data->name\" />";
     echo "<input type='hidden' name='action' value='save2' />";
     echo "<input type='hidden' name='d' value='$data->id' />";
     echo "<input type='hidden' name='sesskey' value='$sesskey' />";
     echo "<input type='submit' value='$strcontinue' /></form></div>";
     break;

 case 'save2':
     if (!confirm_sesskey()) {
	 error("Sesskey Invalid");
     }

     $strcontinue = get_string('continue');
     $stroverwrite = get_string('overwrite');

     $name = optional_param('name', $data->name, PARAM_FILE);

     if (is_directory_a_preset("$CFG->dirroot/mod/data/preset/$USER->id/$name")) {
	 notify("Preset already exists: Pick another name or overwrite");

	 echo "<div align=center>";
	 echo "<form action='' method='POST'>";
	 echo "New name: <input type='textbox' name='name' value=\"$name\" />";
	 echo "<input type='hidden' name='action' value='save2' />";
	 echo "<input type='hidden' name='d' value='$data->id' />";
	 echo "<input type='hidden' name='sesskey' value='$sesskey' />";
	 echo "<input type='submit' value='$strcontinue' /></form>";

	 echo "<form action='' method='POST'>";
	 echo "<input type='hidden' name='name' value=\"$name\" />";
	 echo "<input type='hidden' name='action' value='save3' />";
	 echo "<input type='hidden' name='d' value='$data->id' />";
	 echo "<input type='hidden' name='sesskey' value='$sesskey' />";
	 echo "<input type='submit' value='$stroverwrite' /></form>";
	 echo "</div>";
	 break;
     }

 case 'save3':
     if (!confirm_sesskey()) {
	 error("Sesskey Invalid");
     }

     $name = optional_param('name', $data->name, PARAM_FILE);
     $presetdirectory = "$CFG->dirroot/mod/data/preset/$USER->id/$name";

     if (!is_dir($presetdirectory)) {
	 @mkdir("$CFG->dirroot/mod/data/preset/$USER->id");
	 mkdir($presetdirectory);
     }
     else {
	 clean_preset($presetdirectory);
     }

     $file = data_presets_export($course, $cm, $data);
     if (!unzip_file($file, $presetdirectory, false)) error("Can't unzip to the preset directory");
     notify(get_string('savesuccess', 'data'), 'notifysuccess');
     break;

}
echo "</center>";
print_footer($course);


function is_directory_a_preset($directory) {
    $directory = rtrim($directory, '/\\') . '/';
    if (file_exists($directory.'singletemplate.html') &&
	file_exists($directory.'listtemplate.html') &&
	file_exists($directory.'listtemplateheader.html') &&
	file_exists($directory.'listtemplatefooter.html') &&
	file_exists($directory.'addtemplate.html') &&
	file_exists($directory.'rsstemplate.html') &&
	file_exists($directory.'rsstitletemplate.html') &&
	file_exists($directory.'csstemplate.css') &&
	file_exists($directory.'jstemplate.js') &&
	file_exists($directory.'preset.xml')) return true;
    else return false;
}

function data_presets_print_header($course, $cm, $data, $showtabs=true) {

    global $CFG, $displaynoticegood, $displaynoticebad;

    $strdata = get_string('modulenameplural','data');

    print_header_simple($data->name, '', "<a href='index.php?id=$course->id'>$strdata</a> -> $data->name",
			'', '', true, '', navmenu($course, $cm));

    print_heading(format_string($data->name));

    /// Print the tabs

    if ($showtabs) {
        $currenttab = 'presets';
        include_once('tabs.php');
    }

    /// Print any notices

    if (!empty($displaynoticegood)) {
        notify($displaynoticegood, 'notifysuccess');    // good (usually green)
    } else if (!empty($displaynoticebad)) {
        notify($displaynoticebad);                     // bad (usuually red)
    }
}


function clean_preset($folder) {
    if (unlink($folder.'/singletemplate.html') &&
	unlink($folder.'/listtemplate.html') &&
	unlink($folder.'/listtemplateheader.html') &&
	unlink($folder.'/listtemplatefooter.html') &&
	unlink($folder.'/addtemplate.html') &&
	unlink($folder.'/rsstemplate.html') &&
	unlink($folder.'/rsstitletemplate.html') &&
	unlink($folder.'/csstemplate.css') &&
	unlink($folder.'/jstemplate.js') &&
	unlink($folder.'/preset.xml')) return true;
    else return false;
}


function data_presets_export($course, $cm, $data) {
    global $CFG;
    /* Info Collected. Now need to make files in moodledata/temp */
    $tempfolder = $CFG->dataroot.'/temp';
    $singletemplate     = fopen($tempfolder.'/singletemplate.html', 'w');
    $listtemplate       = fopen($tempfolder.'/listtemplate.html', 'w');
    $listtemplateheader = fopen($tempfolder.'/listtemplateheader.html', 'w');
    $listtemplatefooter = fopen($tempfolder.'/listtemplatefooter.html', 'w');
    $addtemplate        = fopen($tempfolder.'/addtemplate.html', 'w');
    $rsstemplate        = fopen($tempfolder.'/rsstemplate.html', 'w');
    $rsstitletemplate   = fopen($tempfolder.'/rsstitletemplate.html', 'w');
    $csstemplate        = fopen($tempfolder.'/csstemplate.css', 'w');
    $jstemplate         = fopen($tempfolder.'/jstemplate.js', 'w');

    fwrite($singletemplate, $data->singletemplate);
    fwrite($listtemplate, $data->listtemplate);
    fwrite($listtemplateheader, $data->listtemplateheader);
    fwrite($listtemplatefooter, $data->listtemplatefooter);
    fwrite($addtemplate, $data->addtemplate);
    fwrite($rsstemplate, $data->rsstemplate);
    fwrite($rsstitletemplate, $data->rsstitletemplate);
    fwrite($csstemplate, $data->csstemplate);
    fwrite($jstemplate, $data->jstemplate);

    fclose($singletemplate);
    fclose($listtemplate);
    fclose($listtemplateheader);
    fclose($listtemplatefooter);
    fclose($addtemplate);
    fclose($rsstemplate);
    fclose($rsstitletemplate);
    fclose($csstemplate);
    fclose($jstemplate);

    /* All the display data is now done. Now assemble preset.xml */
    $fields = get_records('data_fields', 'dataid', $data->id);
    $presetfile = fopen($tempfolder.'/preset.xml', 'w');
    $presetxml = "<preset>\n\n";

    /* Database settings first. Name not included? */
    $settingssaved = array('intro', 'comments', 'ratings', 'participants',
			   'requiredentries', 'requiredentriestoview', 'maxentries',
			   'rssarticles', 'approval', 'scale', 'assessed', 'assessedpublic',
			   'defaultsort', 'defaultsortdir', 'editany');

    $presetxml .= "<settings>\n";
    foreach ($settingssaved as $setting) {
	$presetxml .= "<$setting>{$data->$setting}</$setting>\n";
    }
    $presetxml .= "</settings>\n\n";

    /* Now for the fields. Grabs all settings that are non-empty */
    if (!empty($fields)) {
	foreach ($fields as $field) {
	    $presetxml .= "<field>\n";
	    foreach ($field as $key => $value) {
		if ($value != '' && $key != 'id' && $key != 'dataid') {
		    $presetxml .= "<$key>$value</$key>\n";
		}
	    }
	    $presetxml .= "</field>\n\n";
	}
    }

    $presetxml .= "</preset>";
    fwrite($presetfile, $presetxml);
    fclose($presetfile);

    /* Check all is well */
    if (!is_directory_a_preset($tempfolder)) {
        error("Not all files generated!");
    }

    $filelist = array(
                      "singletemplate.html",
                      "listtemplate.html",
                      "listtemplateheader.html",
                      "listtemplatefooter.html",
                      "addtemplate.html",
                      "rsstemplate.html",
                      "rsstitletemplate.html",
                      "csstemplate.css",
		      "jstemplate.js",
                      "preset.xml");

    foreach ($filelist as $key => $file) {
        $filelist[$key] = $tempfolder.'/'.$filelist[$key];
    }

    @unlink($tempfolder.'/export.zip');
    $status = zip_files($filelist, $tempfolder.'/export.zip');

    /* made the zip... now return the filename for storage.*/
    return $tempfolder.'/export.zip';
}



class PresetImporter {
    function PresetImporter($course, $cm, $data, $folder) {
        global $CFG;
        $this->course = $course;
        $this->cm = $cm;
        $this->data = $data;
        $this->folder = $folder;
        $this->postfolder = $folder;
    }


    function get_settings() {
        global $CFG;

        if (!is_directory_a_preset($this->folder)) {
            error("$this->folder Not a preset");
        }

        /* Grab XML */
        $presetxml = file_get_contents($this->folder.'/preset.xml');
        $parsedxml = xmlize($presetxml);

        /* First, do settings. Put in user friendly array. */
        $settingsarray = $parsedxml['preset']['#']['settings'][0]['#'];
        $settings = new StdClass();

        foreach ($settingsarray as $setting => $value) {
            $settings->$setting = $value[0]['#'];
        }

        /* Now work out fields to user friendly array */
        $fieldsarray = $parsedxml['preset']['#']['field'];
        $fields = array();
        foreach ($fieldsarray as $field) {
            $f = new StdClass();
            foreach ($field['#'] as $param => $value) {
                $f->$param = $value[0]['#'];
            }
            $f->dataid = $this->data->id;
            $fields[] = $f;
        }

        /* Now add the HTML templates to the settings array so we can update d */
        $settings->singletemplate     = file_get_contents($this->folder."/singletemplate.html");
        $settings->listtemplate       = file_get_contents($this->folder."/listtemplate.html");
        $settings->listtemplateheader = file_get_contents($this->folder."/listtemplateheader.html");
        $settings->listtemplatefooter = file_get_contents($this->folder."/listtemplatefooter.html");
        $settings->addtemplate        = file_get_contents($this->folder."/addtemplate.html");
        $settings->rsstemplate        = file_get_contents($this->folder."/rsstemplate.html");
        $settings->rsstitletemplate   = file_get_contents($this->folder."/rsstitletemplate.html");
        $settings->csstemplate        = file_get_contents($this->folder."/csstemplate.css");
        $settings->jstemplate         = file_get_contents($this->folder."/jstemplate.js");

        $settings->instance = $this->data->id;

        /* Now we look at the current structure (if any) to work out whether we need to clear db
           or save the data */
        $currentfields = array();
        $currentfields = get_records('data_fields', 'dataid', $this->data->id);

        return array($settings, $fields, $currentfields);
    }

    function import_options() {
        if (!confirm_sesskey()) {
            error("Sesskey Invalid");
        }

        $strblank = get_string('blank', 'data');
        $strnofields = get_string('nofields', 'data');
        $strcontinue = get_string("continue");
        $sesskey = sesskey();
        $strwarning = get_string('mappingwarning', 'data');
        $strfieldmappings = get_string('fieldmappings', 'data');
        $strnew = get_string("new");
        $strold = get_string("old");

        list($settings, $newfields,  $currentfields) = $this->get_settings();

        echo "<div align='center'><form action='' method='POST'>";
        echo "<input type='hidden' name='sesskey' value='$sesskey' />";
        echo "<input type='hidden' name='d' value='{$this->data->id}' />";
        echo "<input type='hidden' name='action' value='finishimport' />";
        echo "<input type='hidden' name='file' value=\"$this->postfolder\" />";

        if ($currentfields != array() && $newfields != array()) {
            echo "<h3>$strfieldmappings ";
            echo helpbutton('fieldmappings', '', 'data');
            echo "</h3><table>";

            foreach ($newfields as $nid => $newfield) {
                echo "<tr><td>$newfield->name </td>";
                echo "<td><select name='field_$nid'>";

                foreach ($currentfields as $cid => $currentfield) {
                    if ($currentfield->type == $newfield->type) {
                        if ($currentfield->name == $newfield->name) {
                            echo "<option value='$cid' selected='true'>$currentfield->name</option>";
                            $selected=true;
                        }
                        else {
			    echo "<option value='$cid'>$currentfield->name</option>";
			}
		    }
                }

                if ($selected)
                    echo "<option value='-1'>-</option>";
                else
                    echo "<option value='-1' selected='true'>-</option>";
                echo "</select></td></tr>";
            }
            echo "</table>";
            echo "<p>$strwarning</p>";
        }
        else if ($newfields == array()) {
            error("New preset has no defined fields!");
        }
        echo "<input type='submit' value='$strcontinue' /></form></div>";

    }

    function import() {
        global $CFG;

        list($settings, $newfields, $currentfields) = $this->get_settings();
        $preservedfields = array();

        /* Maps fields and makes new ones */
        if ($newfields != array()) {
            /* We require an injective mapping, and need to know what to protect */
            foreach ($newfields as $nid => $newfield) {
                $cid = optional_param("field_$nid", -1, PARAM_INT);
                if ($cid == -1) continue;

                if (array_key_exists($cid, $preservedfields)) error("Not an injective map");
                else $preservedfields[$cid] = true;

            }

            foreach ($newfields as $nid => $newfield) {
                $cid = optional_param("field_$nid", -1, PARAM_INT);

                /* A mapping. Just need to change field params. Data kept. */
                if ($cid != -1) {
                    $fieldobject = data_get_field_from_id($currentfields[$cid]->id, $this->data);
                    foreach ($newfield as $param => $value) {
                        if ($param != "id") {
                            $fieldobject->field->$param = $value;
                        }
                    }
                    unset($fieldobject->field->similarfield);
                    $fieldobject->update_field();
                    unset($fieldobject);
                }
                /* Make a new field */
                else {
                    include_once("field/$newfield->type/field.class.php");

                    $classname = 'data_field_'.$newfield->type;
                    $fieldclass = new $classname($newfield, $this->data);
                    $fieldclass->insert_field();
                    unset($fieldclass);
                }
            }
        }

        /* Get rid of all old unused data */
        if ($preservedfields != array()) {
            foreach ($currentfields as $cid => $currentfield) {
                if (!array_key_exists($cid, $preservedfields)) {
                    /* Data not used anymore so wipe! */
                    print "Deleting field $currentfield->name<br>";
                    $id = $currentfield->id;

                    if ($content = get_records('data_content', 'fieldid', $id)) {
                        foreach ($content as $item) {
                            delete_records('data_ratings', 'recordid', $item->recordid);
                            delete_records('data_comments', 'recordid', $item->recordid);
                            delete_records('data_records', 'id', $item->recordid);
                        }
                    }
                    delete_records('data_content', 'fieldid', $id);
                    delete_records('data_fields', 'id', $id);

                }
            }
        }

        data_update_instance(addslashes_object($settings));

        if (strstr($this->folder, "/temp/")) clean_preset($this->folder); /* Removes the temporary files */
        return true;
    }
}

?>
2006-09-18 11:42:28 +00:00
skodak dca1937c02 removed references to /requested(teachers?|students?)name/ and 'showsiteparticipantslist' - we are now using only default names stored in langpacks for backwards compatibility 2006-09-18 11:21:24 +00:00
toyomoyo 102d890c14 remove_admin() no longer referenced 2006-09-18 10:47:09 +00:00
vyshane 7aeedc0cfb Removed configshowparticipantslist 2006-09-18 10:26:11 +00:00
toyomoyo 6eccd8f099 add_creator no longer in use 2006-09-18 10:18:26 +00:00
skodak a7a54c3ba1 new metacourse fixes for admin block 2006-09-18 09:58:22 +00:00
skodak 339dc4e28f metacourse fixes for course editting 2006-09-18 09:37:51 +00:00
toyomoyo 24671bd8b4 validation should not watch out for teacher and students string anymore 2006-09-18 09:16:49 +00:00
moodler fdb1cf2cc1 FIxed to use the new debugging function 2006-09-18 09:13:04 +00:00
toyomoyo 65becbc3ef if the user has no capability, after creating a course we add him to the first role with legacy:edittingteacher, to make him a legacy editting teacher 2006-09-18 09:10:03 +00:00
vyshane 16b09a43ca Added moodle/site:viewparticipants 2006-09-18 09:09:25 +00:00
tjhunt 89d878671d Remove duplicate call to print_header 2006-09-18 09:02:30 +00:00
vyshane 840c1c31fa Added moodle/site:viewparticipants 2006-09-18 09:02:12 +00:00
moodler 0bb391b7a0 Fixed some debugging statements 2006-09-18 08:57:23 +00:00
vyshane 218ec889d2 Replaced managesharedfeeds by manageanyfeeds 2006-09-18 08:37:29 +00:00
skodak f5002f10bf metacourses gui fixes, part I. 2006-09-18 08:20:01 +00:00
vyshane f98fe0efad Removed isadmin() 2006-09-18 08:10:20 +00:00
vyshane 6ee81cb55b Got rid of isadmin() calls, added capability checks. 2006-09-18 07:19:38 +00:00
moodler a4e108450f Some trivial tidying of source 2006-09-18 05:50:02 +00:00
vyshane bd574b2a06 Removed isteacher() 2006-09-18 05:29:42 +00:00
vyshane 0019725320 Removed references to showsiteparticipantslist. Replaced by capability. 2006-09-18 05:28:06 +00:00
vyshane 8b8db38e6e Removed showsiteparticipantslist strings. 2006-09-18 05:27:28 +00:00
vyshane dd8d5345ce Removed showsiteparticipantslist, replaced with capability 2006-09-18 05:26:16 +00:00
vyshane b008da9551 Removed showsiteparticipantslist. Replaced with capability. 2006-09-18 05:25:43 +00:00
toyomoyo 353a7269a2 removing word for teachers and students, please use proper role names instead 2006-09-18 04:57:34 +00:00
moodler 09a89b01d0 Nuked nuke. 2006-09-18 03:28:02 +00:00
moodler ad48842401 Automatic installer.php lang files by installer_builder (20060918) 2006-09-18 03:04:28 +00:00
vinkmar cc73de7147 Fixes for MDL-6440 and MDL-6577 2006-09-18 02:41:14 +00:00
vyshane 24bf6cc196 Replaced isteacher() in fullname() call. 2006-09-18 02:28:57 +00:00
mark-nielsen 62bb11d837 Added display default feedback in lesson settings
Led to reducing some redundant code in action/continue.php
Also, a bug fix in locallib.php for function lesson_print_submit_link (needed to add slashes or else js would break)
2006-09-18 01:31:35 +00:00
mark-nielsen 1032b61d3f Added lang entry for display default feedback 2006-09-18 01:29:03 +00:00
mark-nielsen 52f13a25df Help file for displaying default feedback 2006-09-18 01:28:12 +00:00
skodak 1aad431080 metacourse sync now uses roles, I will continue with fixing of GUIs tomorrow 2006-09-17 22:21:37 +00:00
skodak 4b7aaf4025 added new capability 'moodle/course:managemetacourses' 2006-09-17 21:03:35 +00:00
skodak 6e283151b0 fixed some more warnings in uploaduser.php script 2006-09-17 21:02:31 +00:00
skodak a25200709b fixed warning 2006-09-17 20:51:54 +00:00
cap2501 1752e584de Added dialog to confirm deletion of activity. 2006-09-17 18:20:43 +00:00
skodak 09575480bb fixed several warnings in get_course() 2006-09-17 18:07:35 +00:00
skodak 8743f4f3ec removed foter login link during initial phase of installation 2006-09-17 17:53:20 +00:00
cap2501 8a66975e84 cleaned up some formatting 2006-09-17 17:48:27 +00:00
gustav_delius 0839ef65d5 Removed a PHP notice 2006-09-17 17:43:30 +00:00
skodak d847bb32fd fixed non-working edit button on course page for teachers, added explanation comments 2006-09-17 17:32:45 +00:00
moodler 21ef1a8b27 New string 2006-09-17 16:39:12 +00:00
moodler 1cd85caf3f Fixed a typo 2006-09-17 16:10:00 +00:00
moodler 9d05e659cc Rewritten manual enrolment module using new core functions.
(except for the last part of cron function, which is still ugly)
2006-09-17 16:08:34 +00:00
moodler b963384f41 Added new convenience funtions:
get_default_course_role()  - gets default role for enrolment

   enrol_into_course() - enrols a person using the default role
2006-09-17 16:06:25 +00:00
moodler 9c641bd871 Added email_welcome_message_to_user() to send course welcome emails 2006-09-17 16:04:15 +00:00
moodler 41f6ed56ce Don't rely on the legacy capabilities to identify admins, use doanything 2006-09-17 16:00:16 +00:00
skodak c8218a42fa Partial fix for missing deafult values in upgradesettings.php script - MDL-6577 2006-09-17 12:11:23 +00:00
moodler 88af238ccb $CFG->defaultcourseroleid defines a site default for the role given to
people who enrol in the course.

$course->defaultrole defines the value for each course for what role
should be used in the same case.   Naturally it defaults to the site config
(when it is zero).

This role is retained even when the person editing the course settings
doesn't actually have that role in their list of assignable rights (however
they are prevented from actually switching to any such role themselves).

Note that enrol plugins are free to ignore these values and use whatever
roles they like.  Generally, though, they should respect these settings.
2006-09-17 09:22:33 +00:00
moodler b29ab53d31 Removed the setting of default values. The default is now just zero. 2006-09-17 09:08:47 +00:00
skodak 86e2c51da8 infinite loop prevention when unassigning recursively 2006-09-17 08:53:57 +00:00
skodak 4e5f3064bf role assignment and unassignment now propagates to metacourses 2006-09-17 08:42:42 +00:00
moodler ff64aaeaec Just tidying a couple of functions 2006-09-17 07:00:47 +00:00
skodak 7f5bc80b78 backupdata folder is no longer displayed in list of directories when setting up Directory Resource - partially related to MDL-6280 ; and some other typo fixes; get_directory_list() no accepts also array of exluded files 2006-09-17 06:49:26 +00:00
moodler 746a04c500 Adding defaultrole to course table 2006-09-17 06:37:59 +00:00
vinkmar 90cfbd0ab4 Changes required for MDL-6439 made to admin_sitesettext object 2006-09-17 06:08:10 +00:00
moodler 1434a286dd Fixing up script tag for compliance 2006-09-17 03:40:22 +00:00
moodler ce607dd457 Tidying up coursebox teacher listing (no bullets) 2006-09-17 03:38:04 +00:00
moodler ec6eb11097 Sort get_user_roles from most local to most general 2006-09-17 03:33:22 +00:00
moodler 08abf1dc0e Updated tags file 2006-09-17 03:29:56 +00:00
martinlanghoff 5a39def902 re-merge of "Merged fix from 1.6 for Bug #5131 - RSS Feeds and Moving Discussions."
Originally by vyshane - got dropped accidentally in one of the biiiiig roles
commits.
2006-09-17 02:27:13 +00:00
skodak 0d5a9a94c1 fixed recursive backing up of backup folder when resource diretory reference is course files root - MDL-6280 ; merged from MOODLE_16_STABLE 2006-09-16 18:15:40 +00:00
skodak 5434bacabe backupdata folder is not visible in directory resource any more, the backup files were not downloadable, but they might be stored in browser cache when teacher and student were logged from the same browser and computer account - MDL-6280 ; merged from MOODLE_16_STABLE 2006-09-16 17:15:18 +00:00
skodak de9a33f3c9 backupdata folder is not visible in directory resource any more, the backup files were not downloadable, but they might be stored in browser cache when teacher and student were logged from the same browser and computer account - MDL-6280 ; merged from MOODLE_16_STABLE 2006-09-16 17:15:18 +00:00
moodler 88768091a4 Upgrading print_course to use roles properly
Added list for the teacher names for better XHTML
2006-09-16 15:23:41 +00:00
moodler 5b6306677b extending get_user_roles with more options and more returned info 2006-09-16 15:22:55 +00:00
moodler 5fe3980628 Fixed hard-codes string 2006-09-16 14:26:13 +00:00
moodler 38a5e3d34a Just some cleanups and removed notices 2006-09-16 14:22:59 +00:00
moodler 27e1437616 Removing unneeded functions, still needs some modernising 2006-09-16 14:02:51 +00:00
moodler 5c98bf9e3a Enrolments working better now. The core part is done, just the plugins to go.
The enrolment plugins are now checked from load_user_capability()
2006-09-16 13:59:38 +00:00
moodler 99f9cb51e0 Added new capability
moodle/role:viewhiddenassigns  - for people to see hidden assignments
2006-09-16 13:56:24 +00:00
moodler 888fb649a8 Converted deprecated get_teacher() to use new tables 2006-09-16 13:55:30 +00:00
moodler 64026e8c1e Tidy up get_users_with_capability 2006-09-16 13:54:57 +00:00
moodler 5ed3bf228a Fixed a notice 2006-09-16 12:58:50 +00:00
moodler f4af29c5a4 Fixed up some bugs and notices when assigning roles in a user context 2006-09-16 12:41:47 +00:00
skodak 8f8ead90c7 fixed unenrol_student() - now uses roles instead of user_students table 2006-09-16 12:05:31 +00:00
skodak 80f435af43 fixed error message 2006-09-16 12:02:02 +00:00
skodak 14e7869268 fixed uploaduser.php to work with role assignments and groups, new csv columns role1...role5 accepting role ids + updated help file 2006-09-16 12:01:08 +00:00
skodak 7b6a42f5b8 coverted deprecated get_group_students() to use legacy capability instead of user_students table 2006-09-16 06:22:32 +00:00
skodak a05708ad61 fixed $groupidsql in get_users_by_capability() 2006-09-16 05:56:51 +00:00
moodler 4cc028d523 Automatic installer.php lang files by installer_builder (20060916) 2006-09-16 02:50:27 +00:00
moodler d3e47e0d66 Deleting deprecated methods of assigning people to courses 2006-09-15 16:03:49 +00:00
moodler 68a4b5d673 We don't need these any more (obsolete because of role assignment) 2006-09-15 15:56:05 +00:00
moodler 57e73347b3 Fixed up a typo 2006-09-15 15:07:43 +00:00
moodler 4801fe93a2 Various logic and capability fixes 2006-09-15 15:04:38 +00:00
moodler 11c40e2f4e Fixed a bad bug in get_user_roles :-) 2006-09-15 14:56:32 +00:00
moodler e58eca7222 New capability: moodle/user:viewhiddendetails 2006-09-15 14:39:16 +00:00
tjhunt 36075e092d MDL-6041 - Proper fix that eliminates the magic number 99999 when getting lists of studnets. Now, there is no arbitrary upper limit in the datalib functions, and sensible upper limits on pages that display lists of users. However, if you try to get all the site students, then get_students prints a warning in debug mode, telling you that you need to rethink your code.
Also a few more ISNULL()s eliminated.

And a typo role_assignment -> role_assignments.
2006-09-15 14:32:35 +00:00
moodler 4b10f08b88 Rename CONTEXT_USERID --> CONTEXT_USER for consistency 2006-09-15 14:09:16 +00:00
tjhunt f00b7f8d8e The ISNULL() function is a nasty mysql-ism. The standard SQL syntax is "xxx IS NULL". Even mysql supports this, whereas noone else supports the mysql syntax. 2006-09-15 14:00:30 +00:00
moodler 5081e7868d Some SQL fixes 2006-09-15 13:51:42 +00:00
moodler 2939bfe444 Fixed some notices 2006-09-15 13:46:11 +00:00
moodler 405f64c7fd Fixed some SQL error 2006-09-15 13:42:40 +00:00
moodler 2f089dd5f9 Guest account could be getting the default role 2006-09-15 13:28:18 +00:00
moodler 5bd66aa964 Some random quote fixing 2006-09-15 13:26:39 +00:00
tjhunt 4e5a0168f8 Fix typo. 2006-09-15 13:18:28 +00:00
moodler 2febd88e67 Just tidying 2006-09-15 12:53:23 +00:00
ethem 0fbf82ea78 Tidy up 2006-09-15 12:35:08 +00:00
ethem dbe35d21bc Tidy up 2006-09-15 12:05:27 +00:00
ethem a2610c215d Tidy up 2006-09-15 11:40:37 +00:00
ethem 068cf579bd New string for capability: Manage payments 2006-09-15 10:13:06 +00:00
ethem 58b450e92b New string for capability: Manage Payments 2006-09-15 10:11:19 +00:00
ethem 4044e868eb Goodbye old config 2006-09-15 09:57:10 +00:00
vyshane 15dabc3074 Merge from 1.6 stable. Small fixes to make xhtml validate. 2006-09-15 09:38:46 +00:00
moodler c26a8f2ffa FIxed navigation 2006-09-15 09:23:58 +00:00
toyomoyo 71dea306b4 changing lib functions to work with roles, some functions might not work as expected now 2006-09-15 09:08:48 +00:00
moodler b5839add55 Passing cleanup 2006-09-15 09:04:23 +00:00
moodler 6a12bc4836 Bringing phpinfo into the fold 2006-09-15 08:59:02 +00:00
moodler 3bac4f9fce FIxed docs 2006-09-15 08:23:40 +00:00
moodler 3cc8b355c2 Fixed a notice when course->modinfo is empty 2006-09-15 06:16:35 +00:00
moodler b977b0a365 Fixed some subscription typos 2006-09-15 06:15:01 +00:00
moodler e49e61bfe9 Updates for visual stuff 2006-09-15 06:07:29 +00:00
vyshane 67875aa108 Fixed bug in forum_search_posts(). More testing needed still. 2006-09-15 06:04:23 +00:00
moodler 4934c49719 Cleaning up assign and override interfaces 2006-09-15 06:04:10 +00:00
vyshane 3d5fb99f00 Fixed bug in get_records_sql(). This call:
$rs = get_recordset_sql($sql, $limitfrom='', $limitnum='');

should really be:

$rs = get_recordset_sql($sql, $limitfrom, $limitnum);
2006-09-15 06:03:32 +00:00
vyshane e521770c84 Small SQL fix. Removed unneeded WHERE clause 2006-09-15 03:18:59 +00:00
gbateson e69c04db5a do not add $restore->course_startdateoffset to ANY empty dates 2006-09-14 21:50:37 +00:00
moodler 7513cd6936 Tidying 2006-09-14 15:20:44 +00:00
moodler 9584965f9c Tidied up the role assignment pages 2006-09-14 14:49:45 +00:00
moodler 02862df518 Allow columns to be zero 2006-09-14 14:12:51 +00:00
thepurpleblob 6d9b8e5678 Merged from STABLE
Provides fix for bug MDL-5893
2006-09-14 13:59:08 +00:00
moodler 698337128b Reorganise settings a bit 2006-09-14 13:56:27 +00:00
moodler 10e17638da Some fixes to user policies (removed some which are no longer relevant) 2006-09-14 13:54:21 +00:00
gbateson de2ded1a43 moved restorelog code to "hotpot_restore_mods", so it is only executed when backing up a HotPot record. Also, modified restorelog code so that "course_startdateoffset" is not added to TIMEOPEN or TIMECLOSE if those fields are currently empty (empty has a special meaning for those fields) 2006-09-14 11:10:54 +00:00
moodler ca23ffdb74 Don't overwrite capabilities when loading default role 2006-09-14 09:41:09 +00:00
moodler 8f8ed475f7 Added a new setting called $CFG->defaultuserroleid which defines
the role that ALL users get by default when they log in.
2006-09-14 09:39:23 +00:00
toyomoyo ea8158c118 changing sql calls from user_students table to role_assignments table 2006-09-14 09:08:07 +00:00
vyshane b1342e1869 Minor formatting tidyup 2006-09-14 08:57:41 +00:00
vyshane 42fb3c858f Converted forum searches so that they take into account the new Roles system. Search results will only include what the searcher should be able to see based on his/her capabilities. 2006-09-14 08:44:45 +00:00
bobopinna 9b3496f265 Removed two style definitions (bug MDL-6209) 2006-09-14 08:28:26 +00:00
moodler 438c5b8098 Removed a PHP4 notice 2006-09-14 07:35:53 +00:00
gbateson 29f4a60ffe add get_coursemodule_from_id/instance functions for compatability with Moodles <1.7 2006-09-14 07:29:22 +00:00
gbateson 2a532aa68c reduce length of worksheet name to 31 chars if running under Moodle 1.5 2006-09-14 07:17:53 +00:00
gbateson 3c4f45c2d9 remove &nbsp; from blank cells when generating Excel sheet 2006-09-14 07:16:14 +00:00
moodler 966620586e Better handling of forum id/object 2006-09-14 07:13:08 +00:00
moodler 503eecab20 Strip tags from block skip link names 2006-09-14 07:00:43 +00:00
moodler 71832a910b Fixed some typos 2006-09-14 06:54:54 +00:00
moodler d78596d804 Fixed a notice 2006-09-14 06:48:58 +00:00
toyomoyo c5a3467aa0 fixing missing bracket 2006-09-14 06:43:01 +00:00
moodler 89d57596bd Fixed a typo 2006-09-14 06:30:02 +00:00
moodler c64633f6f6 Merged fix from http://moodle.org/mod/forum/discuss.php?d=38860 (Brian Jones) 2006-09-14 05:46:49 +00:00
moodler 09ad59dcb8 Revert to standardwhite if theme is missing MDL-6257 2006-09-14 05:15:06 +00:00
moodler 2fca6e0b26 Fixing up comments on debugging() 2006-09-14 04:31:05 +00:00
moodler fa989c3882 Moved debugging() to weblib.php since it's really about output 2006-09-14 04:25:17 +00:00
toyomoyo 9dcc11eb97 taking out user_student table reference in SQL, replaced with role_assignment 2006-09-14 03:54:37 +00:00
moodler b88b740a80 Remove obsolete themes link MDL-6518 2006-09-14 03:35:19 +00:00
toyomoyo 61b03dc7a6 replacing legacy calls 2006-09-14 03:18:55 +00:00
vyshane 8d9a0ae64b Fix for MDL-6517. Patch by David Mudrak. 2006-09-14 03:18:37 +00:00
gbateson e9be584810 fix for overly advanced version numbers in HotPot module in Moodle 1.5 (see bug MDL-6538) 2006-09-13 23:59:38 +00:00
urs_hunkler 18a6481ffa 'merged from 1.6' 2006-09-13 17:31:35 +00:00
tjhunt aa4f6af41a MDL-6542 - Don't run the unit tests until the user is ready. 2006-09-13 16:19:56 +00:00
tjhunt 45f501a54b Put the unit test styles in the standard theme, rather than using the previous nasty hack that had been broken by the admin page changes. 2006-09-13 16:16:39 +00:00
urs_hunkler 80f7ef6fe9 Merged from 1.6. See bug MDL-6028 2006-09-13 15:23:50 +00:00
tjhunt 404518eb85 Fix ordering problem with question number column headings. 2006-09-13 15:00:58 +00:00
tjhunt aedf2f0b85 Removing Eclipse .project file that Al committed by mistake. 2006-09-13 14:54:51 +00:00
tjhunt 2ec9591c4b Fix typo. 2006-09-13 13:25:11 +00:00
tjhunt 43e3febb23 Delete what I assume is a bogus line. 2006-09-13 13:25:00 +00:00
thompson697 163ff97e84 Complete work on Roll Forwards - Restore from previous semester (MDL-5532)
* Add fields to restore form to enable changes to Short Name, Full Name and Start Date
* Start Date offset added to Restore process
* Created Restorelog file in Course files area
* Activity Modules use offset to change dates
* Activity Modules write changes to Restorelog
2006-09-13 13:19:39 +00:00
moodler ea82d6b638 CHanged a lot of CFG->debug stuff to use the new debuggin() function 2006-09-13 09:45:07 +00:00
thompson697 c3b307b777 Initial work on Roll Forwards - Restore from previous semester (ongoing MDL-5532)
* Add fields to restore form to enable changes to Short Name, Full Name and Start Date
* Start Date offset added to Restore process
* Created Restorelog file in Course files area
2006-09-13 09:40:55 +00:00
moodler ee437bbc2a The debug variable is now much more flexible 2006-09-13 09:22:16 +00:00
toyomoyo 17d6a25e5c adding capabilitiies 2006-09-13 09:08:14 +00:00
moodler bd963c1c7e Fixed up debugging() function so it's more useful. 2006-09-13 08:53:19 +00:00
moodler 4b743adbc3 Deleted the moodle_error_handler after reading the docs more.
it's not really as useful as I thought it might be
2006-09-13 08:41:12 +00:00
moodler e6c5492368 Added a simple moodle_error_hendler function I'm playing with 2006-09-13 08:23:30 +00:00
moodler d6cc763f73 Added forum_role_assign and forum_role_unassign 2006-09-13 08:11:34 +00:00
moodler 3d1885af1e Added some checking that should not be necessary but I had notices in one extreme situation 2006-09-13 08:09:18 +00:00
moodler 0f161e1fee role_assign() and role_unassign() now call these hooks in each module:
xxx_role_assign()

    xxx_role_unassign()

so that modules can do stuff they might need to do (eg subscriptions etc)
2006-09-13 08:07:14 +00:00
moodler e82dc9bb41 Tidy-ups for user profile page 2006-09-13 06:56:25 +00:00
moodler 761a15574c Fixed up this script so that self-unenrolment works as expected 2006-09-13 06:41:58 +00:00
moodler 8d630fda5a Expanded forum_add_user_default_subscriptions() for more contexts
Added    forum_remove_user_subscriptions()
2006-09-13 06:40:30 +00:00
moodler d74067e8e7 1) Fixed API of require_capability() so it matches has_capability()
2) Extended role_unassign to clean up forum subscriptions etc as well
2006-09-13 06:35:25 +00:00
toyomoyo be2e1b6698 removing debug statement 2006-09-13 06:13:53 +00:00
toyomoyo cbf0446d8a use user_lastaccess table to find inactive time instead of user_students table 2006-09-13 06:13:07 +00:00
moodler 94fb6d1d62 fixing a problem where a user hasn't got any entries on the user_lastaccess table, temp solution as this could break other db 2006-09-13 05:55:57 +00:00
moodler 050c78c41d Missed some $COURSE conversion 2006-09-13 05:33:09 +00:00
moodler cb80265b21 Tidying add_to_log slghtly 2006-09-13 05:31:12 +00:00
toyomoyo 8ca1053a45 changed to outer join as user_lastaccess table could contain null 2006-09-13 05:29:26 +00:00
moodler 7da0af9feb Fixed some obvious typos 2006-09-13 05:05:17 +00:00
moodler 040e8fd8b8 Removed duplicate defines 2006-09-13 04:13:50 +00:00
moodler 9103fd10f8 Use $COURSE and not the $course hack 2006-09-13 04:11:36 +00:00
vyshane 29ac3cc28d Capability tweaks for rss_client block 2006-09-13 04:10:41 +00:00
vyshane 73b73d2101 More capabilities tweaks 2006-09-13 04:09:31 +00:00
vyshane 48f6bcddd2 Fix for blocks capability updates. Somehow missed this commit last night. 2006-09-13 04:08:58 +00:00
mark-nielsen fa9234e0e0 New strings (added a missing one); made the essay email string much more sane 2006-09-13 04:03:45 +00:00
vyshane 0c4d9f492e moodle/site:manageblocks tweak 2006-09-13 03:56:38 +00:00
mark-nielsen 260a56b114 Added some more stats to reports, added more actions to collapsed view and increased speed of lesson by using lesson_set_message() and redirects with 0 second delays. 2006-09-13 03:42:16 +00:00
vyshane 1975d8bd3e Added $USER->id in rss_display_feeds() call 2006-09-13 03:02:57 +00:00
vyshane 7d02b43640 Fixed typo 2006-09-13 02:59:20 +00:00
stronk7 f0b50bbe89 Now the "AFTER" clause is supported by add_field() 2006-09-12 22:58:04 +00:00
stronk7 48c2be79be Now we support to use the previous attribute in fields declaration 2006-09-12 22:56:52 +00:00
stronk7 f521d32b71 Two new functions added: add_field() and drop_field() 2006-09-12 22:23:00 +00:00
stronk7 12bda5832f Two more tests added: add_field() and drop_field() 2006-09-12 22:21:51 +00:00
stronk7 0bd921db9e Added support for add_field and drop_field 2006-09-12 22:20:50 +00:00
stronk7 0dd87cfa7a Delete one trailing comma 2006-09-12 22:15:44 +00:00
stronk7 3ab2610037 Added functions to retrieve the proper add and drop field SQL. 2006-09-12 22:15:00 +00:00
stronk7 d256743c5b When dropping columns, look for check constraints and drop them too. 2006-09-12 22:13:45 +00:00
stronk7 ec68af222e Ops, forgot to delete some debug... :-/ 2006-09-12 21:30:13 +00:00
stronk7 2a02841762 MSSQL needs to drop the default constraint before being able to drop the column 2006-09-12 21:24:03 +00:00
skodak c15f680424 partially fixed group management in workshop 2006-09-12 21:09:43 +00:00
skodak 33e7885ee0 fixed group management in wiki 2006-09-12 21:07:54 +00:00
skodak 3fde1a3d2f groups assignment now works with assigned roles instead of user_students and user_teachers 2006-09-12 20:55:58 +00:00
skodak bc202f4390 fixed harcoded string "Select a Role" 2006-09-12 20:54:21 +00:00
skodak be382aafb3 get_component_string() now works for all enrollment plugins MDL-6522 2006-09-12 20:03:08 +00:00
skodak 69eb59f28a Changed sort order in Role definition page MDL-6522 2006-09-12 19:54:33 +00:00
stronk7 3be91b01b6 Added support for add_field, drop_field and rename_field PHP code generation. 2006-09-12 17:45:25 +00:00
stronk7 cb78437d64 Changed some PHP comments. 2006-09-12 17:41:22 +00:00
stronk7 88bf021308 Fixed buggy condition. Now defaults are properly calculated by getPHP() 2006-09-12 16:45:46 +00:00
stronk7 9a96282f2c Added rss_client->shared 2006-09-12 15:24:41 +00:00
stronk7 8b9b510961 adding the user_lastaccess table 2006-09-12 15:19:10 +00:00
tjhunt 3542314884 Update help file to match the changes in the code and on Moodle docs I made some time ago. 2006-09-12 14:33:38 +00:00
moodler 32b9a98349 Fixed a bug that must have been there for a while, so that guest icons work again 2006-09-12 14:02:15 +00:00
moodler 1845f8b80e Revamped require_login() function to handle roles better. 2006-09-12 09:31:23 +00:00
moodler e4d81c60a9 Tidying up a bit 2006-09-12 09:30:05 +00:00
moodler b1ce7811ad Fixed MDL-6479 by adding two block columns on admin pages.
Also we now hide the blocks and headers completely until $SITE is properly
defined.
2006-09-12 09:22:27 +00:00
toyomoyo ae9e4c064e replacing iscreator() calls with capabilty 2006-09-12 08:56:10 +00:00
moodler ecf22ff31c DOn't show "Add" links if you can't use them 2006-09-12 08:28:36 +00:00
vyshane f7cf2f8efd Fixed bug preventing capability upgrades for blocks. Typo :( 2006-09-12 08:25:03 +00:00
moodler 0f9602085b Small bump for guest role fix 2006-09-12 08:22:14 +00:00
moodler 0ad8c7850d Reload default guest 2006-09-12 08:17:33 +00:00
moodler b0f5523038 Missed one capability for guests 2006-09-12 08:15:07 +00:00
toyomoyo dfe603583e changed code to use the user_lastaccess table instead of the user table 2006-09-12 07:39:25 +00:00
toyomoyo 174526f4f1 changed code to use the new user_lastaccess table instead of the log table 2006-09-12 07:38:46 +00:00
toyomoyo 87e5a0cd9e changed code to use get_role_users function 2006-09-12 07:38:07 +00:00
toyomoyo ab5c904411 added function get_role_users - returns all users assigned this role in this context (or higher) not very useful for participants list because of the count and paging. Could possibly expand it 2006-09-12 07:37:23 +00:00
moodler 8d158ed44f Reload the guest role using new defaults 2006-09-12 07:10:49 +00:00
moodler 2e85fffeb1 FIxed some typos and other logic related to assign_capabilities 2006-09-12 07:07:30 +00:00
vyshane 93b7e8d3a7 Fake constructor for PHP5 2006-09-12 06:58:42 +00:00
vyshane 23973f1856 Modified to support Roles. 2006-09-12 06:57:05 +00:00
vyshane 6c052a02f9 Added lang string 2006-09-12 06:55:40 +00:00
moodler e7876c1e34 Added new load_guest_role() for guest access, and made assign_capability()
smarter about pre-existing capabilities (new param allows overwriting or not)
2006-09-12 06:15:33 +00:00
toyomoyo b277dd0a53 adding new table for keeping track of user's last access time for any course page 2006-09-12 06:08:57 +00:00
moodler 00adf177ad Changed some default permissions for the guest role 2006-09-12 05:58:42 +00:00
moodler 22ef89f1d7 Automatic installer.php lang files by installer_builder (20060912) 2006-09-12 02:46:13 +00:00
stronk7 05483f7367 And one more string... 2006-09-11 22:08:26 +00:00
stronk7 eafc2b70e8 Some more improvements. Not finished yet. 2006-09-11 22:06:35 +00:00
koenr 550015cdac updating index files MDL-3484
More work to be done. Checked upto cost.html
2006-09-11 21:52:57 +00:00
skodak 244368e643 fixed default values and types of requested teacher and student strings 2006-09-11 21:24:57 +00:00
skodak 8dcc447689 fixed funny continue button during installation 2006-09-11 21:20:47 +00:00
koenr 30cef24b15 updating index files MDL-3484 2006-09-11 21:14:12 +00:00
skodak 6ec7ca0f07 fixed handling of selected language in installer; fixed selection of session language 2006-09-11 20:41:49 +00:00
koenr 4cf65d091c updating index files MDL-3484 2006-09-11 20:21:54 +00:00
skodak 2b156ffbf3 old admin block not added into frontpage during installation anymore, it is not removed during upgrade. 2006-09-11 20:05:31 +00:00
skodak 4da8ff666b wiki now using new groups parameter in get_users_by_capability() 2006-09-11 20:01:17 +00:00
skodak 5f02cb4b44 lams conversion to new roles framework 2006-09-11 19:54:11 +00:00
skodak 55f3a4db69 removed useless "changes saved" messages from redirects in administration and user management 2006-09-11 18:56:41 +00:00
stronk7 5f7053955a Some new strings to display PHP code. 2006-09-11 15:51:13 +00:00
stronk7 a05452e942 teachergraded belongs to workshop_assessments, not to workshop. ;-) 2006-09-11 15:38:51 +00:00
stronk7 c8e4134bc9 teachergraded belongs to workshop_assessments,
not to workshop_submissions ;-)
2006-09-11 15:33:51 +00:00
stronk7 c5a6ae177a Initial verion. Not working yep but I needed to send it now. 2006-09-11 13:15:36 +00:00
nfreear 8ea144bf77 Fixes MDL-6516, "Error on logs page because of mess in mdl_log_display table" 2006-09-11 11:40:43 +00:00
toyomoyo 1c45e42e3c adding capabilities 2006-09-11 08:56:23 +00:00
moodler 25b0fd8ec8 New tags 2006-09-11 08:42:55 +00:00
moodler 9e7f597e49 Updated some docs 2006-09-11 08:25:49 +00:00
moodler 8350325842 Some missing strings I forgot to check in 2006-09-11 08:24:40 +00:00
moodler bcf0138ded Automatic installer.php lang files by installer_builder (20060911) 2006-09-11 08:09:58 +00:00
toyomoyo 39b3e7dedf adding capaility, fixing indenting and logic (could have broken things) 2006-09-11 07:17:10 +00:00
moodler 4ae6d4115f New hook for Moodle 1.7 enrolment plugins 2006-09-11 07:09:41 +00:00
skodak 3435f39bab validate local redirection actions in jumpto.php SC#310 2006-09-11 06:47:38 +00:00
vinkmar c235598d6a Added feature from MDL-6439. A validate method is now supported for admin_configtext objects, and paramtype can now be a regex to validate against. 2006-09-11 05:06:38 +00:00
vyshane 6e89ca5527 Fix for MDL-6405 2006-09-11 03:13:52 +00:00
mark-nielsen 831f6613a8 Very minor changes 2006-09-10 22:50:43 +00:00
mark-nielsen 68a1e8fbba Started to rework the overall page editing interface for teachers. 2006-09-10 22:47:57 +00:00
mark-nielsen 82c57929b0 Added lang entries for Collapsed editing 2006-09-10 22:40:41 +00:00
skodak 451d82c840 move newly created admin_tree block to the left column during upgrade from 1.6 2006-09-10 22:11:46 +00:00
skodak d541baa141 fixed courseid typo 2006-09-10 22:01:39 +00:00
koenr 30b73673ba typo 2006-09-10 21:11:57 +00:00
koenr a79bc11152 updating index files MDL-3484 2006-09-10 21:11:43 +00:00
skodak aa893d6b76 fixed several bogus errors and warnings during installation and upgrades, forced logout when upgrading from 1.6 2006-09-10 21:10:48 +00:00
stronk7 2ebd596764 Avoid one minor error when tables hasn't comments to be defined. 2006-09-10 21:05:55 +00:00
skodak e46c09873a fixed warning during initial install when creating admin roles 2006-09-10 20:29:44 +00:00
skodak ee3cc9951c basic conversion of old wiki to new roles framework 2006-09-10 19:44:28 +00:00
mark-nielsen 07642aef3e Minor changes 2006-09-10 19:09:25 +00:00
stronk7 a84634a1d4 improved display of errors... 2006-09-10 18:53:47 +00:00
mark-nielsen 8f2f1d4761 Fixed display bug for branch tables and moved message setting to the bottom of continue.php to prevent double message setting when a redirect is called. 2006-09-10 18:50:59 +00:00
stronk7 7ac75a8f61 tests are tests 2006-09-10 18:43:51 +00:00
stronk7 091789788f Linking to the tests from the main page. 2006-09-10 18:42:23 +00:00
mark-nielsen c94d37997d Removed action set to navigation because view.php no longer uses action 2006-09-10 18:41:38 +00:00
stronk7 f4bb0ad8f7 Adding support for tests of DDL statements within the XMLDBEditor 2006-09-10 18:41:34 +00:00
stronk7 83a78d9d17 PHPDoc update. 2006-09-10 18:37:57 +00:00
stronk7 b8359f7965 Adding options for continue and feedback to all the DDL functions. 2006-09-10 18:36:50 +00:00
mark-nielsen 5631925a26 Started to separate out logic and presentation in view.php. Decided to wrap the question printing with HTML templates (viewstart.html and viewend.html)
Still needs a lot of work
2006-09-10 18:19:29 +00:00
skodak fefea008bc fixed errors when switching dbsessions from amin gui 2006-09-10 11:15:31 +00:00
skodak b6508d6344 fixed proper redirection url in login - missing trailing slash for directory 2006-09-10 11:04:17 +00:00
moodler 613bbd7c2b Moving deprecated functions out of datalib.php
Many of these still need updating to remove all dependence on user_xxx tables
2006-09-10 07:07:52 +00:00
gbateson c73eb55dcc correct formatting of "Show Legend" -> "No" and added missing <p> in "Encoding" explanation 2006-09-10 05:34:02 +00:00
gbateson ce33e12da1 remove reportselector.html as it was unused and has been replaced by reportcontent.html and reportformat.html 2006-09-10 05:29:24 +00:00
mark-nielsen a4452c8a14 Added better lang strings for output in view.php 2006-09-10 04:35:12 +00:00
mark-nielsen fb992d716a Started to reorganize view.php 2006-09-10 02:38:09 +00:00
mark-nielsen 15f3d44ae7 Moved teacherview (lesson editing) out of view.php into edit.php
No code improvements in edit.php as of now.  Just works ;)
2006-09-10 02:09:14 +00:00
mark-nielsen 9695a91e2f Fixed sesskey problem 2006-09-10 01:43:24 +00:00
mark-nielsen 8d1b4ee7b5 Added proper page comments and inform user when attempts have been deleted 2006-09-10 01:40:38 +00:00
mark-nielsen d2d7f39064 Added page comment and lang entry for reports.php 2006-09-10 01:37:50 +00:00
mark-nielsen 35b179fa73 Updated to use new handy library functions 2006-09-10 01:30:57 +00:00
mark-nielsen d1b025d013 Moved high scores logic out of view.php into highscores.php
Changed: now need to enter password on password protected lessons before being able to view high scores
Added logs to high scores and reworked logic
2006-09-10 01:20:00 +00:00
mark-nielsen 8def4a4ea2 Changed some lang entries for high scores feature 2006-09-10 01:17:30 +00:00
mark-nielsen 09e3b9d7eb Fixed some formatting when clock is not displayed
Messages are now printed out on continue.php
2006-09-09 22:33:34 +00:00
mark-nielsen 2163c22634 Forgot the lesson_ prefix 2006-09-09 22:23:50 +00:00
mark-nielsen 2cb24b647c Improved clock output and works when javascript is disabled 2006-09-09 22:20:51 +00:00
mark-nielsen 259990d2c6 Lesson buttons should now work with javascript disabled
Also improved the layout of action/continue.html
2006-09-09 21:39:11 +00:00
stronk7 d6745c7087 Now we are using the new sql_order_by_text() function
when we need to be able to order by TEXT columns in a
cross-db behaviour. More info:
http://docs.moodle.org/en/XMLDB_Problems#ORDER_BY_text_columns
2006-09-09 13:53:52 +00:00
stronk7 5f45d2ae80 New function sql_order_by_text() to automatically build
custom expresions to being used in ORDER BY clauses with
TEXT columns.
2006-09-09 13:51:40 +00:00
mark-nielsen 3466ae4f14 Cleaned up output to user. Still needs a lot of work. 2006-09-09 02:10:40 +00:00
mark-nielsen f15eb92c2c Removed essay grading code from view.php into essay.php. 2006-09-09 01:58:48 +00:00
mark-nielsen e6bfc97018 Added a few lang entries and modified one or two 2006-09-09 01:55:57 +00:00
mark-nielsen 6e1ff5c8fb MDL-6477: Added roles support.
Also added lesson_set_message() and lesson_print_message() to locallib.php
Also fixed problem in continue.html with not printing nextpageid
2006-09-08 23:17:18 +00:00
stronk7 ccfc5ecca1 Only send contexts to cache if the aren't empty. At initial installations
some empty contexts were being cached and used later, causing insertion
of null values to every DB but MySQL.
2006-09-08 19:28:03 +00:00
skodak a13d2157f4 fixed wrong placement of comma 2006-09-08 15:53:24 +00:00
skodak cbba1191ed fixed typo - trailing backslash 2006-09-08 15:51:11 +00:00
thepurpleblob 04d677f2e9 Merged from STABLE 2006-09-08 10:27:48 +00:00
toyomoyo 51792df056 adding capabilities 2006-09-08 08:46:26 +00:00
vyshane 46943f7b78 Seems that the unassign_capability function signature was changed without updating the call to that function in capabilities_cleanup(). Fixed. 2006-09-08 02:33:02 +00:00
mchampan 0d46c846da Fixed couple bugs in query, and improved logic of querylib. 2006-09-08 01:18:48 +00:00
stronk7 3a27bb0575 Modify a bunch of INSERTs to avoid using empty fields
to allow Oracle to avoid the NULLs = empty problem.
2006-09-07 23:50:47 +00:00
stronk7 e20d180c11 DIRTY HACK to convert back all the ' ' (1 space) field contents
back to '' (empty string) in order to allow Oracle to work, more
or less until all the not real NOT NULL DEFAULT '' fields were out!

TODO: Apply the same hack to some more functions...
2006-09-07 23:48:48 +00:00
stronk7 42ac3ecffc Solving one string concatenation typo (please, test it's ok) and
stripping the AS keyword from table aliases. You cand find more at:
http://docs.moodle.org/en/XMLDB_Problems#Table_and_column_aliases_-_the_AS_keyword
2006-09-07 20:17:46 +00:00
skodak 42d6be31d1 double redirect prevention - if both 'meta http-equiv' and javascript redirects are used, javascript delay is 3 seconds longer to prevent accidental double redirects. The target page can still be loaded twice in case user clicks the link before the target page gets fully loaded. 2006-09-07 19:40:57 +00:00
skodak 5d3e0e837a removed redirect message, because it was sometimes breaking upgrades due to double redirects 2006-09-07 19:18:48 +00:00
stronk7 3a8c55c3fb Typos + drop table fully supported. 2006-09-07 18:39:43 +00:00
stronk7 8830218f53 Initial support for DROP TABLE adedd. 2006-09-07 17:28:46 +00:00
stronk7 8bb7147620 If one course, hasn't teaches, both under roles and no-roles
installations, default to admin language.
2006-09-07 17:25:06 +00:00
vinkmar 0f4a73b0dd Fixed bug (sectionname mismatch) similar to MDL-6475 2006-09-07 16:15:35 +00:00
moodler 26f9c81507 Fixed a typo (thanks Eclipse) 2006-09-07 15:46:48 +00:00
vinkmar 502871b479 Fixed MDL-6475. 2006-09-07 14:53:07 +00:00
nfreear 22a3b7ccef Fixes bug MDL-6478 "Unit tests (not) working.." 2006-09-07 09:11:55 +00:00
toyomoyo ec7a8b7999 adding capabilities 2006-09-07 08:57:56 +00:00
moodler f43ce1ad1d Added moodle/role:unassignself which replaces $CFG->allowunenroll 2006-09-07 08:35:30 +00:00
stronk7 05a43ba36c Initial RenameTable caller to generators. Not ended by I needed it in CVS now. 2006-09-06 23:05:12 +00:00
stronk7 d05babe913 Initial, unfinished, not working, simple version of rename_table generator.
More coming soon, but I needed it in CVS now!
2006-09-06 23:04:13 +00:00
stronk7 386c23c9da PHP code for dropping and renaming tables added. Note that the DDL
functions doesn't exist yet. ;-)
2006-09-06 22:34:09 +00:00
stronk7 3ab430fbc5 The XMLDBEditor is generating automatic PHP code for create_table 2006-09-06 19:49:13 +00:00
stronk7 aed4e52713 Now indexes are able to return their PHP specs. 2006-09-06 19:47:50 +00:00
stronk7 989a41af6f Now keys are able to return their PHP specs. 2006-09-06 19:43:38 +00:00
stronk7 7b31a94e08 Now fields are able to return their PHP specs. 2006-09-06 19:31:03 +00:00
ethem 6cf30eae96 all static functions in enrolment_plugin_authorize moved to localfuncs.php. So, no need enrol.php. 2006-09-06 15:39:32 +00:00
stronk7 428aa337b8 Disable regexp searches for MSSQL and Oracle 2006-09-06 15:30:11 +00:00
stronk7 8289a52ff0 Now forum searches are working both under MSSQL and Oracle
(in a case-sensitive behaviour for Oracle, see code comments and
http://docs.moodle.org/en/XMLDB_Problems#Case-insensitive_searches)
2006-09-06 15:29:26 +00:00
skodak 43149d3a9f fixed description of configprotectusernames 2006-09-06 11:36:00 +00:00
skodak e91f3c2d6b fixed missing if (! 2006-09-06 10:15:05 +00:00
skodak 6a5a62b096 allow less verbose operation of forget_password.php SC#282 2006-09-06 10:11:24 +00:00
toyomoyo d02eededf7 adding capabilities 2006-09-06 08:55:23 +00:00
vyshane 180f410694 Merged fix for bug MDL-5866. 2006-09-06 08:54:56 +00:00
skodak 6b9a1fec8f initial conversion of workshop to new roles and capabilities framework; groups are not functional yet (did they ever work properly ?) 2006-09-06 08:41:47 +00:00
moodler b649a19e20 Some tidying up of admin blocks 2006-09-06 05:24:35 +00:00
mark-nielsen c5a2e12f08 Added $Id$ to files
Header is not printed for all actions.  Related to MDL-5403
Some redundant code removed
First attempt at separating logic and presentation in action continue (continue.html)
2006-09-06 04:04:42 +00:00
mark-nielsen 9fcf51d9bf Added function for printing a standard header for lesson
Added function for fetching course module, course and lesson based on course module id or lesson id
2006-09-06 04:02:02 +00:00
vinkmar 7683a0377d removed pause during redirect when there are no new settings 2006-09-06 02:36:38 +00:00
vinkmar 8f89a26c21 * removed hard-coded language strings (MDL-6448)
* replaced some remaining tabs with spaces
2006-09-06 02:23:23 +00:00
vinkmar 7f35bd73b4 removed hard-coded language strings (MDL-6448) 2006-09-06 02:20:16 +00:00
vinkmar dad4a3ff0b added strings for MDL-6448 2006-09-06 02:18:51 +00:00
moodler 6d0bd10c0a A temporary icon for roles (needs work!) 2006-09-06 02:16:48 +00:00
toyomoyo 26663a2386 replacing isteacher with viewfullname capability 2006-09-06 02:14:20 +00:00
moodler d4649c76cc Removed some tabs 2006-09-06 01:43:54 +00:00
skodak c3768dfc70 testing forced conversion to proper numeric type in _adodb_column_sql() SC#259 2006-09-05 23:59:25 +00:00
stronk7 9eabd190c1 Now forum_get_discussions() is using $limitfrom and $limitnum 2006-09-05 22:37:56 +00:00
skodak c5836b7814 fixed typo 2006-09-05 22:34:25 +00:00
stronk7 b66458257d Adding support for MSSQL and Oracle in this select. Not really sure why we need one OUTER
join there, if every discussion has one usermodified but.....not time now.
2006-09-05 22:31:13 +00:00
stronk7 3c4f35e645 Mark as deprecated the sql_paging_limit_function() 2006-09-05 21:42:20 +00:00
stronk7 93a89227fd One less use of old LIMIT clause. Now logs are working properly. 2006-09-05 21:40:17 +00:00
skodak dbe7e58274 I spent 2 hours looking for this typo :-D 2006-09-05 20:45:57 +00:00
stronk7 5de6e614d4 No need to specify DISTINCT because u.* guarantees unique ids.
Also, DISTINCT clauses cannot be used with TEXT/BINARY columns
on MSSQL and Oracle.
2006-09-05 19:04:33 +00:00
stronk7 405bc45cf6 No need to specify DISTINCT because u.* guaranties distinct by id. 2006-09-05 19:01:41 +00:00
stronk7 270643ca72 Modified get_users_by_capability() call to use the new limit
parameters and cleanup a bit of code.
2006-09-05 18:57:37 +00:00
stronk7 0441764040 Changed the get_users_by_capability() function to work with
1.7 DB compatible limit sentences.
2006-09-05 18:55:16 +00:00
stronk7 3c242a66f5 Now get_records_sql() supports limitfrom and limitnum.
Required to kill all those hardcoded LIMIT x,y clauses.
2006-09-05 18:53:08 +00:00
stronk7 e4697bf7dc Both Oracle and MSSQL don't like double quotes for literals. 2006-09-05 18:06:53 +00:00
stronk7 bc942ab58a Added support to retrofit tables without prefix 2006-09-05 17:55:59 +00:00
stronk7 415280bfc3 Added the adodb_logsql table to the XMLDB schema. It's a bit
exceptional because it hasn't prefix and originaly it hasn't
any PK, although we have added it here to be more Moodle-like.
Tested and seems to work properly with the new field.
2006-09-05 17:20:24 +00:00
stronk7 2e2a396ca3 Added to the generators the ability of prevent adding prefix for some tables.
(needed by adodb_logsql)
2006-09-05 17:17:49 +00:00
stronk7 88ab6ab46b Deleted duplicate table label2 from XMLDB schema 2006-09-05 16:09:15 +00:00
stronk7 ea7f147ef5 Now the sessions2 table is UTF8 migrated ok. 2006-09-05 16:04:50 +00:00
moodler 957861f785 Better robustness and basic checking for get_parent_contexts 2006-09-05 09:30:40 +00:00
moodler 43c5b272af New string for blocks 2006-09-05 09:16:19 +00:00
moodler dbed4286da Cleaned up headers when editing roles for blocks 2006-09-05 09:15:52 +00:00
toyomoyo 3924b9884b adding capabilities 2006-09-05 08:50:23 +00:00
skodak e778a40617 minor include cleanup 2006-09-05 08:27:14 +00:00
moodler 91be52d78e Get the block name correctly 2006-09-05 06:30:12 +00:00
moodler ccbdfdc720 Just changed the order around a bit 2006-09-05 06:13:53 +00:00
moodler 2244c22d72 Use the new config variable as a default for paging 2006-09-05 06:11:48 +00:00
moodler 42093cca5c Added coursesperpage so paging can be controlled 2006-09-05 03:28:25 +00:00
moodler 61647ccb92 Use the defaultsetting if the variable isn't set yet 2006-09-05 03:27:08 +00:00
moodler 75e8eaebe7 Merged MDL-6431 into HEAD 2006-09-05 03:15:09 +00:00
vyshane 4729012f4c Fixed warning 2006-09-05 03:07:56 +00:00
cap2501 c572cc4dc6 updates to accommodate changes to commands.php 2006-09-05 00:50:08 +00:00
cap2501 5be392bd10 Updated so nothing in the database is being manipulated directly except for the block position. look into moving this functionality into the blocks_execute_action. 2006-09-05 00:47:47 +00:00
stronk7 ccda38e521 Don't use db_lowercase() anymore. 2006-09-04 22:45:12 +00:00
stronk7 6b4b356f82 Using the standard sql_as() function, although it could be not used. 2006-09-04 22:42:56 +00:00
stronk7 95f610334e Mark two functions as deprecated because that's standard now. 2006-09-04 22:40:42 +00:00
stronk7 fda5418401 $CFG required. 2006-09-04 22:30:56 +00:00
stronk7 010f2a3977 Typo! :-( 2006-09-04 22:17:28 +00:00
stronk7 bf05229983 MSSQL only runs under UTF8 (with the correct ODBTP driver, of course) 2006-09-04 22:16:30 +00:00
stronk7 94ef00f3bb MSSQL and Oracle don't want DISTINCT clauses over TEXT/BINARY fields.
In this case, we simply delete it because SELECT g.* guarantees unique
records to be retrieved by the first field.
2006-09-04 22:05:58 +00:00
vinkmar 8f5c4adbd7 Changed so that the settingpage titles are shown (see MDL-6402) 2006-09-04 21:38:23 +00:00
stronk7 fea43a7f51 Casting $course->modinfo to string prevents one notice to
be showed when it's null, returning false as desired.
2006-09-04 21:12:37 +00:00
stronk7 0703d22ede One less reserved word. glossary->comment is out! 2006-09-04 20:37:27 +00:00
skodak 4b83ec33fe merging collisions cleanup 2006-09-04 20:32:59 +00:00
stronk7 d0d5525d93 Included course/lib.php to be able to rebuild_course_cache()
It was working until some time ago, but now it's required.
2006-09-04 19:33:27 +00:00
stronk7 71db9136fb Now the temp backup directory is properly created/cleaned
and indexes info are properly stored there.
2006-09-04 19:27:53 +00:00
ethem 9456e4b7be *** empty log message *** 2006-09-04 12:31:54 +00:00
ethem b4efae98b4 New strings for echecks. 2006-09-04 12:25:21 +00:00
ethem 131a7ca81b New config: Echeck bank account types enabled. 2006-09-04 12:09:30 +00:00
ethem 4d072568c0 New string: adminaccepts; Select payment methods allowed and their types 2006-09-04 12:09:25 +00:00
ethem 460635599a Autoconfigure accepted echeck bank account types. CHECKING, BUSINESSCHECKING, SAVINGS 2006-09-04 09:44:00 +00:00
toyomoyo cc398c7262 adding caapabilities 2006-09-04 08:45:08 +00:00
moodler 6ea5ff3ab7 Make Moodle Docs work for settings pages 2006-09-04 08:33:57 +00:00
moodler c2da075758 Further reductions in logic to deprectaed functions 2006-09-04 08:31:07 +00:00
vyshane 1795175972 Re-worded comment to make more sense 2006-09-04 08:19:23 +00:00
moodler dd46fc5daa Just some small doc changes 2006-09-04 08:15:48 +00:00
vyshane b331040e9e TCPDF pdf library 2006-09-04 08:11:37 +00:00
vyshane 713b20faae Wrapper class with modifications to TCPDF for Moodle usage. 2006-09-04 08:10:08 +00:00
skodak 6d574c33b4 fixed missing global $USER 2006-09-04 08:01:57 +00:00
ethem 039edfab07 This merchant accepts eCheck (ACH) transactions only; no credit card transactions are accepted. 2006-09-04 07:51:15 +00:00
ethem f1b31fb517 Allow all payment methods as default: AN_METHOD_CC, AN_METHOD_ECHECK
authorizenetlib.php autoconfigures payment method as AN_METHOD_CC if the merchant doesn't accept AN_METHOD_ECHECK. First real echeck transaction is enough for this.
2006-09-04 07:33:11 +00:00
ethem 07c48fcff6 Error message isn't shown when user clicked button without key if course key is set. 2006-09-04 07:09:44 +00:00
toyomoyo 2acc290c17 legacy functions to use 4th parameter to by pass doanything capability 2006-09-04 04:50:12 +00:00
moodler be7ed5f8a8 Merged confirmation email fix from stable 2006-09-04 02:30:52 +00:00
stronk7 dcb8916f2d notice() should be allowed at install/upgrade. It stops the whole
process without need to do it. Changed to notify().

Thanks to one "orphan" forum in moodle.org (234) we detected this.
2006-09-03 22:32:14 +00:00
stronk7 446a78cd4a notice() should be allowed at install/upgrade. It stops the whole
process without need to do it. Changed to notify()
2006-09-03 22:30:13 +00:00
stronk7 56b4d70d58 typo ;-) 2006-09-03 21:43:37 +00:00
stronk7 afc36fdf2e Patch submitted by Ethem:
Error message isn't shown when user clicked without key.
Multienrol is enabled (course enrol key with authorize)

This patch allows showing error message when user clicked button without key.
2006-09-03 20:16:24 +00:00
stronk7 71c143f41e The custom function to convert the user table hasn't to drop/create indexes anymore.
It's handled automatically by the main utf8 script.
2006-09-03 19:20:01 +00:00
stronk7 763989c0d6 Now, the UTF8 migration doesn't rely one indexes specified in the .xml files. Instead,
for each table, it fetches all the existing indexes from db, drop them all and, after
utf-8 conversion, rebuilds them.

With this, all the indexes will be exactly the same than the original present in DB, no matter
of their names nor anything else.

So, starting now, to provide a sucessful UTF8 migration we only have to keep updated the
fields .xml info. Bye, bye indexes info.
2006-09-03 19:18:00 +00:00
skodak 15ad37459a fixed language string 2006-09-03 19:13:53 +00:00
skodak 64c4f9c443 minor fix 2006-09-03 18:53:07 +00:00
skodak 08c15b68d7 removed useless includes 2006-09-03 18:49:13 +00:00
skodak b1631fef28 add admin_tree to front page during install and upgrade 2006-09-03 18:37:41 +00:00
stronk7 4762bff7a3 Added the feedback attribute to the execute_sql_arr() function. 2006-09-03 17:56:34 +00:00
skodak e9a207595c allow deleting of block when original code not present 2006-09-03 17:46:27 +00:00
moodler 460a7a6271 Cutting down on the debug notices 2006-09-03 16:31:46 +00:00
moodler 7191a1fa27 Added capability for showing documentation links 2006-09-03 16:26:55 +00:00
moodler 72df7e1ebd Merging $CFG->disablestatsprocessing from stable 2006-09-03 15:46:21 +00:00
stronk7 de48394039 Prevent NULL fields in 1.7 to become NOT NULL after the UTF-8 migration process. 2006-09-03 15:33:42 +00:00
skodak f21def1f11 fixed collisions in merges, sorry 2006-09-03 15:21:46 +00:00
moodler 11737b8bfa Fixed module links to suit new admin/*.php file page names 2006-09-03 15:13:53 +00:00
moodler 1ea1bcb36b New admin menu files 2006-09-03 14:52:43 +00:00
moodler de093f77a6 Proper log index.php so that admin pages work correctly 2006-09-03 14:52:23 +00:00
moodler bee4702d10 Various tidying up of the admin pages.
Reports now don't need mod.php but they should include the admin headers/footers.

There are undoubtedly bugs in this but this framework should be more sane
2006-09-03 14:45:57 +00:00
moodler 996a5f8d76 These files still need tidying 2006-09-03 14:43:41 +00:00
skodak 50999a0b94 new admin block fixes and reorganisation - I guess we need something more traditional for now 2006-09-03 13:10:56 +00:00
gustav_delius b7ef492c41 Take out invalid </tr>. While this makes the html valid some work should still be done on the layout of this. 2006-09-03 12:23:11 +00:00
gustav_delius 5b3df41fd9 The file countries.php does not exist in lang/en, only in lang/en_utf8. Therefore the fallback default in the function get_list_of_countries() should always be en_utf8. 2006-09-03 11:38:45 +00:00
moodler 51df210337 Upgrade_log stuff needed adminlib.php included 2006-09-03 09:00:13 +00:00
moodler d90f5d7b01 New tags file 2006-09-03 08:56:05 +00:00
moodler fc8db0e791 Use proper way to get config values :) 2006-09-03 08:48:39 +00:00
moodler 4d2401d524 Removed student view 2006-09-03 08:46:30 +00:00
moodler dc411d1be0 Fices bug when loading another user's capabilities (it would trash your own) 2006-09-03 08:45:41 +00:00
moodler d5a0163891 Removed student view completely until a roles-ased replacement can be made 2006-09-03 08:10:51 +00:00
moodler c4d0753b25 Moving deprecated functions to deprecatedlib.php from moodlelib.php and
some cleanups around the place.

Many of the functions in deprecatedlib.php have been rewritten to work with
the new roles and capabilities so that they can still work as well as possible.
2006-09-03 08:10:10 +00:00
moodler 02bd14a7ed Tidy-ups 2006-09-03 08:03:02 +00:00
moodler e084b2f98b Replaced forum_get_user() with forum_add_user_default_subscriptions() 2006-09-03 08:01:48 +00:00
moodler 1911105fa1 Fixed typo 2006-09-03 08:00:03 +00:00
moodler 7700027f40 Improvements to load_notloggedin_role for robustness and clarity.
More checking in role_assign and calling of forum_add_user_default_subscriptions
2006-09-03 07:56:40 +00:00
skodak 6eb4f82357 fixed missing return in assign_role() 2006-09-03 07:29:06 +00:00
skodak 7fbd539a18 version bump for db upgrades 2006-09-03 00:00:17 +00:00
skodak 02cc05a708 fixes for new admin blocks 2006-09-02 23:55:56 +00:00
stronk7 623942afff Allowinng tables to create fields/keys/indexes using the one-pass-setters 2006-09-02 23:52:55 +00:00
stronk7 76fd473623 Added one-pass-setters for fields/keys/indexes. 2006-09-02 23:51:39 +00:00
stronk7 cb62712c6d Added some used strings 2006-09-02 23:49:02 +00:00
stronk7 4dc4dde9e2 First implementation of the create_table() function. Simple. 2006-09-02 23:48:02 +00:00
stronk7 228d8c20d7 New function execute_sql_arr() to execute arrays of
statements, Used by ddllib.php mainly.
2006-09-02 23:46:43 +00:00
stronk7 b0c7d55893 Skeleton of the view_php helper. 2006-09-02 23:44:06 +00:00
stronk7 3430fb2993 Only launch the old upgrade if it exists. It doesn'texist for new DB
flavours and modules.
2006-09-02 23:40:13 +00:00
stronk7 ec87d0474f Don't asume that table and column exist in the migration process.
Just to avoid some warnings.
2006-09-02 23:38:16 +00:00
stronk7 1331745826 course_sections->summary and course_sections->sequence can be NULLable (experimenting....) 2006-09-02 22:37:38 +00:00
skodak 4672d9557d added prune() to admin tree class to prevent errors in applying of backup defaults 2006-09-02 19:30:54 +00:00
skodak e0f6e99528 fixed frontpagesettings, install is not useing admin/site.php anymore 2006-09-02 15:29:52 +00:00
skodak a4b473f452 fixed site defaults, reorganized administartion tree - new category legacy for obsoleted settings 2006-09-02 15:05:27 +00:00
ethem be59e14b9e Remove +}
I like this format:
{
}

not {
}
2006-09-02 15:05:10 +00:00
ethem 134c20fb14 Link to CVV help 2006-09-02 14:28:55 +00:00
ethem dedc048c92 CVV 2006-09-02 14:26:17 +00:00
ethem d019150d5b Link to ABA help 2006-09-02 14:11:54 +00:00
ethem e44aa47ceb ABA help 2006-09-02 14:11:51 +00:00
ethem f6a1084c8b ABA help 2006-09-02 14:08:31 +00:00
ethem 6ce17f1ff0 Don't show "Notice: Undefined property: paymentmethod" 2006-09-02 13:42:28 +00:00
skodak e95b2c1c6d fixed missing } 2006-09-02 13:39:27 +00:00
skodak 6e4dc10f54 deglobalization of $ADMIN; merged admin/adminlib.php into lib/adminlib.php; fixed includes and some other minor fixes 2006-09-02 13:14:57 +00:00
ethem 5b7e05d646 Submit buttons (ccsubmit, echecksubmit) are no longer used. Hidden field paymentmethod is enough for checking forms. 2006-09-02 13:09:21 +00:00
ethem c8716d80e2 Better handling of forms and configs. 2006-09-02 12:37:01 +00:00
ethem e3949d06af Moved all static functions in authorize class to localfuncs.php as normal function.
Removed abaval.php and ccval.php, because functions in these files moved to localfuncs.php.
2006-09-02 11:49:02 +00:00
skodak 86a1ba04fd replace all uses of isset($USER->id) with empty() to allow proper operation of $CFG->notloggedinroleid hack 2006-09-02 11:44:04 +00:00
skodak 741fee9bb0 more install time fixes for new admin code 2006-09-02 11:26:33 +00:00
skodak 99c8a1004d fixed defaults for backups during installation 2006-09-02 11:10:10 +00:00
stronk7 803b4eeffe Now, not null fields are respected by the UTF-8 migration process. Also,
for those NULLable fields, if the default was '', convert it to null (i.e.
disable de default).
2006-09-02 10:04:22 +00:00
skodak 35a518c5de fixed admin defaults, some warnings during install and added trmporary hack to make $CFG->notloggedinroleid work 2006-09-02 10:03:30 +00:00
moodler 73254f625a Automatic installer.php lang files by installer_builder (20060902) 2006-09-02 02:42:41 +00:00
gbateson c2e04a5df1 improve detection of PostgreSQL version number 2006-09-01 22:44:07 +00:00
stronk7 681ba47a59 Only mysql and postgresql show the UTF-8 migration message. 2006-09-01 18:41:30 +00:00
stronk7 d32d63b6e0 Now record_exists_sql() uses the cross-db limit implementation. 2006-09-01 18:33:19 +00:00
stronk7 0be16c1d8c mssql doesn't support aliases nor position numbers in the
GROUP BY clause. Just columns and expressions.
2006-09-01 18:24:09 +00:00
stronk7 8351e29517 Introduced one function to calculate the proper "AS"
keyword for columns. All DB seems to support it but
PostgreSQL require it!
2006-09-01 17:45:02 +00:00
ethem d69ce8d4eb Echecks can not be cancelled.
2 actions only for echecks: auth_capture and credit
2006-09-01 17:16:08 +00:00
ethem 0c76d7e375 New string: paymentmethod 2006-09-01 16:43:52 +00:00
stronk7 e9f02dafca New md5key fields and associated indexes.
Now hotpot should be 100% cross-db. Thanks Gordon!
2006-09-01 15:36:49 +00:00
ethem a2cfb0ec00 FFFFFFFFAAAAAANNNNNNTTTTTAAAAASSSSTTTTTIIIIICCCCC
Echeck is ready for usage. I've been buying access into some test courses by echeck. :-)
2006-09-01 15:18:22 +00:00
ethem 0fae43aa7b + Don't show AVS message if not applicable.
+ Email message that translated instead of english if cc type and payment method will be autoconfigured.
2006-09-01 15:05:36 +00:00
moodler 4dc40740ba New installer lang files. 2006-09-01 14:30:58 +00:00
bobopinna 773534f4a2 Added multi-attemps support 2006-09-01 10:17:01 +00:00
toyomoyo 20aeb4b8e3 utf8 migrate support for site with roles active, resolved isstudent legacy problem, implemented $CFG->notloggedinroleid 2006-09-01 09:25:34 +00:00
ethem 7222c36bf8 * New strings for Authorize.net eCheck.
Authorize.Net provides an exclusive, fully integrated electronic check payment method, eCheck.Net.
Using eCheck.Net, merchants can accept and process payments from consumer and corporate bank accounts
directly from their Web site or through the Authorize.Net Virtual Terminal. By accepting electronic checks,
you expand the payment options available to new and existing customers, enhancing customer loyalty and
potentially increasing sales.

+ Lower Fees - Lower rates than credit cards or PayPal.
+ More Efficient - eCheck.Net does everything online, eliminating the cost and inconvenience of manually
  processing paper checks and waiting for checks in the mail.
+ Fully Integrated Solution - No third-party integration required implementing eCheck.Net is easy
  for merchants already using the Authorize.Net Payment Gateway.
+ Integrated Reporting - Provides a combined view of all eCheck.Net and credit card payment transactions.
  Reconcile payment and billing activity using online reports and statements.
+ Ship Product Sooner - Improved up-front transaction validation that returns the status of transactions faster.
+ Security - Authorize.Net uses the latest 128-bit Secure Socket Layer (SSL) technology for
  secure Internet Protocol (IP) transactions.
2006-09-01 09:04:11 +00:00
gbateson e1af293f5f fix bug MDL_6419 2006-09-01 08:55:43 +00:00
moodler 9aeeb39286 forum subscriptions use capabilities 2006-09-01 06:56:24 +00:00
moodler 9ebcb4d28e if role_assign is called by the current user on themselves, then reload
the capabilities table
2006-09-01 06:30:01 +00:00
moodler 1dc1f03795 More flexible role_unassign() that allows setting of any combination of arguments 2006-09-01 06:10:45 +00:00
gbateson a70b3fbb4c correct the detection of HotPot 2.0 backups (from Moodle 1.5) 2006-09-01 04:24:34 +00:00
gbateson 3044600bf3 add md5key field to end of hotpot_questions and hotpot_strings 2006-09-01 04:20:19 +00:00
gbateson 5048c8d658 fixed typo on line 2 2006-09-01 02:18:41 +00:00
gbateson 1897e3ef95 replace MySQL-only indexes on text fields (hotpot_question.name + hotpot_strings.string) with two new md5key fields (hotpot_question.md5key + hotpot_strings.md5key), which are the MD5 hash of the respective text fields. Microincrement version number to 2006083101 2006-09-01 02:08:39 +00:00
stronk7 5f941d12ab user->description can be NULLable (experimenting....) 2006-08-31 23:31:36 +00:00
stronk7 9b99c05f10 user->description can be NULLable (experimenting....) 2006-08-31 23:20:47 +00:00
stronk7 6c76032bc1 course_categories->description can be NULLable (experimenting....) 2006-08-31 23:17:23 +00:00
stronk7 1d39207fae course_categories->description can be NULLable (experimenting....) 2006-08-31 23:04:15 +00:00
stronk7 17c9113752 This condition was preventing new installs sometimes 2006-08-31 22:42:04 +00:00
stronk7 a0abf36ddd This condition was preventing new installs sometimes. 2006-08-31 22:33:18 +00:00
skodak 441470ff03 fixed problem with applying of default settings during install - choices can not be constructed yet 2006-08-31 22:17:47 +00:00
skodak dd04ab499e fixed default values in apply_default_exception_settings(); several values in lib/default.php are wrong, but I guess we do not need to fix them because it as replaced by the new administration framowork ;-) 2006-08-31 21:50:22 +00:00
skodak 3a25fa7286 'prefix' can only be defined in config.php, it can not be changed or stored in database ;-) 2006-08-31 21:15:12 +00:00
rtcn2 9fb0f61a03 missing comma inserted line 752, removed comma from line 753 2006-08-31 19:47:54 +00:00
stronk7 545196c55f course->modinfo nullable and no default 2006-08-31 19:42:22 +00:00
stronk7 99215f2c6f modinfo nullable and without default. 2006-08-31 19:39:18 +00:00
ethem 79c63c4415 + New ENUM field: paymentmethod(cc,echeck);
Store in database and when calling authorize_action() pass this method. Hence, removed $method=AN_METHOD_CC from this function.
    If a refund will be do, unset($order->paymentmethod); Because this field comes when joining(enrol_authorize)

+ AN_METHOD_CC and AN_METHOD_ECHECK is now lower case, because these fields are stored in database as enum.
  Eloy's response:
   They are lowercase because we decided to use lowercase identifiers everywhere and enum contents are,
   from a DB perspective, identifiers.

  Ok, NP. :)) set_config('an_acceptmethods', strtolower($CFG->an_acceptmethods)); solves this.
2006-08-31 18:24:37 +00:00
tjhunt 6459b8fc8d Give a bit more information to the subclasses. 2006-08-31 16:59:52 +00:00
stronk7 a974b5a4d8 course->modinfo can be NULLable (experimenting....) 2006-08-31 16:59:29 +00:00
tjhunt d3b92b4ba5 MDL-6418 - Grading of multiple choice questions broken 2006-08-31 16:59:05 +00:00
tjhunt 73d4db845e New function choose_from_menu_yesno 2006-08-31 16:55:48 +00:00
skodak 2b53194573 fixed riskbitmask problems, sorry :-( 2006-08-31 16:01:41 +00:00
ethem 555759709c If the method is AN_METHOD_CC submit cclastfour, don't send for ECHECK. 2006-08-31 15:46:53 +00:00
ethem c024e8c6f2 Fixed fixo. 2006-08-31 15:10:24 +00:00
tjhunt 695d225c6a Clarified comment. 2006-08-31 11:28:44 +00:00
bobopinna 77bf0c292d Fixed a typo 2006-08-31 10:37:33 +00:00
bobopinna 0d699c2449 Fixed context selection 2006-08-31 10:29:16 +00:00
skodak 6086e1aab2 removing trustbitmask for now and comment from riskbitmask 2006-08-31 09:20:24 +00:00
thepurpleblob 2bb63d99c2 Fixed syntax error. 2006-08-31 09:17:57 +00:00
toyomoyo 4f83ae95ca adding capabilities 2006-08-31 08:51:09 +00:00
skodak be4486da83 capability riskbitmasks and user trustbitmask patch #1 see MDL-6412 2006-08-31 08:36:36 +00:00
bobopinna 2b3447c38a Added capability support 2006-08-31 08:34:13 +00:00
moodler 86cbff7abd Clean up for role_assign() 2006-08-31 08:30:28 +00:00
ethem 9f7f87a9a6 If the merchant does not accept ACH (echeck) method, set default payment method as AN_METHOD_CC. 2006-08-31 08:06:19 +00:00
moodler f44152f44c Added "enrol" parameter to role_assign which records how this assignment
was made
2006-08-31 07:58:53 +00:00
skodak eb744c5ef7 redirect() now always respects delay 0 if specified + some minor changes 2006-08-31 07:45:58 +00:00
moodler a9e1c058d5 More robustness fixes for accesslib 2006-08-31 07:40:48 +00:00
ethem fde7c9dfc5 Added Echeck UI validation. 2006-08-31 07:11:31 +00:00
moodler c5ddc3fd8b More defensive get_parent_cats() 2006-08-31 05:06:30 +00:00
moodler 5f70bcc3a0 Some robustness when loading capabilities 2006-08-31 04:17:51 +00:00
moodler cf0b6604e0 Removed tabs
This block still needs work to merge with the new admin pages
2006-08-31 04:00:01 +00:00
stronk7 4782a1f8bc Minor modifications to oci8po generator (max 38 for number) 2006-08-31 00:19:57 +00:00
stronk7 790647b950 Block plugin tables can use the XMLDB install & upgrade 2006-08-31 00:02:06 +00:00
stronk7 1164af7cf5 Block core blocks tables can use the XMLDB install & upgrade 2006-08-30 23:18:29 +00:00
stronk7 015e946d98 Small rework of the main install/upgrade script. Everything should
continue working as before.
2006-08-30 23:13:43 +00:00
cap2501 62cb403260 Updated front-end display to accurately represent how moodle is handling things on the backend. 2006-08-30 21:39:09 +00:00
cap2501 305f223035 Switched over to using moodle commands instead of direct DB manipulation for everything but blocks(still working on that one). 2006-08-30 21:38:23 +00:00
stronk7 94ab72f8b0 Now backup tables can use the XMLDB install & upgrade 2006-08-30 20:41:37 +00:00
stronk7 450cf307ea Triple "l" were preventing new installations to be executed for plugins. 2006-08-30 20:27:29 +00:00
stronk7 7c006e345a Minor separations... 2006-08-30 20:13:46 +00:00
stronk7 e79a09a259 Now plugins (qtypes and enrols) can use the XMLDB install & upgrade 2006-08-30 19:52:16 +00:00
ethem a1c4676cf1 User fields for ECHECK 2006-08-30 19:38:28 +00:00
cap2501 ff96b9df7e Added the 'delete' methods back nessicary to change $field to optional. 2006-08-30 19:22:34 +00:00
ethem 2c50dc0b63 Some UI stuff for ECHECK 2006-08-30 19:12:28 +00:00
ethem 35f4a0772a Autoconfigure credit card types. This is not a Makefile :))) 2006-08-30 18:59:53 +00:00
stronk7 81465066c2 Just "normalizing" index names inside the XMLDBEditor. Not critical but...
Following rule 1.3 from:
http://docs.moodle.org/en/XMLDB_Defining_one_XML_structure#Conventions
2006-08-30 17:17:39 +00:00
stronk7 2813c04ba9 One new error string added. 2006-08-30 17:14:57 +00:00
ethem e2863967c6 Added ABA validation funtion. 2006-08-30 17:14:32 +00:00
stronk7 b4f3a93b01 Improve save file, showing the proper error if not writeable. 2006-08-30 17:12:00 +00:00
skodak e9d5166a3e fixed wrong type for session data field in mysql, enabled feedback when dropping old session table during upgrade 2006-08-30 16:37:52 +00:00
stronk7 393e7cc373 where BIG should be LONG... 2006-08-30 16:14:44 +00:00
stronk7 914597ee9f ...where = should be == ... 2006-08-30 16:06:16 +00:00
tjhunt 1680ebe40b Eliminate an isteacheredit 2006-08-30 15:52:11 +00:00
ethem d1b86e65cc Some documentation. 2006-08-30 14:33:31 +00:00
ethem edbe60abb6 Deleted comment. 2006-08-30 14:16:45 +00:00
ethem 75bb06e0aa Some UI changes. 2006-08-30 14:06:40 +00:00
ethem 6b1d27020d Ported AUTHORIZE_ECHECK changes into HEAD. (cvs update -j HEAD -j AUTHORIZE_ECHECK)
* New Feature (Authorize.net eCheck)

Authorize.Net provides an exclusive, fully integrated electronic check payment method, eCheck.Net.
Using eCheck.Net, merchants can accept and process payments from consumer and corporate bank accounts
directly from their Web site or through the Authorize.Net Virtual Terminal. By accepting electronic checks,
you expand the payment options available to new and existing customers, enhancing customer loyalty and
potentially increasing sales.

+ Lower Fees - Lower rates than credit cards or PayPal.
+ More Efficient - eCheck.Net does everything online, eliminating the cost and inconvenience of manually
  processing paper checks and waiting for checks in the mail.
+ Fully Integrated Solution - No third-party integration required implementing eCheck.Net is easy
  for merchants already using the Authorize.Net Payment Gateway.
+ Integrated Reporting - Provides a combined view of all eCheck.Net and credit card payment transactions.
  Reconcile payment and billing activity using online reports and statements.
+ Ship Product Sooner - Improved up-front transaction validation that returns the status of transactions faster.
+ Security - Authorize.Net uses the latest 128-bit Secure Socket Layer (SSL) technology for
  secure Internet Protocol (IP) transactions.


== TO DO ==

- Generate Echeck forms.
- Show users a echeck option if admin enabled echeck method.
- Allow admins/teachers to enrol a student using echeck method (FIX: role consept)

==========
2006-08-30 10:29:10 +00:00
skodak d78f25b8c0 fixed missing semicolon typo 2006-08-30 09:17:40 +00:00
skodak e1ecc9fbbe imported newer PCLZIP library; added directory restriction to our own security checks 2006-08-30 08:51:57 +00:00
toyomoyo 81e956b964 added some capabilities 2006-08-30 08:43:17 +00:00
skodak 849bbccfbb ADODB v4.92a import 2006-08-30 08:12:11 +00:00
skodak 61212e3f96 better input validation in files/index.php SC#307 2006-08-30 08:03:12 +00:00
skodak 02b22073b8 more appropriate type for locale setting 2006-08-30 07:42:42 +00:00
toyomoyo 247cdeb68f utf8 migrate support for additional fields MDL-6339 2006-08-30 06:12:12 +00:00
moodler 2328673a12 Automatic installer.php lang files by installer_builder (20060830) 2006-08-30 02:44:42 +00:00
stronk7 13c2ed6410 Removing DTD and XMLSchema. It's under lib/xmldb 2006-08-30 00:11:36 +00:00
stronk7 758537ef2a relative+cleaned paths 2006-08-30 00:10:08 +00:00
stronk7 ee7de32ea3 relative+cleaned paths 2006-08-29 23:53:46 +00:00
stronk7 fc3221015d relative+cleaned paths 2006-08-29 23:45:08 +00:00
stronk7 2a05e82571 relative+cleaned paths 2006-08-29 23:33:55 +00:00
stronk7 68905e201b relative+cleaned paths 2006-08-29 23:29:28 +00:00
stronk7 8f5b5e4f68 relative+cleaned paths 2006-08-29 23:20:03 +00:00
koenr 51b8bebb7a updating index files MDL-3484 2006-08-29 23:08:28 +00:00
skodak 647a256616 db sessions are now using the newer session handler adodb-session2.php 2006-08-29 22:45:54 +00:00
stronk7 2af2711f79 relative+cleaned paths 2006-08-29 22:45:46 +00:00
stronk7 d81f3415ca relative+cleaned paths 2006-08-29 22:26:57 +00:00
stronk7 077505db10 cleaned paths 2006-08-29 22:21:13 +00:00
stronk7 115a73653a relative+cleaned paths 2006-08-29 22:17:25 +00:00
skodak a68f983779 fixed $zthis typo in postgres7 driver, Eloy is reporting it upstream 2006-08-29 22:06:31 +00:00
stronk7 a0da32e935 Moving getEndedStatements() to the propef function. 2006-08-29 21:57:40 +00:00
stronk7 fd6a294ff6 relative+cleaned paths 2006-08-29 21:26:46 +00:00
stronk7 4317fe985e relative+cleaned paths 2006-08-29 21:07:59 +00:00
koenr 8775961a89 updating index files MDL-3484 2006-08-29 21:02:16 +00:00
stronk7 c080aa88d7 relative+cleaned paths 2006-08-29 20:50:44 +00:00
skodak 5e0ff187c7 better handling of anchor name in docs index SC#306 2006-08-29 20:38:23 +00:00
skodak c0e3c8d2b2 import of new ADODB v4.92 library 2006-08-29 20:23:17 +00:00
stronk7 a199036810 Now the "created" field is refreshed always in the main list. 2006-08-29 19:27:34 +00:00
vinkmar 9fdc896535 adding (slowly) strings from soc admin page cleanup 2006-08-29 17:02:35 +00:00
vinkmar 3a64b2d144 fixed the duplicate "Themes" page (well, not quite duplicate, but confusing nonetheless) 2006-08-29 17:00:23 +00:00
vinkmar f36d9a82b8 adding a more obvious heading to the page :) 2006-08-29 16:59:19 +00:00
ethem 98d415567c If review enabled, get_users_by_capability('enrol/authorize:managepayments') at SYSTEM_LEVEL and send email for a new pending payment. 2006-08-29 14:30:11 +00:00
ethem 70b1aa8071 get_users_by_capability('enrol/authorize:managepayments') and send email for pending orders expiring. 2006-08-29 13:59:35 +00:00
ethem 0c10124755 merged from 16stable 2006-08-29 09:04:03 +00:00
tjhunt 32b0adfade Better comments 2006-08-29 08:57:47 +00:00
toyomoyo f9a59efa64 adding some capabilities 2006-08-29 08:43:59 +00:00
toyomoyo 8493ff6fd5 added acapability 2006-08-29 06:02:29 +00:00
moodler 3511c16cfd Minor change to prevent bugs while Ed works on not needing this parameter at all. 2006-08-29 04:04:12 +00:00
toyomoyo be07f21b61 replaced isguest with capability calls 2006-08-29 03:36:31 +00:00
toyomoyo 0bde63002a adding in capabilities 2006-08-29 03:22:05 +00:00
toyomoyo 38ac07d284 adding capability, indenting, putting in brackets etc 2006-08-29 03:20:51 +00:00
cap2501 d63545d8e8 Fixed errors in refactoring ( rev4, almost there) 2006-08-29 02:34:35 +00:00
moodler 0e4af1664c New param type, PARAM_SEQUENCE for 5,6,7,8,9 2006-08-29 02:26:37 +00:00
vyshane 7b12414814 Fix for bug MDL-6385 2006-08-29 02:09:31 +00:00
cap2501 7c72c2889a updates to accommodate retooled command.php 2006-08-29 02:03:00 +00:00
cap2501 dad4a8e5d7 Fixed errors in refactoring ( rev3, almost there) 2006-08-29 02:02:45 +00:00
cap2501 5281e0ab2a Fixed errors in refactoring ( rev2) 2006-08-29 01:38:58 +00:00
cap2501 6fe72833d0 Fixed errors in refactoring 2006-08-29 01:35:45 +00:00
cap2501 04ba9d5330 updates to accommodate retooled command.php 2006-08-29 01:35:01 +00:00
skodak b735d140ef fixed regex typo in installer 2006-08-28 22:09:44 +00:00
skodak 790fda7b0e show detailed log messages only when debug is not off SC#303 2006-08-28 21:33:21 +00:00
stronk7 840391757e Initial commit of XMLEditor langpack. 2006-08-28 21:33:03 +00:00
skodak d389b12829 create safer .htaccess SC#302 2006-08-28 21:07:43 +00:00
skodak add47d44d0 check suggested dataroot in install.php SC#295 2006-08-28 20:54:16 +00:00
skodak 57e35f328a basic detection of sites with misconfigured dataroot SC#295 2006-08-28 20:11:24 +00:00
mark-nielsen ab8e5428b5 Merged bug fix for MDL-6325 2006-08-28 20:02:49 +00:00
stronk7 8c15ae9958 Moving all the XMLDB stuff from contrib to head. Go, go, go... 2006-08-28 19:50:57 +00:00
tjhunt f0a7247d0e Fix typo. 2006-08-28 18:50:42 +00:00
skodak bad211a3b9 enabletrusttext can not be 1 by default - it is new, not much tested and maybe even insecure feature ;-) 2006-08-28 18:46:37 +00:00
skodak 635c0e0b4a turning on the upgrade in progress check again, added skip warning link 2006-08-28 18:07:15 +00:00
stronk7 683ff5d4f3 Dropping forum.open and forum.assesspublic
(mimic from .sql files)
2006-08-28 16:20:52 +00:00
stronk7 ba05965e5c Messages about missing functions in old and new upgrade are showed
only if the corresponding file exists.
2006-08-28 15:47:45 +00:00
stronk7 b477a2f166 Changing one wrong previous value. 2006-08-28 15:21:41 +00:00
moodler 5bfecd388d Cleaned up the code to remove security issues and to show Ed Coyne
how to use the Moodle API and follow coding guidelines.

I think I broke something but I'm sure Ed can fix it from here!
2006-08-28 14:42:07 +00:00
gustav_delius e57d9d69f7 Small correction in the documentation for the $CFG global 2006-08-28 09:00:38 +00:00
toyomoyo 1648afb278 changes to how to pull out a list of users (course/module participants) 2006-08-28 08:42:30 +00:00
vyshane 7654b2bb08 Added lang string 2006-08-28 07:30:07 +00:00
moodler 9250203ff5 Added a better string as per MDL-6379 2006-08-28 07:12:10 +00:00
moodler b2174cc86b FIxed some file paths 2006-08-28 06:57:40 +00:00
moodler c5eef32d56 New strings for AJAX setting 2006-08-28 06:51:46 +00:00
moodler a0bfbeaae8 Integrated topicsajax into "topics" 2006-08-28 06:49:19 +00:00
moodler 67a3fac51f Added new field 'ajax' to user table, to store AJAX preference 2006-08-28 06:41:05 +00:00
vyshane e823cd13fa Cleanups 2006-08-28 06:36:36 +00:00
vyshane 620e1e5b27 Fixed notice. 2006-08-28 06:14:58 +00:00
vyshane d50ccb9932 Fixed notice 2006-08-28 06:14:06 +00:00
vinkmar f1700fab26 Install/upgrade procedures changed to use $ADMIN instead of defaults.php and config.php.
See http://moodle.org/mod/forum/discuss.php?d=52636 for details
2006-08-28 06:02:00 +00:00
cap2501 fbca9f0f57 Removed frame around draggable blocks and fixed 'short drag' bug. 2006-08-28 04:33:41 +00:00
cap2501 0dcb53d545 removed override for $USER->use_ajax 2006-08-28 04:30:46 +00:00
vyshane 5ce6f628ba Dropping forum.open and forum.assesspublic from .sql files. Added forum
upgrade to roles code to postgres7.php.
2006-08-28 03:51:38 +00:00
cap2501 2f661649b0 *** empty log message *** 2006-08-28 02:49:04 +00:00
moodler 668896e531 It's not required that all modules have the old upgrade function and
the new upgrade function.
2006-08-28 02:10:23 +00:00
cap2501 931ef52833 added description for topics - AJAX format 2006-08-28 02:08:37 +00:00
cap2501 4a1a14c9d3 added nessicary code for ajax course format 2006-08-28 02:06:04 +00:00
cap2501 d4df8fdcae small changes, also de-tabbed and unix fomatted 2006-08-28 02:05:02 +00:00
vinkmar 9519ee2eb7 * admin_setting defaults added 2006-08-28 01:32:11 +00:00
vinkmar d83f27cefe * documentation started in adminlib.php
* default for block editing changed to "off" (bug in previous revisions)
* added defaults for all admin_setting's
2006-08-28 01:31:37 +00:00
cap2501 49884e9702 Removed evil tabs 2006-08-27 23:45:36 +00:00
cap2501 9a900dfc07 converted dos mode to unix mode 2006-08-27 23:28:39 +00:00
cap2501 097579f09c Fixed to eliminate use of 'GET' and 'POST' 2006-08-27 22:58:51 +00:00
stronk7 716332e68b Added support to SQL generation of statements 2006-08-27 22:31:02 +00:00
stronk7 9dbc13db9a Concat operator for mysql added 2006-08-27 22:25:41 +00:00
stronk7 b96aaad125 Concat operator for mssql added 2006-08-27 22:24:09 +00:00
stronk7 a75636b7ed Added support to SQL generation of statements 2006-08-27 22:22:23 +00:00
cap2501 ee3c87bd84 Fixes needed to work from cvs 2006-08-27 22:09:56 +00:00
stronk7 efd1e2032d Added support to SQL generation of install INSERTs 2006-08-27 21:59:04 +00:00
stronk7 3655a6b39f Set magic_quotes_sybase for both mssql and oci8po.
Anyway, this isn't enough and if must be defined in php.ini
or .htaccess, because GPC are added BEFORE this setting
has effect so they are slashed with the default char.
2006-08-27 21:57:33 +00:00
stronk7 de64b6c69e modify stripslashes_safe() to work properly under magic_quotes_sybase
(both addslashes and stripslashes do it properly based on the setting)
2006-08-27 21:52:22 +00:00
skodak f2b5d7e3b7 trusttext implementation in Forum module, fixed incorrect merging, added missing postresql upgrade code, some other minor fixes 2006-08-27 20:45:04 +00:00
danmarsden 6ba7f08774 Fix for MDL-4190 - when admin is editing profile, admin loses all subscriptions to forums. 2006-08-27 20:33:54 +00:00
skodak 7af25328c2 fixed cosmetic typo - missing semicolon before closing tag 2006-08-27 18:38:16 +00:00
skodak 9d4cb9e33b New handwritten XMS schema for install.xml files, generator is fixed to link it too. It is not doing all the checks as XMLDB editor from contrib, but it helps to detect basic problems in general XML editors - such as the one in Eclipse ;-) It can serve also as basic documentation of the install.xml format. 2006-08-27 18:33:37 +00:00
koenr 6494526340 typo - Thanks Mits! 2006-08-27 18:02:23 +00:00
stronk7 d1c21c8f31 Very, very, very, very initial support of insert_record for oracle.
I shouldn't interfere with the rest at all. I needed it in CVS now.
2006-08-27 09:02:41 +00:00
stronk7 d6eb06b60b Initial commit supporting install/upgrade inder XMLDB. 2006-08-27 09:00:23 +00:00
stronk7 f2e0049dec Just remove one condition previously checked. 2006-08-27 08:58:09 +00:00
stronk7 b8851b80eb Cache names for improved speed in long iterations requesting
the same name thousands of times.
Prepare Oracle Sequnces for the insert_record function.
2006-08-27 08:52:51 +00:00
koenr c7a872cbcf updating index files MDL-3484 2006-08-27 08:26:48 +00:00
koenr 4d6cb85c3b updating index files MDL-3484 2006-08-27 08:20:34 +00:00
skodak 168fa2c1d1 reverting isguest() changes 2006-08-27 08:10:03 +00:00
koenr 7d06e3b3be updating index files MDL-3484 2006-08-27 08:09:03 +00:00
koenr 702a3aafa7 typo 2006-08-27 08:01:24 +00:00
koenr 0bb3edbcff updating index files MDL-3484 2006-08-27 08:00:42 +00:00
koenr b85953c847 updating index files MDL-3484 2006-08-27 07:31:10 +00:00
koenr 936678268c updating index files MDL-3484 2006-08-27 07:13:40 +00:00
skodak cf8eaebb06 fixed warning in glossary recent activity from deteted entries 2006-08-26 19:38:32 +00:00
skodak b3e570450f removing some isteacher()s from glossary 2006-08-26 19:19:36 +00:00
skodak 18d8a6a741 isguest() compatible with roles 2006-08-26 18:42:56 +00:00
skodak 907cf31821 trusttext cleaning in glossary upgrade - definitions and comments 2006-08-26 18:08:18 +00:00
skodak daed1a2f37 minor trusttext fix 2006-08-26 17:39:31 +00:00
skodak b8dc934baa fixed table already exists problem during install and upgrade in Opera 2006-08-26 17:20:52 +00:00
skodak 7d8a3cb06a trusttext:
* proposed by Martin Dougiamas
 * implemented by skodak

Usage:
1/ change enabletrusttext to yes in site settings (it is off by default) or set it in config.php
2/ assign moodle/site:trustcontent capability to users whose text submitted in glossary entries, comments, forum posts etc. should not be cleaned == they can use javascript or any other forbidden tags in glossary and forums...

done:
 * core
 * glossary (without proper upgrade)

to do:
 * data cleaning in upgrades
 * forum, blocks and some other places (MD decides)
2006-08-26 13:00:07 +00:00
moodler 8618b509fd Automatic installer.php lang files by installer_builder (20060826) 2006-08-26 02:48:03 +00:00
stronk7 c8a418b8d6 Max for decimal type in MSSQL is 38 cc. 2006-08-26 00:50:09 +00:00
stronk7 7e8f922047 Adding back the first column in the recordset, that is out after GetAssoc(),
in order to:

- Don't get our first named column under some drivers.
- Be able to migrate to ADODB_FETCH_ASSOC soon.

For more info, http://docs.moodle.org/en/XMLDB_Problems,
in the  ADOdb fetch mode (ASSOC, NUM and BOTH) section.
2006-08-26 00:08:11 +00:00
mark-nielsen c87a341cb9 Merged bug fix for bug MDL-6323 2006-08-25 22:53:17 +00:00
skodak 426a369bfa fixed missing continue button during upgrade when using dbsessions 2006-08-25 20:50:44 +00:00
skodak 9425b25f46 Many bugs and typos fixed in capabilitties and legacy isteacher() and similar functions - not many lines changed but it was a looong coding day.
Roles and capabilities should be usable now and old unconverted code should work too :-D

Tested only in fresh installation - admin, teacher and student roles should sort of work.
2006-08-25 20:12:12 +00:00
mark-nielsen 2fc13bc767 Merged differences from MOODLE_16_STABLE into HEAD 2006-08-25 18:33:50 +00:00
stronk7 09942a5ec2 PGs doubles are caller DOUBLE PRECISION 2006-08-25 17:11:43 +00:00
stronk7 c049e98881 Indexes on text fields are not allowed 2006-08-25 17:02:49 +00:00
stronk7 a5ea2dc334 Solved one wrong field declaration in lesson_grades 2006-08-25 17:02:04 +00:00
tjhunt cd06115fa7 Convert mod/quiz/view.php to roles, and further tidy up the code flow in there. This touches other files because I had to change a function in locallib that had an $isteacher parameter.
I have not converted the rest of the quiz, and I don't intend to. I am hoping Moodle.com will do it.

I hope this does not introduce any bugs, but view.php is so complicate (at least it is less complicated than it was) and the quiz has so many options, that it is hard to be sure. This needs lots of testing before 1.7 is released.
2006-08-25 16:03:54 +00:00
tjhunt 6ac7a65d76 Missing language string. 2006-08-25 14:29:47 +00:00
skodak 51195e6f9f fixed missing global $CONTEXT in get_context_instance() 2006-08-25 14:15:52 +00:00
tjhunt 64d8092342 Correct typo. 2006-08-25 11:23:00 +00:00
moodler a72784d3c6 Just a slight tidy-up 2006-08-25 08:54:22 +00:00
vyshane 1a3e93ffe6 Added has_capability checks 2006-08-25 08:51:50 +00:00
vyshane 25c38f25a1 Added has_capability check 2006-08-25 08:30:25 +00:00
vyshane 6ac96fcb3c Added has_capability checks 2006-08-25 08:27:28 +00:00
toyomoyo 41d7209c7f some (mainly admin realated) capabilities 2006-08-25 08:27:27 +00:00
moodler fd57975491 Added 3d moving icon for ajax course format 2006-08-25 07:10:22 +00:00
moodler 954fdb4293 FIxed some tabs :(
and added a module-xxxxx CSS id to each item
2006-08-25 07:09:28 +00:00
vyshane 1be4d00d56 Previous committer missed one rename from $edit to $categoryedit. Fixed. 2006-08-25 04:06:41 +00:00
vyshane e1b5643ff7 Changes to take care of forum upgrade to new roles system. Backed up forums
will also be converted to the new roles system if the backup was made
pre-roles.
2006-08-25 02:41:16 +00:00
vyshane 7f6301c464 We need the newly created course_module id to be passed to the restore
functions of the modules. We need this now for the forum module to convert
forums backed up in 1.6 to use roles upon restore in 1.7. However, this might
be needed for other modules as well if they need conversion to the roles
system.
2006-08-25 02:37:54 +00:00
stronk7 c779eb1a15 Added support for the new upgrade system for main tables. 2006-08-24 22:27:11 +00:00
stronk7 2acf462dd9 Renamed column question_sessions->comment at Eloy's
request since comment is a DB reserved word.
(mimic from sql files) Thanks Tim! B-)
2006-08-24 16:57:39 +00:00
tjhunt 3830553d47 Avoid reserved words in dmllib unit tests.
(Except that TEXT is not a reserved word after all, although some things like TINYTEXT are. Wheird!)
2006-08-24 16:56:59 +00:00
stronk7 81abf10971 MDL-5969 Let multiple choice questions have feedback that does not depend on the chosen answer
(mimic from old sql files)
2006-08-24 16:54:02 +00:00
tjhunt 3e3e5a4030 Renamed column question_sessions->comment at Eloy's request since comment is a DB reserved word.
I have not been able to test this fully, because I cannot assign roles (e.g. Student and Teacher) in 1.7dev at the moment to test a student answering an essay question then a teacher grading it. However, I have tested as much as possible as admin and cannot get any errors.
2006-08-24 16:44:15 +00:00
tjhunt dd4a1bca28 During the conversion datalib -> ddllib, Eloy removed my comment that made it possible to understand how to use table_colum :-( Adding it back. 2006-08-24 15:37:03 +00:00
tjhunt 3ebdddf70f MDL-4816 Fix silly error in my commit for this bug. 2006-08-24 11:37:10 +00:00
tjhunt b2ba9f6ef3 Fix Eclipse warnings. 2006-08-24 11:36:38 +00:00
tjhunt 2fe0d172f8 Fix PHP syntax error. I wish more developers used Eclipse. 2006-08-24 11:22:24 +00:00
tjhunt 307f045f07 MDL-5969 Let multiple choice questions have feedback that does not depend on the chosen answer
In passing, I fixed MDL-6297 Export of multichoice questions in Moodle XML format doesn't save shuffle option too.
2006-08-24 10:22:43 +00:00
tjhunt 6e557c0806 Fixed syntax error in a PHPdoc comments. 2006-08-24 10:16:54 +00:00
tjhunt 2d30f53dcc Fixed syntax error in a PHPdoc comment. 2006-08-24 10:12:15 +00:00
vinkmar 236c08a56f Added support for phpMyAdmin plugin. 2006-08-24 06:44:35 +00:00
moodler 7468981e67 FIxed roles button on blocks 2006-08-24 03:48:04 +00:00
moodler eba88175b6 Formatting fixes 2006-08-24 03:37:41 +00:00
moodler 28e7967aea FIxed some notices 2006-08-24 03:28:09 +00:00
moodler 0a0bb38019 Ed Coyne's AJAX course format, with some cleanups done.
More cleanups to come from Ed.

This isn't actually working for me right now but he'll fix it now.

This is completely optional and won't affect any other code right now.
2006-08-24 03:20:37 +00:00
moodler 600212a9a1 FIxing Ed's mistaken checkin 2006-08-24 03:17:53 +00:00
danmarsden 038184e264 MDL-4493 issue with 405 pages for IIS users - must specify actual page, as the notice function does a post - you cannot use the POST Verb on a directory in IIS. 2006-08-24 02:08:59 +00:00
tjhunt c82f76d050 MDL-4816 Short answer question type considers '100' and '100.' to be the same Actually, this may have affected other question types too. 2006-08-23 21:17:23 +00:00
tjhunt ac249da55e Clarified comment. 2006-08-23 21:04:04 +00:00
tjhunt 9e8dba7960 MDL-6338 - Short answer questions with ' in the answer don't work. Merged from MOODLE_16_STABLE. Yet another unpleasant quiz bug caused by the current broken way we do things with addslashes. 2006-08-23 19:04:24 +00:00
tjhunt 647bcd4129 Fix getting the context. It did not work during question preview from the question bank when there was no quiz in sight. 2006-08-23 18:37:38 +00:00
tjhunt a18fa6d5ba Get the contexts without referring to undefined variables. 2006-08-23 15:32:06 +00:00
stronk7 454adccfa9 Adding one PHP close tag that has been missing (but working) since years! 2006-08-23 15:23:53 +00:00
tjhunt 5cae120596 Get the contexts without referring to undefined variables. 2006-08-23 15:12:52 +00:00
thepurpleblob c81415c77e Merged from STABLE 2006-08-23 14:57:40 +00:00
tjhunt 78fd16a5fb Improved one language string. Thank Mitshiro Yoshida. 2006-08-23 09:23:56 +00:00
moodler 0cfb6a52fb Adding a copyright notice, and mentioning MDL-3717 purely as a test of the
new CVS integration on tracker.moodle.org
2006-08-23 08:39:15 +00:00
toyomoyo 5769734f2a changing default override values 2006-08-23 08:14:14 +00:00
toyomoyo ae1e00a089 renamed variable so that it doens't get recycled 2006-08-23 08:11:43 +00:00
vyshane 905c4567a2 Removed forum_get_course_forum for forum type teacher. 2006-08-23 07:05:36 +00:00
vyshane 9a7538a35b Fixed notice 2006-08-23 06:56:23 +00:00
toyomoyo 945f88ca15 various changes - loading capabilities for questions, quiz, hide tab if no assignalbe or no overridable role is found, added some functions and comments in accesslib 2006-08-23 06:36:08 +00:00
toyomoyo b56d75dd00 fixing a typo 2006-08-23 05:52:39 +00:00
toyomoyo ed60c54a94 fix for MDL-6326, add support for quiz_feedaback table 2006-08-23 05:39:41 +00:00
moodler d9a35e1270 Fixed context caching (wasn't using globals) 2006-08-23 01:29:52 +00:00
skodak a2b0c57b0a debug off level is now 5 instead of 7 to prevent E_WARNING on production sites SC#294; merged from MOODLE_16_STABLE 2006-08-22 22:25:30 +00:00
skodak bb5a61a1d4 reverting wrong commit, sorry :-( 2006-08-22 22:22:34 +00:00
skodak 2881101ca1 debug off level is now 5 instead of 7 to prevent E_WARNING on production sites SC#294 2006-08-22 22:19:58 +00:00
skodak 868ca14f1f fixed trailing whitespace in last commit :-(; merged from MOODLE_16_STABLE 2006-08-22 22:12:17 +00:00
stronk7 860b55463f Normalizing a bit all the float/double generators. 2006-08-22 22:10:09 +00:00
skodak 6be7abc726 Rewritten help.php by Tim Hunt with minor fixes - SC#292; merged from MOODLE_16_STABLE 2006-08-22 22:04:06 +00:00
stronk7 962f8a9b4e quiz_feedback added to XMLDB 2006-08-22 21:55:20 +00:00
stronk7 8792c16589 Small typo. ;-) 2006-08-22 21:44:07 +00:00
tjhunt e9ad37edc2 SC 299. Merged from MOODLE_16_STABLE. 2006-08-22 21:33:54 +00:00
stronk7 598dc3a99c Change rule to tzrule (reserved word) 2006-08-22 21:19:52 +00:00
stronk7 7970cce9f4 Updated using tzdata2006j 2006-08-22 20:11:33 +00:00
stronk7 c0fe3453ef Change rule to tzrule (reserved word) 2006-08-22 20:10:54 +00:00
tjhunt d758f1e2eb Fix an obvious typo in the roles and permissions code. 2006-08-22 19:26:05 +00:00
tjhunt 07d8d530f5 Fix Eclipse warnings. 2006-08-22 19:09:52 +00:00
tjhunt 080314b8bb Fix Eclipse warnings. 2006-08-22 19:09:07 +00:00
tjhunt 20808266c8 Work round Eclipse warning. 2006-08-22 19:01:42 +00:00
tjhunt 199e43d470 Fix Eclipse warnings. 2006-08-22 19:00:18 +00:00
tjhunt 212b7b8cd9 MDL-5270 - give students a feeback comment for their performance in the entire quiz.
Also, along the way I noticed and fixed MDL-6290 student grades not rescaled when quiz maximum grade changed.
2006-08-22 17:31:26 +00:00
stronk7 2efaf3f8ab One trick to allow pseudo-null Oracle insertions. Let's see what happen. 2006-08-22 16:39:14 +00:00
tjhunt 75e84883ca Unbreak roles and permission on Postgres yet again.
If you want a laugh, compare this fix the with the diff between revisions 1.5 and 1.6 of this file.
2006-08-22 16:18:11 +00:00
stronk7 93d2c55ffc Standard naming now user FOUR char for tables (to avoid
avoid some potential duplicates)
2006-08-22 16:15:44 +00:00
tjhunt 1751eebc69 Reverting toyomoyo's conversion of mod/quiz/view.php to roles because his changes made no sense.
Admittedly, this file is pretty incomprehensible and it is not clear at first what it is trying to do. (Even though it is more comprehensible now than it was a week ago.) I'll to a proper conversion of this file to RnP once I have checked in my other changes there - assuming I can actually get Moodle to work so I can test my changes.
2006-08-22 13:53:39 +00:00
tjhunt a4a6eb8a17 Fix toyomoyo's syntax errors. 2006-08-22 13:12:24 +00:00
toyomoyo 5cf38a57cd some quiz capabilities 2006-08-22 09:04:23 +00:00
vyshane 5cae056c45 Removed deprecated teacher forum type 2006-08-22 07:42:34 +00:00
vyshane 45c38eef4c Removed deprecated forum type teacher. 2006-08-22 07:38:01 +00:00
vyshane d604bdeaed Added prevent for mod/prevent:createattachment for default students and guests
in teacher forums
2006-08-22 05:56:45 +00:00
vyshane 9fa3350862 Upgrade now works. Needs more testing. 2006-08-22 05:45:43 +00:00
vyshane 021a7467b5 Fixes:
1) has_capability call used in fullname()
2) initialised array $options
3) $context->level has been renamed to $context->aggregatelevel
2006-08-22 05:44:32 +00:00
vyshane c1a657cc1f Bug fixes:
1) Replaced isteacher call in fullname ($course undefined)
2) Initialised $options array
2006-08-22 05:35:52 +00:00
vyshane f13a5fa609 Removed forum->open config since roles will take over this 2006-08-22 02:43:58 +00:00
vyshane ac195b6fa6 Need to pass the module id and not the object to add_course_module 2006-08-22 02:24:45 +00:00
skodak a2392230a1 fixed some notices in scheduled backup; merged from MOODLE_16_STABLE 2006-08-21 20:40:07 +00:00
stronk7 5cf36b39b1 Solved hh (horrible-hidden) bug in backup_scheduled code.
Credits go to Thirot Jean-Luc. http://moodle.org/mod/forum/discuss.php?d=52156

Merged from MOODLE_16_STABLE
2006-08-21 19:10:21 +00:00
stronk7 28f6c41d45 Changed level (reserved word) to aggregatelevel. 2006-08-21 14:59:48 +00:00
stronk7 88534572c3 Reducing the list of MSSQL reserved words to the efectively
reserved words (the previous list included a lot of words
reserved by SQLXX standars but not by MSSQL)
2006-08-21 12:28:46 +00:00
stronk7 c8f85eeeba Reducing the list of PG reserved words to the efectively
reserved words (the previous list included a lot of words
reserved by SQLXX standars but not by PG)
2006-08-21 12:04:48 +00:00
vyshane c1de8b8a80 Fixed bug - empty teacher forums (deleted) should not have a course module
created for them.
2006-08-21 08:45:12 +00:00
toyomoyo 3765fd5367 some capabilities for quiz and questions, need to load them in access.php 2006-08-21 08:40:06 +00:00
vyshane f0da6b858e Removed $forum->open, $forum->assesspublic from code. Fixed bug in upgrade
code, changed module config form to accomdate removal of forum.assesspublic
and forum.open.
2006-08-21 06:56:04 +00:00
skodak efc7316caa import of ADODB v4.91 and general cleanup, removed some unused files - see readme_moodle.txt; new session2 code needs a new table, I am going to use the new database functions for that later, for now we are using the old table and old database session code. 2006-08-21 06:54:00 +00:00
cap2501 0894b9271e Semi-final version 2006-08-21 06:15:24 +00:00
cap2501 04b2d74f03 Main JS file for topic - ajax course format (still needs a little cleaning though) 2006-08-21 06:14:43 +00:00
cap2501 be2a520783 Restful interface for AJAX course format 2006-08-21 06:13:28 +00:00
toyomoyo d140ad3f7c fix for bug #6307, reserved word 'level' changed to 'aggregatelevel' for Oracle. Some parts could be broken by this. please report breakage asap! Thanks 2006-08-21 05:19:16 +00:00
vinkmar e277678dab changes made to ensure compatibility with core admin (admin/adminlib.php) where $_GET is no longer used; changed 'admin' to $CFG->admin in dir paths 2006-08-21 04:08:57 +00:00
vinkmar 9acea96564 changes made to ensure compatibilty with core admin files (admin/adminlib.php), where $_GET is no longer used 2006-08-21 04:08:00 +00:00
vinkmar 6fcbab99ef fixed tabs, fixed potential notices for undefined variables, added structure that will be used for detecting what variables to flag during installs & upgrades, removed all $_GET usage, switched 'admin' to $CFG->admin (for directory paths), and fixed blank line at end of index.php 2006-08-21 04:06:58 +00:00
toyomoyo d37bac7e5d fix for 6294 2006-08-21 02:23:25 +00:00
mchampan 791a4cece1 Comments, update logic improved, rest of module add/delete functions added. 2006-08-21 00:50:29 +00:00
stronk7 0513f3bfa5 $statement_end for Oracle changed to "/" because standard ;
causes problems with trigger generation
2006-08-20 21:56:54 +00:00
tjhunt dcc0a7e25f Bug #6305 - Quiz settings form field order could be better. Merged from MOODLE_16_STABLE. 2006-08-20 20:11:05 +00:00
stronk7 73bb7f8db0 Setting some ADOdb variables properly and calling to the new
configure_dbconnection() function to set DB encoding and other
preliminar settings.
2006-08-20 18:22:48 +00:00
stronk7 d086d854a8 Added the configure_dbconnection() function to be executed
after DB conection. Responsible to set a lot of things
(charsets, dbsession variables...)
2006-08-20 18:21:33 +00:00
stronk7 f9543de627 Since PostgreSQL 7.4 the precision given for float columsn is
the number of bits to use, and not the number of decimals. So,
based on the number of decimals from the XMLDB schema, we are
going to create REAL (<6 decimals) or DOUBLE PRECISION (>=6) columns.
2006-08-20 18:19:50 +00:00
stronk7 16f07ff2b0 MySQL doesn't like any name on its primary keys (neither "primary") 2006-08-20 18:03:55 +00:00
stronk7 c412278140 Although difficult, now all the key/index/sequence/trigger names
are quoted if they are reserved words
2006-08-20 18:01:50 +00:00
stronk7 134e3128bb Added the install_from_xmldb_file() function that
loads, transform and execute one entire XMLDB
file into the correct SQL sentences.
2006-08-20 15:50:27 +00:00
tjhunt 0f49e5655d Bug #6303 - True / False applies penalty factor wrongly. Merged from MOODLE_16_STABLE. 2006-08-20 15:37:42 +00:00
tjhunt 948bf30099 Fix Eclipse warnings. 2006-08-20 15:30:31 +00:00
stronk7 420f683619 Core tables XMLDB installation is now working. Disabled by default
until fully working.

$CFG->xmldb_enabled = true; will enable it for test/dev against any DB
2006-08-20 11:20:40 +00:00
stronk7 293bccd539 First commit for the progressive adoption of ADODB's SelectLimit() function
in order to support LIMIT clauses in a cross-db compatible way.
Changes don't affect old sentences at all (all them would be changed soon too).
2006-08-20 09:37:56 +00:00
vinkmar 36647b9fbb More PHP4 compatibility issues fixed. 2006-08-20 03:56:25 +00:00
skodak 7f5495053f fixed short php tag and end tag in comment 2006-08-19 11:15:59 +00:00
moodler 3566b97c4a Fixing some strings 2006-08-19 08:21:05 +00:00
moodler c06140513d Fixed up get_user_roles to remove notices 2006-08-19 08:12:45 +00:00
tjhunt 707b5c9953 Renamed unit tests to match Eloy's work. 2006-08-19 07:47:41 +00:00
vinkmar 95cdbec95f Added paramtypes (mandatory) to all text field objects. 2006-08-19 05:34:25 +00:00
vinkmar 7ba710e6a3 Small bug fix. Caused problems when moving or deleting blocks. 2006-08-19 05:32:56 +00:00
moodler 9f948d1136 Just minor doc tweaks 2006-08-19 02:58:07 +00:00
moodler 6e0993ee48 Just tidying up things a bit as I look it over 2006-08-19 02:46:46 +00:00
moodler dfcf72ba94 Automatic installer.php lang files by installer_builder (20060819) 2006-08-19 02:45:53 +00:00
vinkmar 085dfc0c20 solving the issue with an undefined sesskey (happens when there is no user logged in) 2006-08-19 02:26:01 +00:00
vinkmar fea42164fb preventing notifications by using isset() unsparingly (i.e. small bug fixes) 2006-08-19 02:21:44 +00:00
vinkmar ccad2d8e7d Modifications made for PHP4 compatibility. 2006-08-19 01:40:54 +00:00
vinkmar 0155cf991d Fixed error that caused self_test failure during initial install; made changes for PHP4 compatibility (no use of instanceof, no use of private/protected/public) 2006-08-19 01:38:57 +00:00
vinkmar 63aafc9e56 Fixing errors in admin page cleanup; working towards compatibility with PHP4 (use of interfaces, private/protected/public, instanceof all removed). 2006-08-19 01:37:38 +00:00
stronk7 465a802937 Thought this was commited. Solve one bug in trigger generation 2006-08-19 00:58:30 +00:00
stronk7 7e13be0887 Splitting datalib.php in three libraries:
- ddllib.php: Where all the DDL (install/upgrade) functions will be.
  - dmllib.php: Where all the DML (select...) functions will be.
  - datalib.php: Legacy lib. Its contents should go to other libraries soon.
For more info see: http://docs.moodle.org/en/XMLDB_Roadmap (point 1)
2006-08-18 22:56:08 +00:00
tjhunt ef82286874 Bug #6293 - Cannot regrade a question when a teacher has added a comment with a ' - Merged from MOODLE_16_STABLE. Stupid, wreched, datalib. Why can't datalib take care of addslashes, so the whole of the rest of the code can forget about it? That is how a database abstraction layer should work. I know, it is pointless to moan about it, but it has just cost me 3 hours, so I feel I have earned the right to moan. 2006-08-18 22:34:54 +00:00
tjhunt 865b753486 Code cleanup. Merged from MOODLE_16_STABLE. 2006-08-18 22:26:04 +00:00
vinkmar 708870d3a8 added blank footer (to eliminate the notice when $footer is non-existant) 2006-08-18 22:02:09 +00:00
vinkmar 3d8ef99d9e Blocks fixed in admin pagelib, and (hopefully) many notices pointed out in the general forum board no longer show up. 2006-08-18 22:00:37 +00:00
tjhunt 4abc23b2ae Fix some Eclipse code warnings. Merged from MOODLE_16_STABLE. 2006-08-18 21:23:15 +00:00
vinkmar 0b4073cedb trying to prevent an undefined index error 2006-08-18 19:27:02 +00:00
ethem 516b138516 Colorize all orders. 2006-08-18 17:10:30 +00:00
ethem be4f7e7fec Colorize refunds and show refunded total.
Red: Refunded/Pending Settlement
Green: Refunded/Settled
Black: Cancelled
2006-08-18 16:01:47 +00:00
ethem 49c22bc46b Display capture/void/delete instead of 'Yes'; Merged from 16stable. 2006-08-18 14:54:08 +00:00
tjhunt 5553c2ec47 New function record_exists_select with unit tests for all the record_exists_* functions. 2006-08-18 11:28:30 +00:00
tjhunt bc2defd5f8 Bug #3481 - wildcard problem in cloze question. Thanks to Joseph Rezeau. Merged from MOODLE_16_STABLE, not a straight merge becuase of other 1.7 changes. 2006-08-18 10:29:34 +00:00
moodler d100b8a04d Make sure .htaccess is created in dataroot, just in case 2006-08-18 09:54:09 +00:00
vinkmar cdb46b63d2 more bugs! incompatibility with php 5.1.2 (presumably earlier versions as well) fixed 2006-08-18 08:40:58 +00:00
vinkmar bb14a9e3b7 admin page cleanup blocks (new ones!) 2006-08-18 08:25:02 +00:00
vinkmar c74af0688f adding admin page cleanup blocks (new ones!) 2006-08-18 08:24:07 +00:00
vinkmar dca7a9cfad admin page cleanup (bug fixes :) ) 2006-08-18 08:16:32 +00:00
tjhunt 1780811d55 Added todo. 2006-08-18 08:14:47 +00:00
toyomoyo 68c5252623 adding functions and interface for access control - role assignment and role overrides 2006-08-18 08:01:16 +00:00
vinkmar 4cd174bfce Reverting changes to file from admin page cleanup... whoops! Accidentally broke the install. 2006-08-18 07:52:56 +00:00
vinkmar f8a511519b admin page cleanup (google soc 2006)... updated field name for category editing function so that it doesn't conflict with 'edit' when used for blocks 2006-08-18 07:29:19 +00:00
vinkmar 7ff99cb64f admin page cleanup (google soc 2006)... updated to use new pagelib 2006-08-18 07:27:05 +00:00
vinkmar dd81bb350c updated for admin page cleanup 2006-08-18 07:26:25 +00:00
vinkmar 90a73bb361 Admin page cleanup (Google soc 2006) 2006-08-18 07:25:17 +00:00
vinkmar a7c72afc04 Admin page cleanup (google soc 2006) 2006-08-18 07:23:02 +00:00
vyshane e6416e3f12 Updated upgrade to roles system 2006-08-18 07:08:14 +00:00
vyshane 314af32a92 Forum upgrade to roles in progress (commented out). 2006-08-18 04:17:31 +00:00
skodak 408965376d still more upgrade logging fixes 2006-08-18 00:01:37 +00:00
skodak 26c91c7394 major upgrade logging speed improvement - write buffer implemented 2006-08-17 23:50:18 +00:00
skodak 7949356d64 fixed missing '}' 2006-08-17 22:49:21 +00:00
skodak dedb2304cd upgrade logging cleanup, fixes - more improvements ahead 2006-08-17 22:37:34 +00:00
skodak 031c8ae5a0 Bug #6276 - Multiple questions not showing up from scale page; merged from MOODLE_16_STABLE 2006-08-17 21:34:39 +00:00
stronk7 1bf63d33c8 Oracle automatically builds UIXs for UKs 2006-08-17 19:40:49 +00:00
stronk7 9dcc6300a7 Now all the XMLDBxxx->geSQL functions return an array of statements to be
executed (easily to handle them in the installation/upgrade process
individually. Also, it's possible to specify one statement end.
2006-08-17 19:20:45 +00:00
stronk7 de16da7293 adding role_allow_assign , role_allow_override table and dropping role_deny_grant
NOTE: Need to confirm that both these fields:
    role_allow_assign->allowassign and
    role_allow_override->allowoverride
are pointing to role->id (this is the assumption I've done, so I've
created them as FKs)
2006-08-17 19:16:07 +00:00
tjhunt eb9189bc2f Bug #6277 - Missed function renaming in question/format/multianswer. Merged from MOODLE_16_STABLE. 2006-08-17 17:38:31 +00:00
tjhunt 8d2054411c Tweak to unbreak unit tests. 2006-08-17 17:30:56 +00:00
stronk7 4d00e5e4ec Now admin includes all the required ddllib stuff 2006-08-17 16:59:39 +00:00
stronk7 46d42a3cc5 Now ddllib includes all the required xmldb stuff 2006-08-17 16:59:14 +00:00
stronk7 b7bc9446a9 Added JS template field for JavaScript if needed. 2006-08-17 16:40:46 +00:00
tjhunt cfa27f4472 Fix bug in new function get_field_select(), and this time add a unittest to see if the new function works! 2006-08-17 16:28:29 +00:00
ethem b9c3d818fe enrol_authorize.courseid must be passed to authorize_get_status_action() function to allow a user has_capacity; Joined 2 tables to get courseid field. Merged from 16stable. 2006-08-17 15:43:54 +00:00
tomflannaghan ca20f89151 Slashes added for database entry. 2006-08-17 13:19:28 +00:00
tomflannaghan 1f9aab2e10 *** empty log message *** 2006-08-17 13:18:02 +00:00
tomflannaghan b010085239 Javascript added 2006-08-17 09:27:51 +00:00
tomflannaghan f0a93e5d30 jstemplate 2006-08-17 09:26:31 +00:00
tomflannaghan 5a83945ec5 Extra tab for 'jstemplate' 2006-08-17 09:26:06 +00:00
moodler 8ac4971405 Added JS template field for JavaScript if needed 2006-08-17 09:02:56 +00:00
toyomoyo f9e2f481df adding role_allow_assign , role_allow_override table and dropping role_deny_grant 2006-08-17 08:58:51 +00:00
vyshane c39f126780 Fixed warning 2006-08-17 03:52:05 +00:00
moodler 8b4e649a1e Automatic installer.php lang files by installer_builder (20060817) 2006-08-17 02:52:18 +00:00
stronk7 6c11ad54d8 UNIQUE KEY is UNIQUE 2006-08-17 00:31:23 +00:00
stronk7 848caec8c2 Now we are able to generate all the module SQL (any RDBMS) with one
simple function call (final inserts are missing yet)
2006-08-17 00:16:34 +00:00
stronk7 f075bac4f7 Bah, Oracle requires the default clause BEFORE the not null clause. 2006-08-16 23:45:18 +00:00
stronk7 6aa7885eb5 Minor adjustments to some comments. 2006-08-16 23:17:28 +00:00
stronk7 ada5648103 Fixing some potential problems with prefixes and object names. 2006-08-16 23:01:46 +00:00
stronk7 d7444bfce3 Initial commit of oci8po generator 2006-08-16 22:58:51 +00:00
stronk7 866c0747e8 Line feed added + small bug 2006-08-16 22:23:39 +00:00
stronk7 d7bf5f9917 Initial version of the mssql generator 2006-08-16 21:46:08 +00:00
stronk7 2ad7da9bec Initial version of the postgres7 generator 2006-08-16 18:41:47 +00:00
stronk7 0c82f279c6 Added one more configuration parameter to disable inline SQL to be added in enum column lines 2006-08-16 18:37:33 +00:00
stronk7 aacf02c55b Proper parent init and comment close 2006-08-16 17:53:24 +00:00
stronk7 6caad5177d Minor change to do proper create table close 2006-08-16 17:51:49 +00:00
stronk7 e54ae5264b Partial rework of the mysql generator. Working now. 2006-08-16 17:43:55 +00:00
stronk7 1f0872e8ba Changed one default 2006-08-16 17:34:46 +00:00
stronk7 91496d15bc Initial commit of the base generator class. 2006-08-16 17:28:41 +00:00
tjhunt b169c31e39 Save two queries if we are not going to output anything. 2006-08-16 16:54:20 +00:00
tjhunt 1d723a169a Bug #6267 - questionlib.php delete_question infinite loop with rantom questions. Thanks to mbockol at carleton dot edu. Merged from MOODLE_16_STABLE. 2006-08-16 16:17:18 +00:00
stronk7 54121a7921 permission has to be signed integer in mysql. Mimic from sql files 2006-08-16 16:06:37 +00:00
mchampan 6f1b1da1ec Add/delete/update cron functions added.
IndexDBControl class added to abstract some index functionality out.
2006-08-16 13:34:07 +00:00
mchampan ecebdf0e6e Date field added to documents. 2006-08-16 13:31:55 +00:00
toyomoyo b3e900cee6 some more UI change 2006-08-16 09:11:43 +00:00
vyshane 01199ea958 Updated to use new Roles System. Plus some fixes. 2006-08-16 08:54:07 +00:00
tjhunt 920b93d1e3 Remove horrific code duplication in mod/quiz/lib.php. 2006-08-16 08:46:10 +00:00
toyomoyo 77d4953ee2 bumpoing up version, permission has to be signed integer in mysql!!! added new capabilities in access.php 2006-08-16 07:57:51 +00:00
vyshane e40a7a3c8b Fixing notices 2006-08-16 03:24:43 +00:00
moodler f6f5f52a19 Automatic installer.php lang files by installer_builder (20060816) 2006-08-16 02:50:27 +00:00
vyshane 87ca0adf00 Fixed forum_print_post. Thanks Yu :) 2006-08-16 02:33:43 +00:00
tjhunt a21567892f Refactor how question types register themselves with the question bank. This change makes it easier for 3rd party question types to control their destiny, but is also backwards compatible, in that old 3rd party plugins will still work. See http://moodle.org/mod/forum/discuss.php?d=51796 for more details. 2006-08-15 21:25:38 +00:00
tjhunt eeaeff8e04 Corrected include. 2006-08-15 20:44:21 +00:00
tjhunt 3c957efd2e Correct comment. 2006-08-15 20:43:09 +00:00
tjhunt d3eeba599b Delete stray space. 2006-08-15 16:53:24 +00:00
tjhunt 4e3487c59c Remove horrific code duplication in mod/quiz/mod.html. 2006-08-15 15:29:38 +00:00
thepurpleblob 8daaaafcf0 Merged from STABLE 2006-08-15 14:39:47 +00:00
tjhunt ab757152ec New function get_field_select(). 2006-08-15 13:44:22 +00:00
stronk7 edc8779b92 Latest changes, nothing important. 2006-08-15 11:30:32 +00:00
tomflannaghan 72184a52b8 A few fixes for the dropdown menus. 2006-08-15 11:14:07 +00:00
stronk7 82b7ceb568 Just adding support for reserved words.... 2006-08-15 10:15:52 +00:00
vyshane 6c384dd1bb Replaced isteacher and isadmin calls by has_capability 2006-08-15 09:56:41 +00:00
vyshane f8a6c19d23 Replaced creator() calls with has_capability() 2006-08-15 09:45:11 +00:00
vyshane 9f5c1e1057 Added has_capability calls 2006-08-15 09:28:12 +00:00
stronk7 8165877a17 Initial commit on HEAD of all the XMLDB stuff. 2006-08-15 09:14:31 +00:00
stronk7 f11bf81701 Initial commit of the ddllib (to perform DDL operations) 2006-08-15 09:08:17 +00:00
moodler 901dd2fb4c Merged new "Database preset" support from Tom Flannaghan.
Still needs some tidy-up work but it's working.
2006-08-15 08:42:06 +00:00
toyomoyo 0a8a95c91e some more UI stuff 2006-08-15 08:29:29 +00:00
vyshane 6006c31d28 Added has_capability call 2006-08-15 06:37:55 +00:00
vyshane 67e4cf27e2 Added has_capability checks 2006-08-15 06:21:35 +00:00
vyshane bede8db79f Updated with new capabilities 2006-08-15 05:01:00 +00:00
vyshane a028c29187 Added new capabilities 2006-08-15 04:13:22 +00:00
toyomoyo dd91f41525 revert ugly changes back to original 2006-08-15 02:28:04 +00:00
skodak 284ac70210 $CFG->debug=0 from config.php is not overriden by setup.php anymore SC#293; merged from MOODLE_16_STABLE 2006-08-14 20:57:18 +00:00
skodak 508d4a0d14 adding proper checks that the requested help file exists SC#292; merged from MOODLE_16_STABLE 2006-08-14 20:08:52 +00:00
moodler cfef9e55d0 Endless loop fix from stable 2006-08-14 15:20:49 +00:00
ethem 839958faf6 * $CFG->teachermanagepayments will have to go since we are moving away from the rigid hardcoded teacher role concept.
* If a teacher has_capability('enrol/authorize:managepayments'), send email about pending orders expiring.

* All isteacher converted to has_capability.
2006-08-14 15:06:11 +00:00
ethem 4503e31d9a Roles support added: enrol/authorize:managepayments
TO DO:
* $CFG->an_teachermanagepay will be removed.
   XXX??? What will be do while sending email to teachers about pending orders expiring???
   If this feature enabled and a teacher no role in managepayments, this will send an email and the teacher cannot manage payments.
   Extra work: get_course_teachers and a teacher has_capability(at course level), send this email.

* convert isteacher to has_capability.
2006-08-14 14:23:01 +00:00
moodler 10f5c89035 FIxed another ossible notice during upgrade 2006-08-14 13:44:10 +00:00
ethem abaeae30f7 Guests can NEVER manage payments. CAP_PREVENT to CAP_PROHIBIT. 2006-08-14 13:42:35 +00:00
moodler 9db12da755 Fixed some notices during install 2006-08-14 13:42:34 +00:00
tjhunt c097419986 Reorder the table definitions in the file, to group them more logically. 2006-08-14 13:32:39 +00:00
ethem 79469c6600 Roles support added: enrol/authorize:managepayments 2006-08-14 13:29:24 +00:00
moodler c4a333b328 Fixes from forum http://moodle.org/mod/forum/discuss.php?d=46048 2006-08-14 08:59:38 +00:00
vyshane e6316185ab Fixed bug in upgrade_plugins(). Capabilities were not being loaded correctly. 2006-08-14 08:59:01 +00:00
skodak 795821c497 fixed warning in participants block 2006-08-14 08:54:45 +00:00
skodak 4c460d9821 fixed admin page layout 2006-08-14 08:52:15 +00:00
toyomoyo 7e2d7c92ad some UI changes 2006-08-14 08:46:44 +00:00
skodak b367b152ad fixed warning during installation when creating admin account 2006-08-14 08:44:30 +00:00
moodler 339a9129ec Only need to pass contextid to this script 2006-08-14 08:41:54 +00:00
moodler e957cc2644 Cleaned up a bunch of notices and some logic 2006-08-14 08:38:49 +00:00
skodak 8549af11d1 fixed upgrade success notification, backup and blocks success messages are not red anymore... 2006-08-14 08:37:19 +00:00
moodler 5c524305e3 FIxed 'assign roles' link from course admin 2006-08-14 08:34:11 +00:00
moodler 218564acfc Fixed bug #6238, bad debug statements 2006-08-14 08:26:58 +00:00
moodler e4dd322255 Function to get roles used in a context 2006-08-14 08:14:02 +00:00
skodak 9fecfdfb83 Bug #6245 - rewritten multilang filter 2006-08-14 07:46:03 +00:00
vyshane 951e1073da Added has_capability calls. Reverted forum_search to pre-roles until the
function is totally converted to work with roles.
2006-08-14 07:37:53 +00:00
vyshane d7bf6d17d9 Fixes for capability checks. 2006-08-14 07:25:18 +00:00
vyshane cee0901c06 Formatting cleanups and comments 2006-08-14 07:15:03 +00:00
skodak 33851b5c16 prevent access to filters when disabled in filter settings SC#291; merged from MOODLE_16_STABLE 2006-08-14 06:24:34 +00:00
moodler 65f4d137a7 Fixed a typo 2006-08-14 06:22:29 +00:00
moodler f2e21e6c03 Fix error string 2006-08-14 06:03:30 +00:00
moodler 0468976c9a SWEEPING CLEANUP
The API was changed slightly so that has_capability now takes the
whole $context object (we almost always have it anyway)

The $kill thing was removed.   If you want to assert a capability
then use:

    require_capability('capname', $context);

with optional variables to modify the error message

Misc bugs here and there also removed and code tidied
2006-08-14 05:55:40 +00:00
mchampan 6e7805628e Advanced search page added. 2006-08-14 02:29:43 +00:00
tjhunt a7c3953d1c SC 289, small, but non-exploitable hole in backup permissions checking. Merged from MOODLE_16_STABLE. 2006-08-13 20:39:21 +00:00
moodler acee2e2491 Temporayr debug a bit more sensible 2006-08-13 15:50:58 +00:00
moodler 340ea4e89e Some wider caching 2006-08-13 15:48:57 +00:00
moodler e5605780cf Cache context lookup per page for performance 2006-08-13 13:28:01 +00:00
moodler b63ec9db78 Adding roles to front page course list "add" button 2006-08-13 13:17:38 +00:00
moodler 624f2fea76 Removed some old calls to isadmin 2006-08-13 13:12:51 +00:00
moodler 7fad699525 Tidying up some spelling 2006-08-13 09:29:33 +00:00
moodler 8737be587d More language-related tidyups and a new get_local_override() function 2006-08-13 09:25:45 +00:00
moodler ceb83c70ba Changes to string format for capabilities 2006-08-13 09:11:45 +00:00
moodler f9a67ea1e2 New strings for Roles and Capabilities 2006-08-13 09:10:52 +00:00
moodler bade10e350 Removed all of the "Restricted users" hack because Roles can do it all better. 2006-08-13 07:01:57 +00:00
moodler f633ae28ae Automatic installer.php lang files by installer_builder (20060813) 2006-08-13 02:49:19 +00:00
stronk7 6750328ba0 Latest changes added + some polish in keys. 2006-08-12 23:03:59 +00:00
stronk7 d236d4f577 Initial version of the XMLDB file for this plugin 2006-08-12 22:26:05 +00:00
stronk7 9bd4d98bc2 Initial version of the XMLDB file for this plugin 2006-08-12 22:19:10 +00:00
stronk7 42173f5121 Initial version of the XMLDB file for this plugin 2006-08-12 21:41:46 +00:00
stronk7 6f398232e6 Added une foreign+unique key 2006-08-12 21:40:30 +00:00
danstowell ac87088b50 Added download link for all entries as KML 2006-08-12 19:03:16 +00:00
danstowell 94682d3e58 Another couple of latlong strings 2006-08-12 19:02:39 +00:00
danstowell 5cd48bf480 Another couple of latlong strings 2006-08-12 17:37:08 +00:00
danstowell 3af692dba0 Now latlong data types allow you to choose which labels appear in Google Earth 2006-08-12 17:36:22 +00:00
skodak b8a607d691 fixed format_text caching - now respects text format, current language and course id (lang fix is needed for my multilang filter rewrite ;-); merged from MOODLE_16_STABLE 2006-08-12 12:44:19 +00:00
stronk7 615b4a1391 An example of how one unitialized variable can generate really
dificult-to-trace bugs. Thanks to Jens Gammelgaard and support  B-)
(http://moodle.org/bugs/bug.php?op=show&bugid=6233)

Merged from MOODLE_16_STABLE
2006-08-12 09:14:40 +00:00
stronk7 613f306d1d XMLDB schema initial commit for the quiz module.
Some doubts are pending to finish it properly.
2006-08-11 19:29:47 +00:00
stronk7 b08eda731b Added one FK (recursive) to course_categories 2006-08-11 18:41:39 +00:00
stronk7 49025df359 Added one comment about recursive FK for the future. 2006-08-11 18:36:47 +00:00
stronk7 401846cca7 XMLDB schema initial commit for the lesson module 2006-08-11 17:56:18 +00:00
stronk7 a2a4bfc567 XMLDB schema initial commit for the lams module 2006-08-11 17:39:38 +00:00
stronk7 e0996851da XMLDB schema initial commit for the label module 2006-08-11 17:37:17 +00:00
stronk7 01c3c55960 Oops, filled now. I forgot to save changes before commit. 2006-08-11 17:31:11 +00:00
stronk7 4121848035 XMLDB schema initial commit for the journal module 2006-08-11 17:29:47 +00:00
stronk7 540c65ba43 XMLDB schema initial commit for the hotpot module 2006-08-11 17:24:55 +00:00
stronk7 2bf10cbf7b XMLDB schema initial commit for the glossary module 2006-08-11 17:11:46 +00:00
stronk7 b72bed89da Give some more chars to enum fields. 2006-08-11 16:45:45 +00:00
stronk7 d7a4f74ede XMLDB schema initial commit for forum module 2006-08-11 16:35:11 +00:00
tjhunt 1b8a7434e2 Bug 6239 - Allow questions to have some teacher-supplied commentary.
While implementing this, I removed the ~100 lines of very similar code from the top of each question type's editquestion.html template, and moved this to a the function print_question_form_start() in the base class, which uses the template question/type/editquestionstart.html. This is described in more detail here: http://moodle.org/mod/forum/discuss.php?d=51590, and is why this patch makes the codebase 523 lines smaller.
2006-08-11 14:59:18 +00:00
danstowell 8161ac9842 Adding new data field type, latlong, to HEAD 2006-08-11 13:17:29 +00:00
bobopinna 431b5cc855 Added two strings 2006-08-11 13:11:53 +00:00
bobopinna 5c1ac70c63 Fixed a problem during scorm update.
Now only the lost scoes tracks are deleted
Added support to IMS CP repository
2006-08-11 12:26:06 +00:00
thepurpleblob 57f4a71feb Merged from STABLE 2006-08-11 12:16:38 +00:00
tjhunt 712c25b10b Tidy up code flow in helpbutton. 2006-08-11 10:33:29 +00:00
stronk7 f1b2046912 Changing //TRANSLIT to //IGNORE because some weird bug
in the OS iconv libraries was breaking some texts.

Merged from MOODLE_16_STABLE
2006-08-11 09:48:35 +00:00
thepurpleblob 7b579ee61f Merged from STABLE 2006-08-11 08:52:24 +00:00
danstowell 8897f6fa9f Latitude and longitude lang strings for en_utf8 for data activity 2006-08-11 08:48:28 +00:00
vyshane df9c66776d Admin role assignment: changed from using get_string (too brittle) to
get_roles_with_capability (more robust).
2006-08-11 03:58:52 +00:00
vyshane abd896a114 Commented out code that adds the new admin user to user_admins and
user_teachers tables from user.php.

Fixed notices in roles/assign.php.
2006-08-11 03:24:37 +00:00
vyshane 0c30fdc924 Modified to support fresh installation of new Roles System. 2006-08-11 02:44:42 +00:00
vyshane 1afecc03f4 Modified to fix installation. 2006-08-11 02:44:02 +00:00
tjhunt 2c3968c407 Major code cleanup of this report (that started as a small code cleanup). None of the functionality should have changed - crosses fingers. 2006-08-10 21:52:07 +00:00
tjhunt 93eb0ea339 Fix comment. 2006-08-10 21:33:53 +00:00
tjhunt 7003072a7f Fix minor HTML validation issue. 2006-08-10 18:58:26 +00:00
tjhunt 8c8cad45d9 Convert tabs to spaces. 2006-08-10 18:32:32 +00:00
tjhunt 2befe77859 Convert tabs to spaces. 2006-08-10 18:23:09 +00:00
stronk7 c7b39f4737 XMLDB schema initial commit for exercise module 2006-08-10 17:12:00 +00:00
tjhunt 78b26f761c Typo in comment. 2006-08-10 15:44:52 +00:00
bobopinna f69db63ed4 Cleaned code 2006-08-10 11:32:48 +00:00
ethem 067d3cd138 Comment added. 2006-08-10 10:55:42 +00:00
stronk7 a1bdf659ad Adding latest changes, FKs and indexes. 2006-08-10 09:25:52 +00:00
toyomoyo 2a1ab5ecf2 name should be unique key, and should be length 255 2006-08-10 09:07:15 +00:00
toyomoyo 7952cb34ef changing name field in capabilities table to 255 2006-08-10 09:02:21 +00:00
bobopinna 03f5564e43 Fixed a problem with popup window and IE 2006-08-10 08:27:12 +00:00
toyomoyo 171948fd4a bumped up version to add keys, changed some more UI 2006-08-10 08:21:29 +00:00
toyomoyo bcf214dfc4 adding keys for new tables, added migration support too 2006-08-10 08:20:16 +00:00
moquist da4124beab Added $return=false parameter to the following functions:
print_navigation()
print_headline()
print_heading()
print_heading_with_help()
print_heading_block()
print_continue()
print_simple_box()
print_simple_box_start()
print_simple_box_end()
print_single_button()
print_spacer()
print_file_picture()
print_user()
print_recent_activity_note()
print_group_menu()
print_grade_menu()
print_scale_menu()
print_scale_menu_helpbutton()

Changed $returnstring parameter to $return (for consistency) in the following
functions:
print_user_picture()
print_group_picture()
2006-08-10 06:41:38 +00:00
vyshane 628e2264b1 Adding back lines that mysteriously disapeared. 2006-08-10 05:57:34 +00:00
moquist 469b650119 Added $return=false parameter to print_footer() using output control functions
to capture include() of themed footer HTML.
2006-08-10 05:10:00 +00:00
moquist 36b6bcecc0 Added $return=false parameter to print_header() and print_header_simple() using
output control functions to deal with the include() of the themed header HTML
file.
2006-08-10 05:01:57 +00:00
moquist eaeaf964dc Added $return=false parameter to close_window_button() and choose_from_radio(). 2006-08-10 04:33:55 +00:00
moodler b85956993a Automatic installer.php lang files by installer_builder (20060810) 2006-08-10 03:00:40 +00:00
toyomoyo c04ba75f8f merged fix for a bug when user's lang is not set, fall back to site lang 2006-08-10 02:43:22 +00:00
skodak 805f61dd6c obfuscation of the email addresses; merged from MOODLE_16_STABLE SC#282 2006-08-09 20:40:31 +00:00
skodak 8fd62c6401 Bug #6199 - A typo in edit.php; merged from MOODLE_16_STABLE 2006-08-09 19:46:32 +00:00
skodak 016ffbd752 Bug #4936 - Highlighting a question text fragment with different color; merged from MOODLE_16_STABLE 2006-08-09 19:31:09 +00:00
skodak c853b39f50 Bug #6225 - Moodle bug #4658 Breaks assignment type: Upload Single; merged from MOODLE_16_STABLE 2006-08-09 18:36:54 +00:00
tjhunt dba4e6da97 Document table_column. 2006-08-09 17:46:16 +00:00
stronk7 433a13bc22 index2fk performed 2006-08-09 15:45:27 +00:00
moodler 41811960a1 Added patch from Tim (http://moodle.org/mod/forum/discuss.php?d=51323#234978) 2006-08-09 14:16:13 +00:00
moodler 2ad25548c6 Fixed some typos. Thanks Tim! 2006-08-09 14:01:14 +00:00
moodler f10306b9e2 Removed tabs 2006-08-09 14:00:51 +00:00
moodler d1516f2064 Fixed a typo, thanks Tim 2006-08-09 13:55:05 +00:00
moodler ee4a52c59e Removed tabs 2006-08-09 13:53:12 +00:00
moodler dabfd0ed85 Removed tabs 2006-08-09 13:45:49 +00:00
moodler bee7ee3815 Removed tabs 2006-08-09 13:39:44 +00:00
moodler 5ec8a4f009 Removed tabs 2006-08-09 13:18:33 +00:00
moodler 9888263703 Removed tabs 2006-08-09 13:14:15 +00:00
moodler 30725d5a3b Tabs and some random formatting fixes 2006-08-09 13:11:53 +00:00
stronk7 388e9ab212 One more FK in blocks system. 2006-08-09 11:56:02 +00:00
skodak 563e64e3de Bug #6106 - HTML editor inserting unwanted hard return between images; merged from MOODLE_16_STABLE 2006-08-09 09:37:01 +00:00
vyshane 7613e6d7d1 More updates in lib.php 2006-08-09 09:18:31 +00:00
vyshane f0eb2ffe85 Added mod/forum:viewhiddentimedposts 2006-08-09 09:17:37 +00:00
vyshane 53d7785b4a Added moodle/site:viewfullnames 2006-08-09 09:16:35 +00:00
vyshane 0fa18d5a27 Bug fixes + updated capabilities. 2006-08-09 06:59:28 +00:00
moodler ced70cb63d More Roles-related strings 2006-08-09 05:54:27 +00:00
moodler f21d80947c Fix up the admin listing a bit 2006-08-09 05:53:36 +00:00
moodler 927bf46f3c Tidy-ups 2006-08-09 05:37:53 +00:00
moodler aa31141173 Small cleanup of a notification 2006-08-09 05:37:31 +00:00
moodler 4ed70f1b6e Some new strings 2006-08-09 05:35:55 +00:00
moodler ec0810ee2d Some fixes to make the context more readable for humans 2006-08-09 04:51:05 +00:00
toyomoyo 07a9cdb544 tables went missing =( 2006-08-09 04:00:44 +00:00
skodak f9d5371b28 new function get_coursemodule_from_id() is now used for obtaining of valid $cm from coursemodule id SC#283 2006-08-08 22:09:55 +00:00
stronk7 9c642ecacb Initial XMLDB schema for data tables. Using FKs where they are obvious. 2006-08-08 17:00:44 +00:00
stronk7 305ebf6849 Initial XMLDB schema for choice tables. Using FKs where they are obvious. 2006-08-08 17:00:03 +00:00
stronk7 14e1b02e68 Initial XMLDB schema for chat tables. Using FKs where they are obvious. 2006-08-08 16:59:35 +00:00
stronk7 5a1d835487 Adding some unsigned keywords here and there and implementing role tables 2006-08-08 09:04:55 +00:00
toyomoyo e9871557be some UI change for roles 2006-08-08 08:31:21 +00:00
toyomoyo 90f7a7d509 adding unsigned 2006-08-08 08:30:10 +00:00
toyomoyo e6723f80dc these tables should not be there,, 2006-08-08 08:04:01 +00:00
vyshane 9af1611a06 Replaced capability mod/forum:viewdiscussionsfromallgroups by
moodle/site:accessallgroups in code. Removed former from mod/forum/db/access.php.
2006-08-08 06:56:09 +00:00
vyshane 27950688bb Added moodle/site:accessallgroups capability. 2006-08-08 06:45:25 +00:00
moodler bbbf2d4015 ROLES AND PERMISSIONS - FIRST CHECK-IN
=======================================

WARNING:  DEV IS CURRENTLY VERY UNSTABLE.

This is a mega-checkin of the new Roles system.   A lot of changes have
been made in core and modules.

Currently there are a lot of rough edges and known problems.  We are
working hard on these .. .the reason for getting this into HEAD at this
stage is enable us to move faster (our branch was diverging from HEAD
too much).

Please keep an eye on http://docs.moodle.org/en/Roles for current status
and information for developers on how to use the new Roles system.
2006-08-08 05:13:06 +00:00
moodler 394577c3e4 Automatic installer.php lang files by installer_builder (20060808) 2006-08-08 02:48:27 +00:00
stronk7 2bcd169775 Hack to link from the admin interface to the XMLDB editor. 2006-08-07 19:47:03 +00:00
stronk7 ab8bfc7eee Two new strings to display the XMLDB editor under the admin page. 2006-08-07 19:45:02 +00:00
stronk7 cbd645bf96 Initial commit of assignment XMLDB file. Stopping now from now. Going to document things... 2006-08-07 19:02:46 +00:00
stronk7 e80d52526d Initial commit for enrol tables XMLDB 2006-08-07 18:52:27 +00:00
stronk7 08b6ce833d Initial commit for rss block tables 2006-08-07 18:40:37 +00:00
stronk7 158c1b3035 Initial commit of blocks XMLDB schema 2006-08-07 18:30:46 +00:00
stronk7 a689637d0f Polishing a bit key and indexes names... 2006-08-07 18:02:15 +00:00
stronk7 dff83d0bdc Initial XMLDB implementation of Moodle backup tables 2006-08-07 17:58:19 +00:00
stronk7 67d7d69494 Initial XMLDB implementation of Moodle Core. 2006-08-07 17:38:06 +00:00
skodak 3e46c6ec5a Swf now disabled by default in Mediaplugin and added explanation SC#284; merged from MOODLE_16_STABLE 2006-08-07 14:53:53 +00:00
moodler 214f1402ac Automatic installer.php lang files by installer_builder (20060806) 2006-08-06 02:50:52 +00:00
tjhunt 5a14d563b9 Bug #5972 - Some question types mark a blank answer inconsistently.
Also, cleaned up the marking code for numerical and short answer questions, partly by making the base-class method more useful.

Rewrote the way the way short answer questions do wildcard matching to be more robust, Unicode safe, and generally not suck.

This is a big change, so I am pleased to report I tested it using my new Selinium  test suite. See: http://moodle.org/mod/forum/discuss.php?d=51161
2006-08-04 16:53:43 +00:00
tjhunt 00c300692f Fix whitespace. 2006-08-04 16:47:57 +00:00
tjhunt 0b4ce29d8d Matching question would fill in the right answer after an incorrect attempt. 2006-08-04 12:28:39 +00:00
martinlanghoff cbfad05c86 login: forgot password now works for guest again (bug #6214) 2006-08-04 06:11:48 +00:00
martinlanghoff bed24ce7f5 mod/assignment if we are not using a numeric scale and a custom scale
return that as the max grade


Author: Jun Yamog <jun@catalyst.net.nz>
2006-08-04 05:51:31 +00:00
skodak 2c93e66a4c merging forgotten changes from MOODLE_16_STABLE; sorry for the breakage ;-) 2006-08-03 19:19:23 +00:00
tjhunt bc5694133a Bug #6206 - Quiz can't be created on some mysql configurations. Merged from MOODLE_1.6_STABLE. 2006-08-03 16:30:38 +00:00
skodak df77b427d5 check_dir_exists() has new recursive parameter - it should help clean up the restore code a bit and could be handy elsewhere too; tested in both linux and windoze 2006-08-02 19:40:58 +00:00
mchampan 56e924061e Resource doc type and Zend readme changed. 2006-08-02 15:31:59 +00:00
mchampan c629cfed33 Option for additional search types added. 2006-08-02 15:17:46 +00:00
mchampan 01e6afe2cd String issue fix in ZF. 2006-08-02 15:15:45 +00:00
moodler f505236c51 Automatic installer.php lang files by installer_builder (20060802) 2006-08-02 02:47:38 +00:00
koenr 3e35ad3397 string is necessary in 1.6 (so must stay here for backward compatibility of translated language packs, created with Moodle editor) 2006-08-01 19:58:07 +00:00
skodak 9e72ebd678 improved redirect() - faster and more standards compliant 2006-08-01 18:02:42 +00:00
skodak 583fad994c Bug #5352 - upgrade might be interrupted by user - upgrades are now logged into moddata/upgradelogs/, user abor is ignored and concurrent running of upgrades is prevented from one browser 2006-08-01 07:46:19 +00:00
toyomoyo 0c23b59c9b merfed fix for 6178 2006-08-01 05:12:13 +00:00
skodak bfc38bb2eb merging changes from MOODLE_16_STABLE 2006-07-31 18:21:42 +00:00
skodak a8ff58dd2c merging changes from MOODLE_16_STABLE 2006-07-31 18:10:02 +00:00
skodak 889e6b46f4 Bug #6147 - Upgrade from 1.5.x breaks with Postgres 7.4.x
Even though Postgres 7.4.x is officially supported, several upgrade scripts use syntax that only works in Postgres 8.x. and it's impossible to finish the upgrade.

The attached patch fixes those scripts.

Saludos. I�aki.

Author: I�aki Arenaza
Review: Jun Yamog, Martin Langhoff

merged from MOODLE_16_STABLE
2006-07-31 18:04:10 +00:00
skodak 365525fc51 Bug #6147 - Upgrade from 1.5.x breaks with Postgres 7.4.x
Even though Postgres 7.4.x is officially supported, several upgrade scripts use syntax that only works in Postgres 8.x. and it's impossible to finish the upgrade.

The attached patch fixes those scripts.

Saludos. I�aki.

Author: I�aki Arenaza
Review: Jun Yamog, Martin Langhoff

merged from MOODLE_16_STABLE
2006-07-31 17:54:32 +00:00
ethem d9d69929f5 Don't show authorize.net password for security reasons. Merged from 16stable. 2006-07-31 12:45:34 +00:00
ethem 0127848e11 Don't show authorize.net password for security reasons. Merged from 16stable. 2006-07-31 12:37:12 +00:00
skodak 3ea3763a18 Bug #6146 - Smiley popup can not be translated; merged from MOODLE_16_STABLE 2006-07-31 10:28:12 +00:00
skodak 1322b7199a fixed warning when no referer available; merged from MOODLE_16_STABLE 2006-07-31 10:05:23 +00:00
skodak d1a66080d5 Bug #6168 - missing link for course request - fixed; merged from MOODLE_16_STABLE 2006-07-31 09:18:52 +00:00
martinlanghoff 0ff463ae95 assignment: count_user_files() no longer creates extraneous dirs (bug#4658)
Applied the fix by Samuli.Karevaara, from the bug report - the directory is checked for existence beforehand.
Previously it was created if it didn't exist, then the files within it were counted.


Author: Luke Hudson <luke@catalyst.net.nz>
2006-07-31 04:56:58 +00:00
martinlanghoff 51886e2fb4 wiki: Added a link to force reloading of the page (WR#515)
The link allows the page to be reloaded, which saves people from only seeing the cached copy. This is the equivalent of doing Shift+Reload in most
browsers.


Author: Luke Hudson <luke@catalyst.net.nz>
2006-07-31 04:56:12 +00:00
martinlanghoff c1cda9df45 forum: notification of a moved dicussion (bug#4874)
Moving a discussion now leaves a notification message in the
original location with a link to the new location.


Author: Luke Hudson <luke@catalyst.net.nz>
2006-07-31 04:54:44 +00:00
julmis 5113b779f6 First attempt to indentify special tags and nicely formatted output 2006-07-31 01:45:22 +00:00
julmis bb9cd4503a Merging from stable 2006-07-30 23:24:43 +00:00
skodak 3d05094553 SC #280 force downloading of database files; merged from MOODLE_16_STABLE 2006-07-30 22:44:50 +00:00
skodak 95d5682927 Bug #6170 - Glossary bug: it displays nothing when autolinking to non-ascii text and other minor cleanup; merged from MOODLE_16_STABLE 2006-07-30 22:22:22 +00:00
skodak 36259d1bd3 Bug #6135 - Reduce unnecessary use of strtolower to make non-English languages look better; merged from MOODLE_16_STABLE 2006-07-30 21:47:43 +00:00
skodak be933850a7 Bug #6176 - locale setting on config variables page not functioning correctly; merged from MOODLE_16_STABLE 2006-07-30 10:39:21 +00:00
moodler 8ee8f34bff Automatic installer.php lang files by installer_builder (20060730) 2006-07-30 02:47:40 +00:00
koenr bfb2734ed4 updating install.html (see bug 4759) Changed some links.
Should that file really be there?
2006-07-29 20:40:20 +00:00
koenr 4239429527 making one perfectionist happy (bug 5646) 2006-07-29 20:00:26 +00:00
skodak e9515eb3ec Bug #6181 - icelandic doesn't migrate; merged from MOODLE_16_STABLE 2006-07-29 09:44:33 +00:00
skodak 592c30370c Bug #6184 - unexpected T_OBJECT_OPERATOR on Admin/blocks; PHP 4.x compatibility 2006-07-29 09:08:56 +00:00
skodak f4f6599085 Bug #6183 - typo in clean_param() description; merged from MOODLE_16_STABLE 2006-07-28 20:57:19 +00:00
mchampan 0961c4e654 Added constant for search database table. 2006-07-28 13:27:44 +00:00
mchampan fef0afe183 Changed $doc->id to $doc->docid to prevent clashes with Zend Search's internal
$doc->id
2006-07-28 13:27:15 +00:00
tjhunt 7d6af8ca5a Bug #6185 - bug with matching questions. 2006-07-28 10:56:47 +00:00
tjhunt bdfad57b83 Added information to a comment. 2006-07-28 10:55:37 +00:00
urs_hunkler 89240f2f30 *** empty log message *** 2006-07-27 20:37:58 +00:00
urs_hunkler f88d969277 *** empty log message *** 2006-07-27 20:27:33 +00:00
urs_hunkler 13351b29b8 *** empty log message *** 2006-07-27 20:18:27 +00:00
ethem 9dec3768bc Merged from 16stable. 2006-07-27 16:11:11 +00:00
skodak 0e29ee3af7 Fixed Call to undefined function: print_progress() in /usr/share/moodle/admin/upgradeforumread.php; merged from MOODLE_16_STABLE 2006-07-27 11:49:52 +00:00
ethem 08b9be083c Bug: Sending email to admins/teachers the count of pending orders expiring. "Column 'timecreated' in where clause is ambiguous."
We joins 2 tables: course and enrol_authorize. We didn't select course.timecreated, but it gives this error.
Merged from MOODLE_16_STABLE.
2006-07-27 10:57:58 +00:00
tjhunt 9a1e5f0a5f Clarified unit test failure message. 2006-07-27 10:43:14 +00:00
tjhunt fad28a7451 More unit tests for numerical question type. 2006-07-27 08:32:50 +00:00
moodler 3088953230 Automatic installer.php lang files by installer_builder (20060727) 2006-07-27 02:50:35 +00:00
mchampan defb87ba90 Glossary indexing added, used to demonstrate that it's relatively simple
to add a new module to the indexing queue.
2006-07-26 11:29:35 +00:00
moodler ed35659607 Automatic installer.php lang files by installer_builder (20060726) 2006-07-26 02:43:53 +00:00
ethem 36e5d9b7e1 Merged from 16stable. 2006-07-25 17:38:32 +00:00
mchampan b585dc5fcb General updates, see README.txt. 2006-07-25 17:23:10 +00:00
mchampan d9e1bf2478 Initial commit 2006-07-25 17:10:58 +00:00
ethem 8692e35c77 New string: costdefaultdesc
<strong>In course settings, enter -1</strong> to cost field to use this default cost; Merged from 16stable.
2006-07-25 17:00:41 +00:00
tjhunt 22f2f41810 Start of unit tests for numerical question type. 2006-07-25 07:08:21 +00:00
ethem 8895a9cdc8 Sometimes ssl connections are slow. Increase max_execution_time to 5 minutes. Merged from 16stable. 2006-07-24 16:32:38 +00:00
tjhunt 3b48ba9dc1 Bug #6157 - lang strings using concatenation, not $a. Merged from MOODLE_16_STABLE. 2006-07-24 14:40:48 +00:00
ethem fc9e83ed5c * Update record as soon as possible. If update/insert record fails email to admin to have update manually.
* ignore_user_abort(true) at critical section (before fwrite($fp, "POST /gateway/transact.dll).
   This is last change to ignore request for user.
 * Made some functions "static" to call function directly. So, no need new enrolment_plugin_authorize() instance.
   Now, these are static:
   get_list_of_creditcards, zero_cost, get_course_cost, prevent_double_paid, email_to_admin, check_openssl_loaded
 * Some mtrace cleanup. Removed default new line.

This is big work. When PHP5 is required for moodle in the future, I will add static modifier to functions.
Now and future, this plugin is/will unbreakable; Merged from MOODLE_16_STABLE. :)
2006-07-24 12:19:20 +00:00
skodak b245d2e707 Bug #6159 Site settings interface typo - Combo list - my first commit form UK MoodleMoot :-); merged from MOODLE_16_STABLE 2006-07-24 10:33:34 +00:00
danmarsden f2b7abf058 Bug #5882 ldap enrolment doesn't work. $USER->student getting munged
patch from I?aki.
2006-07-24 00:37:58 +00:00
danmarsden 0ba66a5de0 Bug 6130 session has bad entries causes calendar to fail showing events
Workaround untill Session is fixed properly.
2006-07-24 00:15:54 +00:00
danmarsden e4aa175a92 Fixes for Bug 5749 and Bug 5750
summary of bug 5749 and 5750
fixes for: function causes timeout when deleting temporary files for large scorm objects
scorm\validate.php calls function scorm_delete_files from scorm\lib.php - but lib.php not included in validate.php

Validation of Scorm objects broken - adds entry in modules database even when scorm object is not created.
2006-07-23 23:48:09 +00:00
danmarsden 1e0c4d67fd Fix for Bug 6119 - gives error when choice full, and user submits a choice they have already selected 2006-07-23 22:14:31 +00:00
danmarsden 5ac207d98e fix for Bug #4733 title gets garbled when html inside title. 2006-07-23 22:05:18 +00:00
moodler d2308eb9ea Automatic installer.php lang files by installer_builder (20060722) 2006-07-22 02:44:19 +00:00
tjhunt 87ee4968e5 Bug #4811 (and several dups!) - Matching questions should treat identical answers as the same. 2006-07-21 13:58:00 +00:00
tjhunt 43595a3370 Replace a few odd tabs with spaces. Merged from MOODLE_16_STABLE. 2006-07-21 08:03:23 +00:00
stronk7 3f5adc4af1 Keeping this in sync with 16_STABLE 2006-07-21 07:56:27 +00:00
tjhunt 393c9d489a Bug #5946 - matching question php notice. Merged from MOODLE_16_STABLE. 2006-07-21 07:21:45 +00:00
urs_hunkler b08c4173ea merged, corrected bug with teacger rights 2006-07-21 05:00:02 +00:00
ethem 769b3187c2 x_auth_code is required for capture only transactions!
NOTE: Capture only transactions have not implemented yet!
2006-07-20 14:48:03 +00:00
skodak 57ea9c8fff fixed minor PHP5 compatibility problem with clone(); merged from MOODLE_16_STABLE 2006-07-20 06:54:44 +00:00
skodak 249ab74573 Bug #6075 - file admin/index.php is ISO encoded - headers broken by ob_end_flush(), fixed version check; merged from MOODLE_16_STABLE 2006-07-20 06:39:48 +00:00
skodak 5e60122254 Bug #6141 - Cron output is not plain text - <pre> and missing encoding, minor lang issues; merged from MOODLE_16_STABLE 2006-07-20 06:36:33 +00:00
skodak 250f78be94 Bug #6097 - HTML editor and brackets - fixes lesson problems; merged from MOODLE_16_STABLE 2006-07-20 06:32:38 +00:00
ikawhero 9f76a845ff Fixed typo. Merged from stable. 2006-07-20 01:33:11 +00:00
skodak 5337b2b727 yet another fix for course list for guests; merged from MOODLE_16_STABLE 2006-07-19 13:59:06 +00:00
skodak d35d50bf94 fixed course list for guests; merged from MOODLE_16_STABLE 2006-07-19 13:45:13 +00:00
skodak fe2920ad54 admin should not see list of courses on the frontpage when there are too many of them; merged from MOODLE_16_STABLE 2006-07-19 13:37:09 +00:00
skodak d157bd5b28 fixed course/index.php category display affected by previous commit - improved category and course list display on front page; merged from MOODLE_16_STABLE 2006-07-19 13:16:57 +00:00
skodak 1bc6fc82b6 section not always moved when requested - page reloading prevented by anchor; added random parameter to force reloading; merged from MOODLE_16_STABLE 2006-07-19 12:52:06 +00:00
skodak a987106d9e Bug #6093 - Removed course sections re-appear after moving existing sections; merged from MOODLE_16_STABLE 2006-07-19 12:30:39 +00:00
skodak 6f24e48e1f Improved category and course list display on front page- see bug Bug #5965 - Frontpage Category List also showing courses; new Combo List(categories + courses), fixed categories list and separate settings for not logged in / logged in users; merged from MOODLE_16_STABLE 2006-07-19 12:10:07 +00:00
moodler fa145ae1af Merged fixes from stable 2006-07-19 10:21:52 +00:00
skodak ad0f9c828e Bug #6136 - Hard coded admin paths; merged from MOODLE_16_STABLE 2006-07-19 08:13:25 +00:00
tjhunt 45d5305e19 Bug #6048 - Fix 'are you sure you want to start an attempt' warning. 2006-07-18 16:49:33 +00:00
stronk7 8f7211fc2c minor bump to perform some changes on grade_letter
Mimic from MOODLE_16_STABLE
2006-07-18 16:35:52 +00:00
stronk7 d272c2feb8 Fixing one recently added DB upgrade. Please be careful on STABLE!
Mimic from MOODLE_16_STABLE
2006-07-18 16:35:15 +00:00
tjhunt d7444d442f Bug #6033 - missing string for unknown questiontype. Also tidied up some messy code. Merged from MOODLE_16_STABLE. 2006-07-18 15:34:24 +00:00
tjhunt 1367cb8d6b SC#277. Merged from MOODLE_16_STABLE. 2006-07-18 13:33:45 +00:00
tjhunt ee26dfd17b Bug #6116 - Quiz database upgrade scripts call renamed function by the old name. Merged from MOODLE_16_STABLE. 2006-07-18 11:01:06 +00:00
urs_hunkler 1ec4315887 remove styles_layout.css 2006-07-18 09:21:39 +00:00
urs_hunkler 296ed48e99 merged from 1.6 - enhancements and bugfixes, works now in Safari and Konqueror 2006-07-18 09:11:35 +00:00
urs_hunkler d4b912c242 merged from 1.6 - some CSS changes 2006-07-18 08:10:29 +00:00
skodak f90238b303 Bug #2149 - admin/creators.html javascript error; merged from MOODLE_16_STABLE 2006-07-18 07:17:13 +00:00
skodak 8332de167d Bug #6134 - error of coding, in function grade_download_form(); merged from MOODLE_16_STABLE 2006-07-18 06:43:29 +00:00
martinlanghoff 2338ad3239 Close Bug #5670 - get_courses_page() - remove costly and redundant DISTINCT
get_courses_page() uses get_records_sql() which means that it will actually
break if the first field requested isn't c.id. This in turn means that
the DISTINCT is not needed at all.

So let's go fast again!
2006-07-18 04:39:01 +00:00
martinlanghoff cb6f407365 Course restore - Restrict shortname to <= 15 characters, like the database table.
Author: Donal McMullan <donal@catalyst.net.nz>
2006-07-18 03:35:02 +00:00
moodler 23458f0d30 Automatic installer.php lang files by installer_builder (20060718) 2006-07-18 02:40:53 +00:00
toyomoyo 626fddc8f5 merged fix for a bug where user can view site blogs when not logged in 2006-07-18 02:28:25 +00:00
martinlanghoff 3279a35540 auth/db: When using internal passwords we must register auth_update_user_password()
Now users can update their password correctly. We did have this before, I
wonder if it got dropped in a merge.
2006-07-18 01:36:47 +00:00
martinlanghoff bd18fe9ced auth/db: use auth_validate_form() to set auth_db_stdchangepassword when passtype is 'internal'
When using the 'internal' password handling, set auth_db_stdchangepassword
so we allow users to change their password normally.
2006-07-18 01:36:24 +00:00
martinlanghoff 1590773b1c auth: extend API to support auth_validate_form()
Now Auth plugins can register auth_validate_form to get a chance
to validate config form input. Needed on MOODLE_16_STABLE to fix
a bug with auth/db.

The auth API must follow suit with the enrol API, where we can safely
do method_exists().
2006-07-18 01:36:06 +00:00
skodak 2d4fb02fa2 Bug #1395 - Calandar view.php should respect forcelogin; merged from MOODLE_16_STABLE 2006-07-17 21:08:01 +00:00
tjhunt a92a796a6a Bug 6092 - Give quiz finish time as well as start time in the quiz overview report. 2006-07-17 16:35:34 +00:00
skodak 1b4035b074 Bug #6129 - Incorrect glossary import file size limit; merged from MOODLE_16_STABLE 2006-07-17 13:35:05 +00:00
tjhunt da298d8201 Bug 5840 - Image not displayed in Cloze question. Thanks to Joseph Rezeau for the fix. Merged from MOODLE_16_STABLE. 2006-07-17 08:57:30 +00:00
skodak 43d774a94f Bug #6120 - Course creation - loginproblem; merged from MOODLE_16_STABLE 2006-07-17 08:39:36 +00:00
skodak 639835274c workaround by Dan for bug #6130, fixed some warnings; merged from MOODLE_16_STABLE 2006-07-17 07:31:22 +00:00
martinlanghoff 63aea8815d enrol API: Updated documentation 2006-07-17 06:02:10 +00:00
stronk7 cd58557ae0 Close properly the showentry page. Bug 5986.
(http://moodle.org/bugs/bug.php?op=show&bugid=5986)

Merged from MOODLE_16_STABLE
2006-07-16 09:01:03 +00:00
moodler 9448bfca23 Automatic installer.php lang files by installer_builder (20060716) 2006-07-16 02:38:13 +00:00
stronk7 c67303bd97 Soled bug 6089 plus some minor iteration savings...
(http://moodle.org/bugs/bug.php?op=show&bugid=6089)

Merged from MOODLE_16_STABLE
2006-07-15 08:39:50 +00:00
skodak 3984a18589 Bug #6080 - Loancalc block doesn't define a footer string; merged from MOODLE_16_STABLE 2006-07-14 21:05:14 +00:00
skodak e25f766dee todo: add detection of incorrect chars in wwwroot; merged from MOODLE_16_STABLE 2006-07-14 20:57:08 +00:00
tjhunt 062a7522c2 Bug 6111 - Rewrite the code for making an indented list of question categories, becase the existing code was so horrible. Merged from MOODLE_16_STABLE. 2006-07-14 15:36:29 +00:00
mchampan 91ad9557c1 Fixed pagination in query page (lines were too long, distorting table),
and added results caching to improve query time when browsing pages of the
same query. Wiki document strips (x.x.x.x) ip field from author field now.
2006-07-14 13:58:46 +00:00
sam_marshall 44c55d4662 Added hooks so that blocks can create functions that are run when they are installed and uninstalled. The base implementation does nothing. 2006-07-14 11:17:46 +00:00
moodler a62b843a51 Automatic installer.php lang files by installer_builder (20060714) 2006-07-14 02:37:32 +00:00
skodak 15a6cf334f Bug #6099 - Restore alternatively failing on data module - fixed status codes of module restore process; merged from MOODLE_16_STABLE 2006-07-13 15:38:03 +00:00
moodler 418b4e5a5f Merged new variable $CFG->allowvisiblecoursesinhiddencategories from stable 2006-07-13 14:18:29 +00:00
tjhunt a36f058e53 Bug 6101 - Automatically scroll to any errors when upgrading the database. JavaScript thanks to Andrew Walker. PHP changes are my fault. 2006-07-13 09:48:56 +00:00
moodler 118917bf17 Checking YUI into Moodle for future AJAX work 2006-07-13 08:35:43 +00:00
moodler 7bf59275a7 Merged assignment updates from stable 2006-07-13 07:50:13 +00:00
moodler fcdcc372f1 Integrating the "AU Assignment type" into Moodle (which was based on
Upload&Review).

It's not tested and probably needs polishing, but people seem to love it
as it is.

    http://moodle.org/mod/forum/discuss.php?d=46829
2006-07-13 07:17:51 +00:00
skodak afda6b5681 Bug #6087 - alphabetic problem in glossary; merged from MOODLE_16_STABLE 2006-07-12 20:29:18 +00:00
tjhunt bba6c85f24 Bug 5968 - Improvements to the numerical question type. You can now display feedback for wrong answers. You can also award partial credit for different levels of accuracy. 2006-07-12 18:10:22 +00:00
tjhunt fc05b7d1ca Doh! remove debug code. Sorry. 2006-07-12 17:54:45 +00:00
tjhunt 1fe641f7b4 Bug 5968 - Improvements to the numerical question type. You can now display feedback for wrong answers. You can also award partial credit for different levels of accuracy. 2006-07-12 17:49:14 +00:00
tjhunt 78b9c960e9 Fixed notice when restoring a numerical question with no units. 2006-07-12 17:37:36 +00:00
moodler b574487ae9 Automatic installer.php lang files by installer_builder (20060712) 2006-07-12 08:35:53 +00:00
martinlanghoff 7199fcd466 Fixed installer langpacks for sm and to. 2006-07-12 06:38:09 +00:00
skodak 18478666ca fixed printing of filenames from zip archives - SC#273; merged from MOODLE_16_STABLE 2006-07-12 05:57:28 +00:00
moodler e6e6ca0389 Automatic installer.php lang files by installer_builder (20060712) 2006-07-12 02:36:01 +00:00
martinlanghoff 07b76bad6a chat: Prevent user from submitting a 2nd message before his 1st is received.
Some users reported that mod/chat was silently dropping some messages. The
user's browser may not be able to keep up with the rate at which he submits
chat messages. This update keeps things sane.

Merged from MOODLE_16_STABLE

Author: Donal McMullan <donal@catalyst.net.nz>
2006-07-12 02:29:12 +00:00
stronk7 1a9b9a0143 Emulate file_put_contents() under PHP 4.3.x 2006-07-11 17:42:21 +00:00
mchampan a25a3912f7 Search functions moved from mod/name/lib.php to search/documents/mod_document.php.
Pagination added to query page. Various small changes and amendments.
2006-07-11 17:15:22 +00:00
tjhunt 079aa26d7d Bug #6077 - Teacher saving their grades destroys student essay! Merged from MOODLE_16_STABLE. 2006-07-11 16:14:23 +00:00
mchampan e0eb89a13e Initial commit 2006-07-11 16:08:47 +00:00
danstowell 12a2567375 Small fix, and a bit more output, for IMS enroller 2006-07-11 14:09:26 +00:00
skodak 496d06443a better cleaning of $file parameter SC#276; merged from MOODLE_16_STABLE 2006-07-11 13:19:52 +00:00
skodak b2ec10959a workaround for Bug #6035 - editing quiz in one tab changes quiz in other; merged from MOODLE_16_STABLE 2006-07-11 13:02:42 +00:00
skodak 4e060ab972 Bug #6067 - The restore process behaves differently depending on which module contains the absolute links; merged from MOODLE_16_STABLE 2006-07-11 10:01:33 +00:00
moodler 18ab25bccd new installer.php file added. (stronk7)
Merged from MOODLE_16_STABLE
2006-07-11 09:43:22 +00:00
toyomoyo 2256c10d36 merged changing of feedback for the function that handles user table 2006-07-11 03:36:13 +00:00
moodler 10c51050fe Automatic installer.php lang files by installer_builder (20060711) 2006-07-11 02:38:03 +00:00
skodak 5109569b69 Bug #5988 - Branch Tables in 1.6+ (Lesson Module); merged from MOODLE_16_STABLE 2006-07-10 22:39:58 +00:00
skodak 46341ab710 Bug #5732 - Lesson Scores &quot;out of XX&quot; marks report incorrect mark; merged from MOODLE_16_STABLE 2006-07-10 21:52:12 +00:00
ethem 411df816d6 - authorize_expired function added to lessen the code.
- All functions in authorize plugin are named with authorize_ prefix.

Merged from 16stable.
2006-07-10 10:17:23 +00:00
moodler 6476b0afe7 CSS templates weren't being backed up! 2006-07-09 02:03:22 +00:00
skodak 81b0eec894 Bug #6050 - import glossary entries to new glossary not creating new glossary; merged from MOODLE_16_STABLE 2006-07-07 19:54:22 +00:00
thepurpleblob 1e8639290f Merged from STABLE 2006-07-07 10:36:56 +00:00
skodak 2af7f6e266 fixed warning in glossary export, merged from MOODLE_16_STABLE 2006-07-06 21:27:00 +00:00
skodak 10ab3efc35 Bug #5820 - IE returns unsecure items with SSL on login; merged from MOODLE_16_STABLE 2006-07-06 15:53:46 +00:00
thepurpleblob 0fade9ed01 Merged from STABLE 2006-07-06 14:01:52 +00:00
ethem f9bfa458a2 Some outputting debugging info for cron. Merged from 16stable. 2006-07-06 13:41:55 +00:00
danstowell 6d19caab41 Change to make LDAP enroller simply ignore accounts with blank idnumber - see moodle.org discussion with Inaki 2006-07-06 13:13:42 +00:00
ethem 1c23b14db3 - Daily cron seperated from main cron for performance.
- Performance for welcome message sending to students. Order by student. This sends only one message for each students.

Merged from MOODLE_16_STABLE.
2006-07-06 12:01:24 +00:00
ethem 8ca28a6119 New string: welcometocoursesemail 2006-07-06 11:54:27 +00:00
tjhunt ec23db087c Bug 6031 - missing parameter for warningmissingtype in libquestionlib.php. Merged from MOODLE_16_STABLE. 2006-07-06 11:09:24 +00:00
skodak 2cc14e87d3 Bug #4698 - Login block is broken!, improved cookie test; merged from MOODLE_16_STABLE 2006-07-06 10:11:06 +00:00
tjhunt 68d07f8b01 6030 - Can't move question categories back to the top level. Merged from MOODLE_16_STABLE. 2006-07-06 10:07:26 +00:00
skodak 84a9db331f Bug #5921 - editing forum post bug; merged from MOODLE_16_STABLE 2006-07-06 10:01:12 +00:00
skodak 246444b975 Bug #5615 - Assigment listing shows duplicate names with paged display; merged from MOODLE_16_STABLE 2006-07-06 09:47:48 +00:00
tjhunt 16750bcd85 File header cleanup. 2006-07-06 09:45:02 +00:00
thepurpleblob 2c4ef1504f Merged from STABLE 2006-07-06 08:37:56 +00:00
martinlanghoff 330b0bb2ad wiki: fix for IE6 bug with HTMLArea, where the text area is not drawn
IE6 measures a page element and - sometimes - it does this before the
element is drawn, so the dimensions it finds are zero. This update sets
sensible minimum for the width.

Author: Donal McMullan <donal@catalyst.net.nz>
2006-07-06 05:38:53 +00:00
martinlanghoff 95900e17f2 wiki: Fix for broken view on new (empty) wiki pages.
The wiki should display the 'edit' screen when a user tries to view a page
that doesn't exist. This output should not be filtered.

Merged from MOODLE_16_STABLE

Author: Donal McMullan
2006-07-06 05:08:11 +00:00
tjhunt df7d152e77 Improved on-screen instructions for matching questions. 2006-07-05 15:39:27 +00:00
mchampan abb4ea20d4 Cleaned up files, fixed some discrepancies and made sure strings that needed escaping
used the correct function. Add description comments to files.
2006-07-05 14:37:16 +00:00
thepurpleblob 71ffbac2da merged from STABLE 2006-07-05 12:39:35 +00:00
tjhunt 9e452c0d7b Layout similar question types more consistently. 2006-07-05 12:32:53 +00:00
tjhunt 645d76103b Bug 5971 - Allow matching questions to have extra wrong answers - supplimental. And another one. 2006-07-05 12:19:11 +00:00
tjhunt 974383f976 Bug 5971 - Allow matching questions to have extra wrong answers - supplimental. And another one. 2006-07-05 12:00:23 +00:00
tjhunt 0c24ee0fbf Bug 5971 - Allow matching questions to have extra wrong answers - supplimental. I missed a bit last time. 2006-07-05 11:58:14 +00:00
thepurpleblob eaaf06f1ce Merged from STABLE 2006-07-05 11:51:08 +00:00
sam_marshall ba75ad9400 Minor changes to send_file():
* Wrote phpdoc comment that documents all parameters
* Added $mimetype param (default empty) that can be used if MIME type is already known and doesn't need guessing from filename
2006-07-05 11:10:37 +00:00
tjhunt 00aeaec820 Bug 6019: Quiz timer does not submit the form when it reaches zero. Merged from MOODLE_16_STABLE. 2006-07-05 10:43:53 +00:00
skodak 8a91d7fcf3 changed memory limit test in healthcenter; merged from MOODLE_16_STABLE 2006-07-05 08:38:34 +00:00
skodak 9bbb40d631 healthcenter fixes - new extra whitespace detection, fixed automatic slasharguments detection; merged from MOODLE_16_STABLE 2006-07-05 07:44:20 +00:00
toyomoyo 8ab2baa8f3 merged fix for a problem where globallang is not respected in user table 2006-07-05 01:55:29 +00:00
tjhunt a58ffe3fe2 Bug 5971 - Allow matching questions to have extra wrong answers. 2006-07-04 17:11:00 +00:00
skodak aedbbbcf9c fix for mysqladmin links; merged from MOODLE_16_STABLE 2006-07-04 09:41:47 +00:00
skodak bc1544bfc7 Bug #5909 - Fix use of user_group() because it returns arrays now - part 2 forum search fixed too; merged from MOODLE_16_STABLE 2006-07-04 08:32:05 +00:00
skodak 06622f92fc fixed $site->id warning; merged from MOODLE_16_STABLE 2006-07-04 06:05:25 +00:00
skodak 81e10e950d Bug #6007 - &quot;The requested URL /course/report/log/view.php was not found on this server&quot; merged from MOODLE_16_STABLE 2006-07-04 05:27:18 +00:00
moodler 21c5d4ed3d Automatic installer.php lang files by installer_builder (20060704) 2006-07-04 02:38:09 +00:00
skodak f262874bbe Bug #5909 - Fix use of user_group() because it returns arrays now - part 1; merged from MOODLE_16_STABLE 2006-07-03 21:11:17 +00:00
skodak 13d32e2297 Bug #5974 - Course overview report should not error when stats are not up to date; fixed by changing the return value from stats_check_uptodate(), NULL is now OK, string value describes error and adding notify() where needed; merged from MOODLE_16_STABLE 2006-07-03 15:43:41 +00:00
tjhunt 4f9c6e279c Rename lang file as per Martin's request. 2006-07-03 10:04:04 +00:00
skodak d61989033f Bug #5991 - The calendar does not show the month's first day's event; merged from MOODLE_16_STABLE 2006-07-03 09:10:12 +00:00
skodak 7eb60c262a Bug #5995 - poor English in expiry notice; merged from MOODLE_16_STABLE 2006-07-03 07:21:20 +00:00
skodak dbfa9ccd8d Bug #5996 - block+resource=problem; merged from MOODLE_16_STABLE 2006-07-03 06:26:38 +00:00
moodler 050e11247b Automatic installer.php lang files by installer_builder (20060701) 2006-07-01 02:38:26 +00:00
tjhunt 3ef8c9362d Bug #5979 - Check in the OU's unit testing framework. Docs at http://docs.moodle.org/en/Unit_tests 2006-06-30 14:59:05 +00:00
skodak 6544f8d896 slashargument fix for healthcenter, better diagnostic messages; renamed file.php/pic.jpg option to file.php/1/pic.jpg because the course number is mandatory; merged from MOODLE_16_STABLE 2006-06-30 13:46:25 +00:00
skodak 629c25da67 cleanup in admin/index.php; preparation for health center, loginas gui, password salts; merged from MOODLE_16_STABLE 2006-06-30 13:06:31 +00:00
skodak 79b37009fc fixed // in course root when browsing files; merged from MOODLE_16_STABLE 2006-06-30 11:56:37 +00:00
tjhunt c358d62055 Bug 5967 - Missing lang strings and help for quiz reports. Merged from MOODLE_16_STABLE. 2006-06-30 10:31:44 +00:00
skodak 06cfc6db58 Bug #5961 - small grammar error; merged from MOODLE_16_STABLE 2006-06-30 07:36:06 +00:00
skodak aba588a726 Bug #5802 - Incorrect length in http partial content (206) packets.; merged from MOODLE_16_STABLE 2006-06-30 07:23:08 +00:00
moodler 95e86170a2 Automatic installer.php lang files by installer_builder (20060630) 2006-06-30 02:41:15 +00:00
skodak 9c1cd39de5 Bug #5937 - Fix nonascii chars in graphs:
* text is converted to unicode - no html entities anymore
 * then all nonascii chars are converted to decimal number entites
 * default.ttf is searched in dataroot/lang and local language packs too
 * removed lang_decode() - obsoleded by proper entity converison above
 * updated documentation in lang/en_utf8/fonts/README.txt

merged from MOODLE_16_STABLE
2006-06-29 21:22:16 +00:00
ethem 3b34491b95 Put back last commit. If cost is 0, it always falls back to manual method. 2006-06-29 19:13:12 +00:00
ethem 11fffc6059 Merged from MOODLE_16_STABLE. 2006-06-29 19:07:28 +00:00
moodler 5e2194494b new installer.php file added. (stronk7)
Merged from MOODLE_16_STABLE
2006-06-29 16:55:24 +00:00
ethem b1c87d90dc $teacher is used in manual form. No need global. merged from 16stable. 2006-06-29 15:03:54 +00:00
ethem 665d43006a get_student_courses and get_teacher_courses functions added for future reference.
Cron description added. Merged from 16stable.
2006-06-29 12:44:01 +00:00
ethem 8389613abb Don't show choose method string if course cost is 0. Merged from 16stable. 2006-06-29 11:27:32 +00:00
ethem c4e2966709 New string. No cost yet. Merged from 16stable. 2006-06-29 11:12:08 +00:00
ethem c1f6386c47 Interactive plugins (authorize and paypal ) must use 'manual'.
Some patches must be applied to lib/db.
http://moodle.org/bugs/bug.php?op=show&bugid=5941
Look: version.patch, lib_db.patch

Eloy, your question about enrol fields for interactive plugins were solved.
Now, we sure we never use authorize and paypal field for backup and restore.
Because manual is active and cannot be disabled when restoring.
Bug #5358 - Add support for enrol systems in backup/restore
http://moodle.org/bugs/bug.php?op=show&bugid=5358&pos=0

Merged from 16 stable.
2006-06-29 10:38:34 +00:00
ethem c1a2545882 Bug #5941 - Myriad of problems with Paypal enrollmemts, au_enrol.patch
Merged from 16 stable.
2006-06-29 09:49:36 +00:00
skodak 895a45e231 Bug #5944 - error message when moving thread; merged from MOODLE_16_STABLE 2006-06-29 08:01:48 +00:00
skodak 8b23c04a12 Bug #5952 - bad links in &quot;about wysiwyg editor&quot; merged from MOODLE_16_STABLE 2006-06-29 07:20:37 +00:00
skodak 4630e4e483 Bug #5953 - problem in /auth/ldap/lib.php; merged from MOODLE_16_STABLE 2006-06-29 07:05:00 +00:00
skodak eb073d70ad Bug #5955 - link to help item for html editor looks funny; merged from MOODLE_16_STABLE 2006-06-29 07:00:27 +00:00
skodak 62ce993db3 Bug #5959 - save and view takes to wrong place; merged from MOODLE_16_STABLE 2006-06-29 06:53:53 +00:00
skodak 036c0fcb1a Bug #5960 - can't delete or edit comments; merged from MOODLE_16_STABLE 2006-06-29 06:48:31 +00:00
moodler 71b2e4986f Automatic installer.php lang files by installer_builder (20060629) 2006-06-29 02:38:54 +00:00
tjhunt 04a4cd2a0e Bug #5918 - essay question comments from teachers lost in 1.6 upgrade. Thanks to Mark Nielsen the suggestion of how to fix. Merged from MOODLE_16_STABLE. 2006-06-28 17:21:53 +00:00
mchampan bef08835f7 Corrected database prefix_ errors 2006-06-28 16:12:08 +00:00
skodak d6e1bd8092 Bug #5941 - Myriad of problems with Paypal enrollmemts, part 3 - fixed 'login as student' button, now plain guest login action; merged from MOODLE_16_STABLE 2006-06-28 15:38:04 +00:00
skodak e87fe61524 Bug #5941 - Myriad of problems with Paypal enrollmemts, part 2 - Login as guest not shown to guests and there is login link instead of paypal button for guests; merged from MOODLE_16_STABLE 2006-06-28 15:26:31 +00:00
skodak 7c24284126 minor loginas cleanup; merged from MOODLE_16_STABLE 2006-06-28 14:58:30 +00:00
skodak 44adc9032b Bug #5941 - Myriad of problems with Paypal enrollmemts, part 1; merged from MOODLE_16_STABLE 2006-06-28 12:45:28 +00:00
tjhunt 82b5d7cd8e Bug #5922 - comment from manualgraded questions lost during regrade. Thanks to Jean-Michel Vedrine for the fix. Merged from MOODLE_16_STABLE. 2006-06-28 11:45:11 +00:00
tjhunt 5190eed81b Bug #5945: Lang string name missmatch when starting quiz attempt. Merged from MOODLE_16_STABLE. 2006-06-28 10:13:40 +00:00
moodler 9e0c1e331c Automatic installer.php lang files by installer_builder (20060628) 2006-06-28 02:37:47 +00:00
mudrd8mz 1bd9b44a33 * Hide preview link when editing docs\ files. I have not found any way how to display
local documenation pages in 1.6. More comment in bug 4972
* Hide the form when displaying non-editable files (like en_utf8 ones).
2006-06-28 01:02:54 +00:00
skodak 43f06aa027 Bug #5927 - extending enrollments doesn't; merged from MOODLE_16_STABLE 2006-06-26 21:58:35 +00:00
skodak a251b76547 Bug #5931 - blocks block database; merged from MOODLE_16_STABLE 2006-06-26 21:35:05 +00:00
skodak b3d4840d39 assignments on mymoodle page, Bug #5839 - Found more than one record in get_record_sql !; merged from MOODLE_16_STABLE 2006-06-26 16:16:43 +00:00
skodak 6865c1ff89 fixed broken stats image link, Bug #5924 - User profile statistics tab; merged from MOODLE_16_STABLE 2006-06-26 13:49:03 +00:00
tjhunt 5e60643e1b Bug 5889 - Regrading a quiz wipes student answers. Thanks to Jean-Michel Vedrine for the fix. Merged from MOODLE_16_STABLE. 2006-06-26 11:23:32 +00:00
toyomoyo b7425e2ebc merged fix for 5916 2006-06-26 08:32:39 +00:00
skodak 77cf4951b7 fixed Turkish problems see, Bug #5878 - Teachers can't add blog and blocks; merged from MOODLE_16_STABLE 2006-06-26 07:23:10 +00:00
vyshane 4e5e7d54b5 Merged from 1.6 stable. Error message now displays using notify() instead of
error() when purging of old RSS feeds fail during a discussion move.
2006-06-26 04:44:41 +00:00
mchampan 682d403259 Initial commit 2006-06-25 23:07:36 +00:00
stronk7 1cd1252752 Some minor changes in order to avoid some notices... 2006-06-25 10:16:45 +00:00
julmis 63183a0932 Commenting out ob_gzhandler
Merging from stable
2006-06-23 19:53:26 +00:00
danstowell 87075ec1cd Fixed typo which caused images in questions to fail to display if NOT using slasharguments 2006-06-23 15:06:23 +00:00
stronk7 83c020ba20 Sending Yu's change to support custom langs to HEAD.
Changed progress info to 1000 records (from 5000). This
makes the script a bit more responsive on browser stops.

If finally approved, this should go to 16_STABLE too. (+1 for it)
2006-06-22 23:39:42 +00:00
thepurpleblob 2cb6db51f3 Merged from STABLE 2006-06-21 10:19:46 +00:00
toyomoyo d7f0baa944 merged fix for 5881 2006-06-21 03:13:46 +00:00
moodler 15983a967b Automatic installer.php lang files by installer_builder (20060621) 2006-06-21 02:41:28 +00:00
ethem bd4669d344 Very small change. A little performance for cron if admin enabled sending email for pending orders expiring.
1- If dailysettlement is 00:05 and cron executes at this time, nothing will occur. If it is executes at 00:10 it works. I think "<" works faster then "<=" :))
2- Don't compare course->ids by authorize->courseid, because courses are grouped by courseid. We sure each line is unique.
3- Only get pendingorderexpiring strings for sending email if course teachers exist.

Merged from 16stable.
2006-06-20 17:22:00 +00:00
stronk7 c17d7ead6a helper string to explain $CFG->doctonewwindow added.
Merged from MOODLE_16_STABLE
2006-06-20 14:23:58 +00:00
stronk7 7038fe44bf Now docs are showed in a new window based on $CFG->doctonewwindow
Merged from MOODLE_16_STABLE
2006-06-20 13:53:09 +00:00
stronk7 d3b9dbad78 Added new option to decide if docs will be showed in a new window.
Merged from MOODLE_16_STABLE
2006-06-20 13:41:56 +00:00
mits 71e367bd8a Changed <hr> widh of header.html.
Added <hr> to footer.html.
Changed color of "HOME" button.

Eloy, thanks for good suggestion.
2006-06-19 18:20:18 +00:00
mits 21bc85d65a Added back homelink to oceanblue theme based on standard theme. 2006-06-19 16:36:51 +00:00
moodler 2de506e1da Merged homelink from stable 2006-06-19 16:32:00 +00:00
moodler e6dd6b9a68 No need for error when deleting RSS feed 2006-06-19 16:20:35 +00:00
moodler 25fb38d465 Merged tag block context fixes from stable 2006-06-19 14:17:55 +00:00
moodler adc7b679aa Merged user tab visibility from stable 2006-06-19 13:52:39 +00:00
moodler c1edf72575 Merged header fix from stable 2006-06-19 13:38:17 +00:00
toyomoyo 08cf9e250d merged, changed copyright to &#169; to validate better 2006-06-19 03:53:26 +00:00
toyomoyo 6c525f490d merged, gives IE a bit more time to print 2006-06-19 03:30:08 +00:00
vyshane 68efe393f6 Merge from 1.6. New class FPDF_Protection. See bug #5855. 2006-06-19 02:41:44 +00:00
moodler fb06b25570 Merged migration fixes from stable 2006-06-18 10:09:58 +00:00
moodler e5f121c6c1 Merged XHTML fix from stable 2006-06-18 08:21:35 +00:00
moodler a6320cc0b8 Merged helplink fix from stable 2006-06-18 08:10:52 +00:00
moodler c96a3047ec Merged header fixes from stable 1.6 2006-06-18 07:45:22 +00:00
moodler feec09eecf Merged fix for bug 5830 into dev 2006-06-16 09:42:38 +00:00
moodler 2de48ff93d Added check for $CFG->disablemycourses 2006-06-16 04:28:56 +00:00
toyomoyo e3ec7995a7 merged, centering of tabs on blog page issue 2006-06-16 02:59:37 +00:00
mjollnir_ ca79268087 merged from MOODLE_16_STABLE: participants list last access filter should only show for teachers! I noticed this on moodle.org this morning :| 2006-06-15 21:37:20 +00:00
ethem 2bc509a3c1 $a->course: course information added. Merged from stable. 2006-06-15 14:23:04 +00:00
ethem 8dd19dd3d2 $a->course: course information added. 2006-06-15 14:08:41 +00:00
ethem e3df6104f4 pendingordersemailteacher string added
merged from stable
2006-06-15 13:37:25 +00:00
ethem fa6a9cba16 pendingordersemailteacher string added 2006-06-15 13:25:47 +00:00
ethem b9e829691e When the number of pending orders expiring are sent to the teachers via email, which one is important? The number of the orders or the total of the amounts.
Merged from 16 stable.
2006-06-15 12:55:39 +00:00
ethem 43457b5f0f When the number of pending orders expiring are sent to the teachers via email, which one is important? The number of the orders or the total of the amounts.
Merged from 16 stable.
2006-06-15 12:27:49 +00:00
tjhunt 1cc1fa2425 Bug #5825 redonly attribute does not work on checkboxes, so using disabled instead when displaying quizzes read-only. 2006-06-15 10:12:17 +00:00
ethem b282e815d5 Order by order count. Courses that have many orders are emailed first. Merged from 16_stable. 2006-06-15 08:06:52 +00:00
toyomoyo 2217ff8d50 merged fix for 5633 2006-06-15 06:33:13 +00:00
toyomoyo 5365eebf9f merged fix for 5814 2006-06-15 03:24:33 +00:00
ethem 50172716a3 Email subject for pending orders expiring.
Merged from stable.
2006-06-14 16:32:08 +00:00
ethem a0333291ba Email subject for pending orders expiring.
Merged from stable.
2006-06-14 16:26:01 +00:00
ethem 4670207162 Email subject for pending orders expiring. 2006-06-14 16:17:46 +00:00
tjhunt 0b34616411 Moved constant definitions out of function, so they are not run repeatedly giving lots of warnings. Merged from MOODLE_16_STABLE. 2006-06-14 15:35:27 +00:00
tjhunt ee800653e4 Corrected reference to lang string and fixed a notice. Merged from MOODLE_16_STABLE. 2006-06-14 15:32:55 +00:00
ethem 71e27db713 If admin set up 'Teachers can manage the payments of the course' and enabled 'Manual-Capture', course teachers are notified about pending orders expiring. Merged from MOODLE_16_STABLE. 2006-06-14 11:53:50 +00:00
vyshane 883f4e3dc6 Merged fix from 1.6 for bug:
Notice: Undefined property: id in /home/moodle/public_html/certificate/mod/forum/discuss.php on line 38

This happens when the user is not logged in and wants to view a forum of type
news.
2006-06-14 08:47:19 +00:00
moodler 05b7eba955 Merged print_error fix from stable 2006-06-14 03:17:19 +00:00
moodler a503a59068 Automatic installer.php lang files by installer_builder (20060614) 2006-06-14 02:36:00 +00:00
tjhunt 0d8b8f1777 Quiz module sometimes left the user staring at a blank page. Now there is an error message. Merged from MOODLE_16_STABLE. 2006-06-13 18:59:41 +00:00
tjhunt 6f1991905d Bug #5812 - Standard theme font size CSS not sufficiently defensive. Merged from MOODLE_16_STABLE. 2006-06-13 18:55:25 +00:00
ethem c9ad76139d Link to Payment Management page. Merged from 16stable. 2006-06-13 18:31:09 +00:00
ethem f404747bf1 Link to help file 'Order Review'. Merged from 16stable. 2006-06-13 18:04:25 +00:00
ethem 0483b0823c Help file for 'Order Review'. 2006-06-13 17:51:11 +00:00
ethem f00a651c61 Predict the time of settlement at first time. Probably, admin user set up own country timezone and we can use this time as settlement time.
Merged from 16stable.
2006-06-13 16:05:15 +00:00
tjhunt 3fae19dd98 Bug #5810 missing ' > 7' in debug test. Merged from MOODLE_16_STABLE. 2006-06-13 14:37:45 +00:00
ethem e758a8f627 ? Capture_Only transaction added.
Capture_Only transactions are used when you already have an authorization from a bank.
To use this type of transaction, you will need an authorization code from the card-issuer (usually a 5 or 6 digit number).
For example, if you called Visa directly and obtained an authorization over the phone,
you would need to submit a Capture_Only transaction to start the funds transfer process.
You can manually submit a Capture_Only transaction from your Virtual Terminal by selecting Capture Only,
or from a website or billing application by including the following variables with your transaction request:

? x_Type (Capture_Only)
? x_Auth_Code (the 5 or 6 digit code provided by the card-issuer)
2006-06-13 07:58:04 +00:00
vyshane 9dc3d3255d Merged from 1.6. Fix for Bug #5767 - Section links block is removed from
course view after settings update.
2006-06-13 07:50:02 +00:00
tjhunt ff1b2fadbe Fix restore notice. Merged from MOODLE_16_STABLE. 2006-06-12 15:37:05 +00:00
tjhunt f92cf442db Bug #5793: remember whether Show all has been clicked in the question bank. Merged from MOODLE_16_STABLE. 2006-06-12 13:54:01 +00:00
tjhunt 4f7eaab661 Bug #5790: Answer order for MC qtype not specified. Fix. Thanks to Peter Bulmer. Merged from MOODLE_16_STABLE. 2006-06-12 11:05:39 +00:00
toyomoyo 2e434c01e9 merged proper html for help file 2006-06-12 07:25:18 +00:00
toyomoyo dec87f2e28 merged, a few mismatch of length between db and this html 2006-06-12 07:18:58 +00:00
toyomoyo 1ed1b33e40 adding help file 2006-06-12 04:09:21 +00:00
moodler df2f835eeb Merged changes from stable 2006-06-11 06:48:56 +00:00
stronk7 5dd95d35e5 Due to one potential bug in PHP under Win32 (http://bugs.php.net/37775)
the [[cntrl]] pcre class was breaking some chars. Changed to a safer
alternative. Bug 5777.
(http://moodle.org/bugs/bug.php?op=show&bugid=5777)

Merged from MOODLE_16_STABLE
2006-06-10 23:33:49 +00:00
stronk7 c0bd060a58 Change the moodle_strtolower() function to use textlib services.
Also, mark it as deprecated, code should use text services directly.
Partially, bug 5777. It continues under investigation.
(http://moodle.org/bugs/bug.php?op=show&bugid=5777)

Merged from MOODLE_16_STABLE
2006-06-10 10:40:16 +00:00
moodler 318192731e Automatic installer.php lang files by installer_builder (20060610) 2006-06-10 02:34:51 +00:00
moodler b1c8f1bcaa Automatic installer.php lang files by installer_builder (20060610) 2006-06-09 18:56:41 +00:00
moodler 6afefb9aa0 Automatic installer.php lang files by installer_builder (20060610) 2006-06-09 17:09:45 +00:00
stronk7 b944917b2e Automatic installer.php lang files by installer_builder (20060609) 2006-06-09 15:52:58 +00:00
stronk7 407e95edbd Automatic installer.php lang files by installer_builder (20060609) 2006-06-09 15:29:45 +00:00
stronk7 f6c08703b6 Automatic installer.php lang files by installer_builder (20060609) 2006-06-09 15:11:03 +00:00
nfreear 782792047b Fix bug 5611 (Skip block), across 4 files. Extra parameter $title in weblib.php: print_side_block, edits to moodleblock.class.php, Standard style, en_utf8 language pack. 2006-06-09 14:25:18 +00:00
stronk7 9fd0678fdd The absolutely incredible bug! It was working being wrong! Bug 5775.
(http://moodle.org/bugs/bug.php?op=show&bugid=5775)

Merged from MOODLE_16_STABLE
2006-06-09 14:23:55 +00:00
nfreear d65611c3fe Fix bug 5611 (Skip block), across 4 files. Extra parameter $title in weblib.php: print_side_block, edits to moodleblock.class.php, Standard style, en_utf8 language pack. 2006-06-09 14:21:25 +00:00
ethem ecf2f1ac3d Sending email for pending orders expiring string (adminemailexpired) seperated.
Settings moved to adminemailexpsetting.
Merged from stable.
2006-06-09 11:25:57 +00:00
ethem 673d602458 Show 'name on card' string instead of moodle.php's user string. Merged from MOODLE_16_STABLE. 2006-06-09 11:00:18 +00:00
ethem aed6497003 Some config sections 'Order Review' moved to
an_teachermanagepay -> Site-Wide Settings
an_emailexpired: -> Email-Sending Settings
an_cutoff: -> Authorize.net Settings

merged from 16stable.
2006-06-09 10:30:01 +00:00
stronk7 daec7cda9b One notice() was preventing the upgrade to 1.7dev to continue. Bug 5773.
(http://moodle.org/bugs/bug.php?op=show&bugid=5773)
2006-06-09 10:15:03 +00:00
stronk7 d96466d29f Moving from lastIP to lastip everywhere. Bug 5763.
(http://moodle.org/bugs/bug.php?op=show&bugid=5763)

Merged from MOODLE_16_STABLE
2006-06-09 10:04:43 +00:00
stronk7 d836482a34 Moving from lastIP to lastip everywhere. Bug 5763.
(http://moodle.org/bugs/bug.php?op=show&bugid=5763)

Merged (more or less) from MOODLE_16_STABLE
2006-06-09 09:47:01 +00:00
stronk7 c766b9dfaa Avoid empty processing both for PLAIN_SQL_UPDATE and PHP_FUNCTION 2006-06-09 09:16:09 +00:00
mudrd8mz 45428e8614 * Fixed bug 5745 reported by Harry Smith so now can edit en_utf8_local pack
* More notification messages included
2006-06-09 08:48:45 +00:00
toyomoyo cc841d67b0 merged, fixed a bug that blog tabs are displayed when blog is diabled 2006-06-09 02:53:16 +00:00
bobopinna 7d3f4007cb Removed a doubled text 2006-06-08 15:38:56 +00:00
bobopinna 89354664d3 change advanced to parameters 2006-06-08 15:36:55 +00:00
bobopinna 7ad2067fd7 Fixed some language refinements 2006-06-08 15:22:24 +00:00
bobopinna a681c2b0f9 Fixed language refinements 2006-06-08 15:16:14 +00:00
vyshane fd45188142 Help content for available tags (data module). Merged from 1.6. 2006-06-08 08:28:23 +00:00
vyshane da52f1523c Merge from 1.6. Fix for scorm_option2text(). options field is now saved
proprely.
2006-06-08 07:39:37 +00:00
skodak 9ef80fa4aa Bug #5663 - errors after changing grade weight; merged from MOODLE_16_STABLE 2006-06-08 06:39:14 +00:00
skodak f2fe353f2b Fixed course searching; merged from MOODLE_16_STABLE 2006-06-08 06:25:05 +00:00
vyshane 535fc3e907 Merged from 1.6. Added missing string. 2006-06-08 06:20:09 +00:00
toyomoyo e3cfd5d717 merged fix for 5748 2006-06-08 04:08:04 +00:00
toyomoyo 1c994d89f8 merged, changed recordsize to 50 2006-06-08 02:46:45 +00:00
stronk7 cb27c4e823 Solve one issue with skipped courses and email to admin
being set every xx minutes. Bug 5621.
(http://moodle.org/bugs/bug.php?op=show&bugid=5621)

Merged from MOODLE_16_STABLE
2006-06-07 22:22:21 +00:00
ethem a17f20183e Unnecesary strings removed. Merged from MOODLE_16_MERGED 2006-06-07 18:47:09 +00:00
stronk7 8326d5afa3 Now the question_attempts creation and dotation will be
only executed if it hasn't been done in MOODLE_16_STABLE. Bug 5717.
(http://moodle.org/bugs/bug.php?op=show&bugid=5717)
2006-06-07 17:56:47 +00:00
skodak e7251cdd21 Bug #5522 - question/restorelib.php error; merged from MOODLE_16_STABLE 2006-06-07 14:57:26 +00:00
skodak c2f3feed17 incorrect course number in categories after course delete; merged from MOODLE_16_STABLE 2006-06-07 14:05:44 +00:00
danstowell 67e3f5b540 Fix to ensure default auth method is copied to new user records 2006-06-07 10:44:12 +00:00
vyshane b134f6a71e Merged fix from 1.6 for Bug #5131 - RSS Feeds and Moving Discussions. 2006-06-07 08:19:34 +00:00
toyomoyo b6640a76ba merged fix for 5720 2006-06-07 06:05:03 +00:00
toyomoyo 257c550aae merged fix for 5720 2006-06-07 05:59:25 +00:00
toyomoyo 9073d2ddad merged, small changes to javascript progress bar 1) updates correctly when resuming 2) number of tables not hard coded anymore 2006-06-07 04:32:05 +00:00
toyomoyo 92cf4ecc12 merged, changes made to process user table on row basis. added migrate2utf8_user function. please help test and report bugs! 2006-06-07 04:11:10 +00:00
skodak d12cb320b3 Bug #5659 - Problem with build-in buttons when creating templates; merged from MOODLE_16_STABLE 2006-06-06 20:55:25 +00:00
skodak 332fbc3027 Bug #5734 - Enrolled students can't access metacourse after unhiding while logged in; merged from MODOLE_16_STABLE 2006-06-06 19:01:46 +00:00
tjhunt f801c7e028 Fix notices when you restore a course with no parent or child courses. Merged from MOODLE_16_STABLE. 2006-06-06 17:27:15 +00:00
tjhunt c078b2527b Fix notices when you restore a course with an empty forum. Merged from MOODLE_16_STABLE. 2006-06-06 17:25:00 +00:00
tjhunt 37611ee17c Bug #5559: revised fix - using better CSS class names. Merged from MOODLE_16_STABLE. 2006-06-06 17:10:04 +00:00
stronk7 93e779c236 Adding two new strings for RESTRICTED tests in environmenlib. 2006-06-06 17:02:19 +00:00
stronk7 95a39282bf Now environmentlib supports RESTRICT sections (to be able to deny
any general test with more detail (the opposite to the BYPASS section)
(http://moodle.org/bugs/bug.php?op=show&bugid=5653)

Merged from MOODLE_16_STABLE
2006-06-06 16:19:17 +00:00
skodak 3cdd4eeba0 Bug #5535 - Database module backup error in 1.5.4, patch submitted by Patrick Pollet ; merged from MOODLE_16_STABLE 2006-06-06 15:12:51 +00:00
bobopinna ba5d423b21 Fixed some regular expressions Bug 5041 2006-06-06 14:30:32 +00:00
tjhunt 7d83bbc2bd Bug #5506: Fix for calculated questions where each one builds on the last. Merged from MOODLE_16_STABLE. 2006-06-06 14:29:05 +00:00
tjhunt 4919564de9 Fix notices from the quiz module on backup and restore. Merged from MOODLE_16_STABLE. 2006-06-06 14:15:48 +00:00
tjhunt 331ca29783 Make cron a bit more rebust by changing the way the require is done. Merged from MOODLE_16_STABLE. 2006-06-06 14:12:04 +00:00
skodak 002ccfc7a0 Bug #5678 - Question marks, single quotes in field name cause trouble - cleaning hack ported from clean_filename(); merged from MOODLE_16_STABLE 2006-06-06 10:17:18 +00:00
tjhunt 9aafe70227 Fix notice. Merged from MOODLE_16_STABLE. 2006-06-06 10:10:43 +00:00
skodak f9e5457f16 Bug #5680 - Fixed duplicate field names; merged from MOODLE_16_STABLE 2006-06-06 09:35:15 +00:00
skodak f0e52f67df Bug #5444 - Import PowerPoint - PHP5 clone bug; merged from MOODLE_16_STABLE 2006-06-06 08:53:54 +00:00
vyshane 0f423e9d64 New admin stats report. This report module makes use of /course/report/stats/.
Merged from 1.6.
2006-06-06 05:31:42 +00:00
vyshane 030605e57a Merge from 1.6. Refactored this report module so that we can use it as an
admin report module.
2006-06-06 04:15:04 +00:00
tjhunt 3e734b607d Bug #5672: Make calculated questions less confusing to create. Merged from MOODLE_16_STABLE. 2006-06-05 16:59:58 +00:00
tjhunt 6d456aa2c1 Fixed reference to incorrect language string. Merged from MOODLE_16_STABLE. 2006-06-05 14:24:13 +00:00
ethem 9a4502dd1d Some cron performance. Run clean-ups and send email daily on settlement date.
an_nextmail config deleted, instead of old config new an_dailysettlement inserted into config_plugins table.
Merged from MOODLE_16_STABLE.
2006-06-05 13:12:28 +00:00
skodak 989a0a5203 Bug #5725 - Assignment grading pop up windows do not close, broken by 4976; merged from MOODLE_16_STABLE 2006-06-05 12:18:13 +00:00
fyang1024 3353b091f6 add learner link when user is a teacher 2006-06-05 10:01:42 +00:00
bobopinna 4023c0aa2d Fixed a typo 2006-06-05 08:21:45 +00:00
bobopinna 7cef1dfd3d Added class name for the IFRAME element 2006-06-05 07:38:46 +00:00
bobopinna b7679957eb Fixed modified names for some constants [Bug 5695] 2006-06-05 07:21:03 +00:00
skodak e369e0c4b4 Bug #5715 - error message in messaging - notice lastaccess; merged from MOODLE_16_STABLE 2006-06-04 23:11:18 +00:00
skodak fce786b146 Bug #5721 - students cannot take quiz when course language set to French; merged from MOODLE_16_STABLE 2006-06-04 23:01:13 +00:00
skodak d971525f28 fixed warning when no students graded yet (caused by useless assignment); merged from MOODLE_16_STABLE 2006-06-04 21:35:26 +00:00
skodak 7e4fe17600 merged last two commints into MOODLE_16_STABLE 2006-06-04 21:11:04 +00:00
skodak 32625a72f4 merged fixes from MOODLE_16_STABLE 2006-06-04 20:57:35 +00:00
stronk7 ee6e91d4af make_default_scale() now searches properly under
both dataroot and dirroot, defaulting to en_utf8. Bug 5719.
(http://moodle.org/bugs/bug.php?op=show&bugid=5719)


Merged from MOODLE_16_STABLE
2006-06-04 15:19:05 +00:00
stronk7 ae57b07c06 report XXXX actions added. Bug 5714.
(http://moodle.org/bugs/bug.php?op=show&bugid=5714)

More or less, merged from MOODLE_16_STABLE
2006-06-04 00:54:34 +00:00
stronk7 2efeb14832 course report xxxx actions now are supported on restore. Bug 5714.
(http://moodle.org/bugs/bug.php?op=show&bugid=5714)

Merged from MOODLE_16_STABLE
2006-06-04 00:03:12 +00:00
skodak f4f0bc84cb Bug #5716 - Impossible to turn off highlighted current topic; merged from MOODLE_16_STABLE 2006-06-03 23:49:15 +00:00
stronk7 b841722573 icourse report xxxx actions must send courseid in the info field. Bug 5714.
(http://moodle.org/bugs/bug.php?op=show&bugid=5714)

Merged from MOODLE_16_STABLE
2006-06-03 20:37:55 +00:00
stronk7 410c459db0 And some more (the last) notices out! Bug 5713.
(http://moodle.org/bugs/bug.php?op=show&bugid=5713)

Merged from MOODLE_16_STABLE
2006-06-03 20:18:02 +00:00
stronk7 5f8556bcd5 And one more collection of innocent notices avoided. Bug 5712.
(http://moodle.org/bugs/bug.php?op=show&bugid=5712)

Merged from MOODLE_16_STABLE
2006-06-03 20:01:24 +00:00
skodak eddb24ed20 clarification for restrict modules option - bug #5688; merged from MOODLE_16_STABLE 2006-06-03 19:58:29 +00:00
stronk7 8812e31233 And another notice in restore out. Bug 5711.
(http://moodle.org/bugs/bug.php?op=show&bugid=5711)

Merged from MOODLE_16_STABLE
2006-06-03 19:51:28 +00:00
stronk7 0f4de002a2 One less notice. Bug 5710.
(http://moodle.org/bugs/bug.php?op=show&bugid=5710)

Merged from MOODLE_16_STABLE
2006-06-03 19:45:19 +00:00
stronk7 c1543b80e9 Avoid one notice in backup. Bug 5709.
(http://moodle.org/bugs/bug.php?op=show&bugid=5709&)

Merged from MOODLE_16_STABLE
2006-06-03 19:01:07 +00:00
stronk7 1fa6d46069 Adding support to the forum user report action
in restore. Bug 3854.
(http://moodle.org/bugs/bug.php?op=show&bugid=3854)

Merged from MOODLE_16_STABLE
2006-06-03 17:51:20 +00:00
skodak 75d9b88f3d merged another try to fix IR from MOODEL_16_STABLE 2006-06-02 17:00:22 +00:00
skodak 08cbf449fe merged typo fix from MOODLE_16_STABLE 2006-06-02 16:55:27 +00:00
skodak 6d7ef1f2c3 merged Martins warning patch from MOODLE_16_STABLE 2006-06-02 16:53:17 +00:00
skodak 115938af04 fixed whitespace and merged whitespace fixes from MOODLE_16_STABLE 2006-06-02 16:46:39 +00:00
skodak 14dfa05958 merged whitespace fix from MOODLE_16_STABLE 2006-06-02 16:42:40 +00:00
skodak a5e7cb78fa Making sure timelimit is converted to integer before being written to database, otherwise postgreSQL complains. Closing bug 5401; merged from MOODLE_15_STABLE 2006-06-02 16:02:10 +00:00
tjhunt 042e68477d Bug #5559: Move CLOZE qtype hightight colours into CSS insted of hardcoding, so themes can override. Merged from 1.6stable. 2006-06-02 15:39:41 +00:00
nfreear b65f13b510 Fix, bug 5614 - added ALT text for link icons (x 5), based on TITLE. Merged from stable branch. 2006-06-02 13:18:49 +00:00
thepurpleblob 7b8bc256cc Merged from STABLE 2006-06-02 09:45:19 +00:00
ethem 3f609b21ff 'Authorize.net Payment Gateway' is better and shorter :) 2006-06-02 09:42:20 +00:00
vyshane 44e852cbea Merged from 1.6. Fixed php warnings when no course is selected. 2006-06-02 07:37:45 +00:00
skodak ee1e1a3b99 fixed warning and removed ugly hack in attachment path; merged from MOODLE_16_STABLE 2006-06-02 06:49:08 +00:00
vyshane f24eb26139 Merged from 1.6. Fix for Bug #5682 - 'Reset template' button in CSS template
adds HTML.
2006-06-02 04:29:11 +00:00
vyshane 0b0b5ea4ed Merge from 1.6. Added missing lang string. 2006-06-02 04:20:05 +00:00
toyomoyo fdcf2c4a07 merged fix for 5686 2006-06-02 02:54:28 +00:00
stronk7 2dbd7916e0 Adding propper support for the forum->user report log action. It was
a bit wrong. Code credits go to Petr!

Merged from MOODLE_16_STABLE
2006-06-01 23:16:08 +00:00
skodak cb77cf1262 fixed problem in restricted modules - mods were accessed using strtolower(translated module name) instead of directory name as usual, it partially worked for English; merged from MOODLE_16_STABLE 2006-06-01 19:52:38 +00:00
skodak 7f9ba24ef2 fixed - unable to disable blocks; merged from MOODLE_16_STABLE 2006-06-01 19:13:52 +00:00
ethem 8da4b779e4 Documentation for status codes and actions. Merged from MOODLE_16_STABLE 2006-06-01 16:08:00 +00:00
skodak 165a7502f8 Bug #5643 - add Yahoo online status to user profile; merged from MOODLE_16_STABLE 2006-06-01 15:19:06 +00:00
skodak 82e6ea72a9 Bug #5684 - frameset page in UTF8 doesn't appear on IE; merged from MOODLE_16_STABLE 2006-06-01 14:50:41 +00:00
tjhunt cd70aa32f2 Bug 5247: stop people creating tests with a close date before the open date. 2006-06-01 14:27:37 +00:00
ethem 095759281b Authorize.net Merchant Payment Gateway
Authorize module is not only credit card gateway but also it has echeck.
Echeck is implemented soon, please AUTHORIZE_ECHECK branch for more details.
2006-06-01 14:13:07 +00:00
thepurpleblob a0d187bfd7 Merged from STABLE 2006-06-01 10:13:57 +00:00
ethem d65af16ffd Just some tidy-ups. Merged from MOODLE_16_STABLE 2006-06-01 08:51:20 +00:00
vyshane 749818fd09 Merged from 1.6. Fix for cvs update -kk -j MOODLE_16_MERGED -j
MOODLE_16_STABLE.
2006-06-01 08:10:34 +00:00
ethem e302f054b3 Just some tidy-ups. Merged from MOODLE_16_STABLE 2006-06-01 07:47:22 +00:00
moquist b40a2b43be Added $return parameters to print_paging_bar() and print_table(). 2006-06-01 05:51:45 +00:00
skodak 1f48cd2892 Bug #5661 - mymoodle redirect problem; merged from MOODLE_16_STABLE 2006-06-01 05:40:45 +00:00
vyshane 65d169680c Merged fix from 1.6 (missing lang string) 2006-06-01 04:08:45 +00:00
vyshane 69c9c3e696 Fix for get_string(), which was not building path to report language files
correctly.
2006-06-01 03:10:17 +00:00
toyomoyo f9631ddb0d merged, bug fix for 5352, setting ignore_user_abort to false 2006-06-01 02:32:07 +00:00
danmarsden 8f3c8cdd84 BUG 5662 - bad check for 1.6 version. 2006-05-31 20:28:18 +00:00
stronk7 9914f09319 Prevent doubleslashes once and again in paths. Also prevent them when writing config.php
Merged from MOODLE_16_STABLE
2006-05-31 17:54:58 +00:00
tjhunt 7baff8aa1a Fix for bug 5379: Item analysis report should not have a hard coded list of question types.
Please test this if you have a moodle install with some unusual question types. Thanks.

Merged from 1.6stable.
2006-05-31 15:58:39 +00:00
tjhunt ce687025b7 Fix some Eclipse code style warnings. 2006-05-31 10:35:17 +00:00
tjhunt 1dd9972889 Check for errors before doing other processing. (Compare this with the add case.) 2006-05-31 10:34:05 +00:00
toyomoyo cc82876291 changepassword obsolete, merged 2006-05-31 07:24:19 +00:00
toyomoyo 6dede909af merged, changepassword obsolete 2006-05-31 07:12:10 +00:00
toyomoyo c26ba25f32 merged, changepassword obsolete 2006-05-31 06:58:51 +00:00
toyomoyo e79771162c merged, changepassword obsolete 2006-05-31 06:42:35 +00:00
toyomoyo c17253f9dc merged change to allow admins to click on the force password change checkbox if using internal_auth 2006-05-31 06:29:13 +00:00
stronk7 ae34cad5fd Users with messages (and messages) are only included in
SITEID backup. Bug 5658.
(http://moodle.org/bugs/bug.php?op=show&bugid=5658)

Merged from MOODLE_16_STABLE
2006-05-30 16:58:50 +00:00
mudrd8mz f20c155a3b * "go to first missing string" link can be displayed (see LANG_DISPLAY_MISSING_LINKS)
* "go to next/previous missing" links can be displayed (see LANG_DISPLAY_MISSING_LINKS)
* submit button may be repeated (see LANG_SUBMIT_REPEAT*)
* added (empty) "summary" attribute for the <table>'s
* added error_reporting(E_ALL ^ E_NOTICE); in "compare" mode (even in debug environment we know that missing keys are missing strings here, not bugs ;-)
* LANG_DEFAULT_FILE can be now set. moodle.php used to be opened automatically. As it was (and still is) one of the biggest files it usually took a long time to load the page even if you just want to choose the file to translate.
* added links from "missing" to "compare" mode page
* English strings are now key-sorted in "missing" mode
* list of files with missing strings is now displayed at the top of "missing" page
* A lot of changes to support translation of *_utf8_local langugage packs. Needs testing
* Merged with version by Mitsuhiro Yoshida - display icon links instead of text links (I have changed the position of arrow icons to not to be so close each other)
2006-05-30 16:47:59 +00:00
bobopinna 723fe255b4 Two icons added by Pham Minh Duc 2006-05-30 14:01:51 +00:00
nfreear ef4c53696b Fix bug 5628 (Farsi RTL language), modify '.accesshide' style so top is large negative, not left. Merged from STABLE branch. 2006-05-30 11:24:42 +00:00
skodak 2a0824b4a3 blacklist PHP 5.0.x in installation precheck; merged from MOODLE_16_STABLE 2006-05-30 09:50:23 +00:00
skodak d976b5fecb blacklist PHP 5.0.x in installation precheck; merged from MOODLE_16_STABLE 2006-05-30 09:42:29 +00:00
ethem 8761b0bc4f If config wwwroot starts with 'https', ignore config loginhttps value.
Dependency: Bug #5647; Merged from MOODLE_16_STABLE.
2006-05-30 08:32:43 +00:00
skodak 8af190b388 fixed typo - randomsmatch notice bug 5652; merged from MOODLE_16_STABLE 2006-05-30 06:29:07 +00:00
toyomoyo 3280c9fcc4 merged fix for 5648, utf8 migration problem 2006-05-30 02:51:52 +00:00
martinlanghoff 9aad454299 auth/ldap: better handling of empty values from ldap 2006-05-30 00:44:21 +00:00
stronk7 aca116d84e Bump equivalent to 1.6 2006-05-29 22:50:44 +00:00
skodak 508b76d94f fixed warning from clone($SITE) during site setup; merged from MOODLE_16_STABLE 2006-05-29 20:33:12 +00:00
stronk7 cfba5440c0 Normalize oracle driver name. 2006-05-29 17:42:01 +00:00
stronk7 2d2f440b6e Adding environmental checks for 1.7 (mssql and oracle added) 2006-05-29 17:35:19 +00:00
moodler 19078b653a Merged title fix from stable 2006-05-29 09:55:42 +00:00
moodler ed527b33cc Merged changes from stable 2006-05-29 09:40:38 +00:00
moodler 854c0e06a3 Merged CSS improvements for MyMoodle from stable 2006-05-29 09:27:40 +00:00
moodler d6da4a1aeb merged mymoodle fix from stable 2006-05-29 09:21:36 +00:00
moodler 10312bf9a2 Fixed some issues with course overview report 2006-05-29 09:10:33 +00:00
skodak 8f643c818b Bug #5620 - MyMoodle shows bogus Assignment due date; merged from MOODLE_16_STABLE 2006-05-29 08:37:51 +00:00
moodler 815c84a8dc Merged fix from stable 2006-05-29 08:36:58 +00:00
moodler 80acd6be74 Use global $COURSE in print_header to avoid ugly hack 2006-05-29 08:22:52 +00:00
moodler 1a2ea6f488 Merged $course -> $COURSE fixes from 1.6 stable 2006-05-29 08:17:57 +00:00
moodler 45fc1f759e Make $COURSE a full object for later use 2006-05-29 07:31:22 +00:00
bobopinna 3eabd4cf97 Cleaned some unused include 2006-05-29 07:07:48 +00:00
skodak e7056effbc fixed array warning when editting blocks; merged from MOODLE_16_STABLE 2006-05-29 06:04:13 +00:00
skodak 9b02b5342a global $course fix; merged from MOODLE_16_STABLE 2006-05-29 05:56:28 +00:00
wildgirl f1fc87d045 Updated small MP3 player to handle autoPlay (by Andrew Walker, Alton College) 2006-05-28 20:19:31 +00:00
skodak 9054ba924a sanitize submitted numerical values; merged from MOODLE_16_STABLE 2006-05-26 11:54:11 +00:00
skodak 2042e021be sanitize submitted numerical values; merged from MOODLE_16_STABLE 2006-05-26 11:47:22 +00:00
skodak 24c1be8880 sanitize submitted numerical values; merged from MOODLE_16_STABLE 2006-05-26 11:39:12 +00:00
skodak 27e51dfc89 sanitize submitted numerical values 2006-05-26 11:32:26 +00:00
skodak 3f19bff3cd Bug #5619 - Assignment Feedback mail lacks linefeed; merged from MOODLE_16_STABLE 2006-05-26 09:07:13 +00:00
skodak b56e8cfdfc Bug #4647 - Undefined property in lib/statslib.php; merged from MOODLE_16_STABLE 2006-05-26 09:01:37 +00:00
skodak 97bf7d6271 Bug #5456 - Item Analysis fails to calculate results for random question type; merged from MOODLE_16_STABLE 2006-05-26 06:55:25 +00:00
skodak cebf9a83e9 Bug #5472 - Download quiz grades in Excel format does not show correct foelds; merged from MOODLE_16_STABLE 2006-05-26 06:48:25 +00:00
skodak 4f162918f5 Bug #5612 - language string missing in blog; merged from MOODLE_16_STABLE 2006-05-25 19:24:53 +00:00
nfreear 134759fc36 Ongoing fix, bug 5614 - added ALT text for link icons, based on TITLE. Merged from stable branch. 2006-05-25 16:00:26 +00:00
skodak 4df627dfbf Bug #5582 - sort by numerical field doesn't work properly with decimals; merged from MOODLE_16_STABLE 2006-05-25 15:57:20 +00:00
bobopinna 1a50a1f91e New version with SCORM 2004 sequencing done by Pham Minh Duc 2006-05-25 10:20:45 +00:00
skodak be41c83691 Bug #5416 - sorting by question column in overview report plugin broken - please test; merged from MOODLE_16_STABLE 2006-05-25 10:00:06 +00:00
skodak de5f96195c Bug #5566 - wrong display of student's answers in MATCHING question type; merged from MOODLE_16_STABLE 2006-05-25 08:13:41 +00:00
skodak 043f527471 Bug #4779 - lib/moodlelib.php: typo; merged from MOODLE_16_STABLE 2006-05-25 06:34:33 +00:00
vyshane a389cc82df Merged from fix in 1.6. Made string more general for error message that is
shown when there are no fields defined in the database and we try to add an
entry.
2006-05-25 05:20:59 +00:00
vyshane fafbcc51b5 Merged fix for bug: when a student tries to add an entry and no fields are
defined, the foreach barfs since the value of $fields is false.
2006-05-25 05:19:24 +00:00
toyomoyo addcde11c8 merged changes from renaming reads/writes to statsreads/statswties - mysql5 reserved words 2006-05-25 02:53:00 +00:00
toyomoyo 7dbc6b5891 merged backup-restore/db migrate for rsstitletemplate field 2006-05-25 02:31:15 +00:00
toyomoyo 22a92ee224 merged dropping backticks 2006-05-25 02:07:48 +00:00
skodak 81f9948586 fixed my yet another bug; merged from MOODLE_16_STABLE 2006-05-24 21:54:51 +00:00
skodak 607a6aa83d fixed broken operations in subfolders - result of my recent patching :-( :-( bug #5603; merged from MOODLE_16_STABLE 2006-05-24 21:50:44 +00:00
skodak f2b5a58a0f Bug #5604 - LDAP error notice when users update profile; merged from MOODEL_16_STABLE 2006-05-24 21:12:46 +00:00
skodak 343296bf6a fixed warnings on save profile; merged from MOODLE_16_STABLE 2006-05-24 21:05:23 +00:00
skodak 3e5c847420 Bug #5587 - Redirect fails after a failed login and proper variable initialisation; merged from MOODLE_16_STABLE 2006-05-24 20:56:16 +00:00
skodak 5e205b74dd fixed bug #5562 I hope; merged from MOODLE_16_STABLE 2006-05-24 18:56:33 +00:00
toyomoyo ea6a834533 added rsstitle, merged 2006-05-24 07:03:14 +00:00
toyomoyo 6fe661e879 added rsstitletemplate field 2006-05-24 06:16:10 +00:00
toyomoyo 462458c66b renaming reads and writes to statsreads and statswrites 2006-05-24 05:07:22 +00:00
vyshane 941308d370 Fix for undefined property notice when cron.php is run. 2006-05-24 03:07:37 +00:00
stronk7 cf0403002e Solving one SQL error in data_get_participants()
plus some improved readability.

Merged from MOODLE_16_STABLE
2006-05-23 22:33:01 +00:00
stronk7 e8b8ab9f7b course_modules->deleted and user->guid are now out.
(they disappeared from DB ages ago)

Merged from MOODLE_16_STABLE
2006-05-23 22:06:58 +00:00
skodak fdcd0f0566 fix for printing of multiple group pictures bug #5548; merged from MOODLE_16_STABLE 2006-05-23 19:18:25 +00:00
skodak e0ce2e1ca4 fixed bug #5593 - logged in nested in <p> and <div>; merged from MOODLE_16_STABLE 2006-05-23 18:59:29 +00:00
skodak c65d1af557 fixed file backup and converted other forgotten "assignments"; merged from MOODLE_16_STABLE 2006-05-23 18:38:24 +00:00
skodak 4bb6c2563b fixed broken SQL that was throwing errors in backup; merged from MOODLE_16_STABLE 2006-05-23 18:15:52 +00:00
skodak a632e5dab1 fixed bug 5594 - can not save group details; merged from MOODLE_16_STABLE 2006-05-23 18:00:20 +00:00
skodak 394832e100 fixed warning; merged from MOODLE_16_STABLE 2006-05-23 13:33:44 +00:00
skodak 4b9842d27d fixed incorrect output buffer use - bug #5590; merged from MOODLE_16_STABLE 2006-05-23 10:55:32 +00:00
skodak f6f789936d fixed RSS feeds warning bug #5591; merged from MOODLE_16_STABLE 2006-05-23 10:25:39 +00:00
skodak d33f282a5b make sure variables are properly cleaned; merged from MOODLE_16_STABLE 2006-05-23 09:47:48 +00:00
skodak b01a2fcd0f proper initialisation of $oldquestionid; merged from MOODLE_16_STABLE 2006-05-23 09:32:26 +00:00
skodak 0629da47d2 removed reliance on register globals; merged from MOODLE_16_STABLE 2006-05-23 09:16:17 +00:00
skodak 57f2e16c8d extra cleaning of variables; merged from MOODLE_16_STABLE 2006-05-23 09:02:13 +00:00
stronk7 b6725eba9a Allowing also numbers and underscores in sessioncookie
Merged from MOODLE_16_STABLE
2006-05-22 17:55:38 +00:00
skodak ebb63815f8 fixed register globals issues for $sort SC #256; merged from MOODLE_16_STABLE 2006-05-22 16:54:11 +00:00
tjhunt 5bbca3a4cb Fix for Bug #5588 - Editing a question after sorting leads to an error. Merged from 1.6stable. 2006-05-22 15:43:53 +00:00
skodak 1c871c231f fixed bug #5578 - remove login as button for other teachers in course; merged from MOODLE_16_STABLE 2006-05-22 13:15:06 +00:00
tjhunt 971cd5082a Fix an undefined variable notice. Merged from 1.6stable. 2006-05-22 13:06:36 +00:00
tjhunt 656ee8c6a1 Fix an undefined variable notice. Merged from 1.6stable. 2006-05-22 11:20:51 +00:00
nfreear e99e2d126d Ongoing, fix bug 5400, navbar/breadcrumb TABLE to DIV, to improve semantics. Merged from stable branch. 2006-05-22 10:00:18 +00:00
skodak 631264347b fixed bug #5572 missing PARAM_CLEAN; merged from MOODLE_16_MOODLE 2006-05-22 06:00:51 +00:00
toyomoyo 92998e94bd merged fix for 5551 2006-05-22 02:39:14 +00:00
gbateson 9fd66c6642 fixed typo: clck -> click 2006-05-22 00:22:21 +00:00
gbateson 1e80704a32 modified CVS URLs to start http://moodle.cvs.sourceforge.net 2006-05-22 00:18:41 +00:00
gbateson 6075dd444f Give Up button modified to send results and set status to Abandoned. Microincrement release to 2006052200 (release = v2.1.20) 2006-05-22 00:10:23 +00:00
skodak 2ee2481ef9 fixed register globals issue with $loginasguest; merged from MOODLE_16_STABLE 2006-05-21 20:51:52 +00:00
skodak 70efd5689a fixed redirection to https:// for edit profile and change password when loginhttps on; merged from MOODLE_16_STABLE 2006-05-21 20:35:22 +00:00
skodak d1c8eb14d1 temporary workaround for bug #5534, html editor now disabled for IE when loginhttps on and wwwroot starts with http://; merged from MOODLE_16_STABLE 2006-05-21 20:21:35 +00:00
skodak 108d928b8b removed isset and merged from MOODLE_16_STABLE 2006-05-21 10:14:17 +00:00
skodak 4eff058d5a fixed register globals issue with $text; merged from MOODLE_16_STABLE 2006-05-21 08:09:43 +00:00
skodak 17037270bc proper initialisation of passwordchangeurl; merged from MOODLE_16_STABLE 2006-05-21 07:51:27 +00:00
skodak 54eca8f2a4 proper initialisation of sqlsortkey SC#258; merged from MOODLE_16_STABLE 2006-05-21 07:42:58 +00:00
koenr 902a9198b6 copied from stable 2006-05-20 19:15:11 +00:00
skodak cd7d03fa48 fixed register globals issues in course/search.php; merged from MOODLE_16_STABLE 2006-05-20 18:41:59 +00:00
skodak 9cb14dbd9e proper initialisation of $focus SC#257; merged from MOODLE_16_STABLE 2006-05-20 18:19:27 +00:00
skodak 82f0028119 do not show pending courses button for nonadmins bug #5564; merged from MOODLE_16_STABLE 2006-05-20 18:08:25 +00:00
skodak a38a768b29 fixed cleaning of path in custom scripts SC#221; merged from MOODLE_16_STABLE 2006-05-20 17:23:14 +00:00
stronk7 76046108e9 Ready to new functionalities...;-) 2006-05-20 00:11:30 +00:00
skodak 940e39369a fixed block width calculation; merged from MOODLE_16_STABLE 2006-05-19 21:01:26 +00:00
skodak 9b7bff2699 submission in post.php cleanup, fixes for bugs #5530, #5484 and SC#252; merged from MOODLE_16_STABLE 2006-05-19 20:18:05 +00:00
skodak 4a10c3875b fixed - disabled autologinguest not always respected in require_login() SC#255; merged from MOODLE_16_STABLE 2006-05-19 19:11:30 +00:00
nfreear f08ab5f020 Ongoing, fix bug 5400, DIV to H1, to improve semantics. Merged from MOODLE_16_STABLE. 2006-05-19 13:30:25 +00:00
ethem 4087e6830e Eloy will plan support for enrol systems in backup/restore.
He has a lot of work to do, so this file temporary removed.
After implementation in /backup/restorelib&backuplib.php library, this file can be used again.
But now, this file is not necessary.

Discussion about support for enrol systems in backup/restore is here:

http://moodle.org/bugs/bug.php?op=show&bugid=5358
2006-05-19 12:35:49 +00:00
nfreear 1211e73244 Fix bug 5434 - hardcoded missing Alt text, with a warning comment. Merged from branch MOODLE_16_STABLE. 2006-05-19 10:33:13 +00:00
vyshane 2631c1744e Fix for Bug #5541 2006-05-19 06:25:12 +00:00
mark-nielsen 88427c077b [Merged][BugFix] Bug #5405 - made a new function that grades a lesson for a specific user's attempt. This is then used for grading lessons at the end of a lesson, for ongoing score feature and for updating the grade for essay question grading.
This new grading algorithm now enforces the lesson setting Max attempts when custom scoring is turned Off

Changed the reporting of minquestions setting to match the help file.  Now it is question based instead of attempt based.

Changed the reporting of ongoing score to use the new grade function.
2006-05-19 01:05:13 +00:00
skodak c23ff4d654 deprecated nvl() function similar to optional_variable(); merged from MOODLE_16_STABLE 2006-05-18 22:12:06 +00:00
dwoolhead 58de1815f4 Bug 5536 Replaced references to hide by show. Merged from stable branch. 2006-05-18 16:15:04 +00:00
ethem 5bf94809f0 Removed </td>. Help button appears on top :)) 2006-05-18 10:02:22 +00:00
ethem 527d142c43 I have just found a cute function called print_checkbox. :) 2006-05-18 07:55:12 +00:00
ethem 6b4f18622d Put back tjhunt's changes. Invalid merge. Tabs aren't more important than indexes. 2006-05-18 07:13:43 +00:00
skodak b2fcca2761 fixed bug #5533, could not choose from file root; merged from MOODLE_16_STABLE 2006-05-18 05:48:14 +00:00
martinlanghoff 42101fae2c login: Changing passwords now works when logged in as guest 2006-05-18 00:53:57 +00:00
skodak c0e2f1f7dd admins can now edit user images even when $CFG->disableuserimages = true; see bug #5494 and SC#253; merged from MOODLE_16_STABLE 2006-05-17 18:59:43 +00:00
skodak e0e1cd26fa fixed version number; merged from MOODLE_16_STABLE 2006-05-17 18:16:42 +00:00
skodak 4fb072d942 fixed some warnings and removed ugly hack error_reporting(E_ALL ^ E_NOTICE); that was only hiding warnings in this and other code; merged from MOODLE_16_STABLE 2006-05-17 18:06:33 +00:00
tjhunt 450a0a7db7 Merge from stable branch: Convert tabs to spaces in files where there were only a few rogue tabs. 2006-05-17 16:47:44 +00:00
tjhunt 9bd76b32f3 Merge from 1.6 branch. Fix URL syntax error when slasharguments is off. 2006-05-17 11:40:37 +00:00
tjhunt b1a308bee0 Merge from 1.6 branch. 2006-05-17 11:38:34 +00:00
ethem ddd74daef6 action.php renamed to authorizenetlib.php
Merged from MOODLE_16_STABLE.
2006-05-17 08:18:51 +00:00
martinlanghoff ba838c8d1f moodle16cleanup: mod/quiz correctly sync the constraints and indexes
which was not changed when it was moved from quiz module to question lib
2006-05-17 06:57:03 +00:00
martinlanghoff f470a1c6d5 moodle16cleanup: mod/quiz uniqueid does not exists, taking upgrade script
from mysql.php ver 2005070202. dropping some unused tables during the
transition from quiz to question lib
2006-05-17 06:56:14 +00:00
martinlanghoff 05acf8e974 moodle16cleanup: lib/db correct prefix, patch by Tim Hunt for bug 5515 2006-05-17 06:43:21 +00:00
martinlanghoff 2a0f40e98c mod/choice mod/lesson mod/scorm moodle16cleanup: Added notification
for cleanup that may fail if one is starting fresh from moodle 1.5.3+,
previous cleanup before 1.5.3 is not needed
2006-05-17 06:42:57 +00:00
martinlanghoff dbfc642a87 moodle16cleanup: mod/forum correctly dropping the constraint, so it does
not report an error during upgrade
2006-05-17 06:42:28 +00:00
martinlanghoff ccd218ee4b moodle16cleanup: lib/db correctly put the default values, change the
length of log_display.module which is just 20 chars on postgres7.sql
2006-05-17 06:36:31 +00:00
martinlanghoff aec6df38ac moodle16cleanup: backup/ set the correct column datatype and default value 2006-05-17 06:36:14 +00:00
martinlanghoff 7f8199c253 moodle16cleanup: blocks/rss_client set the correct column default value 2006-05-17 06:35:50 +00:00
martinlanghoff d7d37bcb60 moodle16cleanup: enrol/authorize not null set which is similar to mysql
and that was upgraded on postgres7.php
2006-05-17 06:35:35 +00:00
martinlanghoff 9a2eb087aa moodle16cleanup: mod/hotpot set the correct column datatype and default
value
2006-05-17 06:35:14 +00:00
martinlanghoff 7a3a4cff54 moodle16cleanup: mod/lesson drop unused table lesson_essay, set the
correct column datatype and default value
2006-05-17 06:34:50 +00:00
martinlanghoff f172091567 moodle16cleanup: mod/dialog we need to drop some more dialog module tables 2006-05-17 06:34:19 +00:00
martinlanghoff c89dfcfcf5 moodle16cleanup: mod/scorm version column should not be dropped, it must
exist. it was not upgraded as with mysql.php 2005041600
2006-05-17 06:30:13 +00:00
martinlanghoff 1b58a2f3a0 moodle16cleanup: mod/wiki synch upgrade script and .sql with mysql
counterpart, drop the not null constraint to sync with postgres7.sql
2006-05-17 06:29:45 +00:00
martinlanghoff c4ca8d4596 moodle16cleanup: mod/forum added notification message 2006-05-17 06:29:15 +00:00
martinlanghoff 66c7e47b27 blocklib: cache (and used cached) block instances properly in $pageblocks
Now blocks_have_content() caches instantiated block objects inside $pageblocks
and blocks_print_blocks() uses them if available. This behaviour now matches
the documentation: blocks instances are created only once, get_content()
may be invoked several times.

A better fix would be to cache the _output_ of the block (the ->content
property) but it may bite us if any block is counting on being called twice.

Discussion at: http://moodle.org/mod/forum/discuss.php?d=45867
2006-05-17 04:39:43 +00:00
vyshane 0adf53f6cd Cosmetic fix in print_log_ooo, commented out call to print_log_ooo in
/course/report/log/index.php.
2006-05-17 03:07:11 +00:00
skodak f231e867f0 I hope this is the last patch for header already printed trouble in error() and redirect(); merged from MOODLE_16_STABLE 2006-05-16 20:31:22 +00:00
ethem f9ff6fbd77 confirm_sesskey() implementation for capture,delete,refund and void. I hope it works. :) 2006-05-16 15:34:24 +00:00
ethem 98f6b1eb54 Allow showing error message when insert_record fails.
merged from 16_stable.
2006-05-16 15:02:52 +00:00
nfreear f73e218f40 Merge from STABLE. Fix bug 5477... 2006-05-16 12:27:21 +00:00
ethem e295c6e4c3 Manual capture settings for sending email: cron=enabled, an_review=checked, an_capture_day=0, an_emailexpired=1-5 2006-05-16 11:37:07 +00:00
nfreear 5fc835a533 Merged from STABLE. 2006-05-16 10:59:27 +00:00
ethem 42c4e612db (Manual capture settings: cron=enabled, an_review=checked, an_capture_day=0) 2006-05-16 10:43:02 +00:00
nfreear 49d192fcd6 Merged from STABLE. 2006-05-16 10:35:15 +00:00
thepurpleblob ce4b7b5fbe Added note that export now exports subcategories. 2006-05-16 09:35:03 +00:00
toyomoyo 0376cc2fab merged 2006-05-16 08:22:42 +00:00
toyomoyo 82326fc1d3 merged fix for 5513 2006-05-16 07:58:47 +00:00
vyshane 9b18fc3b83 Commiting merge from 1.6. 2006-05-16 07:07:04 +00:00
vyshane 84bada7dea Fix for Bug #5467. Converted newlines to unix format. Removed extra lines at
the end of php scripts. Converted tabs to spaces in php scripts.
2006-05-16 06:45:14 +00:00
vyshane 04678d8eca Fixed Bug #5354 - Gradebook [DropXLowest and Exclude] 2006-05-16 06:21:49 +00:00
mark-nielsen 74e3524216 [Merged][BugFix] Bug 5485 - problem with regular expressions with simple analysis 2006-05-16 03:06:28 +00:00
stronk7 4a428b5f5c Updated to latest version (1.56). Bug 5165.
(http://moodle.org/bugs/bug.php?op=show&bugid=5165)

Merged from MOODLE_16_STABLE
2006-05-15 23:31:50 +00:00
danmarsden 019c47d6c1 Fixes bug 5464 also makes response clearer to students -see:
http://moodle.org/mod/forum/discuss.php?d=45504

also finishes off Bug 662
2006-05-15 23:24:42 +00:00
mjollnir_ 0c49258b99 mod/quiz/view No-longer display final grade when quiz settings forbid it.
Changed view.php so that it checked if there were any attempts with
concealed grades before printing the student's overall score.
Credit: Peter Bulmer <peter.bulmer@catalyst.net.nz>
Merged from MOODLE_16_STABLE
2006-05-15 21:52:18 +00:00
skodak 2c3432e684 fixed problem when set both loginhttps and https in wwwroot, closes bug #5507 and #3848; merged from MOODLE_16_STABLE 2006-05-15 21:36:46 +00:00
gustav_delius 91d7ead073 Answers to essay questions are now saved correctly when navigating to another page, fixing bug 4478 2006-05-15 20:42:14 +00:00
mark-nielsen a1d0b3eb81 [BugFix] Bug 5505 - function lesson_print_tree now checks for teacher editing priv before printing editing icons. Had to change arguments for this function as well which is the edit in view.php.
lesson.php how checks for teacher editing priv for all actions except for continue.  This is just in case the user hacks the URL.
2006-05-15 19:14:22 +00:00
stronk7 0ec7502bad Avoid [[namesite]] to appear when ADDING site activities.
Merged from MOODLE_16_STABLE

I sent this on May 9th! :-(
2006-05-15 17:54:29 +00:00
stronk7 356183b5bd Changing session->data to medium text. Bug 5406.
(http://moodle.org/bugs/bug.php?op=show&bugid=5406)

Merged from MOODLE_16_STABLE

IMPORTANT: I sent this to CVS on May, 8th and changes have dissapear!
           It could be possible than other commits sent near SF crash
           were affected too!
2006-05-15 17:33:38 +00:00
skodak 4ca5b47322 fix my previous incorrect short tag fix, fixed register globals, IP address used as mail user when not logged in; merged from MOODLE_16_STABLE 2006-05-15 15:45:27 +00:00
skodak e7a8d28f57 fixed short php tags; merged from MOODLE_16_STABLE 2006-05-15 15:12:56 +00:00
skodak a536138d02 changed cleaning of entry title, now matches handling of forum post titles; merged from MOODLE_16_STABLE 2006-05-15 15:05:28 +00:00
skodak 3b25960385 better cleaning of post title SC#251 revisited; merged from MOODLE_16_STABLE 2006-05-15 14:48:11 +00:00
skodak 62b504d20b better cleaning of post title SC#251; merged from MOODLE_16_STABLE 2006-05-15 14:32:14 +00:00
exe-cutor 1b8991fd9c Fixed an inconsistent link in the instructions textfield 2006-05-15 12:08:06 +00:00
exe-cutor 14d62a551a Added function get_first_string to better handle multi-valued attributes 2006-05-15 06:55:08 +00:00
vyshane 7ec49125d6 Added language strings for new log functionality (downloading logs as excel or csv) 2006-05-15 05:01:56 +00:00
vyshane 92890025fe Added option to download logs in excel or csv formats. Merged in code contributed by
Daniele Cordella <d.cordella@iss.it>. Originally posted as bug 5024.
2006-05-15 05:01:00 +00:00
toyomoyo 6caa2c52ec merged fix for 5493 2006-05-15 03:00:11 +00:00
toyomoyo 114f81ce09 merged, tidying up constants 2006-05-15 02:57:48 +00:00
toyomoyo b0ef72a6f3 merged fix for 4404 2006-05-15 02:26:54 +00:00
toyomoyo a1e3e9894b merged fix for 5465 2006-05-15 02:03:03 +00:00
skodak 70ed990ed2 fixed secure forms handling when POST url contained GET parameters (cookieless mode and some other forms); merged from MOODLE_16_STABLE 2006-05-14 21:21:35 +00:00
skodak 70cedbfd5d fixed bug #5489 - can not edit file, minor bugfixes and whitespace cleanup; merged from MOODLE_16_STABLE 2006-05-14 19:10:49 +00:00
skodak cc50d6664f I hope final fix for warnings when using error() after print_header() with buffering on, solution was to flush all buffers and reenable SID rewrite when needed; merged from MOODLE_16_STABLE 2006-05-14 17:23:29 +00:00
gustav_delius 38316f63a5 Removing obsolete defaults 2006-05-13 17:06:32 +00:00
gustav_delius 36be25f6e5 Introduce question_attempts table, closing bug 5468
Fixed incorrect check for whether to update state or insert new one in save_question_session()
Deal with manually graded states correctly during regrading
Increase state sequence number during manual grading
Supplied missing userid to quiz_save_best_grade() during manual grading
2006-05-13 16:57:17 +00:00
ethem e81e5c1604 Fix: Redirect to order details page 10 seconds later, not home page. Merged from MOODLE_16_STABLE. 2006-05-13 16:18:38 +00:00
gustav_delius 4377c290c0 Updated comments and made sure teacher preview gets restarted when changes are saved, fixing bug 5478 2006-05-13 10:39:15 +00:00
ethem 6e6c37e2be Language direction is important. Changed as: <b>AVS Result:</b> $a
merged from 16_stable.
2006-05-13 08:53:34 +00:00
thepurpleblob 36e2232e27 Merged from STABLE. 2006-05-13 08:49:46 +00:00
ethem f6a7a35cc9 More readable coding. Now, I understand everything. :)
Merged from MOODLE_16_STABLE.
2006-05-13 08:33:55 +00:00
ethem 8f152c586d Deleting test transactions are not good. They may be in proggress. Let's update WHERE transid<>'0'.
Merged from MOODLE_16_STABLE.
2006-05-13 06:02:06 +00:00
ethem 17dd669149 Fix: Don't show newly created orders prior to 2 minutes.
They may be still in proggress and these aren't test transacions(transid=0).
We check timecreated field to prevent this.
MERGED FROM MOODLE_16_STABLE.
2006-05-12 19:56:02 +00:00
ethem 3335e3f881 Fix: Delete test transactions before update status as AN_STATUS_AUTHCAPTURE.
Merged from MOODLE_16_STABLE.
2006-05-12 18:36:30 +00:00
ethem 431efddc44 Status: 'New' string. 2006-05-12 17:20:39 +00:00
stronk7 297bb00dfe Changing session->data to medium text. Bug 5406.
(http://moodle.org/bugs/bug.php?op=show&bugid=5406)

Bump!
2006-05-08 16:40:44 +00:00
stronk7 ef668fcf99 Changing session->data to medium text. Bug 5406.
(http://moodle.org/bugs/bug.php?op=show&bugid=5406)

Merged from MOODLE_16_STABLE
2006-05-08 16:39:34 +00:00
thepurpleblob 6cb4910c58 Merged from STABLE 2006-05-08 10:39:14 +00:00
toyomoyo f1f5ec3773 fix for 5438 merged 2006-05-08 07:09:28 +00:00
vyshane 7eaf5045ce Fix for Bug #5441. 2006-05-08 03:56:26 +00:00
vyshane 36914ff6a7 Changed the 'module' field length to 20 in the log_display table (Bug #5419).
Previous commit message in 1.6 stable should read 'log_display table' instead
of 'log' table. Both fixes are identical and carried over to HEAD via a merge.
2006-05-08 03:16:04 +00:00
stronk7 0abbbe296d Initial revision 2006-05-07 23:31:32 +00:00
stronk7 fbaea8f354 glossary print view is now valid XHTML.
Merged from MOODLE_16_STABLE
2006-05-07 10:49:28 +00:00
stronk7 0f5f8363d7 Now, when a single forum is restored and no user data was created,
the initial discussion/post is automatically generated. Bug 5418.
(http://moodle.org/bugs/bug.php?op=show&bugid=5418)

Merged from MOODLE_16_STABLE
2006-05-06 16:58:36 +00:00
ethem 76c16eac35 Admin can setup which credit card types will be accepted.
Merged from MOODLE_16_STABLE.
2006-05-05 18:29:38 +00:00
ethem 4a1e506a35 Admin can setup which credit card types will be accepted.
Merged from MOODLE_16_STABLE.
2006-05-05 18:16:45 +00:00
stronk7 0045d58c69 Now the help link in the admin block points to Docs. Bug 4803.
(http://moodle.org/bugs/bug.php?op=show&bugid=4803)

Merged from MOODLE_16_STABLE
2006-05-05 17:56:56 +00:00
andreabix 3fa299acc6 Minor refinements 2006-05-05 08:56:03 +00:00
vyshane 0aa81bc346 Fix for Bug #5419 - Inconsistency between log_display and log tables. Bumped
version number.
2006-05-05 08:43:00 +00:00
vyshane 7235ae23f1 Fix for Bug #5419 - Inconsistency between log_display and log tables 2006-05-05 08:42:29 +00:00
toyomoyo 78444c8785 merged fix for 4478 2006-05-05 06:44:32 +00:00
toyomoyo 9023bc7f71 merged fix for 5428 2006-05-05 05:15:18 +00:00
thepurpleblob c0724bdce2 Merging from STABLE 2006-05-04 11:17:50 +00:00
stronk7 4bd5bb599c Anything against the ISO-8859-1 word?
Merged from MOODLE_16_STABLE
2006-05-04 10:40:24 +00:00
ethem 5f7a36628f Create transid indexes for backup & restore speed. 2006-05-04 09:42:35 +00:00
toyomoyo e503f30d10 merged fix for 5426 2006-05-04 09:40:33 +00:00
ethem 203003ae8c Enable 'Authorize.net plugin' and setup cron properly; or uncheck an_review again.
Merged from MOODLE_16_STABLE.
2006-05-04 08:18:35 +00:00
ethem 669c58e1a5 First authorize restore library for version 1.7 2006-05-04 07:58:20 +00:00
toyomoyo f009d079ec fix for 3644 merged 2006-05-04 06:56:43 +00:00
vyshane 1db34bf5fb Fix for bug #4805 2006-05-04 04:32:55 +00:00
toyomoyo 11e615412d merged change for the double </a> 2006-05-04 02:32:43 +00:00
stronk7 bdeed966f6 Now more quiz actions are restored properly:
-preview
 -start attempt
 -close attempt
 -continue attempt (too long. See Bug 5419)
Bug 5122
(http://moodle.org/bugs/bug.php?op=show&bugid=5122)
2006-05-03 23:48:28 +00:00
stronk7 543cd3e01d Fixing some non-production values I left after testing.
Thanks James!

Merged from MOODLE_16_STABLE
2006-05-03 22:05:59 +00:00
stronk7 ca3a9e5443 Changing ASCII to ISO-8859-1. Also I've updated Backup FAQ Docs
to show the workaround. Bug 5276.
(http://moodle.org/bugs/bug.php?op=show&bugid=5276)

I'm getting old. Should we send lang files to MOODLE_16_STABLE too?
2006-05-03 19:21:10 +00:00
stronk7 6985c78c6b XHTML validation. Bug 5332.
(http://moodle.org/bugs/bug.php?op=show&bugid=5332)

Merged from MOODLE_16_STABLE
2006-05-03 18:22:21 +00:00
stronk7 02436153e0 Solving some changes in course-view and sections...
Merged from MOODLE_16_STABLE
2006-05-03 17:49:52 +00:00
andreabix ad293d8bd3 1.6 compliance added 2006-05-03 17:28:18 +00:00
ethem a7c3596182 First authorize backup library for version 1.7 2006-05-03 17:09:52 +00:00
stronk7 c01fdc543e Merging from MOODLE_16_STABLE wow!!!! 2006-05-03 16:37:37 +00:00
moodler 44d57cc35a Updated version for Moodle 1.7 dev 2006-05-03 15:32:41 +00:00
moodler be01f6239e Old checkin that got missed 2006-05-03 14:24:41 +00:00
thepurpleblob f6beb499b6 Now includes question/editlib.php
NOTE: This might well be the wrong thing to do and need
backed out, but until I hear otherwise it gets quiz working again!!
2006-05-03 12:27:06 +00:00
moodler 418db328a0 Fixed: Bug #5164 - Assignment email lacks student name 2006-05-03 08:19:53 +00:00
toyomoyo 3925a20afe fix for 5409 2006-05-03 08:05:58 +00:00
mjollnir_ d57cf4c132 question/type/qtype hide scores when requested by teacher
Changed question/type/questiontype.php such that when review.php
displays a state-by-state review of answers submitted,
scores are not displayed unless allowed by quiz options.

Credit: Peter Bulmer <peter.bulmer@catalyst.net.nz>
2006-05-03 02:44:25 +00:00
moodler c4292470ba Add a warning when trying to restore a pre-1.6 backup on a
1.6 Unicode Moodle, with a link to the docs.
2006-05-03 02:00:32 +00:00
mits e9ac3bd4c0 fixed based on standard theme. 2006-05-02 18:52:13 +00:00
mark-nielsen 432c2219f5 [BugFix] Bug #5396 - Found that the css float was causing the odd problem. Removed extra styles for the button layout and changed the divs around the buttons to spans
Also improved some logic in the button processing for branch tables
2006-05-02 17:05:29 +00:00
stronk7 e6af2cad22 Added two new functions: set_column() and set_row()
(http://moodle.org/mod/forum/discuss.php?d=44634)
2006-05-02 15:28:02 +00:00
thepurpleblob 4267f47b49 Changed require due to moved category functions 2006-05-02 15:23:48 +00:00
stronk7 a167667798 Adding back some recently deleted styles related with the IMS-CP resource.
It seems that the latest commit (merge) deleted a bunch of styles!!!!
(notified by email to commiter)
2006-05-02 14:59:17 +00:00
nfreear 06742c425b Fix ongoing, bug 5400, "Accessibility modifications not propagated to themes" (OU-Bugz: 1006) 2006-05-02 14:44:28 +00:00
nfreear c7ae8c5da7 Fix ongoing, bug 5400, "Accessibility modifications not propagated to themes". 2006-05-02 14:32:39 +00:00
thepurpleblob 9c802dff19 Bunch of category functions moved to question/editlib.php 2006-05-02 12:26:36 +00:00
thepurpleblob 4fbfd9711c Bunch of category functions moved from lib/questionlib.php 2006-05-02 12:26:03 +00:00
thepurpleblob 947217d725 Small clean up, and fix a link to a required file for robustness. 2006-05-02 09:04:38 +00:00
gustav_delius 3b62b2ba13 Fixed column names. Thanks Jean-Michel. See bug 5262 2006-05-02 08:37:46 +00:00
toyomoyo f0edf8c274 manual merge from stable 2006-05-02 07:57:20 +00:00
moodler 152a90601b Merged fixes from stable (undoing category visibility changes) 2006-05-02 07:56:25 +00:00
ethem df4ba5a1b9 1 - adminhelpcapture & adminhelpreview strings removed from enrol_authorize.php
2 - captureday.html & review.html files added to help/enrol/authorize
2006-05-02 07:13:15 +00:00
moodler acfc768e3e COnverted from DOS format 2006-05-02 06:00:35 +00:00
martinlanghoff 274f009184 mod/chat - fix another instance where empty $USER->lastIP was affecting us
The original commit was:

mod/chat - use empty value instead of erroring out if $USER->lastIP and getremoteaddr() don't yield any interesting value

Sometimes we can't get any useful IP for the user -- and this may even be a
valid situation. So fudge an empty value -- the DB needs it as the IP field
is NOT NULL.
2006-05-02 05:20:35 +00:00
gbateson 2cea2a74b4 fixed handling of square brackets in JCloze on older PHP sites. Micro-increment version to 2006050200 (v2.1.19) 2006-05-02 05:18:01 +00:00
toyomoyo 92a019ac04 added logging for blog views 2006-05-02 02:44:35 +00:00
stronk7 10d89cf1d1 Now, hidden courses that haven't been modified in the last month
are skipped by the scheduled backup. Credit goes to James. Bug 4694.
(http://moodle.org/bugs/bug.php?op=show&bugid=4694)
2006-05-01 23:26:12 +00:00
stronk7 e3ba25b4c0 New string for scheduled backups... 2006-05-01 23:23:59 +00:00
stronk7 bb4a5741d1 Isolating debug and perfdebug behaviours...now
each one controls its own output.
2006-05-01 23:16:48 +00:00
gustav_delius 0c1e3a145f Changing the category on the import or export page also changes it on the question edit page, closing bug 5348 again 2006-05-01 22:26:06 +00:00
skodak aaeaa4b007 fixed alternative salt index range - now allowed 1...20 2006-05-01 21:32:49 +00:00
skodak 6d706916bd double header in error() workaround 2006-05-01 21:31:12 +00:00
michaelpenne 02f071d147 lesson_default table had become out of synch with the lesson table. Needed to add new columns.
Updated backup and restore to include the new values

Fixed a bug in restore where it would restore 1 lesson_default per lesson.  Now only stores one per course.

Went through all the backuplib.php, restorelib.php, mysql.sql and postgres7.sql to make sure everything was in synch and being backed up and restored.
2006-05-01 19:02:38 +00:00
paca70 e7226b2bc8 Removed comma 2006-05-01 12:56:57 +00:00
toyomoyo 332135efd0 fix for 5386 2006-05-01 07:49:28 +00:00
thepurpleblob 6e5a360ad1 Question object not always initialised. Bug #5369 2006-05-01 07:35:33 +00:00
toyomoyo e44f4173b7 fix for 5003, 5302 2006-05-01 06:56:38 +00:00
toyomoyo 14148bc2db fixing blog logs, also added code to prevent browsing blogs using other user's userid 2006-05-01 06:23:41 +00:00
moodler bd7be234ee FIxed blog log URLs 2006-05-01 06:04:22 +00:00
toyomoyo b13ee30ead fix for 5385 2006-05-01 05:33:47 +00:00
toyomoyo 351576e4df fix for 5384, added a link for tags in the blog_menu block 2006-05-01 03:53:16 +00:00
moodler 90fcfc0ada Fixed some blog styles 2006-05-01 03:41:40 +00:00
moodler dd0863ddf4 Fixed links on blog pages 2006-05-01 03:34:51 +00:00
moodler b0bc8e3008 More little fixes to links and headers 2006-05-01 03:30:55 +00:00
moodler 44fdf0f301 Some typos 2006-05-01 03:25:07 +00:00
moodler 37610bf9dd FIxed some headers 2006-05-01 03:24:05 +00:00
toyomoyo 5a50c2b2f4 replacing hardcoded url with $CFG->wwwroot 2006-05-01 03:19:13 +00:00
moodler 83fb561f0c Cleaning up the header a bit 2006-05-01 03:12:17 +00:00
moodler 6279c33fbd Some fixes for the links in the blog tags block 2006-05-01 03:11:45 +00:00
mark-nielsen 53354ec03c Due to changes in Quiz which allows commenting and manual grading of all question types, essay no longer needs its two tables: question_essay and question_essay_states
backuplib.php removed backup code related to question_essay_states
type/essay/db/mysql.sql and postgres7.sql removed all SQL
type/essay/display.html improved essay display
type/essay/questiontype.php, editquestion.php, and editquestion.html removed all uses
of the two tables - this resulted in a great simplification of the essay question type
2006-05-01 02:56:06 +00:00
toyomoyo 116bd4ec0d changes made to accomodate adodb_logsql table. bug 5003 2006-05-01 02:42:36 +00:00
toyomoyo 8d92d7ad71 info column is missing a key 2006-05-01 02:34:29 +00:00
moodler 82c8137db9 Added css for blog class audience 2006-05-01 02:21:39 +00:00
moodler 776d8f1581 Moved blog_tags block styles to the block itself 2006-05-01 02:01:37 +00:00
moodler 7fdc360c1e New style for blog audience info 2006-05-01 02:00:06 +00:00
skodak 4908ad3ebf added optional salting of user passwords stored in internal table - first part; admin UI and docs coming soon (SC#236) 2006-04-30 21:02:28 +00:00
urs_hunkler df74830cfd cleaned and enhanced CSS for quiz 2006-04-30 17:39:58 +00:00
urs_hunkler 43015b3b6a cleaned and enhanced CSS for questions 2006-04-30 17:39:02 +00:00
gustav_delius 7d042862c8 Warning strings for missing questions or question types. Misprint in string name fixed. 2006-04-30 17:33:30 +00:00
gustav_delius 2b44d03f81 Error message for when a questiontype is missing is prepended to question text. 2006-04-30 17:33:00 +00:00
gustav_delius f57c624262 Use the missingtype question type to print the explanation message when a random question is missing 2006-04-30 17:31:33 +00:00
gustav_delius 2be604b665 Missingtype now also works without notices when the missing question has no answers. 2006-04-30 17:30:22 +00:00
gustav_delius ed28abca24 Don't throw a php error when there are no question answers in the default question type. 2006-04-30 17:13:44 +00:00
gustav_delius 4572d78f71 When a teacher deletes a question that was already used as a random question in a quiz the student now gets a useful message about the fact rather than just a php error. 2006-04-30 16:59:23 +00:00
gustav_delius 28a8ec9148 Make sure that the newgraded field always points to a valid state. 2006-04-30 16:23:55 +00:00
gustav_delius 2e9b6d157c Fixed bug 5192 2006-04-30 16:15:04 +00:00
gustav_delius 1a1293edd7 Making sure grading and feedback use the same way of testing responses, thanks to Joseph, bug 5134 2006-04-30 15:11:13 +00:00
gustav_delius b518c69e3b Question preview now handles duplicate responses properly 2006-04-30 12:07:08 +00:00
gustav_delius ca56222d50 Fixed and simplified the logic in the response processing. Remove the walking through previous graded states. 2006-04-30 11:45:14 +00:00
stronk7 f84b602b44 Too much restrictive optional_param was producing
some undesired efects with formats. Bug 4858.
(http://moodle.org/bugs/bug.php?op=show&bugid=4858)

Merged from MOODLE_15_STABLE
2006-04-30 10:07:36 +00:00
stronk7 60b5242a53 entrylist format now show the 'send ratings' button. Bug 4915.
(http://moodle.org/bugs/bug.php?op=show&bugid=4915)
2006-04-30 09:41:19 +00:00
gustav_delius c4c11af898 Now that the shuffling within a question can be controlled also at question level the default at the module level needs to be set to true, otherwise people can not test the question setting. 2006-04-30 08:11:49 +00:00
gustav_delius 7a38b61bfa Fixing empty lines 2006-04-29 20:01:27 +00:00
gustav_delius 26f6d51c88 Fixed empty lines 2006-04-29 19:52:44 +00:00
gustav_delius a159b825a3 Fixed empty lines 2006-04-29 19:46:41 +00:00
gustav_delius 99dc4f381c Removed empty lines 2006-04-29 19:36:56 +00:00
stronk7 d639dbf762 Some more table/form mixed things remains in two forms. The rest
validates OK now. Bug 5371 created for the validation problem!
(http://moodle.org/bugs/bug.php?op=show&bugid=5371)
2006-04-29 16:39:02 +00:00
stronk7 954ec82fd0 body and html close were being printed twice! Number of XHTML
errors highly reduced by the form-table mix remains...
2006-04-29 15:54:52 +00:00
stronk7 755a1c4b02 XHTML closing some input tags. But this page doesn't validate at
all because the table/form intermixed tags!
2006-04-29 15:40:46 +00:00
stronk7 85e20335a6 Avoid [[namesite]] to appear when editing site activities. Bug 5370.
(http://moodle.org/bugs/bug.php?op=show&bugid=5370)
2006-04-29 15:13:31 +00:00
stronk7 97cc77e090 Initial revision 2006-04-29 12:22:58 +00:00
mark-nielsen be1af5b770 Moved the require login and isteacher checks to infront of the form data processing 2006-04-29 07:37:52 +00:00
mark-nielsen 6cd88ca593 REMOVED: This feature is no longer in the lesson settings screen. This functionality has moved to report.php 2006-04-29 01:42:28 +00:00
mark-nielsen fe9588b971 Deleted lang entry for Deleting student attempts in the lesson settings page. This functionality has been moved to report.php 2006-04-29 01:40:18 +00:00
mark-nielsen 31eb5b5335 [Removed] the Delete user attempts option in the Lesson settings (changes to mod and lib)
[Added] new functionality to report.php to delete individual student attempts
[Fixed] High scores text in view.php when no high scores were recorded needed to be centered
2006-04-29 01:37:50 +00:00
stronk7 062a84a62a Columns cannot be null anymore. Bug 5343.
(http://moodle.org/bugs/bug.php?op=show&bugid=5343)

Please document it in coding guidelines!!!
2006-04-28 23:42:12 +00:00
stronk7 2ce22ad858 Bump to beta4! ;-) 2006-04-28 17:57:46 +00:00
stronk7 e857af01f8 No need to display the iframe because now it's never hidden. 2006-04-28 13:18:49 +00:00
gustav_delius 3f13e16094 Removed the answershuffle field from the random short answer question because in a random question this options is irrelevant. 2006-04-28 09:44:13 +00:00
gustav_delius 4ff35ad41e Small improvement to help files 2006-04-28 09:43:19 +00:00
thepurpleblob c515fcf73e Removed mystery (probably diagnostic) message 2006-04-28 09:39:13 +00:00
thepurpleblob a9b16aff8d Now ignore hidden questions. Bug #4988 2006-04-28 09:36:17 +00:00
gustav_delius b59126298d Just a small comment to avoid problems in the future 2006-04-28 09:34:33 +00:00
ethem 0168503ab2 Direct access to this script is forbidden. 2006-04-28 07:20:25 +00:00
toyomoyo 993763bf17 1.6 Beta 4! 2006-04-28 05:54:27 +00:00
toyomoyo 0327c40abb bug fix for 5303. hope i didn't break anything >_< 2006-04-28 03:18:56 +00:00
moodler 92718cce32 Make sure we can see all installed languages regardless of langlist 2006-04-28 02:29:36 +00:00
gbateson e5d1941db7 set negative values to 0, on unsigned numeric fields 2006-04-28 02:11:52 +00:00
gbateson c9441e34ca allow negative score and weighting in hotpot_responses table 2006-04-28 02:06:58 +00:00
toyomoyo 008060c43e fix for 5305 2006-04-28 01:55:12 +00:00
gbateson 8955d22ac6 optimization fo the removal of orphan records 2006-04-28 01:37:17 +00:00
gbateson 9f02edcad8 small fix for the removal of orphan records 2006-04-28 01:20:05 +00:00
gbateson 340a5808e9 fix undefined variable $db 2006-04-28 00:59:57 +00:00
gbateson 192e8f6650 remove orphans records, if any, from hotpot tables, reduce size of "score" and "weighting" fields in "hotpot_responses" table, and set default value on ALL string fields in HotPot tables. New version number is 2006042800 (v2.1.18) 2006-04-28 00:56:14 +00:00
mjollnir_ 88a6724534 Fixing missing global in quiz pg upgrade 2006-04-27 23:25:06 +00:00
patrickslee 83e8edb463 Fixed wrong encoding detection logic in install.php 2006-04-27 23:17:25 +00:00
stronk7 81c2aa8051 Checking one table and one column that, uder some servers didn't get
correctly upgraded. Bug 5321. PG need testing!
(http://moodle.org/bugs/bug.php?op=show&bugid=5321)
2006-04-27 22:56:25 +00:00
skodak d154ed0cf4 fixed bug #4189 - visible not changed 2006-04-27 21:35:02 +00:00
skodak 8f414ab8aa fixed some long standing and some new problems and SC#249, please consider backporting into STABLE 2006-04-27 21:30:18 +00:00
gbateson 55b2126228 force remaining NULL fields into NOT NULL '0'/'' 2006-04-27 21:22:43 +00:00
skodak 7d32e9ded0 fixed bug #5298, missing string 'importfromothercourses' 2006-04-27 20:27:20 +00:00
skodak b4a93f74bf fixed marker handling, no sesskey error anymore - bug #5340 2006-04-27 20:06:41 +00:00
stronk7 7071d6d908 Deleted a bunch of js code and trying another (the last) way
to resize the iframe properly. Tests at home 100% reliable.
I hope it'll work ok remotely... Depending of results  we'll
decide the final system.
2006-04-27 19:45:00 +00:00
mark-nielsen 718dbada67 [Fix] Notices were being printed in PHP5 for NULL objects. Checking for NULL now before using in multichoice and truefalse questions 2006-04-27 16:48:38 +00:00
mark-nielsen 066c0af9bf [Fix] Error with PHP5. Needed to clone the lesson object before saving the $default object 2006-04-27 16:20:55 +00:00
nfreear b656d9226c Subtle fix to style-selectors/ background colours
- Bug 5161 "Course format weekscss looks unfinished".
2006-04-27 16:03:24 +00:00
ethem ee80cc094c lib.php : restore & backup functions removed. 2006-04-27 15:48:55 +00:00
ethem 53bf37b4f6 Backup library. 2006-04-27 13:41:53 +00:00
gbateson 530cd21dc2 Fix "data truncated errors" by setting set NULL values in int field to 0 before changing to NOT NULL DEFAULT 0 2006-04-27 08:45:34 +00:00
vyshane a42ca12218 Fix for Bug #5346. 2006-04-27 07:52:40 +00:00
gustav_delius 125bb7003e sortorder is now remembered between pages, fixing bug 5328 2006-04-27 07:46:34 +00:00
gustav_delius 239d373ff9 Had to change attribute of select tag from disabled to readonly in order to get the feedback popups to work, see bug 5338 2006-04-27 07:21:55 +00:00
gustav_delius a60a7b0d21 Fixing filtering of category names, now using PARAM_NOTAGS. Fixing bug 5349 2006-04-27 06:55:38 +00:00
gustav_delius dc454ef428 question category is not remembered correctly by import and export pages, fixing bug 5348 2006-04-27 06:42:10 +00:00
toyomoyo 7396321249 fix for 4976 2006-04-27 04:12:58 +00:00
vyshane 137624c78d Fix for Bug #5022 - Hidden resource/activity modules still show up in jump
menu. Forced course catch rebuild if a module is hidden or shown.
2006-04-27 03:31:10 +00:00
toyomoyo f69f1b498a trying to fix bug 5266 2006-04-27 02:34:16 +00:00
stronk7 d8606dc543 Defining width and height seems to improve resizing
behaviour under some browsers (source: some blogs)
It also helps when resize doesn't work, defaulting
to a nice size.
2006-04-26 22:18:47 +00:00
skodak eac8ac87c7 fixed notice and corrected the use of new s() and p() 2006-04-26 21:25:50 +00:00
skodak 3f73372fe5 fixed warning when no stats data yet 2006-04-26 21:13:45 +00:00
gustav_delius 754d6f1bb3 Corrected location of restorelibpre15.php, see http://moodle.org/mod/forum/discuss.php?d=44156 2006-04-26 20:32:54 +00:00
gustav_delius 50530eb782 The information from question_rqp_types table should not be loaded every time questionlib.php is loaded but only when the questiontype menu is actually needed. 2006-04-26 20:29:32 +00:00
gustav_delius a2c0f03e5e I incorrectly had renamed quiz_ to question_ in some places. 2006-04-26 20:05:21 +00:00
ethem e13958e08b Don't use $courseid in require_login(). User may want to see old orders. Course enrolment is not required. 2006-04-26 17:39:13 +00:00
ethem a37c274b90 Use global parameters in authorize_print_orders(): $courseid & $userid 2006-04-26 17:29:52 +00:00
ethem 71f7797f28 Don't duplicate header. 2006-04-26 17:16:34 +00:00
moodler 6f7d1382eb Just tidying up, and removed the logs link (it's in reports) 2006-04-26 16:09:43 +00:00
moodler 0b0ac96794 Just some tidy-ups 2006-04-26 16:03:16 +00:00
ethem e66012b563 Penny made it this way on purpose, apparently, to make it work properly on Postgresql, so it reverted. 2006-04-26 15:23:01 +00:00
urs_hunkler 8c75d90f8d bug #5347 - JS code after page end??? corrected 2006-04-26 15:00:22 +00:00
nfreear 31d35603ce Fix bug 5345 "Calendar block overflows in 'weekscss' course format." 2006-04-26 13:56:39 +00:00
ethem f506249f70 Merged from MOODLE_15_STABLE. First time install detection. 2006-04-26 12:38:09 +00:00
moodler 0e1baec9a7 Allow colors to the editor 2006-04-26 08:18:42 +00:00
moodler 7c8b82a9a7 Set default value for message_emailformat 2006-04-26 08:17:11 +00:00
toyomoyo 49487025ea just in case message_emailformat is not set 2006-04-26 08:07:12 +00:00
toyomoyo cb24115c8e trying to change all the default NULL fields to NOT NULL default '0'/'', hope i didn't mess up. Please report any bugs asap! 2006-04-26 05:48:04 +00:00
moodler 5ae598c757 Use the fullclone function instead of clone() because objects are in an array bug 5339 2006-04-26 04:40:14 +00:00
moodler 35ca0d6a45 Add a new function fullclone() to forcibly make a complete copy of a structure 2006-04-26 04:39:34 +00:00
gbateson 2e2a27a9bc changed line 10 to: $index = "{$table}_{$field}_idx"; (bug 5315) 2006-04-26 03:26:12 +00:00
gbateson 4f6a57d173 change single quotes to double quotes. Probable fix for bug 5315 2006-04-26 03:07:38 +00:00
vyshane d70d141846 Fix for: Bug #5337 - [[allchanges]] missing
Added allchanges lang string.
2006-04-26 02:48:57 +00:00
stronk7 81c7ef5ada Supresing footer() output in this page because it continues causing
important problems under Safari and I really think it isn't critical
to have it here at all costs.
2006-04-26 00:09:00 +00:00
stronk7 d860c55c84 Handle some debugs properly. 2006-04-25 23:52:42 +00:00
stronk7 d9f9d943b5 Now the deploy-all button works! 2006-04-25 23:47:46 +00:00
martinlanghoff 50fc296d8d auth/cas: dos2unix on index_form.html - bug #5053 2006-04-25 23:15:08 +00:00
stronk7 9fe25ab4f1 Diference between moodle.xml file not found and moodle.xml file
incorrect at restore time. Bug 5334.
(http://moodle.org/bugs/bug.php?op=show&bugid=5334)
2006-04-25 22:55:29 +00:00
martinlanghoff b76169a214 filterlib/filter_phrases() - try to escape magic characters used internally by the filter mechanism -- Bug#5236 / WR#422
This is an attempt to fix filter problems caused by glossary matches on %
(which also affect matches on * and #). Works for the sample cases I have,
but we may be breaking subtly in other places.
2006-04-25 22:47:42 +00:00
mjollnir_ b8a25300b6 Fixing bug #5148: I don't know how this worked for restore and not for import, but it works for both now 2006-04-25 20:47:44 +00:00
stronk7 5adb5b02db And the standard footer is back again. Andrew Walker, the
JavaScript Superman did the work! B-) Tested under FF, IE
and Safari.
2006-04-25 15:44:34 +00:00
stronk7 4d939c7283 Bypass div#footer style in resource view pages to get
all the space avaliable, making an exception in the
global one.
2006-04-25 15:35:39 +00:00
moodler f2dcfac0fd Make these icons transparent 2006-04-25 14:01:13 +00:00
moodler 3131d5c6de Removed overview.php 2006-04-25 13:19:52 +00:00
dwoolhead 38943071f0 With appropriate error reporting, adding a label to a section of a course results in an E_NOTICE message temporarily appearing on the screen, because the module object name property is not set. Prevent message being displayed by checking that property is set before testing its value 2006-04-25 11:48:39 +00:00
stronk7 206548dc4b Apply latest changes from resource type to repository
(double head out, cool resize javascript, XHTML and
navigation menu)

TODO: Fix the 'deploy all' button
2006-04-24 23:55:29 +00:00
stronk7 dc04f6e346 Now navigation menu is properly created (XHTML + 508) 2006-04-24 22:17:10 +00:00
ethem 7dcf558cde Locallib.php can be only used by index.php. 2006-04-24 17:15:13 +00:00
ethem cb845f37ae Put back. String 'returns'&'noreturns' are used only in one order. Not general. 2006-04-24 17:03:42 +00:00
ethem db763a8a91 String 'returns'&'noreturns' added to authorize strings array. (get string fast) 2006-04-24 16:54:59 +00:00
ethem efd0eb0d29 String 'all' added to strings array. 2006-04-24 16:46:39 +00:00
ethem db70762f01 $CFG removed 2006-04-24 16:31:02 +00:00
stronk7 f809df70ce Avoided some notices when one block has been deleted from moodle/blocks
and from blocks admin page and their instances haven't been deleted.

We should build some sort of check to do all the house-cleaning of "orphaned"
blocks, perhaps each time we arrive to the blocks admin page.
2006-04-24 15:01:35 +00:00
stronk7 77ea1a858e In this theme, peformance info only will be showed if it's enabled.
Others seems to bypass this setting if debug is enabled!
2006-04-24 14:32:50 +00:00
vyshane 5f672a4dd8 Fixed inserts for log_display. 2006-04-24 09:05:08 +00:00
vyshane 928a87338d Fixing inserts for log_display. 2006-04-24 09:00:42 +00:00
vyshane c343bc8831 Fixing inserts for log_display table. 2006-04-24 08:55:29 +00:00
vyshane fccaec1f5b Inserts for log_display. 2006-04-24 08:43:29 +00:00
toyomoyo a2655f6527 make some variables global for 5305 2006-04-24 08:38:11 +00:00
vyshane 93642edd6a Fixed inserts for log_display. 2006-04-24 08:38:03 +00:00
vyshane 43e2425857 Fixed log_display inserts. 2006-04-24 08:28:21 +00:00
vyshane 670b1364a0 Fixed inserts for log_display. 2006-04-24 08:26:33 +00:00
vyshane 1b51a8ed9c Fixed inserts for log_display table. 2006-04-24 08:23:19 +00:00
vyshane f53d75517e Fixed inserts for log_display table 2006-04-24 08:11:35 +00:00
toyomoyo f21cc86bca changed formats for log_display table 2006-04-24 08:10:55 +00:00
vyshane cf29432dcd Fixing inserts for log_display table. 2006-04-24 08:09:00 +00:00
vyshane 4dd8464f3d Fixed insert statements for log_display table 2006-04-24 08:02:17 +00:00
toyomoyo 4dca83214b new format for log_display 2006-04-24 08:00:51 +00:00
toyomoyo 7e7d06f30b changing new format for log_display 2006-04-24 07:58:53 +00:00
vyshane cfd2188118 Fixed insert error for log_display 2006-04-24 07:55:06 +00:00
vyshane cfd8facee6 Added primary key definition for log_display 2006-04-24 07:44:27 +00:00
gbateson da6bacb7e2 fix bug 5304 2006-04-24 06:54:44 +00:00
bobopinna bb3af8d431 Added memory to toc's collaps/expand mode 2006-04-24 06:42:45 +00:00
toyomoyo 3dba170e7d adding dropindex and addindex for modified tags table 2006-04-24 06:20:30 +00:00
moodler f4e7407d42 *** empty log message *** 2006-04-24 06:12:32 +00:00
toyomoyo 808f9930b3 adding proper _idx postfix 2006-04-24 06:00:37 +00:00
toyomoyo 31513aa13e changing tags->text to varchar 20, created index on tags(type, userid), and tags(text) 2006-04-24 05:53:06 +00:00
toyomoyo 9fad492eb5 some small fixes, mostly for 5174 2006-04-24 03:36:02 +00:00
moodler ea21c1f460 Fixed bug 5271 - icon tag missing in Upcoming Events block 2006-04-24 03:26:01 +00:00
vyshane 36e6706eb0 Bumped version number for last changes 2006-04-24 02:28:02 +00:00
vyshane 721cb8678d Bug #5254 - live logs
Cleanup for duplicate module/action combinations. Added id field for
log_display table and added an index moduleaction.
2006-04-24 02:24:18 +00:00
toyomoyo 9a7f3cad99 fix for 5205 2006-04-24 02:20:06 +00:00
toyomoyo 4c3b42f7c5 just in case someone has the index elemeny and not element 2006-04-24 02:17:16 +00:00
moodler 8634bc275d Fixed bug 5300 and removed moodle docs link from help pages 2006-04-24 01:58:31 +00:00
gbateson 6774380b24 set default value for varchar 255 fields, to fix "truncated" errors in utf8 migration. Fields affected: hotpot.studentfeedbackurl, hotpot_responses.correct/wrong/ignored 2006-04-24 01:44:08 +00:00
stronk7 b2ff86070d Changed list style for ims-cp to gain some room... 2006-04-24 00:14:20 +00:00
stronk7 b692e95816 Looking much better now! B-)
More tests tomorrow (IE, mainly)
2006-04-24 00:11:59 +00:00
patrickslee 2544a80de1 PostgreSQL 8 compatibility fix for database character set detecting 2006-04-23 23:39:56 +00:00
skodak b96f1ad6d5 fixed typo bug #4527 2006-04-23 23:16:02 +00:00
skodak 69e3c41688 page parameter cleanup 2006-04-23 21:07:44 +00:00
skodak d2b23346c9 block editing now uses PARAM_BOOL 2006-04-23 20:58:06 +00:00
skodak 5d00b3ad99 page parameter cleanup 2006-04-23 20:33:01 +00:00
urs_hunkler 2ca8a6c672 Bug #4315 - Use current_theme() instead of the $CFG-theme 2006-04-23 19:02:17 +00:00
stronk7 25b7cdf308 Finishing with ims cp styles, I think... :-/ 2006-04-23 18:19:50 +00:00
stronk7 0e8d48e9d5 Now the resize script supports both resources with and
without navigation menu.
2006-04-23 17:22:45 +00:00
stronk7 375da10d09 Latest ims cp styles added. 2006-04-23 17:01:06 +00:00
stronk7 57eb7bb905 Styles are now 100% out from here. 2006-04-23 17:00:18 +00:00
gustav_delius 1e7b7003f2 Deal with modules that are missing their language strings 2006-04-23 15:20:26 +00:00
gbateson 3da3e957f9 micro-increment version number to 2006042101 (release = v2.1.16) 2006-04-23 11:55:02 +00:00
gbateson df795ee950 two fixes connected with UTF migration: (i) remove $CFG->prefix from all index names, (ii) force type of "name" field in "hotpot_questions" table to "text" 2006-04-23 11:53:38 +00:00
gbateson ec161357c9 set $result even when $fromenc=="utf-8", to fix "unassigned variable" errors 2006-04-23 11:51:17 +00:00
stronk7 af6f079c3c Moving some harcoded styles in ims cp to standard 2006-04-23 11:49:33 +00:00
gbateson 5320d678e9 type of "name" field in "hotpot_questions" table should be "text" after migrate 2006-04-23 11:48:58 +00:00
stronk7 6a4fa81362 Moving some styles harcoded in the ims cp to standard... 2006-04-23 11:48:50 +00:00
skodak 45c4e0b73d moved php end tag out from comment 2006-04-23 11:45:37 +00:00
skodak 1182171459 moved php end tag from comment revisited 2006-04-23 11:40:25 +00:00
skodak 6550339d39 moved php end tag from comment 2006-04-23 11:37:57 +00:00
skodak 904ee206f1 fixed short tag 2006-04-23 11:32:25 +00:00
stronk7 b3c9d32ae1 Beautify a bit the footer, taking out that horrible standard 100px space! ;-) 2006-04-23 10:58:00 +00:00
ethem 023c3f0ee2 Some indexes were added in 15_STABLE. So, don't show an error message again if indexes are already exist. 2006-04-23 10:15:01 +00:00
stronk7 3f5e294b97 Now the resize script hasn't anymore harcoded widths. 2006-04-23 09:59:04 +00:00
urs_hunkler ffdf8977c9 removed invalid css property 2006-04-23 07:14:45 +00:00
moodler 6c3d3b0a97 DOn't show some notces on new install 2006-04-23 04:45:20 +00:00
stronk7 0a1cf79f5f TOC needs _parent because it's rendered in the iframe. 2006-04-23 02:21:00 +00:00
stronk7 dce3a7cb61 Now double-headers are out 100%
Some incorrect targets are out.
Scorm API (dummy) is working fine.

TODO: Move css styles to standard.
2006-04-23 01:57:02 +00:00
stronk7 282bf4a3f3 Moving script to a proper place (for XHTML validation)
(although the page still continues with some errors)
2006-04-22 22:52:34 +00:00
stronk7 13615e23c6 Avoid some warnings... 2006-04-22 22:51:15 +00:00
skodak 9cae379921 fixed typo, undefined $ents 2006-04-22 17:33:22 +00:00
skodak f393f545d1 typo - fixed undefined $courseid 2006-04-22 17:29:46 +00:00
skodak 117987949a fixed undefined $timenow 2006-04-22 17:28:18 +00:00
skodak 54bb46f55b fixed undefined $course 2006-04-22 17:25:37 +00:00
skodak 6cf4cbbdf9 added FIX ME notice for inclusion of format.php 2006-04-22 17:21:21 +00:00
skodak 463468bc96 fixed typo in ismember() - nasty one!
and some warnings get_directory_size()
2006-04-22 16:45:12 +00:00
skodak 9e092ff827 fixed typo and s() 2006-04-22 16:36:35 +00:00
skodak e77ea6403a fixed missing xxx_param() and broken path 2006-04-22 16:35:32 +00:00
skodak 7ceed560da added FIX ME notice into grade_get_users_by_group(), I did not fix it because I do not know what this function should return 2006-04-22 16:12:58 +00:00
skodak fea68f909e fixed undefined $error in error message 2006-04-22 16:02:49 +00:00
skodak af38593211 fixed auth_user_exists(), now works the same as the one in ldap plugin 2006-04-22 16:01:02 +00:00
skodak de177d8f2d FIX ME notice for $cas_validate that should be IMHO global, but it works anyway 2006-04-22 15:55:20 +00:00
skodak ad497eea7b fixed undefined pg encoding in warning and undefined main teacher lang when no teacher in course 2006-04-22 15:51:00 +00:00
skodak d850b4e621 typo in switch 2006-04-22 13:38:24 +00:00
thepurpleblob 6c554ff60a Spurious database prefixes in front of index names removed. Bug #5282 2006-04-21 13:27:08 +00:00
nfreear 0c012545aa Fix for Bug #5281, "Validation: '&amp;' in course (topics) format, 'Jump to' drop-down". 2006-04-21 13:08:03 +00:00
thepurpleblob bfcbee55fe Noted that xml format can now handle images. 2006-04-21 12:56:51 +00:00
thepurpleblob d08e16b2a5 Moodle xml format can now export and import the actual image files, encoding
in 'base64' format.
2006-04-21 12:35:57 +00:00
toyomoyo 2712ac665c fix for 5205 2006-04-21 07:55:57 +00:00
toyomoyo 7d8b709473 oops 2006-04-21 07:52:30 +00:00
toyomoyo 34d495d1ba fix for bug 5205 2006-04-21 07:47:14 +00:00
moodler c125d80c3e Fixed Bug #5012 - assignment type uploadsingle does not log view actions 2006-04-21 07:01:01 +00:00
gustav_delius 4111194d9e Use delete_question() to delete question, bug 5275 2006-04-21 06:50:51 +00:00
toyomoyo 7218c216b9 another try 2006-04-21 05:43:17 +00:00
moodler e15ef2602d Some performance improvements see bug 5032 2006-04-21 05:39:20 +00:00
toyomoyo 28498a3558 just a line for testing 2006-04-21 05:35:46 +00:00
toyomoyo bee40515da fix for 5216 2006-04-21 05:17:08 +00:00
moodler 7c830e314b Fix Bug #1604 - the error/index.php can't be translate 2006-04-21 04:42:26 +00:00
moodler a0a6424c75 formatting fix :-) Really I'm just testing the CVS mailing script 2006-04-21 04:10:12 +00:00
mjollnir_ 9e3e6be8e7 Only force topic section in front page if ALL options are set to hide, not if we have news 2006-04-21 03:09:58 +00:00
toyomoyo e315e16c68 nothing much here either 2006-04-21 02:47:01 +00:00
toyomoyo 8ae1314c61 nothing much here 2006-04-21 02:37:28 +00:00
moodler 1939c80a54 Bug #5274 - HTML Editor Full Screen, Wrong Image location 2006-04-21 02:26:29 +00:00
moodler 9e0f5d2abf Added save changes button at top (Bug #1043 - submit button at top of journal report) 2006-04-21 02:23:33 +00:00
toyomoyo 2285084197 added a string for no rights to delete a tag 2006-04-21 02:07:38 +00:00
toyomoyo 1d27654a19 fixed an issue where when the user has no personal tags defined, he/she sees an empty line in tags page 2006-04-21 02:07:10 +00:00
moodler a80722bc33 Fix for double escapeshellarg in bug 5258 - Thanks Andy! 2006-04-21 01:51:46 +00:00
gustav_delius 6037288eeb Fixed code that relied on globals hack. Fixed bug 5261 2006-04-20 23:10:45 +00:00
skodak 1f411afd1f lots of typos fixed, graph in stats, parameter cleanup etc., somebody could cleanup the page layout of those report/xxx/mod.php files ;-) 2006-04-20 22:36:22 +00:00
martinlanghoff 78fbaeaeed weblib: validate_email() -- emails with a trailing dot in the local-part (user.@host.com) are invalid 2006-04-20 22:32:00 +00:00
urs_hunkler 1ffd3647bd removed width for multichoice feedback 2006-04-20 19:11:20 +00:00
skodak 3f2d13ff26 fixed typos 2006-04-20 19:07:08 +00:00
moodler fbab16a7e2 Fixed some error strings bug 2618 2006-04-20 14:04:51 +00:00
thepurpleblob d17bee46ce Fixed typo preventing images being displayed. 2006-04-20 12:36:31 +00:00
urs_hunkler 0e2b7205f5 removed width for multichoice feedback 2006-04-20 08:37:00 +00:00
moodler 6663109659 Fix for bug 5223 - might need testing 2006-04-20 08:25:49 +00:00
moodler 08bdcd3974 Added more common mail charsets to choose from bug 5229 2006-04-20 08:21:58 +00:00
moodler 31256b56b3 Sitemailcharset should be empty string 2006-04-20 08:19:36 +00:00
moodler 02c649e69e Make email address denying work a little more rigorously. bug 5250 2006-04-20 08:17:11 +00:00
moodler 20a730762f No need for noapprovalrequired string 2006-04-20 07:55:07 +00:00
toyomoyo 0459675f96 added a simple message to warn moodlers that if they are using contrib modules or blocks with no migration sript, the data will not be converted. 2006-04-20 07:35:36 +00:00
toyomoyo e080039ebe just in case of there's no course 2006-04-20 07:34:06 +00:00
toyomoyo 8de65352a4 there's some changes, to accomodate 5194. More testing is needed on all versions of mysql 2006-04-20 06:57:26 +00:00
wildgirl 4c85af7b01 Added a check for is_object($item) to prevent possible warnings in preview_ims_generate_toc
Restored use of textlib in preview_ims_generate_toc
2006-04-20 06:53:07 +00:00
wildgirl 676fb87edc Added a check for isset($this->resource->reference) to prevent warnings in resource_ims
Added a check for is_object($item) to prevent warnings in ims_generate_toc
Restored use of textlib in ims_generate_toc
2006-04-20 06:51:55 +00:00
toyomoyo 8c9814f9d8 added a feature that automatically adds 2 default blocks for new blog users. (block_menu and block_tags blocks) 2006-04-20 06:35:39 +00:00
moodler ec536d7a48 Make sure the number is stored as a proper number 2006-04-20 04:07:50 +00:00
moodler 59f3b71781 New number field type 2006-04-20 04:02:30 +00:00
moodler 9b940db6d4 New strings for Number field 2006-04-20 03:28:43 +00:00
toyomoyo 56c5918727 fix for 5257 2006-04-20 02:33:04 +00:00
toyomoyo 2f5196e720 fix for 5256 2006-04-20 02:26:23 +00:00
toyomoyo d174882071 fix for 5256 2006-04-20 02:25:09 +00:00
toyomoyo 0b11c2b70f but fix for 5256 2006-04-20 02:20:32 +00:00
toyomoyo 48e79fd146 some clean up 2006-04-20 02:14:17 +00:00
mjollnir_ 60188cee2b assign admins page should respect MAX_USERS_PER_PAGE 2006-04-20 00:19:17 +00:00
martinlanghoff f83edcb114 mod/chat - use empty value instead of erroring out if $USER->lastIP and getremoteaddr() don't yield any interesting value
Sometimes we can't get any useful IP for the user -- and this may even be a
valid situation. So fudge an empty value -- the DB needs it as the IP field
is NOT NULL.
2006-04-19 21:22:36 +00:00
skodak ef45822122 some extra cleaning of comments and feedback before storage. normaly the text is cleaned before display, this is just a preventive measure because I did not want to study this code all day ;-) 2006-04-19 20:21:42 +00:00
skodak 34ffb5cae2 some extra cleaning of comments and feedback before storage. normaly the text is cleaned before display, this is just a preventive measure because I did not want to study this code all day ;-) 2006-04-19 20:10:04 +00:00
skodak d2963541e2 Security related parameter cleanup in workshop code, please test it. No bug fixes... 2006-04-19 19:48:46 +00:00
skodak 7282d18cf0 isguest() must be checked AFTER require_login() because the user may not be logged in yet ;-) 2006-04-19 19:42:47 +00:00
urs_hunkler d133007141 added CSS for multichoice feedback 2006-04-19 17:13:37 +00:00
moodler d3a752872f Fix for bug 5029 from Tim Takemoto 2006-04-19 12:54:34 +00:00
moodler 7b54f5636d Fix group picture in HTML mail when no CSS is used 2006-04-19 12:47:30 +00:00
nfreear a7c385e606 Accessibility: bug 5078, "Update calendar blocks in courses to match the changes in site page". Fix function, calendar_top_controls. 2006-04-19 09:07:30 +00:00
nfreear e642ed1244 Accessibility: bug 5078, "Update calendar blocks in courses to match the changes in site page". 2006-04-19 08:55:20 +00:00
toyomoyo 8bcd295c3d bumping up version, chaing user->firstname, user->lastname, course->shortname to varchar(100) 2006-04-19 08:18:35 +00:00
moodler 09f00e5383 FInally fixed chat layout bug 2006-04-19 07:57:14 +00:00
moodler 733a73f0d3 Added chat formatting 2006-04-19 07:51:39 +00:00
gbateson 30b8cc87e1 fixed bug which prevented display of JCross clues on PHP 5.1.2 2006-04-19 06:20:37 +00:00
vyshane feb00a54d0 Setting $data->listtemplateheader and $data->listtemplatefooter to '' if we
are resetting the listtemplate.
2006-04-19 04:21:23 +00:00
vyshane 8d4a31bd3c Removed javascript for resetting templates. We reload the page to reset
templates.
2006-04-19 02:54:07 +00:00
mjollnir_ fbc525bc0b Correcting code to remove warning originating from earlier commit
Peter Bulmer peterbulmer@catalyst.net.nz
2006-04-19 02:31:32 +00:00
martinlanghoff 930413b133 mod/chat: Normal method - introducing "Stream" updates.
This is an alternative version of jsupdate.php that acts
as a long-running daemon. It will feed/stall/feed JS updates
to the client. From the module configuration select "Stream"
updates.

The client connection is not forever though. Once we reach
CHAT_MAX_CLIENT_UPDATES (currently 1000), it will force
the client to re-fetch it.

This buys us all the benefits that chatd has, minus the setup,
as we are using apache to do the daemon handling.

Chat still defaults to the normal update method, which is now
optimised to take advantage of keepalives -- so this change is
safe. The instructions in the config page also indicate that this
mode may not be well supported everywhere. It hasn't been
tested on IIS for starters.

In terms of relative cost -- if each hit on jsupdate.php incurs
on ~20 db queries and delivers one update to the client, each hit
on jsupdate takes ~20 queries, and then roughly 2~3 queries to
serve each of the next 1000 updates. On busy sites, the difference
is huge.

There is still room for enhancements in both keepalive and stream
update methods. I am pretty sure we can trim DB queries more.
2006-04-19 02:20:48 +00:00
gustav_delius d1873436d2 Fixed small typo in help file, bug 5243 2006-04-18 23:15:11 +00:00
gustav_delius c1f52a2f81 Change of words suggested in bug 5245 2006-04-18 23:00:04 +00:00
gustav_delius a9d80ad800 Fixed small typo in help file. 2006-04-18 22:58:00 +00:00
mjollnir_ eb55a1bfb9 Avoiding warning in last commit:
mod/quiz/index changes to only display quiz grades when teacher allows
Changes to index.php to only allow student to view overall quiz scores when
teacher has not set options forbidding this, and it can't give away what
scores were for attempts where results should still be hidden.
Credit: Peter Bulmer peterbulmer@catalyst.net.nz
2006-04-18 22:57:28 +00:00
mjollnir_ 40377b188b mod/quiz/index changes to only display quiz grades when teacher allows
Changes to index.php to only allow student to view overall quiz scores when
teacher has not set options forbidding this, and it can't give away what
scores were for attempts where results should still be hidden.
Credit: Peter Bulmer peterbulmer@catalyst.net.nz
2006-04-18 22:55:28 +00:00
mjollnir_ d78a1cf6d8 mod/quiz/locallib bugfix get_qn_options now uses more sensible defaults.
Previously get_question_options used options for
after-attempt-while-quiz-open, when called while a attempt was still in
progress.  Changed it to use options for immediately-after-attempt instead.
Credit: Peter Bulmer peterbulmer@catalyst.net.nz
2006-04-18 22:54:51 +00:00
mjollnir_ 309c0d55b2 mod/quiz/view changes to only display attempt grades when teacher allows.
Changed view.php to only display grades when the teacher has not set
options forbidding it.  Further, where there is some attempts that are
allowed to be displayed, and others not, highligting of the highest score,
and printing of the overall grade allocation has been disabled to ensure
the hidden grade is not revealed.
Credit: Peter Bulmer peterbulmer@catalyst.net.nz
2006-04-18 22:54:10 +00:00
gustav_delius f7fccc0362 Make sure category from correct course is shown. 2006-04-18 22:53:38 +00:00
mjollnir_ 15db443c87 mod/quiz/review only display grade summary if student allowed to see scores
Change to review.php so that the student will only see the grade summary
if they are allowed to view their scores - as determined by quiz options
set by the teacher.
Credit: Peter Bulmer peterbulmer@catalyst.net.nz
2006-04-18 22:50:04 +00:00
mjollnir_ 9f7f01db04 mod/quiz/review quiz options loaded once per pageload, not once per qn.
Moved loading of quiz review options from loop iterating over each qn to be
displayed, to the top of the pageload.  Should give efficency gains
on quizes with long pages, as well as making the options available
earlier in the process.
Credit: Peter Bulmer peterbulmer@catalyst.net.nz
2006-04-18 22:47:56 +00:00
martinlanghoff d13ef2fbdc mod/chat - cope with missing $USER->lastIP
$USER->lastIP is sometimes not set properly during login, fetch it if we can
or error out clearly -- we won't be able to login the user to the chat if
we don't have an IP address to match him/her against.
2006-04-18 22:40:56 +00:00
gustav_delius 9977aa0f4a Don't forget the prefix_ for table names 2006-04-18 21:49:14 +00:00
martinlanghoff 04ddd06c1d admin/cron.php - fix typo
Nothing like being pedantic on a tuesday afternoon...
2006-04-18 21:22:04 +00:00
urs_hunkler eedff4f447 IMS CP styling 2006-04-18 19:59:04 +00:00
wildgirl 45f4544f31 Updated IMS CP help file (bug 4628) 2006-04-18 18:17:36 +00:00
wildgirl 2f5d8f3eff Updated IMS CP help file (bug 4628) and added repository help file 2006-04-18 18:15:32 +00:00
wildgirl 06ebc30fb6 Added IMS CP strings 2006-04-18 18:09:11 +00:00
wildgirl 824c9dc7c6 resource.class.php changes:
1. Added logic to process repository paths. A repository path is marked with a # as the first character of the reference field.
2. Added a new error code for repository items not being deployed / bad reference.

ims.html change:
Added a button to link to the repository browser.

New files:
finder.php ? browser for the repository
preview.php ? cut down display routine from resource.class.php, forces sidemenu etc.
repository_deploy.php ? deploy for repository items (same results as deploy.php)
repository_config.php (repository disabled by default)
resize.js - for iframe resizing
dummyapi.js - dummy SCORM API

(Tom's work, with help from Andy)
2006-04-18 18:04:30 +00:00
thepurpleblob 2c49e71073 Paramater cleaning for category name too restrictive for non-ascii
language encodings. Bug #5224
2006-04-18 14:20:02 +00:00
gbateson 1872962d5c corrected handling of tables within JCloze text (a lot of vertical space was being added) 2006-04-18 12:20:18 +00:00
nfreear e80e9f20d4 Clean up code (Bugs 5027, 5161), 'weekscss' course format. 2006-04-18 11:02:21 +00:00
nfreear 498bdc51f2 Fix, Bug 5161 "Course format weekscss looks unfinished". Added ommitted 'hidden' style, background-color. 2006-04-18 11:00:25 +00:00
moodler 0b9e9783a3 Fixed bug #5230 and the hardcoded admin folder 2006-04-18 09:46:35 +00:00
moodler f619f8c8ab FIx for slashes problem in bug 5222 (and some others) 2006-04-18 09:16:22 +00:00
toyomoyo dec0d49c7e typo 2006-04-18 09:08:53 +00:00
toyomoyo 4e93938edb fix for 5204 2006-04-18 09:05:07 +00:00
moodler 5379d24992 A little HTML hint since styles are not working here for me somehow 2006-04-18 07:28:44 +00:00
moodler 44a38081c7 Better style for picture next to chat text 2006-04-18 07:27:11 +00:00
toyomoyo fd8d5ba75f fix for 5207 2006-04-18 07:22:18 +00:00
moodler 78c98892d1 More efficient chat listings (less database calling) 2006-04-18 07:14:21 +00:00
toyomoyo 2b9fd72cc3 fix for 5210 2006-04-18 07:12:39 +00:00
toyomoyo 8f23f49004 fix for 5209 2006-04-18 06:43:29 +00:00
toyomoyo 98ae4e63da block unicode migration bugs 2006-04-18 06:17:30 +00:00
vyshane d553ae9f74 "Reset template" button now only resets the template textarea with the default
template. User needs to hit "Save template" to save the changes.
2006-04-18 06:11:38 +00:00
toyomoyo 5bce15857e added a comment 2006-04-18 03:45:23 +00:00
toyomoyo 025bec3169 the table_column function ate my auto_increments 2006-04-18 03:30:57 +00:00
mjollnir_ ee234b5cac Putting back in the fix for authorize enrol plugin not originally having correct pg version number and table sync with mysql tables and version number 2006-04-18 02:50:46 +00:00
toyomoyo a2d09dee4b bug #5234, so I took out has_config, this block has no config globals right? 2006-04-18 02:37:44 +00:00
toyomoyo f4c85f469a various small changes 2006-04-18 01:59:13 +00:00
toyomoyo 7077ca8399 blog access rights fix, forgot to check in last week 2006-04-18 01:30:00 +00:00
skodak f4598dacd2 fixed bug #5225, fix provided by hachiman 2006-04-17 21:26:05 +00:00
skodak 200514e282 some bugfixing and proper conversion to new xxx_param() functions - SC#148 2006-04-17 21:14:50 +00:00
martinlanghoff a6d1886fa5 mod/chat: Normal method -- collate 2 SELECTs into one
We really don't need to ask about the user table _twice_ here. Just ask for the
right fields, and done.
2006-04-17 21:06:28 +00:00
martinlanghoff 46c859760c mod/chat: Normal method -- faster, lighter DB updates
Use set_field() keyed on PK instead of update_record() or set_field()
keyed on non-PKs.
2006-04-17 21:05:51 +00:00
martinlanghoff c5e817f02c mod/chat - Normal method - users pane only uses keepalive when refreshing fast
To avoid wasting server resources, user's pane now only uses keepalive
when the refresh is lower than apache's timeout.
2006-04-17 21:05:17 +00:00
martinlanghoff 6169ea259a mod/chat - Normal method now supports HTTP Keep-Alive - users pane
User's pane now also uses keepalives -- if the refresh freq is below
the disconnect timeout, then it is a win. Otherwise it wastes memory
at the server end.
2006-04-17 21:04:47 +00:00
martinlanghoff dfd1d9e272 mod/chat - Normal method now support HTTP Keep-Alive
By using output buffering, we now support HTTP Keep-Alive, which means
that each client gets tightly bound to a single apache child - this means
that we get

 + lower resource usage on the webserver
 + _much_ lower resource usage on webserver and dbserver if pconnects are used
 + a good case for further caching (memcache/mmcache)

Using ab via localhost or fast LAN using keepalives is actually slower from the
client perspective -- still lighter on the server. Via slower links (DSL/modem)
the responses are faster.
2006-04-17 21:04:19 +00:00
martinlanghoff 4d5525c650 mod/chat: make http-chat more database friendly and change msg insertion to use POST
+ we are now more conservative in the fields it asks from the db
+ also more conservative with upates to chat_users
+ messages are now added via POST requests instead of GET
2006-04-17 21:03:44 +00:00
skodak 960855b9a1 fixed double header warning in redirect() 2006-04-17 20:40:33 +00:00
gustav_delius 54b3626b9f Moved all question deletion code to showbank.php. Fixed bug 5186 2006-04-17 05:31:21 +00:00
moodler 402e1a9643 Tidied up the upgrade dialog 2006-04-16 16:56:09 +00:00
moodler d87a9d7338 Fixed the upgrade_plugins function so that it automatically
handles the .sql file for first installation (just like activities)
2006-04-16 16:50:55 +00:00
moodler 0236ec73be Don't show tabs when creating admin user 2006-04-16 16:49:28 +00:00
moodler 9e458bb388 Moodle Docs link on home page could be a bit confusing 2006-04-16 16:21:50 +00:00
moodler 9bb4d21fa5 No agreement to license sends you to docs.moodle.org 2006-04-16 16:09:12 +00:00
moodler 16ad40e145 Fix for chat character sets bug 5010 2006-04-16 16:01:40 +00:00
moodler bd507453f7 The install script should always be Unicode. 2006-04-16 15:58:24 +00:00
moodler f666830caf Removed blank line 2006-04-16 15:56:36 +00:00
gbateson 23efbfa15e improved readability of reg. exp. in adjust_media_urls function 2006-04-16 02:10:14 +00:00
stronk7 ff62d70dc6 Two more uses of format_string() agains entry->concept 2006-04-15 19:28:26 +00:00
stronk7 deb59b8f95 Filter one more string if filterall is enabled. 2006-04-15 19:24:44 +00:00
stronk7 a7117f3ac1 Added one missing string 2006-04-15 19:21:36 +00:00
stronk7 717f14b627 strstr(string haystack,string needle). We were doing the opossite. Bug 5037.
(http://moodle.org/bugs/bug.php?op=show&bugid=5037)
2006-04-15 17:30:23 +00:00
gbateson 0e6e81a4a8 fix "Force Plugins" behavior to correctly detect media players in JavaScript 2006-04-15 08:17:30 +00:00
moodler 9e08cf6ed1 DOn't show intro on first page of single view 2006-04-15 06:02:21 +00:00
moodler 3f9672d37c FIxes for bug 5197 2006-04-15 02:41:27 +00:00
skodak 354d3295d4 removed outdated xxx_param() functions 2006-04-14 15:57:59 +00:00
moodler b1e64385dc During installation, if the database isn't UTF and it is empty,
then try and set it to UTF automatically.

I did MySQL only, can someone tackle this for PostgreSQL?
2006-04-14 11:57:11 +00:00
julmis b5a5d9f668 Another fix for creating links. 2006-04-14 09:57:41 +00:00
skodak f8a5159a2b changes needed for new s() and p() - see bug #2338 2006-04-14 08:02:32 +00:00
gbateson 498695122a modified instructions for uploading to "lang" directory, to reflect the fact that the default Moodle 1.6 location for the "lang" directory is now within $CFG->dataroot 2006-04-14 07:34:59 +00:00
moodler 99d1acbcef Default blog level is site level 2006-04-14 06:39:14 +00:00
moodler 37fa421efc FIx license display 2006-04-14 06:38:52 +00:00
moodler b6d31b4696 FIxed an alt string 2006-04-14 04:58:09 +00:00
moodler 2ebc8a57bd RSS feed based on modified date, not created date 2006-04-14 04:53:45 +00:00
mjollnir_ 86e75a7b77 Disable gui for forum timed posts since we are not quite ready for it. All code is still there but hidden & controlled by a config var forum_enabletimedposts. 2006-04-14 04:51:43 +00:00
moodler 3d28412786 After discussion with Penny I think it's best to not include the forum
timed posts in 1.6 for now.   It still needs some work and we are
running out of time.
2006-04-14 04:47:43 +00:00
gustav_delius 05803bf170 Removed settings tab, see bug 5189 2006-04-13 21:35:24 +00:00
skodak e8d1c9ed2b stripslashes_safe() improvement - now works also for arrays and objects see bug #2338 2006-04-13 21:27:01 +00:00
gustav_delius bd9964841d Fixed bug 5187 that led to error when creating cloze question 2006-04-13 21:23:15 +00:00
nfreear f2d660dcb2 Major fix for Bug 5027, "Three-col layout breaks when window is narrow" (also, Bug 5161). 'weekscss' course format. 2006-04-13 16:07:12 +00:00
nfreear c87b4c8765 Clean up code (Bugs 5027, 5161), 'weekscss' course format. 2006-04-13 14:37:32 +00:00
nfreear 1528decaae Major fix for Bug 5027, "Three-col layout breaks when window is narrow" (also, Bug 5161). 'weekscss' course format. 2006-04-13 14:28:36 +00:00
thepurpleblob 2df8ab6146 A few changes to improve readability/correctness. 2006-04-13 12:20:39 +00:00
thepurpleblob 8c65c93e50 New string - importfromthisfile 2006-04-13 12:11:12 +00:00
thepurpleblob 296cb5b57b More logical wording on button to import from local file 2006-04-13 12:10:28 +00:00
moodler 8ad644551d Merged fixes from stable 2006-04-13 12:05:37 +00:00
moodler f852d652cf FIx for bug 5188 - seach with no results -> dead end 2006-04-13 10:41:12 +00:00
thepurpleblob 2784b98278 Don't compare floats for equality! Bug #5176 2006-04-13 10:29:20 +00:00
nfreear 64fdc686d8 (Bug tracker 4997) Clean up code comments. 2006-04-13 09:44:33 +00:00
moodler 1925b16db8 Don't prefill username in shibboleth bug 5184 2006-04-13 09:00:05 +00:00
moodler d95f4c3fef SOme help file polishing 2006-04-13 08:55:34 +00:00
moodler 499ed21564 FIxed a typo 2006-04-13 08:49:31 +00:00
vyshane 33e727b7a4 Bug #5163 - user/action_redir.php should print properly formatted error
messages
2006-04-13 08:48:51 +00:00
vyshane 78dd16f5bd Added unknownuseraction string 2006-04-13 08:48:14 +00:00
thepurpleblob 25ee4157c8 missing courseid parameter in "grades not not add up to 100%" check. 2006-04-13 08:45:11 +00:00
moodler 99cc88d159 Added a new string idnumber course to allow more customisation bug 4337 2006-04-13 08:44:20 +00:00
moodler 44abf704cc Improved blog strings 2006-04-13 06:41:49 +00:00
moodler 9cabc6e4af Fixed tag names in blog 2006-04-13 05:55:03 +00:00
moodler 0b2d7e7eca New style for draft blog posts 2006-04-13 05:54:44 +00:00
moodler 9ea589879b Style for the errorcode link in errors 2006-04-13 05:46:24 +00:00
moodler 87fa2e3f8a Fixes to make print_error more useful, suggested by Sam
It can now take a module argument, and can support different link locations
2006-04-13 05:42:47 +00:00
vyshane 998cc5b645 Added default values for not nulls. 2006-04-13 03:19:00 +00:00
vyshane d3fa8cfb9d Added default values for not nulls 2006-04-13 03:16:41 +00:00
vyshane 5e3572ff0b Added default values for not nulls. 2006-04-13 03:11:32 +00:00
vyshane ab6d44896a Added default value for not null. 2006-04-13 02:55:27 +00:00
toyomoyo ba63b0ad7e warning for guest when viewing blogs 2006-04-13 02:48:14 +00:00
moodler de89899b1d Was trying Eloy's suggestion here http://moodle.org/mod/forum/discuss.php?d=43041
but wasn't working for some reason ... checking in as commented to work on later.
The lkudge seems to be working pretty well for now.
2006-04-13 01:34:26 +00:00
toyomoyo 3e8398408f fix for #5173 2006-04-13 01:32:10 +00:00
gustav_delius da1cc5a44e Fixed problem with slashes, bug 5177 2006-04-13 00:37:14 +00:00
gustav_delius d6d29245e7 Now there is an option to see all attempts, even for users who have since unenrolled. That is necessary in order to be able to delete these attempts, see http://moodle.org/mod/forum/discuss.php?d=34421 2006-04-13 00:02:36 +00:00
gustav_delius ffa6ed53e4 Fixed display of information about existing attempts. 2006-04-12 23:24:58 +00:00
gustav_delius 375ab4586f use function from questionlib.php to delete attempt data 2006-04-12 22:57:01 +00:00
gustav_delius 78517b5a6b Don't show users who have unenrolled.
Show display options also when current options lead to empty table.
2006-04-12 22:48:58 +00:00
stronk7 b0a8b898f9 Difference between copy, the verb and copy, the noun, because they
are different in a lot of languages. Bug 5172.
(http://moodle.org/bugs/bug.php?op=show&bugid=5172)
2006-04-12 21:53:45 +00:00
danmarsden 22d56e8015 need to check vars aren't empty b4 using them! - another one! 2006-04-12 21:15:10 +00:00
skodak 2475a6c26d minor coding style fixes 2006-04-12 21:02:03 +00:00
urs_hunkler 8c5b0637ce added the CSS for the bullets for lists within activities for the start pages and the course page. made teh CSS more specific than David proposed it. 2006-04-12 20:27:30 +00:00
urs_hunkler e062995380 copied list handling CSS from cssweek format section to general course section and added handling for section lists on the index page 2006-04-12 19:56:42 +00:00
stronk7 d4a42ff494 New optional parameter to s() and p() allowing to specify
if we want to strip slashes (data coming from forms) or no
(data coming from DB, the default). Bug 2338.
(http://moodle.org/bugs/bug.php?op=show&bugid=2338)
2006-04-12 17:39:23 +00:00
skodak f2a365b976 general cleanup of xxx_parameter() functions 2006-04-12 16:59:51 +00:00
skodak eb59ac2777 PARAM_BOOL now accepts "yes/no" too 2006-04-12 16:55:47 +00:00
skodak a8ff614fb8 general cleanup of xxx_parameter() functions; fixed broken requesting of courses 2006-04-12 16:41:10 +00:00
skodak f27d105cc6 final fix for category and courses edit button 2006-04-12 16:28:11 +00:00
exe-cutor f26baa3e2b Fixed the case where a user would manually log in with an unknown username 2006-04-12 14:54:01 +00:00
nfreear 32346db21f 2006-04-12 13:22:19 +00:00
nfreear d242c402d7 Initial fix, Bug 5161 "Course format weekscss looks unfinished". Includes making CSS-selectors #course-view .section .side more specific (td.side). 2006-04-12 11:14:03 +00:00
nfreear cbc18ef9dc Initial fix, Bug 5161 "Course format weekscss looks unfinished". Includes making CSS-selectors #course-view .section .side more specific (td.side). 2006-04-12 10:54:48 +00:00
moodler dd899b917d Fixed up print_error according to original plan
see also http://moodle.org/mod/forum/discuss.php?d=43712
2006-04-12 09:32:19 +00:00
nfreear a99404f074 Accessibility: fix to .headerskip, new class .debugwarn. 2006-04-12 09:14:46 +00:00
ethem 4d3b0ddc0a lib.php renamed to locallib.php 2006-04-12 09:13:20 +00:00
vyshane 4b10570aef Added default value for enum that has been defined as not null. 2006-04-12 09:01:07 +00:00
toyomoyo 6524adcffd some more small fixes 2006-04-12 08:58:49 +00:00
moodler fbec0acb3e Strip tags from final RSS feed name 2006-04-12 08:58:20 +00:00
moodler 22060485bf FIx notices and logic when deleting files and checking resources. bug 5156 2006-04-12 08:53:24 +00:00
vyshane 63b816ab56 Added default values for not null columns in table creation sql 2006-04-12 08:44:59 +00:00
moodler 93528ae1f6 Restored topic numbers to topic format. Who deleted them?????! 2006-04-12 08:06:37 +00:00
moodler 5509b4cdc0 Fixes to make the courses look nice again after the accessibility
style changes seemed to have destroyed things a bit
2006-04-12 07:57:03 +00:00
moodler dc3a69ecb3 The "hide" icon was hidden on the weekly format due to a new
style added called "hide".
2006-04-12 07:37:36 +00:00
skodak 4aa2077b02 general cleanup of xxx_parameter() functions - fixed typo 2006-04-12 07:25:46 +00:00
skodak 6bf7fe6cf0 general cleanup of xxx_parameter() functions 2006-04-12 07:25:09 +00:00
vyshane 22b266cac7 Bug #4879 - small fix for maxbytes help blurb 2006-04-12 07:09:56 +00:00
moodler d76be18f76 Fixed some tidy warnings. 2006-04-12 06:56:01 +00:00
bobopinna 008bfd2795 Added utf8 conversion 2006-04-12 06:15:29 +00:00
bobopinna 9ff41f7ed0 Fixed navigation bar links for SCORM course format 2006-04-12 06:13:29 +00:00
bobopinna df88f4ea9d Fixed navigation bar link for SCORM course format 2006-04-12 06:12:16 +00:00
bobopinna 82c3173ea5 Fixed a typo 2006-04-12 06:08:48 +00:00
bobopinna d74b87919f Fixed empty tags check 2006-04-12 06:05:25 +00:00
bobopinna 586de5a08a Fixed default stage size 2006-04-12 06:04:15 +00:00
toyomoyo bd70af134d fixing rsslib, and added code to check if rss not enabled, blog rss button will not be printed 2006-04-12 06:04:06 +00:00
bobopinna 5046492815 Added multi attempt support 2006-04-12 06:03:46 +00:00
bobopinna a91433f9ec Added debug messages 2006-04-12 06:02:08 +00:00
toyomoyo b744c0c3ec took out a print header that was generating a warning 2006-04-12 04:14:45 +00:00
toyomoyo 26f8fcd0f4 took out blog_isLogged_In function 2006-04-12 04:10:24 +00:00
toyomoyo a1856aff0b html issues 2006-04-12 04:03:57 +00:00
vyshane 02f66c4202 Fixed Bug #5021 - Unhiding an entire Module unhides all it's child resources,
even in hidden sections.
2006-04-12 03:11:34 +00:00
toyomoyo 9ffcd15f3a various small things 2006-04-12 03:02:53 +00:00
toyomoyo 25881d1e2c fixed a bug where non admins can't add blocks to own blog page 2006-04-12 02:27:14 +00:00
toyomoyo 752d035b41 removing some classes 2006-04-12 02:06:57 +00:00
toyomoyo c2ee4e8788 various changes and cleaning, removing BlogEntry, BlogInfo, BlogFilter class next, things could be broken 2006-04-12 02:05:46 +00:00
moodler 106da8c6e0 Explicit link to home page 2006-04-12 01:32:15 +00:00
stronk7 766ad62808 Solve some notices that were breaking Excel generation under
some PHP versions. As bug is well documented but PEAR code hasn't
been changed in origin, we'll patch it here. Changes will
merge smoothly in the future, I think.
(Moode Bug: http://moodle.org/bugs/bug.php?op=show&bugid=4763)
(PEAR Bug: http://pear.php.net/bugs/bug.php?id=6509)
2006-04-11 22:49:09 +00:00
gustav_delius 89a6e4358a Fixed parameter type for $confirm 2006-04-11 22:22:31 +00:00
gustav_delius 2e8973e779 Teachers now can preview timelimited quizzes even after the closing date 2006-04-11 21:49:43 +00:00
skodak 0cdae0dcaa general cleanup of xxx_parameter() functions + fixed several register globals problems 2006-04-11 21:41:21 +00:00
gustav_delius 44582764af Fixed recoding of parent field for random questions 2006-04-11 21:40:28 +00:00
gustav_delius ab620fbf2b Added call to optional_param() 2006-04-11 20:42:31 +00:00
skodak 9d6a11f8ff general cleanup of xxx_parameter() functions + fixed logic of edit button - now interconnected with category.php 2006-04-11 20:39:30 +00:00
skodak ea8faba9dc general cleanup of xxx_parameter() functions + other minor fixes 2006-04-11 20:24:52 +00:00
skodak 2451dcc3aa added proper parameter type in confirm_sesskey() 2006-04-11 20:07:57 +00:00
stronk7 1b1858d260 htmlentities() to s() 2006-04-11 16:09:52 +00:00
stronk7 3725cc8a58 htmlentities() to s() 2006-04-11 15:42:08 +00:00
stronk7 23407fb76b htmlentities() to s() 2006-04-11 15:34:29 +00:00
bobopinna 5fe1f8afb4 Added support to multi attempts 2006-04-11 13:51:10 +00:00
moodler 648539c55b Fixed missig string for blog config 2006-04-11 13:16:23 +00:00
moodler bc739a0104 Don't save empty comments 2006-04-11 13:10:30 +00:00
moodler b4c3ed39d7 New string for empty comments 2006-04-11 13:10:15 +00:00
moodler edaa546ad5 Don't clean final HTML template output, the input should be sanitised. 2006-04-11 13:00:13 +00:00
ethem 9b47e0018e Make function names as library name. 2006-04-11 12:37:41 +00:00
ethem c9ca150d82 Make function names as library name. 2006-04-11 12:37:41 +00:00
moodler 702424ae72 Fix language strings (records -> Entries) 2006-04-11 12:37:29 +00:00
moodler a05a5e5d61 Consistently use Entries instead of Records 2006-04-11 12:36:12 +00:00
moodler 7ebb0d488f Guests should not see comment boxes 2006-04-11 12:32:23 +00:00
moodler 198c27b376 Submit button was causing bug 4986 2006-04-11 12:29:19 +00:00
vyshane 7477f2505b Fix for Bug #5021 - Unhiding an entire Module unhides all it's child
resources, even in hidden sections
2006-04-11 08:30:10 +00:00
stronk7 8e6184dc8e Strip the "_utf8" suffix in one more place. Thanks Mina!
(http://moodle.org/bugs/bug.php?op=show&bugid=4924)
2006-04-11 07:55:26 +00:00
moodler df71bfb49c MOved/cleaned fixpix.php to pix/redirect.php 2006-04-11 07:53:59 +00:00
moodler c204f5fea1 Made the empty recordset array cache global, so that various functions can
manipulate it.    See bug 5077.
2006-04-11 07:43:05 +00:00
gustav_delius 424dba12cf Fixed typo preventing the editing of multianswer questions. 2006-04-11 07:16:10 +00:00
moodler 12ef2c40d9 Added a new field to cache "old" course_module visibility when
the whole module is disabled (see bug 5021)
2006-04-11 07:04:55 +00:00
mjollnir_ 03c9562b40 Moving attachments attached to forum posts when moving threads between forums was broken when dataroot is over an nfs mount (important for clustering!)... this fixes it but please can somebody test this on windows 2006-04-11 05:19:56 +00:00
mark-nielsen 804d664acf [BugFix] Bug #5072: user name now links to user profile, Attempts column changed to Completed On, new column with link Grade to grade all attempts. Other table changes include collapsible columns and its id has been changed to attempts to reuse styles for the attempts table. 2006-04-11 02:20:58 +00:00
mark-nielsen 6e63c77795 [Fix] question_process_comment now processes the correct form values
[Fix] changed the print_string to get_string so it may be passed to notify
[Change] The close window button is now centered
[Change] Refreshes the parent window when the close window button is pushed
2006-04-11 02:02:44 +00:00
stronk7 1a8bdfc430 Strip the "_utf8" suffix from language names in list of languages.
Special info showed for non-utf8 English.
(http://moodle.org/bugs/bug.php?op=show&bugid=4924)
2006-04-10 23:07:37 +00:00
stronk7 6346748fec Strip the "_utf8" suffix from language names in list of languages.
(http://moodle.org/bugs/bug.php?op=show&bugid=4924)
2006-04-10 22:53:53 +00:00
wildgirl 750c694604 Config menu for extra options added. Javascript added to force some sensible options. (Tom's work) 2006-04-10 22:31:30 +00:00
wildgirl 2cc0d2a8ff 1. Converted display function from frames to divs and an iframe to hold the content.
2. Added an (optional) side navigation bar.
3. Added several options to add more flexibility. Option to fast-forward submenus.
(Tom's work)
2006-04-10 22:30:22 +00:00
stronk7 5a606b3944 Prevent edition of langconfig.php from Moodle editor. Part of 4924.
(http://moodle.org/bugs/bug.php?op=show&bugid=4924)
2006-04-10 22:15:57 +00:00
gustav_delius cbe20043b5 Whenever a question is edited the version field is set to question_hash(), see bug 2958. 2006-04-10 22:10:32 +00:00
gustav_delius 9d4cbe5615 Manual grading report plugin is now no longer essay-specific. 2006-04-10 20:28:46 +00:00
gustav_delius 097bd3f5e8 No longer print the comment boxes for each question in review because it was too slow. We are back to opening the comment box in a popup window. 2006-04-10 19:58:34 +00:00
gustav_delius 34b40897db Added action 'continue attempt' to log_display 2006-04-10 19:13:21 +00:00
stronk7 8d4ba8f0a5 Inform to the restore process that we are arriving from the form page. 2006-04-10 19:03:31 +00:00
stronk7 c3cb69e5f4 Now restore checks that we are coming from the form page to delete any
previously stored $SESSION->restore data.

Also, the "restore to existing" feature is working again. It was broken
because of the pseudo-register-globals hack. Now course_id is retrieved
with the standar param() methods.

Bug 5145 was the original cause for investingating this.
(http://moodle.org/bugs/bug.php?op=show&bugid=5145)
2006-04-10 19:02:39 +00:00
mits efef8f690d made gradient.jpg control more simple. 2006-04-10 18:37:49 +00:00
stronk7 6917949483 Deleting $SESSION structures before starting manual restore. 2006-04-10 18:34:37 +00:00
stronk7 8847a82e25 Deleting $SESSION structures before starting import. 2006-04-10 18:13:18 +00:00
urs_hunkler eb628ba2f8 resizable icons 2006-04-10 17:48:46 +00:00
urs_hunkler 5990290185 ~chameleon.php contains all code neccessary to add the Chameleon engine to any theme. 2006-04-10 17:40:28 +00:00
urs_hunkler 186142b0c5 config.php header.html styles_layout.css user_styles.css:
_ changes in to make Chameloen work as a sessiontheme
_ changes to make it easier to implement the Chameleon engine into existing themes
2006-04-10 17:38:23 +00:00
moodler de251840b4 Added some feedback to the picture thumbnail regneneration bug 5011 2006-04-10 16:46:52 +00:00
stronk7 82ad36a7e9 Deleted wrong ca_utf8_old imported file! :-(
(my fault due to a local process)
2006-04-10 16:40:14 +00:00
moodler f0cb18e627 Fix for bug 5144 (nickname field) 2006-04-10 16:12:53 +00:00
moodler e575c0597d Added a notify in debugging mode for a double print_header() 2006-04-10 16:00:34 +00:00
moodler 886cb1e596 Some of the accessibility changes broke some shading 2006-04-10 15:49:28 +00:00
moodler 255d103389 Replace the add course button that somehow disappeared from 1.5 2006-04-10 15:41:57 +00:00
moodler f870b674a1 Take the course listing out of the default site page
because the default setting on site.php is to have it
in the middle of the page.
2006-04-10 15:38:34 +00:00
moodler a7460097db Just some cosmetic code 2006-04-10 15:00:39 +00:00
moodler 32613b509f Added a little static variable to print_header to prevent it being called twice 2006-04-10 14:40:39 +00:00
sam_marshall bb2848749a Changing to use require_param meant that restore session was not cleared, causing a 2nd restore in succession of same backup to fail. One-line tweak fixes it - I think (I think it's ok but filed as bug 5145 so the appropriate person can check if I messed up) 2006-04-10 11:49:48 +00:00
sam_marshall 96463e677e Another Postgres install fix (this time it was using mdl_ instead of prefix_) 2006-04-10 09:55:31 +00:00
sam_marshall 3a2c772f4e Fixed syntax error (extra comma) in Postgres version of quiz sql 2006-04-10 09:48:47 +00:00
vyshane 3f763c86cf Fixed Bug #5057 - hidden teachers aren't completely hidden 2006-04-10 08:49:15 +00:00
moodler b525bd2009 Better fix for bug 5082. Noticeboxes are now:
#notice.generalbox
2006-04-10 08:32:27 +00:00
moodler 21e2acab15 Added generalbox to noticebox on notices - bug 5082 2006-04-10 08:27:53 +00:00
moodler 315e4e83f9 Fixed XHTML notices with &amp; 2006-04-10 08:10:13 +00:00
moodler e56122e9fd FIxed "sesskey" error in bug 5139 2006-04-10 07:49:55 +00:00
toyomoyo 0dc2e2aefc changed param_alpha to param_notags, otherwise can not support tags in non-lation 2006-04-10 07:29:47 +00:00
toyomoyo eccfc1cac0 small fix and cleaning 2006-04-10 07:27:03 +00:00
moodler 71470b3bf1 Convert the text cache to use a blob, so that there are no character set
issues:   see bug 5136
2006-04-10 07:17:26 +00:00
toyomoyo 19407a4274 agreelicence was not set 2006-04-10 06:35:10 +00:00
toyomoyo 89be4ee2ac bumping up version to change int(11) to int(10) 2006-04-10 06:26:59 +00:00
toyomoyo dffaf68202 changed some int(11) to int(10) 2006-04-10 06:26:07 +00:00
toyomoyo 16ae46f6c5 migration for blogs and tags 2006-04-10 06:08:13 +00:00
vyshane 56253c2d66 Fixing bug (Postgres related):
ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list
2006-04-10 05:59:48 +00:00
toyomoyo a35af29014 question->qtype 2006-04-10 05:08:19 +00:00
toyomoyo 25dbd2ff64 convertion to unicode data_content -> content(1 to 4) 2006-04-10 05:03:38 +00:00
vyshane 0bcf4732fa Fixed Bug #5071 - The script uploaduser.php ignores the rest of records after
the first one
2006-04-10 04:54:34 +00:00
moodler 30c9e6947d Reverting changes to print_simple_box for now until the new div can be
rolled out without problems.  See bug 4943
2006-04-10 01:39:38 +00:00
stronk7 ea07c59442 Add one space in the list of langs used to allow the text to flush. 2006-04-09 23:37:14 +00:00
stronk7 96b74b0ac4 Initial revision 2006-04-09 23:36:53 +00:00
gustav_delius 848d886edb Small change to question_print_comment_box() to allow multiple boxes on one page 2006-04-09 22:48:58 +00:00
gustav_delius cf156ab045 Taking out random question hack that is no longer needed. 2006-04-09 22:43:22 +00:00
gustav_delius 7ff90101a6 Simplify text on submit button 2006-04-09 22:31:59 +00:00
gustav_delius 955567ad2f Make sure all random questions have their parent field correctly set, just in case something went wrong here in the past. This may have been the cause of bug 5137 2006-04-09 21:59:55 +00:00
gustav_delius 7a0b035bf9 Make student name into a link on the review page 2006-04-09 21:58:58 +00:00
stronk7 c05a30bc19 Preventig bug affecting sites with modified wwwroot and
custom admin dir. Bug 5031.
(http://moodle.org/bugs/bug.php?op=show&bugid=5031)
2006-04-09 21:39:49 +00:00
gustav_delius 1d7e093418 Small fix so that unattempted questions would never be marked 2006-04-09 21:35:44 +00:00
skodak a37b4c5b10 fixed double prefix bug 2006-04-09 21:25:30 +00:00
stronk7 c356bb409d Suppress pivot output from Date view. It hasn't too much sense there. 2006-04-09 11:06:19 +00:00
stronk7 30691fc3c3 Solve some upperpivot notices and wrong behaviours. More coming... 2006-04-09 10:59:39 +00:00
urs_hunkler 7b1f6431a3 removed !important from border definition of the sideblock calender to be able to style it in the theme 2006-04-09 10:49:14 +00:00
stronk7 f7f735b877 Some defaults applied to paramenters was preventing defaults based
on formats to work properly.
2006-04-09 10:45:14 +00:00
stronk7 2cf1011b25 Now searchbox table is closed by hand, because print_simple_box_xxx()
methods (div based) were breaking things a bit here. Bug 5087)
(http://moodle.org/bugs/bug.php?op=show&bugid=5087)
2006-04-09 09:11:18 +00:00
moodler 34b9ce2572 Removing unnecessary boxes 2006-04-09 07:50:19 +00:00
moodler 8d1727ec2c Some missing blog strings 2006-04-09 07:47:55 +00:00
moodler f517208d9e Add a navmenu to the loginas page 2006-04-09 07:25:57 +00:00
moodler 7ea8ea7faa Added some missing optional_params (bug 5125) Thanks Scott Elliott for the fix 2006-04-09 02:06:26 +00:00
mark-nielsen a472184c7b Updated questiontype.php to make essay compatible with manual grading (aka removed a lot of code).
Adding display.html as a display html template for the essay question type

TODO: drop the question_essay_states table and migrate comments to question_sessions
2006-04-08 21:51:29 +00:00
mark-nielsen dbb3c4c6ea Added $prefix to form fields so that this code could be used with manual grading 2006-04-08 21:48:31 +00:00
mark-nielsen caca24d5d3 Minor updates:
comments no longer print inside the question (only in the textfield)
  fixed problem with quotes by adding addslashes
2006-04-08 21:46:59 +00:00
mark-nielsen e99b375972 Updated the form handling code. This report is now functional again. 2006-04-08 20:55:03 +00:00
mits 27d18ac626 modified based onf standard theme. 2006-04-08 20:51:38 +00:00
mark-nielsen fbe4d5ce51 Updated viewquestion to be more generic and moved it to its own function 2006-04-08 18:56:39 +00:00
mark-nielsen 0a52521122 Updated the viewquestions action to be more generic so that any manually graded question type would be compatible.
Moved viewquestions code to function view_questions.  This is an attempt to make the code much more readable.  All action code will eventually be moved to its own function.
2006-04-08 18:24:49 +00:00
urs_hunkler 53fa54d9e0 removed the empty span from header.html and added the clearfix class to the navbar and to the header divs. this repairs Bug #5051 2006-04-08 17:12:05 +00:00
moodler 3dec563cec Fix for bug 5132, search now no longer prevents display of
arbitrary single records
2006-04-08 16:33:16 +00:00
moodler 82d1796197 Just to avoid browsing of block directory 2006-04-08 16:05:38 +00:00
urs_hunkler 9c5cec188f corrected font-style: none to normal 2006-04-08 15:53:28 +00:00
urs_hunkler 5b2f6e51f9 copied back the CSS for the timer positioning from version 1.12 2006-04-08 15:06:36 +00:00
gustav_delius 7c404f9b2b Fixed some small xhtml problems and removed a warning 2006-04-08 14:20:52 +00:00
urs_hunkler 2d91754b33 copied back the CSS for Item analysis and for grading 2006-04-08 12:25:06 +00:00
mark-nielsen 6e49714287 Changed the Make comment or override grade link display the comment field and grade field in review.php instead of popup 2006-04-08 10:29:25 +00:00
gustav_delius 2a2aba273f submit button for teacher comment is now included in question_print_comment_box 2006-04-08 08:22:18 +00:00
mark-nielsen 42b245d1ca Moved the submit button to question_print_comment_box in lib/questionlib.php 2006-04-08 08:16:04 +00:00
gustav_delius ec65c6ad7c This has extra code to exclude preview attempts from the grading 2006-04-08 08:13:26 +00:00
stronk7 6ed15ea50a Now get_config() is executed after "set names", so textual data retrieved
from the config table has the proper encoding. Bug 5043.
(http://moodle.org/bugs/bug.php?op=show&bugid=5043)
2006-04-07 23:57:38 +00:00
stronk7 820743c5b1 Moving $CFG->ostype and $CFG->os setting, because
report_session_error() was being executed before setting
such variables and moodle_setlocale() need them.
(http://moodle.org/mod/forum/discuss.php?d=43466)
2006-04-07 22:58:07 +00:00
urs_hunkler 4875732b9e Introduced a new class=mdl-align with the CSS text-align: center as a base to replace the DEPRECATED center tags in Moodle 2006-04-07 16:21:27 +00:00
urs_hunkler d975f343ba replaced DEPRECATED center tag with a div. introduced a new class=mdl-align with the CSS text-align: center 2006-04-07 16:17:17 +00:00
gustav_delius b6e907a245 Manual grading 2006-04-07 16:00:29 +00:00
moodler 08777eaf25 Set the last modified time of the style sheet to the current time 2006-04-07 15:07:52 +00:00
moodler 6bf277d7c5 Fixing a typo: http://moodle.org/mod/forum/discuss.php?d=41814#199162 2006-04-07 15:03:51 +00:00
moodler ff1dc0465b Merged fixes for forum_user_can_view_post from stable 2006-04-07 14:54:52 +00:00
ethem 362bdbf790 static $timediff30. Call once only. 2006-04-07 11:23:10 +00:00
nfreear a2e2bf643a Fix MB 5099, "Make CSS requests expire in IE", fix 'max-age=' as per http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html, override $lastmodified parameter (OU-Bugz: 851) 2006-04-07 10:18:03 +00:00
urs_hunkler 78a71c31f8 changed the CSS to add backward compatinility for headers using tables.related to #bug4913 2006-04-07 08:46:11 +00:00
gustav_delius 03c541cb9a class clearfix is the medicine against collapsing divs, see bug 5119 2006-04-07 07:55:48 +00:00
ethem 09bf9535de print_simple_box_start with width 2006-04-07 07:34:32 +00:00
moodler 98f92a5491 FIxed a string 2006-04-07 07:03:03 +00:00
moodler 63701c7802 FIxed activity reporting for database activities 2006-04-07 07:02:53 +00:00
gustav_delius 5f4f608811 Replaced layout table around question by div. Doesn't display right in firefox yet. 2006-04-07 06:08:55 +00:00
gustav_delius 934eea9e43 Introduce field for teacher comments, in preparation for manual grading. I am afraid I forgot to commit this yesterday, so now it is possible that some new beta testers installed Moodle without this new field. 2006-04-07 05:28:18 +00:00
mark-nielsen 31f6b26d4f [BugFix] Action was using global variables - now is fetched with optional_param 2006-04-06 23:03:08 +00:00
mits 8fbfacd946 To show navbar background-image on admin page correctly added "width:100%;". 2006-04-06 21:19:44 +00:00
danmarsden 6c5a77bbb7 couple of bugs when no data returned. 2006-04-06 20:42:35 +00:00
gustav_delius 6463e8a6b6 Fixing a large number of tidy warnings 2006-04-06 20:35:49 +00:00
gustav_delius 755bddf118 Improvements to response history. Three small bug fixes. 2006-04-06 19:59:02 +00:00
nfreear 408b65dd44 Fix 2, bug 4943: "print_simple_box behaviour changed". Centred is now default alignment; for centred no-width specified, width=30em. 2006-04-06 17:21:04 +00:00
moodler 0143db5788 More clean ups 2006-04-06 17:12:55 +00:00
gustav_delius 80bbc7d7d1 Some code cleanup, relying more on the functions from questionlib.php. Not currently functional, awaiting the central manual grading feature. 2006-04-06 16:45:14 +00:00
gustav_delius 01bd54e0cb Jean-Michel's fix to the get_actual_responses() method 2006-04-06 16:43:41 +00:00
gustav_delius 3a5a6f59a3 Introduce field for teacher comments, in preparation for manual grading 2006-04-06 16:42:00 +00:00
moodler b4f3e56cc1 Fixes from Dan Stowell to support thumbnail images, with some modifications
from me to remove unnecessary messages.    bug 5011
2006-04-06 16:20:50 +00:00
moodler d9d282e493 Fixing some documentation.
get_records etc are not inefficient if used correctly, and result in MUCH
more readable code that get_recordset does.

I'm already starting to see code being submitted that takes these
instructions literally and it looks like Java.  :-(
2006-04-06 15:26:44 +00:00
danstowell 2201638882 Minor improvements to IMS-E enrol - better handling of empty <userid></userid> 2006-04-06 14:06:40 +00:00
gustav_delius a488b9325c Replace require_variable() by required_param() 2006-04-06 12:56:37 +00:00
gustav_delius e49a8d099e Supply default values for more arguments of question_list() 2006-04-06 12:54:48 +00:00
urs_hunkler 7e4f53c80c changed the CSS for navbutton to position the 2 buttons side by side. #bug4913 2006-04-06 07:35:40 +00:00
moodler 7e73ff00cf Some info about the PHP license and PEAR (we are going to keep it in Moodle) 2006-04-06 06:31:38 +00:00
moodler 91555ae462 FIxed some box sizes, and added hooks for Matt Oquists portfolio stuff 2006-04-06 01:38:52 +00:00
patrickslee faf2851fd9 Override doc link for postgresql migration 2006-04-05 23:41:59 +00:00
stronk7 391f527040 Hehe, setup itself was using register_globals hack! ;-)
Now the lang menu is working again.

Note: I've used the PARAM_SAFEDIR flag because it's the
only one supporting alpha+digits+underscore. Its name
doesn't seem to be perfect for this. Perhaps we should
create some alias?
2006-04-05 23:29:46 +00:00
stronk7 768cf7d5d1 Now graphlib also works with ttf fonts installed under
moodledata/lang dir. Rest of functionality not modified.
2006-04-05 23:03:18 +00:00
stronk7 c829776d34 Default TrueType font updated from (http://www.nongnu.org/freefont/)
It seems to support all the European character sets (latin + cyrillic +
greek). The rest will need to add their custom font to the langpack.
2006-04-05 22:48:14 +00:00
stronk7 03595aab1a Small change in MySQL. Seems to work better under any version
(tested over MySQL 4.1.12, 4.1.16, 5.0.18 and 5.0.19) Bug 5055.
(http://moodle.org/bugs/bug.php?op=show&bugid=5055)
2006-04-05 22:14:24 +00:00
gustav_delius 22c08850d7 Fixing stupid typos from previous commit 2006-04-05 20:02:37 +00:00
gustav_delius 4feb8730d7 Fix to make it work without globals hack 2006-04-05 19:43:42 +00:00
gustav_delius ded180686e Fix to make it work without globals hack 2006-04-05 19:35:51 +00:00
gustav_delius e8a4049ddd Removed some unnecessary code 2006-04-05 18:52:37 +00:00
gustav_delius 3ab76e6562 Don't duplicate site name in navigation bar 2006-04-05 17:37:59 +00:00
thepurpleblob 0183742eeb bug #2569. 'Open dialogues' and 'Closed dialogues' now have their own strings
rather than contatenating existing ones.
2006-04-05 13:48:01 +00:00
moodler 60f92a4330 Added a missing index for some sites (bug 5100) 2006-04-05 13:45:14 +00:00
ethem 743d932c11 Hide order details if an action emerges. (actions: capture, delete, refund, void) 2006-04-05 10:08:57 +00:00
gustav_delius 9c7c8d63f4 Prevent student from seeing quiz when closed, bug 5070 2006-04-05 09:43:29 +00:00
ethem 913a69687b Auto-capture strings changed to scheduled-capture. 2006-04-05 08:43:04 +00:00
moodler 9a7a199fd0 No need to restrict where RSS feeds can be displayed 2006-04-05 08:35:40 +00:00
ethem 0bf8ea6aa0 Show errors in original language.
You can't do this action: native_action
2006-04-05 08:28:12 +00:00
moodler 236d839ff1 Fixed some pretty major HTML errors :-) bug 5089 2006-04-05 08:19:09 +00:00
vyshane 3014ee9ccf Fixed bug: Bug #5081 - meta courses - teacher can't add child courses 2006-04-05 08:12:08 +00:00
gustav_delius 87b18f4ab7 Fixed call to required_param() 2006-04-05 07:46:52 +00:00
vyshane a1b85c9ba5 Added isset($course) test to get rid of notice 2006-04-05 07:41:12 +00:00
gustav_delius 20d6d84d43 Fixed call to required_param() 2006-04-05 07:39:32 +00:00
moodler 202a96d2c8 HTML fixes for bug 5092 2006-04-05 07:37:48 +00:00
moodler a9ac269967 FIxed some warnings bug 5091 2006-04-05 07:27:58 +00:00
moodler 9ee20a32f6 FIxed blank trailing lines (bug 5095) 2006-04-05 06:14:28 +00:00
gustav_delius 7baa9c8016 Fixing the name of the PostgreSQL files 2006-04-05 06:11:40 +00:00
gustav_delius 0a5b58af89 Many bugfixes accummulated during CVS outage, more to come. 2006-04-05 05:53:18 +00:00
vyshane edc13d625b Fixed Bug #5080 - admin/environment.php use a new and different class for the
list table
2006-04-05 05:43:19 +00:00
ethem ece1fbeeb2 Use consts when an user performs an action. 2006-04-05 05:28:56 +00:00
ethem 4440d7a432 Some indexes were added in 15_STABLE. So, don't show a warning message if index already exists. 2006-04-05 05:20:59 +00:00
vyshane 5723bc6f09 Fix for Bug #4910 - stringnames with - . and / don't show up in translation editor
Modified /admin/lang.php to allow us to still use periods in language string keys. The lang.php script just replaces the periods with ##46# for the form inputs and then puts the periods back in before saving to the language file.

This means that there is no need to update language files at all. They will just work even with periods in the string keys.
2006-04-05 04:07:16 +00:00
mjollnir_ 9c9aeef15c Fixing postgres unicode migration for mac os x and multiple postgres installations 2006-04-05 03:54:12 +00:00
moodler 960beea394 Merging fixes from stable 2006-04-05 03:19:36 +00:00
moodler 980a5b3a63 Fix the log graphs which had been broken by the reports move 2006-04-05 03:17:20 +00:00
moodler 8820365c74 Make the links more robust (index.php) 2006-04-05 03:02:57 +00:00
moodler 30bb54dc0e New strings 2006-04-05 02:53:10 +00:00
moodler a5aef8f1ce Latest tags 2006-04-05 02:47:17 +00:00
moodler c4226e0dac Some fixes for links on admin page, and release notes now a link to Moodle Docs 2006-04-05 02:46:05 +00:00
moodler d2fa35a80d FIxed a typo from long time ago in popup windows from logs 2006-04-05 02:45:13 +00:00
moodler cb342045ec The globals hack is history! 2006-04-05 02:44:33 +00:00
moodler a9924bb134 Fix for sites not using proxies 2006-04-05 02:43:41 +00:00
moodler c9a0f50828 Smaller, cleaner images 2006-04-05 02:42:54 +00:00
moodler ba76a8f5cf Fixing some Javascript errors on IE 2006-04-05 02:40:34 +00:00
moodler 9bdedea400 Changed how the "edited by" message appears in the posts edited by admin 2006-04-05 02:15:10 +00:00
moodler a5a9cd99b4 News items on home page should be sorted by date of first post 2006-04-05 01:54:41 +00:00
moodler da0cfb95de FIxed resizable icons in CSS 2006-04-05 01:53:59 +00:00
moodler 53dc0dfb6a Fixed a string name 2006-04-05 01:40:24 +00:00
moodler 7c05ae7aa8 Various fixes 2006-04-05 01:40:02 +00:00
moodler 64452eb438 Various fixes that have accumulated 2006-04-05 01:38:06 +00:00
gbateson a3d40ea8ae define PARAM_SAFEDIR (constant) and clean_param (function) if required for compatibility with Moodle 1.3 or earlier 2006-04-05 01:28:12 +00:00
danmarsden 3e11b9f44a missed one. 2006-04-04 23:36:13 +00:00
danmarsden acaf7b86e3 Bug Fixes for:
Bug 5042
Bug 4600
Bug 4021
Bad code - need to check vars aren't empty b4 using them!
2006-04-04 23:03:15 +00:00
moodler 382671bbdf Fixed tabs logic flow 2006-03-30 07:54:31 +00:00
moodler 4c2dab47a0 Fixed up some tabs names 2006-03-30 07:45:40 +00:00
moodler 0f2178550e Had to change some strings 2006-03-30 07:45:22 +00:00
bobopinna a2464082c4 Fixed two problems in AICC import 2006-03-30 06:19:52 +00:00
moodler 1d8a829a54 Better pages for hidden activities 2006-03-30 04:46:12 +00:00
moodler 3d1c33ef01 Some better security when database is hidden 2006-03-30 04:37:16 +00:00
moodler b9957ccb1d Changes to match file class changes 2006-03-30 04:26:50 +00:00
moodler ad3fba9c0d Added a missing string 2006-03-30 04:02:00 +00:00
moodler 02024106fa more years in the list 2006-03-30 03:55:24 +00:00
moodler a2f96d3e55 Use better variable names in file class 2006-03-30 03:54:39 +00:00
gbateson c20b623804 make compatible with PHP 5.1.2 by removing variable assignments in calls to functions e.g. myfunction($a=1); Micro-incremented version number to 2.1.15 2006-03-30 03:17:51 +00:00
stronk7 475e9de86f SITE and SITEID were calculated *before* 'set names' so they weren't
fetched properly from DB. Moving such block of code from datalib.php
to setup.php to execute it *after* 'set names'. Credit goes to Skodak B-)
2006-03-29 23:38:46 +00:00
stronk7 dfa76a46e3 Automatic installer.php by installer_builder (20060329) 2006-03-29 21:20:18 +00:00
moodler 353bbad47a Let's call it this, tomorrow. :-) 2006-03-29 18:52:42 +00:00
moodler cc6b0be44b Whoops, wrong line, I am tired. :-) 2006-03-29 18:38:18 +00:00
moodler 5f04c615d7 Template order makes more sense this way :-) 2006-03-29 18:36:31 +00:00
moodler c4e576f1ff Some new strings for CSS 2006-03-29 18:30:03 +00:00
moodler 68635e6f6d Support for a new CSS template, allowing you to use CSS in the other templates 2006-03-29 18:29:16 +00:00
moodler 01fe47f640 Fixed a notice 2006-03-29 18:00:58 +00:00
moodler f07fa64418 Of $COURSE you can't redefine constants :) 2006-03-29 17:56:35 +00:00
moodler 20e294eeda Added field for CSS for database templates 2006-03-29 17:42:42 +00:00
moodler 3387cc5c3f New strings 2006-03-29 17:37:25 +00:00
moodler 52373fe74d Fixes for comments 2006-03-29 17:36:20 +00:00
stronk7 447ed99612 Bump! 2006-03-29 17:27:29 +00:00
nfreear 52309a36da Bug 4995, 'Calendar, colour combinations give poor contrast'. Fix: increase contrast, darker link/weekend colors, lighter event backgrounds, original duration borders. 2006-03-29 16:46:30 +00:00
stronk7 063716bad9 Now new lang packs won't be available until UTF-8
migration was performed. Until then, only "en" and
old lang packs will be available.

The opposite is also true: only new lang packs will be available
once the UTF-8 migration was performed.
2006-03-29 16:18:46 +00:00
moodler 004bd0cc39 Some cleanups to the flow 2006-03-29 16:03:05 +00:00
moodler 00a67d879c Just removing a space 2006-03-29 15:39:21 +00:00
moodler 8a58a8e17f Starting the global COURSEID.
require_login seems to be the best place to capture this, however
I'm sure there are a few little places where it won't work.

We need to hunt these places down and fix them, because I would
like to rely on COURSEID and remove all the "global $course" hacks
that are floating around.

Probably later we need the full object $COURSE as well (to match $SITE)
2006-03-29 15:38:29 +00:00
moodler 688e209c5c Language fixes (capitalisation) 2006-03-29 15:06:36 +00:00
moodler 2eb27f07f3 Fixed some output 2006-03-29 15:03:58 +00:00
moodler ba6b47d3bf Small fix to prevent a notice, seems to still work 2006-03-29 15:00:47 +00:00
moodler c452097e15 Slightly fixing some bodgy boxes 2006-03-29 14:52:14 +00:00
nfreear 72a877f8c9 Bugtracker 5023, fixes 'Database upgrade issue: 'relation "backup_files_u" already exists in...' Added, {$CFG->prefix} 2006-03-29 11:33:59 +00:00
ikawhero b0aea051fc Added string for tabs. Cleaned up some others. 2006-03-29 10:07:21 +00:00
ikawhero d095e22f4a Smart add entry tab 2006-03-29 10:05:03 +00:00
moodler 5b3c8a00ce New string 2006-03-29 08:51:00 +00:00
moodler 3d45b8e557 Bunch of fixes including:
- separate browse / detail tabs
   - cleaner logic
   - proper sorting in all scenrios
   - settings stored in the sessions
   - better cleaner URLs
2006-03-29 08:49:28 +00:00
gustav_delius 3082b744ac Moving <td>, fixing bug 5019 2006-03-29 08:45:36 +00:00
patrickslee 08e1fad13f Completed postgres binary upgrade block for wiki module 2006-03-29 05:16:59 +00:00
gbateson a83f9d2264 fix SQL query that didn't work in PG (bug 4989) 2006-03-29 05:14:49 +00:00
patrickslee e989c7699a Convert fields refs and content in wiki_pages to binary for postgres 2006-03-29 04:48:30 +00:00
moodler c6f32032ea added ['confirmstartattemptnotimelimit'] 2006-03-29 03:05:27 +00:00
stronk7 2070370cfa Typo. 2006-03-28 23:31:12 +00:00
stronk7 1f1e3288ca Only decode from utf8 if we aren't running under utf8.
Please test it. Thanks!
2006-03-28 19:22:35 +00:00
stronk7 107919b0d6 Only decode from utf8 if we aren't running under utf8.
Please, test it. Thanks!
2006-03-28 19:18:38 +00:00
stronk7 5c30945a81 Only decode from utf8 if we aren't running under utf8.
(anyway we need a setting to decide the original encoding
and to be perfect)
2006-03-28 19:14:23 +00:00
stronk7 ef138cea77 Only convert to UTF8 if we aren't running under UTF8.
Please, test this is correct, thanks!
2006-03-28 18:53:16 +00:00
stronk7 1d5a7c4b0a Some changes to make proper UTF-8 encoding only if necesary.
We need to move all the **_tag functions to a central place ASAP
(backup are better to be used as central)
Also, I don't know why the author is now out from the feeds...
2006-03-28 18:46:07 +00:00
tjhunt ee35e0b855 Allow the display of course logs to be filtered by type of action. 2006-03-28 17:33:40 +00:00
stronk7 5db97a46a5 We don't need to convert to Unicode if Moodle is running under Unicode.
(anyway, we need a new field inside each authentication system to be
able to define the external encoding!)
2006-03-28 17:13:09 +00:00
nfreear 957aa5b93b Fix bug 5014, 'nameweekscss' language string. 2006-03-28 15:46:48 +00:00
gustav_delius 8cc274defc Changed the get_actual_responses() method to truncate at 40 characters, contributed by Jean-Michel. 2006-03-28 08:27:56 +00:00
gustav_delius 223ad0b94b Better fix for bug 3225 that is reading the precision setting from php.ini, contributed by Paulo 2006-03-28 07:39:36 +00:00
stronk7 187db9ddfe Adding "ca" to the array of encodings... 2006-03-28 07:37:58 +00:00
gustav_delius 66125eda14 Fixed incorrect use of quiz_get_renderoptions. This quiz-specific function should in future be removed from this question code 2006-03-28 07:37:51 +00:00
moodler 29d218ce2f Added GUI for $CFG->sessioncookiepath 2006-03-28 05:31:21 +00:00
moodler 1ae655b17c Support for $CFG->sessioncookiepath 2006-03-28 05:26:18 +00:00
moodler 98691349b1 Regenerate course caches after UTF upgrade (bug 5002) 2006-03-28 02:14:12 +00:00
michaelpenne a7ae1ad3fd [BugFix] Multiple essays were not showing for grading: http://moodle.org/mod/forum/discuss.php?d=41999#195580 2006-03-28 00:30:24 +00:00
gustav_delius bc2feba364 Some preparation for manual grading 2006-03-27 17:38:30 +00:00
nfreear ad525445c0 Accessibility: tidied commented code. 2006-03-27 16:54:34 +00:00
gustav_delius 5eae68aa2a Fixed tolerance problem, see bug 3225 2006-03-27 16:38:44 +00:00
nfreear c6a553710d Accessibility: Bug tracker 4997, replaced table with list - low risk! 2006-03-27 16:21:56 +00:00
nfreear 149097cee3 Accessibility: Bug tracker 4997, "Unnecessary table for course sections/activities". 2006-03-27 16:08:26 +00:00
stronk7 44eee4e2b3 FPDF class credits added. 2006-03-27 15:42:38 +00:00
nfreear 05c5dc6a53 Accessibility: Bug tracker 4994, "Need skip navigation link..." 2006-03-27 15:05:35 +00:00
moodler 5989d186ed Hiding TinyMCE settings for now, deferring this to 1.7 2006-03-27 14:09:03 +00:00
moodler 9955754227 Remove the tinymce option until 1.7 2006-03-27 14:05:40 +00:00
stronk7 039d4d5c2b At installation time we *always* are going to show release notes
from en_utf8. It's the only lang pack that includes such info
with the upgrade, independently of everything else (unicodedb...).
2006-03-27 12:46:27 +00:00
stronk7 de12ca6a42 Now $CFG->unicodedb is sent to DB everytime we arrive to the
admin/index.php script (installation, upgrade...). This will
stop the encoding introspection code present in setup.php
2006-03-27 12:32:51 +00:00
ethem f0e2d8b3d4 Merged from MOODLE_15_STABLE. 2006-03-27 12:21:13 +00:00
stronk7 7104d80dbc Now setup.php detects is CFG->unicode is not set and examines
DB to detect such value dinamically. Useful for installations
not using the standard installer but manually edited config.php
files.
Little TODO: modify a bit the initial config tables insets to
insert this value, avoiding to call it for each request. Coming
soon (although not mandatory for 1.6beta). Tested against both
MySQL and PostgreSQL with unicode and non-unicode DBs.
2006-03-27 11:24:14 +00:00
moodler 4431d2e036 Fixed no- display when not logged in (bug 4990) 2006-03-27 09:50:23 +00:00
ikawhero 763e8d61f4 Tidying up 2006-03-27 09:08:09 +00:00
ikawhero 7592c7467d Added new string for default sort 2006-03-27 09:07:57 +00:00
ethem d414c46183 Some descriptions was added 2006-03-27 08:49:43 +00:00
gustav_delius 3a58ad11bc The "Reports" tab is now a "Results" tab so that the grading fits in better. 2006-03-27 08:45:02 +00:00
ikawhero e0279f63d7 Added default sort 2006-03-27 08:42:25 +00:00
moodler 95d6f2e47d Added fpdf for use by modules 2006-03-27 08:42:07 +00:00
gustav_delius 31e95855b8 Improved quiz report plugin mechanism and converted the manual grading script into a report plugin 2006-03-27 08:41:20 +00:00
gustav_delius ffa1f07890 Removed notices caused by empty responses 2006-03-27 08:38:55 +00:00
ikawhero 616ae6d5fe Added default sort. 2006-03-27 08:37:17 +00:00
ethem c7dac7f5a9 index.php & lib.php
Payment management functions moved to lib.php
2006-03-27 08:31:16 +00:00
moodler 5f0b05fbbb Er more fixes 2006-03-27 08:03:18 +00:00
moodler 80d810be76 Added a missing fileld for direction 2006-03-27 07:54:42 +00:00
ethem 6972506e99 Tabs are out 2006-03-27 07:53:27 +00:00
ikawhero 70fe1b0534 Oops, getting my SQL right. 2006-03-27 07:44:12 +00:00
ikawhero f1d49973ac Making the defaultsort field signed to indicate sort direction 2006-03-27 07:42:33 +00:00
moodler 8179046dd5 Sort the sort menu 2006-03-27 07:24:26 +00:00
ikawhero 649a83ffb6 Version bump - added 2 new fields to data table 2006-03-27 06:52:50 +00:00
moodler 505d3123d9 Misc fixes 2006-03-27 06:52:50 +00:00
ikawhero bc1ab28226 Added 2 new fields:
1. editany - flag to allow any user to edit any entry
2. defaultsort - set the default sort field for list view
2006-03-27 06:52:11 +00:00
vyshane b395a1e44a Fix for Bug #4978 - Every time I add one field in one DB activity...
Added AS df in SQL query in data_fieldname_exists(). Reformatted the strings
to use single quotes when quoting in SQL. These changes might solve PostgreSQL
problems.
2006-03-27 06:19:34 +00:00
vyshane cb3689b917 We now mark records as approved if the data activity is set to not require
approval of new records.
2006-03-27 05:36:47 +00:00
moodler ec21b13ebb New string 2006-03-27 05:30:48 +00:00
moodler b023ec4dda Fixed index page 2006-03-27 05:28:26 +00:00
vyshane 58e167c3f4 Added 2 columns for number of records and number of records not approved yet. 2006-03-27 05:20:50 +00:00
gbateson 887df2db79 modified newlines for Windows (perhaps?) 2006-03-27 05:18:50 +00:00
gbateson d80aef713a modified README.txt to download zip, lang and question/format files from CVS 2006-03-27 05:16:15 +00:00
moodler 1a161a7041 Removed silly date string 2006-03-27 05:14:51 +00:00
moodler e8184755f3 New strings for Date field 2006-03-27 04:38:55 +00:00
moodler 7054c0e4d6 New field plugin for dates 2006-03-27 04:37:05 +00:00
vyshane 7ddda9dbcf Fixed Bug #4985 - Guest rights to the database module. 2006-03-27 04:13:32 +00:00
mjollnir_ 34f4ff351d WHERE 1 is NOT valid postgres syntax. Just pass empty string instead! 2006-03-27 04:04:40 +00:00
mjollnir_ fa10cafe61 Fixing blocks upgrade in postgres (my fault) 2006-03-27 04:03:19 +00:00
vyshane 9e5537eb3f Replaced <br /> with <hr /> for default list template. 2006-03-27 04:02:48 +00:00
vyshane 4d423a0b00 Removed the unneeded ORDER BY clauses for the queries that are COUNTing.
Fix for Bug #4979 - Errror in Browse Page.
2006-03-27 03:43:27 +00:00
moodler a05653a0b2 Improvements to print_date_selector, print_time_selector etc to allow them
to be returned as strings
2006-03-27 03:42:44 +00:00
vyshane 1ef46cbeaa Fixed javascript for cases where htmleditor is not available. 2006-03-27 03:02:26 +00:00
mjollnir_ 173fc40f56 Added missing language string for statsoff 2006-03-27 02:22:34 +00:00
mjollnir_ 742104c531 Merged from MOODLE_15_STABLE: Since there was no pg support for enrol/authorize until later, the versioning was screwey in postgres, so check the table exists first before trying to add columns to it, create it if it is not there 2006-03-26 22:59:23 +00:00
patrickslee 8cf1d8949e Stripped out an unnecessary line in pg_dump output which causes error.
Also deletes the last temp file while duplicating database to save space
2006-03-26 21:47:49 +00:00
patrickslee 40b4a063d4 Fixed false course category move when searching courses in editing mode 2006-03-26 20:58:54 +00:00
moodler dbdfc3dbab Little tidyings, I should be in bed watching Scrubs! 2006-03-26 16:19:57 +00:00
moodler 0cdb296458 Old test code 2006-03-26 16:16:06 +00:00
moodler fe350f8564 Include course in RSS feed name 2006-03-26 15:57:37 +00:00
moodler c8505cacd5 Better looking form for preferences and more accessible 2006-03-26 15:54:41 +00:00
moodler 6be88c6af0 Shortanswers can now be '0' 2006-03-26 15:03:08 +00:00
gustav_delius 5f9ef821df Moved detailed responses report into contrib 2006-03-26 12:02:46 +00:00
gustav_delius a239d1d92c Renamed the question style class from question to que, see bug 4904 2006-03-26 11:11:29 +00:00
gustav_delius d077b8793e Took out the restriction of the question styles to the quiz module only. 2006-03-26 10:48:47 +00:00
mits 9ab8f17df1 fixed "tablink text" visibility. 2006-03-26 10:06:27 +00:00
gustav_delius d23e3e11dd Moved the code for basing new attempts on previous attempts from questions to quiz and fixed the bug reported at http://moodle.org/mod/forum/discuss.php?d=42029#194212 in the process 2006-03-26 07:59:43 +00:00
mits d4156b1bd1 improved "tablink text" visibility. 2006-03-26 07:40:30 +00:00
moodler 886583bf6d FIlter wasn't using site databases globally 2006-03-26 06:28:50 +00:00
moodler 4ef4cff973 Added string for the filter 2006-03-26 06:06:00 +00:00
moodler 10aba62740 Tidy messages and display 2006-03-26 06:00:28 +00:00
moodler 5600b50118 New strings 2006-03-26 05:59:52 +00:00
moodler 33819735aa More tidying up 2006-03-26 05:36:34 +00:00
moodler 75c42c876f Properly fixed page flow for approvals and deletions 2006-03-26 05:22:16 +00:00
moodler 473dd2888b Various little fixes. 2006-03-26 05:03:10 +00:00
stronk7 3620b8dccf New generaltable styles added... 2006-03-26 01:31:46 +00:00
mark-nielsen 07de03b06a [Added] two new lang entries for import.php 2006-03-26 00:13:37 +00:00
mark-nielsen 90455bb3ab [Fixed] Import. Updated code to work with /question instead of /mod/quiz. Lead to a few interal bug fixes. Also moved two hard coded strings to the lang file. 2006-03-26 00:10:39 +00:00
stronk7 6385df35bc Fixed typo. 2006-03-25 23:43:14 +00:00
mark-nielsen 69baf10f74 [Removed] Tree view setting has been removed. Its functionality has been replaced with the tabs. 2006-03-25 21:43:10 +00:00
mark-nielsen 97d2756c65 [New Feature] Tabbed navigation added to lesson (similar to quiz)
[Added] Graceful fails added to view.php, essay grading, and reports
[Changed] got rid of a lot of references to $_POST/GET/REQUEST
[Fixed] In reports, it required teacheredit, should only be teacher
[Changed] High scores - teachers can actually see them!  Also, improved output by using print_table and print_heading
[Changed] Grade essays now uses fullname() to print user names
2006-03-25 21:38:57 +00:00
gustav_delius f1b50ee94c Use existing language string for correct answer 2006-03-25 21:36:00 +00:00
mark-nielsen b59c1d77e9 [New] lang entries for tabs
[Changed] old lang entries to help bring consistancy and unity to the different lesson pages
2006-03-25 21:29:20 +00:00
gustav_delius 0705c069c0 Shortened and simplified a string, so that it fits better onto the quiz editing form. 2006-03-25 21:28:41 +00:00
gustav_delius 5cb9076a58 Removed warning when deleting questions with no states 2006-03-25 21:07:11 +00:00
gustav_delius d7bc70247c Fixed typo 2006-03-25 21:04:44 +00:00
moodler 9803d9740f Fixed some mistakes 2006-03-25 17:19:42 +00:00
moodler 7da6274c35 Return to the record you edited after editing 2006-03-25 16:29:35 +00:00
moodler dbcf5bdcbf Fixed some bung security logic 2006-03-25 16:19:06 +00:00
moodler 2740351ee9 Improvements to RSS . it could be better 2006-03-25 16:12:42 +00:00
moodler d74a6d5e67 Removced the "generate all" button and just made it a default action for
new databases
2006-03-25 14:58:14 +00:00
moodler a44e70811a Update the passed-in data object when generating new templates 2006-03-25 14:57:36 +00:00
moodler 4d75b9eb0d Smarter links for the templates tab 2006-03-25 14:56:27 +00:00
moodler 32cba33f8e iChanged strings 2006-03-25 14:20:00 +00:00
moodler ec865e2d74 Fixes for fields display 2006-03-25 14:00:54 +00:00
stronk7 11f7b25d18 Bump! Now we support Win32 locales. B-)
Anyway some "holes" remain. See:

http://docs.moodle.org/en/Table_of_locales
2006-03-25 12:26:33 +00:00
stronk7 9533fbd5a6 English_Australia is our root Windows locale! :-P
See: http://docs.moodle.org/en/Table_of_locales
2006-03-25 12:21:35 +00:00
moodler be51e3d504 Rename a string 2006-03-25 08:49:20 +00:00
moodler 66cb6f29d7 Better-looking add fields 2006-03-25 08:46:35 +00:00
moodler a7ee8d45cc Don't prefix add filed with label 2006-03-25 08:46:02 +00:00
mjollnir_ effbd108a3 Fixing call to upgrade_plugins since questiontypes moved to question/type 2006-03-25 07:55:56 +00:00
moodler a33c4e5a84 Added support for Yahoo and MSN Search 2006-03-25 07:09:40 +00:00
gustav_delius 4eda4eecbd Added question type that is used if a question of unknown type is encountered.
Also removed some of the unnecessary calls to name()
2006-03-24 21:21:59 +00:00
gustav_delius 5c2447494d These are no longer needed because the backup functions are part of the questiontype classes now. 2006-03-24 20:44:13 +00:00
mjollnir_ 9ec656750e More time fixes for stats - under certain dst situations there could have been an infinite loop. Please someone who is clever about timezones & dst review this 2006-03-24 20:43:38 +00:00
gustav_delius ca252edb1d Setting title attribute on questiontype icons so that tooltips show the question type name 2006-03-24 20:02:42 +00:00
gustav_delius aaae75b04f Renaming question/questiontypes/ to question/types/ as requested by Martin 2006-03-24 19:54:13 +00:00
gustav_delius 643ec47d32 Renaming question/questiontypes/ to question/types/ as requested by Martin 2006-03-24 19:31:46 +00:00
nfreear 3d9237d685 Accessibility: resizable icons moved to pix/a/ and renamed. 2006-03-24 17:08:47 +00:00
moodler 204ff4a127 Always allow regeneration of templates 2006-03-24 14:49:21 +00:00
thepurpleblob 994890ef3a Added missing string 2006-03-24 14:49:13 +00:00
moodler 36a9cc4caf Cleaned up approval script (more security ;-)) 2006-03-24 14:48:54 +00:00
moodler 0eda0a46b2 Fixed a typo 2006-03-24 14:44:55 +00:00
vyshane 251616fd67 Update for URL field changes. 2006-03-24 14:35:21 +00:00
vyshane faf5ec4fa5 Bug fixes and changes to URL field. 2006-03-24 14:34:00 +00:00
moodler 5bac6d10e3 Renamed fields.php to field.php 2006-03-24 02:44:05 +00:00
moodler a2cd47971d Renaming some stuff, it's the fashion this week 2006-03-24 02:35:36 +00:00
moodler 7cd3acc45e Just working out the preset file format 2006-03-24 02:21:48 +00:00
vyshane f41cadeba7 Fix for Bug #4969. Renamed variable $mode to $template. 2006-03-24 02:09:15 +00:00
stronk7 311c697a86 Added two strings to display dates properly. For English we leave them
empty as ASCII = UTF-8
2006-03-23 23:45:28 +00:00
patrickslee c4dd557978 Proper fix for the module toolbar actions 2006-03-23 23:36:20 +00:00
patrickslee 9932144e89 Fixed group switch icon cannot set a module to use no groups 2006-03-23 22:56:11 +00:00
gustav_delius 363773ef87 Removing questiontype settings from quiz settings page 2006-03-23 19:56:42 +00:00
gustav_delius 1fc29d8a1e Taking out help button from the grade option, there is really no help required. 2006-03-23 19:51:58 +00:00
gustav_delius cd9ca85409 Timer now uses the client's clock. Patch contributed by Phillip Franks, see bug 4967 2006-03-23 19:32:24 +00:00
stronk7 b8770bc0a5 Two new $CFG runtime variables created $CFG->ostype (WINDOWS, UNIX) and
$CFG->os (= PHP_OS) to handle it centrally. Also, although not critical,
it should be recommended to replace all the current uses of PHP_OS to the
new variables. See bug 4968.
(http://moodle.org/bugs/bug.php?op=show&bugid=4968)
2006-03-23 17:54:33 +00:00
stronk7 f422ee81c3 Automatic installer.php by installer_builder (20060323) 2006-03-23 16:52:20 +00:00
stronk7 fc4a9c3261 Automatic installer.php by installer_builder (20060323) 2006-03-23 16:35:18 +00:00
ethem 2eaa289883 Table type fix. ENGINE changed to TYPE. Old mysql version issue. 2006-03-23 14:26:18 +00:00
gustav_delius 5bf3aee8bb Do the module upgrades before the qtype upgrades 2006-03-23 13:05:40 +00:00
thepurpleblob 51bcdf28b3 Added support for matching questions. Bug #3901 2006-03-23 11:13:50 +00:00
thepurpleblob 2d52056f79 Not all questions have grades/fractions. Added check. 2006-03-23 11:12:54 +00:00
moodler d118d06afc Various tidy-ups 2006-03-23 10:01:21 +00:00
ikawhero b51434e751 Block now configurable. 2006-03-23 09:55:20 +00:00
ikawhero 4852ab889f Added some new strings for blog tags block 2006-03-23 09:53:52 +00:00
vyshane fd96d5e2ec Fixed bug data_print_template() from /mod/data/lib.php. Extra function
argument removed.
2006-03-23 08:34:22 +00:00
ikawhero e8964639ce Tidied up the class size assignments 2006-03-23 07:48:49 +00:00
vyshane a18f8e458f Renamed $rid to $recordid in function call $field->update_content($rid,
$value, $name); This fixes a bug that was causing the data_content to be
stored wrongly.
2006-03-23 07:20:16 +00:00
vyshane 3a5a7928ea Fixed extra function argument in call for display_add_field() from add.php. 2006-03-23 06:20:48 +00:00
moodler 59d28e0550 removed $content->content = $this->format_data_field_multimenu_content($value); bad cut and paste 2006-03-23 05:41:48 +00:00
moodler 2b1d7c8e82 Fixed some typos 2006-03-23 05:38:53 +00:00
vyshane 8921fdb762 Fixed typo in function define_field() 2006-03-23 03:48:58 +00:00
moodler 2ef2b3f19d Fixed Fatal error: Call to undefined function get_course() in /data/www/html/server/dev/mod/data/field/file/field.class.php on line 133 2006-03-23 02:50:21 +00:00
vyshane e64ef4f9b7 Fixed php notice for undeclared variable. 2006-03-23 02:34:37 +00:00
moodler 6d727d75cf Added missing text 2006-03-23 01:32:34 +00:00
mjollnir_ 60f4cbc13a Fixing missing , in prefix_blog_instance postgres creation 2006-03-23 00:37:53 +00:00
gustav_delius 76de2cdf1a Putting the "Save as new question" button back. 2006-03-22 22:37:27 +00:00
gustav_delius 6dfc23760f The obsolete table quiz_attemptonlast_datasets should no longer get created 2006-03-22 22:04:31 +00:00
gustav_delius 7518b645b9 Removed some more references to quiz from the questiontype code. 2006-03-22 21:51:33 +00:00
gustav_delius fe9b5cfd0b Fixed the links to the question review script. 2006-03-22 21:30:00 +00:00
thepurpleblob a22802e051 Fixed link to example file. 2006-03-22 19:14:36 +00:00
thepurpleblob 2bcbc88d0a Changed comment about encoding (must be utf-8) 2006-03-22 18:58:36 +00:00
thepurpleblob 8a6f231b50 added rest of instructions for this option 2006-03-22 18:43:44 +00:00
gustav_delius 0429cd86c3 Deleting attempts properly now 2006-03-22 18:27:28 +00:00
michaelpenne 8a18280393 Added a new entry to this file for Essay question type. I followed the format of the other question types listed in this file. 2006-03-22 18:06:00 +00:00
michaelpenne 1b704069c4 Help file for the Essay question type. 2006-03-22 18:03:42 +00:00
nfreear 6575bfd4d1 Accessibility: fix bug 4963 in function, print_header. Added 'lang' attribute to $direction, used by standard and other themes. 2006-03-22 17:48:53 +00:00
gustav_delius 4dca7e51ca Some minor improvements in the handling of review options, the setting of timestamp, and improvements to the documentation 2006-03-22 17:22:36 +00:00
nfreear 48943f403c Accessibility: fixed bug 4012 x9, added Alt, filled empty Alt-link text. 2006-03-22 17:19:46 +00:00
gustav_delius 609c7d517d Fixed bug 4953 2006-03-22 17:18:55 +00:00
ikawhero 7d61cf6596 Added sorting - needs generalising. 2006-03-22 16:48:35 +00:00
thepurpleblob 4b920216ac New help popup for import option 'match grades'.
Needs some more info.
2006-03-22 16:44:47 +00:00
thepurpleblob 76f0a33403 Grades in imported questions must match grades option list.
Added option to either generate error or match to nearest valid value if they don't
2006-03-22 16:30:14 +00:00
thepurpleblob 8511669cb9 Added function for matching/checking question grades on quiz import. 2006-03-22 16:27:46 +00:00
thepurpleblob e86ce920fa Added new strings for question grade matching 2006-03-22 16:27:04 +00:00
moodler 1472fc4b36 Fingers were on auto-pilot obviously! Thanks Mits! 2006-03-22 15:54:54 +00:00
moodler a835f1c343 Removed some debugging 2006-03-22 14:55:49 +00:00
thepurpleblob b4db945e40 Grade option list generation now out to library 2006-03-22 14:44:33 +00:00
thepurpleblob e9de436630 Split out grade option list generation, so it can be used in import/export too. 2006-03-22 14:43:55 +00:00
moodler f0497d6ff0 Various cleanups 2006-03-22 14:31:32 +00:00
moodler 6c74c1da70 Some language modifications 2006-03-22 14:31:06 +00:00
gustav_delius dfa47f965c Cleanup: don't use questiontype constants within questiontypes 2006-03-22 13:51:25 +00:00
moodler 26d93549f5 Fixed up some styles and pagepath for field-editing pages 2006-03-22 13:38:29 +00:00
gustav_delius 76a1cf366e Don't name script files after the plugin, makes it more difficult to base a new plugin on an old one. 2006-03-22 12:19:40 +00:00
gustav_delius e08eba6a66 These are no longer needed because the restore functions are part of the questiontype classes now. 2006-03-22 11:56:04 +00:00
gustav_delius 18cbc9683d rqp questions set the type to rqp_nn where nn is the rqp_type id 2006-03-22 11:19:26 +00:00
gustav_delius ead293420d Questiontypes are doing their own database upgrade now.
I modified the enrollment plugin mechanism to work for any type of plugin
2006-03-22 10:44:54 +00:00
gustav_delius ea889e7744 Recode qtypes during restore of old backups. 2006-03-22 10:32:29 +00:00
gustav_delius 9b908126b9 Bumped the backup version because I need this version in the question restore code. 2006-03-22 10:28:42 +00:00
ikawhero f918fce272 Some styles for block blog tags 2006-03-22 10:14:52 +00:00
ikawhero eaa319b355 Added colours (correct Aust English spelling) for block blog tags 2006-03-22 10:14:08 +00:00
moodler b6ffdddaa5 Tweaky tweaky tweak 2006-03-22 09:53:13 +00:00
moodler bf4de5b583 Cleanups 2006-03-22 09:49:29 +00:00
moodler aa34425f43 Fixed up hardcoded tables with notice_yesno 2006-03-22 09:43:10 +00:00
moodler 9a169d1dc7 Cleaned up table of fields 2006-03-22 09:33:29 +00:00
ikawhero 976982d3e2 Corrected variable reference - was causing problems with SQL inserts/updates. 2006-03-22 09:16:08 +00:00
moodler c9095ae670 The menu to add fields is now more accessible 2006-03-22 09:14:44 +00:00
moodler 1b0d9dca18 Fixing more typos 2006-03-22 08:56:47 +00:00
moodler 423bd918b5 Fixing silly stuff 2006-03-22 08:44:26 +00:00
gustav_delius 3be86ca6b3 In preparation of the qtype plugin-mechanism give set version information for all questiontypes that already have database tables. 2006-03-22 08:41:56 +00:00
ikawhero 78d932b793 Initialise variable usedtags. 2006-03-22 08:38:47 +00:00
moodler ed69c72326 Fixes 2006-03-22 08:32:54 +00:00
moodler 0997e51afe Lots and lots and lots of cleanup for the data module code, mostly
to do with how the field classes worked.  Now it should be even easier
for developers.

No changes for users.  :-P

The changes are not well tested yet!
2006-03-22 08:07:26 +00:00
vyshane 53c988a403 Fix for Bug #4954
Patch submitted by jun at catalyst dot net dot nz
2006-03-22 07:07:57 +00:00
vyshane 1e9f3edb56 Added $CFG->pagepath for Moodle Doc link. 2006-03-22 04:15:00 +00:00
vyshane c05181937a Added $forcelang optional parameter. This is useful if we want to get help.php
to display the help content in a language irrespective of the site language
settings. This is needed for /admin/helpdoc.php script. This view requires
previews for:

1) en_utf8
2) the current language the site is set to

Without the change to /help.php, 1) is not possible.
2006-03-22 03:16:27 +00:00
vyshane 3b26532171 Fixed preview link bug (Bug #4942). Made the preview popup use /help.php for a
real preview of what the help content will look like.
2006-03-22 03:13:31 +00:00
gustav_delius 6040798269 Abolished the qtype integers. The question types are now indexed by their name as specified by their directory name. This will avoid a lot of confusion in future when we have plugable question types. 2006-03-21 23:08:36 +00:00
danstowell 069b6daf76 Minor changes to RSSlib - main change is augnmented PHPdoc for the issues in RSS enclosures 2006-03-21 22:35:23 +00:00
gustav_delius ba8f7ff02a Restore works again, except for random questions. 2006-03-21 22:35:03 +00:00
gustav_delius 315559d354 Moving question restore code into questiontype classes. The restore is now temporarily broken but I will fix it as soon as I get home. 2006-03-21 20:59:32 +00:00
gustav_delius 6af1e0b2c2 Fix bug 4952 2006-03-21 20:55:23 +00:00
dhawes 6b263129c0 fix listed in bug 3834 applied 2006-03-21 20:54:50 +00:00
stronk7 b51551e794 Some excess of security was causing Bug 4713.
(http://moodle.org/bugs/bug.php?op=show&bugid=4713)

Merged from MOODLE_15_STABLE
2006-03-21 20:08:51 +00:00
gustav_delius c5d94c4150 Moved questiontype specific backup functions into questiontype classes 2006-03-21 18:15:09 +00:00
moodler 42431d7a30 Fixed bug in make_mod_upload_directory() vecause of new lang packs 2006-03-21 16:57:32 +00:00
gustav_delius fe1106f0d1 Now the question backup code has been separated from the quiz backup code. 2006-03-21 16:50:42 +00:00
nfreear 8ceb3e67d5 Part fix, bug 4943: print_simple_box behaviour changed. Now aligns box, and shrinks to fit for left/right-alignment. 2006-03-21 16:29:50 +00:00
gustav_delius 924ff16a07 Moving question backup from mod/quiz/ to question/. In a first step I am making a duplicate copy of the whole backuplib.php. Next I will go in and delete the question backupcode from mod/quiz/backuplib.php and the quiz backup code from question/backuplib.php 2006-03-21 15:38:35 +00:00
gustav_delius cf60a28a0b Fixed small problem in delete_question() 2006-03-21 15:33:30 +00:00
tjhunt f76648809e Clarify doc comment. 2006-03-21 14:09:55 +00:00
thepurpleblob bc12bfea4f Removed unused global (see bug #4948) 2006-03-21 13:38:36 +00:00
anthonyforth 88629fc419 Rename backup_ids_uk constraint to include prefix to allow easy installation of multiple instances from one database. 2006-03-21 10:31:28 +00:00
moodler 581d27ff58 FIxes for some question styles that were getting confused by the new /question
directory
2006-03-21 09:39:15 +00:00
moodler 92b6d775b2 No reports or grading when there are no questions 2006-03-21 09:28:08 +00:00
moodler c88369b8e3 Christian's code to support time delays 2006-03-21 09:24:47 +00:00
moodler 07679347f4 Removing language files we don't need 2006-03-21 09:23:20 +00:00
moodler 133081306d Just another warning 2006-03-21 09:21:00 +00:00
moodler cc9708572b Removed errant help file 2006-03-21 09:16:22 +00:00
moodler 26c829d7ed Improve the English 2006-03-21 09:12:38 +00:00
moodler da077b9a7a Change of function name, no actual change 2006-03-21 09:08:57 +00:00
moodler ba6602f8da Old change, just removing a comment 2006-03-21 09:08:16 +00:00
moodler d27a5b2581 Christian's changes to update Resources when files are moved
I've not checked this closely but it seems to work
2006-03-21 09:07:19 +00:00
gustav_delius f67172b64b Moved code to delete questions and question categories to lib/questionlib.php
Also fixed bug 4949
2006-03-21 09:06:34 +00:00
moodler 9d8d30e03a Aha, the link to the new reset feature 2006-03-21 09:04:22 +00:00
moodler d799fa2d6c Checking in an old change 2006-03-21 09:03:30 +00:00
moodler dba2764db7 Show tag name in the RSS feed 2006-03-21 08:56:20 +00:00
moodler 0ad2f60285 Small patches while I contemplate rewriting all those patches from scratch 2006-03-21 08:04:15 +00:00
moodler 6479f65751 Filled in string for blog tags block 2006-03-21 07:37:12 +00:00
moodler ffd0fbb7ac New feature: you can now reset a course simply and easily using the new
"Reset" item on the course admin menu.

This allows you to delete user data from the course without touching the
course itself.
2006-03-21 07:34:33 +00:00
vyshane 6305db8858 Bug #4887 2006-03-21 07:03:37 +00:00
vyshane 5a1736e382 Added $CFG->pagepath for Moodle Docs. 2006-03-21 04:59:55 +00:00
vyshane c27ae154d6 Added language strings for CVS imports. 2006-03-21 04:38:05 +00:00
vyshane e1791b72e8 Added CSV import facility for the data module. Fixed notice for checkbox and
multimenu field types.
2006-03-21 04:36:36 +00:00
vyshane 2c42a9e71c Fixed Bug #4945 2006-03-21 03:11:38 +00:00
moodler d7dfcee179 Tweaking output and layout 2006-03-21 01:35:42 +00:00
gustav_delius 4b87fbe7ad Improved language strings used during deletion of courses 2006-03-20 23:05:35 +00:00
gustav_delius 90c3f31066 Some improvements to delete_question() 2006-03-20 23:04:22 +00:00
gustav_delius 75cd257be8 Moved the quiz constants into lib.php to keep things simple. 2006-03-20 20:59:46 +00:00
gustav_delius af3830ee49 Rename quiz_default_questiontype to default_questiontype 2006-03-20 20:52:18 +00:00
gustav_delius 6b11a0e863 Renaming constants QUIZ_ADAPTIVE and QUIZ_IGNORE_DUPRESP to QUESTION_..... and moved them to lib/questionlib.php because they are used for question-level options. 2006-03-20 20:45:55 +00:00
gustav_delius 077588e2a4 Removed references to quiz 2006-03-20 20:19:29 +00:00
stronk7 2d597adac7 Automatic installer.php by installer_builder (20060320) 2006-03-20 16:25:00 +00:00
moodler 2c0be8da59 Rename a link 2006-03-20 15:56:19 +00:00
moodler 356d76d5f3 Tidy form a tiny bit 2006-03-20 15:55:08 +00:00
moodler e037ed244a Some new default styles for generaltables 2006-03-20 15:44:07 +00:00
moodler 5889c1bb64 Small fix for admin menu layout and also print_table 2006-03-20 15:33:18 +00:00
moodler 8e62501630 Slight, temporary fix for one thing caused by new print_simple_box (see bug 4943) 2006-03-20 15:27:35 +00:00
thepurpleblob 9ecf1c7727 Removed comments for global filter settings.
These now have a GUI option on the admin=>filters page
2006-03-20 15:06:10 +00:00
thepurpleblob 2a8dfb5caa Added explanatory note about encodings in imported files. 2006-03-20 13:48:33 +00:00
moodler 6887074b40 New string 2006-03-20 13:12:21 +00:00
moodler ee64892aae Some new strings 2006-03-20 12:50:22 +00:00
moodler ebb73f49b8 RSS should be fully working now
but phew, we need to clean up that old simpblog stuff with all the wierd
variable names.  ;-)
2006-03-20 12:45:36 +00:00
moodler 952d8dc87c Speedup! get_timezone_record wasn't caching! :-) 2006-03-20 09:36:47 +00:00
ikawhero f3ea6dfaaa Block for listing blog tags 2006-03-20 08:28:25 +00:00
moodler 9a8091a9ab Put some default times in for people who were tracking dev 2006-03-20 07:47:41 +00:00
moodler 2d642a137c Add timemodified to blog_tag_instance records and some clean up 2006-03-20 07:45:55 +00:00
moodler 6a30c073d4 Added timemodified to blog_tag_instance table and some indexes 2006-03-20 07:40:55 +00:00
moodler 112d0ebf82 Added a new field "module" to the post table to indicate what type of module
each entry is
2006-03-20 07:13:21 +00:00
moodler 490201c75c tag support in rss 2006-03-20 05:48:40 +00:00
moodler a9743837bf SLightly more efficiency to help keep the cached_text table smaller see bug 4677 2006-03-20 02:33:41 +00:00
stronk7 c47a030a0b Email encoding only can be specified if $CFG->unicodedb=true 2006-03-19 20:42:34 +00:00
gustav_delius 7347c60b52 Teacher-provided text is now printed without cleaning. 2006-03-19 19:49:37 +00:00
gustav_delius 3abfa3a013 Show All link below question list. 2006-03-19 19:23:07 +00:00
gustav_delius d38bd8c1be Removed a notice 2006-03-19 18:33:35 +00:00
gustav_delius afabbb3374 Almost forgot to take out diagnostic echo 2006-03-19 18:31:48 +00:00
gustav_delius f30bbcaf5b Improved handling of event types so that now graded states can always be distinguished from ungraded ones. 2006-03-19 18:28:29 +00:00
gustav_delius 43a602a7a6 Small correction to comment 2006-03-19 12:19:49 +00:00
stronk7 8abebd1e5b Notice killing... ;-) 2006-03-19 11:13:16 +00:00
stronk7 a848411a3b Notice killing... ;-) 2006-03-19 11:10:25 +00:00
gustav_delius 570c30aaa0 slightly more informative error message 2006-03-19 11:05:04 +00:00
gustav_delius b2315a929d Don't try to recode empty answers. 2006-03-19 11:03:12 +00:00
gustav_delius 96e5e2e251 I hadn't known that ! has higher precedence than == 2006-03-19 11:02:36 +00:00
gustav_delius 18bd0d680c miniscule change: subquestion code only has to be unique within question 2006-03-19 10:43:12 +00:00
gustav_delius 549880a59d temporary fix to essay print_question... This really should be converted to using templates. 2006-03-19 10:21:23 +00:00
stronk7 afe7f09506 Automatic installer.php by installer_builder (20060319) 2006-03-19 10:04:24 +00:00
gustav_delius c0749a1605 Fixed backup and restore for match questions 2006-03-19 09:50:43 +00:00
gustav_delius 28b904c8c2 Fixed multichoice restore
Print message when recoding fails
2006-03-19 09:20:42 +00:00
stronk7 39aed89b8b Now the user emailcharset setting can fallback to the site emailcharset setting. 2006-03-19 02:46:56 +00:00
stronk7 c539d6224b Now encode_mimeheader() only encodes the header if it isn't 100% ASCII. 2006-03-19 02:38:21 +00:00
stronk7 56a2b987e6 Starting NOW we are using our own encode_mimeheader() function to
generate all Moodle emails. Only applied if we are running under
$CFG->unicodedb. Tested with postfix and sendmail servers and
Thunderbird, Mail and Entourage mail clients...

Test, test, test....!
2006-03-19 02:35:50 +00:00
mark-nielsen 8bd7bacd14 [Fixed] this page was shooting of warnings for unset variable score. Now checks to make sure score is set before using it. 2006-03-19 02:16:00 +00:00
mark-nielsen aeade7e227 cleaned up the left menu feature output by removing an unused form and several unnecessary string concatenations 2006-03-19 02:08:37 +00:00
stronk7 fbf7e289a9 Updating phpmailer to 1.73. Some bugs solved. 2006-03-19 02:07:51 +00:00
stronk7 b4750d4d7f Updating phpmailer to 1.73. DOS linefeeds are now out. 2006-03-19 02:06:06 +00:00
stronk7 376508306e Updating phpmailer to 1.73. Language files. 2006-03-19 02:03:02 +00:00
mark-nielsen 289218844a [Changed] The print_simple_box_start/stop changes conflicted greatly with the display of branch table buttons (the box printed above the buttons some how :( ) To fix this, the tables were taken out and divs were used instead to display and arrange the buttons. This turns out to be a good thing because now the user has more control over the buttons via style sheet. Also did some extra clean up in the section of code printing the branch table.
[Added] new styles to styles.php to help display the buttons correctly.
2006-03-19 01:53:50 +00:00
stronk7 3ec5ec15bc Function encode_mimeheader() added. Finally, it seems that we have to
use our own function because phpmailer one doesn't handle multi-byte
characters, breaking them.
2006-03-19 01:09:15 +00:00
gbateson d95bcfff8d increase gap size for long answers in JCloze 2006-03-18 23:47:56 +00:00
koenr 250091b6ca these files have two titles 2006-03-18 20:52:50 +00:00
koenr 56dda82175 changed titles to Moodle standard helpfile titles 2006-03-18 20:41:24 +00:00
stronk7 b212c114ce First cut of email working with any encoding. Works practically ok but
I've to check something that seems to be a bug in the build of the
subject. Sendind it to CVS to check the code under Win32 and Linux.
2006-03-18 17:48:52 +00:00
gustav_delius ccccf04f70 Multianswer restore now works.
Timelimit is rounded to integer before saving in the database
Some more diagnostic error messages
Towards more plugable question types: $QUIZ_MENU is now populated by the question types themselves.
2006-03-18 14:14:55 +00:00
skodak a4b3fc9220 fixed warning 2006-03-18 10:07:35 +00:00
moodler 884dc7861a Fixed case for multiple grops 2006-03-17 17:17:51 +00:00
stronk7 36bd0b29a4 Automatic installer.php by installer_builder (20060317) 2006-03-17 16:27:55 +00:00
moodler 6b09974ba2 Added the missing support for typex fields! 2006-03-17 16:19:31 +00:00
nfreear 11154cb8fe Accessibility: updated the "help prefix" - spoken 'colon' to silent ',' 2006-03-17 13:01:55 +00:00
nfreear 5288e4a5ff Accessibility: tidied, removed commented code functions, print_simple_box_start, _end (followup to OU-Bugz: 737) 2006-03-17 12:27:18 +00:00
nfreear b7fb26437d Accessibility: tidied, scripted the validator links, added 'skip block' explanation, removed MIME type, 'no new window' notes. Updated javascript, image sections. 2006-03-17 11:53:13 +00:00
nfreear 334cefd2e3 Accessibility: TODO: link to; synchronise with accessibility status. Help page sections - accessibility statement, access keys, links, images, standards compliance. 2006-03-17 11:39:31 +00:00
nfreear 3e0bacff76 Accessibility: function calendar_top_controls, tidy up commented code. 2006-03-17 10:53:15 +00:00
moodler 6619a7f4a3 iImproved RSS 2006-03-17 09:48:24 +00:00
moodler a848c48cf3 Just pushing the RSS a bit further, it's not tested properly yet 2006-03-17 09:11:06 +00:00
moodler 66c52fdfb4 Just tweaking 2006-03-17 08:20:28 +00:00
toyomoyo 0deaa99354 blog not blogs 2006-03-17 08:13:48 +00:00
toyomoyo ab7d76bb5a naming consistency 2006-03-17 08:13:27 +00:00
danstowell 95a86f752b Fixes to rsslib to ensure the output is valid RSS 2.0 2006-03-17 07:44:22 +00:00
toyomoyo 516194d0e8 made some changes to allow rss feeds 2006-03-17 07:38:08 +00:00
toyomoyo 7fe0ce4e6a had to change this a bit because blogs use different location to store rss, as it is not a module, please warn if this is a security issue 2006-03-17 07:37:27 +00:00
toyomoyo 29e2dd37ea took out rss stuff 2006-03-17 05:54:46 +00:00
toyomoyo 1e1ba8c295 change in publish states 2006-03-17 05:53:52 +00:00
vyshane 663b45a86d Fixed php notice 2006-03-17 04:51:14 +00:00
mark-nielsen 0646963948 [Changed] function execute_teacherwarning to function lesson_display_teacher_warning because it was violating the function naming policy 2006-03-17 03:37:31 +00:00
mark-nielsen 4b55d2aff2 [Added] added phpdoc comments to locallib.php 2006-03-17 03:31:19 +00:00
mjollnir_ aa898e41c1 Stickyblocks: fool pagelib into thinking it is course-view when it needs to be, rather than admin-stickyblocks 2006-03-17 03:17:44 +00:00
gustav_delius c6abbe5e39 Some incomplete work on the restore code (committing only because I am moving to a different machine) 2006-03-16 21:17:31 +00:00
jgraham909 53f6a21e5e Fixed grade_category table definitions to handle change in MySQL versions 5.0.3 and greater
see http://moodle.org/mod/forum/discuss.php?d=41501 for more details.
2006-03-16 19:50:28 +00:00
patrickslee 17eef684ae Fixed a typo in the last authorize.net patch from Ethem 2006-03-16 19:32:17 +00:00
nfreear 2e94cf0c09 Accessibility: incidental image - should be empty Alt text; removed unnecessary height/width (OU-Bugz: 696, 697) 2006-03-16 11:51:19 +00:00
nfreear c14d100161 Accessibility: strict, removed unnecessary alt="search" from <input type="text">. 2006-03-16 11:47:38 +00:00
nfreear eab1f9aebd Accessibility: do NOT change, fixed call to trim in function, helpbutton (OU-Bugz: 752) 2006-03-16 11:13:21 +00:00
nfreear 97f76a1aa3 weblib.php: replaced <table> in print_simple_box_start _end with <div>s (OU-Bugz: 737) 2006-03-16 11:03:02 +00:00
danstowell bce7a133b9 Re bug 4640 - enabled filtering for attachment link HTML - enables MP3 uploads to use mediafilter, for example 2006-03-16 10:36:54 +00:00
skodak e520147b60 fixed Bug #4855, too much info saved in db. 2006-03-16 10:22:40 +00:00
skodak 6381d41aba fixed problem when saving module settings 2006-03-16 10:11:06 +00:00
vyshane 4379c8e9bb W3C validation and misc code cleanup. 2006-03-16 08:49:20 +00:00
toyomoyo d87c9c6ea0 if not logged in, can not edit page. tags + 2 spaces 2006-03-16 08:45:39 +00:00
toyomoyo a093387b92 if htmleditor is on, only show html format 2006-03-16 08:32:29 +00:00
toyomoyo 3d624b9831 formattign issues 2006-03-16 08:22:53 +00:00
toyomoyo ae8a5ff023 added blog link to print_user 2006-03-16 08:16:08 +00:00
toyomoyo e97e16dfe2 min pagesize = 1 2006-03-16 07:55:22 +00:00
toyomoyo 12e01c0ce3 can not see links if not logged in 2006-03-16 07:51:12 +00:00
toyomoyo 4fc479666f rmoved batchpublish in lib, add new entry link on top 2006-03-16 07:47:37 +00:00
toyomoyo debaed9f71 case insensitive tag search 2006-03-16 07:41:26 +00:00
moodler aad6de9208 Simplified 2006-03-16 07:22:58 +00:00
toyomoyo 3daaa61811 more cleaning 2006-03-16 06:16:54 +00:00
vyshane a2c28054b8 Added $CFG->pagepath to the blocks_execute_action() function for the config
action. This is used to generate the Moodle Docs URL for configuration of an
instance of a block.
2006-03-16 04:55:43 +00:00
toyomoyo 60534cfc9c more cleaning for filter class 2006-03-16 04:33:47 +00:00
toyomoyo 91366ca7dd more cleaning 2006-03-16 04:21:13 +00:00
vyshane a0fd7c1df8 Updated print_textarea() 2006-03-16 03:56:19 +00:00
toyomoyo c0778901fd more cleaning 2006-03-16 03:42:56 +00:00
michaelpenne 2ea3451018 SQL error occured when viewing this page and no questions have been added to the quiz. This has been fixed. 2006-03-16 03:26:49 +00:00
toyomoyo 40b6323cd0 fixed a bug where using tag to search blogs, nav menu is not working 2006-03-16 02:01:55 +00:00
skodak 09eb1e9e28 fixed live link 2006-03-15 21:05:19 +00:00
skodak 838231ff95 fixed broken log links in admin menu; I noticed it some time ago, the merge seems to be finished - I decided to fix it now 2006-03-15 21:03:45 +00:00
skodak f89f924e03 fixed debug warning 2006-03-15 20:50:05 +00:00
gustav_delius 5872b4cca3 Fixed typo giving sesskey error 2006-03-15 20:25:49 +00:00
skodak 9bc78f8456 fixed typo PARAM_CLEAR 2006-03-15 18:08:24 +00:00
nfreear 3fb99e7352 Accessibility: fix removed .navbar { height }, admin view in Opera 8 (OU-Bugz: 750) 2006-03-15 15:33:19 +00:00
nfreear ee692a4210 Accessibility: fix - darker, 'weeks' course format - date text too pale (OU-Bugz: 751) 2006-03-15 15:26:15 +00:00
nfreear 1b3a4c8f1c Accessibility: 'weekscss' course format - layout table of weeks, now a list. 2006-03-15 15:20:53 +00:00
koenr ba54314b58 typo 2006-03-15 14:25:58 +00:00
nfreear 2f8a4d8548 Accessibility: improved class-name semantics, matches 'weeks' course format. 2006-03-15 11:02:42 +00:00
nfreear 2bf0e5e2a9 Accessibility: added title to envelope link, replaced img width/height (OU-Bugz: 697,736) 2006-03-15 10:42:50 +00:00
nfreear ce148ff57e Accessibility: critical fix (editing on), filled empty Alt-link text, times 6 (OU-Bugz: 744) 2006-03-15 10:26:56 +00:00
nfreear d57be0a8b4 Accessibility: strict, replaced image border, width... with classes (OU-Bugz: 697, 745) 2006-03-15 10:23:09 +00:00
moodler e7fea10028 Don't use isteacher() 2006-03-15 10:05:19 +00:00
moodler fe5a1e23b3 Remove hardcoded box size for My Moodle 2006-03-15 09:59:28 +00:00
moodler 9cba7a8c80 Added some more efficiencies to the code, but something seems to be wrong
with this function as the SQL is not finding any new posts at all for me.

Needs checking!
2006-03-15 09:56:57 +00:00
nfreear a328113f13 Accessibility: validation, missing 'alt' attribute, near $strshowallweeks (OU-Bugz: 741) 2006-03-15 09:56:40 +00:00
moodler e23800b7b5 Fixed classes for styles in forum overview in My Moodle 2006-03-15 09:50:42 +00:00
nfreear 99499e69a4 Accessibility: validation, erroneous & replaced with &amp; call to popup_form (OU-Bugz: 735) 2006-03-15 09:42:37 +00:00
toyomoyo aebb940968 ";" 2006-03-15 09:14:38 +00:00
toyomoyo fd40fbb2bd added cancel button for preference 2006-03-15 09:13:34 +00:00
toyomoyo 20fc0f2655 took out courseid and groupid 2006-03-15 08:49:33 +00:00
vyshane 540f964d92 Fixed undefined var notice 2006-03-15 08:40:56 +00:00
vyshane 80743e2a5b Fixed bug in use_html_editor() that prevented HTMLArea display if $name is not
provided.
2006-03-15 08:30:03 +00:00
moodler 6d74edf770 Link to logs now available through reports (SE) 2006-03-15 08:08:20 +00:00
moodler ff6f951197 Log reporting. (SE) 2006-03-15 08:07:14 +00:00
moodler 4d70ff5c51 Changed to full urls as we will be linking to here from the admin reports (SE) 2006-03-15 08:05:34 +00:00
vyshane d87f8b6f33 Made gen_textarea() use print_textarea() function from /lib/weblib.php 2006-03-15 07:42:01 +00:00
toyomoyo 32a2647e02 took out a form tag 2006-03-15 07:14:39 +00:00
ikawhero 7c4b2fb3c2 Removed redundant if statement 2006-03-15 06:38:28 +00:00
vyshane 035d465cb6 Made added $return argument to print_textarea() function. 2006-03-15 05:38:02 +00:00
toyomoyo 924f20e221 many functions removed, might have broken a few things 2006-03-15 04:15:09 +00:00
moodler a2a3733666 iFIx up some styles for the MyMoodle overview 2006-03-15 04:01:10 +00:00
moodler 5d45c04fce More styles for My Moodle 2006-03-15 03:47:08 +00:00
moodler a7a74d7706 Added some styles 2006-03-15 03:42:51 +00:00
moodler 76a60031d0 All the assignment classes no longer need to be loaded, and removed some notices 2006-03-15 03:36:33 +00:00
vyshane 5f9b13b860 Updated use_html_editor() and print_editor_config() 2006-03-15 03:12:28 +00:00
vyshane 6b9dbb377f Textarea field now uses functions use_html_editor() and print_editor_config()
form /lib/weblib.php. It's been decided that the minimum requirements for the
database module will be 1.5.3+ stable. Will commit updates to the above two
functions to 1.5.3+ stable once they have been tested on stable.
2006-03-15 03:11:25 +00:00
toyomoyo b2cda3d13a taking out extendedbody 2006-03-15 02:32:46 +00:00
toyomoyo e17426ca5f more cleaning 2006-03-15 02:17:35 +00:00
toyomoyo f99fee6c71 more cleaning, filter do not process dates 2006-03-15 02:02:25 +00:00
patrickslee 9ca0187e16 Chat module support for my moodle page 2006-03-14 22:28:28 +00:00
patrickslee 101e9cad48 Dim link if not visible in my course view for assignment module 2006-03-14 22:05:16 +00:00
patrickslee 84fa8f5fdd Assignment module support for my moodle page 2006-03-14 21:26:37 +00:00
stronk7 33b58d3a21 Automatic installer.php by installer_builder (20060314) 2006-03-14 17:43:30 +00:00
nfreear bde7173de0 Accessibility: fixed bug 4921, Editing on: block delete, 'move down'... icons too big... CSS selector (OU-Bugz: 747) 2006-03-14 17:35:31 +00:00
nfreear b3d26d8d57 Accessibility: critical fix (editing on), filled empty Alt-link text, times 6 (OU-Bugz: 744) 2006-03-14 16:45:34 +00:00
nfreear dfdcd09b2d Accessibility: strict, replaced image border, width... with classes (OU-Bugz: 697, 745) 2006-03-14 16:17:21 +00:00
thepurpleblob ced7916cee More coding style improvements. 2006-03-14 16:01:40 +00:00
nfreear 81d33f6355 Accessibility: validation, missing 'alt' attribute, near $strshowallweeks (OU-Bugz: 741) 2006-03-14 15:36:48 +00:00
nfreear be37f335fc Accessibility: validation, erroneous & replaced with &amp; popup_form (OU-Bugz: 697) 2006-03-14 15:17:03 +00:00
nfreear 4025f33ac1 Accessibility: added class="weekscss", removed commented code. 2006-03-14 15:11:30 +00:00
nfreear 3182eb7832 Accessibility: (strict HTML) remove unnecessary width/height attributes on <img> (OU-Bugz: 697) 2006-03-14 14:05:51 +00:00
nfreear ea78c234f9 Accessibility: fixed ambiguous asterisk next to 'edit profile', with title and hidden text (OU-Bugz: 733). 2006-03-14 12:55:06 +00:00
thepurpleblob fd14913ed6 fixed yet another missing courseid parameter :-) 2006-03-14 09:57:54 +00:00
nfreear 11a0b96a4b Accessibility: fix, removed string 'today', which duplicates the calendar string. 2006-03-14 09:54:49 +00:00
toyomoyo 61ca5f8dd3 quoting tag string 2006-03-14 09:08:58 +00:00
vyshane c969c28772 Made textarea field use use_html_editor() and print_editor_config() from
/lib/weblib.php. Removed these functions from
/lib/mod/field/textarea/field.class.php. Will commit updates to these
functions to Moodle 1.5 Stable. Database module will only be compatible with
the latest Moodle 1.5 Stable and onwards.
2006-03-14 08:32:14 +00:00
toyomoyo b7dc1805f3 fixed a bug where userid is overwritten 2006-03-14 08:07:57 +00:00
toyomoyo 772c526064 deletion confirmation 2006-03-14 07:02:50 +00:00
toyomoyo 1a3f39f1c6 added sesskey and confirmation for deletion of blog entries 2006-03-14 06:56:58 +00:00
toyomoyo 7ffb7e9cc7 more cleaning 2006-03-14 06:36:51 +00:00
vyshane 1b426aefb6 Fixed javascript bug. Clicking on a template tag now inserts the tag into the
textarea in both wysiwyg and non-wysiwyg modes.
2006-03-14 05:56:14 +00:00
vyshane d02d138070 Clicking on a template tag e.g. [[field_name]] now adds the template tag to
the HTMLArea editor in the template views. This is not currently working in
source code mode of the editor.

Added equivalent of use_html_editor() and print_editor_config() from
/lib/weblib.php to textarea field class. We use a copy in that class instead of
calling the functions in /lib/weblib.php because we want the data module to be
compatible with Moodle 1.5. This is not ideal, but it is a necessary evil.

Updated the textarea field class to use the correct path to
/lib/editor/htmlarea/htmlarea.php.
2006-03-14 05:32:41 +00:00
vyshane d13c59383a Added javascript function insertAtCursor() 2006-03-14 05:26:40 +00:00
vyshane 3afc728f5c Changed use_html_editor and print_editor_config functions so that we have an
editor javascript object that we can use when we create the HTMLArea editor.
This object allows us to call e.g. editor.insertHtml().
2006-03-14 05:26:03 +00:00
toyomoyo 3a90f3896a housekeeping 2006-03-14 04:23:00 +00:00
moodler 54bf5de8d2 Merged fix for bug 4639 from stable 2006-03-14 04:12:52 +00:00
patrickslee cd9afe2ff6 Set default enrolment plugin to manual if the previous default is not an interactive enrolment plugin 2006-03-14 03:02:12 +00:00
patrickslee f182aaf1b5 Serious typo in postgres7 upgrade script 2006-03-14 02:52:34 +00:00
toyomoyo 954cfa1bfa httpclient only used in trackbacks, which is not supported in this version, removed 2006-03-14 02:46:46 +00:00
toyomoyo 752c0c4d29 some cleaning, removed config.html for admin 2006-03-14 02:26:44 +00:00
skodak 4f01826a27 removed $SESSION->encoding now replaced by current_charset() and $CFG->unicodedb; 3rd party contribs must be fixed to be utf-8 and 1.6dev compatible anyway;
going to add a notice to wiki at http://docs.moodle.org/en/UTF-8_scripts
2006-03-13 22:26:06 +00:00
skodak a3182bd7e7 updated language detection 2006-03-13 22:11:56 +00:00
patrickslee 96a7973eb9 Updated Authorize.net for Ethem 2006-03-13 21:19:04 +00:00
patrickslee eca0392a2e Seperate postgres command line process for better error caching 2006-03-13 20:45:27 +00:00
thepurpleblob 02fecf447c Additional strings for new import feature (bug #3896) 2006-03-13 19:41:13 +00:00
thepurpleblob cbc87100f7 Added ability to import files already in the course files area. (Bug #3896)
Also started tidying up the code, more to do.
2006-03-13 19:32:42 +00:00
stronk7 38b34fb74d Automatic installer.php by installer_builder (20060313) 2006-03-13 18:57:36 +00:00
gustav_delius 7befd0188d If a student has not attempted a question then the grade column for that question will show -- instead of 0. 2006-03-13 18:36:36 +00:00
gustav_delius 3e2c988f0c Somehow missed this table reference during renaming. 2006-03-13 18:30:35 +00:00
ethem ef62312dbe You can't do this action: $a->action 2006-03-13 18:26:55 +00:00
ethem 7c824f1f63 You can't do this action: $a->action 2006-03-13 18:20:08 +00:00
stronk7 d685d03e31 Automatic installer.php by installer_builder (20060313) 2006-03-13 18:03:43 +00:00
ethem a6c656065c Students can view their payments. 2006-03-13 17:57:12 +00:00
nfreear 222caf2793 Accessibility: replace navbar table with <div> for standard theme, shouldn't break other themes (OU-Bugz: 729) 2006-03-13 17:54:52 +00:00
stronk7 ec4e56f518 Automatic installer.php by installer_builder (20060313) 2006-03-13 17:54:27 +00:00
stronk7 c2faf8ab3b Automatic installer.php by installer_builder (20060313) 2006-03-13 17:46:09 +00:00
nfreear 90b7674ac4 Accessibility: fix, forum search button, breadcrumb image (Email: Eloy stronk7, 9 March, OU-Bugz: 720) 2006-03-13 17:37:15 +00:00
nfreear 51250e7573 Accessibility: fix, doubled size of Resizable icons, now 2em or 21 by 23 pixels (OU-Bugz: 728) 2006-03-13 17:33:14 +00:00
stronk7 caa96952c1 Automatic installer.php by installer_builder (20060313) 2006-03-13 17:28:34 +00:00
stronk7 63bfa464b4 Automatic installer.php by installer_builder (20060313) 2006-03-13 17:26:14 +00:00
stronk7 b6ffab3f81 Automatic installer.php by installer_builder (20060313) 2006-03-13 17:20:52 +00:00
tjhunt d2176fb2f1 For some arguments, get_record_sql could fail only with debug off, then no error message is shown and it is hard to debug. Now the code is more similar between debug on/off, which should make debugging easier. 2006-03-13 17:07:38 +00:00
ethem e57facac59 Teachers can manage the payments of the course. 2006-03-13 16:54:09 +00:00
ethem 843d9bdc42 Now, teachers can manage the payments in their courses if admin set up this. 2006-03-13 16:47:44 +00:00
sam_marshall f95310d224 Corrected line that would cause restore_create_modules to return True if the first module fails to restore, but the second succeeds. (Whereas it would already be False if the first succeeds, but second fails.) 2006-03-13 16:32:22 +00:00
nfreear 3a8ad5764f Accessibility: calendar <abbr> and link styles. 2006-03-13 16:16:23 +00:00
nfreear 40d34f9e3c Accessibility: fix, weblib.php: print_navigation, class="resize" (Martin D post 10/3, OU-Bugz: 726) 2006-03-13 14:46:05 +00:00
nfreear 531a574aff Accessibility: fix, use $CFG->pixpath, clearer image-names (Martin D post 10/3, OU-Bugz: 718) 2006-03-13 13:32:19 +00:00
moodler fd6590a987 Fix for bug 4875 which was only happening on MySQL 5 2006-03-13 12:43:01 +00:00
ethem 3a36b0b6f3 Users can view their orders... 2006-03-13 11:15:09 +00:00
nfreear e996ef5d94 Accessibility: fix, use $CFG->pixpath, clearer image-names (Martin D post 10/3, OU-Bugz: 718) 2006-03-13 10:49:41 +00:00
tjhunt e8395a09f4 Added a comment to explain that add_to_log is the way it is for performance reasons. 2006-03-13 10:37:21 +00:00
ikawhero df44f29a89 Changed a string 2006-03-13 09:29:44 +00:00
toyomoyo 86b67cc21c fixing 1 wrong string 2006-03-13 08:55:33 +00:00
toyomoyo 5c625033c0 _params and other cleaning, blogs might be broken 2006-03-13 08:46:13 +00:00
moodler 25a784066a Moved some strings! 2006-03-13 07:54:44 +00:00
ikawhero 03d843b2dc Added another extension for Real Media. This should cover all the file
types for which you would want to embed a player or give you a way to do
it eg writing an ram or rpm file.
2006-03-13 07:21:50 +00:00
ikawhero 6fe1db7e74 Added another string for Real Media 2006-03-13 07:19:06 +00:00
ikawhero d539ccf3e8 Added support for .ram files and added config settings. 2006-03-13 06:16:23 +00:00
ikawhero a68dc79623 Added strings for realmedia filter 2006-03-13 06:14:39 +00:00
toyomoyo b37a5f51fc adding some strings 2006-03-13 06:10:45 +00:00
toyomoyo 7b07bc5553 changed a string 2006-03-13 06:09:44 +00:00
toyomoyo 9154b44000 some cleaning, not very clean yet 2006-03-13 06:05:44 +00:00
mjollnir_ d355395199 Fixing my moodle bug in forum track posts display 2006-03-13 00:42:01 +00:00
gustav_delius b9618e80bd Truncated long action name in log, see http://moodle.org/mod/forum/discuss.php?d=41446#190858 2006-03-13 00:21:35 +00:00
gustav_delius 31d21f22a5 Better display of response history 2006-03-13 00:20:34 +00:00
gustav_delius 12fcd27da6 Some work on question restore code, not complete 2006-03-13 00:18:38 +00:00
mjollnir_ d348b6f2b0 Adding new mdl_log indexes to the .sql files as well as just the pg ones (bug #4112), plus a few postgres fixes for blog 2006-03-12 23:20:47 +00:00
mjollnir_ 65070e3c03 Adding new mdl_log indexes to the .sql files as well as just the pg ones (bug #4112) 2006-03-12 23:19:17 +00:00
patrickslee ef03a260e5 PostgreSQL 7.x pg_dump command line options fix 2006-03-12 21:40:24 +00:00
gustav_delius b2b97d6834 Every questiontype should have its own backup and restore code. This is a first step in that direction. I have created the individual restore libraries for all question types but they are not yet used. 2006-03-12 21:27:14 +00:00
gustav_delius 32a189d636 More renamings to separate questions from quiz. Some other small fixes. 2006-03-12 21:17:42 +00:00
skodak 4352f048f5 workaround for some more uninitialized offset warnings 2006-03-12 20:06:12 +00:00
patrickslee 6a3a3f079f Added payment icon for authorize.net plugin 2006-03-12 19:53:20 +00:00
gustav_delius b0fb1e836b Default values for quiz_delay1 and quiz_delay2 2006-03-12 19:23:55 +00:00
gustav_delius 1bfdafd475 The box for the warning was too narrow. In future this should probably be controlled by CSS. 2006-03-12 19:14:56 +00:00
urs_hunkler 26b820a501 splitted CSS for questions in layout, fonts and color specific properties. 2006-03-12 13:36:18 +00:00
moodler ce39b5f7b1 Questions have moved 2006-03-12 08:11:08 +00:00
moodler 6ac7e7c51a Tidy cron warning 2006-03-12 08:08:51 +00:00
moodler d150048049 Updated README 2006-03-12 08:04:29 +00:00
moodler e0c6a2c643 Removed bad link from admincronsetup (bug 4759) 2006-03-12 07:55:50 +00:00
moodler af6c3dc345 Updated the cronwarning string to remove old link 2006-03-12 07:52:28 +00:00
moodler 0301965a28 Fix the cron help to point to the new help page in lang packs 2006-03-12 07:51:53 +00:00
moodler 44e029bb4c New cronwarning2 string (see bug 4759) 2006-03-12 07:33:42 +00:00
moodler 15bb726f62 Moved basic install info from doc to help 2006-03-12 07:31:36 +00:00
stronk7 8b7d1cfc7e Automatic installer.php by installer_builder (20060311) 2006-03-11 19:49:37 +00:00
mits d01d5040b3 added tabs background color on quiz module. 2006-03-11 19:00:47 +00:00
skodak df1931578a password handling refactoring and added conversion of passwords to unicode 2006-03-11 11:26:36 +00:00
michaelpenne c5b71097bc [BugFix] Bug #4852 - HTML editor problems 2006-03-11 00:23:21 +00:00
stronk7 cdef6d4211 New-improved installer. Now it allows to download the langpack
from download.moodle.org and some other minor tweaks solved.
2006-03-11 00:03:51 +00:00
stronk7 f662060c93 Updated a bunch of installation strings. Thanks to WildGirl
(my online English dictionary and grammar checker)
2006-03-10 23:51:15 +00:00
stronk7 6eb6ca89a3 Automatic installer.php by installer_builder (20060311) 2006-03-10 23:43:23 +00:00
stronk7 a86b38051d Automatic installer.php by installer_builder (20060311) 2006-03-10 23:22:18 +00:00
stronk7 30f0de391e Automatic installer.php by installer_builder (20060311) 2006-03-10 23:17:14 +00:00
stronk7 d35b53595b Automatic installer.php by installer_builder (20060310) 2006-03-10 22:55:40 +00:00
ethem 235a90f9b6 Course filter is added to payment management page.
Show the enrolment method of course is 'authorize.
2006-03-10 20:05:24 +00:00
stronk7 9e5588572b Automatic installer.php by installer_builder (20060310) 2006-03-10 18:56:57 +00:00
stronk7 b065b7e149 Automatic installer.php by installer_builder (20060310) 2006-03-10 18:52:11 +00:00
stronk7 6df9bd8ebc Automatic installer.php by installer_builder (20060310) 2006-03-10 18:19:55 +00:00
stronk7 15448980ce Automatic installer.php by installer_builder (20060310) 2006-03-10 17:52:19 +00:00
stronk7 ad09e2edc8 Automatic installer.php by installer_builder (20060310) 2006-03-10 17:37:45 +00:00
stronk7 21fa4b99d2 Automatic installer.php by installer_builder (20060310) 2006-03-10 17:28:30 +00:00
stronk7 8f0bde00e3 Automatic installer.php by installer_builder (20060310) 2006-03-10 17:08:22 +00:00
nfreear 892f55b6df Accessibility: fix, use $CFG->pixpath, clearer image-names (Martin D post 10/3, OU-Bugz: 718) 2006-03-10 17:02:22 +00:00
nfreear 3034bd23ef Accessibility: fix, replace <i> with <span> (Martin D post 10/3, OU-Bugz: 717) 2006-03-10 16:46:19 +00:00
stronk7 ff6f5a59c1 Automatic installer.php by installer_builder (20060310) 2006-03-10 16:07:11 +00:00
danstowell 87c429a650 Updating a ref to the moved enrolment helpfile 2006-03-10 15:51:45 +00:00
danstowell 57bcbe80c2 Moving help refs from enrol-imsenterprise to enrol/imsenterprise 2006-03-10 15:50:30 +00:00
danstowell 89f8a234d5 Moving enrol-imsenterprise to enrol/imsenterprise 2006-03-10 15:48:41 +00:00
danstowell 395ec1ed68 Some small changes to IMS Enterprise enrol - improved some logic and logging 2006-03-10 13:07:48 +00:00
koenr 4369f73ea7 file dms.php was initially added on branch MOODLE_15_STABLE. 2006-03-10 12:55:03 +00:00
koenr d3a26b97a1 file message.php was initially added on branch MOODLE_15_STABLE. 2006-03-10 12:55:03 +00:00
thepurpleblob 7277ee54ca Removed bad bad bad isset_param() function. 2006-03-10 11:11:32 +00:00
thepurpleblob bc5e4b1cbe Whoops... missed one. 2006-03-10 11:08:50 +00:00
thepurpleblob 63d2ed1aa3 Getting rid of those isset_param() calls. 2006-03-10 11:07:10 +00:00
ikawhero 685cf3d6c4 More tidying up 2006-03-10 09:16:11 +00:00
moodler 3515ae35e2 Just spacings 2006-03-10 09:08:59 +00:00
moodler 7261578f34 Fixing typos 2006-03-10 09:08:04 +00:00
moodler d0c231688c Cleaning 2006-03-10 09:06:16 +00:00
ikawhero 9f69862640 Tidying up some accessibility changes 2006-03-10 08:57:22 +00:00
moodler 9191e2b581 Updated the new "help prefix" which just looked plain wierd 2006-03-10 08:52:11 +00:00
ikawhero fa80db235c Minor change to language string 2006-03-10 08:42:08 +00:00
ikawhero 417195c1c1 SQL fix 2006-03-10 08:36:04 +00:00
moodler c4d044b5e3 Updated copyright notice 2006-03-10 08:28:59 +00:00
ikawhero 20b4bd4358 A few minor changes 2006-03-10 08:25:03 +00:00
ikawhero 9dd5dabb61 Fixed typo 2006-03-10 08:21:59 +00:00
ikawhero 9a381dcc00 Added new string 2006-03-10 08:14:43 +00:00
ikawhero d33a06d554 Old admin reports is now a pluggable report type 2006-03-10 08:07:08 +00:00
ikawhero 27b5a24ad7 Moving files to new pluggable directory 2006-03-10 07:50:30 +00:00
ikawhero eaad0cb614 Adding new pluggable reports 2006-03-10 07:46:24 +00:00
moodler 73a60fc04d file enrol_internal.php was initially added on branch MOODLE_15_STABLE. 2006-03-10 07:27:54 +00:00
moodler f403f224dc file lesson.php was initially added on branch MOODLE_15_STABLE. 2006-03-10 07:27:54 +00:00
moodler c00dc833a3 file enrol_flatfile.php was initially added on branch MOODLE_15_STABLE. 2006-03-10 07:27:54 +00:00
moodler cd59c11044 file enrol_database.php was initially added on branch MOODLE_15_STABLE. 2006-03-10 07:27:54 +00:00
moodler c7e5f61438 file scorm.php was initially added on branch MOODLE_15_STABLE. 2006-03-10 07:27:54 +00:00
moodler 0819ed2a64 file appointment.php was initially added on branch MOODLE_15_STABLE. 2006-03-10 07:27:54 +00:00
moodler 687d9cd595 file install.php was initially added on branch MOODLE_15_STABLE. 2006-03-10 07:27:54 +00:00
moodler 1df010d740 file hotpot.php was initially added on branch MOODLE_15_STABLE. 2006-03-10 07:27:54 +00:00
moodler 568971aefb file enrol_paypal.php was initially added on branch MOODLE_15_STABLE. 2006-03-10 07:27:54 +00:00
moodler 0260f47831 file questionnaire.php was initially added on branch MOODLE_15_STABLE. 2006-03-10 07:27:54 +00:00
moodler a8461bfc35 file quiz_analysis.php was initially added on branch MOODLE_15_STABLE. 2006-03-10 07:27:54 +00:00
moodler 45dc8c0b66 file attendance.php was initially added on branch MOODLE_15_STABLE. 2006-03-10 07:27:54 +00:00
moodler b43580a0f7 file countries.php was initially added on branch MOODLE_15_STABLE. 2006-03-10 07:27:54 +00:00
moodler 8792d522f5 file quiz_responses.php was initially added on branch MOODLE_15_STABLE. 2006-03-10 07:27:54 +00:00
moodler 9222652a0b file exercise.php was initially added on branch MOODLE_15_STABLE. 2006-03-10 07:27:54 +00:00
moodler 4213fb6b3a file responsesdownload.html was initially added on branch MOODLE_15_STABLE. 2006-03-10 07:27:54 +00:00
moodler 5174a1cdc7 file responsesoptions.html was initially added on branch MOODLE_15_STABLE. 2006-03-10 07:27:54 +00:00
moodler dcd0d1437b took out a warning msg 2006-03-10 06:59:26 +00:00
toyomoyo 4a173181f4 blog (development code) 2006-03-10 06:53:01 +00:00
toyomoyo 89d38fdddc adding blog support (development code) 2006-03-10 06:50:37 +00:00
toyomoyo 6cafc73db1 blog menu block (code is in development) 2006-03-10 06:49:39 +00:00
toyomoyo ac60dc4c80 fixing missing global 2006-03-10 04:28:21 +00:00
patrickslee cb8229d0a8 UTF8 migration - now supporting PostgreSQL 2006-03-10 03:43:33 +00:00
patrickslee 6442124426 Add update_record() postgres bytea support
To get ready for the postgres utf8 migration script
2006-03-10 03:32:48 +00:00
martinlanghoff d70fd5612d block_admin: add special cases for enrol/authorize -- might need more work for multienrol 2006-03-10 02:20:56 +00:00
martinlanghoff 8c25f6f227 enrol/imsenrolment: Introducing IMS Enterprise enrolment module by Dan Stowell
IMS Enterprise 1.1 file enrolment module for Moodle
    (also reported to work with v1.01 and v1.0 data)

  (c) 2005-2006 Dan Stowell
  Released under the Gnu Public Licence (GPL)

This module was originally in contrib/enrol_imsenterprise, and a 1.5-compatible
version of the module can still be found there.
2006-03-10 02:01:06 +00:00
patrickslee 83fb39c913 rename enrol_internal.php to enrol_manual.php 2006-03-10 01:26:13 +00:00
stronk7 68a3f81d4d Now the installer will try to download the selected lang pack
from download.moodle.org to be able to continue with the
installation using such lang.
2006-03-10 01:07:41 +00:00
martinlanghoff 10741fb26e mod/resource: dos2unix on the Hive code
Some Windows newlines got in there somehow. Cleanup.
2006-03-10 01:05:52 +00:00
stronk7 844474a21b Automatic installer.php by installer_builder (20060310) 2006-03-10 00:56:14 +00:00
stronk7 77c42ea458 Added some strings to the be able to download lang packs from
the installer.

Please, check them!!!
2006-03-10 00:55:49 +00:00
stronk7 8198e4fed3 Automatic installer.php by installer_builder (20060310) 2006-03-10 00:15:13 +00:00
stronk7 87d1558be7 Automatic installer.php by installer_builder (20060310) 2006-03-09 23:59:18 +00:00
stronk7 2489a6f6fe Non-admins can use the component-install class 2006-03-09 23:55:46 +00:00
stronk7 f099f4dc12 Automatic installer.php by installer_builder (20060310) 2006-03-09 23:39:29 +00:00
stronk7 c6ebacf671 Automatic installer.php by installer_builder (20060310) 2006-03-09 23:04:23 +00:00
stronk7 d8ec84c053 Automatic installer.php by installer_builder (20060309) 2006-03-09 22:57:41 +00:00
stronk7 b9b4e32ab9 Now it's possible to use any language in the installer.
Next step: Add the possibility to download and install
the selected language from the installer.
2006-03-09 20:24:14 +00:00
stronk7 8288895c19 Automatic installer.php by installer_builder (20060309) 2006-03-09 20:11:46 +00:00
stronk7 770753855f Automatic installer.php by installer_builder (20060309) 2006-03-09 19:48:21 +00:00
stronk7 56efad85ea Initial revision 2006-03-09 19:48:21 +00:00
stronk7 6e7ed6c5ff Automatic installer.php by installer_builder (20060903) 2006-03-09 19:36:08 +00:00
stronk7 fb25dd2a86 Initial revision 2006-03-09 19:36:08 +00:00
mits fa0a43a8a5 added styles for reports. 2006-03-09 18:27:37 +00:00
stronk7 c1f6779fac If $CFG->running_installer is set, we force to retrieve
all the strings from installer.php to allow multi-lang
installations.
2006-03-09 17:43:14 +00:00
stronk7 e05fc498ea Avoid some minor notices and warnings (reported as bug 2814 to Typo3 team)
(http://bugs.typo3.org/view.php?id=2814)
2006-03-09 17:29:58 +00:00
stronk7 7dc2cdd405 Reverted latest changes. We are going to continue faithful to
Typo3 versions. We can solve this ourselves in textlib.php
2006-03-09 17:18:15 +00:00
moodler 8a8333860e Checking in some old changes 2006-03-09 16:45:25 +00:00
moodler 9b2831eb77 Fix icons 2006-03-09 16:44:57 +00:00
moodler 72d1301aa4 Some styles for reports etc 2006-03-09 16:41:37 +00:00
moodler 375013d2f1 Take away the box, so we can use CSS instead 2006-03-09 16:35:25 +00:00
moodler 17f829a765 Added security and consistent CSS 2006-03-09 16:34:24 +00:00
moodler be92c3c1a6 It's been moved 2006-03-09 16:33:56 +00:00
thepurpleblob 0399e15d90 Mostly error messages for import and export, previously hard coded. 2006-03-09 16:18:28 +00:00
thepurpleblob 1e3d6fd804 Fixed up some more links.
Fixed up a bunch of hardcoded text.
Added test for exporting category with no questions.
2006-03-09 16:17:45 +00:00
moodler 9216720058 Fixed some more paths 2006-03-09 15:24:41 +00:00
moodler e3ca6280c6 More cleanups 2006-03-09 15:21:49 +00:00
moodler 6b2f1037b3 Some cleanups 2006-03-09 15:13:02 +00:00
moodler 0cb9ec10ca FIxed bug 4903 and enrol notices 2006-03-09 14:51:28 +00:00
sam_marshall c0381e22da Added way to get a textual description of a file (e.g. 'Word document') based on its MIME type. 2006-03-09 13:14:33 +00:00
sam_marshall 3ce73b147f filelib - Added support for looking up icons via MIME type as well as via extension 2006-03-09 12:07:11 +00:00
ethem d5e50c25d5 help with $a 2006-03-09 11:35:54 +00:00
moodler 6a25f4d957 Moved a big fat log function out to course/report/log/lib.php 2006-03-09 09:50:24 +00:00
moodler bad35380c7 FIxed icon display 2006-03-09 09:49:34 +00:00
moodler 256ed9e4cd Moved these to course/report/log 2006-03-09 09:49:19 +00:00
moodler 52af9a3544 Logs have moved 2006-03-09 09:47:53 +00:00
moodler 0a935fb3c0 Added real rough new report for logs - needs work. Shane? 2006-03-09 09:45:57 +00:00
toyomoyo 1242eb8f38 Checking in some blog-related user changes for testing on
another machine
2006-03-09 09:09:20 +00:00
toyomoyo 1917efb2b2 added default for blogs 2006-03-09 09:01:40 +00:00
moodler e0dd378807 Aha 2006-03-09 08:55:41 +00:00
moodler 883fdc5241 Added newline 2006-03-09 08:45:45 +00:00
moodler 8c5ea8d5ce Look for languages in report directories too 2006-03-09 08:27:53 +00:00
moodler bcadf372af Quickly cleaning up reports
This one was the old participation report (still needs work!)
2006-03-09 08:24:10 +00:00
moodler e3f97fc284 Slight tidy-up, needs work still 2006-03-09 08:09:28 +00:00
moodler 5585348a6a Quickly moving old reports into new structure
This one is Outline Report
2006-03-09 08:06:19 +00:00
vyshane 05da418753 Added $CFG->pagepath so that the Moodle Doc URLs are generated properly for
this section.
2006-03-09 07:53:14 +00:00
moodler 2622ceb494 Renamed mod.html to mod.php 2006-03-09 07:41:59 +00:00
moodler 36245854f2 No direct inclusion 2006-03-09 07:41:18 +00:00
moodler 222aa60d3f Adding reports link. 2006-03-09 07:40:41 +00:00
moodler 3bf7fc74a4 New report plugin structure for all course reports.
More to be added soon.
2006-03-09 07:37:40 +00:00
moodler 7064007f5b Fixing the logic for the enrol upgrade 2006-03-09 06:54:31 +00:00
vyshane 53008a8d4b Added data module to list of allowed modules for the report. 2006-03-09 06:27:29 +00:00
vyshane 4c03f9209d Added functions data_get_view_actions() and data_get_post_actions() for
participation reports.
2006-03-09 06:26:42 +00:00
martinlanghoff 46a811142e [multienrol]Don't die if there's an empty directory in enrol and better strings for admin ui
The admin UI still needs a bit of wordsmithing to make it easy to understand what the model we have is.
2006-03-09 05:06:18 +00:00
martinlanghoff c6a40e74b9 [multienrol]enrol/authorize: Back put last commit - "manual" is the right name 2006-03-09 05:03:41 +00:00
martinlanghoff 7ce85a1969 [multienrol]enrol/authorize: fix references to 'internal' method 2006-03-09 04:26:37 +00:00
martinlanghoff a60952d73d [multienrol] 2006-03-09 04:22:03 +00:00
martinlanghoff aa190ccd1e [multienrol]Merged Ethem Evlice's changes to authorize.net
Minimal changes -- with this, the tip of MOODLE_16_MULTIENROL is fully merged.
2006-03-09 04:14:12 +00:00
martinlanghoff ed8365d9c2 [multienrol]Set default enrol_plugins_enabled if the variable is not set 2006-03-09 03:58:08 +00:00
martinlanghoff 9feef2bfb7 [multienrol]Rename enrolment language files according to the rename of internal plugin to manual
(and cleanup the mess I made merging files into lang/en -- sorry!)
2006-03-09 03:55:31 +00:00
martinlanghoff 4af1efecf7 [multienrol]Fixed a typo in database upgrade script. Bug #4528 2006-03-09 03:47:54 +00:00
martinlanghoff 29f8533223 [multienrol]More changes to the internal->manual transition 2006-03-09 03:46:53 +00:00
martinlanghoff 908c1ae7ac [multienrol]DB upgrade script to clean up enrol field for user_students and user_teachers 2006-03-09 03:23:07 +00:00
martinlanghoff e90737c7fe [multienrol]More changes to the internal->manual transition 2006-03-09 03:22:20 +00:00
martinlanghoff 6a2c524ca9 [multienrol]DB upgrade script to clean up enrol field for user_students and user_teachers 2006-03-09 03:20:30 +00:00
martinlanghoff a51e2a7f3b [multienrol]Renamed "internal" enrolment plugin to "manual" 2006-03-09 03:19:10 +00:00
martinlanghoff c02fdda12d [multienrol]Made upgrade script more intelligent about setting enrol_plugins_enabled 2006-03-09 03:16:17 +00:00
martinlanghoff 74da3c2c89 [multienrol]Improved get_student/teacher_courses() functions to cache enrolment type that saves lots of recursive database query 2006-03-09 03:15:42 +00:00
martinlanghoff 1919f9926e [multienrol]Replaced configuration variable override with class property 2006-03-09 03:15:01 +00:00
martinlanghoff c9e0b90be1 [multienrol]Make sure internal plugin is saved on the top so it will be called at the first place 2006-03-09 03:14:32 +00:00
martinlanghoff 54e9516e59 [multienrol]Some database upgrade to preserve the default enrolment plugin 2006-03-09 03:02:37 +00:00
martinlanghoff 4d3f4df562 [multienrol]Wrote some breif notices for the new enrolment configuration panel 2006-03-09 03:00:48 +00:00
martinlanghoff cd1d0ef61a [multienrol]Hide disabled plugins and show the name of the site default in selection list 2006-03-09 02:57:41 +00:00
martinlanghoff f5befec4e8 [multienrol]Fixed some wired characters caused by my editor 2006-03-09 02:56:44 +00:00
martinlanghoff b31c216293 [multi-enrol]Fixed a wrong URL 2006-03-09 02:54:40 +00:00
martinlanghoff f9667a5aea [multienrol]Initial commit for multi enrolment plugin feature 2006-03-09 02:48:29 +00:00
michaelpenne 379bf73893 [Added] Added lang entry for lesson_delete_course() feedback 2006-03-09 02:27:23 +00:00
michaelpenne eee850986f [Added] Added function lesson_delete_course() to clean up the lesson_default table 2006-03-09 02:26:20 +00:00
moodler 1ec13950d1 Checking in some unchecked-in code 2006-03-09 01:51:22 +00:00
patrickslee 613c1fcf49 Corrected calls to user table migration functions back to course table ones 2006-03-09 01:39:51 +00:00
skodak acc26080d6 fixed notices, the last one is quite hacky :-( 2006-03-08 21:53:53 +00:00
gbateson 330388c3ac JCloze improvements: allow gap at start of cloze and allow "0" for a gap value 2006-03-08 17:54:11 +00:00
nfreear 00e648c100 Accessibility: .calendar-controls now div and span, not <table> 2006-03-08 17:36:52 +00:00
nfreear d9a976cc39 Accessibility: lang/xx/calendar.php: add 'eventnone', lang/xx/access.php: rem 'today'. 2006-03-08 17:31:37 +00:00
nfreear 2a06efcc69 Accessibility: calendar_get_mini, table summary now multilingual; replaced table in calendar_top_controls. 2006-03-08 17:27:56 +00:00
nfreear f20c4d02b8 Accessibility: table summary and <abbr> for day abbreviations. 2006-03-08 17:03:02 +00:00
nfreear b5c42e700b Accessibility: code taken from function calendar_get_mini, for new function calendar_get_popup. 2006-03-08 16:52:23 +00:00
tjhunt 09481160db Refactor course deletion code to eliminate about 70 lines of duplication. 2006-03-08 16:10:24 +00:00
thepurpleblob 5651e89765 Added instructions for blackboard 6+ 2006-03-08 14:43:23 +00:00
thepurpleblob c6333d4de5 Added string for blackboard_6 2006-03-08 14:35:58 +00:00
thepurpleblob d1c9748130 Adding support for BlackBoard V6 (and 7). Modified from contrib version.
Needs more testing and some fixes, but more-or-less works.
2006-03-08 14:32:54 +00:00
thepurpleblob a0e512feac Fixed missing courseid param in paging bar 2006-03-08 14:27:26 +00:00
nfreear f4077420c2 Accessibility: additional styles, img.resize and .searchform button 2006-03-08 14:22:36 +00:00
nfreear 2eff1f87ef Accesibility: added 'breadcrumb' strings. 2006-03-08 14:12:04 +00:00
thepurpleblob 07663430ac Fixed some urls (mod/quiz to question). 2006-03-08 13:58:55 +00:00
thepurpleblob 5a4bcbc37c changed filename cleaning from PARAM_CLEANFILE to PARAM_FILE 2006-03-08 13:12:46 +00:00
nfreear 5496f50cae Accessibility: fixes .clearer, .skip-block, img.resize now in styles_fonts, .breadcrumb now a list. 2006-03-08 12:50:43 +00:00
nfreear 9b22400f20 Accessibility: /pix/a for accessibility and usability related images - 1em resizable. 2006-03-08 12:38:43 +00:00
nfreear 9a477f9024 Accessibility: function print_navigation now uses <ul> list, replaced &raquo; with image, fixed print_side_block using $block_id. 2006-03-08 12:33:21 +00:00
nfreear 123238d042 Accessibility: /pix/a for accessibility and usability related images - fixed path. 2006-03-08 12:24:57 +00:00
nfreear 430ac17bec Accessibility: /pix/a for accessibility and usability related images. 2006-03-08 12:20:04 +00:00
nfreear 9252cbb703 Accessibility: replaced <input type="submit"> with button-embedded image. 2006-03-08 12:11:30 +00:00
skodak 9f79b50f05 fixed missing global $CFG - anyway it worked even without it :-D 2006-03-08 11:20:38 +00:00
toyomoyo 5790c8998a took out some debug code for koen 2006-03-08 06:57:53 +00:00
toyomoyo ffa5b35f6d counting is not sensible is not sorting by id asc 2006-03-08 05:08:44 +00:00
vyshane f1b6ce824d Made some of the tabs linked even if selected in the different views. 2006-03-08 04:54:57 +00:00
vyshane 748e0925c2 Added attribute $linkedwhenselected to tabobject class. Basically defines
whether the tab should be linked even if it is selected.
2006-03-08 04:53:48 +00:00
vyshane a392a8b22d Added course module in call to navmenu() so that we have the < (prev) and >
<next> buttons in all the views for the data module. To keep things
consistent.
2006-03-08 03:53:54 +00:00
vyshane bfb7fe86bb When updating a resource, $CFG->pagepath should be /mod/resource/type instead
of /mod/resource/mod.
2006-03-08 03:23:22 +00:00
toyomoyo 2c46dd5b4e wrong type for remove, should be an int, it is an id 2006-03-08 03:17:31 +00:00
skodak 0c0849cf5f lots of incorrect required_param()'s - there MUST be only two parameters not three!! 2006-03-08 00:08:51 +00:00
skodak e92d8ccf4d fixed category switching bug 2006-03-07 23:59:33 +00:00
skodak b1f00c8985 incorrect use of required_param() 2006-03-07 23:51:21 +00:00
skodak bbba475967 fixed includes in included files - see bug #4891 2006-03-07 23:41:22 +00:00
skodak e1427cdec5 fixed incorrect use of required_param() 2006-03-07 23:30:27 +00:00
mjollnir_ fb3ea05cc3 Adding more indexes to the log table - bug 4112 + version bump 2006-03-07 22:14:40 +00:00
skodak 107e7612b5 short php tags once more 2006-03-07 21:46:34 +00:00
skodak 38b7336ed1 short php tags 2006-03-07 21:35:13 +00:00
skodak 2c87013a55 missing p() in value 2006-03-07 21:06:46 +00:00
skodak 1b56f11102 fixed warning 2006-03-07 20:40:21 +00:00
skodak 2780eb570c missing db prefix 2006-03-07 20:32:49 +00:00
skodak 8f0fba5ce0 nasty empty line at the end of file .... 2006-03-07 20:26:27 +00:00
skodak 25580a01bc finally now the restore should work and with correct unicode related coding style, sorry 2006-03-07 19:53:56 +00:00
skodak de9924ae0a parameter cleaup - round 8; short php tag in group-edit.html 2006-03-07 19:36:13 +00:00
skodak 038ba6aa30 change value of PARAM_RAW from 0 to 666, becasue we need to detect incorrect param types (such as PARAM_IND) and incorrect order - optional_param('xx', PARAM_INT, 0)
This might break faulty code...
2006-03-07 19:20:23 +00:00
nfreear fd6abcc87a Accessibility: fixed bug, duplicate call to blocks_print_group. 2006-03-07 17:38:02 +00:00
skodak 7710da22bd parameter cleaup - round 7; corrected search in user.php, semicolon in case fixed in utfdbmigrate (I wonder if it caused any problems) 2006-03-07 16:42:30 +00:00
thepurpleblob 1771fcb04f Added note that blackboard import is not compatible with BB v6 2006-03-07 16:04:44 +00:00
skodak 4abbb75c80 parameter cleaup - round 6; major cleanup and fixing in uploaduser.php 2006-03-07 11:13:57 +00:00
bobopinna 3ec5d7a62b Fixed a word error (bug 4895) Many thanks to Ray 2006-03-07 10:51:21 +00:00
thepurpleblob d9ca6d5550 Put $CFG->pagepath in a more logical position 2006-03-07 10:34:08 +00:00
bobopinna 9314dcdf6e Updated with attempts management 2006-03-07 10:03:36 +00:00
skodak 63d86fad67 parameter cleaup - round 5; timezone.php fixed 2006-03-07 09:01:49 +00:00
vyshane 459e90230f Fixed bug: wrong parameter for input field (max size of uploaded file) 2006-03-07 08:53:40 +00:00
vyshane fb38540df5 Renamed data "templates defaults" action to "templates def" because the db
column has a limit of 20 characters.
2006-03-07 08:47:26 +00:00
toyomoyo 5f9de695a4 this code is for koen to test, it will output a lot of debug info in debug mode, thanks 2006-03-07 08:24:32 +00:00
vyshane 6977f32079 Updated logging support. Added version upgrade. 2006-03-07 08:11:19 +00:00
vyshane 0a09100ff7 Update logging support. Bumped module version up. 2006-03-07 08:10:40 +00:00
moodler f90e9ff653 Cleaned up display of groups and group links in user profile 2006-03-07 06:22:59 +00:00
toyomoyo 653c0596de added some code to give some feedback once in a while (per 5000 records, for now) 2006-03-07 04:36:55 +00:00
patrickslee 6c1a3ce7db Added missing alias in SQL statements 2006-03-07 02:20:30 +00:00
toyomoyo f07da5dde0 fixing 4883, sorry 2006-03-07 01:33:52 +00:00
skodak 1ccc4867c5 comment improvement 2006-03-06 21:17:10 +00:00
skodak c07549b6e2 fixed coding style of unicode db detection 2006-03-06 20:30:00 +00:00
skodak a2eaae6102 parameter cleaup - round 4 2006-03-06 19:27:25 +00:00
nfreear de533d2612 Accessibility: 'weekscss' course format, replaced <table>, <td> with DIVs, inline style. 2006-03-06 16:14:10 +00:00
skodak 636c2c08d9 parameter cleaup - round 3 2006-03-06 14:25:26 +00:00
nfreear 0666fc3270 Accessibility: Evaluation weekly format for course display - NO layout tables, for accessibility, etc. Initial straight copy of weeks/format.php; $string['formatweekscss'] 2006-03-06 14:08:52 +00:00
nfreear f8d0d6336b Accessibility: Evaluation weekly format for course display - NO layout tables, for accessibility, etc. Initial straight copy of weeks/format.php 2006-03-06 14:08:01 +00:00
skodak 045e9e2484 parameter cleaup - round 2 2006-03-06 13:22:37 +00:00
skodak 12afe27987 cleanup and bugfixing in filters.php 2006-03-06 13:20:38 +00:00
nfreear 68ac3b35e0 Accessibility: moved H2 from weblib.php: print_side_block_start, to moodleblock.class.php: _title_html (validate, <span>s revert to <div>); skip block link - replaced pixel image with 'accesshide' text; use get_string. 2006-03-06 12:50:43 +00:00
nfreear 9aa4592e79 Accessibility: moved H2 from weblib.php: print_side_block_start, to moodleblock.class.php: _title_html (validate, <span>s revert to <div>); skip block link - replaced pixel image with 'accesshide' text. 2006-03-06 12:49:07 +00:00
julmis 57e0348ae0 Statusbar was missing from default configuration. 2006-03-06 12:38:14 +00:00
nfreear f6c9cf917e Accessibility: the general accessibility, usability and navigation language file. 2006-03-06 12:28:06 +00:00
tjhunt c0b5b31a48 Addition to locallib.php to notify local code when a course is deleted. 2006-03-06 12:19:58 +00:00
skodak 1c47adc540 parameter cleaup - round 1 2006-03-06 10:02:59 +00:00
julmis 1452f9e11b And more readme updates. 2006-03-06 09:44:57 +00:00
julmis 127907098c Removing old editor scripts. These are found at /lib/editor/htmlarea from now on. 2006-03-06 07:57:41 +00:00
julmis 515e6eccbe Adding support for new GetHtml plugin 2006-03-06 07:44:35 +00:00
julmis 4773034906 Adding new GetHtml plugin. 2006-03-06 07:15:13 +00:00
julmis f2214522d8 Fixing comma problem. 2006-03-06 07:12:04 +00:00
julmis 5d816150cd Writing more readme... 2006-03-06 07:11:35 +00:00
skodak 8f59002a9f fixed wrong parameter type 2006-03-06 06:26:32 +00:00
skodak 96e98ea67f Fixed error in my previous commit, unknown parametery type 0. 2006-03-06 06:25:33 +00:00
ikawhero 70070c1f88 Changes to custom script code. Credit to Gordon Bateson. Bug 4827. 2006-03-06 01:45:11 +00:00
mjollnir_ 2e05b22ab6 Fixing the parse error in moodlelib! Do I get a prize for being first after sf.net came back up? ;) 2006-03-06 00:39:51 +00:00
mjollnir_ 74ffb569c6 Added a useful function in moodlelib to resolve filename collisions when moving files around. Perhaps useful for backup or importing or files/index.php 2006-03-06 00:36:06 +00:00
julmis 988f9ddff0 Changing tiny to use gzip compressed version. 2006-03-05 10:36:24 +00:00
julmis 07f37ebca2 Removing advanced theme docs... 2006-03-05 10:28:01 +00:00
julmis 80153c354c Removing plugins... 2006-03-05 10:08:30 +00:00
julmis def7254987 Removing examples. 2006-03-05 09:46:28 +00:00
julmis 140e306f4e Removing docs... 2006-03-05 08:58:55 +00:00
julmis 8d529638a6 Writing more readme... 2006-03-05 08:46:49 +00:00
urs_hunkler eb9ca068c5 added check for function page_doc_link() to avoid the not found error in Moodle 1.5 2006-03-05 08:28:39 +00:00
julmis 9cc07c7393 Adding new editor readme. 2006-03-05 07:48:15 +00:00
skodak a083b93cec First stange of parameter handling refactoring, no new features + minor bugfixes. More changes coming soon.
New code should be easier to understand, just simple switch-case. Expect some detailed documentation for module authors before UK MoodleMoot :-)
2006-03-04 18:05:41 +00:00
julmis 906f98bd0c Adding tinymce editor choice. 2006-03-04 16:55:24 +00:00
julmis e1ecf0a019 Adding wrapper function loadeditor. 2006-03-04 16:53:02 +00:00
julmis c06c849221 Modifying print_textarea for new editorObject compatible. 2006-03-04 16:04:48 +00:00
julmis c10364100d Adding editorlib. 2006-03-04 16:01:41 +00:00
julmis ffcdfb974b Adding TinyMCE support 2006-03-04 15:59:11 +00:00
julmis 876110eb1d Adding TinyMCE editor 2006-03-04 15:57:34 +00:00
julmis 6c1e8ba8d2 Moving old editor to htmlarea folder. 2006-03-04 15:24:17 +00:00
julmis c2db12af42 Adding tinymce needed defaults and new $CFG property 'editorsrc' 2006-03-04 14:52:50 +00:00
skodak 1b1d34225b incorrect usage of clean_filename() replaced with clean_param($text, PARAM_SAFEDIR) 2006-03-04 12:37:29 +00:00
skodak 46b8113012 optional unicode characters and better conversion to ascii in function clean_file(); fixed textlib setup code; unicode related cleanup in config-dist.php
I am going to review the usage of clean_filename() now
2006-03-04 11:35:08 +00:00
skodak b9fd28eade loginas language typos a fixes (thanks rob for fixing it!) and more consistent loginas password dialog layout. 2006-03-04 09:01:56 +00:00
skodak d8eb52a2d0 fixed bug #2596 - filterlib is now adding popup javascript into html files 2006-03-03 23:25:27 +00:00
skodak 0beabf4898 fixed NULL in foreach warning 2006-03-03 22:26:22 +00:00
skodak fd5ca378e6 fixed UTF-8 restore problems caused by utf8_restore 2006-03-03 22:22:07 +00:00
skodak af5be70cf2 Optional "Login as" password protection - please test, usage explained in config-dist.php 2006-03-03 20:33:38 +00:00
skodak 904d60d4d3 table tag typo 2006-03-03 20:12:31 +00:00
skodak 01eb4f5f21 loginas.php parameter typo 2006-03-03 19:50:33 +00:00
skodak 212039c0d8 utf8 related cleanup in glossary import and export code - please test 2006-03-03 19:49:08 +00:00
thepurpleblob dcd51df25e Another bunch of missing courseid parameters.
Deleting questions was not working.
2006-03-03 15:20:48 +00:00
moodler 7cbc59192f VERY preliminary import script, needs a lot of work 2006-03-03 14:44:54 +00:00
thepurpleblob 4967818418 Quiz directory path incorect in download link fixed (bug #4424) 2006-03-03 14:19:15 +00:00
nfreear bef6cd5d81 Accessibility: weblib.php: function print_side_block, completed 'Skip block' link. 2006-03-03 11:48:02 +00:00
thepurpleblob 5d77ace20b Added missing courseid link to final continue button. 2006-03-03 11:17:23 +00:00
thepurpleblob 5cda54cf25 space missing in html output 2006-03-03 11:07:26 +00:00
thepurpleblob c4c06b6713 Fixed continue button. Link now requires courseid parameter. 2006-03-03 10:37:55 +00:00
urs_hunkler be2d062ea4 Added a "." at the end of a comment sentence 2006-03-03 10:10:55 +00:00
vyshane 1cfc979a73 Added argument $meta to pagelib::print_header (data module) 2006-03-03 08:30:36 +00:00
vyshane c853304e52 Added support for printing <link rel="alternate" type="application/rss+xml"...
/> tag in header. Only happens if appropriate. E.g. RSS turned on etc.
2006-03-03 08:06:50 +00:00
vyshane d4706960e4 Refactored function rss_get_link() so that it uses a new function
rss_get_url() which generates the URL to the RSS XML file. Because in some
cases we need the URL only, and not the whole <a href...><img ...></a> string.

Added function rss_get_url()
2006-03-03 08:03:45 +00:00
vyshane a443e10f6f Made field names as links that go to the edit view for the respective fields. 2006-03-03 06:13:27 +00:00
vyshane d2555cedfa Updated $CFG->pagepath generation for add and delete cases. 2006-03-03 03:33:11 +00:00
vyshane cc1d322807 Added $CFG->pagepath so that the body class and id attributes are set properly
and so that the Moodle Docs link is generated correctly.
2006-03-03 03:32:15 +00:00
skodak 29939bea87 improved kses cleaning of html SC#204; merged from MOODLE_15_STABLE 2006-03-02 21:38:20 +00:00
urs_hunkler e56e5ed720 Added CSS for calculated and numerical questions 2006-03-02 17:11:31 +00:00
dhawes fec312fdf5 removed secondary cache to close bug 4625 2006-03-02 17:05:12 +00:00
urs_hunkler 89fe8086c5 I had commented out the quiz section to be sure that no other CSS is active. Now the #mod-quiz-report styles are active again. 2006-03-02 14:53:13 +00:00
thepurpleblob 2dd6d66b31 Rewrite of add_indented_names() function.
Bit longer, but *much* faster for large numbers of categories.
2006-03-02 14:13:42 +00:00
gustav_delius 5433ee83ee When the question name is taken from the question text it is now cut off at 15 characters. 2006-03-02 14:08:48 +00:00
gustav_delius f4b72cdb74 Made to work with the new templating system. 2006-03-02 14:02:49 +00:00
urs_hunkler 48447225e2 Moved the question styles to layout.css. I'll move the CSS for colors and fonts into the right files when the work on questions is finished. 2006-03-02 13:04:23 +00:00
tjhunt b97c41647c Refactor the code for deleting a course from course/delete.php to a function in moodlelib.php. 2006-03-02 11:58:43 +00:00
exe-cutor be58b18f15 Corrected some typos and added Shibboleth setup hints for IIS 2006-03-02 10:40:36 +00:00
exe-cutor 8f39553e36 Changed and added some Shibboleth language strings 2006-03-02 07:50:53 +00:00
patrickslee 7130abaf90 Missed undoing the changes to one line for the last revert 2006-03-02 03:02:35 +00:00
patrickslee 13c6d7e6bc Backup last commit regarding to the "quiz_" prefixes. There must been something wrong with the upgrade code that not renaming those tables. 2006-03-02 03:00:31 +00:00
toyomoyo 2df6965c30 fixed a bug where group image is not displayed 2006-03-02 02:31:20 +00:00
vyshane 1761da15fc Added moodledocslink string to moodle.php language file. 2006-03-02 02:29:23 +00:00
vyshane 850435e777 Made footer.html use get_string when displaying the moodle docs link. 2006-03-02 02:25:55 +00:00
patrickslee 38393aad2d Added missing "quiz_" prefixes to table names 2006-03-02 02:25:22 +00:00
toyomoyo 4c64486f0c NO_CONV for backup_log_info 2006-03-02 01:33:00 +00:00
mjollnir_ ed2482dfae Fixing up some RENAME tables in postgres for quiz 2006-03-02 01:30:04 +00:00
moodler 16bac723c0 Removed the shibboleth code (there is a new way now)
http://moodle.org/mod/forum/discuss.php?d=39918#187611
2006-03-02 01:09:56 +00:00
mits b67580acfa removed styles_fonts.css and styles_layout.css from $THEME->sheets. 2006-03-01 23:01:39 +00:00
mits a076daf274 removed styles_fonts.css and styles_layout.css to use files of Standard theme. 2006-03-01 22:51:55 +00:00
gustav_delius 2662cf46fc Some improvements to how the tabs and links behave. 2006-03-01 21:16:28 +00:00
stronk7 00f6fb1b71 Adding the new h2.header 2006-03-01 18:29:39 +00:00
gustav_delius 37a12367c5 Templates and css hooks for more questiontypes. Essay and RQP will be done at a later date. 2006-03-01 16:15:30 +00:00
moodler f413e3fbee Fixed some typos 2006-03-01 14:03:56 +00:00
tjhunt 1f8ede91cd Remove references to unused globals in remove_course_contents() and remove_course_userdata(), and fix comments. 2006-03-01 12:15:57 +00:00
tjhunt 34763a795a Change fulldelete(), so it does not give an error if the thing you try to delete does not exist. 2006-03-01 12:13:09 +00:00
nfreear 73bb9da7e5 Accessibility: added Alt text for envelope/message link (existing lang string); converted <div> to <ul>, inherit existing classes & styles. 2006-03-01 11:18:33 +00:00
nfreear b34a009985 Accessibility: fixed $string['helpprefix'] for multi-languages; weblib.php, removed <img> width height - move to stylesheet, standard theme. 2006-03-01 11:01:16 +00:00
nfreear 1527acab30 Accessibility: fixed $string['helpprefix'] for multi-languages. 2006-03-01 10:53:05 +00:00
gustav_delius dc2ff7c341 Fixed incorrect function name, spotted by Penny 2006-03-01 10:42:15 +00:00
gustav_delius 70c01adb91 Improvement to tabbed interface 2006-03-01 09:30:21 +00:00
moodler 6b25f553cc Fixed some typos 2006-03-01 09:12:13 +00:00
moodler 880a6f6b7a Added a new config variable that will mail db connection errors to someone (eg admin) 2006-03-01 09:06:57 +00:00
gustav_delius 567709c4e0 Tabs on question bank editing pages 2006-03-01 08:43:41 +00:00
vyshane 63339fc88c Added moodle docs link to footer of the themes. The link is generated by the
page_doc_link function.
2006-03-01 07:49:53 +00:00
vyshane 8fde6caa25 Added language string for the new config var "docroot". 2006-03-01 07:48:17 +00:00
vyshane 3963147913 Added function page_doc_link in weblib.php. This function is used to print a
link to the moodle docs for the current page.

Added the default value (http://docs.moodle.org) for docroot config variable
in defaults.php.
2006-03-01 07:47:14 +00:00
vyshane 14b7ebd3cb Added config variable for docroot: the moodle documentations root. This is
used to display a link for the docs that are relevant for the current page.
2006-03-01 07:45:29 +00:00
gustav_delius f5565b6969 Removing some more references to quiz from import/export code 2006-03-01 07:36:09 +00:00
toyomoyo 28dad8b90a added proxy handling for lang import 2006-03-01 07:15:19 +00:00
gustav_delius dc1f00de19 Some little fixes and more renaming to cleanly separate question code from quiz code
Renaming tables:
quiz_answers -> question_answers
quiz_categories -> question_categories

Renaming functions:
quiz_get_category_menu -> question_category_menu
quiz_get_category_coursename -> question_category_coursename
quiz_categorylist -> question_categorylist
2006-03-01 07:03:57 +00:00
toyomoyo 3c1acb61bb printing user picture for comments 2006-03-01 06:51:06 +00:00
vyshane 47f01c2f57 Icon for the page documentation links 2006-03-01 04:01:02 +00:00
mjollnir_ ecb5d875af Updated the comments around the horrible sql construction in the quiz reports for overview & response 2006-03-01 03:00:33 +00:00
mjollnir_ eeaf5ebce1 Ported the rework of the reports to the responses report. PLEASE try not to load all users into memory and then implode it into a string for the sql - just JOIN, it is what the database is good at :( 2006-03-01 02:46:15 +00:00
mjollnir_ 3d45832721 Tidyup of whitespace and commented out stuff from last commit 2006-03-01 02:44:38 +00:00
moodler 4cd29f6c5a Take $CFG->pagepath into account for page_id_and_class so "weird" pages
can end up wth nice page classes and ids
2006-03-01 02:38:03 +00:00
moodler 1933c40771 Setting new variable $CFG->pagepath to give hints later on to the
function page_id_and_class and also page_doc_link so that they can set
things more correctly for each different module being used.
2006-03-01 02:34:34 +00:00
mjollnir_ 03c8c27ee0 By popular request - quiz report now shows students with attempts only, students with no attempts only, students with attempts AND no attempts. This fixes bugs #4406 and #4353 2006-03-01 02:20:32 +00:00
mjollnir_ 6ae92cf9b0 Fixing up a badly named quiz table in postgres. PLEASE remember that you cannot just do RENAME - it breaks the sequences 2006-03-01 02:17:47 +00:00
mjollnir_ cfe3f66f47 Added comments in the horribly complicated sql around the quiz report (fixes bug # 4406) 2006-03-01 00:49:49 +00:00
mjollnir_ 7343f3c40a Fixing a warning in import course data - bug #4773 2006-03-01 00:33:50 +00:00
gustav_delius c902637954 Committed fix for bug 4829 2006-02-28 20:43:06 +00:00
skodak 5c25b6af93 prevent unwanted password change here SC#225; merged from MOODLE_15_STABLE 2006-02-28 20:27:19 +00:00
nfreear ece65914f9 Accessibility: lib/weblib.php: function helpbutton - added $string['helpprefix']. 2006-02-28 15:29:11 +00:00
nfreear d455cd04e9 Accessibility: function _title_html, replaced <div> with H2, enclosed <div> to <span> - now validates! weblib.php: function side_block_start. 2006-02-28 13:13:52 +00:00
nfreear 02db7f7a02 Accessibility: function _title_html, replaced <div> with H2, enclosed <div> to <span> - now validates! 2006-02-28 13:12:13 +00:00
nfreear b6f30b1818 Accessibility: functions changed, print_heading_block, print_side_block, print_side_block_start -- course .headingblock is now H2; .sideblock .header is now H2; .sideblock <table> is now <ul> (+ commented code for 'skip block link'). 2006-02-28 12:29:51 +00:00
nfreear 72d7872a23 Accessibility: course .headingblock is now H2; .sideblock .header is now H2; .sideblock <table> is now <ul> (+ commented code for 'skip block link'). 2006-02-28 12:02:32 +00:00
gustav_delius 062f1125cc *** empty log message *** 2006-02-28 09:36:31 +00:00
gustav_delius 4f48fb42af Towards removing reference to quiz module from the question code
Renaming tables:
quiz_questions -> question
quiz_states -> question_states

Renaming functions:
quiz_delete_question -> delete_question
quiz_get_question_options -> get_question_options
quiz_get_states -> get_question_states
quiz_restore_state -> restore_question_state
quiz_save_question_session -> save_question_session
quiz_state_is_graded -> question_state_is_graded
quiz_extract_responses -> question_extract_responses
quiz_regrade_question_in_attempt -> regrade_question_in_attempt
quiz_process_responses -> question_process_responses
quiz_isgradingevent -> question_isgradingevent($event)
quiz_search_for_duplicate_responses -> question_search_for_duplicate_responses
quiz_apply_penalty_and_timelimit -> question_apply_penalty_and_timelimit
quiz_print_question_icon -> print_question_icon
quiz_get_image -> get_question_image
quiz_make_name_prefix -> question_make_name_prefix
quiz_get_id_from_name_prefix -> question_get_id_from_name_prefix
quiz_new_attempt_uniqueid -> question_new_attempt_uniqueid
quiz_get_renderoptions -> question_get_renderoptions
quiz_print_quiz_question -> print_question
quiz_get_question_responses -> get_question_responses
quiz_get_question_actual_response -> get_question_actual_response
quiz_get_question_fraction_grade -> get_question_fraction_grade
quiz_get_default_category -> get_default_question_category


Renaming constants:
QUIZ_EVENT.... -> QUESTION_EVENT....
QUIZ_MAX_NUMBER_ANSWERS -> QUESTION_NUMANS
2006-02-28 09:26:00 +00:00
vyshane 77230a8b5a Fix for Bug #4850.
Wrapped offending block in an isset() check to get rid of php notices in debug mode.
2006-02-28 07:01:23 +00:00
vyshane 96ed436f37 Bug #4849 2006-02-28 04:41:44 +00:00
vyshane 4745a69050 Fixing Bug #4849 2006-02-28 04:33:39 +00:00
vyshane 0b3cfe8812 Fixed Bug #4552 2006-02-28 02:51:31 +00:00
toyomoyo e95dddd7a9 added a line to prevent warning 2006-02-28 01:52:38 +00:00
ikawhero f73eb30b02 Added realmedia support. 2006-02-27 23:48:25 +00:00
mits db2007cbc0 modified for Accessibility based on Standard theme. 2006-02-27 22:58:31 +00:00
nfreear 9fdbbcf768 Accessibility: 'headermain' is now H1, see theme/standard/styles_layout.css: .headermain
TODO (other moodlers): propagate change through header.html in other themes.
2006-02-27 14:17:08 +00:00
vyshane 91247b891f Changed the managingEditor and webMaster XML tags to show the fullname of the admin instead of the email address. This prevents spam resulting from bots crawling the RSS feeds. 2006-02-27 05:11:02 +00:00
moodler 735a795229 A few small changes for Vy to continue working on (logs, mostly) 2006-02-27 04:13:03 +00:00
vyshane e045d2042c Removing the /mod/data/lang/ directory since the language strings will now be stored under /lang/ 2006-02-27 04:04:30 +00:00
toyomoyo e1701b3ccd bynameondate for comments 2006-02-27 02:16:50 +00:00
toyomoyo 7c0af760aa comments, not comment, typo 2006-02-27 02:16:19 +00:00
toyomoyo 2232755c93 added time created and modified for comments 2006-02-27 02:13:48 +00:00
toyomoyo 8e24bfe7e8 adding date created and date modified for comments 2006-02-27 02:06:35 +00:00
urs_hunkler e03f2fec99 some template structure corrections and enhancements 2006-02-25 17:29:02 +00:00
urs_hunkler 259af02332 CSS enhancements and corrections 2006-02-25 17:27:49 +00:00
thepurpleblob 65c9673497 Latest version of Markdown Extra - Note that Extra has some new features
See: http://www.michelf.com/projects/php-markdown/extra/
2006-02-25 16:48:46 +00:00
michaelpenne 6094f43dd5 [Fix] Removed htmlentities on student answer. 2006-02-24 21:31:23 +00:00
michaelpenne 44492c2a18 [Fix] $navigation and $grade_value were undefined when lesson was added to site main page 2006-02-24 21:26:15 +00:00
michaelpenne 0d2df6a049 Removed correct and incorrect colors. 2006-02-24 20:17:41 +00:00
michaelpenne 1ae43a52f9 [BugFix] Bug #4174 - Lesson Essay Question Can't be Graded when attempt not finished 2006-02-24 20:17:08 +00:00
michaelpenne 0ac9372517 [BugFix] Bug #4828 - \ stripping problem 2006-02-24 19:42:13 +00:00
michaelpenne ee27cca526 [BugFix] Bug #4216 - cancel button 2006-02-24 19:09:14 +00:00
thepurpleblob 4c5d208a3e missing course parameter in header 2006-02-24 18:54:54 +00:00
thepurpleblob feb60a0755 Added function (from locallib.php) to create default quiz filename 2006-02-24 18:49:50 +00:00
thepurpleblob 7ac1e095b8 Moving export default filename function. 2006-02-24 18:49:01 +00:00
thepurpleblob f55b3d10bf Corrected require path for new location 2006-02-24 16:05:51 +00:00
thepurpleblob d8c2c55bf9 Removed import/export files. Moved to new (question) location 2006-02-24 16:01:44 +00:00
thepurpleblob 7b4ac82a37 Removed from old location 2006-02-24 15:50:39 +00:00
thepurpleblob 71d0be31d6 Removed import export functions 2006-02-24 15:46:59 +00:00
thepurpleblob 72c8c699be Removed links to locallib.php 2006-02-24 15:46:26 +00:00
thepurpleblob ff4b6492a0 Moved import/export functions. 2006-02-24 15:44:53 +00:00
thepurpleblob 5ab6af1238 Changed links to import and export screens. 2006-02-24 15:39:59 +00:00
thepurpleblob aca318e17e Moving import/export to new question area.
This will need some more work/testing though!
2006-02-24 15:17:40 +00:00
thepurpleblob 84769fd8a8 Moving quiz import/export files to new question area. 2006-02-24 15:14:09 +00:00
urs_hunkler 5bc572112c class added to the submit button to be able to position it
I optimized display.html and CSS
same class name for different objects is problematic
_ quiz table and question table must not be named with same class
_ surrounding tabel: class="multichoice|etc"
_ answer table: class="answer"
I changed the classname of the "answer" div to class="ablock" (short from "answer-block") that it does not conflict with "answer"
multichoice:
_ changed first row to class="r0"
_ added descriptive classes to the cells
2006-02-24 15:00:27 +00:00
gustav_delius f02c6f017e Renamed QUIZ_QTYPES to QTYPES 2006-02-24 13:48:43 +00:00
gustav_delius b2db6c5a41 Removing the developer docs because they are now held in MoodleDocs 2006-02-24 13:38:46 +00:00
gustav_delius 4b32fd66ab Moved function quiz_question_used from mod/quiz/locallib.php to question_used in lib/questionlib. Fixed some more links. 2006-02-24 12:53:47 +00:00
gustav_delius 219e92f2eb Preview now works also if no quiz is specified 2006-02-24 12:38:21 +00:00
gustav_delius 05054049a5 Fixed the redirection url to edit.php 2006-02-24 12:11:30 +00:00
gustav_delius d242adcf8f Updated rqp scripts to work with the separate question scripts in moodle/question 2006-02-24 12:01:47 +00:00
gustav_delius 2466f4dafb Added icon for the question bank link 2006-02-24 11:50:29 +00:00
gustav_delius b3ce2c2673 Updated date on copyright notice 2006-02-24 11:38:17 +00:00
gustav_delius d7c4c1b653 Admin Question link now points to the new question bank editing interface in moodle/question/ 2006-02-24 10:58:04 +00:00
gustav_delius 8a274d4d37 Bumped version number (hadn't been done in a long time) in order to be able to require latest Moodle version in the quiz module. 2006-02-24 10:51:26 +00:00
gustav_delius 8a9ba05a8a Removing questiontypes from their old location, they are now in moodle/question/questiontypes/ 2006-02-24 10:43:59 +00:00
gustav_delius 80a5e194ff Updated quiz scripts to work with the separate question scripts in moodle/question 2006-02-24 10:43:06 +00:00
gustav_delius e586cfb4b0 Updated question scripts to work in their new location 2006-02-24 10:35:28 +00:00
gustav_delius e56a08dc15 Updated questionlib to work with the new location of the question scripts 2006-02-24 10:25:16 +00:00
gustav_delius 516cf3eb59 Moving quiz-independent question scripts to their new location. In a following commit these files will be updated to actually work in their new location. 2006-02-24 10:21:40 +00:00
gbateson e7801d39dc improved handling of relative URLs for media files in jqz files 2006-02-24 09:57:25 +00:00
toyomoyo f841494c62 see changes for admin/utfdbmigrate.php 2006-02-24 08:20:13 +00:00
toyomoyo e98ae339ef see changes to admin/utfdbmigrate.php 2006-02-24 07:33:31 +00:00
toyomoyo 42295d1c67 added some new functionality
1. allows moodler to input a global language. If set, all convertion will be from that encoding to utf8. Thus saving time.
2. Allows user to specify the number of records to process. This will resume after x number of recoreds are processed.
3. DIsplay the approximate total number of records that needs process. Note some records might get processed multiple times
4. Takes the moodler right back to lang import after migration
2006-02-24 07:24:59 +00:00
vyshane 4e53996865 Made script work with 1.5 2006-02-24 06:14:39 +00:00
toyomoyo 59a488e1aa prints the whole comment when displaying confirmation 2006-02-24 04:30:29 +00:00
toyomoyo b754b2115c fixing bugs 2006-02-24 04:26:27 +00:00
martinlanghoff 20b36bed42 mod/quiz/backuplib: tiny syntax fix - thanks Nigel 2006-02-24 01:10:08 +00:00
mjollnir_ 0a0bcdd259 Merged from MOODLE_15_STABLE: Fixing a problem reported about self enrolment in child courses and not being able to access the parent without logging in and out again at http://moodle.org/mod/forum/post.php?reply=185699 2006-02-23 22:15:30 +00:00
gbateson 4a2360ac71 improved conversion of relative URLs for some Flash players 2006-02-23 21:24:25 +00:00
danmarsden 90ca2ce87d fixed bug with limits not limiting for only enrolled students - limit was counting non-enrolled students as well. - also removed checkboxes to delete response from not-answered column. 2006-02-23 21:20:44 +00:00
gustav_delius c6293e00db Backing up the 'originalquestion' field 2006-02-23 19:16:39 +00:00
gustav_delius 3eb9904f61 Restoring the 'originalquestion' field 2006-02-23 19:14:51 +00:00
gustav_delius 602d778b1f Experimenting with a new event type to accommodate teacher-marked questions. This is work in progress. 2006-02-23 19:12:46 +00:00
thepurpleblob cb06a092dc Whoops - ranges for categories on each page were incorrect. Plus added
sesskey to page numbers.
2006-02-23 16:55:13 +00:00
thepurpleblob 4a987dfa67 Improvements to pagination. Linked to all actions now. 2006-02-23 16:05:05 +00:00
thepurpleblob fb3fe7aa07 Added some basic pagination to categories screen. Probably needs a bit
more refinement.
2006-02-23 15:26:38 +00:00
ikawhero 9677eb79c5 Making custom scripts path generic so it is not forced to be in the
dataroot directory which is writable by the web server.
Path cleaned to avoid relative directory links.
2006-02-23 07:04:13 +00:00
toyomoyo 7b5aa1b725 case sensitive IP 2006-02-23 03:16:28 +00:00
toyomoyo 2786ff706d fix for 4825 2006-02-23 02:56:07 +00:00
toyomoyo f055d14bed fix for string type sort error, bug 4823 2006-02-23 02:34:46 +00:00
danmarsden 348630d87e moving duplicated code into Lib.php as functions & clean up the code a bit. - also now include users group info in text/excel downloads. - preparation for new choice block! 2006-02-23 01:20:24 +00:00
mits d8c33a44a9 polished. 2006-02-23 01:06:20 +00:00
mits b5cbc10eca to show "Turn editing on" and "Turn student view on" button in-line,
added styles_layout.css which includes  ".navbutton" attribute.
2006-02-23 01:04:36 +00:00
michaelpenne 150cdce033 [Update] Updated the help files to support regular expressions in short answer 2006-02-23 01:01:16 +00:00
michaelpenne e2d89fc3a7 [Changed/Added] langs for regular expression code in short answer 2006-02-23 00:42:46 +00:00
michaelpenne d643cbfb73 [Added] Added Regular Expression support for short answers by Joseph Rézeau. Discussion: http://moodle.org/mod/forum/discuss.php?d=38544
[Changed] Some display information has been changed, now prints page contents, user answer, and response
2006-02-23 00:41:28 +00:00
gustav_delius 4546212ce3 Keep the action icons in the category questions list from wrapping. Eventually this editing page needs to be styled properly with css. 2006-02-22 19:19:42 +00:00
gustav_delius f7cf31f594 Some mysql versions appear not to be willing to convert an empty string into a float. So setting all empty fields to 0 first. 2006-02-22 19:12:29 +00:00
thepurpleblob ce5a4f3284 Split out category class, and moved display part of code to it's own
section. About to make some changes related to large numbers of
categories (pagination etc).
2006-02-22 10:47:20 +00:00
gustav_delius f9cd8ce632 To determine whether a question has been graded we can now no longer look at wether the grade is the empty string because the grade is now always a number. Instead we use the $state->last_graded->event field. 2006-02-22 00:17:17 +00:00
urs_hunkler c02131ec37 started to build the CSS for the new quizzes. While working on it I will write all into styles.php. When finished I will put the CSS into the standard themes. The quiz part in the standard theme is deactivated. 2006-02-21 23:53:52 +00:00
gustav_delius 7fddf77ea5 display template for truefalse questions. Also simplified the code. 2006-02-21 23:08:11 +00:00
gustav_delius dcfa8b2aa9 No submit button in readonly mode 2006-02-21 23:06:47 +00:00
gustav_delius 3fc63cbe96 display template for shortanswer questions 2006-02-21 13:23:02 +00:00
thepurpleblob b9709b76d9 Corrected oversight with uploaded file filters change
See http://moodle.org/mod/forum/discuss.php?d=40177
2006-02-21 12:54:24 +00:00
thepurpleblob e11108a580 $CFG->filteruploadedfiles off by default.
See http://moodle.org/mod/forum/discuss.php?d=40177
2006-02-21 12:39:16 +00:00
thepurpleblob 2f9bd37cc3 Added proper check for $CFG->filteruploadedfiles, so that text/plain files
are not converted to text/html if this is 'off'
See discussion: http://moodle.org/mod/forum/discuss.php?d=40177
2006-02-21 10:43:23 +00:00
thepurpleblob 88118bb173 Range of settings improved for $CFG->filteruploadedfiles
See discussion: http://moodle.org/mod/forum/discuss.php?d=40177
2006-02-21 10:39:33 +00:00
thepurpleblob 741f827adc Added text strings for more versatile $CFG->filteruploadedfiles setting
and changed help string to suit.
2006-02-21 10:37:44 +00:00
urs_hunkler 55a997d08a some missing icons added 2006-02-21 07:44:53 +00:00
urs_hunkler 5452c7255c Comments from Andy:
config.php contains a new option,  $THEME->chameleonteachereditenabled  by default this is false, preventing teachers from editing chameleon course themes.  css.php has been changed a little to make use of this new property, it now also checks $CFG->allowcoursethemes before letting a teacher edit anything.

There have been some bug fixes in the handling of border shorthands.

Some workarounds to avoid a pretty big IE bug - the addRule method in IE's version of DOM 2 CSS  (which I use to create the live preview of changes), can crash the browser if the selector being added contains certain characters. Now as chameleon generates the preview it checks the selectors against a list of allowed characters - if the selector contains any character not on the list it will be ignored.

I don't think I'm quite there yet, but I made a bit of a change in some of the event handling code which means support for IE 5.5 seems to be getting closer :-)
2006-02-21 07:29:34 +00:00
toyomoyo c19c05c400 security issues with dangerous template 2006-02-21 07:17:02 +00:00
toyomoyo 5af0b52558 changed data_submitted for secureform; added sesskey 2006-02-21 02:02:24 +00:00
gbateson bb54c1c756 do not show JCloze clue button, if there is no clue 2006-02-21 00:19:15 +00:00
gustav_delius fbf0e2a204 Fix for bug 4810 2006-02-20 21:10:13 +00:00
gustav_delius 1d0f9df57e Added CVS hooks to templates 2006-02-20 20:47:48 +00:00
thepurpleblob 35d0543a1a added forcedownload=1 to exported file download.
Partly fixes problem with <pre> tags getting added by file.php
2006-02-20 16:42:01 +00:00
toyomoyo 03b80ff60d real fix for secureforms 2006-02-20 09:34:13 +00:00
toyomoyo ea6f999dc3 fix for secure forms 2006-02-20 09:31:29 +00:00
gustav_delius 38992f7e23 Changed grade fields to type real, added missing essay question tables. 2006-02-20 09:04:09 +00:00
toyomoyo 850d05ce38 . 2006-02-20 06:07:09 +00:00
toyomoyo 310639ff8c keep comments to the left for IE 2006-02-20 05:50:45 +00:00
gbateson 8faa855d37 encapsulate all functions within class;
rename "get_hotpotatoes_xxx" functions to "hotpot_get_xxx";
rename "seed_hotpotatoes_RNG" function to "hotpot_seed_RNG";
initialize all $question objects using $this->defaultquestion (if possible);
fix decoding of ampersands in HP quiz readings
2006-02-20 05:49:53 +00:00
toyomoyo b22bd6bc54 took out an extra echo 2006-02-20 05:40:26 +00:00
toyomoyo bbf0379ca1 fixed navigation after deleting or editting data comment 2006-02-20 05:37:15 +00:00
vyshane 006e4687cd Added array check when counting number of groups. 2006-02-20 05:09:43 +00:00
vyshane 4c906f7388 List of people in course now shows the number of groups each user is in. Resolves Bug #4799. 2006-02-20 04:59:30 +00:00
toyomoyo 8b034b6ddb string fix and empty lines 2006-02-20 03:15:38 +00:00
vyshane e5689267df Fixed bug in RSS xml file generation.
Fixed bug in file and picture links.
2006-02-20 03:02:32 +00:00
vyshane af25f45e1a Cleaning up xhtml markup. Code now validates for xhtml 1.0 transitional. 2006-02-20 02:15:45 +00:00
toyomoyo 7541b03f28 changed some grade fields into float type, see #4806 2006-02-20 01:41:00 +00:00
toyomoyo f344731398 fix for 4758 2006-02-20 01:30:30 +00:00
mjollnir_ ebe2c5057b Fixed up a few tiny syntax errors in quiz upgrade 2006-02-19 23:15:55 +00:00
gustav_delius 0f03f3a0c2 This way around will work better. Sorry, I am tired. 2006-02-19 23:08:52 +00:00
gustav_delius e3d36faadf Tables for essay questions. Penny will check I didn't mess this up. 2006-02-19 23:06:25 +00:00
gustav_delius c1e24bcd8e Changing grade fields to float for postgre 2006-02-19 22:49:30 +00:00
gustav_delius 3dd1a5c432 Changing grade fields to float for mysql. Asking Penny to do the same for postgreSQL 2006-02-19 22:19:00 +00:00
gustav_delius c4c7a2a67b Revert the fix to $status because it turns out that for example backup_putid() returns false when called with an id that has already been added. 2006-02-19 21:46:36 +00:00
koenr 917dd201c9 Ignored by accident some good advise 2006-02-19 21:39:22 +00:00
gustav_delius e1eed5ccfc Fix for bug 4217 2006-02-19 17:41:27 +00:00
moodler b8d1372a7b Make Database RSS feed work on Moodle 1.5 as well ;-) 2006-02-19 17:39:59 +00:00
gustav_delius d211bc1db1 Added string used to avoid confusion due to hidden questions, see bug 4217 2006-02-19 17:37:29 +00:00
gustav_delius 2e42186cbb Part of the future question type plug-in mechanism. This is not yet active, I am committing this only so as not to loose it. 2006-02-19 17:30:45 +00:00
gustav_delius 14afbbf034 Added the much-requested question reordering tool 2006-02-19 16:34:06 +00:00
gustav_delius 1c34035a40 Language string for the question reordering tool
Fixed grammar
2006-02-19 16:32:59 +00:00
koenr 64ac757850 Extra help and relieving lecture for during installation. 2006-02-19 16:32:57 +00:00
gustav_delius cd4f6b27a2 Help file for the question reordering tool 2006-02-19 16:27:02 +00:00
gustav_delius 7af1e88286 Added comments to the code (when will moodle HQ start commenting their own code? ;-) 2006-02-19 13:26:58 +00:00
stronk7 8630fd4be7 Done, changing some files with DOS linefeeds to Unix linefeeds. Bug 4763.
(http://moodle.org/bugs/bug.php?op=show&bugid=4763)
2006-02-19 10:31:21 +00:00
koenr a8126fc554 XHTML compliance typo 2006-02-18 21:35:30 +00:00
gustav_delius 1ef048aed3 Fixing a misprint that was preventing multiple files from showing. 2006-02-18 21:19:04 +00:00
gustav_delius 238bf03473 get_image now only returns the link, leaving the formating of the img tag up to the template 2006-02-18 21:08:34 +00:00
gustav_delius 997a2d5be3 New defaults, strings and help files for shuffle options 2006-02-18 21:07:39 +00:00
gustav_delius 162f62daaf New strings for shuffle options 2006-02-18 21:06:08 +00:00
gustav_delius 5e397ce7b0 New help files for shuffle options 2006-02-18 21:05:23 +00:00
gustav_delius a3b8af3805 Clear all floats before printing the next component. 2006-02-18 20:41:08 +00:00
mits bcb1789331 changed README.txt to README.html. 2006-02-18 20:38:51 +00:00
gustav_delius 0f9f31c81c Using html template for multichoice question 2006-02-18 20:01:36 +00:00
gustav_delius bffa0685da Added periods at the ends of the answer prompt sentences 2006-02-18 19:58:17 +00:00
gustav_delius ee49be211b updated required Moodle version in an attempt to stop people installing the unstable quiz module code (I use unstable in the sense of rapidly changing, not in the sense of buggy of course :-)) 2006-02-18 19:03:06 +00:00
gustav_delius 7f65c565be First steps towards separating logic and layout in the printing of questions: the print_question() method in the default question type now uses the template question.html 2006-02-18 17:32:56 +00:00
gustav_delius 7aa42eb0c8 The import tab has to provide the course id. 2006-02-18 15:11:03 +00:00
gustav_delius c54da50b29 An additional sorting order for category question list 2006-02-18 15:09:08 +00:00
gustav_delius a258d4fea8 Make sure teachers can only import into categories for which they have editing rights. 2006-02-18 13:09:59 +00:00
gustav_delius 39230689ef shuffleanswers is always turned on in cloze questions
Feedback popups are now sticky, see http://moodle.org/mod/forum/discuss.php?d=39983#183780
2006-02-17 18:31:15 +00:00
gustav_delius 7f30d941bc Corrected the page comment 2006-02-17 17:28:47 +00:00
gustav_delius 344be2522c Added link to questions bank 2006-02-17 17:15:56 +00:00
gustav_delius 6551bb8969 Changing headers to decoupling the question editing page from the quiz module. 2006-02-17 17:15:17 +00:00
gustav_delius fe5a3eb249 Better prompts for multiple choice questions, see bug 2791 2006-02-17 14:14:18 +00:00
toyomoyo 80329e02da forgot timelimit 2006-02-17 02:47:01 +00:00
toyomoyo b73b9d81ec better fix for 4360 2006-02-17 01:31:28 +00:00
gustav_delius f00da052c0 Bug in "Prevent late submissions" setting fixed, thanks to Samuli, see bug 4780 2006-02-16 22:01:57 +00:00
gustav_delius 5c6b657acb Bug in "Prevent late submissions" setting fixed, thanks to Samuli, see bug 4780 2006-02-16 21:56:57 +00:00
gustav_delius 997bcf0eb8 As Eloy pointed out, my recent addition for including child categories used by random questions did not restrict to the course or the instances currently being backed up. 2006-02-16 18:15:15 +00:00
gustav_delius 95ea52d41b Changed language string "Move category to" to "Parent", see bug 4727 2006-02-16 10:26:44 +00:00
gustav_delius 92c781cab3 Update the stamp each time a question is edited. This is the outcome of a long Skype discussion with Eloy on 15/02/06. A planned improvement for the future is to set the stamp to a md5 hash of the questiondata to ensure that identical questions will have identical stamps. Currently it is possible to obtain some duplication during question restore if between backup and restore the teacher clicks on the Save button on the editing page without acutally making any changes. Admittedly not a very likely scenario and hence the current system is good enough for now. 2006-02-16 10:20:27 +00:00
gbateson 84f037e086 micro increment version to 2.1.13 2006-02-16 10:18:54 +00:00
gbateson e5be91b770 correctly handle HTML entities in readings 2006-02-16 10:17:48 +00:00
exe-cutor 33d8eacfe4 Changed sequence of error messages. This makes more sense and should be better
understandable from a user's point of view.
2006-02-16 09:05:11 +00:00
exe-cutor a70d959a71 this file now does the authentication and doesnt use Shibboleth lazy sessions anymore for
various reasons, including security
2006-02-16 08:59:59 +00:00
exe-cutor b0e1220af4 Changed shib auth instructions to reflect new procedure for shib auth 2006-02-16 08:53:36 +00:00
exe-cutor 100f9e0d43 We dont use lazy sessions anymore for serveral reasons, including security 2006-02-16 08:52:29 +00:00
exe-cutor 0762da9ce2 not needed anymore with new shib auth procedure. 2006-02-16 08:50:50 +00:00
exe-cutor e2a420d6b2 Changed instructions to reflect new shib auth procedure 2006-02-16 08:50:15 +00:00
vyshane a684d28b29 Fixed notice in picture field edit view.
Made the field type icons clickable to edit the field.
2006-02-16 08:15:00 +00:00
vyshane cbde4dc94d Added back some strings that got lost. 2006-02-16 06:17:33 +00:00
vyshane a508f208ce RSS support 2006-02-16 03:35:10 +00:00
toyomoyo 7ac8a18b6e fixed a string 2006-02-16 01:50:09 +00:00
michaelpenne e51b142a78 Removed changes made earlier for ungraded essay questions. Will try to find an alternate method. 2006-02-16 00:30:50 +00:00
gustav_delius 6a687a0e98 Now contains code to also backup those categories needed by random questions that recurse into child categories.
Fixed the way the $status flag is handled.
2006-02-15 22:30:54 +00:00
gustav_delius 2b9221b9ff Fixed bug leading to warnings 2006-02-15 22:18:49 +00:00
gustav_delius 3181dafd62 added language strings, in particular for the tabs and decimal digits 2006-02-15 12:17:25 +00:00
gustav_delius 1bc28beba0 Improved the comment for set_field() 2006-02-15 12:13:20 +00:00
ethem 46bbbb4c85 DB new upgrade system. 2006-02-15 10:15:27 +00:00
gustav_delius f0b2c1cc2b Applied fixes from bug 4319. Thanks to Jaroslav 2006-02-15 08:59:32 +00:00
gustav_delius 03d1753c1c Renamed table quiz_newest_states to question_sessions 2006-02-15 08:38:41 +00:00
gustav_delius 832d40420c Renamed table quiz_newest_states to question_sessions 2006-02-15 08:34:36 +00:00
gustav_delius 786187cdfd Removed unnecessary code: questions are only deleted if they have no attempts. 2006-02-15 08:13:14 +00:00
toyomoyo ee14d73682 no update for en_utf8 2006-02-15 06:43:46 +00:00
toyomoyo e51d9eb4bf changed some strings 2006-02-15 06:38:32 +00:00
toyomoyo e5952c5a78 removed ability to update/delete en_utf8 2006-02-15 06:02:14 +00:00
patrickslee 94f9f07d3b Re-formatted the imporved flat file enorlment description 2006-02-15 03:27:56 +00:00
toyomoyo 9214c22430 fix for 4758 2006-02-15 01:55:04 +00:00
gustav_delius b2a90f76b2 Don't apply lateness check when teacher previews. 2006-02-15 00:16:57 +00:00
gustav_delius adaa8c8650 Grammar fix, bug 4526 2006-02-15 00:06:28 +00:00
gustav_delius 193b283985 removed a warning, see bug 4406 2006-02-14 23:24:10 +00:00
gustav_delius 85b9b86f51 Round also the raw score. 2006-02-14 23:08:06 +00:00
mjollnir_ 35cfff0e66 added to magpie the ability to do POSTs as well as GETs.. submitted this patch upstream but upstream doesn't seem to look at patches on sf.net 2006-02-14 20:33:40 +00:00
gustav_delius 8c85be6698 Rounding errors could lead to "Partially correct" for correct answers, see http://moodle.org/mod/forum/discuss.php?d=39548 2006-02-14 18:37:03 +00:00
gustav_delius 24edc235c6 Fixed submit buttons 2006-02-14 18:21:06 +00:00
thepurpleblob bfb5216f5d Format now uses defaultquestion() method. Bug #4752 2006-02-14 09:53:37 +00:00
thepurpleblob 4db0b132cb Bring formatting into line with Moodle standard (at last!) 2006-02-14 09:45:29 +00:00
moodler 40470d9349 Added new feature: time delay between quiz attempts 2006-02-14 05:12:24 +00:00
vyshane de9b123967 Fixed typo for get_string call for 'rsshowmany' 2006-02-14 04:10:47 +00:00
vyshane 235ef1e56e Added string for RSS explanation 2006-02-14 04:09:51 +00:00
toyomoyo 5ae56899ba backup and restore for comments and ratings 2006-02-14 04:02:19 +00:00
mjollnir_ f9648e77cf Added cron support for blocks - it was already there in the tables, now we just need to use it 2006-02-14 03:24:08 +00:00
toyomoyo d02cb0d006 new ratings functionality 2006-02-14 03:21:56 +00:00
toyomoyo 1f45ca1428 taking out the print_object 2006-02-14 03:19:19 +00:00
toyomoyo 4d3d87f0a4 adding ratings and comments functionality 2006-02-14 03:17:21 +00:00
toyomoyo 81ef8c1f48 fixing a weird index in scorm_scoes_track (see bug report 4742) 2006-02-14 02:44:03 +00:00
toyomoyo a9149e77e4 bug fix for 4742 2006-02-14 02:35:11 +00:00
toyomoyo 1c8510355f adding index pagetype to block_pinned to make it consistent 2006-02-14 02:34:37 +00:00
mjollnir_ 3a11c548b2 Fixing a warning in debug mode 2006-02-14 02:01:31 +00:00
mjollnir_ 347723bda2 fixing bug # 4751 - adding unique key in postgres for mod/quiz for gustav 2006-02-14 02:01:06 +00:00
gustav_delius 12318329fa Edit link in preview mode now also for descriptions, see bug 4518 2006-02-13 23:48:12 +00:00
gustav_delius b04523d1c4 convert sequence field to text to accomodate very long sequences, see bug 4257 2006-02-13 23:34:30 +00:00
gustav_delius a42f000635 Matching questions now no longer give away the answer in the page source, see bug 694 (that is an old bug!) 2006-02-13 23:15:40 +00:00
koenr d8891d4a23 typo 2006-02-13 22:52:45 +00:00
michaelpenne b9376ebef0 The following changes were made to help reduce confusion for students when essay questions are being used in a quiz.
- When a essay question has been submitted or being reviewed and has not been graded by the instructor, then the Marks are not shown and displays a message to the student instead of saying Incorrect. (changes to questiontypes/questiontype.php in functions print_question and print_question_grading_details).

    - For students, in view.php, a notice is printed to inform him/her that s/he has ungraded essay question(s).
    - For teachers, in view.php, a notice is printed to inform him/her that s/he has X number of ungraded essays for X number of studnets

    - In review.php, next to the grade output, informs the viewer if X number of ungraded essays in this attempt.

    - In questiontypes/essay/questiontype.php created a utility function to generate the numbers used in the above changes.

    - In lang/en/quiz.php added new lang entries.

So, hopefully the student will now understand that their grade does not include the ungraded essay questions.  Modification of lang entries might be needed to further drive this point.
2006-02-13 20:27:34 +00:00
michaelpenne d8ed413b92 Converted tabs to spaces 2006-02-13 17:44:50 +00:00
michaelpenne 2f6f0b8ce2 [Fixed] In function save_session_and_responses, now checks to makes sure $state->options->graded is set. 2006-02-13 17:41:19 +00:00
thepurpleblob 5744931aa2 Format now uses defaultquestion() method. Bug #4752 2006-02-13 16:24:05 +00:00
thepurpleblob d3ca8695cb Now used defaultquestion() method. Bug #4752 2006-02-13 16:17:22 +00:00
thepurpleblob 2ad273d70b Format now uses defaultquestion(). Bug #4752 2006-02-13 16:11:17 +00:00
thepurpleblob cb04e0d664 Now picks up default $question object. Bug #4752 2006-02-13 15:48:48 +00:00
bobopinna baef508d2c Removed the last short tag 2006-02-13 15:14:57 +00:00
thepurpleblob 42e5993199 Added initialisation method for question object. Permits setting of default
values for required (but not imported) database fields.
Bug #4752
2006-02-13 14:46:26 +00:00
gustav_delius acb0c2d93e fixing hardcoded string, see bug 4432 2006-02-13 13:28:40 +00:00
gustav_delius 353138dc11 Added a unique index for attempt->uniqueid 2006-02-13 13:20:57 +00:00
gustav_delius 6d08ff4f01 Fixing javascript, see bug 4418 2006-02-13 11:23:47 +00:00
vyshane a593aeee92 Added RSS support for data module. 2006-02-13 07:57:54 +00:00
patrickslee 9896df48fd Change password button should be displayed according to the setting of the user who is been viewed, not the user who is viewing(currently logged in) 2006-02-13 03:08:56 +00:00
toyomoyo 48dbefcd7d fix for 4735 2006-02-13 02:44:37 +00:00
toyomoyo 583dfd073d individual record error only gets reported when debug is on 2006-02-13 02:38:40 +00:00
toyomoyo 89ac329bd0 taking out adodb_logsql table 2006-02-13 01:58:42 +00:00
toyomoyo 4dc78ff1c1 taking out pma tables as they are not mandatory 2006-02-13 01:57:04 +00:00
toyomoyo 3b34520151 fixed a bug to stop changing dummy field 2006-02-13 01:55:42 +00:00
moodler fd198b8776 Adding new feature: Time delay between quiz attempts 2006-02-13 01:49:52 +00:00
moodler e61eab5a83 Adding new feature: delay between quiz attempts 2006-02-13 01:45:29 +00:00
patrickslee 808856c6f6 Imporved the documentation for flatfile enrolment plugin on the configuration page
Backported from MOODLE_15_STABLE
2006-02-13 00:36:56 +00:00
gustav_delius f0295d5aba Remove empty line, see bug 4747 2006-02-12 23:30:37 +00:00
gustav_delius 41323dff31 Added missing percentages to the grade selector, closing bug 4250 2006-02-12 22:38:13 +00:00
gustav_delius aa960f6b04 Edit link in preview window now says 'Edit'. 2006-02-12 22:26:53 +00:00
gustav_delius 0b72ce2051 Made page compatible with new tabbed interface and removed continue button as requested in bug 2919 2006-02-12 21:50:38 +00:00
gustav_delius 721b5b28c9 Stopped using the language strings for the assignment module because that was requested in bug 4558. 2006-02-12 21:23:54 +00:00
gustav_delius 8779eab55d Avoid error messages in case $quiz->sumgrades is zero, closing bug 4454. Merged from STABLE 2006-02-12 21:08:43 +00:00
skodak 0ae88327f2 fixed whitespace only 2006-02-12 19:46:30 +00:00
skodak 9b9ae915d7 scales.php fixed page parameters and removed isset_param(); scale parameter now named scaleid when listing only 2006-02-12 19:43:17 +00:00
skodak 295e4bdd18 fixed page parameters and removed isset_param() 2006-02-12 19:07:20 +00:00
gustav_delius 162cbee229 Added field to versioning table needed by new versioning table (to be committed later) 2006-02-12 15:28:17 +00:00
gustav_delius d40d8ef7b1 quiz_delete_question() now recursively also deletes data associated with newer versions of the question. 2006-02-12 15:24:45 +00:00
skodak fac01360b3 removed isset_param() 2006-02-12 11:27:22 +00:00
skodak 23ca8954be removed isset_param() and fixed warning 2006-02-12 11:24:24 +00:00
gustav_delius 5a981c9480 shuffleanswers option can now also be set at the question level, see http://moodle.org/mod/forum/discuss.php?d=39371 2006-02-12 09:46:34 +00:00
gustav_delius 906935f3b0 Put the default grade option onto question edit forms, see http://moodle.org/mod/forum/discuss.php?d=39371#181767 2006-02-11 22:37:30 +00:00
gustav_delius 7c4127efad Put the default grade option onto question edit forms, see http://moodle.org/mod/forum/discuss.php?d=39371#181767 2006-02-11 21:07:08 +00:00
gustav_delius 90ec0c2fc7 removed two method definitions that are used for the editing form 2006-02-11 16:40:09 +00:00
stronk7 feba81cc49 Avoid one notice. Bug 4690. Credits go to fad. B-)
(http://moodle.org/bugs/bug.php?op=show&bugid=4690)
2006-02-11 16:17:06 +00:00
gustav_delius 6f51aa2e5b get_actual_response() method for cloze question type contributed by Jean-Michel, see http://moodle.org/mod/forum/discuss.php?d=27730#181773 2006-02-11 16:13:21 +00:00
gustav_delius eaa5a1c0c8 Added missing icon (used by quiz editing page) 2006-02-11 14:07:54 +00:00
ikawhero ef0cfc1dbe Fixed some typos. Credit to Darlene Morris. 2006-02-11 03:55:52 +00:00
ethem 9a5a7c3814 Function: getsettletime minute fix. 2006-02-10 12:41:56 +00:00
moodler 3c73df8e5d Added missing require_once('locallib.php'); 2006-02-10 03:59:30 +00:00
vyshane 74142cc5a7 Reverted back rss_get_link() function. We've decided that the data module will
store it's XML RSS stuff in another path.
2006-02-10 03:16:59 +00:00
vyshane d1dbc96fea Modified function rss_get_link() so that we ignore $userid if it is empty when
we build the path to the XML file.

We need this for RSS feeds for the data module, where it does not make sense
to generate an XML file for each user when they will all be seeing the same
feed.
2006-02-10 03:03:29 +00:00
toyomoyo 55e87e5386 added code to remove possible warnings 2006-02-10 01:26:16 +00:00
toyomoyo 2cdd87a70f fix for 4720, added code to make sure en_utf8 is searchable in dirroot as well 2006-02-10 01:21:52 +00:00
toyomoyo 7919264b84 bug fixing for 4720 2006-02-10 01:16:54 +00:00
danmarsden d921818dc1 tidy up download of files when groups are turned on. + fix for Bug 4601 Bug 4476 2006-02-09 22:45:31 +00:00
danmarsden df5fb55cbc Bug #4452 link names to profiles 2006-02-09 21:50:21 +00:00
danmarsden 313441331e add ability to delete responses, add pragma to text download and removed hardcoded localised string. 2006-02-09 21:09:10 +00:00
danmarsden a56ca75fda backticks around release to allow upgrade to work correctly when using mysql 5 2006-02-09 18:12:51 +00:00
gustav_delius c4adc2c493 Added a second row of tabs to the Edit tab: Questions, Categories, Import, Export, Settings
Added phpdoc header to some files
Improved language string and help file for decimal digits on grades
2006-02-09 13:57:22 +00:00
gustav_delius 4eedc50cbc Excluded the description questiontypes from random questions
Fixed a warning message when there are no questions

Removed the category id number from the message shown to users when there are not enough random questions because this id number does not mean anything to the user.
2006-02-09 13:46:05 +00:00
gustav_delius e7cb8f3e7a Now one can set the title attribute for a tab separately from its text 2006-02-09 13:38:04 +00:00
gustav_delius 27998b9e2f Added a NOT NULL to a text field just because others have it and now it agrees with my recent commit to STABLE. 2006-02-09 12:23:49 +00:00
thepurpleblob 716a508520 parameters all go through required_param() and optional_param() 2006-02-09 11:50:25 +00:00
toyomoyo 743500132c bug fix for 4724 2006-02-09 07:52:48 +00:00
toyomoyo 527ec51af5 fix for 4726 2006-02-09 06:41:18 +00:00
vyshane bbe39b6ca9 Updated lang/en/data.php.
Removed hard coded message strings from scripts and moved them to the language file.
Fixed a display bug in multimenu field.
Removed rounded help buttons from fields, made the fields use html title to
display the descriptions instead.
2006-02-09 04:44:56 +00:00
toyomoyo 4a6716ceab bug fix for 4670 2006-02-09 02:18:13 +00:00
danmarsden c100a341a6 Bug 3768 - Release is now a reserved word in MySql 5 2006-02-08 23:46:21 +00:00
toyomoyo 7988d9e75a prevent the attempt of editting packs located in $CFG->dirroot/lang (from get_list_of_languages() used in 1.6 sites that are not uncodedb) 2006-02-08 07:44:36 +00:00
toyomoyo bcfe401e39 fix for 4715 2006-02-08 07:23:02 +00:00
ikawhero ef3d770bfa Initial help files for data module. Need tidying up. 2006-02-08 06:10:16 +00:00
fyang1024 b827a98e10 remove the testing code 2006-02-08 06:01:13 +00:00
ikawhero a3425b2ada Strings for the data module 2006-02-08 06:00:42 +00:00
fyang1024 407ed8c619 change class name soapclient to soap_client according to the nusoap.php in the lib/soap folder 2006-02-08 06:00:24 +00:00
toyomoyo d6af3cfab9 add_instance change too 2006-02-08 04:58:21 +00:00
toyomoyo 17e5f3fc9d adding 3 more fields to mod.html, and modified data_update_instance 2006-02-08 04:56:44 +00:00
moodler d49490104a Added new help: time enforced delay on attempting quizzes 2006-02-08 04:49:23 +00:00
moodler fb03508866 Added new lang: time enforced delay on attempting quizzes 2006-02-08 04:47:03 +00:00
moodler 72ef06cfe5 Added new feature, the time enforced delay on attempting quizzes 2006-02-08 04:44:57 +00:00
moodler cab300a85f Add two new fields for time enforced delay between two quizzes 2006-02-08 04:41:31 +00:00
moodler 401c3496ae Adding two new fields for time enforced delay between quiz 2006-02-08 04:37:22 +00:00
toyomoyo 256054828a adding 3 more fields 2006-02-08 04:35:43 +00:00
toyomoyo 0e64ba2852 adding 3 new fields 2006-02-08 04:35:23 +00:00
patrickslee 765d3c7dde Show category list rather than the whole list of courses if there is only one category and with more than 200 courses in it
Otherwise we will have a HUGE list of courses flooding our browser.

Backported from MOODLE_15_STABLE
2006-02-08 04:21:22 +00:00
patrickslee 48643b4918 Do not show the category list with courses if there are more than 200 courses in the system
Otherwise the front page/course list will be flooded with courses.
2006-02-08 03:34:20 +00:00
toyomoyo 70eed352e6 fixing a problem with enum 2006-02-08 03:30:26 +00:00
gbateson cfbaea0056 small change to get CSS background images displayed on site where PHP's server API is "CGI". Micro increment version number to 2.1.12 2006-02-08 02:47:22 +00:00
toyomoyo 1a395c082d added a missing prefix 2006-02-08 02:42:12 +00:00
toyomoyo 5698c19d7a prints all SQLs if debug is set to true 2006-02-08 02:20:43 +00:00
toyomoyo f8cf297a7a bug fix for 4709 2006-02-08 02:02:28 +00:00
toyomoyo d9e61eacfd setting time to 0 2006-02-07 07:05:01 +00:00
toyomoyo 656411a550 adding pma tables 2006-02-07 05:57:54 +00:00
toyomoyo 0a43c46b3b hardcode all encodings, so we don't need to rely on old lang files 2006-02-07 02:57:35 +00:00
toyomoyo 24d8b724da bug 4504 2006-02-07 01:39:22 +00:00
patrickslee 8e227aa767 Added a parameter to print_courses() to hide site course
This parameter is used in index.php because if the moodle site have more than one category the site course will be displayed in the course list in the front page.

This problem appeared after the "front page format" feature is introduced. As the old front page will show a category tree with courses if there are more than one category in the system when "list of courses" is chosen as the front page.
2006-02-07 01:13:27 +00:00
gustav_delius bfb55c1870 now loading central soap library 2006-02-07 01:13:20 +00:00
gustav_delius cd00e988bb Introduced function quiz_delete_question() and questiontype methods delete_question() 2006-02-07 00:44:27 +00:00
stronk7 de4217730a Deleted soap libraries from quiz. Now they are part of the central libraries
(lib/soaplib.php and lib/soap). Bug 4646.
(http://moodle.org/bugs/bug.php?op=show&bugid=4646)
2006-02-07 00:26:54 +00:00
stronk7 882e59b93b Main Moodle SOAP library. It uses nusoap or phpsoap
as needed. Copied from rqp question type.
2006-02-07 00:20:50 +00:00
stronk7 157278118e wrapper library to use internal PHP5 SOAP library. Copied from
rqp quiz questions.
2006-02-07 00:19:38 +00:00
stronk7 b6b970705e Initially the get_string() function, if any string wasn't found under
one lang (or its parent), was searched from "en" or "en_utf8"
(depending of the status of the DB migration).

But "en" isn't one full lang anymore under 1.6 but one "child" of "en_utf8" and
it's completely empty so we must look for the string into his new parent too.

This should solve problems with upgraded sites using non-english languages
that were showing brackets everywhere. Now they will show the english strings
until they manually install lang packages (1.5 packs) or automatically (1.6 packs).
2006-02-07 00:08:47 +00:00
patrickslee bfb2ed3bdd Fixed nusoap include problem in lams module caused by the rename of nusoap lib directory 2006-02-06 23:45:43 +00:00
gustav_delius c9dfed37c2 Silenced notices produced by flush() and ob_flush() in regrading code. 2006-02-06 23:28:30 +00:00
gustav_delius 3bf0212c24 Another improvement on regrading. The code thought that grading for a question changed if the grade was like 1/3. The precision in the database is different than the newly calculated grade, so now we round both values to 5 decimal places, which should fix this problem. This was committed to STABLE by Julian a long time ago 2006-02-06 23:25:15 +00:00
gustav_delius 27aa2243ea I was adding the slashes twice 2006-02-06 23:15:59 +00:00
mjollnir_ f5f270a188 Adding missing default perfdebug 2006-02-06 23:02:05 +00:00
gustav_delius 46fbd65ab7 Show grading details only if $options->scores is true 2006-02-06 22:52:05 +00:00
gustav_delius adce1ab5c1 Fixing problem from earlier merge 2006-02-06 21:22:07 +00:00
mjollnir_ f90672bf85 Added back a field I missed when reworking the sql for quiz reports - qa.uniqueid as attemptuniqueid - after skype discussion with gustav 2006-02-06 20:58:27 +00:00
michaelpenne 8e7cf8d4c9 [Fixed] Activity linking was not useing the course module id correctly. 2006-02-06 20:49:03 +00:00
gustav_delius 668bc1f3a6 reverting change made by Martin D when going to version 1.230 2006-02-06 20:44:43 +00:00
stronk7 a25a4a7356 Nusoap lib is now uder the soap dir. Bug 4646.
(http://moodle.org/bugs/bug.php?op=show&bugid=4646)
2006-02-06 19:39:18 +00:00
stronk7 2797078a69 Moving the nusoap library from nusoap to the new soap dir. 2006-02-06 19:37:17 +00:00
stronk7 f1144867da nusoap lib updated to latest revision.
Point 1 of bug 4646
(http://moodle.org/bugs/bug.php?op=show&bugid=4646)
2006-02-06 19:20:22 +00:00
thepurpleblob f6dc60844f Added provision for resetting values to default. Bug #4123 2006-02-06 16:48:32 +00:00
thepurpleblob e9512cdda9 Added ability to reset to default. Bug #4123 2006-02-06 16:36:28 +00:00
thepurpleblob cda8673c5f Added ability to reset page to defaults. bug #4123 2006-02-06 16:32:44 +00:00
thepurpleblob 56a031c9ac Added string for resettodefaults for filters pages. bug #4123 2006-02-06 16:31:36 +00:00
thepurpleblob 7be6fd6684 Added new reset button. bug #4123 2006-02-06 16:30:30 +00:00
thepurpleblob 0ae6a2cad5 Added test for cache directory. Suppresses errors if it does not exist. 2006-02-06 15:35:31 +00:00
andreabix dbda947cf0 Fixed uneven spacing in minicalendar table. Thanks to Daniele Cordella for the hint. 2006-02-06 14:46:47 +00:00
stronk7 8859e0b6ca Now "en" lang has "en_utf8" as parent so we must allow
it to look for parent strings... Only "en_utf8" remains
as root language to save us from some checks (because
it cannot have parentlaguage defined).
2006-02-06 13:45:00 +00:00
stronk7 e973824c94 parentlanguage is the correct name 2006-02-06 13:24:49 +00:00
moodler a956203b48 Added a missing string 2006-02-06 13:02:23 +00:00
moodler bdad561a9e DOS format 2006-02-06 12:59:57 +00:00
moodler ff2fccc971 Updated README 2006-02-06 12:59:20 +00:00
moodler 919ece0f88 Slightly more documentation 2006-02-06 12:52:12 +00:00
moodler 0b85bf5430 New stub file for "en" language 2006-02-06 12:51:05 +00:00
moodler c1a1e8e465 New base version of English in UTF8 2006-02-06 09:30:09 +00:00
moodler 49aafb90bd New base version of English in Unicode format 2006-02-06 09:28:59 +00:00
moodler cfa40737cf Removing all the language packs from HEAD!! 8-D 2006-02-06 09:22:14 +00:00
vyshane f9eab7b0c9 Fixed bug in /mod/data/filter.php - content list for autolinking was not being
generated properly.

Updated /mod/data/fields.php - deletion of a field now also deletes
data_contents and any files associated as well.

Add/update/delete fields - template now gets updates in the following cases:
1) Deletion: remove template tags for the field from all templates
2) Edit: search and replace template tags for the field in all templates
3) Add: append template tag for field into the signe and rss templates, but
only if these templates are not empty. Otherwise we'd rather the user uses the
automatic template generation facility, which produces better display.
2006-02-06 09:13:37 +00:00
moodler 20f601d324 editting of langs take place in $CFG->dataroot/lang now, Editting of en_utf8 is disabled 2006-02-06 08:41:21 +00:00
toyomoyo 5d9a7c352e group 0 records are visible to all now 2006-02-06 06:30:18 +00:00
toyomoyo 27b00cd39b no page in groups, thanks 2006-02-06 06:19:00 +00:00
toyomoyo f4e101bd08 adding group support 2006-02-06 06:13:34 +00:00
ikawhero a0397e90da return to previous view after editing a record 2006-02-06 05:37:20 +00:00
ikawhero d6f0e247b4 I'm really having issues getting this one line right! 2006-02-06 05:36:34 +00:00
ikawhero 12fe91c401 Oops, missing semicolon 2006-02-06 05:33:26 +00:00
ikawhero 5782be6b0a Recommiting lost changes. 2006-02-06 05:31:52 +00:00
toyomoyo 42e118badc templates and fields do not require group support 2006-02-06 05:31:49 +00:00
moodler 6e0119dd30 Various small XHTML fixes, language fixes 2006-02-06 05:24:02 +00:00
ikawhero 6f4e039994 Tidying up. 2006-02-06 05:18:37 +00:00
moodler bbccd611cb fixing for 4695 2006-02-06 05:02:38 +00:00
moodler 56135f6b4c Show the intro at the top of the page 2006-02-06 04:17:30 +00:00
moodler 089e8937f7 Removing delDirContents because we already have remove_dir 2006-02-06 04:03:30 +00:00
moodler 201b8b3681 adding a check to make sure student can't participant in teacher participation level 2006-02-06 03:51:51 +00:00
moodler ecb454fe6a fixing a type update->updated 2006-02-06 03:13:59 +00:00
moodler 653bcc596c Added a link to the listtemplate images to the full record 2006-02-06 03:06:16 +00:00
moodler cd2f695055 Added a parameter to display_browse_field() to pass the template name
to the fields, so they can return different output for different templates.

Picture now has two heights/widths for different templates
2006-02-06 02:49:46 +00:00
moodler 83b4f772d9 fixing 4681 2006-02-06 02:41:59 +00:00
moodler a6d122f7a7 fix for 4615 2006-02-06 02:31:32 +00:00
moodler cc0a632f1e fixing ' problems 4679 2006-02-06 02:15:44 +00:00
moodler dd0b8fe1d4 fixing typos 2006-02-06 01:51:03 +00:00
gustav_delius 0e2057cb17 Added essay question to list of excluded types for random questions
Also fixed type on previous commit
2006-02-05 22:55:09 +00:00
gustav_delius 5e468d30e1 Fixed a potential bug that would have hit if one quiz would have had two random questions for the same category, one of which was set to recurse into subcategories and the other not.
At the same time this improves performance because no longer all the potential questions are loaded from the database but only their ids.
2006-02-05 22:51:32 +00:00
scop22 1a914bccda Fixing 'firstdayofweek' string to include number only 2006-02-05 20:30:34 +00:00
scop22 f68e6f2ace Committing in ko language pack to keep up with latest translated strings in ko_utf8 unicode pack; last commit before the move to unicode only translation 2006-02-05 20:21:45 +00:00
scop22 78e58fb918 Committing in ko_utf8 many new additions and corrections; last commit before the new unicode system kicks in 2006-02-05 19:00:44 +00:00
gustav_delius d28ca2be6f Fixing image link, closing bug 4489 2006-02-05 18:58:49 +00:00
gustav_delius 205e0e2dd6 Some comments added and fixed small potential bug in get_correct_responses() 2006-02-05 18:45:31 +00:00
gustav_delius fb06b99b78 Reverting a change which Martin made in an attempt to encrypt information in the matching questiontype which unfortunately broke a lot of other question types. 2006-02-05 18:31:23 +00:00
stronk7 74506a51a3 Perform one aditional check to avoid one, in my opinion,
bad behaviour of PHP5.
2006-02-05 10:11:12 +00:00
stronk7 b4dd571d8e Now the installer looks for UTF-8 enabled DB (both for MySQL and
Postgress) warning if DB it isn't found. This test can be skipped,
but showing a message about it.
If everything is OK the CFG->unicodedb variable is written to the
config.php file.
With this, 1.6 installer should be 100% ready.
2006-02-05 00:57:44 +00:00
gustav_delius 2b0906805b Fix for bug 4678 contributed by rwmoore 2006-02-05 00:35:51 +00:00
stronk7 96c9f7379c Now the utfdbmigrate process trusts about enviromental decission. 2006-02-04 19:03:51 +00:00
mits 98cd3ab70c changed iconv and mbstring recommended messages based on /lang/en.
translated new strings.
2006-02-04 18:57:59 +00:00
stronk7 76bb0d20a3 We only allow to bypass "required" checks. 2006-02-04 18:57:22 +00:00
stronk7 696d30784b DOS linefeeds are dead now! 2006-02-04 18:51:25 +00:00
stronk7 be828dcdcb New record!! 2 lines, 3 typos!! :-P
Also, I've noticed that the file has DOS linefeeds!
Please avoid them!
2006-02-04 18:49:19 +00:00
stronk7 8dc725d939 Solving typo! 2006-02-04 18:31:09 +00:00
stronk7 b0e2a189ce Now every test in the enviromental check can by bypassed by one
function execution. Currently it's used to check for MySQL 4.1.12
and if present, result will be ok, showing a notice about
possible problems with non latin languages.
2006-02-04 18:30:22 +00:00
stronk7 de36987bcf changing one wrong string. 2006-02-04 18:26:27 +00:00
stronk7 cae45bfe82 Sending some new environment strings.
Verified by EOS  ;-)
2006-02-04 18:20:14 +00:00
stronk7 b9993e9568 Bypass function redefined a bit. 2006-02-04 17:22:59 +00:00
martignoni 8c42b481bb adding strings 2006-02-04 15:38:19 +00:00
martignoni 32ca09bca8 Added to enviroment feedback messages. More soon... 2006-02-04 15:36:37 +00:00
martignoni 1f22eb2f3f Show only one message for actions (Capture/Void/Credit) in test mode. 2006-02-04 15:23:09 +00:00
mits 4f358c9ec9 polished. 2006-02-03 18:57:20 +00:00
martignoni f0018992ea Minor change. Delete one slash. 2006-02-03 14:44:39 +00:00
martignoni 1030f57b67 Error strings for component_installer class added. 2006-02-03 14:42:16 +00:00
moodler 1291b2d54f Fixed some SQL errors on searching and sorting 2006-02-03 10:53:00 +00:00
ikawhero 1f697b99aa Remove para tags 2006-02-03 10:42:14 +00:00
mits 512cc057aa translated new strings for maintenance.. 2006-02-03 10:33:19 +00:00
ikawhero d20578cc4d New help file. Needs cleaning up. 2006-02-03 10:12:18 +00:00
ikawhero 26aae788ba Initial help files for data module. Will need cleaning up. 2006-02-03 09:27:37 +00:00
vyshane 173b1b1261 Input field size cleanups. 2006-02-03 09:22:23 +00:00
moodler 27f7cf9039 adding strings 2006-02-03 09:19:51 +00:00
moodler 27afe69260 get_string not stripslashes 2006-02-03 09:17:25 +00:00
moodler e9e6e7b85f fix for 4676 2006-02-03 09:16:15 +00:00
ikawhero d0dfb3ba87 More strings added 2006-02-03 09:00:49 +00:00
ikawhero f3b5b8b668 Added new string 2006-02-03 08:58:08 +00:00
ikawhero d7ca860b9d Added helpbutton for approvals. 2006-02-03 08:56:30 +00:00
moodler 20fda38ba9 adding functionality to allow teacher approval of record 2006-02-03 08:12:41 +00:00
moodler cf3e199bce changes in search, sort etc 2006-02-03 08:11:36 +00:00
ikawhero 31c1f1c93e Added help buttons, removed ambiguous participants entry. 2006-02-03 08:10:06 +00:00
bobopinna 0f995ab206 Fixed some bugs and typos 2006-02-03 08:04:57 +00:00
vyshane 0bbc6f5700 Added autolinking. 2006-02-03 08:04:40 +00:00
moodler 60b8d2234a Added a space 2006-02-03 07:38:27 +00:00
moodler dae9e55b06 Added Skype web-status 2006-02-03 07:27:46 +00:00
mits 9aeb3a8a5f translated new strings for environment. 2006-02-03 02:04:17 +00:00
stronk7 9e2d15e559 Now environment.xml file can define for all the tests (database,
php and php_extension) some feedback notes to be showed on error,
on check and on ok.

Tomorrow, I'll include de bypass mechanism that will allow us to
change results of any text based in function call results.
2006-02-03 00:40:49 +00:00
stronk7 205b551eeb Added to enviroment feedback messages. More soon... 2006-02-03 00:24:46 +00:00
stronk7 10a1ac179e Change one style to apply it in some more places... 2006-02-03 00:23:03 +00:00
mjollnir_ 510b75ae64 Merged from MOODLE_15_STABLE: Moved check_dir_exists function from backup/lib.php to moodlelib 2006-02-02 20:30:34 +00:00
stronk7 d24e8b250e Now enviroment.xml will support:
- Feedback messages to be defined on error and on check.
- Bypass function calls to change original checks performed.
2006-02-02 18:29:41 +00:00
mits 6c2cde36d7 polished.
The great change for lang files is coming soon :-)
http://moodle.org/mod/forum/discuss.php?d=38892
2006-02-02 10:33:09 +00:00
vyshane bad7f9e00a Removed debugging output from /mod/data/lib.php
New icons for field types
2006-02-02 10:12:30 +00:00
martignoni dcbf710fc6 2 components strings... 2006-02-02 10:11:46 +00:00
martignoni 356725e9b6 Adding some strings for db migration 2006-02-02 10:10:22 +00:00
martignoni d0488aa831 New language strings to express ordering choices 2006-02-02 10:00:28 +00:00
martignoni 17b976fb97 One forgotten string (dbwrongencoding) 2006-02-02 09:52:43 +00:00
martignoni 7ad51db5e0 One forgotten string... ('skipdbencodingtest') 2006-02-02 09:37:42 +00:00
carlesbellver 52b4548021 Moodle 1.6 2006-02-02 08:10:11 +00:00
vyshane c87fbb27e1 Removed autolink support from radio button field (not needed).
Fixed bug for empty muti menu and multi checkbox fields.
Added "Choose..." as first item in single selection menu. Added relevant
string in en language.
Updated /mod/data/lib.php, function store_data_content() so that we store
empty content for fields too.
2006-02-02 06:28:17 +00:00
mits 05a42a140b polished. 2006-02-02 04:52:37 +00:00
mjollnir_ 3abd1a5552 Merged from MOODLE_15_STABLE: Fixing bug#4659 - don't make upload directories unless there's something to save 2006-02-01 20:01:50 +00:00
stronk7 4128597a44 Solved one bug when decoding encoded links for
resource->reference
(http://moodle.org/mod/forum/discuss.php?d=38801)

Merged from MOODLE_15_STABLE
2006-02-01 19:10:30 +00:00
koenr 19b7a4a2ca New strings from Vichika for khmer 2006-02-01 16:25:01 +00:00
koenr 64c17a0710 New files and new strings from a new translator: Tormod for the no language pack
Checking it in while I'm still sure I'm doing it right :-D
2006-02-01 15:36:22 +00:00
ethem 33bbb39b4f Show warning message if cron doesn't work. Review order depends on cron & an_capture_day. 2006-02-01 13:30:45 +00:00
gbateson abbd2c40ba if old "v6" folder cannot be deleted, update will WARN but will not fail 2006-02-01 13:25:06 +00:00
ethem 7fec4cb2f9 Rename an_cutoff_hour and an_cutoff_min to an_cutoff. 2006-02-01 13:03:13 +00:00
vyshane 88f47f81bc Removed autolink form radio button field (not needed). 2006-02-01 06:59:57 +00:00
moodler 1c6f450c41 changed to use componentlib 2006-02-01 05:59:21 +00:00
mits 2655b93fe2 Delete one slash from "remotedownloadnotallowed" on error.php
translated new strings for language migration.
translated a new string for Authorize.net.

to make expression soften changed translation "We" from [Kanji] character to Japanese syllabary characters.
meaning is same.
2006-02-01 05:43:07 +00:00
vyshane 2806b95ca2 Modification to make field use content1 column in data_content table 2006-02-01 05:13:01 +00:00
vyshane 22e192c9f0 Added language strings for multi-selection menu and checkbox fields. 2006-02-01 05:11:23 +00:00
vyshane 2c5c1418bb Added multi-selection menu field support. 2006-02-01 05:09:59 +00:00
vyshane 4728968fc7 Checkbox field support 2006-02-01 05:08:51 +00:00
ethem 181c06ea6b Show only one message for actions (Capture/Void/Credit) in test mode. 2006-01-31 16:41:46 +00:00
stronk7 4d1014d5c8 ziip files doesn't exist! 2006-01-31 15:03:52 +00:00
stronk7 24e4cd5375 Now environmental data can be installed automatically from
download.moodle.org using the component_installer class.

Seems to work at the fist try, so something is wrong, sure! :-P
2006-01-31 14:53:05 +00:00
stronk7 65e9c20363 2 components strings... 2006-01-31 14:48:49 +00:00
stronk7 71de0d55f8 Bug solved. make_upload_directory() is relative to
dataroot by definition.
2006-01-31 14:32:20 +00:00
stronk7 ae8c20d737 Minor change. Delete one slash. 2006-01-31 14:31:02 +00:00
martignoni c77f9c311f Better wording 2006-01-31 13:40:52 +00:00
martignoni 58780da99b Some typos corrected 2006-01-31 13:36:52 +00:00
martignoni 0dae324b93 Typo corrected 2006-01-31 13:22:40 +00:00
moodler 9b470754b3 deleting lang cahce after done 2006-01-31 09:08:22 +00:00
moodler 860e5affcb adding some strings for db migration 2006-01-31 08:43:07 +00:00
moodler 001fc706ef fixing bugs in event table 2006-01-31 08:37:00 +00:00
moodler 799ce77d79 mechanism for unicode db migration is in. Please only use for testing at this stage. This is not for production site! (yet) 2006-01-31 08:21:04 +00:00
moodler b1cdbbf9c6 New Chameleon theme from
Urs Hunkler - http://www.unodo.de
    Andrew Walker - http://www.altoncollege.ac.uk
2006-01-31 06:05:33 +00:00
vyshane f1ad19bcae Fixed update display bug in the menu field.
Updated following fields so that they do not pack data into
data_content.content, but use data_content.content, data_content.content1,
etc:

- URL field
- File field
- Picture field

Note that above changes to the way data is stored means that the new
implementation is not compatible with previous version.

Updated textarea field. Added relevant help messages. Added richtext editor
support. Removed ability to restrict allowed formats for the textarea field.

Misc bug fixes and display tweaks.
2006-01-31 04:25:46 +00:00
vyshane 5f5bcda8b4 Added richtext support for textarea, plus relevant help buttons. Made fields
use column content1, content 2, etc. instead of packing everything into
content.
2006-01-31 03:58:42 +00:00
patrickslee 79724b8ebb file enrol_manual.php was initially added on branch MOODLE_16_MULTIENROL. 2006-01-31 02:53:56 +00:00
moodler 136b6ab33f changed to use utfconvert function 2006-01-31 02:15:21 +00:00
mits 9ae17efc1c translated new strings for component_installer class. 2006-01-31 01:22:41 +00:00
stronk7 cdeb260153 Error strings for component_installer class added. 2006-01-31 00:15:26 +00:00
stronk7 c6fd7d80f3 Minor modifications. 2006-01-31 00:14:48 +00:00
stronk7 d70c9bda55 Finished the install_component class. It allows do do all the work
just with 2 calls. See embebed documentation about usage.

Next step, add some error strings and implement it both in pear and
environmental actions.
2006-01-30 23:19:13 +00:00
gustav_delius a445d5e8b2 shortened language string name as requested in bug 4568 2006-01-30 23:17:47 +00:00
patrickslee e0140f2425 Revised front page logic so list of courses and list of categories show correct things regardless of any special situation
And a small HTML fix for print_category_info()
2006-01-30 22:54:12 +00:00
patrickslee 6298f98c0a Some HTML fixes for configurable frontpage settings page 2006-01-30 21:20:45 +00:00
gustav_delius 6e218d24ce Fixed alignment of form elements in IE 2006-01-30 21:09:48 +00:00
gustav_delius 56b5d16a4d Fixed alignment of module icon so it looks correct also in Firefox. 2006-01-30 20:45:54 +00:00
mits c551c0604a polished. 2006-01-30 15:31:21 +00:00
stronk7 d359b5ac14 first cut of the component download and install
library. Will be used for 1.6 langs, pear and
enviromental stuff install from moodle.org.

Not working yet!
2006-01-30 15:02:20 +00:00
mits 21d47f1f37 polished. 2006-01-30 12:05:46 +00:00
thepurpleblob 610a889296 Fixed typo. 2006-01-30 10:51:40 +00:00
mits 176ef4cdde polished. 2006-01-30 02:19:06 +00:00
mits 3328924542 polished.
translated new string new for "express ordering choices".
2006-01-30 01:02:01 +00:00
gustav_delius 9f55987836 Now use language strings instead of 1,2,3 to express ordering choices 2006-01-30 00:40:57 +00:00
gustav_delius 9af43ab537 new language strings to express ordering choices 2006-01-30 00:40:36 +00:00
mits d0977a1a58 polished. 2006-01-30 00:29:06 +00:00
mits c5aaa15c9c polished. 2006-01-30 00:17:07 +00:00
mits eaa315d771 polished. 2006-01-29 12:55:58 +00:00
koenr 66e28bf870 clarified the use of this language pack in English 2006-01-29 11:05:07 +00:00
koenr cc7561762d Changing language notation Norsk to Norsk - Norsk - Bokm&#229;l after discussion with Tormod 2006-01-29 10:42:42 +00:00
koenr 7f059d2375 Changing display of Nynorsk to Norsk - Nynorsk after discussion with Tormod 2006-01-29 10:40:04 +00:00
mits c699199a51 polished and translated new strings. 2006-01-29 05:55:15 +00:00
mits aecb0db468 polished and added one new string for install. 2006-01-28 20:49:13 +00:00
koenr 14cf08fdba new strings translated 2006-01-28 20:04:17 +00:00
stronk7 5c95e839f7 One forgotten string... 2006-01-28 19:52:26 +00:00
defacer e68cf1b3e9 Merging from STABLE:
Fix for bug 4627:

Hide "change password" link in admin block if the user is restricted.
Not a security issue, as the script doesn't allow you to change your
password even if you go there by typing in the URL.

Credits for report & patch go to Joseph Rezeau.
2006-01-28 19:49:16 +00:00
stronk7 6844571580 Added one new string and polished another one. Thanks EOS! ;-) 2006-01-28 19:21:22 +00:00
mits d0ec7d0ced modified based on fixed "typo Bug #4638" lang/en. 2006-01-28 16:12:40 +00:00
koenr 1667957eb0 typo Bug #4638 2006-01-28 15:40:35 +00:00
moodler fe9f19ef1e Added a fix to help user profile pictures under safe mode (from Mahmoud H. Hasan)
PHP manual mentions it too.
2006-01-28 14:15:56 +00:00
mits 0600f5be99 making expression more soften, changed translation of "as" from Kanji character to Japanese syllabary characters.
meaning is same.
2006-01-28 12:35:41 +00:00
mits 95f26a9a3e upgraded AdoDB and added Typo3 charset libs based on /lang/en
committed again ......
2006-01-28 11:45:12 +00:00
mits 4250125a3d Upgraded AdoDB and added Typo3 charset libs based on /lang/en. 2006-01-28 11:39:24 +00:00
stronk7 875571cae9 Upgraded AdoDB and added Typo3 charset libs (Spanish) 2006-01-28 11:16:23 +00:00
stronk7 a8f23ba288 Upgraded AdoDB and added Typo3 charset libs. 2006-01-28 11:08:56 +00:00
mits ce97200025 polished. 2006-01-28 10:38:19 +00:00
mits 1cf0e57716 polished. 2006-01-28 10:30:49 +00:00
mits 4a3b5c15e4 polished. 2006-01-28 09:19:51 +00:00
mits 1046dabbe2 polished. 2006-01-28 07:38:55 +00:00
moodler 7d94fa91d5 Upgraded ADOdb to 4.71
http://sourceforge.net/project/shownotes.php?release_id=387862&group_id=42718
2006-01-28 06:04:42 +00:00
stronk7 13ca56cf52 Solving double addslashes to DB when the site is running with
magic_quotes_gpc() disabled (because Moodle addslashes to
everything). Not a pretty hack, but it seems to work.
(http://moodle.org/mod/forum/discuss.php?d=38127)

Merged from MOODLE_15_STABLE
2006-01-27 23:01:34 +00:00
ethem 00a354a2da Which form is submitted? Internal or authorize?
This eliminates undefined form->property notices when user submitted internal form.
2006-01-27 14:16:41 +00:00
ethem d90534da0d Move $this->validate_enrol_form() to check_entry(). 2006-01-27 13:44:11 +00:00
ethem c5c56ae00d Move card validation to validate_enrol_form function. 2006-01-27 13:34:42 +00:00
martignoni cc56643a8b Forgotten string 'adminemailexpired' 2006-01-27 13:25:11 +00:00
martignoni ca3e567a20 Reverted wrong string deletion 2006-01-27 13:17:23 +00:00
mits eca7556d55 polished. 2006-01-27 11:25:50 +00:00
mits cc3de1f126 polished. 2006-01-27 10:46:29 +00:00
ethem b1fa2cf269 Card Validation and Postal Code field validation fix. (is_int & is_numeric) 2006-01-27 09:16:01 +00:00
moodler bdc003eb05 bug fixings 2006-01-27 04:39:53 +00:00
moodler 677169b9dc fixing typo 2006-01-27 04:31:46 +00:00
moodler f36c4b9601 took out an echo 2006-01-27 04:29:11 +00:00
moodler 112d84a3f9 fixing typo =( 2006-01-27 04:27:08 +00:00
toyomoyo a597f8a86a adding function print_progress from upgradeforumread 2006-01-27 02:54:51 +00:00
toyomoyo 943cc10d5b took out print_progress funciton and put it in adminlib 2006-01-27 02:54:03 +00:00
mits 71f7eeff64 polished. 2006-01-26 14:18:55 +00:00
mits 15797ed775 polished.
making expression more soften, changed translation of "ask" from Kanji character to Japanese syllabary characters.
meaning is same.
2006-01-26 13:57:30 +00:00
martignoni c3eebe72c6 Extra text in 'guestnosubmit' 2006-01-26 13:36:34 +00:00
martignoni da72808b23 Latest install-related strings added. 2006-01-26 13:33:51 +00:00
martignoni ed16012468 Minor change... 2006-01-26 13:20:12 +00:00
martignoni d4841ba032 Split some strings for better formatting. Old ones are maintained
for 1.5 compatibility.
2006-01-26 13:19:02 +00:00
martignoni 913b3ca7ae Environment strings added. 2006-01-26 12:58:34 +00:00
martignoni dc33c57d0d Manage orders with status filter. All/Authorized/Captured/Refunded/Cancelled/Expired. 2006-01-26 12:46:41 +00:00
martignoni 7fd2b284d9 AVS & Reason messages. 2006-01-26 12:43:53 +00:00
ethem a47f3a1ab2 New strings from Ethem Evlice (ethem AT evlice DOT com) <XHTML /> compliant. 2006-01-26 12:29:59 +00:00
mits 04058928e6 polished. 2006-01-26 12:22:20 +00:00
gbateson fee4328c6b Further improvement to generation alternative matches in JMatch 2006-01-26 12:11:36 +00:00
martignoni 3422bbf524 Merged Patrick's mailnow patch. This allows admin users the ability to override maxediting time and have forum posts mailed out immediately. 2006-01-26 10:23:22 +00:00
martignoni daca15fb32 Environment strings added. 2006-01-26 10:14:10 +00:00
barias 73d3ad7fe9 Latest help files 2006-01-26 01:12:38 +00:00
julmis 1ab4713da2 Merging from MOODLE_15_STABLE
- adding fix for Bug 4562. Fix posted by sgarcia.
2006-01-25 23:47:16 +00:00
stronk7 e4a70465de Raising MySQL minimum version to 4.1.16
Merged from MOODLE_15_STABLE
2006-01-25 15:52:48 +00:00
koenr 9d6cdb7141 NCR notation required - sorry 2006-01-25 14:56:22 +00:00
koenr 95e45af5f8 new strings from Maryia 2006-01-25 14:42:29 +00:00
vyshane 113782126c Modifications to use new columns in data_content table
Modifications to support different text formats
2006-01-25 09:21:17 +00:00
vyshane eefe4f9720 Modifications to use new columns in data_content table 2006-01-25 09:18:29 +00:00
vyshane c91c24d7e3 Modifications to bring in line with the changes to database structure.
Vy-Shane
2006-01-25 09:10:14 +00:00
carlesbellver 9629b1d285 Correccions 2006-01-25 07:59:43 +00:00
gbateson 27e4e81f1b micro increment version to 2.1.11 2006-01-25 07:31:37 +00:00
gbateson ea2cf99599 added backup/restore compatibility for Moodle 1.5 (and earlier) 2006-01-25 07:20:13 +00:00
moodler 3e42156be5 removed an extra echo statement 2006-01-25 06:23:33 +00:00
moodler 4979f73c9e fixing typos 2006-01-25 06:11:26 +00:00
moodler 37d7e71a0b bug fixning 2006-01-25 06:11:00 +00:00
moodler 052dec9a2c adding more cases for serialized blocks 2006-01-25 06:10:18 +00:00
moodler b250d8b32b bug fixing indexing problem 2006-01-25 06:07:52 +00:00
moodler 25d0380b6e bug fixing 2006-01-25 05:20:33 +00:00
mits 423e3cdd14 polished. 2006-01-25 03:47:28 +00:00
mits 72b5c43142 polished.
making expression more soften, changed translation of "immediately", "As soon as"  from Kanji character to Japanese syllabary characters.
checked frequency of usage in Google.
meaning is same.
2006-01-24 11:33:15 +00:00
mits 05366c0084 polished. 2006-01-24 08:34:04 +00:00
moodler 3b1cddb932 adding a require_logout() function 2006-01-24 06:01:30 +00:00
moodler 0302c52fd2 adding a require_logout() function =) 2006-01-24 06:00:32 +00:00
moodler 3b32165cc7 bug fixing 2006-01-24 02:37:18 +00:00
moodler a03d69a5ea added code to support dummy fields (to enable dropping and adding arbitray number of indexes) 2006-01-24 02:36:32 +00:00
moodler e70813cf37 Cleaned up text field params (textarea does this now) 2006-01-24 02:20:51 +00:00
moodler 54cf0d092f Fixed a parameter check 2006-01-24 02:07:13 +00:00
vyshane 65342c76a3 Fixed syntax error on line 804. 2006-01-24 01:51:13 +00:00
moodler a789577bf4 Fix Bug #4626 - weblib.php: $course object conversion error in &quot;print_footer &quot; function 2006-01-24 01:40:06 +00:00
mits 0b58de9ae1 polished again. 2006-01-24 01:29:46 +00:00
mits f7393b5297 polished. 2006-01-24 01:27:10 +00:00
michaelpenne de1547bf6c [Fixed] A problem with storing the answerid for numerical questions. Discussion here: http://moodle.org/mod/forum/discuss.php?d=37537 2006-01-24 00:47:11 +00:00
mjollnir_ 5e33ce6da3 bugfix for hook for filters to have their own save config function 2006-01-23 22:38:01 +00:00
mjollnir_ e5b66e2cd4 added hook for filters to have their own save config function if they want to 2006-01-23 20:37:44 +00:00
stronk7 4d69a487e4 Cleaning of unnecessary 4th fields in the insert_record() function.
See http://moodle.org/bugs/bug.php?op=show&bugid=4583 for more
information.
2006-01-23 16:36:46 +00:00
andreabix 8794f8bff0 Typo corrected thanks to Luca Mazzola 2006-01-23 14:24:52 +00:00
dlnsk 979435ffa5 New string added 2006-01-23 07:52:52 +00:00
moodler 0e15269a94 bug fixing 2006-01-23 05:41:51 +00:00
mits 7a5f1757fc translated extra text in 'guestnosubmit'. 2006-01-23 03:48:29 +00:00
moodler 0c25b4534e bug fixes 2006-01-23 03:15:45 +00:00
moodler 43b48b89f6 Extra text in 'guestnosubmit' 2006-01-23 02:41:01 +00:00
moodler 15921df130 Extra fix for bug #4604. Guests see different message, instead of "You have not submitted anything" 2006-01-23 02:38:26 +00:00
mits 19ab119426 making expression more soften, changed translation of some words from Kanji character to Japanese syllabary characters.
checked frequency of usage in Google.
meaning is same.
2006-01-23 02:03:47 +00:00
stronk7 5e0b242bfc Avoid one wrong primarykey parameter that, after latest
changes to insert_record() was breaking the wiki module
completely!
2006-01-22 23:54:09 +00:00
stronk7 e734dbb66b There! :-P :-D
(just looking for one BIG problem in wiki - pagename is lost, so page
is never detected, so the edit page is showed once and again and again,
and again.......)
2006-01-22 20:27:11 +00:00
mits a1017a70c4 making expression more soften, changed translation of "whether or not" from Kanji character to Japanese syllabary characters.
meaning is same.
2006-01-22 05:15:20 +00:00
gbateson db5170674c removed some extraneous white space 2006-01-22 04:40:27 +00:00
gbateson fb1b789fd6 standardized line endings, so that README.TXT is readable on Windows machines 2006-01-22 04:39:37 +00:00
mits c681a96f9e polished. 2006-01-22 04:17:55 +00:00
mits 0941f850b8 making expression more soften, changed some translation of "and" from Kanji character to Japanese syllabary characters.
meaning is same.
2006-01-22 03:43:23 +00:00
mits 4e88dab6f4 making expression more soften, changed translation of "whether or not" from Kanji character to Japanese syllabary characters.
meaning is same.
2006-01-22 03:26:13 +00:00
mits 6d41efb830 translated latest install-related strings. 2006-01-21 21:04:46 +00:00
stronk7 b3f06605c3 Latest install-related strings added. 2006-01-21 18:14:29 +00:00
stronk7 3b3b80293c Now the installation process perform then environment check. 2006-01-21 17:30:01 +00:00
koenr 0e101fea8e few new strings 2006-01-21 15:10:23 +00:00
koenr bad5bd243f trying to make things more understandable 2006-01-21 15:09:49 +00:00
gbateson 2266fc893e fix typo: "get_user_preference" => "set_user_preference" 2006-01-21 06:48:23 +00:00
gbateson b74d340762 only display "Excel" option, if an Excel library is available 2006-01-21 06:46:48 +00:00
mits ca61cb465c polished. 2006-01-21 00:23:06 +00:00
stronk7 d83f837385 Changed harcoded 'admin' to $CFG->admin
Merged from MOODLE_15_STABLE
2006-01-21 00:19:02 +00:00
mits 60e8150a83 polished. 2006-01-21 00:16:21 +00:00
mits 04e5e9678e changed export file name to standard one. 2006-01-20 23:17:54 +00:00
mits 9816635451 translated new strings for install and Autorized.net.
making expression more soften, changed translation of "already" from Kanji character to Japanese syllabary characters.
meaning is same.
2006-01-20 23:09:59 +00:00
stronk7 878d309c2b Now results of check_moodle_environment() are
cached, saving us of some work when the script
is called more than once per request (install)

Merged from MOODLE_15_STABLE
2006-01-20 18:52:48 +00:00
stronk7 182dca14e5 Added one new style for better formatting. 2006-01-20 16:18:52 +00:00
stronk7 6f0879b6bf Minor change... 2006-01-20 16:17:51 +00:00
stronk7 e6f930f340 Split some strings for better formatting. 2006-01-20 16:11:32 +00:00
stronk7 2317aa003a Split some strings for better formatting. Old ones are maintained
for 1.5 compatibility.
2006-01-20 16:09:29 +00:00
ethem 752d465f4d Manage orders with status filter. All/Authorized/Captured/Refunded/Cancelled/Expired. 2006-01-20 16:04:52 +00:00
stronk7 b3bcee2457 First field must be unique in every select. Bug 4619.
(http://moodle.org/bugs/bug.php?op=show&bugid=4619)

Merged from MOODLE_15_STABLE
2006-01-20 15:09:54 +00:00
ethem 347923bf24 New strings from Ethem Evlice (ethem AT evlice DOT com) <XHTML /> compliant. 2006-01-20 12:08:01 +00:00
carlesbellver 1a2524ca4d Ajudes 2006-01-20 11:35:43 +00:00
gbateson 05b88e80df addslashes to "name" and "summary" when they are set from the HP quiz file;
increment version to v2.1.10
2006-01-20 11:27:52 +00:00
stronk7 09f972719b Solved small bug introduced in lat revision. My fault. :-( 2006-01-20 10:43:44 +00:00
moodler 698184d779 more bug fixing 2006-01-20 06:21:42 +00:00
mjollnir_ e31e89c3ac fixing a strange bug in stats graph display 2006-01-20 04:19:08 +00:00
moodler ede17ee59f fixing bugs 2006-01-20 04:06:49 +00:00
moodler 0046e5a0d9 adding code to migrate serialized html blocks 2006-01-20 03:43:38 +00:00
moodler 5739b8ad34 bug fixes 2006-01-20 02:50:06 +00:00
moodler 35bcb325f6 Added textarea field type.
Committed by Vy-Shane <vyshane@moodle.com>
2006-01-20 02:38:11 +00:00
toyomoyo 9a1a27b8fa removing \ 2006-01-20 02:26:37 +00:00
moodler 8e71ea9540 fixing conflicts 2006-01-20 01:53:50 +00:00
mits 6d8ccbf6c9 translated new strings for install, book and Autorized.net. 2006-01-20 01:41:28 +00:00
moodler 75785350dc fixing the conflicts, sorry >_< 2006-01-20 01:37:34 +00:00
moodler d22f58a2d7 bug fix for 4615 2006-01-20 01:19:33 +00:00
gbateson 79050beed7 micro-increment version number to v2.1.9 2006-01-20 01:05:13 +00:00
gbateson 9ddda2cef3 allow duplicate segments on JMatch 2006-01-20 00:59:50 +00:00
mjollnir_ 41547057cc Merged Patrick's mailnow patch. This allows admin users the ability to override maxediting time and have forum posts mailed out immediately. 2006-01-19 23:52:08 +00:00
patrickslee 3c622ced98 Removed some mailnow related patches -- mailnow feature is not merged yet 2006-01-19 22:45:59 +00:00
stronk7 a716b6495f Added some strings (related to external installers), so translators
can work with them. Needed to implement the script to create
install/lang/xx/install.php files automatically from official lang files.
2006-01-19 18:24:50 +00:00
stronk7 3470b39f5c Modifying the installation script. Step 1: Replace all
the harcoded stages to some nicer defines.
2006-01-19 17:41:56 +00:00
stronk7 00d3a0fd95 Notices out! 2006-01-19 16:21:50 +00:00
skodak 8d8f70e5a6 remove upload form for guests 2006-01-19 15:24:25 +00:00
ethem c1a91db06e AVS and Reason messages. 2006-01-19 14:57:23 +00:00
ethem 9d025f4a3d AVS & Reason messages. 2006-01-19 13:42:40 +00:00
16168 changed files with 383430 additions and 732216 deletions
-12256
View File
File diff suppressed because it is too large Load Diff
+36 -35
View File
@@ -1,35 +1,36 @@
README $Id$
------
QUICK INSTALL
=============
For the impatient, here is a basic outline of the
installation process, which normally takes me only
a few minutes:
1) Move the Moodle files into your web directory.
2) Create a single database for Moodle to store all
it's tables in (or choose an existing database).
3) Visit your Moodle site with a browser, you should
be taken to the install.php script, which will lead
you through creating a config.php file and then
setting up Moodle, creating an admin account etc.
4) Set up a cron task to call the file admin/cron.php
every five minutes or so.
For more information, see the INSTALL DOCUMENTATION:
http://moodle.org/doc
If you have real trouble, please visit the Moodle course
"Using Moodle" on moodle.org.
Good luck and have fun!
Martin Dougiamas, Lead Developer
README $Id$
------
QUICK INSTALL
=============
For the impatient, here is a basic outline of the
installation process, which normally takes me only
a few minutes:
1) Move the Moodle files into your web directory.
2) Create a single database for Moodle to store all
it's tables in (or choose an existing database).
3) Visit your Moodle site with a browser, you should
be taken to the install.php script, which will lead
you through creating a config.php file and then
setting up Moodle, creating an admin account etc.
4) Set up a cron task to call the file admin/cron.php
every five minutes or so.
For more information, see the INSTALL DOCUMENTATION:
http://docs.moodle.org/en/Installing_Moodle
A local copy can also be found in
lang/en_utf8/help/install.html (or your language)
Good luck and have fun!
Martin Dougiamas, Lead Developer
-97
View File
@@ -1,97 +0,0 @@
<form name="adminform" id="adminform" method="post" action="admin.php">
<input type="hidden" name="previoussearch" value="<?php echo $previoussearch ?>">
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>">
<table align="center" border="0" cellpadding="5" cellspacing="0">
<tr>
<td valign="top">
<?php
$a->count = count($admins);
$a->items = $strexistingadmins;
print_string('counteditems', '', $a);
?>
</td>
<td></td>
<td valign="top">
<?php
$a->count = $usercount;
$a->items = $strpotentialadmins;
print_string('counteditems', '', $a);
?>
</td>
</tr>
<tr>
<td valign="top">
<select name="removeselect[]" size="20" id="removeselect" multiple
onFocus="document.adminform.add.disabled=true;
document.adminform.remove.disabled=false;
document.adminform.addselect.selectedIndex=-1;">
<?php
if (count($admins) == 1) {
$disabled = 'disabled';
$removebuttontype = 'hidden';
} else {
$disabled = '';
$removebuttontype = 'submit';
}
foreach ($admins as $admin) {
$fullname = fullname($admin, true);
echo "<option value=\"$admin->id\" $disabled>".$fullname.", ".$admin->email."</option>\n";
}
?>
</select></td>
<td valign="top">
<br />
<input name="add" type="submit" id="add" value="&larr;" />
<br />
<input name="remove" type="<?php echo $removebuttontype ?>" id="remove" value="&rarr;" />
<br />
</td>
<td valign="top">
<select name="addselect[]" size="20" id="addselect" multiple
onFocus="document.adminform.add.disabled=false;
document.adminform.remove.disabled=true;
document.adminform.removeselect.selectedIndex=-1;">
<?php
if (!empty($searchusers)) {
echo "<optgroup label=\"$strsearchresults (" . count($searchusers) . ")\">\n";
foreach ($searchusers as $user) {
$fullname = fullname($user, true);
echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
}
echo "</optgroup>\n";
}
if (!empty($users)) {
foreach ($users as $user) {
$fullname = fullname($user, true);
echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
}
}
?>
</select>
<br />
<input type="text" name="searchtext" size="30" value="<?php echo $searchtext ?>"
onFocus ="document.adminform.add.disabled=true;
document.adminform.remove.disabled=true;
document.adminform.removeselect.selectedIndex=-1;
document.adminform.addselect.selectedIndex=-1;"
onkeydown = "var keyCode = event.which ? event.which : event.keyCode;
if (keyCode == 13) {
document.adminform.previoussearch.value=1;
document.adminform.submit();
} " />
<input name="search" id="search" type="submit" value="<?php p($strsearch) ?>" />
<?php
if (!empty($searchusers)) {
echo '<input name="showall" id="showall" type="submit" value="'.$strshowall.'" />'."\n";
}
?>
</td>
</tr>
</table>
</form>
-122
View File
@@ -1,122 +0,0 @@
<?PHP // $Id$
// Admin-only script to assign administrative rights to users
require_once("../config.php");
define("MAX_USERS_PER_PAGE", 50);
$add = optional_param('add', "", PARAM_ALPHA);
$remove = optional_param('remove', '', PARAM_ALPHA);
$search = optional_param('search', '', PARAM_ALPHA);
if (! $site = get_site()) {
redirect("$CFG->wwwroot/$CFG->admin/index.php");
}
require_login();
if (!isadmin()) {
error("You must be an administrator to use this page.");
}
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
}
$primaryadmin = get_admin();
/// If you want any administrator to have the ability to assign admin
/// rights, then comment out the following if statement
if ($primaryadmin->id != $USER->id) {
error("You must be the primary administrator to use this page.");
}
/// assign all of the configurable language strings
$stringstoload = array (
"assignadmins",
"administration",
"existingadmins",
"potentialadmins",
"search",
"users",
"searchresults",
"showall"
);
foreach ($stringstoload as $stringtoload){
$strstringtoload = "str" . $stringtoload;
$$strstringtoload = get_string($stringtoload);
}
print_header("$site->shortname: $strassignadmins",
"$site->fullname",
"<a href=\"index.php\">$stradministration</a> -> <a href=\"users.php\">$strusers</a> -> $strassignadmins", "adminform.searchtext");
if (!$frm = data_submitted()) {
print_simple_box("<center>".get_string("adminhelpassignadmins")."</center>", "center", "50%");
/// A form was submitted so process the input
} else {
if (!empty($frm->add) and !empty($frm->addselect)) {
foreach ($frm->addselect as $addadmin) {
if (! add_admin($addadmin)) {
error("Could not add admin with user id $addadmin!");
}
}
} else if (!empty($frm->remove) and !empty($frm->removeselect)) {
$admins = get_admins();
if (count($admins) > count($frm->removeselect)) {
foreach ($frm->removeselect as $removeadmin) {
if (! remove_admin($removeadmin)) {
error("Could not remove admin with user id $removeadmin!");
}
}
}
} else if (!empty($frm->showall)) {
unset($frm->searchtext);
$frm->previoussearch = 0;
}
}
/// Is there a current search?
$previoussearch = (!empty($frm->search) or ($frm->previoussearch == 1)) ;
/// Get all existing admins
$admins = get_admins();
$adminarray = array();
foreach ($admins as $admin) {
$adminarray[] = $admin->id;
}
$adminlist = implode(',', $adminarray);
unset($adminarray);
/// Get search results excluding any current admins
if (!empty($frm->searchtext) and $previoussearch) {
$searchusers = get_users(true, $frm->searchtext, true, $adminlist, 'firstname ASC, lastname ASC',
'', '', 0, 99999, 'id, firstname, lastname, email');
$usercount = get_users(false, '', true, $adminlist);
}
/// If no search results then get potential users excluding current admins
if (empty($searchusers)) {
if (!$users = get_users(true, '', true, $adminlist, 'firstname ASC, lastname ASC', '', '',
0, 99999, 'id, firstname, lastname, email') ) {
$users = array();
}
$usercount = count($users);
}
$searchtext = (isset($frm->searchtext)) ? $frm->searchtext : "";
$previoussearch = ($previoussearch) ? '1' : '0';
include('./admin.html');
print_footer();
?>
+34 -39
View File
@@ -1,49 +1,53 @@
<?PHP // $Id$
// config.php - allows admin to edit all configuration variables
include("../config.php");
require_once('../config.php');
$auth = optional_param( 'auth','',PARAM_CLEAN );
require_once($CFG->libdir.'/adminlib.php');
require_login();
$adminroot = admin_get_root();
admin_externalpage_setup('userauthentication', $adminroot);
if (!$site = get_site()) {
redirect("index.php");
}
$auth = optional_param('auth', '', PARAM_SAFEDIR);
if (!isadmin()) {
error("Only the admin can use this page");
}
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
}
$focus = '';
/// If data submitted, then process and store.
if ($config = data_submitted()) {
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
}
$config = (array)$config;
validate_form($config, $err);
// extract and sanitize the auth key explicitly
$modules = get_list_of_plugins("auth");
if (in_array($config['auth'], $modules)) {
$auth = $config['auth'];
$auth = $config['auth'];
} else {
notify("Error defining the authentication method");
}
// load the auth plugin library
require_once("{$CFG->dirroot}/auth/$auth/lib.php");
$err = array();
if (function_exists('auth_validate_form')) {
auth_validate_form($config, $err);
}
if (count($err) == 0) {
foreach ($config as $name => $value) {
if (preg_match('/^pluginconfig_(.+?)$/', $name, $matches)) {
$plugin = "auth/$auth";
$name = $matches[1];
if (! set_config($name, $value, $plugin)) {
if (! set_config($name, $value, $plugin)) {
notify("Problem saving config $name as $value for plugin $plugin");
}
} else { // normal handling for
} else { // normal handling for
if (! set_config($name, $value)) {
notify("Problem saving config $name as $value");
}
@@ -66,6 +70,7 @@
}
$modules = get_list_of_plugins("auth");
$options = array();
foreach ($modules as $module) {
$options[$module] = get_string("auth_$module"."title", "auth");
}
@@ -83,7 +88,7 @@
set_config('changepassword','');
}
$auth = clean_filename($auth);
$auth = clean_param($auth,PARAM_SAFEDIR);
require_once("$CFG->dirroot/auth/$auth/lib.php"); //just to make sure that current authentication functions are loaded
if (! isset($config->guestloginbutton)) {
$config->guestloginbutton = 1;
@@ -105,33 +110,29 @@
}
$user_fields = array("firstname", "lastname", "email", "phone1", "phone2", "department", "address", "city", "country", "description", "idnumber", "lang");
if (empty($focus)) {
$focus = "";
}
$guestoptions[0] = get_string("hide");
$guestoptions[1] = get_string("show");
$createoptions[0] = get_string("no");
$createoptions[1] = get_string("yes");
$stradministration = get_string("administration");
$strauthentication = get_string("authentication");
$strauthenticationoptions = get_string("authenticationoptions","auth");
$strsettings = get_string("settings");
$strusers = get_string("users");
print_header("$site->shortname: $strauthenticationoptions", "$site->fullname",
"<a href=\"index.php\">$stradministration</a> -> <a href=\"users.php\">$strusers</a> -> $strauthenticationoptions", "$focus");
admin_externalpage_print_header($adminroot);
echo "<center><b>";
echo "<form target=\"{$CFG->framename}\" name=\"authmenu\" method=\"post\" action=\"auth.php\">";
echo "<input type=\"hidden\" name=\"sesskey\" value=\"".$USER->sesskey."\" />";
print_string("chooseauthmethod","auth");
echo '&nbsp;&nbsp;';
choose_from_menu ($options, "auth", $auth, "","document.location='auth.php?sesskey=$USER->sesskey&auth='+document.authmenu.auth.options[document.authmenu.auth.selectedIndex].value", "");
echo "</b></center>";
echo "</b></center><br />";
print_simple_box_start("center", "100%");
print_heading($options[$auth]);
@@ -147,6 +148,8 @@
echo "<table border=\"0\" width=\"100%\" cellpadding=\"4\">";
require_once("$CFG->dirroot/auth/$auth/config.html");
$CFG->pagepath = 'auth/' . $auth;
echo '<tr><td colspan="3">';
print_heading(get_string('auth_common_settings', 'auth'));
echo '<td/></tr>';
@@ -228,24 +231,16 @@
print_simple_box_end();
print_footer();
admin_externalpage_print_footer($adminroot);
exit;
/// Functions /////////////////////////////////////////////////////////////////
function validate_form(&$form, &$err) {
// if (empty($form->fullname))
// $err["fullname"] = get_string("missingsitename");
return;
}
//
// Good enough for most auth plugins
// but some may want a custom one if they are offering
// other options
// Note: pluginconfig_ fields have special handling.
// Note: pluginconfig_ fields have special handling.
function print_auth_lock_options ($auth, $user_fields, $helptext, $retrieveopts, $updateopts) {
echo '<tr><td colspan="3">';
@@ -263,9 +258,9 @@ function print_auth_lock_options ($auth, $user_fields, $helptext, $retrieveopts,
'onlogin' => get_string('update_onlogin', 'auth'));
$updateextoptions = array('0' => get_string('update_never', 'auth'),
'1' => get_string('update_onupdate', 'auth'));
$pluginconfig = get_config("auth/$auth");
// helptext is on a field with rowspan
if (empty($helptext)) {
$helptext = '&nbsp;';
@@ -279,7 +274,7 @@ function print_auth_lock_options ($auth, $user_fields, $helptext, $retrieveopts,
}
if(empty($pluginconfig->{"field_updatelocal_$field"})) {
$pluginconfig->{"field_updatelocal_$field"} = '';
}
}
if (empty($pluginconfig->{"field_updateremote_$field"})) {
$pluginconfig->{"field_updateremote_$field"} = '';
}
-132
View File
@@ -1,132 +0,0 @@
<?PHP // $Id$
// backup.php - allows admin to edit all configuration variables for scheduled backups
require_once("../config.php");
require_once("../backup/lib.php");
require_once("../backup/backup_scheduled.php");
require_login();
if (!isadmin()) {
error("Only an admin can use this page");
}
if (!$site = get_site()) {
error("Site isn't defined!");
}
//Initialise error variables
$error = false;
$sche_destination_error = "";
/// If data submitted, then process and store.
if (($config = data_submitted()) && confirm_sesskey()) {
//First of all we check that everything is correct
//Check for trailing slash and backslash in backup_sche_destination
if (!empty($backup_sche_destination) and
(substr($backup_sche_destination,-1) == "/" or substr($backup_sche_destination,-1) == "\\")) {
$error = true;
$sche_destination_error = get_string("pathslasherror");
//Now check that backup_sche_destination dir exists
} else if (!empty($backup_sche_destination) and
!is_dir($backup_sche_destination)) {
$error = true;
$sche_destination_error = get_string("pathnotexists");
}
//We need to do some weekdays conversions prior to continue
$i = 0;
$temp = "";
$a_config = (array)$config;
while ($i<7) {
$tocheck = "dayofweek_".$i;
if (isset($a_config[$tocheck])) {
$temp .= "1";
} else {
$temp .= "0";
}
unset($a_config[$tocheck]);
$i++;
}
$a_config['backup_sche_weekdays'] = $temp;
$config = (object)$a_config;
//weekdays conversions done. Continue
foreach ($config as $name => $value) {
backup_set_config($name, $value);
}
//And now, we execute schedule_backup_next_execution() for each course in the server to have the next
//execution time updated automatically everytime it's changed.
$status = true;
//get admin
$admin = get_admin();
if (!$admin) {
$status = false;
}
//get backup config
if (! $backup_config = backup_get_config()) {
$status = false;
}
if ($status) {
//get courses
if ($courses = get_records('course', '', '', '', 'id,shortname')) {
//For each course, we check (insert, update) the backup_course table
//with needed data
foreach ($courses as $course) {
//We check if the course exists in backup_course
$backup_course = get_record("backup_courses","courseid",$course->id);
//If it doesn't exist, create
if (!$backup_course) {
$temp_backup_course->courseid = $course->id;
$newid = insert_record("backup_courses",$temp_backup_course);
//And get it from db
$backup_course = get_record("backup_courses","id",$newid);
}
//Now, calculate next execution of the course
$nextstarttime = schedule_backup_next_execution ($backup_course,$backup_config,time(),$admin->timezone);
//Save it to db
set_field("backup_courses","nextstarttime",$nextstarttime,"courseid",$backup_course->courseid);
}
}
}
if (!$error) {
redirect("$CFG->wwwroot/$CFG->admin/index.php", get_string("changessaved"), 1);
exit;
}
}
/// Otherwise print the form.
$stradmin = get_string("administration");
$strconfiguration = get_string("configuration");
$strbackup = get_string("backup");
print_header("$site->shortname: $strconfiguration: $strbackup", $site->fullname,
"<a href=\"index.php\">$stradmin</a> -> ".
"<a href=\"configure.php\">$strconfiguration</a> -> ".
$strbackup);
echo "<p align=\"right\"><a href=\"../backup/log.php\">".get_string("logs")."</a></p>";
print_heading($strbackup);
print_simple_box("<center>".get_string("adminhelpbackup")."</center>", "center", "50%");
echo "<br />";
print_simple_box_start("center");
//Check for required functions...
if (!function_exists('utf8_encode')) {
notify("You need to add XML support to your PHP installation");
}
include ("$CFG->dirroot/backup/config.html");
print_simple_box_end();
print_footer();
?>
+11 -17
View File
@@ -3,19 +3,13 @@
// block.php - allows admin to edit all local configuration variables for a block
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('manageblocks', $adminroot);
require_once($CFG->libdir.'/blocklib.php');
require_login();
$blockid = required_param('block', PARAM_INT);
if (!isadmin()) {
error('Only an admin can use this page');
}
if (!$site = get_site()) {
error("Site isn't defined!");
}
$blockid = required_param( 'block',PARAM_INT );
if(($blockrecord = blocks_get_record($blockid)) === false) {
error('This block does not exist');
}
@@ -53,15 +47,15 @@
/// Otherwise print the form.
$stradmin = get_string('administration');
$strconfiguration = get_string('configuration');
$strmanageblocks = get_string('manageblocks');
$strblockname = $block->get_title();
print_header($site->shortname.': '.$strblockname.": $strconfiguration", $site->fullname,
"<a href=\"index.php\">$stradmin</a> -> ".
"<a href=\"configure.php\">$strconfiguration</a> -> ".
"<a href=\"blocks.php\">$strmanageblocks</a> -> ".$strblockname);
// $CFG->pagepath is used to generate the body and id attributes for the body tag
// of the page. It is also used to generate the link to the Moodle Docs for this view.
$CFG->pagepath = 'block/' . $block->name() . '/config';
admin_externalpage_print_header($adminroot);
print_heading($strblockname);
@@ -76,6 +70,6 @@
echo '</p>';
$block->config_print();
echo '</form>';
print_footer();
admin_externalpage_print_footer($adminroot);
?>
+42 -34
View File
@@ -3,30 +3,23 @@
// Allows the admin to configure blocks (hide/show, delete and configure)
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/blocklib.php');
require_once($CFG->libdir.'/tablelib.php');
require_once($CFG->libdir.'/ddllib.php');
$confirm = optional_param('confirm', 0, PARAM_INT);
$adminroot = admin_get_root();
admin_externalpage_setup('manageblocks', $adminroot);
$confirm = optional_param('confirm', 0, PARAM_BOOL);
$hide = optional_param('hide', 0, PARAM_INT);
$show = optional_param('show', 0, PARAM_INT);
$delete = optional_param('delete', 0, PARAM_INT);
$multiple = optional_param('multiple', 0, PARAM_INT);
require_login();
if (!isadmin()) {
error("Only administrators can use this page!");
}
if (!$site = get_site()) {
error("Site isn't defined!");
}
/// Print headings
$stradministration = get_string('administration');
$strconfiguration = get_string('configuration');
$strmanageblocks = get_string('manageblocks');
$strdelete = get_string('delete');
$strversion = get_string('version');
@@ -37,9 +30,7 @@
$strname = get_string('name');
$strmultiple = get_string('blockmultiple', 'admin');
print_header("$site->shortname: $strmanageblocks", "$site->fullname",
"<a href=\"index.php\">$stradministration</a> -> ".
"<a href=\"configure.php\">$strconfiguration</a> -> $strmanageblocks");
admin_externalpage_print_header($adminroot);
print_heading($strmanageblocks);
@@ -85,34 +76,51 @@
notice_yesno(get_string('blockdeleteconfirm', '', $strblockname),
'blocks.php?delete='.$block->id.'&amp;confirm=1&amp;sesskey='.$USER->sesskey,
'blocks.php');
print_footer();
admin_externalpage_print_footer($adminroot);
exit;
} else {
// Inform block it's about to be deleted
$blockobject = block_instance($block->name);
if ($blockobject) {
$blockobject->before_delete(); //only if we can create instance, block might have been already removed
}
// First delete instances and then block
$instances = get_records('block_instance', 'blockid', $block->id);
if(!empty($instances)) {
foreach($instances as $instance) {
blocks_delete_instance($instance);
blocks_delete_instance($instance, true);
}
}
// Delete block
if (!delete_records('block', 'id', $block->id)) {
notify("Error occurred while deleting the $strblockname record from blocks table");
}
$instances = get_records('block_instance', 'blockid', $block->id);
if(!empty($instances)) {
foreach($instances as $instance) {
blocks_delete_instance($instance);
}
}
// Then the tables themselves
if ($tables = $db->Metatables()) {
$prefix = $CFG->prefix.$block->name;
$prefix2 = $CFG->prefix.'block_'.$block->name;
foreach ($tables as $table) {
if (strpos($table, $prefix) === 0) {
if (!execute_sql("DROP TABLE $table", false)) {
if (strpos($table, $prefix) === 0 || strpos($table, $prefix2) === 0) {
/// If the match has been due to the 1st condition, debug to developers
if (strpos($table, $prefix) === 0) {
debugging('This block has some wrongly named tables. See Moodle Docs coding guidelines (and MDL-6786)', DEBUG_DEVELOPER);
}
/// Strip prefix from $table
$table = preg_replace("/^{$CFG->prefix}/", '', $table);
$xmldb_table = new XMLDBTable($table);
if (!drop_table($xmldb_table, true, false)) {
notify("ERROR: while trying to drop table $table");
}
}
}
}
// Delete the capabilities that were defined by this block
capabilities_cleanup('block/'.$block->name);
$a->block = $strblockname;
$a->directory = $CFG->dirroot.'/blocks/'.$block->name;
@@ -132,7 +140,7 @@
foreach ($blocks as $block) {
if(!block_is_compatible($block->name)) {
notify('Block '. $block->name .' is not compatible with the current version of Mooodle and needs to be updated by a programmer.');
notify('Block '. $block->name .' is not compatible with the current version of Moodle and needs to be updated by a programmer.');
$incompatible[] = $block;
continue;
}
@@ -156,7 +164,7 @@
$table->define_columns(array('name', 'instances', 'version', 'hideshow', 'multiple', 'delete', 'settings'));
$table->define_headers(array($strname, $strcourses, $strversion, $strhide.'/'.$strshow, $strmultiple, $strdelete, $strsettings));
$table->define_baseurl($CFG->wwwroot.'/admin/blocks.php');
$table->define_baseurl($CFG->wwwroot.'/'.$CFG->admin.'/blocks.php');
$table->set_attribute('cellspacing', '0');
$table->set_attribute('id', 'blocks');
@@ -215,15 +223,15 @@
print_heading(get_string('incompatibleblocks', 'admin'));
$table = new flexible_table('admin-blocks-incompatible');
$table->define_columns(array('block', 'delete'));
$table->define_headers(array($strname, $strdelete));
$table->define_baseurl($CFG->wwwroot.'/admin/blocks.php');
$table->define_baseurl($CFG->wwwroot.'/'.$CFG->admin.'/blocks.php');
$table->set_attribute('cellspacing', '0');
$table->set_attribute('id', 'incompatible');
$table->set_attribute('class', 'generaltable generalbox');
$table->setup();
foreach ($incompatible as $block) {
@@ -235,6 +243,6 @@
$table->print_html();
}
print_footer();
admin_externalpage_print_footer($adminroot);
?>
-68
View File
@@ -1,68 +0,0 @@
<form method="post" action="calendar.php">
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<table class="formtable">
<tr>
<th>adminseesall:</th>
<td>
<div><?php print_string('helpadminseesall', 'admin'); ?></div>
<p>
<select name="adminseesallcourses">
<option value="0" <?php if(empty($CFG->calendar_adminseesall)) echo "selected='selected'"; ?>><?php print_string('adminseesownevents', 'admin'); ?></option>
<option value="1" <?php if(!empty($CFG->calendar_adminseesall)) echo "selected='selected'"; ?>><?php print_string('adminseesallevents', 'admin'); ?></option>
</select>
</p>
</td>
</tr>
<tr>
<th>startwday:</th>
<td>
<div><?php print_string('helpstartofweek', 'admin'); ?></div>
<p><?php choose_from_menu($weekdays, 'startwday', empty($CFG->calendar_startwday) ? 0 : $CFG->calendar_startwday, ''); ?></p>
</td>
</tr>
<tr>
<th>weekenddays:</th>
<td>
<div><?php print_string('helpweekenddays', 'admin'); ?></div>
<p>
<span style="white-space: nowrap;"><input type="checkbox" name="weekend[]" value="1" id="weekend1" <?php if(CALENDAR_WEEKEND & 2) echo 'checked="checked"'; ?> /> <label for="weekend1"><?php print_string('monday', 'calendar'); ?></label></span>
<span style="white-space: nowrap;"><input type="checkbox" name="weekend[]" value="2" id="weekend2" <?php if(CALENDAR_WEEKEND & 4) echo 'checked="checked"'; ?> /> <label for="weekend2"><?php print_string('tuesday', 'calendar'); ?></label></span>
<span style="white-space: nowrap;"><input type="checkbox" name="weekend[]" value="3" id="weekend3" <?php if(CALENDAR_WEEKEND & 8) echo 'checked="checked"'; ?> /> <label for="weekend3"><?php print_string('wednesday', 'calendar'); ?></label></span>
<span style="white-space: nowrap;"><input type="checkbox" name="weekend[]" value="4" id="weekend4" <?php if(CALENDAR_WEEKEND & 16) echo 'checked="checked"'; ?> /> <label for="weekend4"><?php print_string('thursday', 'calendar'); ?></label></span>
<span style="white-space: nowrap;"><input type="checkbox" name="weekend[]" value="5" id="weekend5" <?php if(CALENDAR_WEEKEND & 32) echo 'checked="checked"'; ?> /> <label for="weekend5"><?php print_string('friday', 'calendar'); ?></label></span>
<br />
<span style="white-space: nowrap;"><input type="checkbox" name="weekend[]" value="6" id="weekend6" <?php if(CALENDAR_WEEKEND & 64) echo 'checked="checked"'; ?> /> <label for="weekend6"><?php print_string('saturday', 'calendar'); ?></label></span>
<span style="white-space: nowrap;"><input type="checkbox" name="weekend[]" value="0" id="weekend0" <?php if(CALENDAR_WEEKEND & 1) echo 'checked="checked"'; ?> /> <label for="weekend0"><?php print_string('sunday', 'calendar'); ?></label></span>
</p>
</td>
</tr>
<tr>
<th>upcoming_lookahead:</th>
<td>
<div><?php print_string('helpupcominglookahead', 'admin'); ?></div>
<p><input type="text" name="lookahead" size="3" value="<?php echo CALENDAR_UPCOMING_DAYS; ?>" /></p>
</td>
</tr>
<tr>
<th>upcoming_maxevents:</th>
<td>
<div><?php print_string('helpupcomingmaxevents', 'admin'); ?></div>
<p><input type="text" name="maxevents" size="3" value="<?php echo CALENDAR_UPCOMING_MAXEVENTS; ?>" /></p>
</td>
</tr>
<tr>
<th>timezones:</th>
<td>
<div><?php print_string('helpforcetimezone', 'admin'); ?></div>
<p><?php choose_from_menu($timezones, 'forcetimezone', $CFG->forcetimezone, get_string('timezonenotforced', 'admin'), '', '99'); ?></p>
<p><a href="timezoneimport.php"><?php print_string('importtimezones', 'admin'); ?>...</a></p>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" value="<?php print_string('savechanges'); ?>" />
</td>
</tr>
</table>
</form>
-99
View File
@@ -1,99 +0,0 @@
<?PHP // $Id$
// Allows the admin to configure calendar and date/time stuff
require_once('../config.php');
require_login();
if (!isadmin()) {
error('Only administrators can use this page!');
}
if (!$site = get_site()) {
error('Site isn\'t defined!');
}
/// Print headings
$stradministration = get_string('administration');
$strconfiguration = get_string('configuration');
$strcalendarsettings = get_string('calendarsettings', 'admin');
print_header("$site->shortname: $strcalendarsettings", "$site->fullname",
"<a href=\"index.php\">$stradministration</a> -> ".
"<a href=\"configure.php\">$strconfiguration</a> -> $strcalendarsettings");
print_heading($strcalendarsettings);
/// If data submitted, process and store
if (($form = data_submitted()) && confirm_sesskey()) {
if(isset($form->adminseesallcourses)) {
set_config('calendar_adminseesall', intval($form->adminseesallcourses) != 0);
unset($SESSION->cal_courses_shown);
}
if(isset($form->forcetimezone)) {
// To protect from SQL injections ...
$form->forcetimezone = str_replace(';', '', $form->forcetimezone);
$form->forcetimezone = str_replace('\'', '', $form->forcetimezone);
set_config('forcetimezone', $form->forcetimezone);
}
if(isset($form->startwday)) {
$startwday = intval($form->startwday);
if($startwday >= 0 && $startwday <= 6) {
set_config('calendar_startwday', $startwday);
}
}
if(isset($form->weekend)) {
if(is_array($form->weekend)) {
// Creating a packed bitfield; look at /calendar/lib.php if you can't figure it out
$bitfield = 0;
foreach($form->weekend as $day) {
$bitfield |= (1 << (intval($day) % 7));
}
if($bitfield > 0) {
set_config('calendar_weekend', $bitfield);
}
}
}
if(isset($form->lookahead)) {
$lookahead = intval($form->lookahead);
if($lookahead > 0) {
set_config('calendar_lookahead', $lookahead);
}
}
if(isset($form->maxevents)) {
$maxevents = intval($form->maxevents);
if($maxevents > 0) {
set_config('calendar_maxevents', $maxevents);
}
}
redirect('index.php');
}
// Include the calendar library AFTER modifying the data, so we read the latest values
require_once($CFG->dirroot.'/calendar/lib.php');
// Populate some variables we 're going to need in calendar.html
$timezones = get_list_of_timezones();
$weekdays = array(
0 => get_string('sunday', 'calendar'),
1 => get_string('monday', 'calendar'),
2 => get_string('tuesday', 'calendar'),
3 => get_string('wednesday', 'calendar'),
4 => get_string('thursday', 'calendar'),
5 => get_string('friday', 'calendar'),
6 => get_string('saturday', 'calendar')
);
// Main display starts here
print_simple_box_start("center", "80%");
include('./calendar.html');
print_simple_box_end();
print_footer();
?>
-190
View File
@@ -1,190 +0,0 @@
<?php // $Id$
// config.php - allows admin to edit all configuration variables
require_once('../config.php');
if ($site = get_site()) { // If false then this is a new installation
require_login();
if (!isadmin()) {
error('Only the admin can use this page');
}
}
/// 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-Z]", "", $value);
}
if ($name == "defaultallowedmodules") {
$value = implode(',',$value);
}
if ($name == 'hiddenuserfields') {
if (in_array('none', $value)) {
$value = '';
} else {
$value = implode(',',$value);
}
}
unset($conf);
$conf->name = $name;
$conf->value = $value;
if ($current = get_record('config', 'name', $name)) {
$conf->id = $current->id;
if (! update_record('config', $conf)) {
notify("Could not update $name to $value");
}
} else {
if (! insert_record('config', $conf)) {
notify("Error: could not add new variable $name !");
}
}
}
redirect('index.php', get_string('changessaved'), 1);
exit;
} else {
foreach ($err as $key => $value) {
$focus = "form.$key";
}
}
}
/// Otherwise fill and print the form.
if (empty($config)) {
$config = $CFG;
if (!$config->locale = get_field('config', 'value', 'name', 'locale')) {
$config->locale = $CFG->lang;
}
}
if (empty($focus)) {
$focus = '';
}
$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
include('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";
print_simple_box_start('center');
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>';
print_simple_box_end();
/// 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;
}
?>
-56
View File
@@ -1,56 +0,0 @@
<?php // $Id$
require_once('../config.php');
require_login();
if (!isadmin()) {
error('Only admins can access this page');
}
if (!$site = get_site()) {
redirect('index.php');
}
$stradministration = get_string('administration');
$strconfiguration = get_string('configuration');
print_header("$site->shortname: $stradministration: $strconfiguration", "$site->fullname",
'<a href="index.php">'. "$stradministration</a> -> $strconfiguration");
print_heading($strconfiguration);
$table->align = array ('right', 'left');
$table->data[] = array("<strong><a href=\"config.php\">". get_string('configvariables', 'admin') .'</a></strong>',
get_string('adminhelpconfigvariables'));
$table->data[] = array("<strong><a href=\"site.php\">". get_string('sitesettings') .'</a></strong>',
get_string('adminhelpsitesettings'));
$table->data[] = array("<strong><a href=\"../theme/index.php\">". get_string('themes') .'</a></strong>',
get_string('adminhelpthemes'));
$table->data[] = array("<strong><a href=\"lang.php\">". get_string('language') .'</a></strong>',
get_string('adminhelplanguage'));
$table->data[] = array("<strong><a href=\"modules.php\">".get_string('managemodules'). ' </a></strong>',
get_string('adminhelpmanagemodules'));
$table->data[] = array("<strong><a href=\"blocks.php\">". get_string('manageblocks') .'</a></strong>',
get_string('adminhelpmanageblocks'));
$table->data[] = array("<strong><a href=\"filters.php\">". get_string('managefilters') .'</a></strong>',
get_string('adminhelpmanagefilters'));
if (!isset($CFG->disablescheduledbackups)) {
$table->data[] = array("<strong><a href=\"backup.php\">".get_string("backup")."</a></strong>",
get_string('adminhelpbackup'));
}
$table->data[]= array("<strong><a href=\"editor.php\">". get_string('editorsettings') ."</a></strong>",
get_string('adminhelpeditorsettings'));
$table->data[]= array("<strong><a href=\"calendar.php\">". get_string('calendarsettings', 'admin') ."</a></strong>",
get_string('helpcalendarsettings', 'admin'));
$table->data[]= array("<strong><a href=\"maintenance.php\">". get_string('sitemaintenancemode', 'admin') ."</a></strong>",
get_string('helpsitemaintenance', 'admin'));
print_table($table);
print_footer($site);
?>
-631
View File
@@ -1,631 +0,0 @@
<?php // $Id$
// Shane Elliott
/// 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[7] = $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));
////////////////////////////////////////////////////////////////////
/// 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" />' );
/// 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=/pic.jpg";
$options[1] = "file.php/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) );
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['defaultallowedmoules'] = 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="10" value="'.s($config->locale).'" alt="locale" />' );
/// 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" />' );
/// 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
$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;
$configvars['stats'] = $stats;
?>
-91
View File
@@ -1,91 +0,0 @@
<form name="creatorsform" id="creatorsform" method="post" action="creators.php">
<input type="hidden" name="previoussearch" value="<?php echo $previoussearch ?>">
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>">
<table align="center" border="0" cellpadding="5" cellspacing="0">
<tr>
<td valign="top">
<?php
$a->count = count($creators);
$a->items = $strexistingcreators;
print_string('counteditems', '', $a);
?>
</td>
<td></td>
<td valign="top">
<?php
$a->count = $usercount;
$a->items = $strpotentialcreators;
print_string('counteditems', '', $a);
?>
</td>
</tr>
<tr>
<td valign="top">
<select name="removeselect[]" size="20" id="removeselect" multiple
onFocus="document.creatorsform.add.disabled=true;
document.creatorsform.remove.disabled=false;
document.creatorsform.addselect.selectedIndex=-1;">
<?php
foreach ($creators as $creator) {
$fullname = fullname($creator, true);
echo "<option value=\"$creator->id\">".$fullname.", ".$creator->email."</option>\n";
}
?>
</select></td>
<td valign="top">
<br />
<input name="add" type="submit" id="add" value="&larr;" />
<br />
<input name="remove" type="submit" id="remove" value="&rarr;" />
<br />
</td>
<td valign="top">
<select name="addselect[]" size="20" id="addselect" multiple
onFocus="document.creatorsform.add.disabled=false;
document.creatorsform.remove.disabled=true;
document.creatorsform.removeselect.selectedIndex=-1;">
<?php
if (!empty($searchusers)) {
echo "<optgroup label=\"$strsearchresults (" . count($searchusers) . ")\">\n";
foreach ($searchusers as $user) {
$fullname = fullname($user, true);
echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
}
echo "</optgroup>\n";
}
if (!empty($users)) {
foreach ($users as $user) {
$fullname = fullname($user, true);
echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
}
}
?>
</select>
<br />
<script type="text/javascript">
function
</script>
<input type="text" name="searchtext" size="30" value="<?php echo $searchtext ?>"
onFocus ="document.creatorsform.add.disabled=true;
document.creatorsform.remove.disabled=true;
document.creatorsform.removeselect.selectedIndex=-1;
document.creatorsform.addselect.selectedIndex=-1;"
onkeydown = "var keyCode = event.which ? event.which : event.keyCode;
if (keyCode == 13) {
document.creatorsform.previoussearch.value=1;
document.creatorsform.submit();
} " />
<input name="search" id="search" type="submit" value="<?php p($strsearch) ?>"/>
<?php
if (!empty($searchusers)) {
echo '<input name="showall" id="showall" type="submit" value="'.$strshowall.'" />'."\n";
}
?>
</td>
</tr>
</table>
</form>
-116
View File
@@ -1,116 +0,0 @@
<?PHP // $Id$
// Admin only script to assign course creator rights to users
require_once("../config.php");
define("MAX_USERS_PER_PAGE", 50);
$search = optional_param('search', '', PARAM_CLEAN);
$add = optional_param('add', '', PARAM_CLEAN);
$remove = optional_param('remove', '', PARAM_CLEAN );
if (! $site = get_site()) {
redirect("$CFG->wwwroot/$CFG->admin/index.php");
}
require_login();
if (!isadmin()) {
error("You must be an administrator to use this page.");
}
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
}
$primaryadmin = get_admin();
/// assign all of the configurable language strings
$stringstoload = array (
"assigncreators",
"administration",
"existingcreators",
"potentialcreators",
"search",
"users",
"searchresults",
"showall"
);
foreach ($stringstoload as $stringtoload){
$strstringtoload = "str" . $stringtoload;
$$strstringtoload = get_string($stringtoload);
}
print_header("$site->shortname: $strassigncreators",
"$site->fullname",
"<a href=\"index.php\">$stradministration</a> -> <a href=\"users.php\">$strusers</a> ->
$strassigncreators", "creatorsform.searchtext");
if (!$frm = data_submitted()) {
print_simple_box("<center>".get_string("adminhelpassigncreators")."</center>", "center", "50%");
/// A form was submitted so process the input
} else {
if (!empty($frm->add) and !empty($frm->addselect)) {
foreach ($frm->addselect as $addcreator) {
if (! add_creator($addcreator)) {
error("Could not add course creator with user id $addcreator!");
}
}
} else if (!empty($frm->remove) and !empty($frm->removeselect)) {
foreach ($frm->removeselect as $removecreator) {
if (! remove_creator($removecreator)) {
error("Could not remove course creator with user id $removecreator!");
}
}
} else if (!empty($frm->showall)) {
unset($frm->searchtext);
$frm->previoussearch = 0;
}
}
/// Is there a current search?
$previoussearch = (!empty($frm->search) or ($frm->previoussearch == 1)) ;
/// Get all existing creators
if (! $creators = get_creators()) {
$creators = array();
}
$creatorsarray = array();
foreach ($creators as $creator) {
$creatorsarray[] = $creator->id;
}
$creatorlist = implode(',', $creatorsarray);
unset($creatorarray);
/// Get search results excluding any current admins
if (!empty($frm->searchtext) and $previoussearch) {
$searchusers = get_users(true, $frm->searchtext, true, $creatorlist, 'firstname ASC, lastname ASC',
'', '', 0, 99999, 'id, firstname, lastname, email');
$usercount = get_users(false, '', true, $creatorlist);
}
/// If no search results then get potential users excluding current creators
if (empty($searchusers)) {
if (!$users = get_users(true, '', true, $creatorlist, 'firstname ASC, lastname ASC', '', '',
0, 99999, 'id, firstname, lastname, email') ) {
$users = array();
}
$usercount = count($users);
}
$searchtext = (isset($frm->searchtext)) ? $frm->searchtext : "";
$previoussearch = ($previoussearch) ? '1' : '0';
include('./creators.html');
print_footer();
?>
+115 -31
View File
@@ -26,10 +26,10 @@
chdir(dirname($_SERVER['argv'][0]));
}
require_once("../config.php");
require_once($CFG->dirroot.'/lib/adminlib.php');
require_once(dirname(__FILE__) . '/../config.php');
require_once($CFG->libdir.'/adminlib.php');
if (!$alreadyadmin = isadmin()) {
if (!$alreadyadmin = has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
unset($_SESSION['USER']);
unset($USER);
unset($_SESSION['SESSION']);
@@ -42,11 +42,33 @@
//unset test cookie, user must login again anyway
setcookie('MoodleSessionTest'.$CFG->sessioncookie, '', time() - 3600, '/');
/// switch to site language and locale
if (!empty($CFG->courselang)) {
unset ($CFG->courselang);
}
if (!empty($SESSION->lang)) {
unset ($SESSION->lang);
}
$USER->lang = '';
moodle_setlocale();
/// send mime type and encoding
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
$timenow = time();
mtrace("<pre>");
mtrace("Server Time: ".date('r',$timenow)."\n\n");
/// Run all cron jobs for each module
@@ -65,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.");
}
}
@@ -72,11 +96,52 @@
}
mtrace("Finished activity modules");
mtrace("Starting blocks");
if ($blocks = get_records_select("block", "cron > 0 AND (($timenow - lastcron) > cron)")) {
// we will need the base class.
require_once($CFG->dirroot.'/blocks/moodleblock.class.php');
foreach ($blocks as $block) {
$blockfile = $CFG->dirroot.'/blocks/'.$block->name.'/block_'.$block->name.'.php';
if (file_exists($blockfile)) {
require_once($blockfile);
$classname = 'block_'.$block->name;
$blockobj = new $classname;
if (method_exists($blockobj,'cron')) {
mtrace("Processing cron function for ".$block->name.'....','');
if ($blockobj->cron()) {
if (!set_field('block','lastcron',$timenow,'id',$block->id)) {
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');
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
@@ -92,10 +157,12 @@
if ($CFG->longtimenosee) { // value in days
$longtime = $timenow - ($CFG->longtimenosee * 3600 * 24);
if ($students = get_users_longtimenosee($longtime)) {
foreach ($students as $student) {
if (unenrol_student($student->userid, $student->course)) {
mtrace("Deleted student enrolment for user $student->userid from course $student->course");
if ($assigns = get_users_longtimenosee($longtime)) {
foreach ($assigns as $assign) {
if ($context = get_context_instance(CONTEXT_COURSE, $assign->courseid)) {
if (role_unassign(0, $assign->id, 0, $context->id)) {
mtrace("Deleted student enrolment for user $assign->id from course $assign->courseid");
}
}
}
}
@@ -104,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)");
}
}
}
}
@@ -118,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)");
}
}
}
}
@@ -141,8 +212,8 @@
/// Delete old cached texts
if (!empty($CFG->cachetext)) { // Defined in config.php
$cachelifetime = time() - $CFG->cachetext;
delete_records_select("cache_text", "timemodified < '$cachelifetime'");
$cachelifetime = time() - $CFG->cachetext - 60; // Add an extra minute to allow for really heavy sites
delete_records_select('cache_text', "timemodified < '$cachelifetime'");
}
flush();
@@ -181,11 +252,11 @@
} // End of occasional clean-up tasks
if (!isset($CFG->disablescheduledbackups)) { // Defined in config.php
if (empty($CFG->disablescheduledbackups)) { // Defined in config.php
//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
@@ -203,7 +274,7 @@
mtrace("Running backups if required...");
if (! schedule_backup_cron()) {
mtrace("ERORR: Something went wrong while performing backup tasks!!!");
mtrace("ERROR: Something went wrong while performing backup tasks!!!");
} else {
mtrace("Backup tasks finished.");
}
@@ -222,17 +293,25 @@
}
/// Run the enrolment cron, if any
require_once("$CFG->dirroot/enrol/$CFG->enrol/enrol.php");
$enrol = new enrolment_plugin();
$enrol->cron();
if (!empty($enrol->log)) {
mtrace($enrol->log);
if (!($plugins = explode(',', $CFG->enrol_plugins_enabled))) {
$plugins = array($CFG->enrol);
}
require_once($CFG->dirroot .'/enrol/enrol.class.php');
foreach ($plugins as $p) {
$enrol = enrolment_factory::factory($p);
if (method_exists($enrol, 'cron')) {
$enrol->cron();
}
if (!empty($enrol->log)) {
mtrace($enrol->log);
}
unset($enrol);
}
if (!empty($CFG->enablestats)) {
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)
@@ -240,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;
@@ -283,4 +362,9 @@
$difftime = microtime_diff($starttime, microtime());
mtrace("Execution took ".$difftime." seconds");
/// finishe the IE hack
if (check_browser_version('MSIE')) {
echo "</xmp>";
}
?>
+8 -7
View File
@@ -1,17 +1,18 @@
<?PHP // $Id$
// dbperformance.php - shows latest ADOdb stats for the current server
require_once("../config.php");
require_once('../config.php');
$topframe = optional_param( 'topframe', '', PARAM_ALPHA);
$bottomframe = optional_param( 'bottomframe', '', PARAM_ALPHA);
$do = optional_param( 'do','',PARAM_ALPHA);
// disable moodle specific debug messages that would be breaking the frames
disable_debugging();
$topframe = optional_param('topframe', 0, PARAM_BOOL);
$bottomframe = optional_param('bottomframe', 0, PARAM_BOOL);
$do = optional_param('do', '', PARAM_ALPHA);
require_login();
if (!isadmin()) {
error("Only the admin can use this page");
}
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
$strdatabaseperformance = get_string("databaseperformance");
$stradministration = get_string("administration");
+21 -10
View File
@@ -4,25 +4,35 @@
// BE VERY CAREFUL USING THIS!
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('purgemoodledata', $adminroot);
require_login();
$sure = optional_param('sure', '');
$reallysure = optional_param('reallysure', '');
$sure = optional_param('sure', 0, PARAM_BOOL);
$reallysure = optional_param('reallysure', 0, PARAM_BOOL);
if (!isadmin()) {
error('You must be admin to use this script!');
}
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
$deletedir = $CFG->dataroot; // The directory to delete!
admin_externalpage_print_header($adminroot);
print_heading('Purge moodledata');
if (empty($sure)) {
notice_yesno ('Are you completely sure you want to delete everything inside the directory '. $deletedir .' ?', 'delete.php?sure=yes&amp;sesskey='.sesskey(), 'index.php');
$optionsyes = array('sure'=>'yes', 'sesskey'=>sesskey());
notice_yesno ('Are you completely sure you want to delete everything inside the directory '. $deletedir .' ?',
'delete.php', 'index.php', $optionsyes, NULL, 'post', 'get');
admin_externalpage_print_footer($adminroot);
exit;
}
if (empty($reallysure)) {
notice_yesno ('Are you REALLY REALLY completely sure you want to delete everything inside the directory '. $deletedir .' (this includes all user images, and any other course files that have been created) ?', 'delete.php?sure=yes&amp;reallysure=yes&amp;sesskey='.sesskey(), 'index.php');
if (!data_submitted() or empty($reallysure)) {
$optionsyes = array('sure'=>'yes', 'sesskey'=>sesskey(), 'reallysure'=>'yes');
notice_yesno ('Are you REALLY REALLY completely sure you want to delete everything inside the directory '. $deletedir .' (this includes all user images, and any other course files that have been created) ?',
'delete.php', 'index.php', $optionsyes, NULL, 'post', 'get');
admin_externalpage_print_footer($adminroot);
exit;
}
@@ -36,6 +46,7 @@
echo '<h1 align="center">Done!</h1>';
print_continue($CFG->wwwroot);
admin_externalpage_print_footer($adminroot);
exit;
@@ -43,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') {
@@ -66,5 +77,5 @@ function delete_subdirectories($rootdir) {
}
closedir($dir);
}
?>
-265
View File
@@ -1,265 +0,0 @@
<form method="post" action="editor.php">
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<table border="0" cellpadding="4" cellspacing="2">
<tr>
<td align="right" valign="top">htmleditor:</td>
<td valign="top">
<?php
unset($options);
$options[0] = get_string("allownot");
$options[1] = get_string("allow");
choose_from_menu ($options, "htmleditor", $CFG->htmleditor, "", "", "");
?>
</td>
<td>
<?php print_string('confightmleditor', 'admin') ?>
</td>
</tr>
<tr>
<td align="right" valign="top">editorbackgroundcolor:</td>
<td valign="top"><input type="text" name="backgroundcolor" size="10" value="<?php print($CFG->editorbackgroundcolor);?>" /></td>
<td valign="top"><?php print_string("edhelpbgcolor");?></td>
</tr>
<tr>
<td align="right" valign="top">editorfontfamily:</td>
<td valign="top"><input type="text" name="fontfamily" size="30" value="<?php print($CFG->editorfontfamily);?>" /></td>
<td valign="top"><?php print_string("edhelpfontfamily");?></td>
</tr>
<tr>
<td align="right" valign="top">editorfontsize:</td>
<td valign="top"><input type="text" name="fontsize" size="10" value="<?php print($CFG->editorfontsize);?>" /></td>
<td valign="top"><?php print_string("edhelpfontsize");?></td>
</tr>
<tr>
<td align="right" valign="top">editorkillword:</td>
<td valign="top"><select name="killword">
<option value="1"<?php print(!$CFG->editorkillword)?"":" selected=\"selected\"";?>><?php print_string("yes");?></option>
<option value="0"<?php print(!$CFG->editorkillword)?" selected=\"selected\"":"";?>><?php print_string("no");?></option>
</select></td>
<td valign="top"><?php print_string("edhelpcleanword");?></td>
</tr>
<tr>
<td align="right" valign="top">aspellpath:</td>
<td valign="top"><input onchange="change_state()" id="aspellpath" type="text" name="aspellpath" size="25" value="<?php print($CFG->aspellpath);?>" /></td>
<td valign="top"><?php print_string("edhelpaspellpath");?></td>
</tr>
<tr>
<td align="right" valign="top">editorspelling:</td>
<td valign="top"><select onchange="change_state()" id="spelling" name="spelling"<?php
if (empty($CFG->aspellpath)) {
echo " disabled=\"disabled\"";
$CFG->editorspelling = false;
}
?>>
<option value="1"<?php print(!$CFG->editorspelling)?"":" selected=\"selected\"";?>><?php print_string("yes");?></option>
<option value="0"<?php print(!$CFG->editorspelling)?" selected=\"selected\"":"";?>><?php print_string("no");?></option>
</select>
<select id="dictionary" name="dictionary"<?php
if (empty($CFG->aspellpath)) {
echo " disabled=\"disabled\"";
$CFG->editordictionary = false;
}
?>>
<?php
if (is_array($dicts)) {
foreach ($dicts as $dict) {
echo "<option value=\"$dict\"";
if (!empty($CFG->editordictionary)) {
print ($CFG->editordictionary != $dict) ? "" : " selected=\"selected\"";
}
echo ">$dict</option>\n";
}
} else if (is_string($dicts)) {
echo '<option value="">'. $dicts .'</option>' . "\n";
}
?>
</select>
</td>
<td valign="top"><?php print_string("edhelpenablespelling");?></td>
</tr>
<tr><td colspan="3"><br /><?php print_string("edhelpfontlist");?></td></tr>
<?php
if(is_array($fontlist)) {
foreach($fontlist as $fontkey => $fontvalue) {
?>
<tr>
<td>&nbsp;</td>
<td colspan="2"><input type="text" name="fontname[]" size="15" value="<?php print($fontkey);?>">
<input type="text" name="fontnamevalue[]" size="30" value="<?php print($fontvalue);?>" /></td>
</tr>
<?php
}
}
?>
<tr>
<td>&nbsp;</td>
<td colspan="2"><input type="text" name="fontname[]" size="15" value="" />
<input type="text" name="fontnamevalue[]" size="30" value="" /></td>
</tr>
<tr>
<td valign="top" align="right">editorhidebuttons:</td>
<td colspan="2">
<?php
$buttons = array();
if (!empty($CFG->editorhidebuttons)) {
$buttons = explode(chr(32), $CFG->editorhidebuttons);
}
?>
<table border="0" cellpadding="2" cellspacing="1">
<tr>
<td colspan="12"><input type="checkbox" name="buttons[fontname]"<?php print(in_array("fontname", $buttons)) ? " checked=\"checked\"": "";?> /> <?php print_string("fontname","editor");?>
<input type="checkbox" name="buttons[fontsize]"<?php print(in_array("fontsize", $buttons)) ? " checked=\"checked\"": "";?> /> <?php print_string("fontsize","editor");?>
<input type="checkbox" name="buttons[formatblock]"<?php print(in_array("formatblock", $buttons)) ? " checked=\"checked\"": "";?> /> <?php print_string("formatblock","editor");?></td>
</tr>
<tr>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/images/ed_format_bold.gif" width="18" height="18" alt="<?php print_string("bold","editor");?>" title="<?php print_string("bold","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/images/ed_format_italic.gif" width="18" height="18" alt="<?php print_string("italic","editor");?>" title="<?php print_string("italic","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/images/ed_format_underline.gif" width="18" height="18" alt="<?php print_string("underline","editor");?>" title="<?php print_string("underline","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/images/ed_format_strike.gif" width="18" height="18" alt="<?php print_string("strikethrough","editor");?>" title="<?php print_string("strikethrough","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/images/ed_format_sub.gif" width="18" height="18" alt="<?php print_string("subscript","editor");?>" title="<?php print_string("subscript","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/images/ed_format_sup.gif" width="18" height="18" alt="<?php print_string("superscript","editor");?>" title="<?php print_string("superscript","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/images/ed_copy.gif" width="18" height="18" alt="<?php print_string("copy","editor");?>" title="<?php print_string("copy","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/images/ed_cut.gif" width="18" height="18" alt="<?php print_string("cut","editor");?>" title="<?php print_string("cut","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/images/ed_paste.gif" width="18" height="18" alt="<?php print_string("paste","editor");?>" title="<?php print_string("paste","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/images/ed_wordclean.gif" width="18" height="18" alt="<?php print_string("wordclean","editor");?>" title="<?php print_string("wordclean","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/images/ed_undo.gif" width="18" height="18" alt="<?php print_string("undo","editor");?>" title="<?php print_string("undo","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/images/ed_redo.gif" width="18" height="18" alt="<?php print_string("redo","editor");?>" title="<?php print_string("redo","editor");?>" /></td>
</tr>
<tr>
<td><input type="checkbox" name="buttons[bold]"<?php print(in_array("bold", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[italic]"<?php print(in_array("italic", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[underline]"<?php print(in_array("underline", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[strikethrough]"<?php print(in_array("strikethrough", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[subscript]"<?php print(in_array("subscript", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[superscript]"<?php print(in_array("superscript", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[copy]"<?php print(in_array("copy", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[cut]"<?php print(in_array("cut", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[paste]"<?php print(in_array("paste", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[clean]"<?php print(in_array("clean", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[undo]"<?php print(in_array("undo", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[redo]"<?php print(in_array("redo", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
</tr>
<tr>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/images/ed_align_left.gif" width="18" height="18" alt="<?php print_string("justifyleft","editor");?>" title="<?php print_string("justifyleft","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/images/ed_align_center.gif" width="18" height="18" alt="<?php print_string("justifycenter","editor");?>" title="<?php print_string("justifycenter","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/images/ed_align_right.gif" width="18" height="18" alt="<?php print_string("justifyright","editor");?>" title="<?php print_string("justifyright","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/images/ed_align_justify.gif" width="18" height="18" alt="<?php print_string("justifyfull","editor");?>" title="<?php print_string("justifyfull","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/images/ed_left_to_right.gif" width="18" height="18" alt="<?php print_string("lefttoright","editor");?>" title="<?php print_string("lefttoright","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/images/ed_right_to_left.gif" width="18" height="18" alt="<?php print_string("righttoleft","editor");?>" title="<?php print_string("righttoleft","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/images/ed_list_num.gif" width="18" height="18" alt="<?php print_string("orderedlist","editor");?>" title="<?php print_string("orderedlist","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/images/ed_list_bullet.gif" width="18" height="18" alt="<?php print_string("unorderedlist","editor");?>" title="<?php print_string("unorderedlist","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/images/ed_indent_less.gif" width="18" height="18" alt="<?php print_string("outdent","editor");?>" title="<?php print_string("outdent","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/images/ed_indent_more.gif" width="18" height="18" alt="<?php print_string("indent","editor");?>" title="<?php print_string("indent","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/images/ed_color_fg.gif" width="18" height="18" alt="<?php print_string("forecolor","editor");?>" title="<?php print_string("forecolor","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/images/ed_color_bg.gif" width="18" height="18" alt="<?php print_string("hilitecolor","editor");?>" title="<?php print_string("hilitecolor","editor");?>" /></td>
</tr>
<tr>
<td><input type="checkbox" name="buttons[justifyleft]"<?php print(in_array("justifyleft", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[justifycenter]"<?php print(in_array("justifycenter", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[justifyright]"<?php print(in_array("justifyright", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[justifyfull]"<?php print(in_array("justifyfull", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[lefttoright]"<?php print(in_array("lefttoright", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[righttoleft]"<?php print(in_array("righttoleft", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[insertorderedlist]"<?php print(in_array("insertorderedlist", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[insertunorderedlist]"<?php print(in_array("insertunorderedlist", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[outdent]"<?php print(in_array("outdent", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[indent]"<?php print(in_array("indent", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[forecolor]"<?php print(in_array("forecolor", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[hilitecolor]"<?php print(in_array("hilitecolor", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
</tr>
<tr>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/images/ed_hr.gif" width="18" height="18" alt="<?php print_string("horizontalrule","editor");?>" title="<?php print_string("horizontalrule","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/images/ed_anchor.gif" width="18" height="18" alt="<?php print_string("createanchor","editor");?>" title="<?php print_string("createanchor","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/images/ed_link.gif" width="18" height="18" alt="<?php print_string("insertlink","editor");?>" title="<?php print_string("insertlink","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/images/ed_unlink.gif" width="18" height="18" alt="<?php print_string("removelink","editor");?>" title="<?php print_string("removelink","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/images/ed_image.gif" width="18" height="18" alt="<?php print_string("insertimage","editor");?>" title="<?php print_string("insertimage","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/images/insert_table.gif" width="18" height="18" alt="<?php print_string("inserttable","editor");?>" title="<?php print_string("inserttable","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/images/em.icon.smile.gif" width="18" height="18" alt="<?php print_string("insertsmile","editor");?>" title="<?php print_string("insertsmile","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/images/icon_ins_char.gif" width="18" height="18" alt="<?php print_string("insertchar","editor");?>" title="<?php print_string("insertchar","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/images/spell-check.gif" width="18" height="18" alt="<?php print_string("spellcheck","editor");?>" title="<?php print_string("spellcheck","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/images/ed_html.gif" width="18" height="18" alt="<?php print_string("htmlmode","editor");?>" title="<?php print_string("htmlmode","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/images/fullscreen_maximize.gif" width="18" height="18" alt="<?php print_string("popupeditor","editor");?>" title="<?php print_string("popupeditor","editor");?>" /></td>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/images/ed_replace.gif" width="18" height="18" alt="<?php print_string("popupeditor","editor");?>" title="<?php print_string("searchandreplace","editor");?>" /></td>
</tr>
<tr>
<td><input type="checkbox" name="buttons[inserthorizontalrule]"<?php print(in_array("inserthorizontalrule", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[createanchor]"<?php print(in_array("createanchor", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[createlink]"<?php print(in_array("createlink", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[unlink]"<?php print(in_array("unlink", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[insertimage]"<?php print(in_array("insertimage", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[inserttable]"<?php print(in_array("inserttable", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[insertsmile]"<?php print(in_array("insertsmile", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[insertchar]"<?php print(in_array("insertchar", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[spellcheck]"<?php print(in_array("spellcheck", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[htmlmode]"<?php print(in_array("htmlmode", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[popupeditor]"<?php print(in_array("popupeditor", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td><input type="checkbox" name="buttons[search_replace]"<?php print(in_array("search_replace", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
</tr>
<tr>
<td><img src="<?php echo $CFG->wwwroot ?>/lib/editor/images/ed_nolink.gif" width="18" height="18" alt="<?php print_string("horizontalrule","editor");?>" title="<?php print_string("nolink","editor");?>" /></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td><input type="checkbox" name="buttons[nolink]"<?php print(in_array("nolink", $buttons)) ? " checked=\"checked\"" : "" ;?> /></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="3" align="center"><input type="submit" value="<?php print_string("savechanges");?>" /></td>
</tr>
</table>
</form>
<form method="post" action="<?php print($GLOBALS['ME']);?>">
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<center>
<input type="submit" name="resettodefaults" value="<?php print_string('editorresettodefaults') ?>" />
</center>
</form>
<script language="javascript" type="text/javascript">
<!--
function change_state () {
var choice = document.forms[0].spelling;
var speller = choice.options[choice.selectedIndex].value;
var spellpath = document.forms[0].aspellpath.value;
if (spellpath == '') {
document.forms[0].spelling.disabled = true;
} else {
document.forms[0].spelling.disabled = false;
}
if (speller != 1) {
document.forms[0].dictionary.disabled = true;
} else {
document.forms[0].dictionary.disabled = false;
}
}
document.onload = change_state();
-->
</script>
-214
View File
@@ -1,214 +0,0 @@
<?php // $Id$
/// configuration routines for HTMLArea editor
require_once("../config.php");
require_login();
if (!isadmin()) {
error("Only admins can access this page");
}
if (($data = data_submitted()) && confirm_sesskey()) {
// do we want default values?
if (isset($data->resettodefaults)) {
if (!(reset_to_defaults())) {
error("Editor settings could not be restored!");
}
} else {
if (!(editor_update_config($data))) {
error("Editor settings could not be updated!");
}
}
redirect("$CFG->wwwroot/$CFG->admin/editor.php", get_string("changessaved"), 1);
} else {
// Generate edit form
$fontlist = editor_convert_to_array($CFG->editorfontlist);
$dicts = editor_get_dictionaries();
$stradmin = get_string("administration");
$strconfiguration = get_string("configuration");
$streditorsettings = get_string("editorsettings");
$streditorsettingshelp = get_string("adminhelpeditorsettings");
print_header("Editor settings","Editor settings",
"<a href=\"index.php\">$stradmin</a> -> ".
"<a href=\"configure.php\">$strconfiguration</a> -> $streditorsettings");
print_heading($streditorsettings);
print_simple_box("<center>$streditorsettingshelp</center>","center","50%");
print("<br />\n");
print_simple_box_start("center");
include("editor.html");
print_simple_box_end();
print_footer();
}
/// FUNCTIONS
function editor_convert_to_array ($string) {
/// Converts $CFG->editorfontlist to array
if (empty($string) || !is_string($string)) {
return false;
}
$fonts = array();
$lines = explode(";", $string);
foreach ($lines as $line) {
if (!empty($line)) {
list($fontkey, $fontvalue) = explode(":", $line);
$fonts[$fontkey] = $fontvalue;
}
}
return $fonts;
}
function editor_update_config ($data) {
/// Updates the editor config values.
if (!is_object($data)) {
return false;
}
// Make array for unwanted characters.
$nochars = array(chr(33),chr(34),chr(35),chr(36),chr(37),
chr(38),chr(39),chr(40),chr(41),chr(42),
chr(43),chr(46),chr(47),chr(58),chr(59),
chr(60),chr(61),chr(62),chr(63),chr(64),
chr(91),chr(92),chr(93),chr(94),chr(95),
chr(96),chr(123),chr(124),chr(125),chr(126));
$fontlist = '';
// make font string
$cnt = count($data->fontname);
for ($i = 0; $i < $cnt; $i++) {
if (!empty($data->fontname[$i])) {
$fontlist .= str_replace($nochars, "", $data->fontname[$i]) .":";
$fontlist .= str_replace($nochars, "", $data->fontnamevalue[$i]) .";";
}
}
// strip last semicolon
$fontlist = substr($fontlist, 0, strlen($fontlist) - 1);
// make array of values to update
$updatedata = array();
$updatedata['htmleditor'] = !empty($data->htmleditor) ? $data->htmleditor : 0;
$updatedata['editorbackgroundcolor'] = !empty($data->backgroundcolor) ? $data->backgroundcolor : "#ffffff";
$updatedata['editorfontfamily'] = !empty($data->fontfamily) ? str_replace($nochars,"",$data->fontfamily) : "Times New Roman, Times";
$updatedata['editorfontsize'] = !empty($data->fontsize) ? $data->fontsize : "";
$updatedata['editorkillword'] = !empty($data->killword) ? $data->killword : 0;
$updatedata['editorspelling'] = !empty($data->spelling) ? $data->spelling : 0;
$updatedata['editorfontlist'] = $fontlist;
$updatedata['editordictionary'] = !empty($data->dictionary) ? $data->dictionary : '';
$updatedata['aspellpath'] = !empty($data->aspellpath) ? $data->aspellpath : '';
$hidebuttons = '';
if (!empty($data->buttons) && is_array($data->buttons)) {
foreach ($data->buttons as $key => $value) {
$hidebuttons .= $key . " ";
}
}
$updatedata['editorhidebuttons'] = trim($hidebuttons);
foreach ($updatedata as $name => $value) {
if (!(set_config($name, $value))) {
return false;
}
}
return true;
}
function reset_to_defaults () {
/// Reset the values to default
global $CFG;
include_once($CFG->dirroot .'/lib/defaults.php');
$updatedata = array();
$updatedata['editorbackgroundcolor'] = $defaults['editorbackgroundcolor'];
$updatedata['editorfontfamily'] = $defaults['editorfontfamily'];
$updatedata['editorfontsize'] = $defaults['editorfontsize'];
$updatedata['editorkillword'] = $defaults['editorkillword'];
$updatedata['editorspelling'] = $defaults['editorspelling'];
$updatedata['editorfontlist'] = $defaults['editorfontlist'];
$updatedata['editorhidebuttons'] = $defaults['editorhidebuttons'];
$updatedata['editordictionary'] = '';
foreach ($updatedata as $name => $value) {
if (!(set_config($name, $value))) {
return false;
}
}
return true;
}
function editor_get_dictionaries () {
/// Get all installed dictionaries in the system
global $CFG;
error_reporting(E_ALL); // for debug, final version shouldn't have this...
clearstatcache();
$strerror = '';
// If aspellpath isn't set don't even bother ;-)
if (empty($CFG->aspellpath)) {
return $strerror = 'Empty aspell path!';
}
// Do we have access to popen function?
if (!function_exists('popen')) {
return $strerror = "Popen function disabled!";
exit;
}
global $CFG;
$cmd = $CFG->aspellpath;
$output = '';
$dictionaries = array();
$dicts = array();
if(!($handle = @popen(escapeshellarg($cmd) .' dump dicts', 'r'))) {
return $strerror = "Couldn't create handle!";
exit;
}
while(!feof($handle)) {
$output .= fread($handle, 1024);
}
@pclose($handle);
$dictionaries = explode(chr(10), $output);
// Get rid of possible empty values
if (is_array($dictionaries)) {
$cnt = count($dictionaries);
for ($i = 0; $i < $cnt; $i++) {
if (!empty($dictionaries[$i])) {
$dicts[] = $dictionaries[$i];
}
}
}
if (count($dicts) >= 1) {
return $dicts;
}
$strerror = "Error! Check your aspell installation!";
return $strerror;
}
?>
+70 -54
View File
@@ -2,87 +2,103 @@
// enrol.php - allows admin to edit all enrollment variables
// Yes, enrol is correct English spelling.
include("../config.php");
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
$enrol = optional_param('enrol', $CFG->enrol, PARAM_ALPHA);
$enrol = optional_param('enrol', $CFG->enrol, PARAM_SAFEDIR);
$CFG->pagepath = 'enrol';
require_login();
if (!$site = get_site()) {
redirect("index.php");
}
if (!isadmin()) {
error("Only the admin can use this page");
}
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
}
require_once("$CFG->dirroot/enrol/$enrol/enrol.php"); /// Open the class
$enrolment = new enrolment_plugin();
$adminroot = admin_get_root();
admin_externalpage_setup('enrolment', $adminroot);
/// If data submitted, then process and store.
require_once("$CFG->dirroot/enrol/enrol.class.php"); /// Open the factory class
/// Save settings
if ($frm = data_submitted()) {
if ($enrolment->process_config($frm)) {
set_config('enrol', $frm->enrol);
redirect("enrol.php?sesskey=$USER->sesskey", get_string("changessaved"), 1);
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
}
} else {
$frm = $CFG;
if (empty($frm->enable)) {
$frm->enable = array();
}
if (empty($frm->default)) {
$frm->default = '';
}
if ($frm->default && $frm->default != 'manual' && !in_array($frm->default, $frm->enable)) {
$frm->enable[] = $frm->default;
}
asort($frm->enable);
$frm->enable = array_merge(array('manual'), $frm->enable); // make sure manual plugin is called first
set_config('enrol_plugins_enabled', implode(',', $frm->enable));
set_config('enrol', $frm->default);
redirect("enrol.php", get_string("changessaved"), 1);
}
/// Otherwise fill and print the form.
/// Print the form
/// get language strings
$str = get_strings(array('enrolments', 'users', 'administration', 'settings'));
$str = get_strings(array('enrolmentplugins', 'users', 'administration', 'settings', 'edit'));
admin_externalpage_print_header($adminroot);
$modules = get_list_of_plugins("enrol");
$options = array();
foreach ($modules as $module) {
$options[$module] = get_string("enrolname", "enrol_$module");
}
asort($options);
print_header("$site->shortname: $str->enrolments", "$site->fullname",
"<a href=\"index.php\">$str->administration</a> ->
<a href=\"users.php\">$str->users</a> -> $str->enrolments");
print_simple_box(get_string('configenrolmentplugins', 'admin'), 'center', '700');
echo "<form target=\"{$CFG->framename}\" name=\"enrolmenu\" method=\"post\" action=\"enrol.php\">";
echo "<input type=\"hidden\" name=\"sesskey\" value=\"".$USER->sesskey."\">";
echo "<div align=\"center\"><p><b>";
$table = new stdClass();
$table->head = array(get_string('name'), get_string('enable'), get_string('default'), $str->settings);
$table->align = array('left', 'center', 'center', 'center');
$table->size = array('60%', '', '', '15%');
$table->width = '700';
$table->data = array();
/// Choose an enrolment method
echo get_string('chooseenrolmethod').': ';
choose_from_menu ($options, "enrol", $enrol, "",
"document.location='enrol.php?sesskey=$USER->sesskey&enrol='+document.enrolmenu.enrol.options[document.enrolmenu.enrol.selectedIndex].value", "");
$modules = get_list_of_plugins("enrol");
foreach ($modules as $module) {
echo "</b></p></div>";
/// Print current enrolment type description
print_simple_box_start("center", "80%");
print_heading($options[$enrol]);
// skip if directory is empty
if (!file_exists("$CFG->dirroot/enrol/$module/enrol.php")) {
continue;
}
print_simple_box_start("center", "60%", '', 5, 'informationbox');
print_string("description", "enrol_$enrol");
print_simple_box_end();
$name = get_string("enrolname", "enrol_$module");
$plugin = enrolment_factory::factory($module);
$enable = '<input type="checkbox" name="enable[]" value="'.$module.'"';
if (stristr($CFG->enrol_plugins_enabled, $module) !== false) {
$enable .= ' checked="checked"';
}
if ($module == 'manual') {
$enable .= ' disabled="disabled"';
}
$enable .= ' />';
if (method_exists($plugin, 'print_entry')) {
$default = '<input type="radio" name="default" value="'.$module.'"';
if ($CFG->enrol == $module) {
$default .= ' checked="checked"';
}
$default .= ' />';
} else {
$default = '';
}
$table->data[$name] = array($name, $enable, $default,
'<a href="enrol_config.php?enrol='.$module.'">'.$str->edit.'</a>');
}
asort($table->data);
echo "<hr />";
// print_heading($str->settings);
$enrolment->config_form($frm);
print_table($table);
echo "<center><p><input type=\"submit\" value=\"".get_string("savechanges")."\"></p></center>\n";
echo "<center><input type=\"submit\" value=\"".get_string("savechanges")."\"></center>\n";
echo "</form>";
print_simple_box_end();
admin_externalpage_print_footer($adminroot);
print_footer();
exit;
?>
?>
+79
View File
@@ -0,0 +1,79 @@
<?PHP // $Id$
// enrol_config.php - allows admin to edit all enrollment variables
// Yes, enrol is correct English spelling.
require_once("../config.php");
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('enrolment', $adminroot);
$enrol = required_param('enrol', PARAM_ALPHA);
$CFG->pagepath = 'enrol/' . $enrol;
require_once("$CFG->dirroot/enrol/enrol.class.php"); /// Open the factory class
$enrolment = enrolment_factory::factory($enrol);
/// If data submitted, then process and store.
if ($frm = data_submitted()) {
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
}
if ($enrolment->process_config($frm)) {
redirect("enrol.php?sesskey=$USER->sesskey", get_string("changessaved"), 1);
}
} else {
$frm = $CFG;
}
/// Otherwise fill and print the form.
/// get language strings
$str = get_strings(array('enrolmentplugins', 'configuration', 'users', 'administration'));
unset($options);
$modules = get_list_of_plugins("enrol");
foreach ($modules as $module) {
$options[$module] = get_string("enrolname", "enrol_$module");
}
asort($options);
admin_externalpage_print_header($adminroot);
echo "<form target=\"{$CFG->framename}\" name=\"enrolmenu\" method=\"post\" action=\"enrol_config.php\">";
echo "<input type=\"hidden\" name=\"sesskey\" value=\"".$USER->sesskey."\">";
echo "<div align=\"center\"><p><b>";
/// Choose an enrolment method
echo get_string('chooseenrolmethod').': ';
choose_from_menu ($options, "enrol", $enrol, "",
"document.location='enrol_config.php?enrol='+document.enrolmenu.enrol.options[document.enrolmenu.enrol.selectedIndex].value", "");
echo "</b></p></div>";
/// Print current enrolment type description
print_simple_box_start("center", "80%");
print_heading($options[$enrol]);
print_simple_box_start("center", "60%", '', 5, 'informationbox');
print_string("description", "enrol_$enrol");
print_simple_box_end();
echo "<hr />";
$enrolment->config_form($frm);
echo "<center><p><input type=\"submit\" value=\"".get_string("savechanges")."\"></p></center>\n";
echo "</form>";
print_simple_box_end();
admin_externalpage_print_footer($adminroot);
exit;
?>
+42 -33
View File
@@ -30,24 +30,17 @@
// from moodle.org be able to check more and more versions.
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/environmentlib.php');
require_once($CFG->libdir.'/componentlib.class.php');
$adminroot = admin_get_root();
admin_externalpage_setup('environment', $adminroot);
/// Parameters
$action = optional_param('action', '', PARAM_ALPHA);
$sesskey = optional_param('sesskey');
$version = optional_param('version');
$action = optional_param('action', '', PARAM_ACTION);
$version = optional_param('version', '', PARAM_FILE); //
/// Security checks
require_login();
if (!isadmin()) {
error('You need to be admin to use this page');
}
if (!$site = get_site()) {
error("Site isn't defined!");
}
/// Get some strings
$stradmin = get_string('administration');
@@ -55,14 +48,46 @@
$strenvironment = get_string('environment', 'admin');
$strerror = get_string('error');
$strmoodleversion = get_string('moodleversion');
$strupdate = get_string('updatecomponent', 'admin');
$strupwards = get_string('upwards', 'admin');
$strmisc = get_string('miscellaneous');
/// Print the header stuff
print_header("$SITE->shortname: $strenvironment", $SITE->fullname,
"<a href=\"index.php\">$stradmin</a> -> ".$strenvironment);
admin_externalpage_print_header($adminroot);
/// Print the component download link
echo '<div class="reportlink"><a href="environment.php?action=updatecomponent&amp;sesskey='.$USER->sesskey.'">'.$strupdate.'</a></div>';
print_heading($strenvironment);
/// Handle the 'updatecomponent' action
if ($action == 'updatecomponent' && confirm_sesskey()) {
/// Create component installer and execute it
if ($cd = new component_installer('http://download.moodle.org',
'environment',
'environment.zip')) {
$status = $cd->install(); //returns ERROR | UPTODATE | INSTALLED
switch ($status) {
case ERROR:
if ($cd->get_error() == 'remotedownloadnotallowed') {
$a = new stdClass();
$a->url = 'http://download.moodle.org/environment/environment.zip';
$a->dest= $CFG->dataroot.'/';
print_simple_box(get_string($cd->get_error(), 'error', $a), 'center', '', '', 5, 'errorbox');
} else {
print_simple_box(get_string($cd->get_error(), 'error'), 'center', '', '', 5, 'errorbox');
}
break;
case UPTODATE:
print_simple_box(get_string($cd->get_error(), 'error'), 'center');
break;
case INSTALLED:
print_simple_box(get_string('componentinstalled', 'admin'), 'center');
break;
}
}
}
/// Start of main box
print_simple_box_start('center');
@@ -96,7 +121,7 @@
}
/// Print form and popup menu
echo '<center><form method="post" action="'.$CFG->wwwroot.'/admin/environment.php">';
echo '<center><form method="post" action="environment.php">';
echo $strmoodleversion.' ';
choose_from_menu ($versions, 'version', $version, null, 'this.form.submit();' );
echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
@@ -107,22 +132,6 @@
/// Gather and show results
$status = check_moodle_environment($version, $environment_results);
/// Process action
if ($form = data_submitted()) {
if (confirm_sesskey()) {
if ($form->action == "disable") {
} else {
}
}
}
/// Default action, show explanation and popup menu
/// Print footer
print_footer();
admin_externalpage_print_footer($adminroot);
?>
+155 -3
View File
@@ -12,13 +12,165 @@
</MOODLE>
<MOODLE version="1.6">
<DATABASE level="required">
<VENDOR name="mysql" version="4.1.12" />
<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" />
</DATABASE>
<PHP version="4.3.0" level="required" />
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="optional" />
<PHP_EXTENSION name="mbstring" level="optional" />
<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.7">
<UNICODE level="optional">
<FEEDBACK>
<ON_CHECK message="unicoderecommended" />
</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.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.0" 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>
+47 -28
View File
@@ -2,21 +2,25 @@
// filter.php
// Edit text filter settings
require_once "../config.php";
require_once "$CFG->libdir/tablelib.php";
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/tablelib.php');
// check for allowed access
require_login();
if (!isadmin()) {
error( 'Only administrators can use the filters administration page' );
}
if (!$site = get_site()) {
error( 'Site is not defined in filters administration page' );
}
$adminroot = admin_get_root();
admin_externalpage_setup('managefilters', $adminroot);
// get parameters
$params = new Object;
$param->filter = required_param( 'filter' );
$param = new Object;
$param->filter = required_param('filter', PARAM_PATH);
$param->submit = optional_param('submit', 0, PARAM_BOOL);
$param->reset = optional_param('reset', 0, PARAM_BOOL);
$filtername = substr($param->filter, strpos( $param->filter, '/' )+1 ) ;
// $CFG->pagepath is used to generate the body and id attributes for the body tag
// of the page. It is also used to generate the link to the Moodle Docs for this view.
$CFG->pagepath = 'filter/' . $filtername . '/config';
// get translated strings for use on page
$txt = new Object;
@@ -24,11 +28,16 @@
$txt->administration = get_string( 'administration' );
$txt->configuration = get_string( 'configuration' );
//======================
// Process Actions
//======================
// if reset pressed let filter config page handle it
$forcereset = false;
if (!empty($param->reset)) {
$forcereset = true;
}
else
if ($config = data_submitted()) {
// check session key
@@ -36,12 +45,24 @@
error( get_string('confirmsesskeybad', 'error' ) );
}
// run through submitted data
// reject if does not start with filter_
foreach ($config as $name => $value) {
set_config( $name,$value );
$configpath = $CFG->dirroot.'/filter/'.$filtername.'/filterconfig.php';
if (file_exists($configpath)) {
require_once($configpath);
$functionname = $filtername.'_process_config';
if (function_exists($functionname)) {
$functionname($config);
$saved = true;
}
}
redirect( "$CFG->wwwroot/$CFG->admin/filters.php", get_string('changessaved'), 1);
if (empty($saved)) {
// run through submitted data
// reject if does not start with filter_
foreach ($config as $name => $value) {
set_config($name, stripslashes($value));
}
}
redirect("$CFG->wwwroot/$CFG->admin/filters.php");
exit;
}
@@ -49,12 +70,9 @@
// Display logic
//==============================
$filtername = ucfirst( substr( $param->filter, strpos( $param->filter, '/' )+1 ) );
print_header( "$site->shortname: $txt->managefilters", "$site->fullname",
"<a href=\"index.php\">$txt->administration</a> -> <a href=\"configure.php\">$txt->configuration</a> " .
"-> <a href=\"filters.php\">$txt->managefilters</a> -> $filtername" );
print_heading( $txt->managefilters );
$filtername = ucfirst($filtername);
admin_externalpage_print_header($adminroot);
print_heading( $filtername );
print_simple_box("<center>".get_string("configwarning", "admin")."</center>", "center", "50%");
echo "<br />";
@@ -67,13 +85,14 @@
<?php include "$CFG->dirroot/$param->filter/filterconfig.html"; ?>
<center><input type="submit" value="<?php print_string('savechanges'); ?>" /></center>
<center>
<input type="submit" name="submit" value="<?php print_string('savechanges'); ?>" />
<input type="submit" name="reset" value="<?php echo print_string('resettodefaults'); ?>" />
</center>
</form>
<?php
print_simple_box_end();
print_simple_box_end();
print_footer();
admin_externalpage_print_footer($adminroot);
?>
+146 -194
View File
@@ -2,168 +2,164 @@
// filters.php
// Edit list of available text filters
require_once "../config.php";
require_once "$CFG->libdir/tablelib.php";
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/tablelib.php');
// defines
define( 'FILTER_TABLE','filter_administration_table' );
define('FILTER_TABLE','filter_administration_table');
// check for allowed access
require_login();
if (!isadmin()) {
error( 'Only administrators can use the filters administration page' );
}
if (!$site = get_site()) {
error( 'Site is not defined in filters administration page' );
}
$adminroot = admin_get_root();
admin_externalpage_setup('managefilters', $adminroot);
// get values from page
$params = new Object;
$params->action = optional_param( 'action','',PARAM_ALPHA );
$params->filterpath = optional_param( 'filterpath', '',PARAM_PATH );
$params->cachetext = optional_param( 'cachetext','0',PARAM_INT );
$params->filteruploadedfiles = optional_param( 'filteruploadedfiles','',PARAM_ALPHA );
$params->filterall = optional_param( 'filterall','',PARAM_ALPHA );
$params->filtermatchoneperpage = optional_param( 'filtermatchoneperpage','',PARAM_ALPHA );
$params->filtermatchonepertext = optional_param( 'filtermatchonepertext','',PARAM_ALPHA );
$params = new object();
$params->action = optional_param('action', '', PARAM_ACTION);
$params->filterpath = optional_param('filterpath', '', PARAM_PATH);
$params->cachetext = optional_param('cachetext', 0, PARAM_INT);
$params->filterall = optional_param('filterall', 0, PARAM_BOOL);
$params->filteruploadedfiles = optional_param('filteruploadedfiles', 0, PARAM_INT);
$params->filtermatchoneperpage = optional_param('filtermatchoneperpage', 0, PARAM_BOOL);
$params->filtermatchonepertext = optional_param('filtermatchonepertext', 0, PARAM_BOOL);
// some basic information
$url = 'filters.php';
$myurl = "$url?sesskey=" . sesskey();
$img = "$CFG->pixpath/t";
// get translated strings for use on page
$txt = new Object;
$txt->managefilters = get_string( 'managefilters' );
$txt->administration = get_string( 'administration' );
$txt->configuration = get_string( 'configuration' );
$txt->name = get_string( 'name' );
$txt->hide = get_string( 'hide' );
$txt->show = get_string( 'show' );
$txt = new object();
$txt->managefilters = get_string('managefilters');
$txt->administration = get_string('administration');
$txt->configuration = get_string('configuration');
$txt->name = get_string('name');
$txt->hide = get_string('hide');
$txt->show = get_string('show');
$txt->hideshow = "$txt->hide/$txt->show";
$txt->settings = get_string( 'settings' );
$txt->up = get_string( 'up' );
$txt->down = get_string( 'down' );
$txt->settings = get_string('settings');
$txt->up = get_string('up');
$txt->down = get_string('down');
$txt->updown = "$txt->up/$txt->down";
$txt->cachetext = get_string( 'cachetext', 'admin' );
$txt->configcachetext = get_string( 'configcachetext', 'admin' );
$txt->filteruploadedfiles = get_string( 'filteruploadedfiles','admin' );
$txt->configfilteruploadedfiles = get_string( 'configfilteruploadedfiles','admin' );
$txt->filterall = get_string( 'filterall','admin' );
$txt->filtermatchoneperpage = get_string( 'filtermatchoneperpage','admin' );
$txt->filtermatchonepertext = get_string( 'filtermatchonepertext','admin' );
$txt->configfilterall = get_string( 'configfilterall','admin' );
$txt->configfiltermatchoneperpage = get_string( 'configfiltermatchoneperpage','admin' );
$txt->configfiltermatchonepertext = get_string( 'configfiltermatchonepertext','admin' );
$txt->cachecontrols = get_string( 'cachecontrols' );
$txt->yes = get_string( 'yes' );
$txt->cachetext = get_string('cachetext', 'admin');
$txt->configcachetext = get_string('configcachetext', 'admin');
$txt->filteruploadedfiles = get_string('filteruploadedfiles','admin');
$txt->configfilteruploadedfiles = get_string('configfilteruploadedfiles','admin');
$txt->filterall = get_string('filterall','admin');
$txt->filtermatchoneperpage = get_string('filtermatchoneperpage','admin');
$txt->filtermatchonepertext = get_string('filtermatchonepertext','admin');
$txt->configfilterall = get_string('configfilterall','admin');
$txt->configfiltermatchoneperpage = get_string('configfiltermatchoneperpage','admin');
$txt->configfiltermatchonepertext = get_string('configfiltermatchonepertext','admin');
$txt->cachecontrols = get_string('cachecontrols');
$txt->yes = get_string('yes');
$txt->no = get_string('no');
$txt->none = get_string('none');
$txt->allfiles = get_string('allfiles');
$txt->htmlfilesonly = get_string('htmlfilesonly');
// get a list of possible filters (and translate name if possible)
// note filters can be in the dedicated filters area OR in their
// note filters can be in the dedicated filters area OR in their
// associated modules
$allfilters = array();
$installedfilters = array();
$filtersettings = array();
$filterlocations = array('mod','filter');
foreach ($filterlocations as $filterlocation) {
$plugins = get_list_of_plugins( $filterlocation );
$plugins = get_list_of_plugins($filterlocation);
foreach ($plugins as $plugin) {
$pluginpath = "$CFG->dirroot/$filterlocation/$plugin/filter.php";
$settingspath = "$CFG->dirroot/$filterlocation/$plugin/filterconfig.html";
if (is_readable( $pluginpath )) {
$name = trim( get_string("filtername", $plugin) );
if (is_readable($pluginpath)) {
$name = trim(get_string("filtername", $plugin));
if (empty($name) or ($name == '[[filtername]]')) {
$name = $plugin;
$name = ucfirst($plugin);
}
$installedfilters["$filterlocation/$plugin"] = $name;
if (is_readable($settingspath)) {
$filtersettings[] = "$filterlocation/$plugin";
}
$allfilters[ "$filterlocation/$plugin" ] = ucfirst( $name );
}
if (is_readable($settingspath)) {
$filtersettings[] = "$filterlocation/$plugin";
}
}
}
// get all the currently selected filters
if (!empty($CFG->textfilters)) {
$installedfilters = explode( ',', $CFG->textfilters );
}
else {
$installedfilters = array();
$oldactivefilters = explode(',', $CFG->textfilters);
$oldactivefilters = array_unique($oldactivefilters);
} else {
$oldactivefilters = array();
}
// take this opportunity to clean up filters
$oldinstalledfilters = $installedfilters;
$installedfilters = array();
foreach ($oldinstalledfilters as $key => $installedfilter ) {
if (!empty( $installedfilter ) and array_key_exists( $installedfilter, $allfilters ) ) {
$installedfilters[ $key ] = $installedfilter;
$activefilters = array();
foreach ($oldactivefilters as $oldactivefilter) {
if (!empty($oldactivefilter) and array_key_exists($oldactivefilter, $installedfilters)) {
$activefilters[] = $oldactivefilter;
}
}
$installedfilters = array_unique($installedfilters);
set_config( 'textfilters', implode( ',', $installedfilters ) );
//======================
// Process Actions
//======================
if (($params->action=="hide") and confirm_sesskey()) {
$key=array_search( $params->filterpath, $installedfilters );
if ($params->action=="") {
// store cleaned active filers in db
set_config('textfilters', implode(',', $activefilters));
} elseif (($params->action=="hide") and confirm_sesskey()) {
$key=array_search($params->filterpath, $activefilters);
// check filterpath is valid
if ($key===false) {
error( "Filter $params->filterpath is not a currently installed filter" );
}
// just delete it
unset( $installedfilters[ $key ] );
set_config( 'textfilters', implode( ',', $installedfilters ) );
}
if (($params->action=="show") and confirm_sesskey()) {
// ignore it - doubleclick??
} else {
// just delete it
unset($activefilters[$key]);
set_config('textfilters', implode(',', $activefilters));
}
} elseif (($params->action=="show") and confirm_sesskey()) {
// check filterpath is valid
if (!array_key_exists( $params->filterpath, $allfilters ) ) {
error( "Filter $params->filterpath is not a currently installed filter" );
}
if (array_search( $params->filterpath,$installedfilters ) ) {
error( "Filter $params->filterpath is already active" );
}
// add it to installed filters
$installedfilters[] = $params->filterpath;
$installedfilters = array_unique($installedfilters);
set_config( 'textfilters', implode( ',', $installedfilters ) );
}
if (($params->action=="down") and confirm_sesskey()) {
$key=array_search( $params->filterpath, $installedfilters );
if (!array_key_exists($params->filterpath, $installedfilters)) {
error("Filter $params->filterpath is not currently installed", $url);
} elseif (array_search($params->filterpath,$activefilters)) {
// filterpath is already active - doubleclick??
} else {
// add it to installed filters
$activefilters[] = $params->filterpath;
$activefilters = array_unique($activefilters);
set_config('textfilters', implode(',', $activefilters));
}
} elseif (($params->action=="down") and confirm_sesskey()) {
$key=array_search($params->filterpath, $activefilters);
// check filterpath is valid
if ($key===false ) {
error( "Filter $params->filterpath is not a currently installed filter" );
}
if ($key>=(count($installedfilters)-1)) {
error( "Filter $params->filterpath cannot be moved any further down" );
}
// swap with $key+1
$fsave = $installedfilters[$key];
$installedfilters[$key] = $installedfilters[$key+1];
$installedfilters[$key+1] = $fsave;
set_config( 'textfilters', implode( ',', $installedfilters ) );
}
if (($params->action=="up") and confirm_sesskey()) {
$key=array_search( $params->filterpath, $installedfilters );
if ($key===false) {
error("Filter $params->filterpath is not currently active", $url);
} elseif ($key>=(count($activefilters)-1)) {
// cannot be moved any further down - doubleclick??
} else {
// swap with $key+1
$fsave = $activefilters[$key];
$activefilters[$key] = $activefilters[$key+1];
$activefilters[$key+1] = $fsave;
set_config('textfilters', implode(',', $activefilters));
}
} elseif (($params->action=="up") and confirm_sesskey()) {
$key=array_search($params->filterpath, $activefilters);
// check filterpath is valid
if ($key===false ) {
error( "Filter $params->filterpath is not a currently installed filter" );
}
if ($key<1) {
error( "Filter $params->filterpath cannot be moved any further up" );
}
// swap with $key-1
$fsave = $installedfilters[$key];
$installedfilters[$key] = $installedfilters[$key-1];
$installedfilters[$key-1] = $fsave;
set_config( 'textfilters', implode( ',', $installedfilters ) );
}
if (($params->action=="config") and confirm_sesskey()) {
set_config( 'cachetext', $params->cachetext );
set_config( 'filteruploadedfiles', $params->filteruploadedfiles );
set_config( 'filterall', $params->filterall );
set_config( 'filtermatchoneperpage', $params->filtermatchoneperpage );
set_config( 'filtermatchonepertext', $params->filtermatchonepertext );
if ($key===false) {
error("Filter $params->filterpath is not currently active", $url);
} elseif ($key<1) {
//cannot be moved any further up - doubleclick??
} else {
// swap with $key-1
$fsave = $activefilters[$key];
$activefilters[$key] = $activefilters[$key-1];
$activefilters[$key-1] = $fsave;
set_config('textfilters', implode(',', $activefilters));
}
} elseif (($params->action=="config") and confirm_sesskey()) {
set_config('cachetext', $params->cachetext);
set_config('filteruploadedfiles', $params->filteruploadedfiles);
set_config('filterall', $params->filterall);
set_config('filtermatchoneperpage', $params->filtermatchoneperpage);
set_config('filtermatchonepertext', $params->filtermatchonepertext);
}
//======================
@@ -173,45 +169,45 @@
// construct the display array with installed filters
// at the top in the right order
$displayfilters = array();
foreach ($installedfilters as $installedfilter) {
$name = $allfilters[ $installedfilter ];
$displayfilters[ $installedfilter ] = $name;
foreach ($activefilters as $activefilter) {
$name = $installedfilters[$activefilter];
$displayfilters[$activefilter] = $name;
}
foreach ($allfilters as $key => $filter) {
if (!array_key_exists( $key, $displayfilters )) {
$displayfilters[ $key ] = $filter;
foreach ($installedfilters as $key => $filter) {
if (!array_key_exists($key, $displayfilters)) {
$displayfilters[$key] = $filter;
}
}
// construct the flexible table ready to display
$table = new flexible_table(FILTER_TABLE);
$table->define_columns( array( 'name', 'hideshow', 'order', 'settings' ) );
$table->define_headers( array( $txt->name, $txt->hideshow, $txt->updown, $txt->settings ) );
$table->define_baseurl( "$CFG->wwwroot/admin/filters.php" );
$table->set_attribute( 'id', 'blocks' );
$table->set_attribute( 'class', 'flexible generaltable generalbox' );
$table->define_columns(array('name', 'hideshow', 'order', 'settings'));
$table->column_style('hideshow', 'text-align', 'center');
$table->column_style('order', 'text-align', 'center');
$table->column_style('settings', 'text-align', 'center');
$table->define_headers(array($txt->name, $txt->hideshow, $txt->updown, $txt->settings));
$table->define_baseurl("$CFG->wwwroot/$CFG->admin/filters.php");
$table->set_attribute('id', 'blocks');
$table->set_attribute('class', 'flexible generaltable generalbox');
$table->set_attribute('style', 'margin:auto;');
$table->set_attribute('cellpadding', '5');
$table->setup();
// some basic information
$url = strip_querystring( qualified_me() );
$myurl = "$url?sesskey=" . sesskey();
$img = "$CFG->pixpath/t";
// iterate through filters adding to display table
$updowncount = 1;
$installedfilterscount = count( $installedfilters );
foreach( $displayfilters as $path => $name ) {
$upath = urlencode( $path );
$activefilterscount = count($activefilters);
foreach ($displayfilters as $path => $name) {
$upath = urlencode($path);
// get hide/show link
if (in_array( $path, $installedfilters )) {
if (in_array($path, $activefilters)) {
$hideshow = "<a href=\"$myurl&amp;action=hide&amp;filterpath=$upath\">";
$hideshow .= "<img src=\"$img/hide.gif\" alt=\"hide\" /></a>";
$hideshow .= "<img src=\"{$CFG->pixpath}/i/hide.gif\" height=\"16\" width=\"16\" alt=\"hide\" /></a>";
$hidden = false;
$displayname = "<span>$name</span>";
}
else {
$hideshow = "<a href=\"$myurl&amp;action=show&amp;filterpath=$upath\">";
$hideshow .= "<img src=\"$img/show.gif\" alt=\"show\" /></a>";
$hideshow .= "<img src=\"{$CFG->pixpath}/i/show.gif\" height=\"16\" width=\"16\" alt=\"show\" /></a>";
$hidden = true;
$displayname = "<span class=\"dimmed_text\">$name</span>";
}
@@ -226,7 +222,7 @@
else {
$updown .= "<img src=\"$CFG->pixpath/spacer.gif\" height=\"16\" width=\"16\" alt=\"\" />&nbsp;";
}
if ($updowncount<$installedfilterscount) {
if ($updowncount<$activefilterscount) {
$updown .= "<a href=\"$myurl&amp;action=down&amp;filterpath=$upath\">";
$updown .= "<img src=\"$img/down.gif\" alt=\"down\" /></a>";
}
@@ -235,16 +231,16 @@
}
++$updowncount;
}
// settings link (if defined)
$settings = '';
if (in_array( $path, $filtersettings )) {
if (in_array($path, $filtersettings)) {
$settings = "<a href=\"filter.php?filter=" . urlencode($path) . "\">";
$settings .= "{$txt->settings}</a>";
}
// write data into the table object
$table->add_data( array( $displayname, $hideshow, $updown, $settings ) );
$table->add_data(array($displayname, $hideshow, $updown, $settings));
}
// build options list for cache lifetime
@@ -272,59 +268,15 @@
// Display logic
//==============================
print_header( "$site->shortname: $txt->managefilters", "$site->fullname",
"<a href=\"index.php\">$txt->administration</a> -> <a href=\"configure.php\">$txt->configuration</a> " .
"-> $txt->managefilters" );
admin_externalpage_print_header($adminroot);
print_heading_with_help( $txt->managefilters, 'filters' );
print_heading_with_help($txt->managefilters, 'filters');
// print the table of all the filters
$table->print_html();
// print the table for the cache controls
print_heading( $txt->cachecontrols );
print_simple_box_start('center');
?>
// cache control table has been removed
<form name="options" id="options" method="post" action="<?php echo $url; ?>" >
<input type="hidden" name="sesskey" value="<?php echo sesskey(); ?>" />
<input type="hidden" name="action" value="config" />
<table cellpadding="20">
<tr valign="top">
<td nowrap="nowrap" align="right"><?php echo $txt->cachetext; ?></td>
<td><?php choose_from_menu( $options, "cachetext", $CFG->cachetext, "", "", "" ); ?></td>
<td><?php echo $txt->configcachetext; ?></td>
</tr>
<tr valign="top">
<td nowrap="nowrap" align="right"><?php echo $txt->filteruploadedfiles; ?></td>
<td><?php choose_from_menu( array($txt->no,$txt->yes), "filteruploadedfiles", $CFG->filteruploadedfiles,"","",""); ?></td>
<td><?php echo $txt->configfilteruploadedfiles; ?></td>
</tr>
<tr valign="top">
<td nowrap="nowrap" align="right"><?php echo $txt->filtermatchoneperpage; ?></td>
<td><?php choose_from_menu( array($txt->no,$txt->yes), "filtermatchoneperpage", $CFG->filtermatchoneperpage,"","",""); ?></td>
<td><?php echo $txt->configfiltermatchoneperpage; ?></td>
<tr valign="top">
<td nowrap="nowrap" align="right"><?php echo $txt->filtermatchonepertext; ?></td>
<td><?php choose_from_menu( array($txt->no,$txt->yes), "filtermatchonepertext", $CFG->filtermatchonepertext,"","",""); ?></td>
<td><?php echo $txt->configfiltermatchonepertext; ?></td>
</tr>
</tr>
<tr valign="top">
<td nowrap="nowrap" align="right"><?php echo $txt->filterall; ?></td>
<td><?php choose_from_menu( array($txt->no,$txt->yes), "filterall", $CFG->filterall,"","",""); ?></td>
<td><?php echo $txt->configfilterall; ?></td>
</tr>
<tr valign="top">
<td>&nbsp;</td>
<td><input type="submit" value="<?php print_string('savechanges'); ?>" /></td>
<td>&nbsp;</td>
</tr>
</table>
</form>
admin_externalpage_print_footer($adminroot);
<?php
print_simple_box_end();
print_footer();
?>
+1 -1
View File
@@ -1,4 +1,4 @@
<?
<?php // $Id$
/** This expects the output from a command like
* clamscan -r --infected --no-summary <files> 2>&1 | php -d error_log=/path/to/log thisfile.php
* also it's important that the output of clamscan prints the FULL PATH to each infected file, so use absolute paths for area to scan
+64 -44
View File
@@ -1,25 +1,34 @@
<?php // $Id$
ob_start(); //for whitespace test
require_once('../config.php');
// extra whitespace test - intentionally breaks cookieless mode
$extraws = '';
while (true) {
$extraws .= ob_get_contents();
if (!@ob_end_clean()) {
break;
}
}
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('healthcenter', $adminroot);
define('SEVERITY_NOTICE', 'notice');
define('SEVERITY_ANNOYANCE', 'annoyance');
define('SEVERITY_SIGNIFICANT', 'significant');
define('SEVERITY_CRITICAL', 'critical');
$resetsesserrorcounter = optional_param( 'resetsesserrorcounter' );
$solution = optional_param('solution', 0, PARAM_SAFEDIR); //in fact it is class name alhanumeric and _
require_login();
if (!isadmin()) {
error('Only the admin can use this page');
}
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
$site = get_site();
$stradmin = get_string('administration');
$strhealthcenter = get_string('healthcenter');
print_header($site->shortname.': '.$strhealthcenter, $site->fullname,
'<a href="index.php">'.$stradmin.'</a> -> '.$strhealthcenter);
admin_externalpage_print_header($adminroot);
echo <<<STYLES
<style type="text/css">
@@ -83,9 +92,7 @@ dd.solution li {
</style>
STYLES;
$solution = optional_param('solution', NULL);
if(!empty($solution) && class_exists($solution)) {
if(strpos($solution, 'problem_') === 0 && class_exists($solution)) {
health_print_solution($solution);
}
else {
@@ -93,7 +100,7 @@ STYLES;
}
print_footer();
admin_externalpage_print_footer($adminroot);
function health_find_problems() {
@@ -217,18 +224,13 @@ class problem_000001 extends problem_base {
class problem_000002 extends problem_base {
function title() {
return 'Extra characters at the end of config.php';
return 'Extra characters at the end of config.php or other library function';
}
function exists() {
// [pj] When the requirements are raised to PHP 4.3.0 this will be file_get_contents()
if($fp = @fopen('../config.php', 'r')) {
$contents = fread($fp, 16384); // 16K should be enough
$ending = substr($contents, -2);
unset($contents);
if($ending == '?>') {
return false;
}
fclose($fp);
global $extraws;
if($extraws === '') {
return false;
}
return true;
}
@@ -236,11 +238,11 @@ class problem_000002 extends problem_base {
return SEVERITY_SIGNIFICANT;
}
function description() {
return 'Your Moodle configuration file, config.php, contains some characters after the closing PHP tag (?>). This could cause Moodle to exhibit several kinds of problems and should be fixed.';
return 'Your Moodle configuration file config.php or another library file, contains some characters after the closing PHP tag (?>). This causes Moodle to exhibit several kinds of problems (such as broken downloaded files) and must be fixed.';
}
function solution() {
global $CFG;
return 'You need to edit <strong>'.$CFG->dirroot.'/config.php</strong> and remove all characters (including spaces and returns) after the ending ?> tag. These two characters should be the very last in that file.';
return 'You need to edit <strong>'.$CFG->dirroot.'/config.php</strong> and remove all characters (including spaces and returns) after the ending ?> tag. These two characters should be the very last in that file. The extra trailing whitespace may be also present in other PHP files that are included from lib/setup.php.';
}
}
@@ -351,24 +353,41 @@ class problem_000008 extends problem_base {
return 'PHP: memory_limit cannot be controlled by Moodle';
}
function exists() {
$memlimit = @ini_get('memory_limit');
if(empty($memlimit)) {
$oldmemlimit = @ini_get('memory_limit');
if(empty($oldmemlimit)) {
// PHP not compiled with memory limits, this means that it's
// probably limited to 8M so we have a problem...
return true;
// probably limited to 8M or in case of Windows not at all.
// We can ignore it for now - there is not much to test anyway
// TODO: add manual test that fills memory??
return false;
}
// Otherwise, raise_memory_limit in setup.php will do the trick
$oldmemlimit = get_real_size($oldmemlimit);
//now lets change the memory limit to something unique below 128M==134217728
@ini_set('memory_limit', 134217720);
$testmemlimit = get_real_size(@ini_get('memory_limit'));
//verify the change had any effect at all
if ($oldmemlimit == $testmemlimit) {
//memory limit can not be changed - is it big enough then?
if ($oldmemlimit < get_real_size('128M')) {
return true;
} else {
return false;
}
}
@ini_set('memory_limit', $oldmemlimit);
return false;
}
function severity() {
return SEVERITY_ANNOYANCE;
return SEVERITY_NOTICE;
}
function description() {
return 'The settings for PHP on your server do not allow a script to request more memory during its execution. This means that most likely there is a hard limit of 8MB for each script. It is possible that certain operations within Moodle will require more than this amount in order to complete successfully, especially if there are lots of data to be processed. Therefore, it is recommended that you contact your server administrator to address this issue.';
return 'The settings for PHP on your server do not allow a script to request more memory during its execution. '.
'This means that there is a hard limit of '.@ini_get('memory_limit').' for each script. '.
'It is possible that certain operations within Moodle will require more than this amount in order '.
'to complete successfully, especially if there are lots of data to be processed.';
}
function solution() {
global $CFG;
return 'We need a good solution here. Enabling memory limit control means recompiling PHP... maybe this should be SEVERITY_NOTICE instead of SEVERITY_ANNOYANCE?';
return 'It is recommended that you contact your web server administrator to address this issue.';
}
}
@@ -399,7 +418,7 @@ class problem_000010 extends problem_base {
}
function exists() {
if (!$this->is_enabled()) {
return true;
return true;
}
if ($this->status() < 1) {
return true;
@@ -409,7 +428,7 @@ class problem_000010 extends problem_base {
function severity() {
if ($this->is_enabled() and $this->status() == 0) {
return SEVERITY_SIGNIFICANT;
} else {
} else {
return SEVERITY_ANNOYANCE;
}
}
@@ -417,12 +436,12 @@ class problem_000010 extends problem_base {
global $CFG;
$desc = 'Slasharguments are needed for relative linking in uploaded resources:<ul>';
if (!$this->is_enabled()) {
$desc .= '<li>slasharguments are <strong>disabled</strong> in Moodle configuration</li>';
$desc .= '<li>slasharguments are <strong>disabled</strong> in Moodle configuration</li>';
} else {
$desc .= '<li>slasharguments are enabled in Moodle configuration</li>';
$desc .= '<li>slasharguments are enabled in Moodle configuration</li>';
}
if ($this->status() == -1) {
$desc .= '<li>can not run automatic test, you can verify it <a href="'.$CFG->wwwroot.'/file.php/testslasharguments" target="_blank">here</a></li>';
$desc .= '<li>can not run automatic test, you can verify it <a href="'.$CFG->wwwroot.'/file.php/testslasharguments" target="_blank">here</a> manually</li>';
} else if ($this->status() == 0) {
$desc .= '<li>slashargument test <strong>failed</strong>, please check server configuration</li>';
} else {
@@ -450,9 +469,9 @@ class problem_000010 extends problem_base {
$solution .= 'Congratulations - everything seems OK now :-D';
}
if ($status < 1) {
$solution .= '<p>IIS:<ul><li>try to add <code>cgi.fix_pathinfo=1</code> to php.ini</li><li>do NOT enable AllowPathInfoForScriptMappings !!!</li><li>slasharguments may not work when using ISAPI and PHP 4.3.10 and older</li></ul></p>';
$solution .= '<p>Apache 1:<ul><li>try to add <code>cgi.fix_pathinfo=1</code> to php.ini</li></ul></p>';
$solution .= '<p>Apache 2:<ul><li>you must add <code>AcceptPathInfo on</code> to php.ini or .htaccess</li><li>try to add <code>cgi.fix_pathinfo=1</code> to php.ini</li></ul></p>';
$solution .= '<p>IIS:<ul><li>try to add <code>cgi.fix_pathinfo=1</code> to php.ini</li><li>do NOT enable AllowPathInfoForScriptMappings !!!</li><li>slasharguments may not work when using ISAPI and PHP 4.3.10 and older</li></ul></p>';
$solution .= '<p>Apache 1:<ul><li>try to add <code>cgi.fix_pathinfo=1</code> to php.ini</li></ul></p>';
$solution .= '<p>Apache 2:<ul><li>you must add <code>AcceptPathInfo on</code> to php.ini or .htaccess</li><li>try to add <code>cgi.fix_pathinfo=1</code> to php.ini</li></ul></p>';
}
return $solution;
}
@@ -463,13 +482,13 @@ class problem_000010 extends problem_base {
function status() {
global $CFG;
$handle = @fopen($CFG->wwwroot.'/file.php?file=/testslasharguments', "r");
$contents = trim(@fread($handle, 7));
$contents = @trim(fread($handle, 10));
@fclose($handle);
if ($contents != 'test -1') {
return -1;
}
$handle = @fopen($CFG->wwwroot.'/file.php/testslasharguments', "r");
$contents = trim(@fread($handle, 6));
$contents = trim(@fread($handle, 10));
@fclose($handle);
switch ($contents) {
case 'test 1': return 1;
@@ -500,7 +519,7 @@ class problem_000011 extends problem_base {
}
function solution() {
global $CFG;
if (!empty($resetsesserrorcounter)) {
if (optional_param('resetsesserrorcounter', 0, PARAM_BOOL)) {
if (get_field('config', 'name', 'name', 'session_error_counter')) {
delete_records('config', 'name', 'session_error_counter');
}
@@ -536,6 +555,7 @@ class problem_00000x extends problem_base {
TODO:
session.save_path -- it doesn't really matter because we are already IN a session, right?
detect unsupported characters in $CFG->wwwroot - see bug Bug #6091 - relative vs absolute path during backup/restore process
*/
+314 -223
View File
@@ -1,31 +1,45 @@
<?php // $Id$
/// Check that config.php exists, if not then call the install script
if (!file_exists("../config.php")) {
if (!file_exists('../config.php')) {
header('Location: ../install.php');
die;
}
require_once("../config.php");
include_once("$CFG->dirroot/lib/adminlib.php"); // Contains various admin-only functions
$id = optional_param('id', '', PARAM_ALPHANUM);
$confirmupgrade = optional_param('confirmupgrade','');
/// Check that PHP is of a sufficient version
if (!check_php_version("4.1.0")) {
$version = phpversion();
print_heading("Sorry, Moodle requires PHP 4.1.0 or later (currently using version $version)");
/// Moved here because older versions do not allow while(@ob_end_clean());
if (version_compare(phpversion(), "4.3.0") < 0) {
$phpversion = phpversion();
echo "Sorry, Moodle requires PHP 4.3.0 or later (currently using version $phpversion)";
die;
}
/// Turn off time limits and try to flush everything all the time, sometimes upgrades can be slow.
@set_time_limit(0);
@ob_implicit_flush(true);
while(@ob_end_clean()); // ob_end_flush prevents sending of headers
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php'); // Contains various admin-only functions
require_once($CFG->libdir.'/ddllib.php'); // Install/upgrade related db functions
$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);
/// check upgrade status first
if ($ignoreupgradewarning and !empty($_SESSION['upgraderunning'])) {
$_SESSION['upgraderunning'] = 0;
}
upgrade_check_running("Upgrade already running in this session, please wait!<br />Click on the exclamation marks to ignore this warning (<a href=\"index.php?ignoreupgradewarning=1\">!!!</a>).", 10);
/// Check some PHP server settings
$documentationlink = "please read the <a href=\"../doc/?frame=install.html&amp;sub=webserver\">install documentation</a>";
$documentationlink = '<a href="http://docs.moodle.org/en/Installation">Installation docs</a>';
if (ini_get_bool('session.auto_start')) {
error("The PHP server variable 'session.auto_start' should be Off - $documentationlink");
@@ -39,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
@@ -70,13 +91,6 @@
$CFG->version = "";
}
/// Turn off time limits and try to flush everything all the time, sometimes upgrades can be slow.
@set_time_limit(0);
@ob_implicit_flush(true);
@ob_end_flush();
/// Check if the main tables have been installed yet or not.
if (! $tables = $db->Metatables() ) { // No tables yet at all.
@@ -86,7 +100,7 @@
$maintables = true;
$mtables = array("config", "course", "course_categories", "course_modules",
"course_sections", "log", "log_display", "modules",
"user", "user_admins", "user_students", "user_teachers");
"user");
foreach ($mtables as $mtable) {
if (!in_array($CFG->prefix.$mtable, $tables)) {
$maintables = false;
@@ -95,37 +109,80 @@
}
}
$linktoscrolltoerrors = '<script type="text/javascript" src="' . $CFG->wwwroot . '/lib/scroll_to_errors.js"></script>';
if (! $maintables) {
/// hide errors from headers in case debug enabled in config.php
$origdebug = $CFG->debug;
$CFG->debug = DEBUG_MINIMAL;
error_reporting($CFG->debug);
if (empty($agreelicence)) {
$strlicense = get_string("license");
print_header($strlicense, $strlicense, $strlicense, "", "", false, "&nbsp;", "&nbsp;");
print_heading("<a href=\"http://moodle.org\">Moodle</a> - Modular Object-Oriented Dynamic Learning Environment");
print_heading(get_string("copyrightnotice"));
print_simple_box_start("center");
print_simple_box_start('center');
echo text_to_html(get_string("gpl"));
print_simple_box_end();
echo "<br />";
notice_yesno(get_string("doyouagree"), "index.php?agreelicence=true",
"http://moodle.org/doc/?frame=licence.html");
"http://docs.moodle.org/en/License");
exit;
}
$strdatabasesetup = get_string("databasesetup");
$strdatabasesuccess = get_string("databasesuccess");
print_header($strdatabasesetup, $strdatabasesetup, $strdatabasesetup, "", "", false, "&nbsp;", "&nbsp;");
if (file_exists("$CFG->libdir/db/$CFG->dbtype.sql")) {
$db->debug = true;
if (modify_database("$CFG->libdir/db/$CFG->dbtype.sql")) {
$db->debug = false;
notify($strdatabasesuccess, "green");
} else {
$db->debug = false;
error("Error: Main databases NOT set up successfully");
}
print_header($strdatabasesetup, $strdatabasesetup, $strdatabasesetup,
"", $linktoscrolltoerrors, false, "&nbsp;", "&nbsp;");
/// return to original debugging level
$CFG->debug = $origdebug;
error_reporting($CFG->debug);
upgrade_log_start();
$db->debug = true;
/// 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
} else if (file_exists("$CFG->libdir/db/$CFG->dbtype.sql")) {
$status = modify_database("$CFG->libdir/db/$CFG->dbtype.sql"); //Old method
} else {
error("Error: Your database ($CFG->dbtype) is not yet fully supported by Moodle. See the lib/db directory.");
error("Error: Your database ($CFG->dbtype) is not yet fully supported by Moodle or install.xml is not present. See the lib/db directory.");
}
print_continue("index.php");
/// Continue with the instalation
$db->debug = false;
if ($status) {
// Install the roles system.
moodle_install_roles();
set_config('statsrolesupgraded',time());
// Write default settings unconditionally (i.e. even if a setting is already set, overwrite it)
// (this should only have any effect during initial install).
$adminroot = admin_get_root();
$adminroot->prune('backups'); // backup settings table not created yet
apply_default_settings($adminroot);
/// This is used to handle any settings that must exist in $CFG but which do not exist in
/// admin_get_root()/$ADMIN as admin_setting objects (there are some exceptions).
apply_default_exception_settings(array('alternateloginurl' => '',
'auth' => 'email',
'auth_pop3mailbox' => 'INBOX',
'changepassword' => '',
'enrol' => 'manual',
'enrol_plugins_enabled' => 'manual',
'guestloginbutton' => 1,
'style' => 'default',
'template' => 'default',
'theme' => 'standardwhite'));
notify($strdatabasesuccess, "green");
} else {
error("Error: Main databases NOT set up successfully");
}
print_continue('index.php');
die;
}
@@ -133,8 +190,19 @@
/// Check version of Moodle code on disk compared with database
/// and upgrade if possible.
include_once("$CFG->dirroot/version.php"); # defines $version
include_once("$CFG->dirroot/lib/db/$CFG->dbtype.php"); # defines upgrades
if ( is_readable("$CFG->dirroot/version.php")) {
include_once("$CFG->dirroot/version.php"); # defines $version
}
if (!$version) {
error('Main version.php was not readable or specified');# without version, stop
}
if (file_exists("$CFG->dirroot/lib/db/$CFG->dbtype.php")) {
include_once("$CFG->dirroot/lib/db/$CFG->dbtype.php"); # defines old upgrades
}
if (file_exists("$CFG->dirroot/lib/db/upgrade.php")) {
include_once("$CFG->dirroot/lib/db/upgrade.php"); # defines new upgrades
}
$stradministration = get_string("administration");
@@ -145,136 +213,213 @@
$a->newversion = "$release ($version)";
$strdatabasechecking = get_string("databasechecking", "", $a);
// hide errors from headers in case debug is enabled
$origdebug = $CFG->debug;
$CFG->debug = DEBUG_MINIMAL;
error_reporting($CFG->debug);
// logout in case we are upgrading from pre 1.7 version - prevention of weird session problems
if ($CFG->version < 2006050600) {
require_logout();
}
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,
"", "", false, "&nbsp;", "&nbsp;");
"", $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;
if (main_upgrade($CFG->version)) {
$db->debug=false;
/// Launch the old main upgrade (if exists)
$status = true;
if (function_exists('main_upgrade')) {
$status = main_upgrade($CFG->version);
}
/// If succesful and exists launch the new main upgrade (XMLDB), called xmldb_main_upgrade
if ($status && function_exists('xmldb_main_upgrade')) {
$status = xmldb_main_upgrade($CFG->version);
}
$db->debug=false;
/// If successful, continue upgrading roles and setting everything properly
if ($status) {
if (empty($CFG->rolesactive)) {
// Upgrade to the roles system.
moodle_install_roles();
set_config('rolesactive', 1);
} else if (!update_capabilities()) {
error('Had trouble upgrading the core capabilities for the Roles System');
}
require_once($CFG->libdir.'/statslib.php');
if (!stats_upgrade_for_roles_wrapper()) {
notify('Couldn\'t upgrade the stats tables to use the new roles system');
}
if (set_config("version", $version)) {
remove_dir($CFG->dataroot . '/cache', true); // flush cache
notify($strdatabasesuccess, "green");
print_continue("index.php");
print_continue("upgradesettings.php");
exit;
} else {
notify("Upgrade failed! (Could not update version in config table)");
}
/// Main upgrade not success
} else {
$db->debug=false;
notify("Upgrade failed! See /version.php");
}
upgrade_log_finish();
}
} else if ($version < $CFG->version) {
upgrade_log_start();
notify("WARNING!!! The code you are using is OLDER than the version that made these databases!");
upgrade_log_finish();
}
} else {
$strcurrentversion = get_string("currentversion");
print_header($strcurrentversion, $stradministration, $strcurrentversion,
"", "", false, "&nbsp;", "&nbsp;");
if (set_config("version", $version)) {
print_heading("Moodle $release ($version)");
print_continue("index.php");
die;
} else {
$db->debug=true;
if (main_upgrade(0)) {
print_continue("index.php");
} else {
error("A problem occurred inserting current version into databases");
}
$db->debug=false;
if (!set_config("version", $version)) {
error("A problem occurred inserting current version into databases");
}
}
/// 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!!");
}
if (!empty($CFG->unicodedb)) {
$defaultlang = 'en_utf8';
} else {
$defaultlang = 'en';
}
print_continue("index.php");
print_simple_box_start("CENTER");
if (file_exists("$CFG->dataroot/lang/$defaultlang/docs/release.html")) {
include("$CFG->dataroot/lang/$defaultlang/docs/release.html");
} else if (file_exists("$CFG->dirroot/lang/$defaultlang/docs/release.html")) {
include("$CFG->dirroot/lang/$defaultlang/docs/release.html");
}
print_simple_box_end();
print_continue("index.php");
exit;
}
/// Insert default values for any important configuration variables
include_once("$CFG->dirroot/lib/defaults.php");
foreach ($defaults as $name => $value) {
if (!isset($CFG->$name)) {
$CFG->$name = $value;
set_config($name, $value);
$configchange = true;
error("ERROR: Could not update release version in database!!");
}
}
/// If any new configurations were found then send to the config page to check
if (!empty($configchange)) {
redirect("config.php");
}
/// Find and check all main modules and load them up or upgrade them if necessary
/// first old *.php update and then the new upgrade.php script
upgrade_activity_modules("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
/// Check all questiontype plugins and upgrade if necessary
/// first old *.php update and then the new upgrade.php script
/// It is important that this is done AFTER the quiz module has been upgraded
upgrade_plugins('qtype', 'question/type', "$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
/// Upgrade backup/restore system if necessary
/// first old *.php update and then the new upgrade.php script
require_once("$CFG->dirroot/backup/lib.php");
upgrade_backup_db("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
/// Upgrade blocks system if necessary
/// first old *.php update and then the new upgrade.php script
require_once("$CFG->dirroot/lib/blocklib.php");
upgrade_blocks_db("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
/// Check all blocks and load (or upgrade them if necessary)
/// first old *.php update and then the new upgrade.php script
upgrade_blocks_plugins("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
/// Check all enrolment plugins and upgrade if necessary
upgrade_enrol_plugins("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
/// first old *.php update and then the new upgrade.php script
upgrade_plugins('enrol', 'enrol', "$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
/// Check for local database customisations
/// first old *.php update and then the new upgrade.php script
require_once("$CFG->dirroot/lib/locallib.php");
upgrade_local_db("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
/// just make sure upgrade logging is properly terminated
upgrade_log_finish();
/// Set up the overall site name etc.
/// Set up the blank site - to be customized later at the end of install.
if (! $site = get_site()) {
redirect("site.php");
// We are about to create the site "course"
require_once($CFG->libdir.'/blocklib.php');
$newsite = new Object();
$newsite->fullname = "";
$newsite->shortname = "";
$newsite->summary = "";
$newsite->newsitems = 3;
$newsite->numsections = 0;
$newsite->category = 0;
$newsite->format = 'site'; // Only for this course
$newsite->teacher = get_string("defaultcourseteacher");
$newsite->teachers = get_string("defaultcourseteachers");
$newsite->student = get_string("defaultcoursestudent");
$newsite->students = get_string("defaultcoursestudents");
$newsite->timemodified = time();
if ($newid = insert_record('course', $newsite)) {
// Site created, add blocks for it
$page = page_create_object(PAGE_COURSE_VIEW, $newid);
blocks_repopulate_page($page); // Return value not checked because you can always edit later
$cat = new Object();
$cat->name = get_string('miscellaneous');
if (insert_record('course_categories', $cat)) {
redirect('index.php');
} else {
error("Serious Error! Could not set up a default course category!");
}
} else {
error("Serious Error! Could not set up the site!");
}
}
// initialise default blocks on admin and site page if needed
if (empty($CFG->adminblocks_initialised)) {
require_once("$CFG->dirroot/$CFG->admin/pagelib.php");
require_once($CFG->libdir.'/blocklib.php');
page_map_class(PAGE_ADMIN, 'page_admin');
$page = page_create_object(PAGE_ADMIN, 0); // there must be some id number
blocks_repopulate_page($page);
//add admin_tree block to site if not already present
if ($admintree = get_record('block', 'name', 'admin_tree')) {
$page = page_create_object(PAGE_COURSE_VIEW, SITEID);
blocks_execute_action($page, blocks_get_by_page($page), 'add', (int)$admintree->id, false, false);
if ($admintreeinstance = get_record('block_instance', 'pagetype', $page->type, 'pageid', SITEID, 'blockid', $admintree->id)) {
blocks_execute_action($page, blocks_get_by_page($page), 'moveleft', $admintreeinstance, false, false);
}
}
set_config('adminblocks_initialised', 1);
}
/// 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.
@@ -295,16 +440,22 @@
}
}
/// Set up the admin user
if (! record_exists("user_admins")) { // No admin user yet
redirect("user.php");
if (empty($CFG->rolesactive)) {
redirect('user.php');
}
/// Check for valid admin user
require_login();
if (!isadmin()) {
error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/index.php");
$context = get_context_instance(CONTEXT_SYSTEM, SITEID);
require_capability('moodle/site:config', $context);
/// check that site is properly customized
if (empty($site->shortname) or empty($site->shortname)) {
redirect('settings.php?section=frontpage&amp;return=site');
}
/// Check if we are returning from moodle.org registration and if so, we mark that fact to remove reminders
@@ -315,157 +466,97 @@
}
}
/// At this point everything is set up and the user is an admin, so print menu
/// Everything should now be set up, and the user is an admin
$stradministration = get_string("administration");
print_header("$site->shortname: $stradministration","$site->fullname", "$stradministration");
print_simple_box_start('center', '100%', '', 20);
print_heading($stradministration);
/// Print default admin page with notifications.
if (!empty($CFG->upgrade)) { // Print notice about extra upgrading that needs to be done
$adminroot = admin_get_root();
admin_externalpage_setup('adminnotifications', $adminroot);
admin_externalpage_print_header($adminroot);
/// Deprecated database! Warning!!
if (!empty($CFG->migrated_to_new_db)) {
print_simple_box_start('center','60%');
print_string('dbmigrationdeprecateddb','admin');
print_simple_box_end();
}
/// Check for any special upgrades that might need to be run
if (!empty($CFG->upgrade)) {
print_simple_box(get_string("upgrade$CFG->upgrade", "admin",
"$CFG->wwwroot/$CFG->admin/upgrade$CFG->upgrade.php"), "center");
"$CFG->wwwroot/$CFG->admin/upgrade$CFG->upgrade.php"), "center", '60%');
print_spacer(10,10);
}
if (ini_get_bool('register_globals') && !ini_get_bool('magic_quotes_gpc')) {
print_simple_box(get_string('globalsquoteswarning', 'admin'), 'center');
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) {
print_simple_box(get_string('cronwarning', 'admin') , 'center');
$strinstallation = get_string('installation', 'install');
$helpbutton = helpbutton('install', $strinstallation, 'moodle', true, false, '', true);
print_simple_box(get_string('cronwarning', 'admin')."&nbsp;".$helpbutton, 'center', '60%');
}
/// Alert if we are currently in maintenance mode
if (file_exists($CFG->dataroot.'/1/maintenance.html')) {
print_simple_box(get_string('sitemaintenancewarning', 'admin') , 'center');
print_simple_box(get_string('sitemaintenancewarning', 'admin') , 'center', '60%');
}
/// Alert to display the utf-8 migration button (if !unicode yet and DB is MySQL or PG)
if (empty($CFG->unicodedb) && in_array($CFG->dbtype, array('mysql', 'postgres7'))) {
print_simple_box(get_string('unicodeupgradenotice', 'admin') , 'center', '60%');
}
/// Print slightly annoying registration button every six months ;-)
/// You can set the "registered" variable to something far in the future
/// You can set the "registered" variable to something far in the future
/// if you really want to prevent this. eg 9999999999
if (!isset($CFG->registered) || $CFG->registered < (time() - 3600*24*30*6)) {
$options = array();
$options['sesskey'] = $USER->sesskey;
print_simple_box_start('center');
print_simple_box_start('center','60%');
echo '<div align="center">';
print_string('pleaseregister', 'admin');
print_single_button('register.php', $options, get_string('registration'));
echo '</div>';
print_simple_box_end();
$registrationbuttonshown = true;
}
$table->tablealign = "right";
$table->align = array ("right", "left");
$table->wrap = array ("nowrap", "nowrap");
$table->cellpadding = 5;
$table->cellspacing = 0;
$table->width = "40%";
$configdata = '<div class="adminlink"><a href="config.php">'.get_string('configvariables', 'admin').
'</a> - <span class="explanation">'.get_string('adminhelpconfigvariables').'</span></div>';
$configdata .= '<div class="adminlink"><a href="site.php">'.get_string('sitesettings').
'</a> - <span class="explanation">'.get_string('adminhelpsitesettings').'</span></div>';
$configdata .= '<div class="adminlink"><a href="../theme/index.php">'.get_string('themes').
'</a> - <span class="explanation">'.get_string('adminhelpthemes').'</span></div>';
$configdata .= '<div class="adminlink"><a href="lang.php">'.get_string('language').
'</a> - <span class="explanation">'.get_string('adminhelplanguage').'</span></div>';
$configdata .= '<div class="adminlink"><a href="modules.php">'.get_string('managemodules').
'</a> - <span class="explanation">'.get_string('adminhelpmanagemodules').'</span></div>';
$configdata .= '<div class="adminlink"><a href="blocks.php">'.get_string('manageblocks').
'</a> - <span class="explanation">'.get_string('adminhelpmanageblocks').'</span></div>';
$configdata .= '<div class="adminlink"><a href="filters.php">'.get_string('managefilters').
'</a> - <span class="explanation">'.get_string('adminhelpmanagefilters').'</span></div>';
if (!isset($CFG->disablescheduledbackups)) {
$configdata .= '<div class="adminlink"><a href="backup.php">'.get_string('backup').
'</a> - <span class="explanation">'.get_string('adminhelpbackup').'</span></div>';
}
$configdata .= '<div class="adminlink"><a href="editor.php">'.get_string('editorsettings').
'</a> - <span class="explanation">'.get_string('adminhelpeditorsettings').'</span></div>';
$configdata .= '<div class="adminlink"><a href="calendar.php">'.get_string('calendarsettings', 'admin').
'</a> - <span class="explanation">'.get_string('helpcalendarsettings', 'admin').'</span></div>';
$configdata .= '<div class="adminlink"><a href="maintenance.php">'.get_string('sitemaintenancemode', 'admin').
'</a> - <span class="explanation">'.get_string('helpsitemaintenance', 'admin').'</span></div>';
$table->data[] = array('<strong><a href="configure.php">'.get_string('configuration').'</a></strong>', $configdata);
$userdata = '<div class="adminlink"><a href="auth.php?sesskey='.$USER->sesskey.'">'.get_string("authentication").
'</a> - <span class="explanation">'.get_string('adminhelpauthentication').'</span></div>';
$userdata .= '<div class="adminlink"><a href="user.php">'.get_string('edituser').
'</a> - <span class="explanation">'.get_string('adminhelpedituser').'</span></div>';
$userdata .= '<div class="adminlink"><a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/user.php?newuser=true&amp;sesskey='.$USER->sesskey.'">'.
get_string('addnewuser').'</a> - <span class="explanation">'.get_string('adminhelpaddnewuser').'</span></div>';
$userdata .= '<div class="adminlink"><a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/uploaduser.php?sesskey='.$USER->sesskey.'">'.
get_string('uploadusers').'</a> - <span class="explanation">'.get_string('adminhelpuploadusers').'</span></div>';
$userdata .= '<hr /><div class="adminlink"><a href="enrol.php?sesskey='.$USER->sesskey.'">'.get_string('enrolments').
'</a> - <span class="explanation">'.get_string('adminhelpenrolments').'</span></div>';
$userdata .= '<div class="adminlink"><a href="../course/index.php?edit=off&amp;sesskey='.$USER->sesskey.'">'.
get_string('assignstudents').'</a> - <span class="explanation">'.get_string('adminhelpassignstudents').'</span></div>';
$userdata .= '<div class="adminlink"><a href="../course/index.php?edit=on&amp;sesskey='.$USER->sesskey.'">'.
get_string('assignteachers').'</a> - <span class="explanation">'.get_string('adminhelpassignteachers').
' <img src="../pix/t/user.gif" height="11" width="11" alt="" /></span></div>';
$userdata .= '<div class="adminlink"><a href="creators.php?sesskey='.$USER->sesskey.'">'.get_string('assigncreators').
'</a> - <span class="explanation">'.get_string('adminhelpassigncreators').'</span></div>';
$userdata .= '<div class="adminlink"><a href="admin.php?sesskey='.$USER->sesskey.'">'.get_string('assignadmins').
'</a> - <span class="explanation">'.get_string('adminhelpassignadmins').'</span></div>';
$table->data[] = array('<strong><a href="users.php">'.get_string('users').'</a></strong>', $userdata);
$table->data[] = array('<strong><a href="../course/index.php?edit=on&amp;sesskey='.$USER->sesskey.'">'.get_string('courses').'</a></strong>',
'<div class="explanation">'.get_string('adminhelpcourses').'</div>');
$table->data[] = array('<strong><a href="../course/log.php?id='.$site->id.'">'.get_string('logs').'</a></strong>',
'<div class="explanation">'.get_string('adminhelplogs').'</div>');
$table->data[] = array('<strong><a href="../files/index.php?id='.$site->id.'">'.get_string('sitefiles').'</a></strong>',
'<div class="explanation">'.get_string('adminhelpsitefiles').'</div>');
$table->data[] = array('<strong><a href="stickyblocks.php">'.get_string('stickyblocks','admin').'</a></strong>',
'<div class="explanation">'.get_string('adminhelpstickyblocks').'</div>');
if (file_exists("$CFG->dirroot/$CFG->admin/$CFG->dbtype")) {
$table->data[] = array("<strong><a href=\"$CFG->dbtype/frame.php\">".get_string('managedatabase').'</a></strong>',
get_string('adminhelpmanagedatabase'));
}
if (!empty($CFG->enablestats)) {
$table->data[] = array('<strong><a href="reports.php">'.get_string('reports').'</a></strong>',
'<div class="explanation">'.get_string('adminhelpreports').'</div>');
}
$table->data[] = array('<strong><a href="environment.php">'.get_string('environment','admin').'</a></strong>',
'<div class="explanation">'.get_string('adminhelpenvironment').'</div>');
print_table($table);
//////////////////////////////////////////////////////////////////////////////////////////////////
//// IT IS ILLEGAL AND A VIOLATION OF THE GPL TO REMOVE OR MODIFY THE COPYRIGHT NOTICE BELOW ////
//// IT IS ILLEGAL AND A VIOLATION OF THE GPL TO HIDE, REMOVE OR MODIFY THIS COPYRIGHT NOTICE ///
$copyrighttext = '<a href="http://moodle.org/">Moodle</a> '.
'<a href="../doc/?frame=release.html">'.$CFG->release.'</a> ('.$CFG->version.')<br />'.
'Copyright &copy; 1999-2006 Martin Dougiamas<br />'.
'<a href="../doc/?frame=licence.html">GNU Public License</a>';
'<a href="http://docs.moodle.org/en/Release">'.$CFG->release.'</a> ('.$CFG->version.')<br />'.
'Copyright &copy; 1999 onwards, Martin Dougiamas<br />'.
'and <a href="http://docs.moodle.org/en/Credits">many other contributors</a>.<br />'.
'<a href="http://docs.moodle.org/en/License">GNU Public License</a>';
echo '<p class="copyright">'.$copyrighttext.'</p>';
//////////////////////////////////////////////////////////////////////////////////////////////////
echo '<table width="100%" cellspacing="0"><tr>';
echo '<td align="center" width="33%">';
print_single_button($CFG->wwwroot.'/doc/', NULL, get_string('documentation'));
echo '</td>';
if (empty($registrationbuttonshown)) {
echo '<div align="center">';
$options = array();
$options['sesskey'] = $USER->sesskey;
print_single_button('register.php', $options, get_string('registration'));
echo '</div>';
}
echo '<td align="center" width="33%">';
print_single_button('phpinfo.php', NULL, get_string('phpinfo'));
echo '</td>';
admin_externalpage_print_footer($adminroot);
echo '<td align="center" width="33%">';
$options = array();
$options['sesskey'] = $USER->sesskey;
print_single_button('register.php', $options, get_string('registration'));
echo '</td></tr></table>';
print_simple_box_end();
print_footer($site);
?>
+24 -11
View File
@@ -1,30 +1,43 @@
<?php
include('../config.php');
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('toinodb', $adminroot);
$confirm = optional_param('confirm', 0, PARAM_BOOL);
require_login();
if (!isadmin()) {
error('Admin only');
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
admin_externalpage_print_header($adminroot);
print_heading('Convert all MySQL tables from MYISAM to InnoDB');
if ($CFG->dbtype != 'mysql') {
notice('This function is for MySQL databases only!', 'index.php');
}
print_header("Convert all tables from MYISAM to InnoDB", "Convert all tables from MYISAM to InnoDB",
"Convert all tables from MYISAM to InnoDB");
if (data_submitted() and $confirm and confirm_sesskey()) {
if (!empty($confirm) and confirm_sesskey()) {
print_heading("Please be patient and wait for this to complete...");
notify('Please be patient and wait for this to complete...', 'notifysuccess');
if ($tables = $db->MetaTables()) {
$db->debug = true;
foreach ($tables as $table) {
execute_sql("ALTER TABLE $table TYPE=INNODB; ");
}
$db->debug = false;
}
notify('... done.', 'notifysuccess');
print_continue('index.php');
admin_externalpage_print_footer($adminroot);
} else {
notice_yesno("Are you sure you want convert all your tables to the InnoDB format?",
"innodb.php?confirm=yes&sesskey=".sesskey(), "index.php");
$optionsyes = array('confirm'=>'1', 'sesskey'=>sesskey());
notice_yesno('Are you sure you want convert all your tables to the InnoDB format?',
'innodb.php', 'index.php', $optionsyes, NULL, 'post', 'get');
admin_externalpage_print_footer($adminroot);
}
?>
+437 -156
View File
@@ -1,31 +1,96 @@
<?PHP // $Id$
/**
* Display the admin/language menu and process strings translation.
*
* 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
*
* 2006/05/30 mudrd8mz
* Merged with version by Mitsuhiro Yoshida - display icon links instead of text links
* (I have changed the position of arrow icons to not to be so close each other)
*
* 2006/05/19 mudrd8mz
* A lot of changes to support translation of *_utf8_local langugage packs. Needs testing
*
* 2006/05/16 mudrd8mz
* 1) LANG_DEFAULT_FILE can be now set. moodle.php used to be opened automatically.
* As it was (and still is) one of the biggest files it usually took a long time to load the page
* even if you just want to choose the file to translate.
* 2) added links from "missing" to "compare" mode page
* 3) english strings are now key-sorted in "missing" mode
* 4) list of files with missing strings is now displayed at the top of "missing" page
*
* 2006/05/14 mudrd8mz Improvements of lang.php,v 1.65 2006/04/10 22:15:57 stronk7 Exp
* 1) "go to first missing string" link can be displayed (see LANG_DISPLAY_MISSING_LINKS)
* 2) "go to next missing" link can be displayed (see LANG_DISPLAY_MISSING_LINKS)
* 3) submit button may be repeated (see LANG_SUBMIT_REPEAT*)
* 4) added (empty) "summary" attribute for the <table>'s
* 5) added error_reporting(E_ALL ^ E_NOTICE); in "compare" mode (even in debug environment
* we know that missing keys are missing strings here, not bugs ;-)
*/
require_once("../config.php");
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('langedit', $adminroot);
$mode = optional_param('mode', '', PARAM_ALPHA);
$currentfile = optional_param('currentfile', 'moodle.php', PARAM_FILE);
define('LANG_SUBMIT_REPEAT', 1); // repeat displaying submit button?
define('LANG_SUBMIT_REPEAT_EVERY', 20); // if so, after how many lines?
define('LANG_DISPLAY_MISSING_LINKS', 1); // display "go to first/next missing string" links?
define('LANG_DEFAULT_FILE', ''); // default file to translate. Empty allowed
define('LANG_LINK_MISSING_STRINGS', 1); // create links from "missing" page to "compare" page?
define('LANG_DEFAULT_USELOCAL', 0); // should *_utf8_local be used by default?
require_login();
$mode = optional_param('mode', '', PARAM_ALPHA);
$currentfile = optional_param('currentfile', LANG_DEFAULT_FILE, PARAM_FILE);
$uselocal = optional_param('uselocal', -1, PARAM_INT);
if (!isadmin()) {
error("You need to be admin to edit this page");
}
if (! $site = get_site()) {
error("Site not defined!");
if ($uselocal == -1) {
if (isset($SESSION->langtranslateintolocal)) {
$uselocal = $SESSION->langtranslateintolocal;
} else {
$uselocal = LANG_DEFAULT_USELOCAL;
}
} else {
$SESSION->langtranslateintolocal = $uselocal;
}
$stradministration = get_string("administration");
$strconfiguration = get_string("configuration");
$strlanguage = get_string("language");
$strcurrentlanguage = get_string("currentlanguage");
$strmissingstrings = get_string("missingstrings");
$streditstrings = get_string("editstrings", 'admin');
$stredithelpdocs = get_string("edithelpdocs", 'admin');
$strthislanguage = get_string("thislanguage");
$strgotofirst = get_string('gotofirstmissing','admin');
$strfilestoredin = get_string('langstorein', 'admin');
$strfilestoredinhelp = get_string('langstoreinhelp', 'admin');
$strswitchlangdirbtn = get_string('langstoreswitch', 'admin');
$strchoosefiletoedit = get_string('langchoosefile', 'admin');
$streditennotallowed = get_string('langnoeditenglish', 'admin');
$strfilecreated = get_string('langfilecreated', 'admin');
// FIXME / TODO
// remove following lines after adding string into proper english lang pack
$strgotofirst = 'go to first missing string';
$strfilestoredin = 'Save file into folder :';
$strfilestoredinhelp = 'Where the file will be stored';
$strswitchlangdirbtn = 'switch';
$strchoosefiletoedit = 'Choose file to edit from the box above';
$streditennotallowed = 'Language en_utf8 cannot be edited with this page - switch to local';
$strfilecreated = 'New file created';
$currentlang = current_language();
switch ($mode) {
case "missing":
// Missing array keys are not bugs here but missing strings
error_reporting(E_ALL ^ E_NOTICE);
$navigation = "<a href=\"lang.php\">$strlanguage</a> -> $strmissingstrings";
$title = $strmissingstrings;
$button = '<form target="'.$CFG->framename.'" method="get" action="'.$CFG->wwwroot.'/'.$CFG->admin.'/lang.php">'.
@@ -46,94 +111,125 @@
break;
}
$currentlang = current_language();
print_header("$site->shortname: $title", "$site->fullname",
"<a href=\"index.php\">$stradministration</a> -> ".
"<a href=\"configure.php\">$strconfiguration</a> -> $navigation",
'', '', true, $button);
admin_externalpage_print_header($adminroot);
if (!$mode) {
print_simple_box_start('center','80%');
echo '<table align="center" width="100%"><tr><td width="50%" align="center">';
print_string('managelang','admin');
echo '</td><td align="center" width="50%">';
echo '<div align="center">';
print_string('editlang','admin');
echo '</td></tr><tr><td>';
print_string('lang16notify','admin');
echo '<p /><a href="langimport.php">'.get_string('langimport','admin').'</a>';
echo '</td><td>';
echo '<br />';
$currlang = current_language();
$langs = get_list_of_languages();
echo "<table align=\"center\"><tr><td align=\"right\">";
echo "<b>$strcurrentlanguage:</b>";
echo "</td><td>";
echo '<br />';
echo popup_form ("$CFG->wwwroot/$CFG->admin/lang.php?lang=", $langs, "chooselang", $currlang, "", "", "", true);
echo '</td></tr><tr><td colspan="2">';
$options["lang"] = $currentlang;
//print_single_button("http://moodle.org/download/lang/", $options, get_string("latestlanguagepack"));
echo "</td></tr></table>";
print_heading("<a href=\"lang.php?mode=missing\">$strmissingstrings</a>");
print_heading("<a href=\"lang.php?mode=compare\">$streditstrings</a>");
print_heading("<a href=\"langdoc.php\">$stredithelpdocs</a>");
echo '</td></tr></table>';
echo '</div>';
print_simple_box_end();
print_footer();
admin_externalpage_print_footer($adminroot);
exit;
}
// Get a list of all the root files in the English directory
$langdir = "$CFG->dirroot/lang/$currentlang";
$enlangdir = "$CFG->dirroot/lang/en";
$langbase = $CFG->dataroot . '/lang';
$enlangdir = "$CFG->dirroot/lang/en_utf8";
if ($currentlang == 'en_utf8') {
$langdir = $enlangdir;
} else {
$langdir = "$langbase/$currentlang";
}
$locallangdir = "$langbase/{$currentlang}_local";
if (! $stringfiles = get_directory_list($enlangdir, "", false)) {
error("Could not find English language pack!");
}
foreach ($stringfiles as $key => $file) {
if (substr($file, -4) != ".php") {
if (substr($file, -4) != ".php") { //Avoid non php files to be showed
unset($stringfiles[$key]);
}
if ($file == "langconfig.php") { //Avoid langconfig.php to be showed
unset($stringfiles[$key]);
}
}
if ($mode == "missing") {
if (!file_exists($langdir)) {
error ('to edit this language pack, you need to put it in '.$CFG->dataroot.'/lang');
}
// Following variables store the HTML output to be echo-ed
$m = '';
$o = '';
// For each file, check that a counterpart exists, then check all the strings
foreach ($stringfiles as $file) {
unset($string);
include("$enlangdir/$file");
$enstring = $string;
ksort($enstring);
unset($string);
if (file_exists("$langdir/$file")) {
include("$langdir/$file");
$fileismissing = 0;
} else {
notify(get_string("filemissing", "", "$langdir/$file"));
$fileismissing = 1;
// notify(get_string("filemissing", "", "$langdir/$file"));
$o .= '<div class="notifyproblem" align="center">'.get_string("filemissing", "", "$langdir/$file").'</div><br />';
$string = array();
}
$missingcounter = 0;
$first = true;
foreach ($enstring as $key => $value) {
if (empty($string[$key])) {
if (empty($string[$key]) and $string[$key] != "0") { //bug fix 4735 mits
$value = htmlspecialchars($value);
$value = str_replace("$"."a", "\\$"."a", $value);
$value = str_replace("%%","%",$value);
if ($first) {
echo "<p><b>".get_string("stringsnotset","","$langdir/$file")."</b></p><pre>";
$m .= "<a href=\"lang.php?mode=missing#$file\">$file";
$m .= $fileismissing ? '*' : '';
$m .= '</a> &nbsp; ';
$o .= "<p><a name=\"$file\"></a><b>".get_string("stringsnotset","","$langdir/$file")."</b></p><pre>";
$first = false;
$somethingfound = true;
}
echo "$"."string['$key'] = \"$value\";<br />";
$missingcounter++;
if (LANG_LINK_MISSING_STRINGS) {
$missinglinkstart = "<a href=\"lang.php?mode=compare&amp;currentfile=$file#missing$missingcounter\">";
$missinglinkend = '</a>';
} else {
$missinglinkstart = '';
$missinglinkend = '';
}
$o .= "$"."string['".$missinglinkstart.$key.$missinglinkend."'] = \"$value\";<br />";
}
}
if (!$first) {
echo '</pre><hr />';
$o .= '</pre><hr />';
}
}
if (! $files = get_directory_list("$CFG->dirroot/lang/en/help", "CVS")) {
if ($m <> '') {
echo '<br />';
print_simple_box_start("center", "80%");
echo '<center><font size="2">';
echo $m;
echo '</font></center>';
print_simple_box_end();
}
echo $o;
if (! $files = get_directory_list("$CFG->dirroot/lang/en_utf8/help", "CVS")) {
error("Could not find English language help files!");
}
@@ -145,7 +241,7 @@
}
}
if (! $files = get_directory_list("$CFG->dirroot/lang/en/docs", "CVS")) {
if (! $files = get_directory_list("$CFG->dirroot/lang/en_utf8/docs", "CVS")) {
error("Could not find English language docs files!");
}
foreach ($files as $filekey => $file) { // check all the docs files.
@@ -163,19 +259,69 @@
}
} 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);
} else {
echo '<div class="notifysuccess" align="center">Created directory '.
$langdir .'</div>'."<br />\n";
}
}
if ($uselocal && !file_exists($locallangdir)) {
if (!lang_make_directory($locallangdir)) {
echo '<div class="notifyproblem" align="center">ERROR: Could not create directory '.
$locallangdir .'</div>'."<br />\n";
$uselocal = 0;
} else {
echo '<div class="notifysuccess" align="center">Created directory '.
$locallangdir .'</div>'."<br />\n";
}
}
if (isset($_POST['currentfile'])){ // Save a file
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
}
$newstrings = $_POST;
unset($newstrings['currentfile']);
if (lang_save_file($langdir, $currentfile, $newstrings)) {
notify(get_string("changessaved")." ($langdir/$currentfile)", "green");
} else {
error("Could not save the file '$currentfile'!", "lang.php?mode=compare&amp;currentfile=$currentfile");
$newstrings = array();
foreach ($_POST as $postkey => $postval) {
$stringkey = lang_file_string_key($postkey);
$newstrings[$stringkey] = $postval;
}
}
unset($newstrings['currentfile']);
if ($uselocal) {
include("$langdir/$currentfile");
if (isset($string)) {
$packstring = $string;
} else {
$packstring = array();
}
unset($string);
$saveinto = $locallangdir;
} else {
$packstring = array();
$saveinto = $langdir;
}
if (lang_save_file($saveinto, $currentfile, $newstrings, $uselocal, $packstring)) {
notify(get_string("changessaved")." ($saveinto/$currentfile)", "green");
} else {
error("Could not save the file '$saveinto/$currentfile'!", "lang.php?mode=compare&amp;currentfile=$currentfile");
}
unset($packstring);
}
print_heading_with_help($streditstrings, "langedit");
@@ -191,131 +337,213 @@
echo '</font></center>';
print_simple_box_end();
print_simple_box_start("center", "80%");
echo '<center>'.$strfilestoredin.' <strong>';
echo $uselocal ? "{$currentlang}_local" : $currentlang;
echo '</strong> ';
helpbutton('langswitchstorage', $strfilestoredinhelp, 'moodle');
print_heading("$currentfile", "center", 4);
if (!file_exists("$langdir/$currentfile")) {
if (!touch("$langdir/$currentfile")) {
echo "<p><font color=\"red\">".get_string("filemissing", "", "$langdir/$currentfile")."</font></p>";
continue;
echo '<form target="'.$CFG->framename.'" method="get" action="'.$CFG->wwwroot.'/'.$CFG->admin.'/lang.php">'.
'<input type="hidden" name="mode" value="compare" />'.
'<input type="hidden" name="currentfile" value="'.$currentfile.'" />'.
'<input type="hidden" name="uselocal" value="'.(1 - $uselocal % 2).'" />'.
'<input type="submit" value="'.$strswitchlangdirbtn.'" />'.
'</form></center>';
print_simple_box_end();
if ($currentfile <> '') {
$saveto = $uselocal ? $locallangdir : $langdir;
error_reporting(0);
if (!file_exists("$saveto/$currentfile")) {
if (!@touch("$saveto/$currentfile")) {
print_heading(get_string("filemissing", "", "$saveto/$currentfile"), "center", 4, "error");
} else {
print_heading($strfilecreated, "center", 4, "notifysuccess");
}
}
if ($currentlang == "en_utf8" && !$uselocal) {
$editable = false;
print_heading($streditennotallowed, 'center', 4);
} elseif ($f = fopen("$saveto/$currentfile","r+")) {
$editable = true;
fclose($f);
} else {
$editable = false;
echo "<p><font size=\"1\">".get_string("makeeditable", "", "$saveto/$currentfile")."</font></p>";
}
error_reporting($CFG->debug);
print_heading("$currentfile", "center", 4);
if (LANG_DISPLAY_MISSING_LINKS && $editable) {
print_heading('<a href="#missing1">'.$strgotofirst.'</a>', "center", 4);
}
}
error_reporting(0);
if ($f = fopen("$langdir/$currentfile","r+")) {
$editable = true;
fclose($f);
} else {
$editable = false;
echo "<p><font size=\"1\">".get_string("makeeditable", "", "$langdir/$currentfile")."</font></p>";
}
error_reporting(7);
unset($string);
include("$enlangdir/$currentfile");
$enstring = $string;
if ($currentlang != 'en' and $currentfile == 'moodle.php') {
$enstring['thislanguage'] = "<< TRANSLATORS: Specify the name of your language here. If possible use Unicode Numeric Character References >>";
$enstring['thischarset'] = "<< TRANSLATORS: Specify the character set of your language here. Note that all text created while this language is active will be stored using this character set, so don't change it once you have set it. Example: iso-8859-1 >>";
$enstring['thisdirection'] = "<< TRANSLATORS: This string specifies the direction of your text, either left-to-right or right-to-left. Insert either 'ltr' or 'rtl' here. >>";
$enstring['parentlanguage'] = "<< TRANSLATORS: If your language has a Parent Language that Moodle should use when strings are missing from your language pack, then specify the code for it here. If you leave this blank then English will be used. Example: nl >>";
}
ksort($enstring);
unset($string);
unset($string);
include("$enlangdir/$currentfile");
$enstring = $string;
if ($currentlang != 'en' and $currentfile == 'moodle.php') {
$enstring['thislanguage'] = "<< TRANSLATORS: Specify the name of your language here. If possible use Unicode Numeric Character References >>";
$enstring['thischarset'] = "<< TRANSLATORS: Specify the character set of your language here. Note that all text created while this language is active will be stored using this character set, so don't change it once you have set it. Example: iso-8859-1 >>";
$enstring['thisdirection'] = "<< TRANSLATORS: This string specifies the direction of your text, either left-to-right or right-to-left. Insert either 'ltr' or 'rtl' here. >>";
$enstring['parentlanguage'] = "<< TRANSLATORS: If your language has a Parent Language that Moodle should use when strings are missing from your language pack, then specify the code for it here. If you leave this blank then English will be used. Example: nl >>";
}
ksort($enstring);
unset($string);
include("$langdir/$currentfile");
if ($editable) {
echo "<form name=\"$currentfile\" action=\"lang.php\" method=\"post\">";
}
echo "<table width=\"100%\" cellpadding=\"2\" cellspacing=\"3\" border=\"0\" class=\"generalbox\">";
foreach ($enstring as $key => $envalue) {
$envalue = nl2br(htmlspecialchars($envalue));
$envalue = preg_replace('/(\$a\-\&gt;[a-zA-Z0-9]*|\$a)/', '<b>$0</b>', $envalue); // Make variables bold.
$envalue = str_replace("%%","%",$envalue);
$envalue = str_replace("\\","",$envalue); // Delete all slashes
echo "\n\n".'<tr>';
echo '<td dir="ltr" lang="en" width="20%" nowrap="nowrap" valign="top">'.$key.'</td>'."\n";
echo '<td dir="ltr" lang="en" width="40%" valign="top">'.$envalue.'</td>'."\n";
$value = $string[$key];
$value = str_replace("\r","",$value); // Bad character caused by Windows
$value = preg_replace("/\n{3,}/", "\n\n", $value); // Collapse runs of blank lines
$value = trim($value, "\n"); // Delete leading/trailing lines
$value = str_replace("\\","",$value); // Delete all slashes
$value = str_replace("%%","%",$value);
$value = str_replace("<","&lt;",$value);
$value = str_replace(">","&gt;",$value);
$value = str_replace('"',"&quot;",$value);
$cellcolour = $value ? '': 'class="highlight"';
@include("$locallangdir/$currentfile");
$localstring = isset($string) ? $string : array();
unset($string);
@include("$langdir/$currentfile");
if ($editable) {
echo '<td width="40%" '.$cellcolour.' valign="top">'."\n";
if (isset($string[$key])) {
$valuelen = strlen($value);
} else {
$valuelen = strlen($envalue);
}
$cols=50;
if (strstr($value, "\r") or strstr($value, "\n") or $valuelen > $cols) {
$rows = ceil($valuelen / $cols);
echo '<textarea name="stringXXX'.$key.'" cols="'.$cols.'" rows="'.$rows.'">'.$value.'</textarea>'."\n";
} else {
if ($valuelen) {
$cols = $valuelen + 2;
}
echo '<input type="text" name="stringXXX'.$key.'" value="'.$value.'" size="'.$cols.'" />';
}
echo '</td>';
} else {
echo '<td width="40%" bgcolor="'.$cellcolour.'" valign="top">'.$value.'</td>';
echo "<form name=\"$currentfile\" action=\"lang.php\" method=\"post\">";
}
}
if ($editable) {
echo '<tr><td colspan="2">&nbsp;<td><br />';
echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
echo ' <input type="hidden" name="currentfile" value="'.$currentfile.'" />';
echo ' <input type="hidden" name="mode" value="compare" />';
echo ' <input type="submit" name="update" value="'.get_string('savechanges').': '.$currentfile.'" />';
echo '</td></tr>';
}
echo '</table>';
echo '</form>';
echo "<table summary=\"\" width=\"100%\" cellpadding=\"2\" cellspacing=\"3\" border=\"0\" class=\"generalbox\">";
$linescounter = 0;
$missingcounter = 0;
foreach ($enstring as $key => $envalue) {
$linescounter++ ;
if (LANG_SUBMIT_REPEAT && $editable && $linescounter % LANG_SUBMIT_REPEAT_EVERY == 0) {
echo '<tr><td colspan="2">&nbsp;<td><br />';
echo ' <input type="submit" name="update" value="'.get_string('savechanges').': '.$currentfile.'" />';
echo '<br />&nbsp;</td></tr>';
}
$envalue = nl2br(htmlspecialchars($envalue));
$envalue = preg_replace('/(\$a\-\&gt;[a-zA-Z0-9]*|\$a)/', '<b>$0</b>', $envalue); // Make variables bold.
$envalue = str_replace("%%","%",$envalue);
$envalue = str_replace("\\","",$envalue); // Delete all slashes
echo "\n\n".'<tr>';
echo '<td dir="ltr" lang="en" width="20%" nowrap="nowrap" valign="top">'.$key.'</td>'."\n";
echo '<td dir="ltr" lang="en" width="40%" valign="top">'.$envalue.'</td>'."\n";
// Missing array keys are not bugs here but missing strings
error_reporting(E_ALL ^ E_NOTICE);
if ($uselocal) {
$value = lang_fix_value_from_file($localstring[$key]);
$value2 = lang_fix_value_from_file($string[$key]);
if ($value == '') {
$value = $value2;
}
} else {
$value = lang_fix_value_from_file($string[$key]);
$value2 = lang_fix_value_from_file($localstring[$key]);
}
error_reporting($CFG->debug);
// Color highlighting:
// red #ef6868 - translation missing in both system and local pack
// yellow #feff7f - translation missing in system pack but is translated in local
// green #AAFFAA - translation present in both system and local but is different
if (!$value) {
if (!$value2) {
$cellcolour = 'style="background-color: #ef6868"'; // TODO: replace by CSS class
} else {
$cellcolour = 'style="background-color: #feff7f"'; // TODO: replace by CSS class
}
$missingcounter++;
if (LANG_DISPLAY_MISSING_LINKS) {
$missingtarget = '<a name="missing'.$missingcounter.'"></a>';
$missingnext = '<a href="#missing'.($missingcounter+1).'">'.
'<img src="' . $CFG->pixpath . '/t/down.gif" height="11" width="11" border="0" alt="" /></a>';
$missingprev = '<a href="#missing'.($missingcounter-1).'">'.
'<img src="' . $CFG->pixpath . '/t/up.gif" height="11" width="11" border="0" alt="" /></a>';
} else {
$missingtarget = '';
$missingnext = '';
$missingprev = '';
}
} else {
if ($value <> $value2 && $value2 <> '') {
$cellcolour = 'style="background-color: #AAFFAA"'; // TODO: replace by CSS class
} else {
$cellcolour = '';
}
$missingtarget = '';
$missingnext = '';
$missingprev = '';
}
if ($editable) {
echo '<td width="40%" '.$cellcolour.' valign="top">'. $missingprev . $missingtarget."\n";
if (isset($string[$key])) {
$valuelen = strlen($value);
} else {
$valuelen = strlen($envalue);
}
$cols=50;
if (strstr($value, "\r") or strstr($value, "\n") or $valuelen > $cols) {
$rows = ceil($valuelen / $cols);
echo '<textarea name="stringXXX'.lang_form_string_key($key).'" cols="'.$cols.'" rows="'.$rows.'">'.$value.'</textarea>'."\n";
} else {
if ($valuelen) {
$cols = $valuelen + 5;
}
echo '<input type="text" name="stringXXX'.lang_form_string_key($key).'" value="'.$value.'" size="'.$cols.'" />';
}
if ($value2 <> '' && $value <> $value2) {
echo '<br /><span style="font-size:small">'.$value2.'</span>';
}
echo $missingnext . '</td>';
} else {
echo '<td width="40%" bgcolor="'.$cellcolour.'" valign="top">'.$value.'</td>';
}
}
if ($editable) {
echo '<tr><td colspan="2">&nbsp;<td><br />';
echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
echo ' <input type="hidden" name="currentfile" value="'.$currentfile.'" />';
echo ' <input type="hidden" name="mode" value="compare" />';
echo ' <input type="submit" name="update" value="'.get_string('savechanges').': '.$currentfile.'" />';
echo '</td></tr>';
}
echo '</table>';
echo '</form>';
} else {
// no $currentfile specified
print_heading($strchoosefiletoedit, "center", 4);
}
}
print_footer();
admin_externalpage_print_footer($adminroot);
//////////////////////////////////////////////////////////////////////
function lang_save_file($path, $file, $strings) {
// Thanks to Petri Asikainen for the original version of code
// used to save language files.
//
// $path is a full pathname to the file
// $file is the file to overwrite.
// $strings is an array of strings to write
/**
* Save language translation file.
*
* Thanks to Petri Asikainen for the original version of code
* used to save language files.
*
* @uses $CFG
* @uses $USER
* @param string $path Full pathname to the directory to use
* @param string $file File to overwrite
* @param array $strings Array of strings to write
* @param bool $local Should *_local version be saved?
* @param array $packstrings Array of default langpack strings (needed if $local)
* @return bool Created successfully?
*/
function lang_save_file($path, $file, $strings, $local, $packstrings) {
global $CFG, $USER;
error_reporting(0);
if (!$f = fopen("$path/$file","w")) {
if (!$f = @fopen("$path/$file","w")) {
return false;
}
error_reporting(7);
fwrite($f, "<?PHP // \$Id\$ \n");
fwrite($f, " // $file - created with Moodle $CFG->release ($CFG->version)\n\n\n");
fwrite($f, " // $file - created with Moodle $CFG->release ($CFG->version)\n");
if ($local) {
fwrite($f, " // local modifications from $CFG->wwwroot\n");
}
fwrite($f, "\n\n");
ksort($strings);
foreach ($strings as $key => $value) {
list($id, $stringname) = explode('XXX',$key);
@list($id, $stringname) = explode('XXX',$key);
if ($CFG->lang != "zh_hk" and $CFG->lang != "zh_tw") { // Some MB languages include backslash bytes
$value = str_replace("\\","",$value); // Delete all slashes
}
@@ -323,14 +551,67 @@ function lang_save_file($path, $file, $strings) {
$value = str_replace('"', "\\\"", $value); // Add slashes for "
$value = str_replace("%","%%",$value); // Escape % characters
$value = str_replace("\r", "",$value); // Remove linefeed characters
$value = trim($value); // Delete leading/trailing white space
if ($id == "string" and $value != ""){
fwrite($f,"\$string['$stringname'] = '$value';\n");
if ((!$local) || (lang_fix_value_from_file($packstrings[$stringname]) <> lang_fix_value_from_file($value))) {
fwrite($f,"\$string['$stringname'] = '$value';\n");
}
}
}
fwrite($f,"\n?>\n");
fclose($f);
return true;
}
/**
* Fix value of string to translate.
*
* @param string $value Original string from the file
* @return string Fixed value
*/
function lang_fix_value_from_file($value='') {
$value = str_replace("\r","",$value); // Bad character caused by Windows
$value = preg_replace("/\n{3,}/", "\n\n", $value); // Collapse runs of blank lines
$value = trim($value); // Delete leading/trailing white space
$value = str_replace("\\","",$value); // Delete all slashes
$value = str_replace("%%","%",$value);
$value = str_replace("<","&lt;",$value);
$value = str_replace(">","&gt;",$value);
$value = str_replace('"',"&quot;",$value);
return $value;
}
/**
* Try and create a new language directory.
*
* @uses $CFG
* @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) {
global $CFG;
umask(0000);
if (! file_exists($dir)) {
if (! @mkdir($dir, $CFG->directorypermissions)) {
return false;
}
//@chmod($dir, $CFG->directorypermissions); // Just in case mkdir didn't do it
}
return $dir;
}
/// Following functions are required because '.' in form input names
/// get replaced by '_' by PHP.
function lang_form_string_key($keyfromfile) {
return str_replace('.', '##46#', $keyfromfile); /// Derived from &#46, the ascii value for a period.
}
function lang_file_string_key($keyfromform) {
return str_replace('##46#', '.', $keyfromform);
}
?>
+70 -49
View File
@@ -1,14 +1,18 @@
<?php // $Id$
/**
This script enables Moodle translators to edit /docs and /help language
files directly via WWW interface.
Author: mudrd8mz@uxit.pedf.cuni.cz (http://moodle.cz)
Based on: lang.php in 1.4.3+ release
Thanks: Jaime Villate for important bug fixing, koen roggemans for his job and all moodlers
for intensive testing of this my first contribution
*/
* This script enables Moodle translators to edit /docs and /help language
* files directly via WWW interface.
*
* Author: mudrd8mz@uxit.pedf.cuni.cz (http://moodle.cz)
* Based on: lang.php in 1.4.3+ release
* Thanks: Jaime Villate for important bug fixing, koen roggemans for his job and all moodlers
* for intensive testing of this my first contribution
*/
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('langedit', $adminroot);
//
// Some local configuration
@@ -21,37 +25,23 @@ Thanks: Jaime Villate for important bug fixing, koen roggemans for his job a
// or to filenames with filesize() == 0
$filetemplate = ''; // template for new files, i.e. '$Id$';
require_once("../config.php");
$currentfile = optional_param('currentfile', 'docs/README.txt', PARAM_PATH);
require_login();
if (!isadmin()) {
error("You need to be admin to edit this page");
}
if (! $site = get_site()) {
error("Site not defined!");
}
$stradministration = get_string("administration");
$strconfiguration = get_string("configuration");
$strlanguage = get_string("language");
$strcurrentlanguage = get_string("currentlanguage");
$strthislanguage = get_string("thislanguage");
$stredithelpdocs = get_string('edithelpdocs', 'admin');
print_header("$site->shortname: $stredithelpdocs: $currentfile", "$site->fullname",
"<a href=\"index.php\">$stradministration</a> -> ".
"<a href=\"configure.php\">$strconfiguration</a> ->
<a href=\"lang.php\">$strlanguage</a> -> $stredithelpdocs",
'choosefile.popup', '', true);
admin_externalpage_print_header($adminroot);
$currentlang = current_language();
$langdir = "$CFG->dirroot/lang/$currentlang";
$enlangdir = "$CFG->dirroot/lang/en";
$langdir = "$CFG->dataroot/lang/$currentlang";
$enlangdir = "$CFG->dirroot/lang/en_utf8";
if (!file_exists($langdir)) {
error ('to edit this language pack, you need to put it in '.$CFG->dataroot.'/lang');
}
// Shall I save POSTed data?
if (isset($_POST['currentfile'])) {
@@ -70,7 +60,7 @@ Thanks: Jaime Villate for important bug fixing, koen roggemans for his job a
// Get all files from /docs directory
if (! $files = get_directory_list("$CFG->dirroot/lang/en/docs", "CVS")) {
if (! $files = get_directory_list("$CFG->dirroot/lang/en_utf8/docs", "CVS")) {
error("Could not find English language docs files!");
}
@@ -82,7 +72,7 @@ Thanks: Jaime Villate for important bug fixing, koen roggemans for his job a
if (( !file_exists("$langdir/docs/$file")) || (filesize("$langdir/docs/$file") == 0)) {
$options["docs/$file"] .= "$filemissingmark";
} else {
if (filemtime("$langdir/docs/$file") < filemtime("$CFG->dirroot/lang/en/docs/$file")) {
if (filemtime("$langdir/docs/$file") < filemtime("$CFG->dirroot/lang/en_utf8/docs/$file")) {
$options["docs/$file"] .= "$fileoldmark";
}
}
@@ -90,13 +80,13 @@ Thanks: Jaime Villate for important bug fixing, koen roggemans for his job a
// Get all files from /help directory
if (! $files = get_directory_list("$CFG->dirroot/lang/en/help", "CVS")) {
if (! $files = get_directory_list("$CFG->dirroot/lang/en_utf8/help", "CVS")) {
error("Could not find English language help files!");
}
foreach ($files as $filekey => $file) { // check all the help files.
$options["help/$file"] = "help/$file";
if (( !file_exists("$langdir/help/$file")) || (filesize("$CFG->dirroot/lang/en/help/$file") == 0)) {
if (( !file_exists("$langdir/help/$file")) || (filesize("$CFG->dirroot/lang/en_utf8/help/$file") == 0)) {
$options["help/$file"] .= "$filemissingmark";
} else {
if (filemtime("$langdir/help/$file") < filemtime("$langdir/help/$file")) {
@@ -158,11 +148,20 @@ $langdir/$currentfile")."</font></p>";
."</font></p>";
}
//en_utf8 in dataroot is not editable
if ($currentlang == 'en_utf8') {
$editable = false;
}
echo "<table align=\"center\"><tr valign=\"center\"><td align=\"center\">\n";
echo "<textarea rows=\"$fileeditorrows\" cols=\"$fileeditorcols\" name=\"\">\n";
echo htmlspecialchars(file_get_contents("$enlangdir/$currentfile"));
echo "</textarea>\n";
link_to_popup_window("/lang/en/$currentfile", "popup", get_string("preview"));
//link_to_popup_window("/lang/en_utf8/$currentfile", "popup", get_string("preview"));
$preview_url = langdoc_preview_url($currentfile);
if ($preview_url) {
link_to_popup_window($preview_url.'&amp;forcelang=en_utf8', 'popup', get_string('preview'));
}
echo "</td>\n";
if ($fileeditorinline == 1) {
echo "</tr>\n<tr valign=\"center\">\n";
@@ -173,29 +172,29 @@ $langdir/$currentfile")."</font></p>";
echo "<form name=\"$currentfile\" action=\"langdoc.php\" method=\"post\">";
echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
echo '<input type="hidden" name="currentfile" value="'.$currentfile.'" />';
}
echo "<textarea rows=\"$fileeditorrows\" cols=\"$fileeditorcols\" name=\"filedata\">\n";
if (file_exists("$langdir/$currentfile")) {
echo htmlspecialchars(file_get_contents("$langdir/$currentfile"));
} else {
echo ($filetemplate);
}
echo "</textarea>\n";
link_to_popup_window("/lang/$currentlang/$currentfile", "popup", get_string("preview"));
echo "</td>\n</tr>\n</table>";
if ($editable) {
echo "<textarea rows=\"$fileeditorrows\" cols=\"$fileeditorcols\" name=\"filedata\">\n";
if (file_exists("$langdir/$currentfile")) {
echo htmlspecialchars(file_get_contents("$langdir/$currentfile"));
} else {
echo ($filetemplate);
}
echo "</textarea>\n";
$preview_url = langdoc_preview_url($currentfile);
if ($preview_url) {
link_to_popup_window($preview_url, 'popup', get_string('preview'));
}
echo '<div align="center"><input type="submit" value="'.get_string('savechanges').': lang/'.$currentlang.'/'.$currentfile.'" /></div>';
echo '</form>';
}
echo "</td>\n</tr>\n</table>";
error_reporting($CFG->debug);
}
print_footer();
admin_externalpage_print_footer($adminroot);
//////////////////////////////////////////////////////////////////////
@@ -233,4 +232,26 @@ function langdoc_save_file($path, $file, $content) {
return true;
}
/**
* Return a preview URL for the file, if available.
*
* Documentation will be moved into moodle.org wiki and current version 1.6 does not
* seem to be able to display local documentation. Thus, return empty URL for doc files.
* See lib/moodlelib.php document_file() - it still relies on old pre-UTF8 lang/ location.
*/
function langdoc_preview_url($currentfile) {
if (substr($currentfile, 0, 5) == 'help/') {
$currentfile = substr($currentfile, 5);
$currentpathexp = explode('/', $currentfile);
if (count($currentpathexp) > 1) {
$url = '/help.php?module='.$currentpathexp[0].'&amp;file='.$currentpathexp[1];
} else {
$url = '/help.php?module=moodle&amp;file='.$currentfile;
}
} else {
$url = '';
}
return $url;
}
?>
+168 -167
View File
@@ -1,140 +1,98 @@
<?php
<?php //$Id$
///This file only manages the installation of 1.6 lang packs.
///in downloads.moodle.org, they are store in separate directory /lang16
///in local server, they are stored in $CFG->dataroot/lang
///This helps to avoid confusion.
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('langimport', $adminroot);
$mode = optional_param('mode', 0, PARAM_INT); //phase
$pack = optional_param('pack', '', PARAM_FILE); //pack to install
$displaylang = $pack;
$uninstalllang = optional_param('uninstalllang', '', PARAM_FILE);
$confirm = optional_param('confirm', 0, PARAM_BOOL);
$sitelang = optional_param('sitelangconfig', '', PARAM_FILE);
define('INSTALLATION_OF_SELECTED_LANG', 2);
define('CHANGE_SITE_LANG', 3);
define('DELETION_OF_SELECTED_LANG', 4);
define('UPDATE_ALL_LANG', 5);
include('../config.php');
$mode = optional_param('mode',0,PARAM_INT); //phase
$pack = optional_param('pack','',PARAM_NOTAGS); //pack to install
$displaylang = $pack;
$uninstalllang = optional_param('uninstalllang','',PARAM_NOTAGS);
require_login();
if (!isadmin()) {
error('You must be an admin');
}
if (!$site = get_site()) {
error("Site not defined!");
}
$strlang = get_string('langimport','admin');
$stradministration = get_string("administration");
$strconfiguration = get_string("configuration");
$strlanguage = get_string("language");
$strthislanguage = get_string("thislanguage");
$title = $strlang;
admin_externalpage_print_header($adminroot);
print_header("$site->shortname: $title", "$site->fullname",
"<a href=\"index.php\">$stradministration</a> -> ".
"<a href=\"configure.php\">$strconfiguration</a> -> ".
"<a href=\"lang.php\">$strlanguage</a> -> $strlang",
'', '', true, '');
print_heading('');
switch ($mode){
case INSTALLATION_OF_SELECTED_LANG: ///installation of selected language pack
if (confirm_sesskey()) {
if (optional_param('confirm')) {
@mkdir ($CFG->dataroot.'/temp/'); //make it in case it's a fresh install, it might not be there
@mkdir ($CFG->dataroot.'/lang/');
$source = 'http://download.moodle.org/lang16/'.$pack.'.zip';
$langpack = $CFG->dataroot.'/temp/'.$pack.'.zip';
$destination = $CFG->dataroot.'/lang/';
if ($contents = file_get_contents($source)) { // Grab whole page
if ($file = fopen($langpack, 'w')) { // Make local copy
if (!fwrite($file, $contents)) { //copy zip to temp folder..
error ('could not copy file');
}
fclose($file);
@mkdir ($CFG->dataroot.'/temp/'); //make it in case it's a fresh install, it might not be there
@mkdir ($CFG->dataroot.'/lang/');
require_once($CFG->libdir.'/componentlib.class.php');
if ($cd = new component_installer('http://download.moodle.org', 'lang16',
$pack.'.zip', 'languages.md5', 'lang')) {
$status = $cd->install(); //returns ERROR | UPTODATE | INSTALLED
switch ($status) {
///recursively remove the whole directory since unzip does not overwrites anything
if (file_exists($destination.$pack)) {
@remove_dir($destination.$pack.'/');
}
//unpack the zip
if (unzip_file($langpack, $destination, false)) {
print_heading(get_string('langimportsuccess','admin'));
case ERROR:
if ($cd->get_error() == 'remotedownloadnotallowed') {
$a = new stdClass();
$a->url = 'http://download.moodle.org/lang16/'.$pack.'zip';
$a->dest= $CFG->dataroot.'/lang';
error(get_string($cd->get_error(), 'error', $a));
} else {
error('language installation failed');
error(get_string($cd->get_error(), 'error'));
}
//now, we update the md5key of the lang pack, this is used to check version
$md5file = $CFG->dataroot.'/lang/'.$pack.'/'.$pack.'.md5';
if ($file = fopen($md5file, 'w')) {
fwrite($file, md5($contents)); //manually generate md5 from zip
}
fclose($file);
@unlink ($langpack); //bye bye zip file, come back when you get a little better
echo '<div align="center"><form action="langimport.php" method="POST">';
echo '<input type="submit" value="'.get_string('ok').'" />';
echo '</form></div>';
}
}
} else { //print confirm box, no confirmation yet
if (confirm_sesskey()) {
print_simple_box_start('center','100%');
echo '<div align="center">';
echo '<form name="langform" action="langimport.php?mode=2" method="POST">';
echo '<input name="pack" type="hidden" value="'.$pack.'" />';
echo '<input name="displaylang" type="hidden" value="'.$displaylang.'" />';
echo '<input name="confirm" type="hidden" value="1" />';
echo '<input name="sesskey" type="hidden" value="'.sesskey().'" />';
print_heading(get_string('confirminstall','admin',$displaylang),2);
echo '<input type="submit" value="'.get_string('ok').'"/>';
echo '&nbsp;<input type="button" value="'.get_string('cancel').'" onclick="javascript:history.go(-1)" />';
echo '</form>';
echo '</div>';
print_simple_box_end();
break;
case INSTALLED:
@unlink($CFG->dataroot.'/cache/languages');
redirect('langimport.php', get_string('langpackupdated','admin',$pack));
break;
case UPTODATE:
break;
}
} else {
notify('Had an unspecified error with the component installer, sorry.');
}
}
break;
case CHANGE_SITE_LANG: //change site language
if (confirm_sesskey) {
if (confirm_sesskey()) {
$langconfig = get_record('config','name','lang');
$sitelang = required_param('sitelangconfig',PARAM_NOTAGS);
$langconfig->value = $sitelang;
if (update_record('config',$langconfig)){
echo '<div align="center">';
notify (get_string('sitelangchanged','admin'));
echo '<form action="langimport.php" method="POST">';
echo '<input type="submit" value="'.get_string('ok').'" />';
echo '</form></div>';
if (!empty($sitelang) && update_record('config',$langconfig)){
redirect('langimport.php', get_string('sitelangchanged','admin'));
} else {
error ('can not update site language');
error('Could not update the default site language!');
}
}
break;
case DELETION_OF_SELECTED_LANG: //delete a directory(ies) containing a lang pack completely
if (!optional_param('confirm') && confirm_sesskey()) {
print_simple_box_start('center','100%');
echo '<div align="center">';
echo '<form name="langform" action="langimport.php?mode=4" method="POST">';
echo '<input name="uninstalllang" type="hidden" value="'.$uninstalllang.'" />';
echo '<input name="confirm" type="hidden" value="1" />';
print_heading(get_string('uninstallconfirm','admin',$uninstalllang),2);
echo '<input name="sesskey" type="hidden" value="'.sesskey().'" />';
echo '<input type="submit" value="'.get_string('uninstall','admin').'"/>';
echo '&nbsp;<input type="button" value="'.get_string('cancel').'" onclick="javascript:history.go(-1)" />';
echo '</form>';
echo '</div>';
print_simple_box_end();
}
else if (confirm_sesskey()) {
if (!$confirm && confirm_sesskey()) {
notice_yesno(get_string('uninstallconfirm', 'admin', $uninstalllang),
'langimport.php?mode=4&amp;uninstalllang='.$uninstalllang.'&amp;confirm=1&amp;sesskey='.sesskey(),
'langimport.php');
} else if (confirm_sesskey()) {
if ($uninstalllang == 'en_utf8') {
error ('en_utf8 can not be uninstalled!');
}
$dest1 = $CFG->dataroot.'/lang/'.$uninstalllang;
$dest2 = $CFG->dirroot.'/lang/'.$uninstalllang;
$rm1 = false;
@@ -147,15 +105,12 @@
}
//delete the direcotries
if ($rm1 or $rm2) {
echo '<div align="center">';
print_string('langpackremoved','admin');
echo '<form action="langimport.php" method="POST">';
echo '<input type="submit" value="'.get_string('ok').'" />';
echo '</form></div>';
redirect('langimport.php', get_string('langpackremoved','admin'));
} else { //nothing deleted, possibly due to permission error
error ('An error has occurred, language pack is not completely uninstalled, please check file permission');
error('An error has occurred, language pack is not completely uninstalled, please check file permissions');
}
}
@unlink($CFG->dataroot.'/cache/languages');
break;
case UPDATE_ALL_LANG: //1 click update for all updatable language packs
@@ -164,25 +119,22 @@
//key = langname, value = md5
$source = 'http://download.moodle.org/lang16/languages.md5';
$md5array = array();
$update = 0; //any packs updated?
$updated = 0; //any packs updated?
unset($CFG->langlist); // ignore admin's langlist
$alllangs = array_keys(get_list_of_languages());
$lang16 = array(); //all the Moodle 1.6 unicode lang packs (updated and not updated)
$packs = array(); //all the packs that needs updating
if ($fp = fopen($source, 'r')) { /// attempt to get the list from Moodle.org.
while(!feof ($fp)) {
$availablelangs[] = split(',', fgets($fp,1024));
}
} else {
error('can not fopen!');
if (!$availablelangs = proxy_url($source)) {
error ('can not read from course');
}
//and build an associative array
foreach ($availablelangs as $alang) {
$md5array[$alang[0]] = $alang[1];
}
//first build a list of all the language packs,
//filtering out non-16 packs
foreach ($alllangs as $clang) {
$dest1 = $CFG->dataroot.'/lang/'.$clang;
@@ -200,11 +152,12 @@
}
}
@mkdir ($CFG->dataroot.'/temp/');
@mkdir ($CFG->dataroot.'/lang/');
foreach ($packs as $pack){ //for each of the remaining in the list, we
if ($pack == 'en_utf8') { // no update for en_utf8
continue;
}
//1. delete old director(ies)
$dest1 = $CFG->dataroot.'/lang/'.$pack;
@@ -223,43 +176,42 @@
//2. copy & unzip into new
$source = 'http://download.moodle.org/lang16/'.$pack.'.zip';
$langpack = $CFG->dataroot.'/temp/'.$pack.'.zip';
$destination = $CFG->dataroot.'/lang/';
if ($contents = file_get_contents($source)) { // Grab whole page
if ($file = fopen($langpack, 'w')) { // Make local copy
if (!fwrite($file, $contents)) { //copy zip to temp folder..
error ('could not copy file');
}
fclose($file);
require_once($CFG->libdir.'/componentlib.class.php');
if ($cd = new component_installer('http://download.moodle.org', 'lang16',
$pack.'.zip', 'languages.md5', 'lang')) {
$status = $cd->install(); //returns ERROR | UPTODATE | INSTALLED
switch ($status) {
//unpack the zip
if (!unzip_file($langpack, $destination, false)) {
error('language installation failed - can not unzip language pack');
case ERROR:
if ($cd->get_error() == 'remotedownloadnotallowed') {
$a = new stdClass();
$a->url = 'http://download.moodle.org/lang16/'.$pack.'zip';
$a->dest= $CFG->dataroot.'/lang';
error(get_string($cd->get_error(), 'error', $a));
} else {
error(get_string($cd->get_error(), 'error'));
}
//now, we update the md5key of the lang pack, this is used to check version
$md5file = $CFG->dataroot.'/lang/'.$pack.'/'.$pack.'.md5';
if ($file = fopen($md5file, 'w')) {
fwrite($file, md5($contents));
}
fclose($file);
@unlink ($langpack); //remove the zip file
echo '<div align="center">';
notify(print_string('langpackupdated','admin',$pack));
$updated = 1;
echo '</div>';
break;
case UPTODATE:
//Print error string or whatever you want to do
break;
case INSTALLED:
notify(get_string('langpackupdated','admin',$pack), 'notifysuccess');
$updated = true;
//Print/do whatever you want
break;
default:
}
} else {
}
}
echo '<div align="center"><form action="langimport.php" method="POST">';
if ($updated) {
notify(print_string('langupdatecomplete','admin'));
notice(get_string('langupdatecomplete','admin'), 'langimport.php');
} else {
notify(print_string('nolangupdateneeded','admin'));
notice(get_string('nolangupdateneeded','admin'), 'langimport.php');
}
echo '<input type="submit" value="'.get_string('ok').'" />';
echo '</form></div>';
break;
@@ -268,6 +220,12 @@
$source = 'http://download.moodle.org/lang16/languages.md5';
$remote = 0; //flag for reading from remote or local
if ($availablelangs = proxy_url($source)) {
$remote = 1;
} else {
$availablelangs = get_local_list_of_languages();
}
/*
if ($fp = fopen($source, 'r')){ /// attempt to get the list from Moodle.org.
while(!feof ($fp)) {
$availablelangs[] = split(',', fgets($fp,1024));
@@ -276,7 +234,7 @@
} else { /// fopen failed, we find local copy of list.
$availablelangs = get_local_list_of_languages();
}
*/
if (!$remote) {
print_simple_box_start('center','60%');
echo '<div align="center">';
@@ -294,6 +252,7 @@
echo '<tr><td align="center" valign="top">';
echo '<form name="uninstallform" action="langimport.php?mode=4" method="POST">';
echo '<input name="sesskey" type="hidden" value="'.sesskey().'" />';
unset($CFG->langlist); // ignore admin's langlist
$installedlangs = get_list_of_languages();
/// display installed langs here
@@ -311,23 +270,25 @@
echo '<p />';
/// Display option to change site language
/// Erm... this doesn't seem to work. Plus it's redundant. -vinkmar
print_string('changesitelang','admin');
$sitelanguage = get_record('config','name','lang');
echo '<form name="changelangform" action="langimport.php?mode=3" method="POST">';
echo '<select name="sitelangconfig">';
foreach ($installedlangs as $clang =>$ilang) {
if ($clang == $sitelanguage->value){
echo '<option value="'.$clang.'" selected="selected">'.$ilang.'</option>';
} else {
echo '<option value="'.$clang.'">'.$ilang.'</option>';
}
}
echo '</select>';
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
echo '<input type="submit" value="'.get_string('change','admin').'" />';
echo '</form>';
// print_string('changesitelang','admin');
// $sitelanguage = get_record('config','name','lang');
// echo '<form name="changelangform" action="langimport.php?mode=3" method="POST">';
// echo '<select name="sitelangconfig">';
//
// foreach ($installedlangs as $clang =>$ilang) {
// if ($clang == $sitelanguage->value){
// echo '<option value="'.$clang.'" selected="selected">'.$ilang.'</option>';
// } else {
// echo '<option value="'.$clang.'">'.$ilang.'</option>';
// }
// }
// echo '</select>';
// echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
// echo '<input type="submit" value="'.get_string('change','admin').'" />';
// echo '</form>';
/// display to be installed langs here
@@ -344,24 +305,31 @@
}
foreach ($availablelangs as $alang) {
if ($remote){
if (!is_installed_lang($alang[0], $alang[1])){ //if not already installed
echo '<option value="'.$alang[0].'">'.$alang[2].' ('.$alang[0].')</option>';
if (trim($alang[0]) != "en_utf8") {
if ($remote){
if (substr($alang[0], -5) == '_utf8') { //Remove the _utf8 suffix from the lang to show
$shortlang = substr($alang[0], 0, -5);
} else {
$shortlang = $alang[0];
}
if (!is_installed_lang($alang[0], $alang[1])){ //if not already installed
echo '<option value="'.$alang[0].'">'.$alang[2].' ('.$shortlang.')</option>';
}
} else { //print list in local format, and instruction to install
echo '<tr><td>'.$alang[2].'</td><td><a href="http://download.moodle.org/lang16/'.$alang[0].'.zip">'.get_string('download','admin').'</a>';
}
} else { //print list in local format, and instruction to install
echo '<tr><td>'.$alang[2].'</td><td><a href="http://download.moodle.org/lang16/'.$alang[0].'.zip">'.get_string('download','admin').'</a>';
$empty = 0;
}
$empty = 0;
}
if ($remote) {
echo '</select>';
echo '<br/ ><input type="submit" value="'.get_string('install','admin').'">';
echo '<br/ ><input type="submit" value="<-- '.get_string('install','admin').'">';
}
echo '</form>';
if ($empty) {
echo '<tr><td align="center">';
print_string('nolanguagetodownload');
print_string('nolanguagetodownload','admin');
echo '</td></tr>';
}
@@ -374,7 +342,7 @@
} //close of main switch
print_footer();
admin_externalpage_print_footer($adminroot);
/* returns a list of available language packs from a
* local copy shipped with standard moodle distro
@@ -408,4 +376,37 @@
return false;
}
//returns an array of languages, or false if can not read from source
//uses a socket if proxy is set as a config variable
function proxy_url($url) {
global $CFG;
if ($CFG->proxyhost && $CFG->proxyport) {
$proxy_fp = fsockopen($CFG->proxyhost, $CFG->proxyport);
if (!$proxy_fp) {
return false; //failed
}
fputs($proxy_fp, "GET $url HTTP/1.0\r\nHost: $CFG->proxyhost\r\n\r\n");
$i = 0;
while(!feof($proxy_fp)) {
$string = fgets($proxy_fp, 1024);
if ($i > 11) { //12 lines of info skipped
$availablelangs[] = split(',', $string);
}
$i++;
}
fclose($proxy_fp);
} else { //proxy not in use
if ($fp = fopen($url, 'r')){ /// attempt to get the list from Moodle.org.
while(!feof ($fp)) {
$availablelangs[] = split(',', fgets($fp,1024));
}
} else { /// fopen failed, return false.
return false;
}
}
return $availablelangs;
}
?>
+7 -18
View File
@@ -2,15 +2,12 @@
// Enables/disables maintenance mode
require('../config.php');
require_once($CFG->libdir.'/adminlib.php');
$action = optional_param('action', '', PARAM_ALPHA);
$sesskey = optional_param('sesskey');
require_login();
if (!isadmin()) {
error('You need to be admin to use this page');
}
$adminroot = admin_get_root();
admin_externalpage_setup('maintenancemode', $adminroot);
//Check folder exists
if (! make_upload_directory(SITEID)) { // Site folder
@@ -23,27 +20,19 @@
if (confirm_sesskey()) {
if ($form->action == "disable") {
unlink($filename);
redirect('index.php', get_string('sitemaintenanceoff','admin'));
redirect('maintenance.php', get_string('sitemaintenanceoff','admin'));
} else {
$file = fopen($filename, 'w');
fwrite($file, stripslashes($form->text));
fclose($file);
redirect('index.php', get_string('sitemaintenanceon', 'admin'));
redirect('maintenance.php', get_string('sitemaintenanceon', 'admin'));
}
}
}
/// Print the header stuff
$strmaintenance = get_string('sitemaintenancemode', 'admin');
$stradmin = get_string('administration');
$strconfiguration = get_string('configuration');
print_header("$SITE->shortname: $strmaintenance", $SITE->fullname,
"<a href=\"index.php\">$stradmin</a> -> ".
"<a href=\"configure.php\">$strconfiguration</a> -> $strmaintenance");
print_heading($strmaintenance);
admin_externalpage_print_header($adminroot);
/// Print the appropriate form
@@ -75,5 +64,5 @@
}
}
print_footer();
admin_externalpage_print_footer($adminroot);
?>
+19 -25
View File
@@ -1,34 +1,28 @@
<?PHP // $Id$
// module.php - allows admin to edit all local configuration variables for a module
require_once("../config.php");
require_login();
if (!isadmin()) {
error("Only an admin can use this page");
}
if (!$site = get_site()) {
error("Site isn't defined!");
}
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('managemodules', $adminroot);
/// If data submitted, then process and store.
if ($config = data_submitted()) {
$module = optional_param('module', '', PARAM_SAFEDIR);
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
}
if ($module = optional_param('module', '', PARAM_CLEANFILE)) {
if ($module != '') {
require_once("$CFG->dirroot/mod/$module/lib.php");
// if the config.html contains a hidden form field giving
// the module name then the form does not have to prefix all
// its variable names, we will do it here.
$moduleprefix = $module.'_';
// let the module process the form data if it has to,
// $config is passed to this function by reference
require_once("$CFG->dirroot/mod/$module/lib.php");
$moduleconfig = $module.'_process_options';
if (function_exists($moduleconfig)) {
$moduleconfig($config);
@@ -37,6 +31,9 @@
$moduleprefix = '';
}
unset($config->sesskey);
unset($config->module);
foreach ($config as $name => $value) {
set_config($moduleprefix.$name, $value);
}
@@ -45,29 +42,26 @@
}
/// Otherwise print the form.
$module = optional_param('module', '', PARAM_CLEANFILE);
$module = required_param('module', PARAM_SAFEDIR);
require_once("$CFG->dirroot/mod/$module/lib.php");
$stradmin = get_string("administration");
$strconfiguration = get_string("configuration");
$strmanagemodules = get_string("managemodules");
$strmodulename = get_string("modulename", $module);
print_header("$site->shortname: $strmodulename: $strconfiguration", $site->fullname,
"<a href=\"index.php\">$stradmin</a> -> ".
"<a href=\"configure.php\">$strconfiguration</a> -> ".
"<a href=\"modules.php\">$strmanagemodules</a> -> $strmodulename");
// $CFG->pagepath is used to generate the body and id attributes for the body tag
// of the page. It is also used to generate the link to the Moodle Docs for this view.
$CFG->pagepath = 'mod/' . $module . '/config';
admin_externalpage_print_header($adminroot);
print_heading($strmodulename);
print_simple_box("<center>".get_string("configwarning", 'admin')."</center>", "center", "50%");
print_simple_box("<center>".get_string("configwarning", 'admin')."</center>", "center", "60%");
echo "<br />";
print_simple_box_start("center", "");
include("$CFG->dirroot/mod/$module/config.html");
print_simple_box_end();
print_footer();
admin_externalpage_print_footer($adminroot);
?>
+46 -40
View File
@@ -1,30 +1,21 @@
<?PHP // $Id$
// Allows the admin to create, delete and rename course categories
// Allows the admin to manage activity modules
require_once("../config.php");
require_once("../course/lib.php");
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('managemodules', $adminroot);
require_once('../course/lib.php');
$disable = optional_param('disable');
$enable = optional_param('enable');
$delete = optional_param('delete');
$confirm = optional_param('confirm');
require_login();
if (!isadmin()) {
error("Only administrators can use this page!");
}
if (!$site = get_site()) {
error("Site isn't defined!");
}
$show = optional_param('show', '', PARAM_SAFEDIR);
$hide = optional_param('hide', '', PARAM_SAFEDIR);
$delete = optional_param('delete', '', PARAM_SAFEDIR);
$confirm = optional_param('confirm', '', PARAM_BOOL);
/// Print headings
$stradministration = get_string("administration");
$strconfiguration = get_string("configuration");
$strmanagemodules = get_string("managemodules");
$stractivities = get_string("activities");
$strdelete = get_string("delete");
$strversion = get_string("version");
$strhide = get_string("hide");
@@ -33,12 +24,12 @@
$stractivities = get_string("activities");
$stractivitymodule = get_string("activitymodule");
print_header("$site->shortname: $strmanagemodules", "$site->fullname",
"<a href=\"index.php\">$stradministration</a> -> ".
"<a href=\"configure.php\">$strconfiguration</a> -> $strmanagemodules");
admin_externalpage_print_header($adminroot);
print_heading($stractivities);
$coursesaffected = false;
print_heading($strmanagemodules);
/// If data submitted, then process and store.
@@ -46,27 +37,31 @@
if (!$module = get_record("modules", "name", $hide)) {
error("Module doesn't exist!");
}
set_field("modules", "visible", "0", "id", $module->id); // Hide main module
set_field("course_modules", "visible", "0", "module", $module->id); // Hide all related activity modules
set_field("modules", "visible", "0", "id", $module->id); // Hide main module
set_field('course_modules', 'visibleold', '1', 'visible' ,'1', 'module', $module->id); // Remember the previous visible state so we can toggle this back if the module is unhidden.
set_field('course_modules', 'visibleold', '0', 'visible' ,'0', 'module', $module->id);
set_field("course_modules", "visible", "0", "module", $module->id); // Hide all related activity modules
$coursesaffected = true;
}
if (!empty($show) and confirm_sesskey()) {
if (!$module = get_record("modules", "name", $show)) {
error("Module doesn't exist!");
}
set_field("modules", "visible", "1", "id", $module->id); // Show main module
set_field("course_modules", "visible", "1", "module", $module->id); // Show all related activity modules
set_field("modules", "visible", "1", "id", $module->id); // Show main module
set_field('course_modules', 'visible', '1', 'visibleold', '1', 'module', $module->id); // Get the previous saved visible state for the course module.
$coursesaffected = true;
}
if (!empty($delete) and confirm_sesskey()) {
$strmodulename = get_string("modulename", "$delete");
if (empty($confirm)) {
notice_yesno(get_string("moduledeleteconfirm", "", $strmodulename),
"modules.php?delete=$delete&amp;confirm=$delete&amp;sesskey=$USER->sesskey",
if (!$confirm) {
notice_yesno(get_string("moduledeleteconfirm", "", $strmodulename),
"modules.php?delete=$delete&amp;confirm=1&amp;sesskey=$USER->sesskey",
"modules.php");
print_footer();
admin_externalpage_print_footer($adminroot);
exit;
} else { // Delete everything!!
@@ -93,7 +88,7 @@
notify("Error occurred while deleting all $strmodulename records in course_modules table");
}
// Then delete all the logs
// Then delete all the logs
if (!delete_records("log", "module", $module->name)) {
notify("Error occurred while deleting all $strmodulename records in log table");
}
@@ -119,10 +114,12 @@
}
}
}
}
rebuild_course_cache(); // Because things have changed
}
// Delete the capabilities that were defined by this module
capabilities_cleanup('mod/'.$module->name);
// rebuild_course_cache(); // Because things have changed
$coursesaffected = true;
$a->module = $strmodulename;
$a->directory = "$CFG->dirroot/mod/$delete";
@@ -130,6 +127,11 @@
}
}
if ($coursesaffected) {
rebuild_course_cache(); // Because things have changed
}
/// Get and sort the existing modules
if (!$modules = get_records("modules")) {
@@ -138,6 +140,10 @@
foreach ($modules as $module) {
$strmodulename = get_string("modulename", "$module->name");
// Deal with modules which are lacking the language string
if ($strmodulename == '[[modulename]]') {
$strmodulename = $module->name;
}
$modulebyname[$strmodulename] = $module;
}
ksort($modulebyname);
@@ -162,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\">".
@@ -184,6 +190,6 @@
echo "<br /><br />";
print_footer();
admin_externalpage_print_footer($adminroot);
?>
+10 -12
View File
@@ -1,21 +1,19 @@
<?php
<?php // $Id$
if (!isset($CFG)) {
require('../config.php');
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('oacleanup', $adminroot);
require_login();
if (!isadmin()) {
error('You must be an admin to use this script');
exit;
}
print_header_simple('Online Assignment Cleanup','Online Assignment Cleanup', 'Admin');
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
admin_externalpage_print_header($adminroot);
online_assignment_cleanup(true);
print_footer();
admin_externalpage_print_footer($adminroot);
}
@@ -48,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) {
@@ -75,7 +73,7 @@ function online_assignment_cleanup($output=false) {
/// cycle through the instances
foreach ($instances as $instance) {
/// is this an instance of an online assignment
$sql = "SELECT a.id
$sql = "SELECT a.id
FROM {$CFG->prefix}course_modules cm,
{$CFG->prefix}assignment a
WHERE cm.id = '$instance' AND
@@ -140,7 +138,7 @@ function online_assignment_cleanup($output=false) {
set_field('course_sections', 'sequence', $section->sequence, 'id', $section->id);
if ($output) echo 'Online Assignment (instance '.$instance.') moved from section '.$section->id.': to section '.$newsection.'<br />';
}
+131
View File
@@ -0,0 +1,131 @@
<?php // $Id$
require_once($CFG->libdir.'/pagelib.php');
define('PAGE_ADMIN', 'admin');
define('BLOCK_L_MIN_WIDTH',0);
define('BLOCK_L_MAX_WIDTH',210);
define('BLOCK_R_MIN_WIDTH',0);
define('BLOCK_R_MAX_WIDTH',210);
page_map_class(PAGE_ADMIN, 'page_admin');
class page_admin extends page_base {
var $section;
var $pathtosection;
var $visiblepathtosection;
// hack alert!
// this function works around the inability to store the section name
// in default block, maybe we should "improve" the blocks a bit?
function init_extra($section) {
global $CFG;
if($this->full_init_done) {
return;
}
$adminroot = admin_get_root();
// fetch the path parameter
$this->section = $section;
$this->visiblepathtosection = array();
// this part is (potentially) processor-intensive... there's gotta be a better way
// of handling this
if ($this->pathtosection = $adminroot->path($this->section)) {
foreach($this->pathtosection as $element) {
if ($pointer = $adminroot->locate($element)) {
array_push($this->visiblepathtosection, $pointer->visiblename);
}
}
}
// all done
$this->full_init_done = true;
}
function blocks_get_default() {
return 'admin_tree,admin_bookmarks';
}
// seems reasonable that the only people that can edit blocks on the admin pages
// are the admins... but maybe we want a role for this?
function user_allowed_editing() {
return has_capability('moodle/site:manageblocks', get_context_instance(CONTEXT_SYSTEM, SITEID));
}
// has to be fixed. i know there's a "proper" way to do this
function user_is_editing() {
global $USER;
return $USER->adminediting;
}
function url_get_path() {
global $CFG;
$adminroot = admin_get_root();
$root = $adminroot->locate($this->section);
if (is_a($root, 'admin_externalpage')) {
return $root->url;
} else {
return ($CFG->wwwroot . '/' . $CFG->admin . '/settings.php');
}
}
function url_get_parameters() { // only handles parameters relevant to the admin pagetype
return array('section' => (isset($this->section) ? $this->section : ''));
}
function blocks_get_positions() {
return array(BLOCK_POS_LEFT, BLOCK_POS_RIGHT);
}
function blocks_default_position() {
return BLOCK_POS_LEFT;
}
function blocks_move_position(&$instance, $move) {
if($instance->position == BLOCK_POS_LEFT && $move == BLOCK_MOVE_RIGHT) {
return BLOCK_POS_RIGHT;
} else if ($instance->position == BLOCK_POS_RIGHT && $move == BLOCK_MOVE_LEFT) {
return BLOCK_POS_LEFT;
}
return $instance->position;
}
// does anything need to be done here?
function init_quick($data) {
parent::init_quick($data);
}
function print_header($section = '') {
global $USER, $CFG, $SITE;
$this->init_full($section); // we're trusting that init_full() has already been called by now; it should have.
// if not, print_header() has to be called with a $section parameter
if ($this->user_allowed_editing()) {
$buttons = '<table><tr><td><form target="' . $CFG->framename . '" method="get" action="' . $this->url_get_path() . '">'.
'<input type="hidden" name="adminedit" value="'.($this->user_is_editing()?'off':'on').'" />'.
'<input type="hidden" name="section" value="'.$this->section.'" />'.
'<input type="submit" value="'.get_string($this->user_is_editing()?'blockseditoff':'blocksediton').'" /></form></td>' .
'</tr></table>';
} else {
$buttons = '&nbsp;';
}
print_header("$SITE->shortname: " . implode(": ",$this->visiblepathtosection), $SITE->fullname,
implode(" -> ",$this->visiblepathtosection),'', '', true, $buttons, '');
}
function get_type() {
return PAGE_ADMIN;
}
}
?>
+18 -25
View File
@@ -2,38 +2,31 @@
// phpinfo.php - shows phpinfo for the current server
require_once("../config.php");
require_once($CFG->libdir.'/adminlib.php');
$topframe = optional_param('topframe', false, PARAM_BOOL);
$bottomframe = optional_param('bottomframe', false, PARAM_BOOL);
$adminroot = admin_get_root();
admin_externalpage_setup('phpinfo', $adminroot);
require_login();
if (!isadmin()) {
error("Only the admin can use this page");
}
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
if (!$topframe && !$bottomframe) {
?>
admin_externalpage_print_header($adminroot);
<head>
<title>PHP info</title>
</head>
echo '<div class="phpinfo">';
<frameset rows="80,*">
<frame src="phpinfo.php?topframe=true&amp;sesskey=<?php echo $USER->sesskey ?>">
<frame src="phpinfo.php?bottomframe=true&amp;sesskey=<?php echo $USER->sesskey ?>">
</frameset>
ob_start();
phpinfo(INFO_GENERAL + INFO_CONFIGURATION + INFO_MODULES);
$html = ob_get_contents();
ob_end_clean();
<?php
} else if ($topframe && confirm_sesskey()) {
$stradministration = get_string("administration");
$site = get_site();
$html = preg_replace('#(\n?<style[^>]*?>.*?</style[^>]*?>)|(\n?<style[^>]*?/>)#is', '', $html);
$html = preg_replace('#(\n?<head[^>]*?>.*?</head[^>]*?>)|(\n?<head[^>]*?/>)#is', '', $html);
echo $html;
echo '</div>';
admin_externalpage_print_footer($adminroot);
print_header("$site->shortname: phpinfo", "$site->fullname",
"<a target=\"$CFG->framename\" href=\"index.php\">$stradministration</a> -> PHP info");
exit;
} else if ($bottomframe && confirm_sesskey()) {
phpinfo();
exit;
}
?>
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/php -f
<?
<?php // $Id$
define('FULLME','cron'); // prevent warnings
//error_reporting(0);
//ini_set('display_errors',0);
+21 -12
View File
@@ -1,13 +1,11 @@
<?php // $Id$
// register.php - allows admin to register their site on moodle.org
include("../config.php");
require_once('../config.php');
require_login();
if (!isadmin()) {
error("Only the admin can use this page");
}
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
if (!$site = get_site()) {
redirect("index.php");
@@ -26,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']);
}
@@ -119,19 +117,30 @@
echo "<input type=\"hidden\" name=\"courses\" value=\"$count\">\n";
echo '<br />';
$count = count_records('user')-1;
$count = count_records('user', 'deleted', 0);
echo get_string("users").": ".$count;
echo "<input type=\"hidden\" name=\"users\" value=\"$count\">\n";
echo '<br />';
$count = count_records('user_students');
echo get_string("enrolments").": ".$count;
echo "<input type=\"hidden\" name=\"enrolments\" value=\"$count\">\n";
// total number of role assignments
$count = count_records('role_assignments');
echo get_string('roleassignments', 'role').": ".$count;
echo "<input type=\"hidden\" name=\"roleassignments\" value=\"$count\">\n";
echo '<br />';
$count = count_records('user_teachers');
// first find all distinct roles with mod/course:update
// please change the name and strings to something appropriate to reflect the new data collected
$sql = "SELECT COUNT(DISTINCT u.id)
FROM {$CFG->prefix}role_capabilities rc,
{$CFG->prefix}role_assignments ra,
{$CFG->prefix}user u
WHERE (rc.capability = 'moodle/course:update' or rc.capability='moodle/site:doanything')
AND rc.roleid = ra.roleid
AND u.id = ra.userid";
$count = count_records_sql($sql);
echo get_string("teachers").": ".$count;
echo "<input type=\"hidden\" name=\"teachers\" value=\"$count\">\n";
echo "<input type=\"hidden\" name=\"courseupdaters\" value=\"$count\">\n";
echo '<br />';
$count = count_records('forum_posts');
@@ -139,7 +148,7 @@
echo "<input type=\"hidden\" name=\"posts\" value=\"$count\">\n";
echo '<br />';
$count = count_records('quiz_questions');
$count = count_records('question');
echo get_string("questions", 'quiz').": ".$count;
echo "<input type=\"hidden\" name=\"questions\" value=\"$count\">\n";
echo '<br />';
+30 -10
View File
@@ -1,26 +1,30 @@
<?php /// $Id$
/// Search and replace strings throughout all texts in the whole database
require('../config.php');
require_once('../config.php');
require_once($CFG->dirroot.'/course/lib.php');
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('replace', $adminroot);
$search = optional_param('search', '');
$replace = optional_param('replace', '');
$search = optional_param('search', '', PARAM_RAW);
$replace = optional_param('replace', '', PARAM_RAW);
require_login();
if (!isadmin()) {
error("Admins only");
}
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
###################################################################
print_header('Search and replace throughout the whole database', 'Replace text within the whole database');
admin_externalpage_print_header($adminroot);
print_heading('Search and replace text throughout the whole database');
if (!$search or !$replace or !confirm_sesskey()) { /// Print a form
if (!data_submitted() or !$search or !$replace or !confirm_sesskey()) { /// Print a form
print_simple_box_start('center');
echo '<div align="center">';
echo '<form action="replace.php">';
echo '<form action="replace.php" method="post">';
echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'">';
echo 'Search whole database for: <input type="text" name="search"><br />';
echo 'Replace with this string: <input type="text" name="replace"><br /></br />';
@@ -28,6 +32,7 @@ if (!$search or !$replace or !confirm_sesskey()) { /// Print a form
echo '</form>';
echo '</div>';
print_simple_box_end();
admin_externalpage_print_footer($adminroot);
die;
}
@@ -37,6 +42,13 @@ if (!$tables = $db->Metatables() ) { // No tables yet at all.
}
print_simple_box_start('center');
/// Turn off time limits, sometimes upgrades can be slow.
@set_time_limit(0);
@ob_implicit_flush(true);
while(@ob_end_flush());
foreach ($tables as $table) {
if (in_array($table, array($CFG->prefix.'config'))) { // Don't process these
continue;
@@ -45,14 +57,22 @@ foreach ($tables as $table) {
foreach ($columns as $column => $data) {
if (in_array($data->type, array('text','mediumtext','longtext','varchar'))) { // Text stuff only
$db->debug = true;
execute_sql("UPDATE {$CFG->prefix}$table SET $column = REPLACE($column, '$search', '$replace');");
execute_sql("UPDATE $table SET $column = REPLACE($column, '$search', '$replace');");
$db->debug = false;
}
}
}
}
print_simple_box_end();
/// Rebuild course cache which might be incorrect now
notify('Rebuilding course cache...');
rebuild_course_cache();
notify('...finished');
print_continue('index.php');
admin_externalpage_print_footer($adminroot);
?>
+120
View File
@@ -0,0 +1,120 @@
<?php
require_once('../../../config.php');
require_once($CFG->dirroot.'/lib/statslib.php');
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('reportcourseoverview', $adminroot);
admin_externalpage_print_header($adminroot);
$report = optional_param('report', STATS_REPORT_ACTIVE_COURSES, PARAM_INT);
$time = optional_param('time', 0, PARAM_INT);
$numcourses = optional_param('numcourses', 20, PARAM_INT);
require_capability('moodle/site:viewreports', get_context_instance(CONTEXT_SYSTEM, SITEID)); // needed?
if (empty($CFG->enablestats)) {
redirect("$CFG->wwwroot/$CFG->admin/settings.php?section=stats", get_string('mustenablestats', 'admin'));
}
$course = get_site();
stats_check_uptodate($course->id);
$strreports = get_string('reports');
$strcourseoverview = get_string('courseoverview');
$reportoptions = stats_get_report_options($course->id,STATS_MODE_RANKED);
$tableprefix = $CFG->prefix.'stats_';
$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();
if (empty($earliestmonth)) $earliestmonth = time();
$now = stats_get_base_daily();
$lastweekend = stats_get_base_weekly();
$lastmonthend = stats_get_base_monthly();
$timeoptions = stats_get_time_options($now,$lastweekend,$lastmonthend,$earliestday,$earliestweek,$earliestmonth);
if (empty($timeoptions)) {
error(get_string('nostatstodisplay'), $CFG->wwwroot.'/course/view.php?id='.$course->id);
}
echo '<form action="index.php" method="post">'."\n";
$table->width = '*';
$table->align = array('left','left','left','left','left','left');
$table->data[] = array(get_string('statsreporttype'),choose_from_menu($reportoptions,'report',$report,'','','',true),
get_string('statstimeperiod'),choose_from_menu($timeoptions,'time',$time,'','','',true),
'<input type="text" name="numcourses" size="3" maxlength="2" value="'.$numcourses.'" />',
'<input type="submit" value="'.get_string('view').'" />') ;
print_table($table);
echo '</form>';
if (!empty($report) && !empty($time)) {
$param = stats_get_parameters($time,$report,SITEID,STATS_MODE_RANKED);
if (!empty($param->sql)) {
$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;
}
error_log($sql);
$courses = get_records_sql($sql, 0, $numcourses);
if (empty($courses)) {
notify(get_string('statsnodata'));
} else {
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');
$table->head = array(get_string('course'),$param->line1);
if (!empty($param->line2)) {
$table->head[] = $param->line2;
}
if (!empty($param->line3)) {
$table->head[] = $param->line3;
}
foreach ($courses as $c) {
$a = array();
$a[] = '<a href="'.$CFG->wwwroot.'/course/view.php?id='.$c->courseid.'">'.get_field('course','shortname','id',$c->courseid).'</a>';
$a[] = $c->line1;
if (isset($c->line2)) {
$a[] = $c->line2;
}
if (isset($c->line3)) {
$a[] = round($c->line3,2);
}
$table->data[] = $a;
}
print_table($table);
}
}
admin_externalpage_print_footer($adminroot);
?>
@@ -0,0 +1,57 @@
<?php // $Id$
require_once('../../../config.php');
require_once($CFG->dirroot.'/lib/statslib.php');
require_once($CFG->dirroot.'/lib/graphlib.php');
$report = required_param('report', PARAM_INT);
$time = required_param('time', PARAM_INT);
$numcourses = required_param('numcourses', PARAM_INT);
require_login();
require_capability('moodle/site:viewreports', get_context_instance(CONTEXT_SYSTEM, SITEID));
stats_check_uptodate($course->id);
$param = stats_get_parameters($time,$report,SITEID,STATS_MODE_RANKED);
if (!empty($param->sql)) {
$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;
}
$courses = get_records_sql($sql, 0, $numcourses);
if (empty($courses)) {
error(get_string('statsnodata'),$CFG->wwwroot.'/'.$CFG->admin.'/report/course/index.php');
}
$graph = new graph(750,400);
$graph->parameter['legend'] = 'outside-right';
$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;
}
foreach ($courses as $c) {
$graph->x_data[] = get_field('course','shortname','id',$c->courseid);
$graph->y_data['bar1'][] = $c->{$param->graphline};
}
$graph->y_order = array('bar1');
$graph->y_format['bar1'] = array('colour' => 'blue','bar' => 'fill','legend' => $param->{$param->graphline});
$graph->draw_stack();
?>
+31
View File
@@ -0,0 +1,31 @@
<?php // $Id$
require_once('../../../config.php');
require_once($CFG->dirroot.'/course/lib.php');
require_once($CFG->dirroot.'/course/report/log/lib.php');
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('reportlog', $adminroot);
admin_externalpage_print_header($adminroot);
$course = get_site();
print_heading(get_string('chooselogs') .':');
print_log_selector_form($course);
echo '<br />';
print_heading(get_string('chooselivelogs') .':');
echo '<center><h3>';
link_to_popup_window('/course/report/log/live.php?id='. $course->id,'livelog', get_string('livelogs'), 500, 800);
echo '</h3></center>';
admin_externalpage_print_footer($adminroot);
?>
+195
View File
@@ -0,0 +1,195 @@
<?php
/**
* A SimpleTest report format for Moodle.
*
* @copyright &copy; 2006 The Open University
* @author N.D.Freear@open.ac.uk, T.J.Hunt@open.ac.uk
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @version $Id$
* @package SimpleTestEx
*/
/** */
require_once(dirname(__FILE__) . '/../../../config.php');
require_once($CFG->libdir . '/moodlelib.php');
require_once($CFG->libdir . '/simpletestlib/reporter.php');
/**
* Extended in-browser test displayer. HtmlReporter generates
* only failure messages and a pass count. ExHtmlReporter also
* generates pass messages and a time-stamp.
*
* @package SimpleTestEx
*/
class ExHtmlReporter extends HtmlReporter {
// Options set when the class is created.
var $showpasses;
// Lang strings. Set in the constructor.
var $strrunonlyfolder;
var $strrunonlyfile;
var $strseparator;
/**
* Constructor.
*
* @param bool $showpasses Whether this reporter should output anything for passes.
*/
function ExHtmlReporter($showpasses) {
global $CFG;
$this->HtmlReporter();
$this->showpasses = $showpasses;
$this->strrunonlyfolder = $this->get_string('runonlyfolder');
$this->strrunonlyfile = $this->get_string('runonlyfile');
$this->strseparator = ' <img src="' . $CFG->pixpath . '/a/r_breadcrumb.gif" class="resize" alt="" /> ';
}
/**
* Called when a pass needs to be output.
*/
function paintPass($message) {
//(Implicitly call grandparent, as parent not implemented.)
parent::paintPass($message);
if ($this->showpasses) {
$this->_paintPassFail('pass', $message);
}
}
/**
* Called when a fail needs to be output.
*/
function paintFail($message) {
// Explicitly call grandparent, not parent::paintFail.
SimpleScorer::paintFail($message);
$this->_paintPassFail('fail', $message);
}
/**
* Called when an error (uncaught exception or PHP error) needs to be output.
*/
function paintError($message) {
// Explicitly call grandparent, not parent::paintFail.
SimpleScorer::paintError($message);
$this->_paintPassFail('exception', $message);
}
/**
* Private method. Used by printPass/Fail/Error.
*/
function _paintPassFail($passorfail, $message) {
global $FULLME, $CFG;
print_simple_box_start('', '100%', '', 5, $passorfail . ' generalbox');
$url = $this->_htmlEntities($this->_stripParameterFromUrl($FULLME, 'path'));
echo '<b class="', $passorfail, '">', $this->get_string($passorfail), '</b>: ';
$breadcrumb = $this->getTestList();
array_shift($breadcrumb);
$file = array_shift($breadcrumb);
$pathbits = preg_split('/\/|\\\\/', substr($file, strlen($CFG->dirroot) + 1));
$file = array_pop($pathbits);
$folder = '';
foreach ($pathbits as $pathbit) {
$folder .= $pathbit . '/';
echo "<a href=\"{$url}path=$folder\" title=\"$this->strrunonlyfolder\">$pathbit</a>/";
}
echo "<a href=\"{$url}path=$folder$file\" title=\"$this->strrunonlyfile\">$file</a>";
echo $this->strseparator, implode($this->strseparator, $breadcrumb);
echo $this->strseparator, '<br />', $this->_htmlEntities($message), "\n\n";
print_simple_box_end();
flush();
}
/**
* Called when a notice needs to be output.
*/
function paintNotice($message) {
$this->paintMessage($this->_htmlEntities($message));
}
/**
* Paints a simple supplementary message.
* @param string $message Text to display.
*/
function paintMessage($message) {
if ($this->showpasses) {
print_simple_box_start('', '100%');
echo '<span class="notice">', $this->get_string('notice'), '</span>: ';
$breadcrumb = $this->getTestList();
array_shift($breadcrumb);
echo implode($this->strseparator, $breadcrumb);
echo $this->strseparator, '<br />', $message, "\n";
print_simple_box_end();
flush();
}
}
/**
* Output anything that should appear above all the test output.
*/
function paintHeader($test_name) {
// We do this the moodle way instead.
}
/**
* Output anything that should appear below all the test output, e.g. summary information.
*/
function paintFooter($test_name) {
$summarydata = new stdClass;
$summarydata->run = $this->getTestCaseProgress();
$summarydata->total = $this->getTestCaseCount();
$summarydata->passes = $this->getPassCount();
$summarydata->fails = $this->getFailCount();
$summarydata->exceptions = $this->getExceptionCount();
if ($summarydata->fails == 0 && $summarydata->exceptions == 0) {
$status = "pass";
} else {
$status = "fail";
}
echo '<div class="unittestsummary ', $status, '">';
echo $this->get_string('summary', $summarydata);
echo '</div>';
echo '<div class="performanceinfo">',
$this->get_string('runat', date('<b>d-m-Y H:i T</b>')),
$this->get_string('version', SimpleTestOptions::getVersion()),
'</div>';
}
/**
* Strip a specified parameter from the query string of a URL, if present.
* Adds a separator to the end of the URL, so that a new parameter
* can easily be appended. For example (assuming $param = 'frog'):
*
* http://example.com/index.php -> http://example.com/index.php?
* http://example.com/index.php?frog=1 -> http://example.com/index.php?
* http://example.com/index.php?toad=1 -> http://example.com/index.php?toad=1&
* http://example.com/index.php?frog=1&toad=1 -> http://example.com/index.php?toad=1&
*
* @param string $url the URL to modify.
* @param string $param the parameter to strip from the URL, if present.
*
* @return string The modified URL.
*/
function _stripParameterFromUrl($url, $param) {
$url = preg_replace('/(\?|&)' . $param . '=[^&]*&?/', '$1', $url);
if (strpos($url, '?') === false) {
$url = $url . '?';
} else {
$url = $url . '&';
}
return $url;
}
/**
* Look up a lang string in the appropriate file.
*/
function get_string($identifier, $a = NULL) {
return get_string($identifier, 'simpletest', $a);
}
}
?>
+208
View File
@@ -0,0 +1,208 @@
<?php
/**
* A SimpleTest GroupTest that automatically finds all the
* test files in a directory tree according to certain rules.
*
* @copyright &copy; 2006 The Open University
* @author N.D.Freear@open.ac.uk, T.J.Hunt@open.ac.uk
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @version $Id$
* @package SimpleTestEx
*/
/** */
require_once(dirname(__FILE__) . '/../../../config.php');
require_once($CFG->libdir . '/simpletestlib/test_case.php');
/**
* This is a composite test class for finding test cases and
* other RunnableTest classes in a directory tree and combining
* them into a group test.
* @package SimpleTestEx
*/
class AutoGroupTest extends GroupTest {
var $thorough;
var $showsearch;
function AutoGroupTest($showsearch, $thorough, $test_name = null) {
$this->GroupTest($test_name);
$this->showsearch = $showsearch;
$this->thorough = $thorough;
}
function setLabel($test_name) {
//:HACK: there is no GroupTest::setLabel, so access parent::_label.
$this->_label = $test_name;
}
function addIgnoreFolder($ignorefolder) {
$this->ignorefolders[]=$ignorefolder;
}
function _recurseFolders($path) {
if ($this->showsearch) {
echo '<li>' . basename(realpath($path)) . '<ul>';
}
$files = scandir($path);
static $s_count = 0;
foreach ($files as $file) {
if ($file == '.' || $file == '..') {
continue;
}
$file_path = $path . '/' . $file;
if (is_dir($file_path)) {
if ($file != 'CVS' && !in_array($file_path, $this->ignorefolders)) {
$this->_recurseFolders($file_path);
}
} elseif (preg_match('/simpletest(\/|\\\\)test.*\.php$/', $file_path) ||
($this->thorough && preg_match('/simpletest(\/|\\\\)slowtest.*\.php$/', $file_path))) {
$s_count++;
// OK, found: this shows as a 'Notice' for any 'simpletest/test*.php' file.
$this->addTestCase(new FindFileNotice($file_path, 'Found unit test file, '. $s_count));
// addTestFile: Unfortunately this doesn't return fail/success (bool).
$this->addTestFile($file_path, true);
}
}
if ($this->showsearch) {
echo '</ul></li>';
}
return $s_count;
}
function findTestFiles($dir) {
if ($this->showsearch) {
echo '<p>Searching folder: ' . realpath($dir) . '</p><ul>';
}
$path = $dir;
$count = $this->_recurseFolders($path);
if ($count <= 0) {
$this->addTestCase(new BadAutoGroupTest($path, 'Search complete. No unit test files found'));
} else {
$this->addTestCase(new AutoGroupTestNotice($path, 'Search complete. Total unit test files found: '. $count));
}
if ($this->showsearch) {
echo '</ul>';
}
return $count;
}
function addTestFile($file, $internalcall = false) {
if ($this->showsearch) {
if ($internalcall) {
echo '<li><b>' . basename($file) . '</b></li>';
} else {
echo '<p>Adding test file: ' . realpath($file) . '</p>';
}
// Make sure that syntax errors show up suring the search, otherwise you often
// get blank screens because evil people turn down error_reporting elsewhere.
error_reporting(E_ALL);
}
if(!is_file($file) ){
parent::addTestCase(new BadTest($file, 'Not a file or does not exist'));
}
parent::addTestFile($file);
}
}
/* ======================================================================= */
// get_class_ex: Insert spaces to prettify the class-name.
function get_class_ex($object) {
return preg_replace('/(.?)([A-Z])/', '${1} ${2}', get_class($object));
}
/**
* A failing test base-class for when a test suite has NOT loaded properly.
* See class, simple_test.php: BadGroupTest.
* @package SimpleTestEx
*/
class BadTest {
var $label;
var $error;
function BadTest($label, $error) {
$this->label = $label;
$this->error = $error;
}
function getLabel() {
return $this->label;
}
function run(&$reporter) {
$reporter->paintGroupStart(basename(__FILE__), $this->getSize());
$reporter->paintFail(get_class_ex($this) .' [' . $this->getLabel() .
'] with error [' . $this->error . ']');
$reporter->paintGroupEnd($this->getLabel());
return $reporter->getStatus();
}
/**
* @return int the number of test cases starting.
*/
function getSize() {
return 0;
}
}
/**
* An informational notice base-class for when a test suite is being processed.
* See class, simple_test.php: BadGroupTest.
* @package SimpleTestEx
*/
class Notice {
var $label;
var $status;
function Notice($label, $error) {
$this->label = $label;
$this->status = $error;
}
function getLabel() {
return $this->label;
}
function run(&$reporter) {
$reporter->paintGroupStart(basename(__FILE__), $this->getSize());
$reporter->paintNotice(get_class_ex($this) .
' ['. $this->getLabel() .'] with status [' . $this->status . ']');
$reporter->paintGroupEnd($this->getLabel());
return $reporter->getStatus();
}
function getSize() {
return 0;
}
}
/**
* A failing folder test for when the test-user specifies an invalid directory
* (run.php?folder=woops).
* @package SimpleTestEx
*/
class BadFolderTest extends BadTest { }
/**
* A failing auto test for when no unit test files are found.
* @package SimpleTestEx
*/
class BadAutoGroupTest extends BadTest { }
/**
* Auto group test notices - 1. Search complete. 2. A test file has been found.
* @package SimpleTestEx
*/
class AutoGroupTestNotice extends Notice { }
class FindFileNotice extends Notice { }
?>
+109
View File
@@ -0,0 +1,109 @@
<?php
/**
* Run the unit tests.
*
* @copyright &copy; 2006 The Open University
* @author N.D.Freear@open.ac.uk, T.J.Hunt@open.ac.uk
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @version $Id$
* @package SimpleTestEx
*/
/** */
require_once(dirname(__FILE__) . '/../../../config.php');
require_once($CFG->libdir . '/moodlelib.php');
require_once($CFG->libdir.'/adminlib.php');
require_once('ex_simple_test.php');
require_once('ex_reporter.php');
require_login();
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
/* The UNITTEST constant can be checked elsewhere if you need to know
* when your code is being run as part of a unit test. */
define('UNITTEST', true);
$langfile = 'simpletest';
// CGI arguments
$path = optional_param('path', null, PARAM_PATH);
$showpasses = optional_param('showpasses', false, PARAM_BOOL);
$showsearch = optional_param('showsearch', false, PARAM_BOOL);
$thorough = optional_param('thorough', false, PARAM_BOOL);
// Print the header.
$adminroot = admin_get_root();
admin_externalpage_setup('reportsimpletest', $adminroot);
$strtitle = get_string('unittests', $langfile);
admin_externalpage_print_header($adminroot);
if (!is_null($path)) {
// Create the group of tests.
$test =& new AutoGroupTest($showsearch, $thorough);
// OU specific. We use the _nonproject folder for stuff we want to
// keep in CVS, but which is not really relevant. It does no harm
// to leave this here.
$test->addIgnoreFolder($CFG->dirroot . '/_nonproject');
// Make the reporter, which is what displays the results.
$reporter = new ExHtmlReporter($showpasses);
if ($showsearch) {
print_heading('Searching for test cases');
}
flush();
// Work out what to test.
if (substr($path, 0, 1) == '/') {
$path = substr($path, 1);
}
$path = $CFG->dirroot . '/' . $path;
if (substr($path, -1) == '/') {
$path = substr($path, 0, -1);
}
$displaypath = substr($path, strlen($CFG->dirroot) + 1);
$ok = true;
if (is_file($path)) {
$test->addTestFile($path);
} else if (is_dir($path)){
$test->findTestFiles($path);
} else {
print_simple_box(get_string('pathdoesnotexist', $langfile, $path), '', '', '', '', 'errorbox');
$ok = false;
}
// If we have something to test, do it.
if ($ok) {
if ($path == $CFG->dirroot) {
$title = get_string('moodleunittests', $langfile, get_string('all', $langfile));
} else {
$title = get_string('moodleunittests', $langfile, $displaypath);
}
print_heading($title);
$test->run($reporter);
}
$formheader = get_string('retest', $langfile);
} else {
$displaypath = '';
$formheader = get_string('rununittests', $langfile);
}
// Print the form for adjusting options.
print_simple_box_start('center', '70%');
echo '<form method="GET" action="index.php">';
print_heading($formheader);
echo '<p>'; print_checkbox('showpasses', 1, $showpasses, get_string('showpasses', $langfile)); echo '</p>';
echo '<p>'; print_checkbox('showsearch', 1, $showsearch, get_string('showsearch', $langfile)); echo '</p>';
echo '<p>'; print_checkbox('thorough', 1, $thorough, get_string('thorough', $langfile)); echo '</p>';
echo '<p>';
echo '<label for="path">', get_string('onlytest', $langfile), '</label> ';
echo '<input type="text" id="path" name="path" value="', $displaypath, '" size="60" />';
echo '</p>';
echo '<input type="submit" value="' . get_string('runtests', $langfile) . '" />';
echo '</form>';
print_simple_box_end();
// Footer.
admin_externalpage_print_footer($adminroot);
?>
+77
View File
@@ -0,0 +1,77 @@
<?php // $Id$
require_once('../../../config.php');
require_once($CFG->dirroot.'/lib/statslib.php');
require_once($CFG->dirroot.'/course/report/stats/lib.php');
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('reportstats', $adminroot);
admin_externalpage_print_header($adminroot);
$courseid = optional_param('course', SITEID, PARAM_INT);
$report = optional_param('report', 0, PARAM_INT);
$time = optional_param('time', 0, PARAM_INT);
$mode = optional_param('mode', STATS_MODE_GENERAL, PARAM_INT);
$userid = optional_param('userid', 0, PARAM_INT);
$roleid = 0;
if ($report > 50) {
$roleid = substr($report,1);
$report = 5;
}
if ($report == STATS_REPORT_USER_LOGINS) {
$courseid = SITEID; //override
}
if ($mode == STATS_MODE_RANKED) {
redirect($CFG->wwwroot.'/'.$CFG->admin.'/report/stats/index.php?time='.$time);
}
if (!$course = get_record("course","id",$courseid)) {
error("That's an invalid course id");
}
if (!empty($userid)) {
if (!$user = get_record('user','id',$userid)) {
error("That's an invalid user id");
}
}
require_login();
if (empty($CFG->enablestats)) {
redirect("$CFG->wwwroot/$CFG->admin/settings.php?section=stats", get_string('mustenablestats', 'admin'));
}
require_capability('moodle/site:viewreports', get_context_instance(CONTEXT_COURSE, $course->id));
add_to_log($course->id, "course", "report stats", "report/stats/index.php?course=$course->id", $course->id);
stats_check_uptodate($course->id);
// $strreports = get_string("reports");
// $strstats = get_string('stats');
//
// $menu = report_stats_mode_menu($course, $mode, $time);
//
//
// $crumb = "<a href=\"{$CFG->wwwroot}/admin\">".get_string('administration')."</a> ->
// <a href=\"{$CFG->wwwroot}/admin/report.php\">$strreports</a> ->
// $strstats";
// print_header("$course->shortname: $strstats", "$course->fullname",
// $crumb, '', '', true, '&nbsp;', $menu);
require_once($CFG->dirroot.'/course/report/stats/report.php');
admin_externalpage_print_footer($adminroot);
?>
-117
View File
@@ -1,117 +0,0 @@
<?php
require_once(dirname(dirname(__FILE__)).'/config.php');
require_once($CFG->dirroot.'/lib/statslib.php');
$report = optional_param('report',STATS_REPORT_ACTIVE_COURSES,PARAM_INT);
$time = optional_param('time',0,PARAM_INT);
$numcourses = optional_param('numcourses',20,PARAM_INT);
if (empty($CFG->enablestats)) {
error("Stats is not enabled.");
}
require_login();
if (!isadmin()) {
error("This page is for admins only");
}
$course = get_site();
stats_check_uptodate($course->id);
$strheader = get_string('reports');
$strnav = '<a href="'.$CFG->wwwroot.'/admin/index.php">'.get_string('administration').'</a> -> '.$strheader;
$reportoptions = stats_get_report_options($course->id,STATS_MODE_RANKED);
$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');
if (empty($earliestday)) $earliestday = time();
if (empty($earliestweek)) $earliestweek = time();
if (empty($earliestmonth)) $earliestmonth = time();
$now = stats_get_base_daily();
$lastweekend = stats_get_base_weekly();
$lastmonthend = stats_get_base_monthly();
$timeoptions = stats_get_time_options($now,$lastweekend,$lastmonthend,$earliestday,$earliestweek,$earliestmonth);
if (empty($timeoptions)) {
error(get_string('nostatstodisplay'), $CFG->wwwroot.'/course/view.php?id='.$course->id);
}
print_header($strheader,$strheader,$strnav,'','',true,'&nbsp');
echo '<form action="reports.php" method="post">'."\n";
$table->width = '*';
$table->align = array('left','left','left','left','left','left');
$table->data[] = array(get_string('statsreporttype'),choose_from_menu($reportoptions,'report',$report,'','','',true),
get_string('statstimeperiod'),choose_from_menu($timeoptions,'time',$time,'','','',true),
'<input type="text" name="numcourses" size="3" maxlength="2" value="'.$numcourses.'" />',
'<input type="submit" value="'.get_string('view').'" />') ;
print_table($table);
echo '</form>';
if (!empty($report) && !empty($time)) {
$param = stats_get_parameters($time,$report,SITEID,STATS_MODE_RANKED);
$sql = "SELECT courseid,".$param->fields." FROM ".$CFG->prefix.'stats_'.$param->table
." WHERE timeend >= ".$param->timeafter
." GROUP BY courseid "
.$param->extras
." ORDER BY ".$param->orderby
." LIMIT ".$numcourses;
$courses = get_records_sql($sql);
if (empty($courses)) {
error(get_string('statsnodata'),$CFG->wwwroot.'/admin/reports.php');
}
echo '<center><img src="'.$CFG->wwwroot.'/admin/reportsgraph.php?time='.$time.'&report='.$report.'&numcourses='.$numcourses.'" /></center>';
$table = new object();
$table->align = array('left','center','center','center');
$table->head = array(get_string('course'),$param->line1);
if (!empty($param->line2)) {
$table->head[] = $param->line2;
}
if (!empty($param->line3)) {
$table->head[] = $param->line3;
}
foreach ($courses as $c) {
$a = array();
$a[] = '<a href="'.$CFG->wwwroot.'/course/view.php?id='.$c->courseid.'">'.get_field('course','shortname','id',$c->courseid).'</a>';
$a[] = print_numeric_value($c->line1);
if (isset($c->line2)) {
$a[] = print_numeric_value($c->line2);
}
if (isset($c->line3)) {
$a[] = print_numeric_value($c->line3);
}
$table->data[] = $a;
}
print_table($table);
}
print_footer();
function print_numeric_value($value) {
list($whole, $decimals) = split ('[.,]', $value, 2);
if (intval($decimals) > 0)
return number_format($value,2,".",",");
else
return $value;
}
?>
-56
View File
@@ -1,56 +0,0 @@
<?php
{
require_once(dirname(dirname(__FILE__)).'/config.php');
require_once($CFG->dirroot.'/lib/statslib.php');
require_once($CFG->dirroot.'/lib/graphlib.php');
$report = required_param('report',0,PARAM_INT);
$time = required_param('time',0,PARAM_INT);
$numcourses = required_param('numcourses',20,PARAM_INT);
require_login();
if (!isadmin()) {
error("You must be an admin to use this page");
}
stats_check_uptodate($course->id);
$param = stats_get_parameters($time,$report,SITEID,STATS_MODE_RANKED);
$sql = "SELECT courseid,".$param->fields." FROM ".$CFG->prefix.'stats_'.$param->table
." WHERE timeend >= ".$param->timeafter
." GROUP BY courseid "
.$param->extras
." ORDER BY ".$param->orderby
." LIMIT ".$numcourses;
$courses = get_records_sql($sql);
if (empty($courses)) {
error(get_string('statsnodata'),$CFG->wwwroot.'/admin/reports.php');
}
$graph = new graph(750,400);
$graph->parameter['legend'] = 'outside-right';
$graph->parameter['legend_size'] = 10;
$graph->parameter['x_axis_angle'] = 90;
$graph->parameter['title'] = false; // moodle will do a nicer job.
if ($report != STATS_REPORT_ACTIVE_COURSES) {
$graph->parameter['y_decimal_left'] = 2;
}
foreach ($courses as $c) {
$graph->x_data[] = get_field('course','shortname','id',$c->courseid);
$graph->y_data['bar1'][] = $c->{$param->graphline};
}
$graph->y_order = array('bar1');
$graph->y_format['bar1'] = array('colour' => 'blue','bar' => 'fill','legend' => $param->{$param->graphline});
$graph->draw_stack();
}
?>
+102
View File
@@ -0,0 +1,102 @@
<?php
/**
* this page defines what roles can access (grant user that role and override that roles'
* capabilities in different context. For example, we can say that Teachers can only grant
* student role or modify student role's capabilities. Note that you need both the right
* capability moodle/role:assign or moodle/role:manage and this database table roles_deny_grant
* to be able to grant roles. If a user has moodle/role:manage at site level assignment
* then he can modify the roles_allow_assign table via this interface.
*/
require_once('../../config.php');
/// check capabilities here
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('defineroles', $adminroot);
$sitecontext = get_context_instance(CONTEXT_SYSTEM, SITEID);
require_capability('moodle/role:manage', $sitecontext);
/// form processiong here
/// get all roles
$roles = get_all_roles();
if ($grant = data_submitted()) {
foreach ($grant as $grole => $val) {
if ($grole == 'dummy') {
continue;
}
$string = explode('_', $grole);
$temp[$string[1]][$string[2]] = 1; // if set, means can access
}
// if current assignment is in data_submitted, ignore, else, write deny into db
foreach ($roles as $srole) {
foreach ($roles as $trole) {
if (isset($temp[$srole->id][$trole->id])) { // if set, need to write to db
if (!$record = get_record('role_allow_assign', 'roleid', $srole->id, 'allowassign', $trole->id)) {
allow_assign($srole->id, $trole->id);
}
} else { //if set, means can access, attempt to remove it from db
delete_records('role_allow_assign', 'roleid', $srole->id, 'allowassign', $trole->id);
}
}
}
}
/// displaying form here
admin_externalpage_print_header($adminroot);
$currenttab='allowassign';
require_once('managetabs.php');
$table->tablealign = 'center';
$table->cellpadding = 5;
$table->cellspacing = 0;
$table->width = '90%';
$table->align[] = 'right';
/// get all the roles identifier
foreach ($roles as $role) {
$rolesname[] = format_string($role->name);
$roleids[] = $role->id;
$table->align[] = 'center';
$table->wrap[] = 'nowrap';
}
$table->head = array_merge(array(''), $rolesname);
foreach ($roles as $role) {
$beta = get_box_list($role->id, $roleids);
$table->data[] = array_merge(array(format_string($role->name)), $beta);
}
print_simple_box(get_string('configallowassign', 'admin'), 'center');
echo '<form action="allowassign.php" method="post">';
print_table($table);
echo '<div class="singlebutton"><input type="submit" value="'.get_string('savechanges').'"/></div>';
echo '<input type="hidden" name="dummy" value="1" />'; // this is needed otherwise we do not know a form has been submitted
echo '</form>';
admin_externalpage_print_footer($adminroot);
function get_box_list($roleid, $arraylist){
foreach ($arraylist as $targetid) {
if (get_record('role_allow_assign', 'roleid', $roleid, 'allowassign', $targetid)) {
$array[] = '<input type="checkbox" name="s_'.$roleid.'_'.$targetid.'" value="1" checked="checked"/>';
} else {
$array[] = '<input type="checkbox" name="s_'.$roleid.'_'.$targetid.'" value="1" />';
}
}
return $array;
}
?>
+99
View File
@@ -0,0 +1,99 @@
<?php
/**
* this page defines what roles can override (override roles in different context. For example,
* we can say that Admin can override teacher roles in a course
* To be able to override roles. If a user has moodle/role:override at context level
* and be in the roles_allow_override table.
*/
require_once('../../config.php');
/// check capabilities here
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('defineroles', $adminroot);
$sitecontext = get_context_instance(CONTEXT_SYSTEM, SITEID);
require_capability('moodle/role:manage', $sitecontext);
/// form processiong here
/// get all roles
$roles = get_all_roles();
if ($grant = data_submitted()) {
foreach ($grant as $grole => $val) {
if ($grole == 'dummy') {
continue;
}
$string = explode('_', $grole);
$temp[$string[1]][$string[2]] = 1; // if set, means can access
}
// if current assignment is in data_submitted, ignore, else, write deny into db
foreach ($roles as $srole) {
foreach ($roles as $trole) {
if (isset($temp[$srole->id][$trole->id])) { // if set, need to write to db
if (!$record = get_record('role_allow_override', 'roleid', $srole->id, 'allowoverride', $trole->id)) {
allow_override($srole->id, $trole->id);
}
} else { //if set, means can access, attempt to remove it from db
delete_records('role_allow_override', 'roleid', $srole->id, 'allowoverride', $trole->id);
}
}
}
}
/// displaying form here
admin_externalpage_print_header($adminroot);
$currenttab='allowoverride';
require_once('managetabs.php');
$table->tablealign = 'center';
$table->cellpadding = 5;
$table->cellspacing = 0;
$table->width = '90%';
$table->align[] = 'right';
/// get all the roles identifier
foreach ($roles as $role) {
$rolesname[] = format_string($role->name);
$roleids[] = $role->id;
$table->align[] = 'center';
$table->wrap[] = 'nowrap';
}
$table->head = array_merge(array(''), $rolesname);
foreach ($roles as $role) {
$beta = get_box_list($role->id, $roleids);
$table->data[] = array_merge(array(format_string($role->name)), $beta);
}
print_simple_box(get_string('configallowoverride', 'admin'), 'center');
echo '<form action="allowoverride.php" method="post">';
print_table($table);
echo '<div class="singlebutton"><input type="submit" value="'.get_string('savechanges').'"/></div>';
echo '<input type="hidden" name="dummy" value="1" />'; // this is needed otherwise we do not know a form has been submitted
echo '</form>';
admin_externalpage_print_footer($adminroot);
// returns array
function get_box_list($roleid, $arraylist){
foreach ($arraylist as $targetid) {
if (get_record('role_allow_override', 'roleid', $roleid, 'allowoverride', $targetid)) {
$array[] = '<input type="checkbox" name="s_'.$roleid.'_'.$targetid.'" value="1" checked="checked"/>';
} else {
$array[] = '<input type="checkbox" name="s_'.$roleid.'_'.$targetid.'" value="1" />';
}
}
return $array;
}
?>
+109
View File
@@ -0,0 +1,109 @@
<form name="assignform" id="assignform" method="post" action="">
<input type="hidden" name="previoussearch" value="<?php p($previoussearch) ?>" />
<input type="hidden" name="userid" value="<?php p($userid) ?>" />
<input type="hidden" name="courseid" value="<?php p($courseid) ?>" />
<input type="hidden" name="sesskey" value="<?php p(sesskey()) ?>" />
<input type="hidden" name="contextid" value="<?php p($contextid) ?>" />
<input type="hidden" name="roleid" value="<?php p($roleid) ?>" />
<table align="center" border="0" cellpadding="5" cellspacing="0">
<tr>
<td valign="top">
<?php print_string('existingusers', 'role', count($contextusers)); ?>
</td>
<td></td>
<td valign="top">
<?php print_string('potentialusers', 'role', $usercount); ?>
</td>
</tr>
<tr>
<td valign="top">
<select name="removeselect[]" size="20" id="removeselect" multiple
onFocus="document.assignform.add.disabled=true;
document.assignform.remove.disabled=false;
document.assignform.addselect.selectedIndex=-1;" />
<?php
$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" 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">
<select name="addselect[]" size="20" id="addselect" multiple
onFocus="document.assignform.add.disabled=false;
document.assignform.remove.disabled=true;
document.assignform.removeselect.selectedIndex=-1;">
<?php
if (!empty($searchtext)) {
echo "<optgroup label=\"$strsearchresults (" . $availableusers->_numOfRows . ")\">\n";
while ($user = rs_fetch_next_record($availableusers)) {
if (!isset($contextusers[$user->id])) {
$fullname = fullname($user, true);
echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
}
}
echo "</optgroup>\n";
} else {
if ($usercount > MAX_USERS_PER_PAGE) {
echo '<optgroup label="'.get_string('toomanytoshow').'"><option></option></optgroup>'."\n"
.'<optgroup label="'.get_string('trysearching').'"><option></option></optgroup>'."\n";
} else {
while ($user = rs_fetch_next_record($availableusers)) {
if (!isset($contextusers[$user->id])) {
$fullname = fullname($user, true);
echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
}
}
}
}
?>
</select>
<br />
<input type="text" name="searchtext" size="30" value="<?php p($searchtext, true) ?>"
onFocus ="document.assignform.add.disabled=true;
document.assignform.remove.disabled=true;
document.assignform.removeselect.selectedIndex=-1;
document.assignform.addselect.selectedIndex=-1;"
onkeydown = "var keyCode = event.which ? event.which : event.keyCode;
if (keyCode == 13) {
document.assignform.previoussearch.value=1;
document.assignform.submit();
} " />
<input name="search" id="search" type="submit" value="<?php p($strsearch) ?>" />
<?php
if (!empty($searchusers)) {
echo '<input name="showall" id="showall" type="submit" value="'.$strshowall.'" />'."\n";
}
?>
</td>
</tr>
</table>
</form>
+289
View File
@@ -0,0 +1,289 @@
<?php // $Id$
// Script to assign users to contexts
require_once('../../config.php');
require_once($CFG->dirroot.'/mod/forum/lib.php');
require_once($CFG->libdir.'/adminlib.php');
define("MAX_USERS_PER_PAGE", 5000);
$contextid = required_param('contextid',PARAM_INT); // context id
$roleid = optional_param('roleid', 0, PARAM_INT); // required role id
$add = optional_param('add', 0, PARAM_BOOL);
$remove = optional_param('remove', 0, PARAM_BOOL);
$showall = optional_param('showall', 0, PARAM_BOOL);
$searchtext = optional_param('searchtext', '', PARAM_RAW); // search string
$previoussearch = optional_param('previoussearch', 0, PARAM_BOOL);
$hidden = optional_param('hidden', 0, PARAM_BOOL); // whether this assignment is hidden
$timestart = optional_param('timestart', 0, PARAM_INT);
$timeend = optional_param('timened', 0, PARAM_INT);
$userid = optional_param('userid', 0, PARAM_INT); // needed for user tabs
$courseid = optional_param('courseid', 0, PARAM_INT); // needed for user tabs
$errors = array();
$previoussearch = ($searchtext != '') or ($previoussearch) ? 1:0;
$baseurl = 'assign.php?contextid='.$contextid;
if (!empty($userid)) {
$baseurl .= '&amp;userid='.$userid;
}
if (!empty($courseid)) {
$baseurl .= '&amp;courseid='.$courseid;
}
if (! $context = get_context_instance_by_id($contextid)) {
error("Context ID was incorrect (can't find it)");
}
$inmeta = 0;
if ($context->contextlevel == CONTEXT_COURSE) {
$courseid = $context->instanceid;
if ($course = get_record('course', 'id', $courseid)) {
$inmeta = $course->metacourse;
} else {
error('Invalid course id');
}
} else if (!empty($courseid)){ // we need this for user tabs in user context
if (!$course = get_record('course', 'id', $courseid)) {
error('Invalid course id');
}
} else {
$courseid = SITEID;
$course = get_site();
}
if ($context->contextlevel == CONTEXT_COURSE) {
require_login($context->instanceid);
} else {
require_login();
}
require_capability('moodle/role:assign', $context);
$assignableroles = get_assignable_roles($context);
/// Get some language strings
$strassignusers = get_string('assignusers', 'role');
$strpotentialusers = get_string('potentialusers', 'role');
$strexistingusers = get_string('existingusers', 'role');
$straction = get_string('assignroles', 'role');
$strroletoassign = get_string('roletoassign', 'role');
$strcurrentcontext = get_string('currentcontext', 'role');
$strsearch = get_string('search');
$strshowall = get_string('showall');
$strparticipants = get_string('participants');
$strsearchresults = get_string('searchresults');
/// Make sure this user can assign that role
if ($roleid) {
if (!user_can_assign($context, $roleid)) {
error ('you can not override this role in this context');
}
}
if ($userid) {
$user = get_record('user', 'id', $userid);
$fullname = fullname($user, has_capability('moodle/site:viewfullnames', $context));
}
/// Print the header and tabs
if ($context->contextlevel == CONTEXT_USER) {
/// course header
if ($courseid != SITEID) {
print_header("$fullname", "$fullname",
"<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a> ->
<a href=\"$CFG->wwwroot/user/index.php?id=$course->id\">$strparticipants</a> -> <a href=\"$CFG->wwwroot/user/view.php?id=$userid&course=$courseid\">$fullname</a> ->".$straction,
"", "", true, "&nbsp;", navmenu($course));
/// site header
} else {
print_header("$course->fullname: $fullname", "$course->fullname",
"<a href=\"$CFG->wwwroot/user/view.php?id=$userid&course=$courseid\">$fullname</a> -> $straction", "", "", true, "&nbsp;", navmenu($course));
}
$showroles = 1;
$currenttab = 'assign';
include_once($CFG->dirroot.'/user/tabs.php');
} else if ($context->contextlevel == CONTEXT_SYSTEM) {
$adminroot = admin_get_root();
admin_externalpage_setup('assignroles', $adminroot);
admin_externalpage_print_header($adminroot);
} else {
$currenttab = '';
$tabsmode = 'assign';
include_once('tabs.php');
}
/// Process incoming role assignment
if ($frm = data_submitted()) {
if ($add and !empty($frm->addselect) and confirm_sesskey()) {
$timemodified = time();
foreach ($frm->addselect as $adduser) {
if (!$adduser = clean_param($adduser, PARAM_INT)) {
continue;
}
$allow = true;
if ($inmeta) {
if (has_capability('moodle/course:managemetacourse', $context, $adduser)) {
//ok
} else {
$managerroles = get_roles_with_capability('moodle/course:managemetacourse', CAP_ALLOW, $context);
if (!empty($managerroles) and !array_key_exists($roleid, $managerroles)) {
$erruser = get_record('user', 'id', $adduser, '','','','', 'id, firstname, lastname');
$errors[] = get_string('metaassignerror', 'role', fullname($erruser));
$allow = false;
}
}
}
if ($allow) {
if (! role_assign($roleid, $adduser, 0, $context->id, $timestart, $timeend, $hidden)) {
$errors[] = "Could not add user with id $adduser to this role!";
}
}
}
} 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) {
sync_metacourse($courseid);
$newroles = get_user_roles($context, $removeuser, false);
if (!empty($newroles) and !array_key_exists($roleid, $newroles)) {
$erruser = get_record('user', 'id', $removeuser, '','','','', 'id, firstname, lastname');
$errors[] = get_string('metaunassignerror', 'role', fullname($erruser));
$allow = false;
}
}
}
} else if ($showall) {
$searchtext = '';
$previoussearch = 0;
}
}
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, r.hidden')) {
$contextusers = array();
}
$select = "username <> 'guest' AND username <> 'changeme' AND deleted = 0 AND confirmed = 1";
$usercount = count_records_select('user', $select) - count($contextusers);
$searchtext = trim($searchtext);
if ($searchtext !== '') { // Search for a subset of remaining users
$LIKE = sql_ilike();
$FULLNAME = sql_fullname();
$select .= " AND ($FULLNAME $LIKE '%$searchtext%' OR email $LIKE '%$searchtext%') ";
}
$availableusers = get_recordset_sql('SELECT id, firstname, lastname, email
FROM '.$CFG->prefix.'user
WHERE '.$select.'
ORDER BY lastname ASC, firstname ASC');
/// In the .html file below we loop through these results and exclude any in $contextusers
echo '<form name="rolesform" action="assign.php" method="post">';
echo '<div align="center">'.$strcurrentcontext.': '.print_context_name($context).'<br/>';
if ($userid) {
echo '<input type="hidden" name="userid" value="'.$userid.'" />';
}
echo '<input type="hidden" name="courseid" value="'.$courseid.'" />';
echo '<input type="hidden" name="contextid" value="'.$context->id.'" />'.$strroletoassign.': ';
choose_from_menu ($assignableroles, 'roleid', $roleid, get_string('listallroles', 'role').'...', $script='rolesform.submit()');
echo '</div></form>';
print_simple_box_start('center');
include('assign.html');
print_simple_box_end();
if (!empty($errors)) {
$msg = '<p>';
foreach ($errors as $e) {
$msg .= $e.'<br />';
}
$msg .= '</p>';
print_simple_box_start('center');
notify($msg);
print_simple_box_end();
}
} else { // Print overview table
// sync metacourse enrolments if needed
if ($inmeta) {
sync_metacourse($course);
}
$table->tablealign = 'center';
$table->cellpadding = 5;
$table->cellspacing = 0;
$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);
$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);
}
if ($context->contextlevel == CONTEXT_SYSTEM) {
admin_externalpage_print_footer($adminroot);
} else {
print_footer($course);
}
?>
+157
View File
@@ -0,0 +1,157 @@
<?php //$Id$
switch ($action) {
case 'add':
$submitlabel = get_string('addrole', 'role');
break;
case 'view':
$submitlabel = get_string('listallroles', 'role');
break;
case 'edit':
default:
$submitlabel = get_string('savechanges');
}
?>
<form name="rolesform" action="manage.php" method="post">
<input type="hidden" name="roleid" value="<?php p($roleid) ?>" />
<input type="hidden" name="sesskey" value="<?php p(sesskey()) ?>" />
<input type="hidden" name="action" value="<?php if ($action != 'view') { echo p($action); } ?>" />
<table cellpadding="9" cellspacing="0" align="center">
<tr valign="top">
<td align="right"><?php print_string('name') ?>:</td>
<td><?php
if ($action == 'view') {
p($role->name);
} else {
echo '<input type="text" name="name" maxlength="254" size="50" value="'.s($role->name).'" />';
if (isset($errors["name"])) formerr($errors["name"]);
} ?></td>
</tr>
<tr valign="top">
<td align="right"><?php print_string('shortname') ?>:</td>
<td><?php
if ($action == 'view') {
p($role->shortname);
} else {
echo '<input type="text" name="shortname" maxlength="20" size="15" value="'.s($role->shortname).'" />';
if (isset($errors["shortname"])) formerr($errors["shortname"]);
} ?></td>
</tr>
<tr valign="top">
<td align="right"><?php print_string('description') ?>:</td>
<td><?php
if ($action == 'view') {
p($role->description);
$usehtmleditor = false;
} else {
print_textarea($usehtmleditor, 10, 50, 50, 10, 'description', $role->description);
} ?></td>
</tr>
</table>
<?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 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
// init these 2
$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="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
$contextlevel = $capability->contextlevel;
$component = $capability->component;
if (empty($errors)) {
// check the capability override for this cap, this role in this context
$sitecontext = get_context_instance(CONTEXT_SYSTEM, SITEID);
$localoverride = get_local_override($roleid, $sitecontext->id, $capability->name);
} else {
$localoverride = new object();
$localoverride->permission = $role->{$capability->name};
}
$disabled = ($action != 'edit' and $action != 'add') ? ' disabled="disabled" ' : '';
$riskinfo = '<td class="risk managetrust">';
$rowclasses = '';
if (RISK_MANAGETRUST & (int)$capability->riskbitmask) {
$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 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 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 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 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 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 } ?>
</table>
<div class="submit" align="center">
<input type="submit" value="<?php p($submitlabel) ?>" />
<?php if ($action != 'view') { ?>
<input type="submit" name="cancel" value="<?php print_string('cancel') ?>" />
<?php } ?>
</div>
</form>
+421
View File
@@ -0,0 +1,421 @@
<?php //$Id$
require_once('../../config.php');
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('defineroles', $adminroot);
$roleid = optional_param('roleid', 0, PARAM_INT); // if set, we are editing a role
$name = optional_param('name', '', PARAM_MULTILANG); // new role name
$shortname = optional_param('shortname', '', PARAM_RAW); // new role shortname, special cleaning before storage
$description = optional_param('description', '', PARAM_CLEAN); // new role desc
$action = optional_param('action', '', PARAM_ALPHA);
$confirm = optional_param('confirm', 0, PARAM_BOOL);
$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');
}
$errors = array();
$newrole = false;
$roles = get_all_roles();
$rolescount = count($roles);
/// fix sort order if needed
$rolesort = array();
$i = 0;
foreach ($roles as $rolex) {
$rolesort[$i] = $rolex->id;
if ($rolex->sortorder != $i) {
$r = new object();
$r->id = $rolex->id;
$r->sortorder = $i;
update_record('role', $r);
$roles[$rolex->id]->sortorder = $i;
}
$i++;
}
/// form processing, editing a role, adding a role, deleting a role etc.
switch ($action) {
case 'add':
if ($data = data_submitted() and confirm_sesskey()) {
$shortname = moodle_strtolower(clean_param(clean_filename($shortname), PARAM_SAFEDIR)); // only lowercase safe ASCII characters
if (empty($name)) {
$errors['name'] = get_string('errorbadrolename', 'role');
} else if (count_records('role', 'name', $name)) {
$errors['name'] = get_string('errorexistsrolename', 'role');
}
if (empty($shortname)) {
$errors['shortname'] = get_string('errorbadroleshortname', 'role');
} else if (count_records('role', 'shortname', $shortname)) {
$errors['shortname'] = get_string('errorexistsroleshortname', 'role');
}
if (empty($errors)) {
$newrole = create_role($name, $shortname, $description);
} else {
$newrole = new object();
$newrole->name = $name;
$newrole->shortname = $shortname;
$newrole->description = $description;
}
$allowed_values = array(CAP_INHERIT, CAP_ALLOW, CAP_PREVENT, CAP_PROHIBIT);
$capabilities = fetch_context_capabilities($sitecontext); // capabilities applicable in this context
foreach ($capabilities as $cap) {
if (!isset($data->{$cap->name})) {
continue;
}
$capname = $cap->name;
$value = clean_param($data->{$cap->name}, PARAM_INT);
if (!in_array($value, $allowed_values)) {
continue;
}
if (empty($errors)) {
assign_capability($capname, $value, $newrole, $sitecontext->id);
} else {
$newrole->$capname = $value;
}
}
if (empty($errors)) {
redirect('manage.php');
}
}
break;
case 'edit':
if ($data = data_submitted() and confirm_sesskey()) {
$shortname = moodle_strtolower(clean_param(clean_filename($shortname), PARAM_SAFEDIR)); // only lowercase safe ASCII characters
if (empty($name)) {
$errors['name'] = get_string('errorbadrolename', 'role');
} else if ($rs = get_records('role', 'name', $name)) {
unset($rs[$roleid]);
if (!empty($rs)) {
$errors['name'] = get_string('errorexistsrolename', 'role');
}
}
if (empty($shortname)) {
$errors['shortname'] = get_string('errorbadroleshortname', 'role');
} else if ($rs = get_records('role', 'shortname', $shortname)) {
unset($rs[$roleid]);
if (!empty($rs)) {
$errors['shortname'] = get_string('errorexistsroleshortname', 'role');
}
}
if (!empty($errors)) {
$newrole = new object();
$newrole->name = $name;
$newrole->shortname = $shortname;
$newrole->description = $description;
}
$allowed_values = array(CAP_INHERIT, CAP_ALLOW, CAP_PREVENT, CAP_PROHIBIT);
$capabilities = fetch_context_capabilities($sitecontext); // capabilities applicable in this context
foreach ($capabilities as $cap) {
if (!isset($data->{$cap->name})) {
continue;
}
$capname = $cap->name;
$value = clean_param($data->{$cap->name}, PARAM_INT);
if (!in_array($value, $allowed_values)) {
continue;
}
if (!empty($errors)) {
$newrole->$capname = $value;
continue;
}
// edit default caps
$SQL = "SELECT * FROM {$CFG->prefix}role_capabilities
WHERE roleid = $roleid AND capability = '$capname'
AND contextid = $sitecontext->id";
$localoverride = get_record_sql($SQL);
if ($localoverride) { // update current overrides
if ($value == CAP_INHERIT) { // inherit = delete
unassign_capability($capname, $roleid, $sitecontext->id);
} else {
$localoverride->permission = $value;
$localoverride->timemodified = time();
$localoverride->modifierid = $USER->id;
update_record('role_capabilities', $localoverride);
}
} else { // insert a record
if ($value != CAP_INHERIT) {
assign_capability($capname, $value, $roleid, $sitecontext->id);
}
}
}
if (empty($errors)) {
// update normal role settings
$role->id = $roleid;
$role->name = $name;
$role->shortname = $shortname;
$role->description = $description;
if (!update_record('role', $role)) {
error('Could not update role!');
}
redirect('manage.php');
}
}
break;
case 'delete':
if ($confirm and data_submitted() and confirm_sesskey()) {
if (!delete_role($roleid)) {
error('Could not delete role with ID '.$roleid);
}
} else if (confirm_sesskey()){
// show confirmation
admin_externalpage_print_header($adminroot);
$optionsyes = array('action'=>'delete', 'roleid'=>$roleid, 'sesskey'=>sesskey(), 'confirm'=>1);
$a = new object();
$a->id = $roleid;
$a->name = $roles[$roleid]->name;
$a->shortname = $roles[$roleid]->shortname;
$a->count = (int)count_records('role_assignments', 'roleid', $roleid);
notice_yesno(get_string('deleterolesure', 'role', $a), 'manage.php', 'manage.php', $optionsyes, NULL, 'post', 'get');
admin_externalpage_print_footer($adminroot);
die;
}
redirect('manage.php');
break;
case 'moveup':
if (array_key_exists($roleid, $roles) and confirm_sesskey()) {
$role = $roles[$roleid];
if ($role->sortorder > 0) {
$above = $roles[$rolesort[$role->sortorder - 1]];
if (!switch_roles($role, $above)) {
error("Cannot move role with ID $roleid");
}
}
}
redirect('manage.php');
break;
case 'movedown':
if (array_key_exists($roleid, $roles) and confirm_sesskey()) {
$role = $roles[$roleid];
if ($role->sortorder + 1 < $rolescount) {
$below = $roles[$rolesort[$role->sortorder + 1]];
if (!switch_roles($role, $below)) {
error("Cannot move role with ID $roleid");
}
}
}
redirect('manage.php');
break;
default:
break;
}
/// print UI now
admin_externalpage_print_header($adminroot);
$currenttab = 'manage';
include_once('managetabs.php');
if (($roleid and ($action == 'view' or $action == 'edit')) or $action == 'add') { // view or edit role details
if ($action == 'add') {
$roleid = 0;
if (empty($errors) or empty($newrole)) {
$role = new object();
$role->name='';
$role->shortname='';
$role->description='';
} else {
$role = stripslashes_safe($newrole);
}
} else if ($action == 'edit' and !empty($errors) and !empty($newrole)) {
$role = stripslashes_safe($newrole);
} else {
if(!$role = get_record('role', 'id', $roleid)) {
error('Incorrect role ID!');
}
}
foreach ($roles as $rolex) {
$roleoptions[$rolex->id] = strip_tags(format_string($rolex->name));
}
// this is the array holding capabilities of this role sorted till this context
$r_caps = role_context_capabilities($roleid, $sitecontext);
// this is the available capabilities assignable in this context
$capabilities = fetch_context_capabilities($sitecontext);
$usehtmleditor = can_use_html_editor();
switch ($action) {
case 'add':
print_heading_with_help(get_string('addrole', 'role'), 'roles');
break;
case 'view':
print_heading_with_help(get_string('viewrole', 'role'), 'roles');
break;
case 'edit':
print_heading_with_help(get_string('editrole', 'role'), 'roles');
break;
}
echo '<div align="center" class="selector">';
if ($action == 'view') {
echo get_string('selectrole', 'role').': ';
echo '<form style="display:inline;" name="switchrole" action="manage.php" method="get">';
echo '<input type="hidden" name="action" value="view" />';
choose_from_menu ($roleoptions, 'roleid', $roleid, get_string('listallroles', 'role').'...', $script='switchrole.submit()');
echo '</form>';
echo '<form style="display:inline;" name="editrole" action="manage.php" method="get">';
echo '<input type="hidden" name="roleid" value="'.$roleid.'" />';
echo '<input type="hidden" name="action" value="edit" />';
echo '<input type="submit" value="'.get_string('edit').'" />';
echo '</form>';
}
echo '</div>';
$lang = str_replace('_utf8', '', current_language());
print_simple_box_start('center');
include_once('manage.html');
print_simple_box_end();
if ($usehtmleditor) {
use_html_editor('description');
}
} else {
print_heading_with_help(get_string('roles', 'role'), 'roles');
$table = new object;
$table->tablealign = 'center';
$table->align = array('right', 'left', 'left', 'left');
$table->wrap = array('nowrap', '', 'nowrap','nowrap');
$table->cellpadding = 5;
$table->cellspacing = 0;
$table->width = '90%';
$table->data = array();
$table->head = array(get_string('name'),
get_string('description'),
get_string('shortname'),
get_string('edit'));
/*************************
* List all current roles *
**************************/
foreach ($roles as $role) {
$stredit = get_string('edit');
$strdelete = get_string('delete');
$strmoveup = get_string('moveup');
$strmovedown = get_string('movedown');
$row = array();
$row[0] = '<a href="manage.php?roleid='.$role->id.'&amp;action=view">'.format_string($role->name).'</a>';
$row[1] = format_text($role->description, FORMAT_HTML);
$row[2] = s($role->shortname);
$row[3] = '<a title="'.$stredit.'" href="manage.php?action=edit&roleid='.$role->id.'">'.
'<img src="'.$CFG->pixpath.'/t/edit.gif" height="11" width="11" border="0" alt="'.$stredit.'" /></a> ';
$row[3] .= '<a title="'.$strdelete.'" href="manage.php?action=delete&roleid='.$role->id.'&sesskey='.sesskey().'">'.
'<img src="'.$CFG->pixpath.'/t/delete.gif" height="11" width="11" border="0" alt="'.$strdelete.'" /></a> ';
if ($role->sortorder != 0) {
$row[3] .= '<a title="'.$strmoveup.'" href="manage.php?action=moveup&roleid='.$role->id.'&sesskey='.sesskey().'">'.
'<img src="'.$CFG->pixpath.'/t/up.gif" height="11" width="11" border="0" alt="'.$strmoveup.'" /></a> ';
} else {
$row[3] .= '<img src="'.$CFG->wwwroot.'/pix/spacer.gif" height="11" width="11" border="0" alt="" /> ';
}
if ($role->sortorder+1 < $rolescount) {
$row[3] .= '<a title="'.$strmovedown.'" href="manage.php?action=movedown&roleid='.$role->id.'&sesskey='.sesskey().'">'.
'<img src="'.$CFG->pixpath.'/t/down.gif" height="11" width="11" border="0" alt="'.$strmovedown.'" /></a> ';
} else {
$row[3] .= '<img src="'.$CFG->wwwroot.'/pix/spacer.gif" height="11" width="11" border="0" alt="" /> ';
}
$table->data[] = $row;
}
print_table($table);
$options = new object();
$options->action = 'add';
print_single_button('manage.php', $options, get_string('addrole', 'role'), 'get');
}
admin_externalpage_print_footer($adminroot);
die;
/// ================ some internal functions ====================////
function switch_roles($first, $second) {
$status = true;
//first find temorary sortorder number
$tempsort = count_records('role') + 3;
while (get_record('role','sortorder', $tempsort)) {
$tempsort += 3;
}
$r1 = new object();
$r1->id = $first->id;
$r1->sortorder = $tempsort;
$r2 = new object();
$r2->id = $second->id;
$r2->sortorder = $first->sortorder;
if (!update_record('role', $r1)) {
debugging("Can not update role with ID $r1->id!");
$status = false;
}
if (!update_record('role', $r2)) {
debugging("Can not update role with ID $r2->id!");
$status = false;
}
$r1->sortorder = $second->sortorder;
if (!update_record('role', $r1)) {
debugging("Can not update role with ID $r1->id!");
$status = false;
}
return $status;
}
?>
+14
View File
@@ -0,0 +1,14 @@
<?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'),'', true);
$toprow[] = new tabobject('allowassign', $CFG->wwwroot.'/'.$CFG->admin.'/roles/allowassign.php', get_string('allowassign', 'role'));
$toprow[] = new tabobject('allowoverride', $CFG->wwwroot.'/'.$CFG->admin.'/roles/allowoverride.php', get_string('allowoverride', 'role'));
$tabs = array($toprow);
print_tabs($tabs, $currenttab);
?>
+133
View File
@@ -0,0 +1,133 @@
<?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) ?>">
<input type="hidden" name="sesskey" value="<?php p(sesskey()) ?>" />
<input type="hidden" name="userid" value="<?php p($userid) ?>" />
<input type="hidden" name="courseid" value="<?php p($courseid) ?>" />
<table class="rolecap">
<tr>
<th class="name" align="left"><?php print_string('capability','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
// init these 2
$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="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
$contextlevel = $capability->contextlevel;
$component = $capability->component;
// check the capability override for this cap, this role in this context
if (isset($localoverrides[$capability->name])) {
$localpermission = $localoverrides[$capability->name]->permission;
} else {
$localpermission = 0; // Just inherit
}
if (isset($r_caps[$capability->name])) {
$isallow = $r_caps[$capability->name] > 0;
$isprevent = $r_caps[$capability->name] < 0 && $r_caps[$capability->name] > -500;
$isprohibit = $r_caps[$capability->name] <= -500;
} else {
$isallow = 0;
$isprevent = 0;
$isprohibit = 0;
}
$isdisabled = $isprohibit || islegacy($capability->name);
$riskinfo = '<td class="risk managetrust">';
$rowclasses = '';
if (RISK_MANAGETRUST & (int)$capability->riskbitmask) {
$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 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 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 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 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 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="0"
<?php
if ($localpermission == CAP_INHERIT) {echo 'checked="checked"';}
if ($isdisabled) {echo 'disabled="disabled"';}?> />
</td>
<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" 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" 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>
<?php echo $riskinfo; ?>
</tr>
<?php } ?>
</table>
<br />
<div align="center">
<input type="submit" value="<?php print_string('savechanges') ?>" />
<input type="submit" name="cancel" value="<?php print_string('cancel') ?>" />
</div>
</form>
+209
View File
@@ -0,0 +1,209 @@
<?php //$Id$
require_once('../../config.php');
$contextid = required_param('contextid',PARAM_INT); // context id
$roleid = optional_param('roleid', 0, PARAM_INT); // requested role id
$userid = optional_param('userid', 0, PARAM_INT); // needed for user tabs
$courseid = optional_param('courseid', 0, PARAM_INT); // needed for user tabs
$cancel = optional_param('cancel', 0, PARAM_BOOL);
if (!$context = get_record('context', 'id', $contextid)) {
error('Bad context ID');
}
if (!$sitecontext = get_context_instance(CONTEXT_SYSTEM, SITEID)) {
error('No site ID');
}
if ($context->id == $sitecontext->id) {
error ('Can not override base role capabilities');
}
require_capability('moodle/role:override', $context); // Just to make sure
if ($courseid) {
if (!$course = get_record('course', 'id', $courseid)) {
error('Bad course ID');
}
} else {
$course = $SITE;
}
$baseurl = 'override.php?contextid='.$context->id;
if (!empty($userid)) {
$baseurl .= '&amp;userid='.$userid;
}
if (!empty($courseid)) {
$baseurl .= '&amp;courseid='.$courseid;
}
if ($cancel) {
redirect($baseurl);
}
/// Get some language strings
$strroletooverride = get_string('roletooverride', 'role');
$stroverrideusers = get_string('overrideusers', 'role');
$straction = get_string('overrideroles', 'role');
$strcurrentrole = get_string('currentrole', 'role');
$strcurrentcontext = get_string('currentcontext', 'role');
$strparticipants = get_string('participants');
/// Make sure this user can override that role
if ($roleid) {
if (!user_can_override($context, $roleid)) {
error ('you can not override this role in this context');
}
}
if ($userid) {
$user = get_record('user', 'id', $userid);
$fullname = fullname($user, has_capability('moodle/site:viewfullnames', $context));
}
/// Process incoming role override
if ($data = data_submitted() and $roleid and confirm_sesskey()) {
$allowed_values = array(CAP_INHERIT, CAP_ALLOW, CAP_PREVENT, CAP_PROHIBIT);
$capabilities = fetch_context_capabilities($context); // capabilities applicable in this context
$localoverrides = get_records_select('role_capabilities', "roleid = $roleid AND contextid = $context->id",
'', 'capability, permission, id');
foreach ($capabilities as $cap) {
if (!isset($data->{$cap->name})) {
continue;
}
$capname = $cap->name;
$value = clean_param($data->{$cap->name}, PARAM_INT);
if (!in_array($value, $allowed_values)) {
continue;
}
if (isset($localoverrides[$capname])) { // Something exists, so update it
if ($value == CAP_INHERIT) { // inherit = delete
delete_records('role_capabilities', 'roleid', $roleid, 'contextid', $context->id,
'capability', $capname);
} else {
$localoverride = new object();
$localoverride->id = $localoverrides[$capname]->id;
$localoverride->permission = $value;
$localoverride->timemodified = time();
$localoverride->modifierid = $USER->id;
if (!update_record('role_capabilities', $localoverride)) {
error('Could not update a capability!');
}
}
} else { // insert a record
if ($value != CAP_INHERIT) { // Ignore inherits
$localoverride = new object();
$localoverride->capability = $capname;
$localoverride->contextid = $context->id;
$localoverride->roleid = $roleid;
$localoverride->permission = $value;
$localoverride->timemodified = time();
$localoverride->modifierid = $USER->id;
if (!insert_record('role_capabilities', $localoverride)) {
error('Could not insert a capability!');
}
}
}
}
redirect($baseurl);
}
/// Print the header and tabs
if ($context->contextlevel == CONTEXT_USER) {
/// course header
if ($course->id != SITEID) {
print_header("$fullname", "$fullname",
"<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a> ->
<a href=\"$CFG->wwwroot/user/index.php?id=$course->id\">$strparticipants</a> -> <a href=\"$CFG->wwwroot/user/view.php?id=$userid&amp;course=$course->id\">$fullname</a> -> $straction",
"", "", true, "&nbsp;", navmenu($course));
/// site header
} else {
print_header("$course->fullname: $fullname", "$course->fullname",
"<a href=\"$CFG->wwwroot/user/view.php?id=$userid&amp;course=$course->id\">$fullname</a> -> $straction", "", "", true, "&nbsp;", navmenu($course));
}
$showroles = 1;
$currenttab = 'override';
include_once($CFG->dirroot.'/user/tabs.php');
} else {
$currenttab = '';
$tabsmode = 'override';
include_once('tabs.php');
}
print_heading_with_help(get_string('overrides', 'role'), 'overrides');
$overridableroles = get_overridable_roles($context);
if ($roleid) {
/// prints a form to swap roles
echo '<form name="rolesform" action="override.php" method="get">';
echo '<div align="center">'.$strcurrentcontext.': '.print_context_name($context).'<br/>';
if ($userid) {
echo '<input type="hidden" name="userid" value="'.$userid.'" />';
}
if ($courseid) {
echo '<input type="hidden" name="courseid" value="'.$courseid.'" />';
}
echo '<input type="hidden" name="contextid" value="'.$context->id.'" />'.$strroletooverride.': ';
choose_from_menu ($overridableroles, 'roleid', $roleid, get_string('listallroles', 'role').'...', $script='rolesform.submit()');
echo '</div></form>';
$parentcontexts = get_parent_contexts($context);
if (!empty($parentcontexts)) {
$parentcontext = array_shift($parentcontexts);
$parentcontext = get_context_instance_by_id($parentcontext);
} else {
$parentcontext = $context; // site level in override??
}
$r_caps = role_context_capabilities($roleid, $parentcontext);
$localoverrides = get_records_select('role_capabilities', "roleid = $roleid AND contextid = $context->id",
'', 'capability, permission, id');
$lang = str_replace('_utf8', '', current_language());
// Get the capabilities overrideable in this context
if ($capabilities = fetch_context_capabilities($context)) {
print_simple_box_start('center');
include_once('override.html');
print_simple_box_end();
} else {
notice(get_string('nocapabilitiesincontext', 'role'),
$CFG->wwwroot.'/'.$CFG->admin.'/roles/'.$baseurl);
}
} else { // Print overview table
$table->tablealign = 'center';
$table->cellpadding = 5;
$table->cellspacing = 0;
$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");
$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);
}
print_footer($course);
?>
+169
View File
@@ -0,0 +1,169 @@
<?php // $Id$
// Handles headers and tabs for the roles control at any level apart from SYSTEM level
if ($currenttab != 'update') {
switch ($context->contextlevel) {
case CONTEXT_SYSTEM:
$stradministration = get_string('administration');
print_header($SITE->fullname, "$SITE->fullname","<a href=\"../index.php\">$stradministration</a> -> $straction");
break;
case CONTEXT_PERSONAL:
break;
case CONTEXT_USER:
print_header();
break;
case CONTEXT_COURSECAT:
$category = get_record('course_categories', 'id', $context->instanceid);
$strcategories = get_string("categories");
$strcategory = get_string("category");
$strcourses = get_string("courses");
print_header("$SITE->shortname: $category->name", "$SITE->fullname: $strcourses",
"<a href=\"$CFG->wwwroot/course/index.php\">$strcategories</a> -> <a href=\"$CFG->wwwroot/course/category.php?id=$category->id\">$category->name</a> -> $straction", "", "", true);
break;
case CONTEXT_COURSE:
$streditcoursesettings = get_string("editcoursesettings");
$course = get_record('course', 'id', $context->instanceid);
print_header($streditcoursesettings, "$course->fullname",
"<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a> -> $straction");
break;
case CONTEXT_GROUP:
break;
case CONTEXT_MODULE:
// get module type?
if (!$cm = get_record('course_modules','id',$context->instanceid)) {
error('Bad course module ID');
}
if (!$module = get_record('modules','id',$cm->module)) { //$module->name;
error('Bad module ID');
}
if (!$course = get_record('course','id',$cm->course)) {
error('Bad course ID');
}
if (!$instance = get_record($module->name, 'id', $cm->instance)) {
error("The required instance of this module doesn't exist");
}
$strnav = "<a href=\"$CFG->wwwroot/mod/$module->name/view.php?id=$cm->id\">$instance->name</a> ->";
$fullmodulename = get_string("modulename", $module->name);
$streditinga = get_string("editinga", "moodle", $fullmodulename);
$strmodulenameplural = get_string("modulenameplural", $module->name);
if ($module->name == "label") {
$focuscursor = "";
} else {
$focuscursor = "form.name";
}
$COURSE = $course;
print_header_simple($streditinga, '',
"<a href=\"$CFG->wwwroot/mod/$module->name/index.php?id=$course->id\">$strmodulenameplural</a> ->
$strnav <a href=\"$CFG->wwwroot/course/mod.php?update=$cm->id&sesskey=".sesskey()."\">$streditinga</a> -> $straction", $focuscursor, "", false);
break;
case CONTEXT_BLOCK:
if ($blockinstance = get_record('block_instance', 'id', $context->instanceid)) {
if ($block = get_record('block', 'id', $blockinstance->blockid)) {
$blockname = print_context_name($context);
$navigation = $blockname. ' -> '.$straction;
switch ($blockinstance->pagetype) {
case 'course-view':
if ($course = get_record('course', 'id', $blockinstance->pageid)) {
if ($course->id != SITEID) {
$navigation = "<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a> -> $navigation";
}
print_header("$straction: $blockname", $course->fullname, $navigation);
}
break;
case 'blog-view':
$strblogs = get_string('blogs','blog');
$navigation = '<a href="'.$CFG->wwwroot.'/blog/index.php">'.
$strblogs.'</a> -> '.$navigation;
print_header("$straction: $strblogs", $SITE->fullname, $navigation);
break;
default:
print_header("$straction: $blockname", $SITE->fullname, $navigation);
break;
}
}
}
break;
default:
error ('This is an unknown context!');
return false;
}
}
if ($context->contextlevel != CONTEXT_SYSTEM) { // Print tabs for anything except SYSTEM context
if ($context->contextlevel == CONTEXT_MODULE) { // only show update button if module?
$toprow[] = new tabobject('update', $CFG->wwwroot.'/course/mod.php?update='.
$context->instanceid.'&amp;return=true&amp;sesskey='.sesskey(), get_string('update'));
}
$toprow[] = new tabobject('roles', $CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.
$context->id, get_string('roles'));
if (isset($tabsmode)) {
if (!isset($assignableroles)) {
$assignableroles = get_assignable_roles($context);
}
if (!isset($overridableroles)) {
$overridableroles = get_overridable_roles($context);
}
$inactive[] = 'roles';
if (!empty($assignableroles)) {
$secondrow[] = new tabobject('assign',
$CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.$context->id,
get_string('assignroles', 'role'),
get_string('showallroles', 'role'),
true);
}
if (!empty($overridableroles)) {
$secondrow[] = new tabobject('override',
$CFG->wwwroot.'/'.$CFG->admin.'/roles/override.php?contextid='.$context->id,
get_string('overrideroles', 'role'),
get_string('showallroles', 'role'),
true);
}
if ($tabsmode == 'override') {
$currenttab = 'override';
} elseif ($tabsmode == 'assign') {
$currenttab = 'assign';
}
} else {
$inactive[] = '';
}
if (!empty($secondrow)) {
$tabs = array($toprow, $secondrow);
} else {
$tabs = array($toprow);
}
print_tabs($tabs, $currenttab, $inactive);
}
?>
+150
View File
@@ -0,0 +1,150 @@
<?php // $Id$
// searches for admin settings
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
$query = trim(stripslashes_safe(required_param('query', PARAM_NOTAGS))); // Search string
$adminroot = admin_get_root();
admin_externalpage_setup('search', $adminroot); // now hidden page
$CFG->adminsearchquery = $query; // So we can reference it in search boxes later in this invocation
// now we'll deal with the case that the admin has submitted the form with changed settings
$statusmsg = '';
if ($data = data_submitted()) {
$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($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)) {
$statusmsg = get_string('changessaved');
} else {
$statusmsg = get_string('errorwithsettings', 'admin') . ' <br />' . $errors;
}
} else {
error(get_string('confirmsesskeybad', 'error'));
}
// 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);
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() . '" />';
echo '<input type="hidden" name="query" value="' . s($query) . '" />';
echo '<fieldset>';
echo '<div class="clearer"><!-- --></div>';
if ($resultshtml != '') {
echo $resultshtml;
echo '<div class="form-buttons"><input class="form-submit" type="submit" value="' . get_string('savechanges','admin') . '" /></div>';
} else {
echo get_string('noresults','admin');
}
echo '</fieldset>';
echo '</form>';
admin_externalpage_print_footer($adminroot);
/**
* Find settings using a query.
*
* @param string &$node The node at which to start searching. Should be $ADMIN for all external calls to this function.
* @param string $query The search string.
* @return array An array containing admin_setting objects that match $query.
*/
function search_settings(&$node, $query) {
if (is_a($node, 'admin_category')) {
$return = array();
$entries = array_keys($node->children);
foreach ($entries as $entry) {
$return = array_merge($return, search_settings($node->children[$entry], $query));
}
return $return;
}
if (is_a($node, 'admin_settingpage')) {
$return = array();
foreach ($node->settings as $setting) {
if (stristr($setting->name,$query) || stristr($setting->visiblename,$query) || stristr($setting->description,$query)) {
$return[] =& $setting;
}
unset($setting); // needed to prevent odd (imho) reference behaviour
// see http://www.php.net/manual/en/language.references.whatdo.php#AEN6399
}
return $return;
}
return array();
}
function search_settings_html(&$node, $query) {
global $CFG;
if (is_a($node, 'admin_category')) {
$entries = array_keys($node->children);
$return = '';
foreach ($entries as $entry) {
$return .= search_settings_html($node->children[$entry], $query);
}
return $return;
}
if (is_a($node, 'admin_settingpage')) {
$foundsettings = array();
foreach ($node->settings as $setting) {
if (stristr($setting->name,$query) || stristr($setting->visiblename,$query) || stristr($setting->description,$query)) {
$foundsettings[] =& $setting;
}
unset($setting); // needed to prevent odd (imho) reference behaviour
// see http://www.php.net/manual/en/language.references.whatdo.php#AEN6399
}
$return = '';
if (count($foundsettings) > 0) {
$return .= print_heading(get_string('searchresults','admin').' - '. '<a href="' . $CFG->wwwroot . '/' . $CFG->admin . '/settings.php?section=' . $node->name . '">' . $node->visiblename . '</a>', '', 2, 'main', true);
$return .= '<fieldset class="adminsettings">' . "\n";
foreach ($foundsettings as $foundsetting) {
$return .= '<div class="clearer"><!-- --></div>' . "\n";
$return .= highlight($query,$foundsetting->output_html());
}
$return .= '</fieldset>';
}
return $return;
}
return '';
}
?>
+143
View File
@@ -0,0 +1,143 @@
<?php // $Id$
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/blocklib.php');
require_once($CFG->dirroot.'/'.$CFG->admin.'/pagelib.php');
if ($site = get_site()) {
require_login();
}
page_map_class(PAGE_ADMIN, 'page_admin');
$PAGE = page_create_object(PAGE_ADMIN, 0); // there must be any constant id number
$section = optional_param('section', '', PARAM_ALPHAEXT);
$PAGE->init_extra($section); // hack alert!
$adminediting = optional_param('adminedit', -1, PARAM_BOOL);
$return = optional_param('return','', PARAM_ALPHA);
if (!isset($USER->adminediting)) {
$USER->adminediting = false;
}
if ($PAGE->user_allowed_editing()) {
if ($adminediting == 1) {
$USER->adminediting = true;
} elseif ($adminediting == 0) {
$USER->adminediting = false;
}
}
$adminroot = admin_get_root();
$root = $adminroot->locate($PAGE->section);
if (!is_a($root, 'admin_settingpage')) {
error(get_string('sectionerror', 'admin'));
die;
}
if (!($root->check_access())) {
error(get_string('accessdenied', 'admin'));
die;
}
$CFG->pagepath = 'admin/setting/'.$section;
/// WRITING SUBMITTED DATA (IF ANY) -------------------------------------------------------------------------------
$statusmsg = '';
if ($data = data_submitted()) {
if (confirm_sesskey()) {
$olddbsessions = !empty($CFG->dbsessions);
$unslashed = (array)stripslashes_recursive($data);
$errors = $root->write_settings($unslashed);
//force logout if dbsession setting changes
if ($olddbsessions != !empty($CFG->dbsessions)) {
require_logout();
}
if (empty($errors)) {
switch ($return) {
case 'site':
redirect("$CFG->wwwroot/");
case 'admin':
redirect("$CFG->wwwroot/$CFG->admin/");
default:
$statusmsg = get_string('changessaved');
}
} else {
$statusmsg = get_string('errorwithsettings', 'admin') . ' <br />' . $errors;
}
} else {
error(get_string('confirmsesskeybad', 'error'));
}
// 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);
$preferred_width_left = bounded_number(BLOCK_L_MIN_WIDTH, blocks_preferred_width($pageblocks[BLOCK_POS_LEFT]),
BLOCK_L_MAX_WIDTH);
$preferred_width_right = bounded_number(BLOCK_R_MIN_WIDTH, blocks_preferred_width($pageblocks[BLOCK_POS_RIGHT]),
BLOCK_R_MAX_WIDTH);
$PAGE->print_header();
echo '<table id="layout-table"><tr>';
echo '<td style="width: ' . $preferred_width_left . 'px;" id="left-column">';
blocks_print_group($PAGE, $pageblocks, BLOCK_POS_LEFT);
echo '</td>';
echo '<td id="middle-column">';
} else {
print_header();
print_simple_box(get_string('configintrosite', 'admin'), 'center', '50%');
}
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 . '" />';
echo '<input type="hidden" name="return" value="' . $return . '" />';
print_heading($root->visiblename);
echo $root->output_html();
echo '<div class="form-buttons"><input class="form-submit" type="submit" value="' . get_string('savechanges','admin') . '" /></div>';
echo '</form>';
if (!empty($SITE->fullname)) {
echo '</td>';
echo '<td style="width: ' . $preferred_width_right . 'px;" id="right-column">';
blocks_print_group($PAGE, $pageblocks, BLOCK_POS_RIGHT);
echo '</td></tr></table>';
}
if (!empty($CFG->adminusehtmleditor)) {
use_html_editor();
}
print_footer();
?>
+133
View File
@@ -0,0 +1,133 @@
<?php // $Id$
// This file defines settingpages and externalpages under the "appearance" category
$ADMIN->add('appearance', new admin_category('themes', get_string('themes')));
// "themesettings" settingpage
$temp = new admin_settingpage('themesettings', get_string('themesettings', 'admin'));
$temp->add(new admin_setting_configtext('themelist', get_string('themelist', 'admin'), get_string('configthemelist','admin'), '', PARAM_NOTAGS));
$temp->add(new admin_setting_configcheckbox('allowuserthemes', get_string('allowuserthemes', 'admin'), get_string('configallowuserthemes', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('allowcoursethemes', get_string('allowcoursethemes', 'admin'), get_string('configallowcoursethemes', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('allowuserblockhiding', get_string('allowuserblockhiding', 'admin'), get_string('configallowuserblockhiding', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('showblocksonmodpages', get_string('showblocksonmodpages', 'admin'), get_string('configshowblocksonmodpages', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('tabselectedtofront', get_string('tabselectedtofronttext', 'admin'), get_string('tabselectedtofront', 'admin'), 0));
$ADMIN->add('themes', $temp);
$ADMIN->add('themes', new admin_externalpage('themeselector', get_string('themeselector','admin'), $CFG->wwwroot . '/theme/index.php'));
// "frontpage" settingpage
$temp = new admin_settingpage('frontpage', get_string('frontpage','admin'));
$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
$temp->add(new admin_setting_sitesetcheckbox('numsections', get_string('sitesection'),
get_string('sitesectionhelp','admin'), 1));
$temp->add(new admin_setting_sitesetselect('newsitems', get_string('newsitemsnumber'),
'', 3,
array('0' => '0',
'1' => '1',
'2' => '2',
'3' => '3',
'4' => '4',
'5' => '5',
'6' => '6',
'7' => '7',
'8' => '8',
'9' => '9',
'10' => '10')));
$temp->add(new admin_setting_configtext('coursesperpage', get_string('coursesperpage', 'admin'), get_string('configcoursesperpage', 'admin'), 20, PARAM_INT));
$ADMIN->add('appearance', $temp);
// calendar
$temp = new admin_settingpage('calendar', get_string('calendarsettings','admin'));
$temp->add(new admin_setting_special_adminseesall());
$temp->add(new admin_setting_configselect('calendar_startwday', get_string('configstartwday', 'admin'), get_string('helpstartofweek', 'admin'), 0,
array(
0 => get_string('sunday', 'calendar'),
1 => get_string('monday', 'calendar'),
2 => get_string('tuesday', 'calendar'),
3 => get_string('wednesday', 'calendar'),
4 => get_string('thursday', 'calendar'),
5 => get_string('friday', 'calendar'),
6 => get_string('saturday', 'calendar')
)));
$temp->add(new admin_setting_special_calendar_weekend());
$temp->add(new admin_setting_configtext('calendar_lookahead',get_string('configlookahead','admin'),get_string('helpupcominglookahead', 'admin'),21,PARAM_INT));
$temp->add(new admin_setting_configtext('calendar_maxevents',get_string('configmaxevents','admin'),get_string('helpupcomingmaxevents', 'admin'),10,PARAM_INT));
$ADMIN->add('appearance', $temp);
// "filtersettings" settingpage
$temp = new admin_settingpage('filtersettings', get_string('filtersettings', 'admin'));
$temp->add(new admin_setting_configselect('cachetext', get_string('cachetext', 'admin'), get_string('configcachetext', 'admin'), 60, array(604800 => get_string('numdays','',7),
86400 => get_string('numdays','',1),
43200 => get_string('numhours','',12),
10800 => get_string('numhours','',3),
7200 => get_string('numhours','',2),
3600 => get_string('numhours','',1),
2700 => get_string('numminutes','',45),
1800 => get_string('numminutes','',30),
900 => get_string('numminutes','',15),
600 => get_string('numminutes','',10),
540 => get_string('numminutes','',9),
480 => get_string('numminutes','',8),
420 => get_string('numminutes','',7),
360 => get_string('numminutes','',6),
300 => get_string('numminutes','',5),
240 => get_string('numminutes','',4),
180 => get_string('numminutes','',3),
120 => get_string('numminutes','',2),
60 => get_string('numminutes','',1),
30 => get_string('numseconds','',30),
0 => get_string('no'))));
$temp->add(new admin_setting_configselect('filteruploadedfiles', get_string('filteruploadedfiles', 'admin'), get_string('configfilteruploadedfiles', 'admin'), 0, array('0' => get_string('none'),
'1' => get_string('allfiles'),
'2' => get_string('htmlfilesonly'))));
$temp->add(new admin_setting_configcheckbox('filtermatchoneperpage', get_string('filtermatchoneperpage', 'admin'), get_string('configfiltermatchoneperpage', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('filtermatchonepertext', get_string('filtermatchonepertext', 'admin'), get_string('configfiltermatchonepertext', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('filterall', get_string('filterall', 'admin'), get_string('configfilterall', 'admin'), 0));
$ADMIN->add('appearance', $temp);
// "htmleditor" settingpage
$temp = new admin_settingpage('htmleditor', get_string('htmleditor', 'admin'));
$temp->add(new admin_setting_configcheckbox('htmleditor', get_string('usehtmleditor', 'admin'), get_string('confightmleditor','admin'), 1));
$temp->add(new admin_setting_configtext('editorbackgroundcolor', get_string('editorbackgroundcolor', 'admin'), get_string('edhelpbgcolor'), '#ffffff', PARAM_NOTAGS));
$temp->add(new admin_setting_configtext('editorfontfamily', get_string('editorfontfamily', 'admin'), get_string('edhelpfontfamily'), 'Trebuchet MS,Verdana,Arial,Helvetica,sans-serif', PARAM_NOTAGS));
$temp->add(new admin_setting_configtext('editorfontsize', get_string('editorfontsize', 'admin'), get_string('edhelpfontsize'), '', PARAM_NOTAGS));
$temp->add(new admin_setting_special_editorfontlist());
$temp->add(new admin_setting_configcheckbox('editorkillword', get_string('editorkillword', 'admin'), get_string('edhelpcleanword'), 1));
if (!empty($CFG->aspellpath)) { // make aspell settings disappear if path isn't set
$temp->add(new admin_setting_configcheckbox('editorspelling', get_string('editorspelling', 'admin'), get_string('editorspellinghelp', 'admin'), 0));
$temp->add(new admin_setting_special_editordictionary());
}
$temp->add(new admin_setting_special_editorhidebuttons());
$ADMIN->add('appearance', $temp);
// "documentation" settingpage
$temp = new admin_settingpage('documentation', get_string('moodledocs'));
$temp->add(new admin_setting_configtext('docroot', get_string('docroot', 'admin'), get_string('configdocroot', 'admin'), 'http://docs.moodle.org', PARAM_URL));
$temp->add(new admin_setting_configcheckbox('doctonewwindow', get_string('doctonewwindow', 'admin'), get_string('configdoctonewwindow', 'admin'), 0));
$ADMIN->add('appearance', $temp);
$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"));
?>
+50
View File
@@ -0,0 +1,50 @@
<?php // $Id$
// This file defines settingpages and externalpages under the "courses" category
$ADMIN->add('courses', new admin_externalpage('coursemgmt', get_string('coursemgmt', 'admin'), $CFG->wwwroot . '/course/index.php?categoryedit=on'));
$ADMIN->add('courses', new admin_externalpage('enrolment', get_string('enrolments'), $CFG->wwwroot . '/'.$CFG->admin.'/enrol.php'));
// "courserequests" settingpage
$temp = new admin_settingpage('courserequest', get_string('courserequest'));
$temp->add(new admin_setting_configcheckbox('enablecourserequests', get_string('enablecourserequests', 'admin'), get_string('configenablecourserequests', 'admin'), 0));
require_once($CFG->dirroot.'/course/lib.php');
$temp->add(new admin_setting_configselect('defaultrequestcategory', get_string('defaultrequestcategory', 'admin'), get_string('configdefaultrequestcategory', 'admin'), 1, make_categories_options()));
$ADMIN->add('courses', $temp);
// "backups" settingpage
$temp = new admin_settingpage('backups', get_string('backups','admin'));
$temp->add(new admin_setting_backupcheckbox('backup_sche_modules', get_string('includemodules'), get_string('backupincludemoduleshelp'), 0));
$temp->add(new admin_setting_backupcheckbox('backup_sche_withuserdata', get_string('includemoduleuserdata'), get_string('backupincludemoduleuserdatahelp'), 0));
$temp->add(new admin_setting_backupcheckbox('backup_sche_metacourse', get_string('metacourse'), get_string('backupmetacoursehelp'), 0));
$temp->add(new admin_setting_backupselect('backup_sche_users', get_string('users'), get_string('backupusershelp'), 0, array(0 => get_string('all'),
1 => get_string('course'))));
$temp->add(new admin_setting_backupcheckbox('backup_sche_logs', get_string('logs'), get_string('backuplogshelp'), 0));
$temp->add(new admin_setting_backupcheckbox('backup_sche_userfiles', get_string('userfiles'), get_string('backupuserfileshelp'), 0));
$temp->add(new admin_setting_backupcheckbox('backup_sche_coursefiles', get_string('coursefiles'), get_string('backupcoursefileshelp'), 0));
$temp->add(new admin_setting_backupcheckbox('backup_sche_messages', get_string('messages', 'message'), get_string('backupmessageshelp','message'), 0));
$temp->add(new admin_setting_backupselect('backup_sche_keep', get_string('keep'), get_string('backupkeephelp'), 1, array(0 => get_string('all'),
1 => '1',
2 => '2',
5 => '5',
10 => '10',
20 => '20',
30 => '30',
40 => '40',
50 => '50',
100 => '100',
200 => '200',
300 => '300',
400 => '400',
500 => '500')));
$temp->add(new admin_setting_backupcheckbox('backup_sche_active', get_string('active'), get_string('backupactivehelp'), 0));
$temp->add(new admin_setting_special_backupdays());
$temp->add(new admin_setting_special_backuptime());
$temp->add(new admin_setting_special_backupsaveto());
$ADMIN->add('courses', $temp);
?>
+19
View File
@@ -0,0 +1,19 @@
<?php // $Id$
// This file defines settingpages and externalpages under the "appearance" category
// "languageandlocation" settingpage
$temp = new admin_settingpage('langsettings', get_string('languagesettings', 'admin'));
$temp->add(new admin_setting_configselect('lang', get_string('lang', 'admin'), get_string('configlang', 'admin'), current_language(), get_list_of_languages())); // $CFG->lang might be set in installer already, default en or en_utf8 is in setup.php
$temp->add(new admin_setting_configcheckbox('langmenu', get_string('langmenu', 'admin'), get_string('configlangmenu', 'admin'), 1));
$temp->add(new admin_setting_configtext('langlist', get_string('langlist', 'admin'), get_string('configlanglist', 'admin'), '', PARAM_NOTAGS));
$temp->add(new admin_setting_configcheckbox('langcache', get_string('langcache', 'admin'), get_string('configlangcache', 'admin'), 1));
$temp->add(new admin_setting_configtext('locale', get_string('localetext', 'admin'), get_string('configlocale', 'admin'), '', PARAM_FILE));
$ADMIN->add('language', $temp);
$ADMIN->add('language', new admin_externalpage('langedit', get_string('langedit', 'admin'), "$CFG->wwwroot/$CFG->admin/lang.php"));
$ADMIN->add('language', new admin_externalpage('langimport', get_string('langpacks', 'admin'), "$CFG->wwwroot/$CFG->admin/langimport.php"));
?>
+27
View File
@@ -0,0 +1,27 @@
<?php // $Id$
// "locations" settingpage
$temp = new admin_settingpage('locationsettings', get_string('locationsettings', 'admin'));
$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[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();
$options[0] = get_string('choose') .'...';
$temp->add(new admin_setting_configselect('country', get_string('country', 'admin'), get_string('configcountry', 'admin'), 0, $options));
$iplookups = array();
if ($plugins = get_list_of_plugins('iplookup')) {
foreach ($plugins as $plugin) {
$iplookups[$plugin] = $plugin;
}
}
$temp->add(new admin_setting_configselect('iplookup', get_string('iplookup', 'admin'), get_string('configiplookup', 'admin'), 'hostip', $iplookups));
$ADMIN->add('location', $temp);
$ADMIN->add('location', new admin_externalpage('timezoneimport', get_string('updatetimezones', 'admin'), "$CFG->wwwroot/$CFG->admin/timezoneimport.php"));
?>
+20
View File
@@ -0,0 +1,20 @@
<?php // $Id$
// * 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));
$ADMIN->add('misc', new admin_externalpage('upgradelogs', 'Upgrade logs', $CFG->wwwroot.'/'.$CFG->admin.'/upgradelogs.php', 'moodle/site:config', true));
?>
+96
View File
@@ -0,0 +1,96 @@
<?php // $Id$
// "sitepolicies" settingpage
$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'), 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));
$temp->add(new admin_setting_configcheckbox('allowobjectembed', get_string('allowobjectembed', 'admin'), get_string('configallowobjectembed', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('enabletrusttext', get_string('enabletrusttext', 'admin'), get_string('configenabletrusttext', 'admin'), 0));
$temp->add(new admin_setting_configselect('maxeditingtime', get_string('maxeditingtime','admin'), get_string('configmaxeditingtime','admin'), 1800,
array(60 => get_string('numminutes', '', 1),
300 => get_string('numminutes', '', 5),
900 => get_string('numminutes', '', 15),
1800 => get_string('numminutes', '', 30),
2700 => get_string('numminutes', '', 45),
3600 => get_string('numminutes', '', 60))));
$temp->add(new admin_setting_configselect('fullnamedisplay', get_string('fullnamedisplay', 'admin'), get_string('configfullnamedisplay', 'admin'),
'firstname lastname', array('language' => get_string('language'),
'firstname lastname' => get_string('firstname') . ' + ' . get_string('lastname'),
'lastname firstname' => get_string('lastname') . ' + ' . get_string('firstname'),
'firstname' => get_string('firstname'))));
$temp->add(new admin_setting_configcheckbox('extendedusernamechars', get_string('extendedusernamechars', 'admin'), get_string('configextendedusernamechars', 'admin'), 0));
$temp->add(new admin_setting_configtext('sitepolicy', get_string('sitepolicy', 'admin'), get_string('configsitepolicy', 'admin'), '', PARAM_URL));
$temp->add(new admin_setting_configselect('bloglevel', get_string('bloglevel', 'admin'), get_string('configbloglevel', 'admin'), 4, array(5 => get_string('worldblogs','blog'),
4 => get_string('siteblogs','blog'),
3 => get_string('courseblogs','blog'),
2 => get_string('groupblogs','blog'),
1 => get_string('personalblogs','blog'),
0 => get_string('disableblogs','blog'))));
$ADMIN->add('security', $temp);
// "httpsecurity" settingpage
$temp = new admin_settingpage('httpsecurity', get_string('httpsecurity', 'admin'));
$temp->add(new admin_setting_configcheckbox('loginhttps', get_string('loginhttps', 'admin'), get_string('configloginhttps', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('secureforms', get_string('secureforms', 'admin'), get_string('configsecureforms', 'admin'), 0));
$ADMIN->add('security', $temp);
// "modulesecurity" settingpage
$temp = new admin_settingpage('modulesecurity', get_string('modulesecurity', 'admin'));
$temp->add(new admin_setting_configselect('restrictmodulesfor', get_string('restrictmodulesfor', 'admin'), get_string('configrestrictmodulesfor', 'admin'), 'none', array('none' => 'No courses',
'all' => 'All courses',
'requested' => 'Requested courses')));
$temp->add(new admin_setting_configcheckbox('restrictbydefault', get_string('restrictbydefault', 'admin'), get_string('configrestrictbydefault', 'admin'), 0));
if (!$options = get_records("modules")) {
$options = array();
}
$options2 = array();
foreach ($options as $option) {
$options2[$option->id] = $option->name;
}
$temp->add(new admin_setting_configmultiselect('defaultallowedmodules', get_string('defaultallowedmodules', 'admin'), get_string('configdefaultallowedmodules', 'admin'), array(), $options2));
$ADMIN->add('security', $temp);
// "notifications" settingpage
$temp = new admin_settingpage('notifications', get_string('notifications', 'admin'));
$temp->add(new admin_setting_configselect('displayloginfailures', get_string('displayloginfailures', 'admin'), get_string('configdisplayloginfailures', 'admin'), '', array('' => get_string('nobody'),
'admin' => get_string('administrators'),
'teacher' => get_string('administratorsandteachers'),
'everybody' => get_string('everybody'))));
$temp->add(new admin_setting_configselect('notifyloginfailures', get_string('notifyloginfailures', 'admin'), get_string('confignotifyloginfailures', 'admin'), '', array('' => get_string('nobody'),
'mainadmin' => get_string('administrator'),
'alladmins' => get_string('administratorsall'))));
$options = array();
for ($i = 1; $i <= 100; $i++) {
$options[$i] = $i;
}
$temp->add(new admin_setting_configselect('notifyloginthreshold', get_string('notifyloginthreshold', 'admin'), get_string('confignotifyloginthreshold', 'admin'), '10', $options));
$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_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);
?>
+187
View File
@@ -0,0 +1,187 @@
<?php // $Id$
// This file defines settingpages and externalpages under the "server" category
// "systempaths" settingpage
$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_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);
// "email" settingpage
$temp = new admin_settingpage('mail', get_string('mail','admin'));
$temp->add(new admin_setting_configtext('smtphosts', get_string('smtphosts', 'admin'), get_string('configsmtphosts', 'admin'), '', PARAM_HOST));
$temp->add(new admin_setting_configtext('smtpuser', get_string('smtpuser', 'admin'), get_string('configsmtpuser', 'admin'), '', PARAM_NOTAGS));
$temp->add(new admin_setting_configtext('smtppass', get_string('smtppass', 'admin'), get_string('configsmtpuser', 'admin'), '', PARAM_RAW));
$temp->add(new admin_setting_configtext('noreplyaddress', get_string('noreplyaddress', 'admin'), get_string('confignoreplyaddress', 'admin'), 'noreply@' . $_SERVER['HTTP_HOST'], PARAM_NOTAGS));
$temp->add(new admin_setting_configtext('allowemailaddresses', get_string('allowemailaddresses', 'admin'), get_string('configallowemailaddresses', 'admin'), '', PARAM_NOTAGS));
$temp->add(new admin_setting_configtext('denyemailaddresses', get_string('denyemailaddresses', 'admin'), get_string('configdenyemailaddresses', 'admin'), '', PARAM_NOTAGS));
$temp->add(new admin_setting_configselect('digestmailtime', get_string('digestmailtime', 'admin'), get_string('configdigestmailtime', 'admin'), 17, array('00' => '00',
'01' => '01',
'02' => '02',
'03' => '03',
'04' => '04',
'05' => '05',
'06' => '06',
'07' => '07',
'08' => '08',
'09' => '09',
'10' => '10',
'11' => '11',
'12' => '12',
'13' => '13',
'14' => '14',
'15' => '15',
'16' => '16',
'17' => '17',
'18' => '18',
'19' => '19',
'20' => '20',
'21' => '21',
'22' => '22',
'23' => '23')));
if (!empty($CFG->unicodedb)) { // These options are only available if running under unicodedb
unset($options);
unset($charsets);
$charsets = get_list_of_charsets();
$options['0'] = get_string('none');
$options = array_merge($options, $charsets);
$temp->add(new admin_setting_configselect('sitemailcharset', get_string('sitemailcharset', 'admin'), get_string('configsitemailcharset','admin'), '', $options));
$temp->add(new admin_setting_configcheckbox('allowusermailcharset', get_string('allowusermailcharset', 'admin'), get_string('configallowusermailcharset', 'admin'), 0));
}
$ADMIN->add('server', $temp, 100);
// "sessionhandling" settingpage
$temp = new admin_settingpage('sessionhandling', get_string('sessionhandling', 'admin'));
$temp->add(new admin_setting_configcheckbox('dbsessions', get_string('dbsessions', 'admin'), get_string('configdbsessions', 'admin'), 0));
$temp->add(new admin_setting_configselect('sessiontimeout', get_string('sessiontimeout', 'admin'), get_string('configsessiontimeout', 'admin'), 7200, array(14400 => get_string('numhours', '', 4),
10800 => get_string('numhours', '', 3),
7200 => get_string('numhours', '', 2),
5400 => get_string('numhours', '', '1.5'),
3600 => get_string('numminutes', '', 60),
2700 => get_string('numminutes', '', 45),
1800 => get_string('numminutes', '', 30),
900 => get_string('numminutes', '', 15),
300 => get_string('numminutes', '', 5))));
$temp->add(new admin_setting_configtext('sessioncookie', get_string('sessioncookie', 'admin'), get_string('configsessioncookie', 'admin'), '', PARAM_ALPHANUM));
$temp->add(new admin_setting_configtext('sessioncookiepath', get_string('sessioncookiepath', 'admin'), get_string('configsessioncookiepath', 'admin'), '/', PARAM_LOCALURL));
$ADMIN->add('server', $temp, 50);
// "rss" settingpage
$temp = new admin_settingpage('rss', get_string('rss'));
$temp->add(new admin_setting_configcheckbox('enablerssfeeds', get_string('enablerssfeeds', 'admin'), get_string('configenablerssfeeds', 'admin'), 0));
$ADMIN->add('server', $temp);
// "debugging" settingpage
$temp = new admin_settingpage('debugging', get_string('debugging', 'admin'));
$temp->add(new admin_setting_special_debug());
$temp->add(new admin_setting_special_perfdebug());
$ADMIN->add('server', $temp);
// "stats" settingpage
$temp = new admin_settingpage('stats', get_string('stats'));
$temp->add(new admin_setting_configcheckbox('enablestats', get_string('enablestats', 'admin'), get_string('configenablestats', 'admin'), 0));
$temp->add(new admin_setting_configselect('statsfirstrun', get_string('statsfirstrun', 'admin'), get_string('configstatsfirstrun', 'admin'), 'none', array('none' => get_string('none'),
60*60*24*7 => get_string('numweeks','moodle',1),
60*60*24*14 => get_string('numweeks','moodle',2),
60*60*24*21 => get_string('numweeks','moodle',3),
60*60*24*28 => get_string('nummonths','moodle',1),
60*60*24*56 => get_string('nummonths','moodle',2),
60*60*24*84 => get_string('nummonths','moodle',3),
60*60*24*112 => get_string('nummonths','moodle',4),
60*60*24*140 => get_string('nummonths','moodle',5),
60*60*24*168 => get_string('nummonths','moodle',6),
'all' => get_string('all') )));
$temp->add(new admin_setting_configselect('statsmaxruntime', get_string('statsmaxruntime', 'admin'), get_string('configstatsmaxruntime', 'admin'), 0, array(0 => get_string('untilcomplete'),
60*60 => '1 '.get_string('hour'),
60*60*2 => '2 '.get_string('hours'),
60*60*3 => '3 '.get_string('hours'),
60*60*4 => '4 '.get_string('hours'),
60*60*5 => '5 '.get_string('hours'),
60*60*6 => '6 '.get_string('hours'),
60*60*7 => '7 '.get_string('hours'),
60*60*8 => '8 '.get_string('hours') )));
$temp->add(new admin_setting_configtime('statsruntimestarthour', 'statsruntimestartminute', get_string('statsruntimestart', 'admin'), get_string('configstatsruntimestart', 'admin'), array('h' => 0, 'm' => 0)));
$temp->add(new admin_setting_configtext('statsuserthreshold', get_string('statsuserthreshold', 'admin'), get_string('configstatsuserthreshold', 'admin'), 0, PARAM_INT));
$ADMIN->add('server', $temp);
// "http" settingpage
$temp = new admin_settingpage('http', get_string('http', 'admin'));
$temp->add(new admin_setting_configtext('framename', get_string('framename', 'admin'), get_string('configframename', 'admin'), '_top', PARAM_ALPHAEXT));
$temp->add(new admin_Setting_configcheckbox('slasharguments', get_string('slasharguments', 'admin'), get_string('configslasharguments', 'admin'), 1));
$temp->add(new admin_setting_configtext('proxyhost', get_string('proxyhost', 'admin'), get_string('configproxyhost', 'admin'), '', PARAM_HOST));
$temp->add(new admin_setting_configtext('proxyport', get_string('proxyport', 'admin'), get_string('configproxyport', 'admin'), 0, PARAM_INT));
$ADMIN->add('server', $temp);
$ADMIN->add('server', new admin_externalpage('sitefiles', get_string('sitefiles'), $CFG->wwwroot . '/files/index.php?id=' . SITEID));
$ADMIN->add('server', new admin_externalpage('maintenancemode', get_string('sitemaintenancemode', 'admin'), "$CFG->wwwroot/$CFG->admin/maintenance.php"));
$temp = new admin_settingpage('cleanup', get_string('cleanup', 'admin'));
$temp->add(new admin_setting_configselect('longtimenosee', get_string('longtimenosee', 'admin'), get_string('configlongtimenosee', 'admin'), 120, array(0 => get_string('never'),
1000 => get_string('numdays', '', 1000),
365 => get_string('numdays', '', 365),
180 => get_string('numdays', '', 180),
150 => get_string('numdays', '', 150),
120 => get_string('numdays', '', 120),
90 => get_string('numdays', '', 90),
60 => get_string('numdays', '', 60),
30 => get_string('numdays', '', 30),
21 => get_string('numdays', '', 21),
14 => get_string('numdays', '', 14),
7 => get_string('numdays', '', 7) )));
$temp->add(new admin_setting_configselect('deleteunconfirmed', get_string('deleteunconfirmed', 'admin'), get_string('configdeleteunconfirmed', 'admin'), 168, array(0 => get_string('never'),
168 => get_string('numdays', '', 7),
144 => get_string('numdays', '', 6),
120 => get_string('numdays', '', 5),
96 => get_string('numdays', '', 4),
72 => get_string('numdays', '', 3),
48 => get_string('numdays', '', 2),
24 => get_string('numdays', '', 1),
12 => get_string('numhours', '', 12),
6 => get_string('numhours', '', 6),
1 => get_string('numhours', '', 1))));
$temp->add(new admin_setting_configselect('loglifetime', get_string('loglifetime', 'admin'), get_string('configloglifetime', 'admin'), 0, array(0 => get_string('neverdeletelogs'),
1000 => get_string('numdays', '', 1000),
365 => get_string('numdays', '', 365),
180 => get_string('numdays', '', 180),
150 => get_string('numdays', '', 150),
120 => get_string('numdays', '', 120),
90 => get_string('numdays', '', 90),
60 => get_string('numdays', '', 60),
30 => get_string('numdays', '', 30))));
$ADMIN->add('server', $temp);
$ADMIN->add('server', new admin_externalpage('environment', get_string('environment','admin'), "$CFG->wwwroot/$CFG->admin/environment.php"));
$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"));
}
?>
+45
View File
@@ -0,0 +1,45 @@
<?php // $Id$
// This is the first file read by the lib/adminlib.php script
// We use it to create the categories in correct order,
// since they need to exist *before* settingpages and externalpages
// are added to them.
$ADMIN->add('root', new admin_externalpage('adminnotifications', get_string('notifications'), "$CFG->wwwroot/$CFG->admin/index.php"));
// hidden upgrade script
$ADMIN->add('root', new admin_externalpage('upgradesettings', get_string('upgradesettings', 'admin'), "$CFG->wwwroot/$CFG->admin/upgradesettings.php", 'moodle/site:config', true));
// hidden search script
$ADMIN->add('root', new admin_externalpage('search', get_string('search', 'admin'), "$CFG->wwwroot/$CFG->admin/search.php", 'moodle/site:config', true));
$ADMIN->add('root', new admin_category('users', get_string('users','admin')));
$ADMIN->add('root', new admin_category('courses', get_string('courses','admin')));
$ADMIN->add('root', new admin_category('location', get_string('location','admin')));
$ADMIN->add('root', new admin_category('language', get_string('language')));
$ADMIN->add('root', new admin_category('modules', get_string('plugins', 'admin')));
$ADMIN->add('modules', new admin_externalpage('managemodules', get_string('activities'), "$CFG->wwwroot/$CFG->admin/modules.php"));
$ADMIN->add('modules', new admin_externalpage('manageblocks', get_string('blocks'), "$CFG->wwwroot/$CFG->admin/blocks.php"));
$ADMIN->add('modules', new admin_externalpage('managefilters', get_string('managefilters'), "$CFG->wwwroot/$CFG->admin/filters.php"));
$ADMIN->add('root', new admin_category('security', get_string('security','admin')));
$ADMIN->add('root', new admin_category('appearance', get_string('appearance','admin')));
$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) {
/// 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"));
}
$ADMIN->add('root', new admin_category('misc', get_string('miscellaneous')));
// hidden unsupported category
$ADMIN->add('root', new admin_category('unsupported', get_string('unsupported', 'admin'), true));
?>
+11
View File
@@ -0,0 +1,11 @@
<?php // $Id$
// This file defines settingpages and externalpages in the "unsupported" hidden category, use wisely!
$ADMIN->add('unsupported', new admin_externalpage('purgemoodledata', 'Purge moodledata', $CFG->wwwroot.'/'.$CFG->admin.'/delete.php'));
$ADMIN->add('unsupported', new admin_externalpage('healthcenter', get_string('healthcenter'), $CFG->wwwroot.'/'.$CFG->admin.'/health.php'));
$ADMIN->add('unsupported', new admin_externalpage('toinodb', 'Convert to InnoDB', $CFG->wwwroot.'/'.$CFG->admin.'/innodb.php'));
$ADMIN->add('unsupported', new admin_externalpage('replace', 'Search and replace', $CFG->wwwroot.'/'.$CFG->admin.'/replace.php'));
?>
+65
View File
@@ -0,0 +1,65 @@
<?php // $Id$
// This file defines settingpages and externalpages under the "users" category
$ADMIN->add('users', new admin_externalpage('userauthentication', get_string('authentication','admin'), "$CFG->wwwroot/$CFG->admin/auth.php"));
// stuff under the "accounts" subcategory
$ADMIN->add('users', new admin_category('accounts', get_string('accounts', 'admin')));
$ADMIN->add('accounts', new admin_externalpage('editusers', get_string('userlist','admin'), "$CFG->wwwroot/$CFG->admin/user.php", array('moodle/user:update', 'moodle/user:delete')));
$ADMIN->add('accounts', new admin_externalpage('addnewuser', get_string('addnewuser'), "$CFG->wwwroot/$CFG->admin/user.php?newuser=true", 'moodle/user:create'));
$ADMIN->add('accounts', new admin_externalpage('uploadusers', get_string('uploadusers'), "$CFG->wwwroot/$CFG->admin/uploaduser.php", 'moodle/site:uploadusers'));
// 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"));
$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
$temp = new admin_settingpage('userpolicies', get_string('userpolicies', 'admin'));
$context = get_context_instance(CONTEXT_SYSTEM, SITEID);
if (!$guestrole = get_guest_role()) {
$guestrole->id = 0;
}
if ($studentroles = get_roles_with_capability('moodle/legacy:student', CAP_ALLOW)) {
$studentrole = array_shift($studentroles); /// Take the first one
} else {
$studentrole->id = 0;
}
$assignableroles = get_assignable_roles($context);
$temp->add(new admin_setting_configselect('notloggedinroleid', get_string('notloggedinroleid', 'admin'),
get_string('confignotloggedinroleid', 'admin'), $guestrole->id, $assignableroles ));
$temp->add(new admin_setting_configselect('defaultuserroleid', get_string('defaultuserroleid', 'admin'),
get_string('configdefaultuserroleid', 'admin'), $guestrole->id, $assignableroles));
$temp->add(new admin_setting_configselect('defaultcourseroleid', get_string('defaultcourseroleid', 'admin'),
get_string('configdefaultcourseroleid', 'admin'), $studentrole->id, $assignableroles));
$temp->add(new admin_setting_configcheckbox('autologinguests', get_string('autologinguests', 'admin'), get_string('configautologinguests', 'admin'), 0));
//$temp->add(new admin_setting_configcheckbox('allusersaresitestudents', get_string('allusersaresitestudents', 'admin'), get_string('configallusersaresitestudents','admin'), 1));
$temp->add(new admin_setting_configmultiselect('hiddenuserfields', get_string('hiddenuserfields', 'admin'),
get_string('confighiddenuserfields', 'admin'), array(),
array('none' => get_string('none'),
'description' => get_string('description'),
'city' => get_string('city'),
'country' => get_string('country'),
'webpage' => get_string('webpage'),
'icqnumber' => get_string('icqnumber'),
'skypeid' => get_string('skypeid'),
'yahooid' => get_string('yahooid'),
'aimid' => get_string('aimid'),
'msnid' => get_string('msnid'),
'lastaccess' => get_string('lastaccess'))));
//$temp->add(new admin_setting_special_adminseesall());
$ADMIN->add('roles', $temp);
?>
-129
View File
@@ -1,129 +0,0 @@
<form method="post" action="site.php" name="form">
<table cellpadding="9" cellspacing="0" >
<tr valign="top">
<td align="right"><?php print_string("fullsitename") ?>:</td>
<td><input type="text" name="fullname" size="50" maxlength="254" value="<?php p($form->fullname) ?>" alt="<?php print_string("fullsitename") ?>" />
<?php if (isset($err["fullname"])) formerr($err["fullname"]); ?>
</td>
</tr>
<tr valign="top">
<td align="right"><?php print_string("shortsitename") ?>:</td>
<td><input type="text" name="shortname" size="15" maxlength="15" value="<?php p($form->shortname) ?>" alt="<?php print_string("shortsitename") ?>" />
<?php if (isset($err["shortname"])) formerr($err["shortname"]); ?>
</td>
</tr>
<tr valign="top">
<td align="right"><?php print_string("frontpagedescription") ?>:<br /><br />
<?PHP
helpbutton("writing", get_string("helpwriting"), "moodle", true, true);
echo "<br />";
if ($usehtmleditor) {
helpbutton("richtext", get_string("helprichtext"), "moodle", true, true);
} else {
helpbutton("html", get_string("helphtml"), "moodle", true, true);
}
echo "<br />";
?>
</td>
<td><?php print_textarea($usehtmleditor, 20, 50, 600, 400, "summary", $form->summary); ?></td>
</tr>
<tr valign="top">
<td align="right"><?php print_string("frontpageformat") ?>:</td>
<td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<td>
<?php
$options = array(FRONTPAGENEWS => get_string("frontpagenews"),
FRONTPAGECOURSELIST => get_string("frontpagecourselist"),
FRONTPAGECATEGORYNAMES => get_string("frontpagecategorynames"),
);
$values = array(get_string('hide'), 1, 2);
$seq = array_flip(explode(',',$form->frontpage));
foreach ($seq as $k => $s) {
$seq[$k]++;
}
if (count_records("course") > 200) {
unset($options[FRONTPAGECOURSELIST]);
if (isset($seq[FRONTPAGECOURSELIST])) {
$form->frontpage = 2;
}
} else {
$values[] = 3;
}
foreach ($options as $key => $option) {
echo "<td>$option<br />";
choose_from_menu ($values, "frontpage[$key]", isset($seq[$key])?$seq[$key]:0, "");
}
?>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td align="right"><?php print_string("sitesection") ?>:</td>
<td><?php
unset($choices);
$choices["0"] = get_string("no");
$choices["1"] = get_string("yes");
choose_from_menu ($choices, "numsections", $form->numsections, "");
?>
</td>
</tr>
<tr valign="top">
<td align="right"><?php print_string("newsitemsnumber") ?>:</td>
<td><?php
$newsitem = get_string("newsitem");
$newsitems = get_string("newsitems");
$options = array("0" => "0 $newsitems",
"1" => "1 $newsitem",
"2" => "2 $newsitems",
"3" => "3 $newsitems",
"4" => "4 $newsitems",
"5" => "5 $newsitems",
"6" => "6 $newsitems",
"7" => "7 $newsitems",
"8" => "8 $newsitems",
"9" => "9 $newsitems",
"10" => "10 $newsitems");
choose_from_menu ($options, "newsitems", "$form->newsitems", "");
?>
</td>
</tr>
<tr valign="top">
<td align="right"><?php print_string("wordforteacher") ?>:</td>
<td><input type="text" name="teacher" maxlength="100" size="25" value="<?php p($form->teacher) ?>" alt="<?php print_string("wordforteacher") ?>" />
(<?php print_string("wordforteachereg") ?>)
<?php if (isset($err["teacher"])) formerr($err["teacher"]); ?>
</td>
</tr>
<tr valign="top">
<td align="right"><?php print_string("wordforteachers") ?>:</td>
<td><input type="text" name="teachers" maxlength="100" size="25" value="<?php p($form->teachers) ?>" alt="<?php print_string("wordforteachers") ?>" />
(<?php print_string("wordforteacherseg") ?>)
<?php if (isset($err["teachers"])) formerr($err["teachers"]); ?>
</td>
</tr>
<tr valign="top">
<td align="right"><?php print_string("wordforstudent") ?>:</td>
<td><input type="text" name="student" maxlength="100" size="25" value="<?php p($form->student) ?>" alt="<?php print_string("wordforstudent") ?>" />
(<?php print_string("wordforstudenteg") ?>)
<?php if (isset($err["student"])) formerr($err["student"]); ?>
</td>
</tr>
<tr valign="top">
<td align="right"><?php print_string("wordforstudents") ?>:</td>
<td><input type="text" name="students" maxlength="100" size="25" value="<?php p($form->students) ?>" alt="<?php print_string("wordforstudents") ?>" />
(<?php print_string("wordforstudentseg") ?>)
<?php if (isset($err["students"])) formerr($err["students"]); ?>
</td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="<?php print_string("savechanges") ?>" /></td>
</tr>
</table>
<input type="hidden" name="id" value="<?php p($form->id) ?>" />
<input type="hidden" name="category" value="<?php p($form->category) ?>" />
<input type="hidden" name="format" value="<?php p($form->format) ?>" />
<input type="hidden" name="sesskey" value="<?php p($sesskey) ?>" />
</form>
-162
View File
@@ -1,162 +0,0 @@
<?php // $Id$
require_once("../config.php");
require_once("../course/lib.php");
if ($site = get_site()) {
require_login();
if (!isadmin()) {
error("You need to be admin to edit this page");
}
$site->format = "social"; // override
}
/// If data submitted, then process and store.
if ($form = data_submitted()) {
if (!empty($USER->id)) { // Additional identity check
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
}
}
validate_form($form, $err);
if (count($err) == 0) {
$form->frontpage = array_flip($form->frontpage);
unset($form->frontpage[0]);
$form->frontpage = array_flip($form->frontpage);
asort($form->frontpage);
$form->frontpage = implode(',',array_flip($form->frontpage));
set_config("frontpage", $form->frontpage);
if (!$form->frontpage) {
$form->numsections = 1; // Force the topic display for this format
}
$form->timemodified = time();
if ($form->id) {
if (update_record("course", $form)) {
redirect("$CFG->wwwroot/", get_string("changessaved"));
} else {
error("Serious Error! Could not update the site record! (id = $form->id)");
}
} else {
// We are about to create the site "course"
require_once($CFG->dirroot.'/lib/blocklib.php');
if ($newid = insert_record('course', $form)) {
// Site created, add blocks for it
$page = page_create_object(PAGE_COURSE_VIEW, $newid);
blocks_repopulate_page($page); // Return value not checked because you can always edit later
$cat->name = get_string('miscellaneous');
if (insert_record('course_categories', $cat)) {
redirect("$CFG->wwwroot/$CFG->admin/index.php", get_string("changessaved"), 1);
} else {
error("Serious Error! Could not set up a default course category!");
}
} else {
error("Serious Error! Could not set up the site!");
}
}
die;
} else {
foreach ($err as $key => $value) {
$focus = "form.$key";
}
}
}
/// Otherwise fill and print the form.
if ($site and empty($form)) {
$form = $site;
$course = $site;
$firsttime = false;
} else {
$form->fullname = "";
$form->shortname = "";
$form->summary = "";
$form->newsitems = 3;
$form->numsections = 0;
$form->id = "";
$form->category = 0;
$form->format = 'site'; // Only for this course
$form->teacher = get_string("defaultcourseteacher");
$form->teachers = get_string("defaultcourseteachers");
$form->student = get_string("defaultcoursestudent");
$form->students = get_string("defaultcoursestudents");
$firsttime = true;
}
if (isset($CFG->frontpage)) {
$form->frontpage = $CFG->frontpage;
} else {
$form->frontpage = FRONTPAGECOURSELIST; // Show course list by default
set_config("frontpage", $form->frontpage);
}
if (empty($focus)) {
$focus = "form.fullname";
}
$stradmin = get_string("administration");
$strconfiguration = get_string("configuration");
$strsitesettings = get_string("sitesettings");
if ($firsttime) {
print_header();
print_heading($strsitesettings);
print_simple_box(get_string("configintrosite", 'admin'), "center", "50%");
echo "<br />";
} else {
print_header("$site->shortname: $strsitesettings", "$site->fullname",
"<a href=\"index.php\">$stradmin</a> -> ".
"<a href=\"configure.php\">$strconfiguration</a> -> $strsitesettings", "$focus");
print_heading($strsitesettings);
}
if (empty($USER->id)) { // New undefined admin user
$USER->htmleditor = true;
$sesskey = '';
} else {
$sesskey = $USER->sesskey;
}
$usehtmleditor = can_use_html_editor();
$defaultformat = FORMAT_HTML;
print_simple_box_start("center", "");
include("site.html");
print_simple_box_end();
if ($usehtmleditor) {
use_html_editor();
}
if (!$firsttime) {
print_footer();
}
exit;
/// Functions /////////////////////////////////////////////////////////////////
function validate_form(&$form, &$err) {
if (empty($form->fullname))
$err["fullname"] = get_string("missingsitename");
if (empty($form->shortname))
$err["shortname"] = get_string("missingshortsitename");
return;
}
?>
+31 -34
View File
@@ -1,16 +1,15 @@
<?
{
<?PHP // $Id$
require_once(dirname(dirname(__FILE__)).'/config.php');
require_once('../config.php');
require_once($CFG->dirroot.'/my/pagelib.php');
require_once($CFG->dirroot.'/lib/pagelib.php');
require_once($CFG->dirroot.'/lib/blocklib.php');
$pt = optional_param('pt',null,PARAM_CLEAN);
$pt = optional_param('pt', null, PARAM_SAFEDIR); //alhanumeric and -
$pagetypes = array(PAGE_MY_MOODLE => array('id' => PAGE_MY_MOODLE,
'lib' => '/my/pagelib.php',
'name' => get_string('stickyblocksmymoodle','admin')),
'name' => get_string('mymoodle','admin')),
PAGE_COURSE_VIEW => array('id' => PAGE_COURSE_VIEW,
'lib' => '/lib/pagelib.php',
'name' => get_string('stickyblockscourseview','admin'))
@@ -25,66 +24,64 @@
require_login();
if (!isadmin()) {
error("Only the admin can use this page");
}
require_capability('moodle/site:manageblocks', get_context_instance(CONTEXT_SYSTEM, SITEID));
// first thing to do is print the dropdown menu
$strtitle = get_string('stickyblocks','admin');
$strheading = get_string('adminhelpstickyblocks');
print_header($strtitle,$strtitle,'<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/index.php">'.
get_string('admin').'</a> -> '.$strtitle);
echo '<table border="0" cellpadding="3" cellspacing="0" width="100%" id="layout-table">';
echo '<tr valign="top">';
if (!empty($pt)) {
require_once($CFG->dirroot.$pagetypes[$pt]['lib']);
define('ADMIN_STICKYBLOCKS',$pt);
$PAGE = page_create_object($pt);
$PAGE = page_create_object($pt, SITEID);
$blocks = blocks_setup($PAGE,BLOCKS_PINNED_TRUE);
$blocks_preferred_width = bounded_number(180, blocks_preferred_width($blocks[BLOCK_POS_LEFT]), 210);
echo '<td style="vertical-align: top; width: '.$blocks_preferred_width.'px;" id="left-column">';
print_header($strtitle,$strtitle,'<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/index.php">'.
get_string('administration').'</a> -> '.$strtitle);
echo '<table border="0" cellpadding="3" cellspacing="0" width="100%" id="layout-table">';
echo '<tr valign="top">';
echo '<td valign="top" style="width: '.$blocks_preferred_width.'px;" id="left-column">';
blocks_print_group($PAGE, $blocks, BLOCK_POS_LEFT);
echo '</td>';
echo '<td valign="top" id="middle-column">';
} else {
echo '<td style="vertical-align: top;" id="left-column">';
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('stickyblocks', $adminroot);
admin_externalpage_print_header($adminroot);
}
echo '</td>';
echo '<td valign="top" width="*" id="middle-column">';
print_simple_box_start('center');
print_heading($strheading);
echo '<form method="post" action="'.$CFG->wwwroot.'/admin/stickyblocks.php">'
echo '<form method="post" action="'.$CFG->wwwroot.'/'.$CFG->admin.'/stickyblocks.php">'
.'<p align="center">'.get_string('stickyblockspagetype','admin').': ';
choose_from_menu($options,'pt',$pt,'choose','this.form.submit();');
echo '</p></form>';
echo get_string('stickyblocksduplicatenotice','admin');
print_simple_box_end();
echo '</td>';
if (!empty($pt)) {
echo '<td style="vertical-align: top; width: '.$blocks_preferred_width.'px;" id="left-column">';
echo '</td>';
echo '<td valign="top" style="width: '.$blocks_preferred_width.'px;" id="left-column">';
blocks_print_group($PAGE, $blocks, BLOCK_POS_RIGHT);
echo '</td>';
echo '</tr></table>';
print_footer();
} else {
admin_externalpage_print_footer($adminroot);
}
echo '<td style="vertical-align: top;" id="left-column">';
echo '</td>';
echo '</tr></table>';
print_footer();
}
?>
?>
+8 -25
View File
@@ -1,12 +1,12 @@
<?php // $Id$
include("../config.php");
require_once('../config.php');
$zone = optional_param('zone', '', PARAM_PATH); //not a path, but it looks like it anyway
require_login();
if (!isadmin()) {
error("You must be an admin");
}
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
$strtimezone = get_string("timezone");
$strsavechanges = get_string("savechanges");
@@ -17,7 +17,7 @@
print_heading("");
if (isset($zone) and confirm_sesskey()) {
if (!empty($zone) and confirm_sesskey()) {
$db->debug = true;
echo "<center>";
execute_sql("UPDATE {$CFG->prefix}user SET timezone = '$zone'");
@@ -27,29 +27,12 @@
$USER->timezone = $zone;
}
$user = $USER;
if (abs($user->timezone) > 13) {
$user->timezone = 99;
}
$timenow = time();
$timeformat = get_string('strftimedaytime');
for ($tz = -26; $tz <= 26; $tz++) {
$zone = (float)$tz/2.0;
$usertime = $timenow + ($tz * 1800);
if ($tz == 0) {
$timezones["$zone"] = gmstrftime($timeformat, $usertime)." (GMT)";
} else if ($tz < 0) {
$timezones["$zone"] = gmstrftime($timeformat, $usertime)." (GMT$zone)";
} else {
$timezones["$zone"] = gmstrftime($timeformat, $usertime)." (GMT+$zone)";
}
}
require_once($CFG->dirroot.'/calendar/lib.php');
$timezones = get_list_of_timezones();
echo '<center><form action="timezone.php" method="get">';
echo "$strusers ($strall): ";
choose_from_menu ($timezones, "zone", $user->timezone, get_string("serverlocaltime"), "", "99");
choose_from_menu ($timezones, "zone", 99, get_string("serverlocaltime"), "", "99");
echo "<input type=\"hidden\" name=\"sesskey\" value=\"$USER->sesskey\">";
echo "<input type=\"submit\" value=\"$strsavechanges\">";
echo "</form></center>";
+11 -21
View File
@@ -1,34 +1,24 @@
<?php // $Id$
// Automatic update of Timezones from a new source
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/filelib.php');
require_once($CFG->libdir.'/olson.php');
$ok = optional_param('ok');
$adminroot = admin_get_root();
admin_externalpage_setup('timezoneimport', $adminroot);
require_login();
$ok = optional_param('ok', 0, PARAM_BOOL);
if (!isadmin()) {
error('Only administrators can use this page!');
}
if (!$site = get_site()) {
error('Site isn\'t defined!');
}
/// Print headings
$stradministration = get_string('administration');
$strconfiguration = get_string('configuration');
$strcalendarsettings = get_string('calendarsettings', 'admin');
$strimporttimezones = get_string('importtimezones', 'admin');
print_header("$site->shortname: $strcalendarsettings", "$site->fullname",
"<a href=\"index.php\">$stradministration</a> -> ".
"<a href=\"configure.php\">$strconfiguration</a> -> ".
"<a href=\"calendar.php\">$strcalendarsettings</a> -> $strimporttimezones");
admin_externalpage_print_header($adminroot);
print_heading($strimporttimezones);
@@ -42,9 +32,9 @@
$message = get_string("configintrotimezones", 'admin', $message);
notice_yesno($message, 'timezoneimport.php?ok=1&sesskey='.sesskey(), 'calendar.php');
notice_yesno($message, 'timezoneimport.php?ok=1&sesskey='.sesskey(), 'index.php');
print_footer();
admin_externalpage_print_footer($adminroot);
exit;
}
@@ -110,7 +100,7 @@
$a->source = $importdone;
print_heading(get_string('importtimezonescount', 'admin', $a), '', 3);
print_continue('calendar.php');
print_continue('index.php');
$timezonelist = array();
foreach ($timezones as $timezone) {
@@ -131,9 +121,9 @@
} else {
print_heading(get_string('importtimezonesfailed', 'admin'), '', 3);
print_continue('calendar.php');
print_continue('index.php');
}
print_footer();
admin_externalpage_print_footer($adminroot);
?>
+21 -68
View File
@@ -1,41 +1,39 @@
<?PHP //$Id$
require("../config.php");
require("$CFG->dirroot/mod/forum/lib.php");
require_once('../config.php');
require_once($CFG->dirroot.'/mod/forum/lib.php');
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('upgradeforumread', $adminroot);
$confirm = optional_param('confirm');
$confirm = optional_param('confirm', 0, PARAM_BOOL);
require_login();
if (!isadmin()) {
error("You must be an admin to use this script");
}
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
if ($CFG->version < 2005042300) {
error("This script does not work with this old version of Moodle");
}
if (!$site = get_site()) {
redirect("index.php");
redirect('index.php');
}
/// Print header
$stradministration = get_string("administration");
$strupgradingdata = get_string("upgradingdata", "admin");
$strupgradingdata = get_string('upgradingdata', 'admin');
print_header("$site->shortname: $stradministration: $strupgradingdata", "$site->fullname",
"<a href=\"index.php\">$stradministration</a> -> $strupgradingdata");
admin_externalpage_print_header($adminroot);
print_heading($strupgradingdata);
if (empty($confirm)) {
notice_yesno(get_string("upgradeforumreadinfo", "admin"),
"upgradeforumread.php?confirm=true&sesskey=$USER->sesskey",
"index.php");
print_footer();
if (!data_submitted() or empty($confirm) or !confirm_sesskey()) {
$optionsyes = array('confirm'=>'1', 'sesskey'=>sesskey());
notice_yesno(get_string('upgradeforumreadinfo', 'admin'),
'upgradeforumread.php', 'index.php', $optionsyes, NULL, 'post', 'get');
admin_externalpage_print_footer($adminroot);
exit;
} else if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
}
@@ -43,7 +41,7 @@
@set_time_limit(0);
@ob_implicit_flush(true);
@ob_end_flush();
while(@ob_end_flush());
execute_sql('TRUNCATE TABLE '.$CFG->prefix.'forum_read;', false); // Trash all old entries
@@ -64,7 +62,7 @@
'Please keep this window open until it completes', '', 3);
$groups = array();
$currcourse = 0;
$users = 0;
$count = 0;
@@ -82,7 +80,7 @@
/// If this course has users, and posts more than a day old, mark them for each user.
if ($users &&
($posts = get_records_select('forum_posts', 'discussion = '.$discussion->id.
' AND '.$dateafter.' < modified AND modified < '.$onedayago,
' AND '.$dateafter.' < modified AND modified < '.$onedayago,
'', 'id,discussion,modified'))) {
foreach ($users as $user) {
/// If its a group discussion, make sure the user is in the group.
@@ -102,7 +100,7 @@
}
print_progress($dcount, $dtotal, 0);
}
delete_records('config', 'name', 'upgrade', 'value', 'forumread');
@@ -110,51 +108,6 @@
print_continue('index.php');
print_footer();
exit;
function print_progress($done, $total, $updatetime=5, $sleeptime=1) {
static $count;
static $starttime;
static $lasttime;
if (empty($starttime)) {
$starttime = $lasttime = time();
$lasttime = $starttime - $updatetime;
echo '<table width="500" cellpadding="0" cellspacing="0" align="center"><tr><td width="500">';
echo '<div id="bar" style="border-style:solid;border-width:1px;width:500px;height:50px;">';
echo '<div id="slider" style="border-style:solid;border-width:1px;height:48px;width:10px;background-color:green;"></div>';
echo '</div>';
echo '<div id="text" align="center" style="width:500px;"></div>';
echo '</td></tr></table>';
echo '</div>';
}
if (!isset($count)) {
$count = 0;
}
$count++;
$now = time();
if ($done && (($now - $lasttime) >= $updatetime)) {
$elapsedtime = $now - $starttime;
$projectedtime = (int)(((float)$total / (float)$done) * $elapsedtime) - $elapsedtime;
$percentage = format_float((float)$done / (float)$total, 2);
$width = (int)(500 * $percentage);
echo '<script>';
echo 'document.getElementById("text").innerHTML = "'.$count.' done. Ending: '.format_time($projectedtime).'";'."\n";
echo 'document.getElementById("slider").style.width = \''.$width.'px\';'."\n";
echo '</script>';
$lasttime = $now;
sleep($sleeptime);
}
}
admin_externalpage_print_footer($adminroot);
?>
+38 -38
View File
@@ -1,14 +1,15 @@
<?PHP //$Id$
require("../config.php");
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('upgradelogs', $adminroot);
$confirm = optional_param('confirm');
$confirm = optional_param('confirm', 0, PARAM_BOOL);
require_login();
if (!isadmin()) {
error("You must be an admin to use this script");
}
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
if ($CFG->version < 2004013101) {
error("This script does not work with this old version of Moodle");
@@ -21,31 +22,29 @@
/// Turn off time limits, sometimes upgrades can be slow.
@set_time_limit(0);
@ob_implicit_flush(true);
while(@ob_end_flush());
/// Print header
$stradministration = get_string("administration");
$strupgradinglogs = get_string("upgradinglogs", "admin");
admin_externalpage_print_header($adminroot);
print_heading($strupgradinglogs);
print_header("$site->shortname: $stradministration: $strupgradinglogs", "$site->fullname",
"<a href=\"index.php\">$stradministration</a> -> $strupgradinglogs");
if (empty($confirm)) {
notice_yesno(get_string("upgradelogsinfo", "admin"),
"upgradelogs.php?confirm=true&sesskey=$USER->sesskey",
"index.php");
print_footer();
if (!data_submitted() or empty($confirm) or !confirm_sesskey()) {
$optionsyes = array('confirm'=>'1', 'sesskey'=>sesskey());
notice_yesno(get_string('upgradeforumreadinfo', 'admin'),
'upgradelogs.php', 'index.php', $optionsyes, NULL, 'post', 'get');
admin_externalpage_print_footer($adminroot);
exit;
} else if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
}
/// Try and extract as many cmids as possible from the existing logs
if ($coursemodules = get_records_sql("SELECT cm.*, m.name
FROM {$CFG->prefix}course_modules cm,
if ($coursemodules = get_records_sql("SELECT cm.*, m.name
FROM {$CFG->prefix}course_modules cm,
{$CFG->prefix}modules m
WHERE cm.module = m.id")) {
$cmcount = count($coursemodules);
@@ -60,52 +59,52 @@
}
if ($cmcount > 10) {
print_simple_box('This process may take a very long time ... please be patient and let it finish.',
print_simple_box('This process may take a very long time ... please be patient and let it finish.',
'center', '', '#ffcccc');
$sleeptime = 1;
}
foreach ($coursemodules as $cm) {
switch ($cm->name) {
switch ($cm->name) {
case "forum":
execute_sql("UPDATE {$CFG->prefix}log SET cmid = '$cm->id'
execute_sql("UPDATE {$CFG->prefix}log SET cmid = '$cm->id'
WHERE module = '$cm->name' AND url = 'view.php?id=$cm->id'", false);
execute_sql("UPDATE {$CFG->prefix}log SET cmid = '$cm->id'
execute_sql("UPDATE {$CFG->prefix}log SET cmid = '$cm->id'
WHERE module = '$cm->name' AND url = 'view.php?f=$cm->instance'", false);
if ($discussions = get_records("forum_discussions", "forum", $cm->instance)) {
foreach ($discussions as $discussion) {
execute_sql("UPDATE {$CFG->prefix}log SET cmid = '$cm->id'
execute_sql("UPDATE {$CFG->prefix}log SET cmid = '$cm->id'
WHERE module = '$cm->name' AND url $LIKE 'discuss.php?d=$discussion->id%'", false);
}
}
break;
case "glossary":
execute_sql("UPDATE {$CFG->prefix}log SET cmid = '$cm->id'
case "glossary":
execute_sql("UPDATE {$CFG->prefix}log SET cmid = '$cm->id'
WHERE module = '$cm->name' AND url $LIKE 'view.php?id=$cm->id%'", false);
break;
case "quiz":
execute_sql("UPDATE {$CFG->prefix}log SET cmid = '$cm->id'
case "quiz":
execute_sql("UPDATE {$CFG->prefix}log SET cmid = '$cm->id'
WHERE module = '$cm->name' AND url = 'view.php?id=$cm->id'", false);
break;
case "assignment":
execute_sql("UPDATE {$CFG->prefix}log SET cmid = '$cm->id'
case "assignment":
execute_sql("UPDATE {$CFG->prefix}log SET cmid = '$cm->id'
WHERE module = '$cm->name' AND url = 'view.php?id=$cm->id'", false);
execute_sql("UPDATE {$CFG->prefix}log SET cmid = '$cm->id'
execute_sql("UPDATE {$CFG->prefix}log SET cmid = '$cm->id'
WHERE module = '$cm->name' AND url = 'view.php?a=$cm->instance'", false);
execute_sql("UPDATE {$CFG->prefix}log SET cmid = '$cm->id'
execute_sql("UPDATE {$CFG->prefix}log SET cmid = '$cm->id'
WHERE module = '$cm->name' AND url = 'submissions.php?id=$cm->instance'", false);
break;
case "journal":
execute_sql("UPDATE {$CFG->prefix}log SET cmid = '$cm->id'
case "journal":
execute_sql("UPDATE {$CFG->prefix}log SET cmid = '$cm->id'
WHERE module = '$cm->name' AND url = 'report.php?id=$cm->id'", false);
execute_sql("UPDATE {$CFG->prefix}log SET cmid = '$cm->id'
execute_sql("UPDATE {$CFG->prefix}log SET cmid = '$cm->id'
WHERE module = '$cm->name' AND url = 'view.php?id=$cm->id'", false);
break;
@@ -125,9 +124,10 @@
delete_records("config", "name", "upgrade", "value", "logs");
notify("Log upgrading was successful!");
notify('Log upgrading was successful!', 'notifysuccess');
print_continue('index.php');
print_footer();
admin_externalpage_print_footer($adminroot);
?>
+145
View File
@@ -0,0 +1,145 @@
<?php // $Id$
// detects settings that were added during an upgrade, displays a screen for the admin to
// modify them, and then processes modifications
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('upgradesettings', $adminroot); // now hidden page
// a caveat: we're depending on only having one admin access this page at once. why? the following line
// (the function call to find_new_settings) must have the EXACT SAME RETURN VALUE both times that this
// page is loaded (i.e. both when we're displaying the form and then when we process the form's input).
// if the return values don't match, we could potentially lose changes that the admin is making.
$newsettingshtml = output_new_settings_by_page(admin_get_root());
// first we deal with the case where there are no new settings to be set
if ($newsettingshtml == '') {
redirect($CFG->wwwroot . '/' . $CFG->admin . '/index.php');
die;
}
// now we'll deal with the case that the admin has submitted the form with new settings
if ($data = data_submitted()) {
$unslashed = (array)stripslashes_recursive($data);
if (confirm_sesskey()) {
$newsettings = find_new_settings(admin_get_root());
$errors = '';
foreach($newsettings as $newsetting) {
if (isset($unslashed['s_' . $newsetting->name])) {
$errors .= $newsetting->write_setting($unslashed['s_' . $newsetting->name]);
} else {
$errors .= $newsetting->write_setting($newsetting->defaultsetting);
}
}
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 . '/index.php');
die;
} else {
error(get_string('errorwithsettings', 'admin') . ' <br />' . $errors);
die;
}
} else {
error(get_string('confirmsesskeybad', 'error'));
die;
}
}
// and finally, if we get here, then there are new 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','');
echo '<form action="upgradesettings.php" method="post" name="adminsettings" id="adminsettings">';
echo '<input type="hidden" name="sesskey" value="' . sesskey() . '" />';
echo '<fieldset>';
echo '<div class="clearer"><!-- --></div>';
echo $newsettingshtml;
echo '<div class="form-buttons"><input class="form-submit" type="submit" value="' . get_string('savechanges','admin') . '" /></div>';
echo '</form>';
admin_externalpage_print_footer($adminroot);
/**
* Find settings that have not been initialized (e.g. during initial install or an upgrade).
*
* Tests each setting's get_setting() method. If the result is NULL, we consider the setting
* to be uninitialized.
*
* @param string &$node The node at which to start searching. Should be $ADMIN for all external calls to this function.
* @return array An array containing admin_setting objects that haven't yet been initialized
*/
function find_new_settings(&$node) {
if (is_a($node, 'admin_category')) {
$return = array();
$entries = array_keys($node->children);
foreach ($entries as $entry) {
$return = array_merge($return, find_new_settings($node->children[$entry]));
}
return $return;
}
if (is_a($node, 'admin_settingpage')) {
$return = array();
foreach ($node->settings as $setting) {
if ($setting->get_setting() === NULL) {
$return[] =& $setting;
}
unset($setting); // needed to prevent odd (imho) reference behaviour
// see http://www.php.net/manual/en/language.references.whatdo.php#AEN6399
}
return $return;
}
return array();
}
function output_new_settings_by_page(&$node) {
if (is_a($node, 'admin_category')) {
$entries = array_keys($node->children);
$return = '';
foreach ($entries as $entry) {
$return .= output_new_settings_by_page($node->children[$entry]);
}
return $return;
}
if (is_a($node, 'admin_settingpage')) {
$newsettings = array();
foreach ($node->settings as $setting) {
if ($setting->get_setting() === NULL) {
$newsettings[] =& $setting;
}
unset($setting); // needed to prevent odd (imho) reference behaviour
// see http://www.php.net/manual/en/language.references.whatdo.php#AEN6399
}
$return = '';
if (count($newsettings) > 0) {
$return .= print_heading(get_string('upgradesettings','admin').' - '.$node->visiblename, '', 2, 'main', true);
$return .= '<fieldset class="adminsettings">' . "\n";
foreach ($newsettings as $newsetting) {
$return .= '<div class="clearer"><!-- --></div>' . "\n";
$return .= $newsetting->output_html();
}
$return .= '</fieldset>';
}
return $return;
}
return '';
}
?>
+358 -343
View File
@@ -3,397 +3,413 @@
/// Bulk user registration script from a comma separated file
/// Returns list of users with their user ids
require_once("../config.php");
require_once('../config.php');
require_once($CFG->libdir.'/uploadlib.php');
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('uploadusers', $adminroot);
$numusers = optional_param('numusers', 0, PARAM_INT);
$createpassword = optional_param('createpassword', 0, PARAM_BOOL);
$updateaccounts = optional_param('updateaccounts', 0, PARAM_BOOL);
$allowrenames = optional_param('allowrenames', 0, PARAM_BOOL);
require_login();
require_login();
if (!isadmin()) {
error("You must be an administrator to edit users this way.");
}
if (! $site = get_site()) {
error("Could not find site-level course");
}
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
}
if (!$adminuser = get_admin()) {
error("Could not find site admin");
}
$streditmyprofile = get_string("editmyprofile");
$stradministration = get_string("administration");
$strchoose = get_string("choose");
$struser = get_string("user");
$strusers = get_string("users");
$strusersnew = get_string("usersnew");
$strusersupdated = get_string("usersupdated");
$struploadusers = get_string("uploadusers");
$straddnewuser = get_string("importuser");
$csv_encode = '/\&\#44/';
if (isset($CFG->CSV_DELIMITER)) {
$csv_delimiter = '\\' . $CFG->CSV_DELIMITER;
$csv_delimiter2 = $CFG->CSV_DELIMITER;
if (isset($CFG->CSV_ENCODE)) {
$csv_encode = '/\&\#' . $CFG->CSV_ENCODE . '/';
}
} else {
$csv_delimiter = "\,";
$csv_delimiter2 = ",";
require_capability('moodle/site:uploadusers', get_context_instance(CONTEXT_SYSTEM, SITEID));
if (! $site = get_site()) {
error("Could not find site-level course");
}
if (!$adminuser = get_admin()) {
error("Could not find site admin");
}
$strfile = get_string('file');
$struser = get_string('user');
$strusersnew = get_string('usersnew');
$strusersupdated = get_string('usersupdated');
$struploadusers = get_string('uploadusers');
$straddnewuser = get_string('importuser');
$csv_encode = '/\&\#44/';
if (isset($CFG->CSV_DELIMITER)) {
$csv_delimiter = '\\' . $CFG->CSV_DELIMITER;
$csv_delimiter2 = $CFG->CSV_DELIMITER;
if (isset($CFG->CSV_ENCODE)) {
$csv_encode = '/\&\#' . $CFG->CSV_ENCODE . '/';
}
} else {
$csv_delimiter = "\,";
$csv_delimiter2 = ",";
}
/// Print the header
print_header("$site->shortname: $struploadusers", $site->fullname,
"<a href=\"index.php\">$stradministration</a> ->
<a href=\"users.php\">$strusers</a> -> $struploadusers");
admin_externalpage_print_header($adminroot);
/// If a file has been uploaded, then process it
require_once($CFG->dirroot.'/lib/uploadlib.php');
$um = new upload_manager('userfile',false,false,null,false,0);
if ($um->preprocess_files()) {
$filename = $um->files['userfile']['tmp_name'];
$um = new upload_manager('userfile',false,false,null,false,0);
// Large files are likely to take their time and memory. Let PHP know
// that we'll take longer, and that the process should be recycled soon
// to free up memory.
@set_time_limit(0);
@raise_memory_limit("128M");
if (function_exists('apache_child_terminate')) {
@apache_child_terminate();
}
if ($um->preprocess_files() && confirm_sesskey()) {
$filename = $um->files['userfile']['tmp_name'];
//Fix mac/dos newlines
$text = my_file_get_contents($filename);
$text = preg_replace('!\r\n?!',"\n",$text);
$fp = fopen($filename, "w");
fwrite($fp,$text);
fclose($fp);
// Large files are likely to take their time and memory. Let PHP know
// that we'll take longer, and that the process should be recycled soon
// to free up memory.
@set_time_limit(0);
@raise_memory_limit("128M");
if (function_exists('apache_child_terminate')) {
@apache_child_terminate();
}
$fp = fopen($filename, "r");
//Fix mac/dos newlines
$text = my_file_get_contents($filename);
$text = preg_replace('!\r\n?!',"\n",$text);
$fp = fopen($filename, "w");
fwrite($fp,$text);
fclose($fp);
// make arrays of valid fields for error checking
$required = array("username" => 1,
"password" => 1,
"firstname" => 1,
"lastname" => 1,
"email" => 1);
$optionalDefaults = array("institution" => 1,
"department" => 1,
"city" => 1,
"country" => 1,
"lang" => 1,
"auth" => 1,
"timezone" => 1);
$optional = array("idnumber" => 1,
"icq" => 1,
"phone1" => 1,
"phone2" => 1,
"address" => 1,
"url" => 1,
"description" => 1,
"mailformat" => 1,
"maildisplay" => 1,
"htmleditor" => 1,
"autosubscribe" => 1,
"idnumber" => 1,
"icq" => 1,
"course1" => 1,
"course2" => 1,
"course3" => 1,
"course4" => 1,
"course5" => 1,
"group1" => 1,
"group2" => 1,
"group3" => 1,
"group4" => 1,
"group5" =>1);
$fp = fopen($filename, "r");
// form data cleanup
$frmpassword = optional_param('frmpassword', '', PARAM_ALPHA);
$updateaccounts = optional_param('updateaccounts', false, PARAM_BOOL);
$allowrenames = optional_param('allowrenames', false, PARAM_BOOL);
// make arrays of valid fields for error checking
$required = array("username" => 1,
"password" => !$createpassword,
"firstname" => 1,
"lastname" => 1,
"email" => 1);
$optionalDefaults = array("institution" => 1,
"department" => 1,
"city" => 1,
"country" => 1,
"lang" => 1,
"auth" => 1,
"timezone" => 1);
$optional = array("idnumber" => 1,
"icq" => 1,
"phone1" => 1,
"phone2" => 1,
"address" => 1,
"url" => 1,
"description" => 1,
"mailformat" => 1,
"maildisplay" => 1,
"htmleditor" => 1,
"autosubscribe" => 1,
"idnumber" => 1,
"icq" => 1,
"course1" => 1,
"course2" => 1,
"course3" => 1,
"course4" => 1,
"course5" => 1,
"group1" => 1,
"group2" => 1,
"group3" => 1,
"group4" => 1,
"group5" => 1,
"type1" => 1,
"type2" => 1,
"type3" => 1,
"type4" => 1,
"type5" => 1,
"role1" => 1,
"role2" => 1,
"role3" => 1,
"role4" => 1,
"role5" => 1,
"password" => $createpassword,
"oldusername" => $allowrenames);
if ($frmpassword === 'create') {
unset($required['password']);
$optional['password'] = 1;
}
if ($allowrenames) {
$optional['oldusername'] = 1;
}
// --- get header (field names) ---
$header = split($csv_delimiter, fgets($fp,1024));
// check for valid field names
foreach ($header as $i => $h) {
$h = trim($h); $header[$i] = $h; // remove whitespace
if (!($required[$h] or $optionalDefaults[$h] or $optional[$h])) {
error(get_string('invalidfieldname', 'error', $h), 'uploaduser.php?sesskey='.$USER->sesskey);
}
if ($required[$h]) {
$required[$h] = 2;
}
}
// check for required fields
foreach ($required as $key => $value) {
if ($value < 2) {
error(get_string('fieldrequired', 'error', $key), 'uploaduser.php?sesskey='.$USER->sesskey);
}
}
$linenum = 2; // since header is line 1
$usersnew = 0;
$usersupdated = 0;
$userserrors = 0;
$renames = 0;
$renameerrors = 0;
// Will use this course array a lot
// so fetch it early and keep it in memory
$courses = get_courses("all",'c.sortorder','c.id,c.shortname,c.fullname,c.sortorder');
while (!feof ($fp)) {
foreach ($optionalDefaults as $key => $value) {
$user->$key = addslashes($adminuser->$key);
}
//Note: commas within a field should be encoded as &#44 (for comma separated csv files)
//Note: semicolon within a field should be encoded as &#59 (for semicolon separated csv files)
$line = split($csv_delimiter, fgets($fp,1024));
foreach ($line as $key => $value) {
//decode encoded commas
$record[$header[$key]] = preg_replace($csv_encode,$csv_delimiter2,trim($value));
}
if ($record[$header[0]]) {
// add a new user to the database
$newuser = optional_param('newuser', "", PARAM_CLEAN);
// add fields to object $user
foreach ($record as $name => $value) {
// check for required values
if ($required[$name] and !$value) {
error(get_string('missingfield', 'error', $name). " ".
get_string('erroronline', 'error', $linenum) .". ".
get_string('processingstops', 'error'),
'uploaduser.php?sesskey='.$USER->sesskey);
}
// password needs to be encrypted
else if ($name == "password" && !empty($value)) {
$user->password = md5($value);
}
else if ($name == "username") {
$user->username = addslashes(moodle_strtolower($value));
}
// normal entry
else {
$user->{$name} = addslashes($value);
}
// --- get header (field names) ---
$header = split($csv_delimiter, fgets($fp,1024));
// check for valid field names
foreach ($header as $i => $h) {
$h = trim($h); $header[$i] = $h; // remove whitespace
if (!($required[$h] or $optionalDefaults[$h] or $optional[$h])) {
error(get_string('invalidfieldname', 'error', $h), 'uploaduser.php?sesskey='.$USER->sesskey);
}
$user->confirmed = 1;
$user->timemodified = time();
$linenum++;
$username = $user->username;
$addcourse[0] = $user->course1;
$addcourse[1] = $user->course2;
$addcourse[2] = $user->course3;
$addcourse[3] = $user->course4;
$addcourse[4] = $user->course5;
$addgroup[0] = $user->group1;
$addgroup[1] = $user->group2;
$addgroup[2] = $user->group3;
$addgroup[3] = $user->group4;
$addgroup[4] = $user->group5;
for ($i=0; $i<5; $i++) {
$courseid[$i]=0;
if ($required[$h]) {
$required[$h] = 0;
}
foreach ($courses as $course) {
for ($i=0; $i<5; $i++) {
if ($course->shortname == $addcourse[$i]) {
$courseid[$i] = $course->id;
}
// check for required fields
foreach ($required as $key => $value) {
if ($value) { //required field missing
error(get_string('fieldrequired', 'error', $key), 'uploaduser.php?sesskey='.$USER->sesskey);
}
}
$linenum = 2; // since header is line 1
$usersnew = 0;
$usersupdated = 0;
$userserrors = 0;
$renames = 0;
$renameerrors = 0;
// Will use this course array a lot
// so fetch it early and keep it in memory
$courses = get_courses('all','c.sortorder','c.id,c.shortname,c.fullname,c.sortorder,c.teacher,c.visible');
while (!feof ($fp)) {
foreach ($optionalDefaults as $key => $value) {
$user->$key = addslashes($adminuser->$key);
}
//Note: commas within a field should be encoded as &#44 (for comma separated csv files)
//Note: semicolon within a field should be encoded as &#59 (for semicolon separated csv files)
$line = split($csv_delimiter, fgets($fp,1024));
foreach ($line as $key => $value) {
//decode encoded commas
$record[$header[$key]] = preg_replace($csv_encode,$csv_delimiter2,trim($value));
}
if ($record[$header[0]]) {
// add a new user to the database
// add fields to object $user
foreach ($record as $name => $value) {
// check for required values
if ($required[$name] and !$value) {
error(get_string('missingfield', 'error', $name). " ".
get_string('erroronline', 'error', $linenum) .". ".
get_string('processingstops', 'error'),
'uploaduser.php?sesskey='.$USER->sesskey);
}
// password needs to be encrypted
else if ($name == "password" && !empty($value)) {
$user->password = hash_internal_user_password($value);
}
else if ($name == "username") {
$user->username = addslashes(moodle_strtolower($value));
}
// normal entry
else {
$user->{$name} = addslashes($value);
}
}
}
$user->confirmed = 1;
$user->timemodified = time();
$linenum++;
$username = $user->username;
$addcourse[0] = isset($user->course1) ? $user->course1 : NULL;
$addcourse[1] = isset($user->course2) ? $user->course2 : NULL;
$addcourse[2] = isset($user->course3) ? $user->course3 : NULL;
$addcourse[3] = isset($user->course4) ? $user->course4 : NULL;
$addcourse[4] = isset($user->course5) ? $user->course5 : NULL;
$addgroup[0] = isset($user->group1) ? $user->group1 : NULL;
$addgroup[1] = isset($user->group2) ? $user->group2 : NULL;
$addgroup[2] = isset($user->group3) ? $user->group3 : NULL;
$addgroup[3] = isset($user->group4) ? $user->group4 : NULL;
$addgroup[4] = isset($user->group5) ? $user->group5 : NULL;
$addtype[0] = isset($user->type1) ? $user->type1 : NULL;
$addtype[1] = isset($user->type2) ? $user->type2 : NULL;
$addtype[2] = isset($user->type3) ? $user->type3 : NULL;
$addtype[3] = isset($user->type4) ? $user->type4 : NULL;
$addtype[4] = isset($user->type5) ? $user->type5 : NULL;
$addrole[0] = isset($user->role1) ? $user->role1 : NULL;
$addrole[1] = isset($user->role2) ? $user->role2 : NULL;
$addrole[2] = isset($user->role3) ? $user->role3 : NULL;
$addrole[3] = isset($user->role4) ? $user->role4 : NULL;
$addrole[4] = isset($user->role5) ? $user->role5 : NULL;
if ($user->username === 'changeme') {
notify(get_string('invaliduserchangeme', 'admin'));
$userserrors++;
continue;
}
for ($i=0; $i<5; $i++) {
$course[$i]=NULL;
}
foreach ($courses as $eachcourse) {
for ($i=0; $i<5; $i++) {
if ($eachcourse->shortname == $addcourse[$i]) {
$course[$i] = $eachcourse;
}
}
}
// before insert/update, check whether we should be updating
// an old record instead
if ($allowrenames && !empty($user->oldusername) ) {
$user->oldusername = moodle_strtolower($user->oldusername);
if ($olduser = get_record('user','username',$user->oldusername)) {
if (set_field('user', 'username', $user->username, 'username', $user->oldusername)) {
notify(get_string('userrenamed', 'admin') . " : $user->oldusername $user->username");
$renames++;
if ($user->username === 'changeme') {
notify(get_string('invaliduserchangeme', 'admin'));
$userserrors++;
continue;
}
// before insert/update, check whether we should be updating
// an old record instead
if ($allowrenames && !empty($user->oldusername) ) {
$user->oldusername = moodle_strtolower($user->oldusername);
if ($olduser = get_record('user','username',$user->oldusername)) {
if (set_field('user', 'username', $user->username, 'username', $user->oldusername)) {
notify(get_string('userrenamed', 'admin') . " : $user->oldusername $user->username");
$renames++;
} else {
notify(get_string('usernotrenamedexists', 'error') . " : $user->oldusername $user->username");
$renameerrors++;
continue;
}
} else {
notify(get_string('usernotrenamedexists', 'error') . " : $user->oldusername $user->username");
notify(get_string('usernotrenamedmissing', 'error') . " : $user->oldusername $user->username");
$renameerrors++;
continue;
}
} else {
notify(get_string('usernotrenamedmissing', 'error') . " : $user->oldusername $user->username");
$renameerrors++;
continue;
}
}
if ($olduser = get_record("user","username",$username)) {
if ($updateaccounts) {
// Record is being updated
$user->id = $olduser->id;
if (update_record('user', $user)) {
notify("$user->id , $user->username ".get_string('useraccountupdated', 'admin'));
$usersupdated++;
if ($olduser = get_record("user","username",$username)) {
if ($updateaccounts) {
// Record is being updated
$user->id = $olduser->id;
if (update_record('user', $user)) {
notify("$user->id , $user->username ".get_string('useraccountupdated', 'admin'));
$usersupdated++;
} else {
notify(get_string('usernotupdatederror', 'error', $username));
$userserrors++;
continue;
}
} else {
notify(get_string('usernotupdatederror', 'error', $username));
//Record not added - user is already registered
//In this case, output userid from previous registration
//This can be used to obtain a list of userids for existing users
notify("$olduser->id ".get_string('usernotaddedregistered', 'error', $username));
$userserrors++;
}
} else { // new user
if ($user->id = insert_record("user", $user)) {
notify("$struser: $user->id = $user->username");
$usersnew++;
if (empty($user->password) && $createpassword) {
// passwords will be created and sent out on cron
insert_record('user_preferences', array( userid => $user->id,
name => 'create_password',
value => 1));
insert_record('user_preferences', array( userid => $user->id,
name => 'auth_forcepasswordchange',
value => 1));
}
} else {
// Record not added -- possibly some other error
notify(get_string('usernotaddederror', 'error', $username));
$userserrors++;
continue;
}
} else {
//Record not added - user is already registered
//In this case, output userid from previous registration
//This can be used to obtain a list of userids for existing users
notify("$user->id ".get_string('usernotaddedregistered', 'error', $username));
$userserrors++;
continue;
}
for ($i=0; $i<5; $i++) {
if ($addcourse[$i] && !$course[$i]) {
notify(get_string('unknowncourse', 'error', $addcourse[$i]));
}
}
for ($i=0; $i<5; $i++) {
$groupid[$i] = 0;
if ($addgroup[$i]) {
if (!$course[$i]) {
notify(get_string('coursegroupunknown','error',$addgroup[$i]));
} else {
if ($group = get_record("groups","courseid",$course[$i]->id,"name",$addgroup[$i])) {
$groupid[$i] = $group->id;
} else {
notify(get_string('groupunknown','error',$addgroup[$i]));
}
}
}
}
for ($i=0; $i<5; $i++) { /// Enrol into courses if necessary
if ($course[$i]) {
if (isset($addrole[$i])) {
$coursecontext = get_context_instance(CONTEXT_COURSE, $course[$i]->id);
if (!user_can_assign($coursecontext, $addrole[$i])) {
notify('--> Can not assign role in course'); //TODO: localize
}
$ret = role_assign($addrole[$i], $user->id, 0, $coursecontext->id);
} else if (isset($addtype[$i])) {
switch ($addtype[$i]) {
case 2: // teacher
$ret = add_teacher($user->id, $course[$i]->id, 1);
break;
case 3: // non-editing teacher
$ret = add_teacher($user->id, $course[$i]->id, 0);
break;
default: // student
$ret = enrol_student($user->id, $course[$i]->id);
break;
}
} else {
$ret = enrol_student($user->id, $course[$i]->id);
}
if ($ret) { // OK
notify('-->'. get_string('enrolledincourse', '', $addcourse[$i]));
} else {
notify('-->'.get_string('enrolledincoursenot', '', $addcourse[$i]));
}
}
}
for ($i=0; $i<5; $i++) { // Add user to groups if necessary
if ($course[$i] && $groupid[$i]) {
$coursecontext = get_context_instance(CONTEXT_COURSE, $course[$i]->id);
if (count(get_user_roles($coursecontext, $user->id))) {
if (add_user_to_group($groupid[$i], $user->id)) {
notify('-->' . get_string('addedtogroup','',$addgroup[$i]));
} else {
notify('-->' . get_string('addedtogroupnot','',$addgroup[$i]));
}
} else {
notify('-->' . get_string('addedtogroupnotenrolled','',$addgroup[$i]));
}
}
}
} else { // new user
if ($user->id = insert_record("user", $user)) {
notify("$struser: $user->id = $user->username");
$usersnew++;
if (empty($user->password) && $frmpassword === 'create') {
// passwords will be created and sent out on cron
insert_record('user_preferences', array( userid => $user->id,
name => 'create_password',
value => 1));
insert_record('user_preferences', array( userid => $user->id,
name => 'auth_forcepasswordchange',
value => 1));
}
} else {
// Record not added -- possibly some other error
notify(get_string('usernotaddederror', 'error', $username));
$userserrors++;
continue;
}
unset ($user);
}
for ($i=0; $i<5; $i++) {
if ($addcourse[$i] && !$courseid[$i]) {
notify(get_string('unknowncourse', 'error', $addcourse[$i]));
}
}
for ($i=0; $i<5; $i++) {
$groupid[$i] = 0;
if ($addgroup[$i]) {
if (!$courseid[$i]) {
notify(get_string('coursegroupunknown','error',$addgroup[$i]));
} else {
if ($group = get_record("groups","courseid",$courseid[$i],"name",$addgroup[$i])) {
$groupid[$i] = $group->id;
} else {
notify(get_string('groupunknown','error',$addgroup[$i]));
}
}
}
}
for ($i=0; $i<5; $i++) {
if ($courseid[$i]) {
if (enrol_student($user->id, $courseid[$i])) {
notify('-->'. get_string('enrolledincourse', '', $addcourse[$i]));
} else {
notify('-->'.get_string('enrolledincoursenot', '', $addcourse[$i]));
}
}
}
for ($i=0; $i<5; $i++) {
if ($courseid[$i] && $groupid[$i]) {
if (record_exists("user_students","userid",$user->id,"course",$courseid[$i])) {
$usergroup = user_group($courseid[$i],$user->id);
if ($usergroup) {
notify('-->' . get_string('groupalready','error',$usergroup->name));
} else {
$group_member->groupid = $groupid[$i];
$group_member->userid = $user->id;
$group_member->timeadded = time();
if (insert_record("groups_members",$group_member)) {
notify('-->' . get_string('addedtogroup','',$addgroup[$i]));
} else {
notify('-->' . get_string('addedtogroupnot','',$addgroup[$i]));
}
}
} else {
notify('-->' . get_string('addedtogroupnotenrolled','',$addgroup[$i]));
}
}
}
unset ($user);
}
}
fclose($fp);
notify("$strusersnew: $usersnew");
notify(get_string('usersupdated', 'admin') . ": $usersupdated");
notify(get_string('errors', 'admin') . ": $userserrors");
if ($allowrenames) {
notify(get_string('usersrenamed', 'admin') . ": $renames");
notify(get_string('renameerrors', 'admin') . ": $renameerrors");
}
echo '<hr />';
}
fclose($fp);
notify("$strusersnew: $usersnew");
notify(get_string('usersupdated', 'admin') . ": $usersupdated");
notify(get_string('errors', 'admin') . ": $userserrors");
if ($allowrenames) {
notify(get_string('usersrenamed', 'admin') . ": $renames");
notify(get_string('renameerrors', 'admin') . ": $renameerrors");
}
echo '<hr />';
}
/// Print the form
print_heading_with_help($struploadusers, 'uploadusers');
print_heading_with_help($struploadusers, 'uploadusers');
$noyesoptions = array( get_string('no'), get_string('yes') );
$noyesoptions = array( get_string('no'), get_string('yes') );
$maxuploadsize = get_max_upload_file_size();
echo '<center>';
echo '<form method="post" enctype="multipart/form-data" action="uploaduser.php">'.
$strchoose.':<input type="hidden" name="MAX_FILE_SIZE" value="'.$maxuploadsize.'">'.
'<input type="hidden" name="sesskey" value="'.$USER->sesskey.'">'.
'<input type="file" name="userfile" size="30">'.
'<input type="submit" value="'.$struploadusers.'">';
print_heading(get_string('settings'));
echo '<table>';
echo '<tr><td>' . get_string('passwordhandling', 'auth') . "</td><td>";
$passwordopts = array( infile => get_string('infilefield', 'auth'),
create => get_string('createpassword', 'auth'),
);
choose_from_menu($passwordopts, 'frmpassword', 'infile');
echo "</td></tr>";
$maxuploadsize = get_max_upload_file_size();
echo '<center>';
echo '<form method="post" enctype="multipart/form-data" action="uploaduser.php">'.
$strfile.'&nbsp;<input type="hidden" name="MAX_FILE_SIZE" value="'.$maxuploadsize.'">'.
'<input type="hidden" name="sesskey" value="'.$USER->sesskey.'">'.
'<input type="file" name="userfile" size="30">';
print_heading(get_string('settings'));
echo '<table>';
echo '<tr><td>' . get_string('passwordhandling', 'auth') . '</td><td>';
$passwordopts = array( 0 => get_string('infilefield', 'auth'),
1 => get_string('createpasswordifneeded', 'auth'),
);
choose_from_menu($passwordopts, 'createpassword', $createpassword);
echo '</td></tr>';
echo '<tr><td>' . get_string('updateaccounts', 'admin') . "</td><td>";
choose_from_menu($noyesoptions, 'updateaccounts', 0);
echo "</td></tr>";
echo '<tr><td>' . get_string('updateaccounts', 'admin') . '</td><td>';
choose_from_menu($noyesoptions, 'updateaccounts', $updateaccounts);
echo '</td></tr>';
echo '<tr><td>' . get_string('allowrenames', 'admin') . "</td><td>";
choose_from_menu($noyesoptions, 'allowrenames', 0);
echo "</td></tr>";
echo '<tr><td>' . get_string('allowrenames', 'admin') . '</td><td>';
choose_from_menu($noyesoptions, 'allowrenames', $allowrenames);
echo '</td></tr>';
echo '</table><br />';
echo '<input type="submit" value="'.$struploadusers.'">';
echo '</form><br />';
echo '</center>';
echo '</table>';
echo '</form></br>';
echo '</center>';
print_footer($course);
admin_externalpage_print_footer($adminroot);
function my_file_get_contents($filename, $use_include_path = 0) {
/// Returns the file as one big long string
/// Returns the file as one big long string
$data = "";
$file = @fopen($filename, "rb", $use_include_path);
@@ -407,4 +423,3 @@ function my_file_get_contents($filename, $use_include_path = 0) {
}
?>
+171 -133
View File
@@ -1,75 +1,73 @@
<?php // $Id$
require_once("../config.php");
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
$newuser = optional_param('newuser', "");
$delete = optional_param('delete', "");
$confirm = optional_param('confirm', "");
$confirmuser = optional_param('confirmuser', "");
$sort = optional_param('sort', "name", PARAM_ALPHA);
$dir = optional_param('dir', "ASC");
$page = optional_param('page', 0);
$search = optional_param('search', "");
if (!empty($search)) {
$search=trim($search);
$newuser = optional_param('newuser', 0, PARAM_BOOL);
$delete = optional_param('delete', 0, PARAM_INT);
$confirm = optional_param('confirm', '', PARAM_ALPHANUM); //md5 confirmation hash
$confirmuser = optional_param('confirmuser', 0, PARAM_INT);
$sort = optional_param('sort', 'name', PARAM_ALPHA);
$dir = optional_param('dir', 'ASC', PARAM_ALPHA);
$page = optional_param('page', 0, PARAM_INT);
$perpage = optional_param('perpage', 30, PARAM_INT); // how many per page
$search = trim(optional_param('search', '', PARAM_RAW));
$lastinitial = optional_param('lastinitial', '', PARAM_CLEAN); // only show students with this last initial
$firstinitial = optional_param('firstinitial', '', PARAM_CLEAN); // only show students with this first initial
if (!$sitecontext = get_context_instance(CONTEXT_SYSTEM, SITEID)) { // Should never happen
redirect('index.php');
}
$lastinitial = optional_param('lastinitial', ""); // only show students with this last initial
$firstinitial = optional_param('firstinitial', ""); // only show students with this first initial
$perpage = optional_param('perpage', 30, PARAM_INT); // how many per page
unset($user);
unset($admin);
unset($teacher);
if (empty($CFG->rolesactive)) { // No admin user yet.
$search = trim($search);
if (! record_exists("user_admins")) { // No admin user yet
$user->firstname = get_string("admin");
$user->lastname = get_string("user");
$user->username = "admin";
$user->password = md5("admin");
$user->email = "root@localhost";
$user->confirmed = 1;
$user->lang = $CFG->lang;
$user->maildisplay = 1;
$user = new object();
$user->firstname = get_string('admin');
$user->lastname = get_string('user');
$user->username = 'admin';
$user->password = hash_internal_user_password('admin');
$user->email = 'root@localhost';
$user->confirmed = 1;
$user->lang = $CFG->lang;
$user->maildisplay = 1;
$user->timemodified = time();
if (! $user->id = insert_record("user", $user)) {
if (! $user->id = insert_record('user', $user)) {
error("SERIOUS ERROR: Could not create admin user record !!!");
}
$admin->userid = $user->id;
if (! insert_record("user_admins", $admin)) {
error("Could not make user $user->id an admin !!!");
}
if (! $user = get_record("user", "id", $user->id)) { // Double check
if (! $user = get_record('user', 'id', $user->id)) { // Double check.
error("User ID was incorrect (can't find it)");
}
// Assign the default admin role to the new user.
if (!$adminroles = get_roles_with_capability('moodle/legacy:admin', CAP_ALLOW)) {
error('No admin role could be found');
}
foreach ($adminroles as $adminrole) {
role_assign($adminrole->id, $user->id, 0, $sitecontext->id);
}
set_config('rolesactive', 1);
if (! $site = get_site()) {
error("Could not find site-level course");
}
$teacher->userid = $user->id;
$teacher->course = $site->id;
$teacher->authority = 1;
if (! insert_record("user_teachers", $teacher)) {
error("Could not make user $id a teacher of site-level course !!!");
}
// Log the user in.
$USER = $user;
$USER->loggedin = true;
$USER->sessionIP = md5(getremoteaddr()); // Store the current IP in the session
$USER->site = $CFG->wwwroot;
$USER->admin = true;
$USER->teacher["$site->id"] = true;
$USER->newadminuser = true;
sesskey(); // for added security, used to check script parameters
redirect("$CFG->wwwroot/user/edit.php?id=$user->id&amp;course=$site->id");
sesskey(); // For added security, used to check script parameters
load_all_capabilities();
redirect("$CFG->wwwroot/user/edit.php?id=$user->id&amp;course=$site->id"); // Edit thyself
exit;
} else {
@@ -80,69 +78,83 @@
require_login();
if (!isadmin()) {
error("You must be an administrator to edit users this way.");
$adminroot = admin_get_root();
if ($newuser) {
admin_externalpage_setup('addnewuser', $adminroot);
} else {
admin_externalpage_setup('editusers', $adminroot);
}
if ($newuser and confirm_sesskey()) { // Create a new user
$user->auth = "manual";
$user->firstname = "";
$user->lastname = "";
$user->username = "changeme";
$user->password = "";
$user->email = "";
$user->lang = $CFG->lang;
$user->confirmed = 1;
$user->timemodified = time();
if (empty($CFG->loginhttps)) {
$securewwwroot = $CFG->wwwroot;
} else {
$securewwwroot = str_replace('http:','https:',$CFG->wwwroot);
}
if (! $user->id = insert_record("user", $user)) {
if (!$user = get_record("user", "username", "changeme")) { // half finished user from another time
error("Could not start a new user!");
if ($newuser) { // Create a new user
if (!has_capability('moodle/user:create', $sitecontext)) {
error('You do not have the required permission to create new users.');
}
if (!$user = get_record('user', 'username', 'changeme')) { // half finished user from another time
$user = new object();
$user->auth = 'manual';
$user->firstname = '';
$user->lastname = '';
$user->username = 'changeme';
$user->password = '';
$user->email = '';
$user->lang = $CFG->lang;
$user->confirmed = 1;
$user->timemodified = time();
if (! $user->id = insert_record('user', $user)) {
error('Could not start a new user!');
}
}
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
$stredituser = get_string("edituser");
$stradministration = get_string("administration");
$strusers = get_string("users");
$stredit = get_string("edit");
$strdelete = get_string("delete");
$strdeletecheck = get_string("deletecheck");
$strsearch = get_string("search");
$strshowallusers = get_string("showallusers");
if ($firstinitial or $lastinitial or $search or $page) {
print_header("$site->shortname: $stredituser", $site->fullname,
"<a href=\"index.php\">$stradministration</a> -> ".
"<a href=\"users.php\">$strusers</a> -> ".
"<a href=\"user.php\">$stredituser</a>");
} else {
print_header("$site->shortname: $stredituser", $site->fullname,
"<a href=\"index.php\">$stradministration</a> -> ".
"<a href=\"users.php\">$strusers</a> -> $stredituser");
if (!has_capability('moodle/user:update', $sitecontext) and !has_capability('moodle/user:delete', $sitecontext)) {
error('You do not have the required permission to edit/delete users.');
}
$stredit = get_string('edit');
$strdelete = get_string('delete');
$strdeletecheck = get_string('deletecheck');
$strsearch = get_string('search');
$strshowallusers = get_string('showallusers');
admin_externalpage_print_header($adminroot);
if ($confirmuser and confirm_sesskey()) {
if (!$user = get_record("user", "id", "$confirmuser")) {
if (!$user = get_record('user', 'id', $confirmuser)) {
error("No such user!");
}
unset($confirmeduser);
$confirmeduser = new object();
$confirmeduser->id = $confirmuser;
$confirmeduser->confirmed = 1;
$confirmeduser->timemodified = time();
if (update_record("user", $confirmeduser)) {
notify(get_string("userconfirmed", "", fullname($user, true)) );
if (update_record('user', $confirmeduser)) {
notify(get_string('userconfirmed', '', fullname($user, true)) );
} else {
notify(get_string("usernotconfirmed", "", fullname($user, true)));
notify(get_string('usernotconfirmed', '', fullname($user, true)));
}
} else if ($delete and confirm_sesskey()) { // Delete a selected user, after confirmation
if (!$user = get_record("user", "id", "$delete")) {
if (!has_capability('moodle/user:delete', $sitecontext)) {
error('You do not have the required permission to delete a user.');
}
if (!$user = get_record('user', 'id', $delete)) {
error("No such user!");
}
@@ -153,25 +165,26 @@
if ($confirm != md5($delete)) {
$fullname = fullname($user, true);
notice_yesno(get_string("deletecheckfull", "", "'$fullname'"),
"user.php?delete=$delete&amp;confirm=".md5($delete)."&amp;sesskey=$USER->sesskey", "user.php");
exit;
} else if (!$user->deleted) {
unset($updateuser);
print_heading(get_string('deleteuser', 'admin'));
$optionsyes = array('delete'=>$delete, 'confirm'=>md5($delete), 'sesskey'=>sesskey());
notice_yesno(get_string('deletecheckfull', '', "'$fullname'"), 'user.php', 'user.php', $optionsyes, NULL, 'post', 'get');
admin_externalpage_print_footer($adminroot);
die;
} else if (data_submitted() and !$user->deleted) {
$updateuser = new object();
$updateuser->id = $user->id;
$updateuser->deleted = "1";
$updateuser->username = "$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->deleted = 1;
$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();
if (update_record("user", $updateuser)) {
unenrol_student($user->id); // From all courses
remove_teacher($user->id); // From all courses
remove_admin($user->id);
notify(get_string("deletedactivity", "", fullname($user, true)) );
if (update_record('user', $updateuser)) {
// not sure if this is needed. unenrol_student($user->id); // From all courses
delete_records('role_assignments', 'userid', $user->id); // unassign all roles
// remove all context assigned on this user?
notify(get_string('deletedactivity', '', fullname($user, true)) );
} else {
notify(get_string("deletednot", "", fullname($user, true)));
notify(get_string('deletednot', '', fullname($user, true)));
}
}
}
@@ -199,7 +212,7 @@
$columnicon = " <img src=\"$CFG->pixpath/t/$columnicon.gif\" alt=\"\" />";
}
$$column = "<a href=\"user.php?sort=$column&amp;dir=$columndir&amp;search=$search&amp;firstinitial=$firstinitial&amp;lastinitial=$lastinitial\">".$string[$column]."</a>$columnicon";
$$column = "<a href=\"user.php?sort=$column&amp;dir=$columndir&amp;search=".urlencode(stripslashes($search))."&amp;firstinitial=$firstinitial&amp;lastinitial=$lastinitial\">".$string[$column]."</a>$columnicon";
}
if ($sort == "name") {
@@ -211,14 +224,14 @@
$usersearchcount = get_users(false, $search, true, "", "", $firstinitial, $lastinitial);
if ($search or $firstinitial or $lastinitial) {
print_heading("$usersearchcount / $usercount ".get_string("users"));
print_heading("$usersearchcount / $usercount ".get_string('users'));
$usercount = $usersearchcount;
} else {
print_heading("$usercount ".get_string("users"));
print_heading("$usercount ".get_string('users'));
}
$alphabet = explode(',', get_string('alphabet'));
$strall = get_string("all");
$strall = get_string('all');
/// Bar of first initials
@@ -262,24 +275,24 @@
echo "</center>";
print_paging_bar($usercount, $page, $perpage,
"user.php?sort=$sort&amp;dir=$dir&amp;perpage=$perpage&amp;firstinitial=$firstinitial&amp;lastinitial=$lastinitial&amp;search=$search&amp;");
"user.php?sort=$sort&amp;dir=$dir&amp;perpage=$perpage&amp;firstinitial=$firstinitial&amp;lastinitial=$lastinitial&amp;search=".urlencode(stripslashes($search))."&amp;");
flush();
if (!$users) {
$match = array();
if ($search) {
$match[] = $search;
if ($search !== '') {
$match[] = s($search);
}
if ($firstinitial) {
$match[] = get_string("firstname").": $firstinitial"."___";
$match[] = get_string('firstname').": $firstinitial"."___";
}
if ($lastinitial) {
$match[] = get_string("lastname").": $lastinitial"."___";
$match[] = get_string('lastname').": $lastinitial"."___";
}
$matchstring = implode(", ", $match);
print_heading(get_string("nousersmatching", "", $matchstring));
print_heading(get_string('nousersmatching', '', $matchstring));
$table = NULL;
@@ -307,54 +320,79 @@
$table->align = array ("left", "left", "left", "left", "left", "center", "center", "center");
$table->width = "95%";
foreach ($users as $user) {
if ($user->id == $USER->id or $user->username == "changeme") {
if ($user->username == 'changeme' or $user->username == 'guest') {
continue; // do not dispaly dummy new user and guest here
}
if ($user->id == $USER->id) {
$deletebutton = "";
} else {
$deletebutton = "<a href=\"user.php?delete=$user->id&amp;sesskey=$USER->sesskey\">$strdelete</a>";
if (has_capability('moodle/user:delete', $sitecontext)) {
$deletebutton = "<a href=\"user.php?delete=$user->id&amp;sesskey=$USER->sesskey\">$strdelete</a>";
} else {
$deletebutton ="";
}
}
if (has_capability('moodle/user:update', $sitecontext)) {
$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 {
$confirmbutton = "";
}
} else {
$editbutton ="";
if ($user->confirmed == 0) {
$confirmbutton = "<span class=\"dimmed_text\">".get_string('confirm')."</span>";
} else {
$confirmbutton = "";
}
}
if ($user->lastaccess) {
$strlastaccess = format_time(time() - $user->lastaccess);
} else {
$strlastaccess = get_string("never");
}
if ($user->confirmed == 0) {
$confirmbutton = "<a href=\"user.php?confirmuser=$user->id&amp;sesskey=$USER->sesskey\">" . get_string("confirm") . "</a>";
} else {
$confirmbutton = "";
$strlastaccess = get_string('never');
}
$fullname = fullname($user, true);
$table->data[] = array ("<a href=\"../user/view.php?id=$user->id&amp;course=$site->id\">$fullname</a>",
"$user->email",
"$user->city",
"$user->country",
$strlastaccess,
"<a href=\"../user/edit.php?id=$user->id&amp;course=$site->id\">$stredit</a>",
$deletebutton,
$confirmbutton);
"$user->email",
"$user->city",
"$user->country",
$strlastaccess,
$editbutton,
$deletebutton,
$confirmbutton);
}
}
echo "<table class=\"searchbox\" align=\"center\" cellpadding=\"10\"><tr><td>";
echo "<form action=\"user.php\" method=\"get\">";
echo "<input type=\"text\" name=\"search\" value=\"$search\" size=\"20\" />";
echo "<input type=\"text\" name=\"search\" value=\"".s($search, true)."\" size=\"20\" />";
echo "<input type=\"submit\" value=\"$strsearch\" />";
if ($search) {
echo "<input type=\"button\" onclick=\"document.location='user.php';\" value=\"$strshowallusers\" />";
}
echo "</form>";
echo "</td></tr></table>";
print_heading("<a href=\"user.php?newuser=true&amp;sesskey=$USER->sesskey\">".get_string("addnewuser")."</a>");
if (has_capability('moodle/user:create', $sitecontext)) {
print_heading("<a href=\"user.php?newuser=true&amp;sesskey=$USER->sesskey\">".get_string('addnewuser')."</a>");
}
if (!empty($table)) {
print_table($table);
print_paging_bar($usercount, $page, $perpage,
"user.php?sort=$sort&amp;dir=$dir&amp;perpage=$perpage".
"&amp;firstinitial=$firstinitial&amp;lastinitial=$lastinitial&amp;search=$search&amp;");
print_heading("<a href=\"user.php?newuser=true&amp;sesskey=$USER->sesskey\">".get_string("addnewuser")."</a>");
"&amp;firstinitial=$firstinitial&amp;lastinitial=$lastinitial&amp;search=".urlencode(stripslashes($search))."&amp;");
if (has_capability('moodle/user:create', $sitecontext)) {
print_heading("<a href=\"user.php?newuser=true&amp;sesskey=$USER->sesskey\">".get_string("addnewuser")."</a>");
}
}
print_footer();
admin_externalpage_print_footer($adminroot);
}
?>
-52
View File
@@ -1,52 +0,0 @@
<?php // $Id$
require_once("../config.php");
require_login();
if (!isadmin()) {
error("Only admins can access this page");
}
if (!$site = get_site()) {
redirect("index.php");
}
$stradministration = get_string("administration");
$strusers = get_string("users");
print_header("$site->shortname: $stradministration: $strusers", "$site->fullname",
"<a href=\"index.php\">$stradministration</a> -> $strusers");
print_heading($strusers);
$table->align = array ("right", "left");
$table->data[] = array("<b><a href=\"auth.php?sesskey=$USER->sesskey\">".get_string("authentication")."</a></b>",
get_string("adminhelpauthentication"));
$table->data[] = array("<b><a href=\"user.php\">".get_string("edituser")."</a></b>",
get_string("adminhelpedituser"));
$table->data[] = array("<b><a href=\"$CFG->wwwroot/$CFG->admin/user.php?newuser=true&amp;sesskey=$USER->sesskey\">".get_string("addnewuser")."</a></b>",
get_string("adminhelpaddnewuser"));
$table->data[] = array("<b><a href=\"$CFG->wwwroot/$CFG->admin/uploaduser.php?sesskey=$USER->sesskey\">".get_string("uploadusers")."</a></b>",
get_string("adminhelpuploadusers"));
$table->data[] = array('', '<hr />');
$table->data[] = array("<b><a href=\"enrol.php?sesskey=$USER->sesskey\">".get_string("enrolments")."</a></b>",
get_string("adminhelpenrolments"));
$table->data[] = array("<b><a href=\"../course/index.php?edit=off&amp;sesskey=$USER->sesskey\">".get_string("assignstudents")."</a></b>",
get_string("adminhelpassignstudents"));
$table->data[] = array("<b><a href=\"../course/index.php?edit=on&amp;sesskey=$USER->sesskey\">".get_string("assignteachers")."</a></b>",
get_string("adminhelpassignteachers")." <img src=\"../pix/t/user.gif\" height=\"11\" width=\"11\" alt=\"\" />");
$table->data[] = array("<b><a href=\"creators.php?sesskey=$USER->sesskey\">".get_string("assigncreators")."</a></b>",
get_string("adminhelpassigncreators"));
$table->data[] = array("<b><a href=\"admin.php?sesskey=$USER->sesskey\">".get_string("assignadmins")."</a></b>",
get_string("adminhelpassignadmins"));
print_table($table);
print_footer($site);
?>
+70
View File
@@ -0,0 +1,70 @@
<?php
if (!isset($form->dbhost)) {
$form->dbhost = '';
}
if (!isset($form->dbname)) {
$form->dbname = '';
}
if (!isset($form->dbuser)) {
$form->dbuser = '';
}
if (!isset($form->dbpass)) {
$form->dbpass = '';
}
if (!isset($form->dbcluster)) {
$form->dbcluster = '';
}
if (!isset($form->pathtopgdump)) {
$form->pathtopgdump = '';
}
if (!isset($form->pathtopsql)) {
$form->pathtopsql = '';
}
?>
<form name="migratefrom" action="utfdbmigrate.php" method="POST">
<input name="migrate" type="hidden" value="1" />
<input name="sesskey" type="hidden" value="<?php echo sesskey() ?>" />
<?php if (isset($err["dbconnect"])) formerr($err["dbconnect"]); ?>
<?php if (isset($err["pathtopgdump"])) formerr($err["pathtopgdump"]); ?>
<?php if (isset($err["pathtopsql"])) formerr($err["pathtopsql"]); ?>
<table cellpadding="9" cellspacing="0" width="500">
<tr valign="top">
<td align="right"><?php print_string("dbhost", "install") ?>:</td>
<td><input type="text" name="dbhost" value="<?php p($form->dbhost) ?>" />
</td>
</tr>
<tr valign="top">
<td align="right"><?php print_string("database", "install") ?>:</td>
<td><input type="text" name="dbname" value="<?php p($form->dbname) ?>" />
</td>
</tr>
<tr valign="top">
<td align="right"><?php print_string("user") ?>:</td>
<td><input type="text" name="dbuser" value="<?php p($form->dbuser) ?>" />
</td>
</tr>
<tr valign="top">
<td align="right"><?php print_string("password") ?>:</td>
<td><input type="text" name="dbpass" value="<?php p($form->dbpass) ?>" />
</td>
</tr>
<tr valign="top">
<td align="right"><?php print_string("pgcluster", "admin") ?>:</td>
<td><input type="text" name="dbcluster" value="<?php p($form->dbcluster) ?>" />
<td><?php print_string("pgclusterdescription", "admin") ?></td>
</tr>
<tr valign="top">
<td align="right" nowrap="nowrap"><?php print_string("pathtopgdump","admin") ?>:</td>
<td><input type="text" name="pathtopgdump" value="<?php p($form->pathtopgdump) ?>" />
<td><?php print_string("pathtopgdumpdesc","admin"); ?></td>
</tr>
<tr valign="top">
<td align="right" nowrap="nowrap"><?php print_string("pathtopsql","admin") ?>:</td>
<td><input type="text" name="pathtopsql" value="<?php p($form->pathtopsql) ?>" />
<td><?php print_string("pathtopsqldesc","admin"); ?></td>
</tr>
</table>
<center>
<input type="submit" value="<?php print_string('continue') ?>"/>
&nbsp;<input type="button" value="<?php print_string('cancel') ?>" onclick="javascript:history.go(-1)" />
</center>
+1238 -435
View File
File diff suppressed because it is too large Load Diff
+78
View File
@@ -0,0 +1,78 @@
XMLDB - Base classes and edition interface.
Complete Documentation:
http://docs.moodle.org/en/XMLDB_Defining_one_XML_structure
Ciao, Eloy Lafuente (stronk7)
========== ========== ========== ========== ==========
========== ========== HISTORY ========== ==========
========== ========== ========== ========== ==========
2006-08-07 - Editor working on production
The editor has been used succesfully to build
a bunch of install.xml files and everything
seems to be working properly.
========== ========== ========== ========== ==========
2006-07-11 - PHP4 compatible release
Now everything seems to be working under PHP 4. What
a horrible OOP implementation!
Note that write permissions to */db dirs are required.
Now working in the 3 missing forms, to manually edit
fields, keys and indexes.
Ciao, Eloy Lafuente (stronk7)
========== ========== ========== ========== ==========
2006-07-11 - Important notes
I've just discovered this some seconds ago, in order
to test properly the XMLDB classes and editor:
1.- PHP 5 required for now. Will change this soon.
2.- Perms to "apache" user needed in */db
dirs in order to allow the XMDBD interface
to write files.
Ciao, Eloy Lafuente (stronk7)
========== ========== ========== ========== ==========
2006-07-11 - Initial commit
This directory contains the XMLDB classes to be used
under Moodle > 1.7 to store all the DB info in a
neutral form (classes dir). Also it contains one simple
interface to edit all those structures.
To install and test it, simply copy the whole xmldb directory
under your moodle/admin dir and point your browser (as admin)
to http://your.server/moodle/admin/xmldb
The edition interface isn't completed yet (it laks 3 more forms
to edit fields, keys and indexes) and there isn't any lang file
(although I hope everything is really clear).
The edition interface includes one reverse-engineering tool that
provides an easy way to retroffit and to generate any table from
MySQL to the new XMLDB format.
Once the XMLDB format was approved, we'll be able to build all the
"generators" needed in order to use it to create Moodle DB structures
for each RDBMS flavour.
Once the interface was finished (2-3 days from now) related documentation
will be sent to http://docs.moodle.org/en/XML_database_schema in order
to comment/modify/approve the final XML format.
All the code is, obviously GPL, with its copyrights and so on...
Ciao, Eloy Lafuente (stronk7) :-)
+191
View File
@@ -0,0 +1,191 @@
<?php // $Id$
///////////////////////////////////////////////////////////////////////////
// //
// NOTICE OF COPYRIGHT //
// //
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
// http://moodle.com //
// //
// Copyright (C) 2001-3001 Martin Dougiamas http://dougiamas.com //
// (C) 2001-3001 Eloy Lafuente (stronk7) http://contiento.com //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details: //
// //
// http://www.gnu.org/copyleft/gpl.html //
// //
///////////////////////////////////////////////////////////////////////////
/// This is the main action class. It implements all the basic
/// functionalities to be shared by each action.
class XMLDBAction {
var $does_generate; //Type of value returned by the invoke method
//ACTION_GENERATE_HTML have contents to show
//set by each specialized invoke
var $title; //Title of the Action (class name, by default)
//set by parent init automatically
var $str; //Strings used by the action
//set by each specialized init, calling loadStrings
var $output; //Output of the action
//set by each specialized invoke, get with getOutput
var $errormsg; //Last Error produced. Check when any invoke returns false
//get with getError
var $postaction; //Action to execute at the end of the invoke script
/**
* Constructor
*/
function XMLDBAction() {
$this->init();
}
/**
* Constructor to keep PHP5 happy
*/
function __construct() {
$this->XMLDBAction();
}
/**
* Init method, every subclass will have its own,
* always calling the parent one
*/
function init() {
$this->does_generate = ACTION_NONE;
$this->title = strtolower(get_class($this));
$this->str = array();
$this->output = NULL;
$this->errormsg = NULL;
$this->subaction = NULL;
}
/**
* returns the type of output of the file
*/
function getDoesGenerate() {
return $this->does_generate;
}
/**
* getError method, returns the last error string.
* Used if the invoke() methods returns false
*/
function getError() {
return $this->errormsg;
}
/**
* getOutput method, returns the output generated by the action.
* Used after execution of the invoke() methods if they return true
*/
function getOutput() {
return $this->output;
}
/**
* getPostAtion method, returns the action to launch after executing
* another one
*/
function getPostAction() {
return $this->postaction;
}
/**
* getTitle method returns the title of the action (that is part
* of the $str array attribute
*/
function getTitle() {
return $this->str['title'];
}
/**
* loadStrings method, loads the required strings specified in the
* array parameter
*/
function loadStrings($strings) {
/// Load some commonly used strings
$this->str['title'] = get_string($this->title, 'xmldb');
/// Now process the $strings array loading it in the $str atribute
if ($strings) {
foreach ($strings as $key => $module) {
$this->str[$key] = get_string($key, $module);
}
}
}
/**
* main invoke method, it simply sets the postaction attribute
* if possible
*/
function invoke() {
global $SESSION;
/// If we are used any dir, save it in the lastused session object
/// Some actions can use it to perform positioning
if ($lastused = optional_param ('dir', NULL, PARAM_PATH)) {
$SESSION->lastused = stripslashes_safe($lastused);
}
$this->postaction = optional_param ('postaction', NULL, PARAM_ALPHAEXT);
/// Avoid being recursive
if ($this->title == $this->postaction) {
$this->postaction = NULL;
}
}
/**
* launch method, used to easily call invoke methods between actions
*/
function launch($action) {
global $CFG;
/// Get the action path and invoke it
$actionsroot = "$CFG->dirroot/$CFG->admin/xmldb/actions";
$actionclass = $action . '.class.php';
$actionpath = "$actionsroot/$action/$actionclass";
/// Load and invoke the proper action
$result = false;
if (file_exists($actionpath) && is_readable($actionpath)) {
require_once($actionpath);
if ($xmldb_action = new $action) {
$result = $xmldb_action->invoke();
if ($result) {
if ($xmldb_action->does_generate != ACTION_NONE &&
$xmldb_action->getOutput()) {
$this->does_generate = $xmldb_action->does_generate;
$this->title = $xmldb_action->title;
$this->str = $xmldb_action->str;
$this->output .= $xmldb_action->getOutput();
}
} else {
$this->errormsg = $xmldb_action->getError();
}
} else {
$this->errormsg = "Error: cannot instantiate class (actions/$action/$actionclass)";
}
} else {
$this->errormsg = "Error: wrong action specified ($action)";
}
return $result;
}
}
?>
@@ -0,0 +1,108 @@
<?php // $Id$
///////////////////////////////////////////////////////////////////////////
// //
// NOTICE OF COPYRIGHT //
// //
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
// http://moodle.com //
// //
// Copyright (C) 2001-3001 Martin Dougiamas http://dougiamas.com //
// (C) 2001-3001 Eloy Lafuente (stronk7) http://contiento.com //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details: //
// //
// http://www.gnu.org/copyleft/gpl.html //
// //
///////////////////////////////////////////////////////////////////////////
/// This class will
class create_xml_file extends XMLDBAction {
/**
* Init method, every subclass will have its own
*/
function init() {
parent::init();
/// Set own core attributes
$this->can_subaction = ACTION_NONE;
//$this->can_subaction = ACTION_HAVE_SUBACTIONS;
/// Set own custom attributes
/// Get needed strings
$this->loadStrings(array(
/// 'key' => 'module',
));
}
/**
* Invoke method, every class will have its own
* returns true/false on completion, setting both
* errormsg and output as necessary
*/
function invoke() {
parent::invoke();
$result = true;
/// Set own core attributes
$this->does_generate = ACTION_NONE;
//$this->does_generate = ACTION_GENERATE_HTML;
/// These are always here
global $CFG, $XMLDB;
/// Do the job, setting result as needed
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
$dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
$file = $dirpath . '/install.xml';
/// Some variables
$xmlpath = dirname(str_replace($CFG->dirroot . '/', '', $file));
$xmlversion = userdate(time(), '%Y%m%d', 99, false);
$xmlcomment = 'XMLDB file for Moodle ' . dirname($xmlpath);
$xmltable = strtolower(basename(dirname($xmlpath)));
/// Initial contents
$c = '<?xml version="1.0" encoding="UTF-8" ?>' . "\n";
$c.= ' <XMLDB PATH="' . $xmlpath . '" VERSION="' . $xmlversion .'" COMMENT="' . $xmlcomment .'">' . "\n";
$c.= ' <TABLES>' . "\n";
$c.= ' <TABLE NAME="' . $xmltable . '" COMMENT="Default comment for ' . $xmltable .', please edit me">' . "\n";
$c.= ' <FIELDS>' . "\n";
$c.= ' <FIELD NAME="id" TYPE="int" LENGTH="10" UNSIGNED="true" NOTNULL="true" SEQUENCE="true" COMMENT="id of the table, please edit me" />' . "\n";
$c.= ' </FIELDS>' . "\n";
$c.= ' <KEYS>' . "\n";
$c.= ' <KEY NAME="primary" COMMENT="Primary key for ' . $xmltable . '" TYPE="primary" FIELDS="id" />' . "\n";
$c.= ' </KEYS>' . "\n";
$c.= ' </TABLE>' . "\n";
$c.= ' </TABLES>' . "\n";
$c.= ' </XMLDB>';
if (!file_put_contents($file, $c)) {
$errormsg = 'Error creando fichero ' . $file;
$result = false;
}
/// Launch postaction if exists
if ($this->getPostAction() && $result) {
return $this->launch($this->getPostAction());
}
/// Return ok if arrived here
return $result;
}
}
?>
@@ -0,0 +1,140 @@
<?php // $Id$
///////////////////////////////////////////////////////////////////////////
// //
// NOTICE OF COPYRIGHT //
// //
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
// http://moodle.com //
// //
// Copyright (C) 2001-3001 Martin Dougiamas http://dougiamas.com //
// (C) 2001-3001 Eloy Lafuente (stronk7) http://contiento.com //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details: //
// //
// http://www.gnu.org/copyleft/gpl.html //
// //
///////////////////////////////////////////////////////////////////////////
/// This class will delete completely one field
class delete_field extends XMLDBAction {
/**
* Init method, every subclass will have its own
*/
function init() {
parent::init();
/// Set own custom attributes
/// Get needed strings
$this->loadStrings(array(
'confirmdeletefield' => 'xmldb',
'yes' => '',
'no' => ''
));
}
/**
* Invoke method, every class will have its own
* returns true/false on completion, setting both
* errormsg and output as necessary
*/
function invoke() {
parent::invoke();
$result = true;
/// Set own core attributes
$this->does_generate = ACTION_GENERATE_HTML;
/// These are always here
global $CFG, $XMLDB;
/// Do the job, setting result as needed
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
$dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
$tableparam = required_param('table', PARAM_CLEAN);
$fieldparam = required_param('field', PARAM_CLEAN);
$confirmed = optional_param('confirmed', false, PARAM_BOOL);
/// If not confirmed, show confirmation box
if (!$confirmed) {
$o = '<table align="center" width="60" class="generalbox" border="0" cellpadding="5" cellspacing="0" id="notice">';
$o.= ' <tr><td class="generalboxcontent">';
$o.= ' <p align="center">' . $this->str['confirmdeletefield'] . '<br /><br />' . $fieldparam . '</p>';
$o.= ' <table align="center" cellpadding="20"><tr><td>';
$o.= ' <div class="singlebutton">';
$o.= ' <form action="index.php?action=delete_field&amp;confirmed=yes&amp;postaction=edit_table&amp;field=' . $fieldparam . '&amp;table=' . $tableparam . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '" method="post">';
$o.= ' <input type="submit" value="'. $this->str['yes'] .'" /></form></div>';
$o.= ' </td><td>';
$o.= ' <div class="singlebutton">';
$o.= ' <form action="index.php?action=edit_table&amp;table=' . $tableparam . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '" method="post">';
$o.= ' <input type="submit" value="'. $this->str['no'] .'" /></form></div>';
$o.= ' </td></tr>';
$o.= ' </table>';
$o.= ' </td></tr>';
$o.= '</table>';
$this->output = $o;
} else {
/// Get the edited dir
if (!empty($XMLDB->editeddirs)) {
if (isset($XMLDB->editeddirs[$dirpath])) {
$dbdir =& $XMLDB->dbdirs[$dirpath];
$editeddir =& $XMLDB->editeddirs[$dirpath];
if ($editeddir) {
$structure =& $editeddir->xml_file->getStructure();
/// Move adjacent fields prev and next attributes
$tables =& $structure->getTables();
$table =& $structure->getTable($tableparam);
$fields =& $table->getFields();
$field =& $table->getField($fieldparam);
if ($field->getPrevious()) {
$prev =& $table->getField($field->getPrevious());
$prev->setNext($field->getNext());
}
if ($field->getNext()) {
$next =& $table->getField($field->getNext());
$next->setPrevious($field->getPrevious());
}
/// Remove the field
$table->deleteField($fieldparam);
/// Recalculate the hash
$structure->calculateHash(true);
/// If the hash has changed from the original one, change the version
/// and mark the structure as changed
$origstructure =& $dbdir->xml_file->getStructure();
if ($structure->getHash() != $origstructure->getHash()) {
$structure->setVersion(userdate(time(), '%Y%m%d', 99, false));
$structure->setChanged(true);
}
}
}
}
}
/// Launch postaction if exists (leave this here!)
if ($this->getPostAction() && $result) {
return $this->launch($this->getPostAction());
}
/// Return ok if arrived here
return $result;
}
}
?>
@@ -0,0 +1,140 @@
<?php // $Id$
///////////////////////////////////////////////////////////////////////////
// //
// NOTICE OF COPYRIGHT //
// //
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
// http://moodle.com //
// //
// Copyright (C) 2001-3001 Martin Dougiamas http://dougiamas.com //
// (C) 2001-3001 Eloy Lafuente (stronk7) http://contiento.com //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details: //
// //
// http://www.gnu.org/copyleft/gpl.html //
// //
///////////////////////////////////////////////////////////////////////////
/// This class will delete completely one index
class delete_index extends XMLDBAction {
/**
* Init method, every subclass will have its own
*/
function init() {
parent::init();
/// Set own custom attributes
/// Get needed strings
$this->loadStrings(array(
'confirmdeleteindex' => 'xmldb',
'yes' => '',
'no' => ''
));
}
/**
* Invoke method, every class will have its own
* returns true/false on completion, setting both
* errormsg and output as necessary
*/
function invoke() {
parent::invoke();
$result = true;
/// Set own core attributes
$this->does_generate = ACTION_GENERATE_HTML;
/// These are always here
global $CFG, $XMLDB;
/// Do the job, setting result as needed
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
$dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
$tableparam = required_param('table', PARAM_PATH);
$indexparam = required_param('index', PARAM_PATH);
$confirmed = optional_param('confirmed', false, PARAM_BOOL);
/// If not confirmed, show confirmation box
if (!$confirmed) {
$o = '<table align="center" width="60" class="generalbox" border="0" cellpadding="5" cellspacing="0" id="notice">';
$o.= ' <tr><td class="generalboxcontent">';
$o.= ' <p align="center">' . $this->str['confirmdeleteindex'] . '<br /><br />' . $indexparam . '</p>';
$o.= ' <table align="center" cellpadding="20"><tr><td>';
$o.= ' <div class="singlebutton">';
$o.= ' <form action="index.php?action=delete_index&amp;confirmed=yes&amp;postaction=edit_table&amp;index=' . $indexparam . '&amp;table=' . $tableparam . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '" method="post">';
$o.= ' <input type="submit" value="'. $this->str['yes'] .'" /></form></div>';
$o.= ' </td><td>';
$o.= ' <div class="singlebutton">';
$o.= ' <form action="index.php?action=edit_table&amp;table=' . $tableparam . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '" method="post">';
$o.= ' <input type="submit" value="'. $this->str['no'] .'" /></form></div>';
$o.= ' </td></tr>';
$o.= ' </table>';
$o.= ' </td></tr>';
$o.= '</table>';
$this->output = $o;
} else {
/// Get the edited dir
if (!empty($XMLDB->editeddirs)) {
if (isset($XMLDB->editeddirs[$dirpath])) {
$dbdir =& $XMLDB->dbdirs[$dirpath];
$editeddir =& $XMLDB->editeddirs[$dirpath];
if ($editeddir) {
$structure =& $editeddir->xml_file->getStructure();
/// Move adjacent indexes prev and next attributes
$tables =& $structure->getTables();
$table =& $structure->getTable($tableparam);
$indexes =& $table->getIndexes();
$index =& $table->getIndex($indexparam);
if ($index->getPrevious()) {
$prev =& $table->getIndex($index->getPrevious());
$prev->setNext($index->getNext());
}
if ($index->getNext()) {
$next =& $table->getIndex($index->getNext());
$next->setPrevious($index->getPrevious());
}
/// Remove the index
$table->deleteIndex($indexparam);
/// Recalculate the hash
$structure->calculateHash(true);
/// If the hash has changed from the original one, change the version
/// and mark the structure as changed
$origstructure =& $dbdir->xml_file->getStructure();
if ($structure->getHash() != $origstructure->getHash()) {
$structure->setVersion(userdate(time(), '%Y%m%d', 99, false));
$structure->setChanged(true);
}
}
}
}
}
/// Launch postaction if exists (leave this here!)
if ($this->getPostAction() && $result) {
return $this->launch($this->getPostAction());
}
/// Return ok if arrived here
return $result;
}
}
?>
@@ -0,0 +1,140 @@
<?php // $Id$
///////////////////////////////////////////////////////////////////////////
// //
// NOTICE OF COPYRIGHT //
// //
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
// http://moodle.com //
// //
// Copyright (C) 2001-3001 Martin Dougiamas http://dougiamas.com //
// (C) 2001-3001 Eloy Lafuente (stronk7) http://contiento.com //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details: //
// //
// http://www.gnu.org/copyleft/gpl.html //
// //
///////////////////////////////////////////////////////////////////////////
/// This class will delete completely one key
class delete_key extends XMLDBAction {
/**
* Init method, every subclass will have its own
*/
function init() {
parent::init();
/// Set own custom attributes
/// Get needed strings
$this->loadStrings(array(
'confirmdeletekey' => 'xmldb',
'yes' => '',
'no' => ''
));
}
/**
* Invoke method, every class will have its own
* returns true/false on completion, setting both
* errormsg and output as necessary
*/
function invoke() {
parent::invoke();
$result = true;
/// Set own core attributes
$this->does_generate = ACTION_GENERATE_HTML;
/// These are always here
global $CFG, $XMLDB;
/// Do the job, setting result as needed
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
$dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
$tableparam = required_param('table', PARAM_PATH);
$keyparam = required_param('key', PARAM_PATH);
$confirmed = optional_param('confirmed', false, PARAM_BOOL);
/// If not confirmed, show confirmation box
if (!$confirmed) {
$o = '<table align="center" width="60" class="generalbox" border="0" cellpadding="5" cellspacing="0" id="notice">';
$o.= ' <tr><td class="generalboxcontent">';
$o.= ' <p align="center">' . $this->str['confirmdeletekey'] . '<br /><br />' . $keyparam . '</p>';
$o.= ' <table align="center" cellpadding="20"><tr><td>';
$o.= ' <div class="singlebutton">';
$o.= ' <form action="index.php?action=delete_key&amp;confirmed=yes&amp;postaction=edit_table&amp;key=' . $keyparam . '&amp;table=' . $tableparam . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '" method="post">';
$o.= ' <input type="submit" value="'. $this->str['yes'] .'" /></form></div>';
$o.= ' </td><td>';
$o.= ' <div class="singlebutton">';
$o.= ' <form action="index.php?action=edit_table&amp;table=' . $tableparam . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '" method="post">';
$o.= ' <input type="submit" value="'. $this->str['no'] .'" /></form></div>';
$o.= ' </td></tr>';
$o.= ' </table>';
$o.= ' </td></tr>';
$o.= '</table>';
$this->output = $o;
} else {
/// Get the edited dir
if (!empty($XMLDB->editeddirs)) {
if (isset($XMLDB->editeddirs[$dirpath])) {
$dbdir =& $XMLDB->dbdirs[$dirpath];
$editeddir =& $XMLDB->editeddirs[$dirpath];
if ($editeddir) {
$structure =& $editeddir->xml_file->getStructure();
/// Move adjacent keys prev and next attributes
$tables =& $structure->getTables();
$table =& $structure->getTable($tableparam);
$keys =& $table->getKeys();
$key =& $table->getKey($keyparam);
if ($key->getPrevious()) {
$prev =& $table->getKey($key->getPrevious());
$prev->setNext($key->getNext());
}
if ($key->getNext()) {
$next =& $table->getKey($key->getNext());
$next->setPrevious($key->getPrevious());
}
/// Remove the key
$table->deleteKey($keyparam);
/// Recalculate the hash
$structure->calculateHash(true);
/// If the hash has changed from the original one, change the version
/// and mark the structure as changed
$origstructure =& $dbdir->xml_file->getStructure();
if ($structure->getHash() != $origstructure->getHash()) {
$structure->setVersion(userdate(time(), '%Y%m%d', 99, false));
$structure->setChanged(true);
}
}
}
}
}
/// Launch postaction if exists (leave this here!)
if ($this->getPostAction() && $result) {
return $this->launch($this->getPostAction());
}
/// Return ok if arrived here
return $result;
}
}
?>
@@ -0,0 +1,133 @@
<?php // $Id$
///////////////////////////////////////////////////////////////////////////
// //
// NOTICE OF COPYRIGHT //
// //
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
// http://moodle.com //
// //
// Copyright (C) 2001-3001 Martin Dougiamas http://dougiamas.com //
// (C) 2001-3001 Eloy Lafuente (stronk7) http://contiento.com //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details: //
// //
// http://www.gnu.org/copyleft/gpl.html //
// //
///////////////////////////////////////////////////////////////////////////
/// This class will delete completely one sentence
class delete_sentence extends XMLDBAction {
/**
* Init method, every subclass will have its own
*/
function init() {
parent::init();
/// Set own custom attributes
/// Get needed strings
$this->loadStrings(array(
'confirmdeletesentence' => 'xmldb',
'yes' => '',
'no' => ''
));
}
/**
* Invoke method, every class will have its own
* returns true/false on completion, setting both
* errormsg and output as necessary
*/
function invoke() {
parent::invoke();
$result = true;
/// Set own core attributes
$this->does_generate = ACTION_GENERATE_HTML;
/// These are always here
global $CFG, $XMLDB;
/// Do the job, setting result as needed
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
$dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
$statementparam = required_param('statement', PARAM_CLEAN);
$sentenceparam = required_param('sentence', PARAM_INT);
$confirmed = optional_param('confirmed', false, PARAM_BOOL);
/// If not confirmed, show confirmation box
if (!$confirmed) {
$o = '<table align="center" width="60" class="generalbox" border="0" cellpadding="5" cellspacing="0" id="notice">';
$o.= ' <tr><td class="generalboxcontent">';
$o.= ' <p align="center">' . $this->str['confirmdeletesentence'] . '</p>';
$o.= ' <table align="center" cellpadding="20"><tr><td>';
$o.= ' <div class="singlebutton">';
$o.= ' <form action="index.php?action=delete_sentence&amp;confirmed=yes&amp;postaction=edit_statement&amp;sentence=' . $sentenceparam . '&amp;statement=' . urlencode($statementparam) . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '" method="post">';
$o.= ' <input type="submit" value="'. $this->str['yes'] .'" /></form></div>';
$o.= ' </td><td>';
$o.= ' <div class="singlebutton">';
$o.= ' <form action="index.php?action=edit_statement&amp;statement=' . urlencode($statementparam) . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '" method="post">';
$o.= ' <input type="submit" value="'. $this->str['no'] .'" /></form></div>';
$o.= ' </td></tr>';
$o.= ' </table>';
$o.= ' </td></tr>';
$o.= '</table>';
$this->output = $o;
} else {
/// Get the edited dir
if (!empty($XMLDB->editeddirs)) {
if (isset($XMLDB->editeddirs[$dirpath])) {
$dbdir =& $XMLDB->dbdirs[$dirpath];
$editeddir =& $XMLDB->editeddirs[$dirpath];
if ($editeddir) {
$structure =& $editeddir->xml_file->getStructure();
$statements =& $structure->getStatements();
$statement =& $structure->getStatement($statementparam);
$sentences =& $statement->getSentences();
/// Remove the sentence
unset ($sentences[$sentenceparam]);
/// The statement has changed
$statement->setChanged(true);
/// Recalculate the hash
$structure->calculateHash(true);
/// If the hash has changed from the original one, change the version
/// and mark the structure as changed
$origstructure =& $dbdir->xml_file->getStructure();
if ($structure->getHash() != $origstructure->getHash()) {
$structure->setVersion(userdate(time(), '%Y%m%d', 99, false));
$structure->setChanged(true);
}
}
}
}
}
/// Launch postaction if exists (leave this here!)
if ($this->getPostAction() && $result) {
return $this->launch($this->getPostAction());
}
/// Return ok if arrived here
return $result;
}
}
?>
@@ -0,0 +1,115 @@
<?php // $Id$
///////////////////////////////////////////////////////////////////////////
// //
// NOTICE OF COPYRIGHT //
// //
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
// http://moodle.com //
// //
// Copyright (C) 2001-3001 Martin Dougiamas http://dougiamas.com //
// (C) 2001-3001 Eloy Lafuente (stronk7) http://contiento.com //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details: //
// //
// http://www.gnu.org/copyleft/gpl.html //
// //
///////////////////////////////////////////////////////////////////////////
/// This class will delete completely one statement
class delete_statement extends XMLDBAction {
/**
* Init method, every subclass will have its own
*/
function init() {
parent::init();
/// Set own custom attributes
/// Get needed strings
$this->loadStrings(array(
'confirmdeletestatement' => 'xmldb',
'yes' => '',
'no' => ''
));
}
/**
* Invoke method, every class will have its own
* returns true/false on completion, setting both
* errormsg and output as necessary
*/
function invoke() {
parent::invoke();
$result = true;
/// Set own core attributes
$this->does_generate = ACTION_GENERATE_HTML;
/// These are always here
global $CFG, $XMLDB;
/// Do the job, setting result as needed
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
$dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
$statementparam = required_param('statement', PARAM_CLEAN);
$confirmed = optional_param('confirmed', false, PARAM_BOOL);
/// If not confirmed, show confirmation box
if (!$confirmed) {
$o = '<table align="center" width="60" class="generalbox" border="0" cellpadding="5" cellspacing="0" id="notice">';
$o.= ' <tr><td class="generalboxcontent">';
$o.= ' <p align="center">' . $this->str['confirmdeletestatement'] . '<br /><br />' . $statementparam . '</p>';
$o.= ' <table align="center" cellpadding="20"><tr><td>';
$o.= ' <div class="singlebutton">';
$o.= ' <form action="index.php?action=delete_statement&amp;confirmed=yes&amp;postaction=edit_xml_file&amp;statement=' . $statementparam . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '" method="post">';
$o.= ' <input type="submit" value="'. $this->str['yes'] .'" /></form></div>';
$o.= ' </td><td>';
$o.= ' <div class="singlebutton">';
$o.= ' <form action="index.php?action=edit_xml_file&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '" method="post">';
$o.= ' <input type="submit" value="'. $this->str['no'] .'" /></form></div>';
$o.= ' </td></tr>';
$o.= ' </table>';
$o.= ' </td></tr>';
$o.= '</table>';
$this->output = $o;
} else {
/// Get the edited dir
if (!empty($XMLDB->editeddirs)) {
if (isset($XMLDB->editeddirs[$dirpath])) {
$dbdir =& $XMLDB->dbdirs[$dirpath];
$editeddir =& $XMLDB->editeddirs[$dirpath];
if ($editeddir) {
$structure =& $editeddir->xml_file->getStructure();
/// Remove the table
$structure->deleteStatement($statementparam);
}
}
}
}
/// Launch postaction if exists (leave this here!)
if ($this->getPostAction() && $result) {
return $this->launch($this->getPostAction());
}
/// Return ok if arrived here
return $result;
}
}
?>
@@ -0,0 +1,115 @@
<?php // $Id$
///////////////////////////////////////////////////////////////////////////
// //
// NOTICE OF COPYRIGHT //
// //
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
// http://moodle.com //
// //
// Copyright (C) 2001-3001 Martin Dougiamas http://dougiamas.com //
// (C) 2001-3001 Eloy Lafuente (stronk7) http://contiento.com //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details: //
// //
// http://www.gnu.org/copyleft/gpl.html //
// //
///////////////////////////////////////////////////////////////////////////
/// This class will delete completely one table
class delete_table extends XMLDBAction {
/**
* Init method, every subclass will have its own
*/
function init() {
parent::init();
/// Set own custom attributes
/// Get needed strings
$this->loadStrings(array(
'confirmdeletetable' => 'xmldb',
'yes' => '',
'no' => ''
));
}
/**
* Invoke method, every class will have its own
* returns true/false on completion, setting both
* errormsg and output as necessary
*/
function invoke() {
parent::invoke();
$result = true;
/// Set own core attributes
$this->does_generate = ACTION_GENERATE_HTML;
/// These are always here
global $CFG, $XMLDB;
/// Do the job, setting result as needed
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
$dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
$tableparam = required_param('table', PARAM_CLEAN);
$confirmed = optional_param('confirmed', false, PARAM_BOOL);
/// If not confirmed, show confirmation box
if (!$confirmed) {
$o = '<table align="center" width="60" class="generalbox" border="0" cellpadding="5" cellspacing="0" id="notice">';
$o.= ' <tr><td class="generalboxcontent">';
$o.= ' <p align="center">' . $this->str['confirmdeletetable'] . '<br /><br />' . $tableparam . '</p>';
$o.= ' <table align="center" cellpadding="20"><tr><td>';
$o.= ' <div class="singlebutton">';
$o.= ' <form action="index.php?action=delete_table&amp;confirmed=yes&amp;postaction=edit_xml_file&amp;table=' . $tableparam . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '" method="post">';
$o.= ' <input type="submit" value="'. $this->str['yes'] .'" /></form></div>';
$o.= ' </td><td>';
$o.= ' <div class="singlebutton">';
$o.= ' <form action="index.php?action=edit_xml_file&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '" method="post">';
$o.= ' <input type="submit" value="'. $this->str['no'] .'" /></form></div>';
$o.= ' </td></tr>';
$o.= ' </table>';
$o.= ' </td></tr>';
$o.= '</table>';
$this->output = $o;
} else {
/// Get the edited dir
if (!empty($XMLDB->editeddirs)) {
if (isset($XMLDB->editeddirs[$dirpath])) {
$dbdir =& $XMLDB->dbdirs[$dirpath];
$editeddir =& $XMLDB->editeddirs[$dirpath];
if ($editeddir) {
$structure =& $editeddir->xml_file->getStructure();
/// Remove the table
$structure->deleteTable($tableparam);
}
}
}
}
/// Launch postaction if exists (leave this here!)
if ($this->getPostAction() && $result) {
return $this->launch($this->getPostAction());
}
/// Return ok if arrived here
return $result;
}
}
?>
@@ -0,0 +1,111 @@
<?php // $Id$
///////////////////////////////////////////////////////////////////////////
// //
// NOTICE OF COPYRIGHT //
// //
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
// http://moodle.com //
// //
// Copyright (C) 2001-3001 Martin Dougiamas http://dougiamas.com //
// (C) 2001-3001 Eloy Lafuente (stronk7) http://contiento.com //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details: //
// //
// http://www.gnu.org/copyleft/gpl.html //
// //
///////////////////////////////////////////////////////////////////////////
/// This class will delete completely one XML file
class delete_xml_file extends XMLDBAction {
/**
* Init method, every subclass will have its own
*/
function init() {
parent::init();
/// Set own custom attributes
/// Get needed strings
$this->loadStrings(array(
'confirmdeletexmlfile' => 'xmldb',
'yes' => '',
'no' => ''
));
}
/**
* Invoke method, every class will have its own
* returns true/false on completion, setting both
* errormsg and output as necessary
*/
function invoke() {
parent::invoke();
$result = true;
/// Set own core attributes
$this->does_generate = ACTION_GENERATE_HTML;
/// These are always here
global $CFG, $XMLDB;
/// Do the job, setting result as needed
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_CLEAN);
$dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
$confirmed = optional_param('confirmed', false, PARAM_BOOL);
/// If not confirmed, show confirmation box
if (!$confirmed) {
$o = '<table align="center" width="60" class="generalbox" border="0" cellpadding="5" cellspacing="0" id="notice">';
$o.= ' <tr><td class="generalboxcontent">';
$o.= ' <p align="center">' . $this->str['confirmdeletexmlfile'] . '<br /><br />' . $dirpath . '/install.php</p>';
$o.= ' <table align="center" cellpadding="20"><tr><td>';
$o.= ' <div class="singlebutton">';
$o.= ' <form action="index.php?action=delete_xml_file&amp;confirmed=yes&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;postaction=main_view#lastused" method="post">';
$o.= ' <input type="submit" value="'. $this->str['yes'] .'" /></form></div>';
$o.= ' </td><td>';
$o.= ' <div class="singlebutton">';
$o.= ' <form action="index.php?action=main_view#lastused" method="post">';
$o.= ' <input type="submit" value="'. $this->str['no'] .'" /></form></div>';
$o.= ' </td></tr>';
$o.= ' </table>';
$o.= ' </td></tr>';
$o.= '</table>';
$this->output = $o;
} else {
/// Get the original dir and delete the xml file
if (!empty($XMLDB->dbdirs)) {
if (isset($XMLDB->dbdirs[$dirpath])) {
$dbdir =& $XMLDB->dbdirs[$dirpath];
if ($dbdir) {
@unlink($dirpath . '/install.xml');
}
}
}
}
/// Launch postaction if exists (leave this here!)
if ($this->getPostAction() && $result) {
return $this->launch($this->getPostAction());
}
/// Return ok if arrived here
return $result;
}
}
?>
@@ -0,0 +1,204 @@
<?php // $Id$
///////////////////////////////////////////////////////////////////////////
// //
// NOTICE OF COPYRIGHT //
// //
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
// http://moodle.com //
// //
// Copyright (C) 2001-3001 Martin Dougiamas http://dougiamas.com //
// (C) 2001-3001 Eloy Lafuente (stronk7) http://contiento.com //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details: //
// //
// http://www.gnu.org/copyleft/gpl.html //
// //
///////////////////////////////////////////////////////////////////////////
/// This class will provide the interface for all the edit field actions
class edit_field extends XMLDBAction {
/**
* Init method, every subclass will have its own
*/
function init() {
parent::init();
/// Set own custom attributes
/// Get needed strings
$this->loadStrings(array(
'change' => 'xmldb',
'vieworiginal' => 'xmldb',
'viewedited' => 'xmldb',
'yes' => '',
'no' => '',
'back' => 'xmldb'
));
}
/**
* Invoke method, every class will have its own
* returns true/false on completion, setting both
* errormsg and output as necessary
*/
function invoke() {
parent::invoke();
$result = true;
/// Set own core attributes
$this->does_generate = ACTION_GENERATE_HTML;
/// These are always here
global $CFG, $XMLDB;
/// Do the job, setting result as needed
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
$dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
/// Get the correct dirs
if (!empty($XMLDB->dbdirs)) {
$dbdir =& $XMLDB->dbdirs[$dirpath];
} else {
return false;
}
if (!empty($XMLDB->editeddirs)) {
$editeddir =& $XMLDB->editeddirs[$dirpath];
$structure =& $editeddir->xml_file->getStructure();
}
/// ADD YOUR CODE HERE
/// Fetch request data
$tableparam = required_param('table', PARAM_CLEAN);
if (!$table =& $structure->getTable($tableparam)) {
$this->errormsg = 'Wrong table specified: ' . $tableparm;
return false;
}
$fieldparam = required_param('field', PARAM_CLEAN);
if (!$field =& $table->getField($fieldparam)) {
/// Arriving here from a name change, looking for the new field name
$fieldparam = required_param('name', PARAM_CLEAN);
$field =& $table->getField($fieldparam);
}
$dbdir =& $XMLDB->dbdirs[$dirpath];
$origstructure =& $dbdir->xml_file->getStructure();
/// Add the main form
$o = '<form name="form" id="form" action="index.php" method="post">';
$o.= ' <input type="hidden" name ="dir" value="' . str_replace($CFG->dirroot, '', $dirpath) . '" />';
$o.= ' <input type="hidden" name ="table" value="' . $tableparam .'" />';
$o.= ' <input type="hidden" name ="field" value="' . $fieldparam .'" />';
$o.= ' <input type="hidden" name ="action" value="edit_field_save" />';
$o.= ' <input type="hidden" name ="postaction" value="edit_table" />';
$o.= ' <table id="formelements" align="center">';
/// XMLDB field name
/// If the field has dependencies, we cannot change its name
$disabled = '';
if ($structure->getFieldUses($table->getName(), $field->getName())) {
$o.= ' <input type="hidden" name ="name" value="' . s($field->getName()) .'" />';
$o.= ' <tr valign="top"><td>Name:</td><td colspan="2">' . s($field->getName()) . '</td></tr>';
} else {
$o.= ' <tr valign="top"><td><label for="name" accesskey="n">Name:</label></td><td colspan="2"><input name="name" type="text" size="30" maxlength="30" id="name" value="' . s($field->getName()) . '" /></td></tr>';
}
/// XMLDB field comment
$o.= ' <tr valign="top"><td><label for="comment" accesskey="c">Comment:</label></td><td colspan="2"><textarea name="comment" rows="3" cols="80" id="comment">' . s($field->getComment()) . '</textarea></td></tr>';
/// XMLDBField Type
$typeoptions = array (XMLDB_TYPE_INTEGER => $field->getXMLDBTypeName(XMLDB_TYPE_INTEGER),
XMLDB_TYPE_NUMBER => $field->getXMLDBTypeName(XMLDB_TYPE_NUMBER),
XMLDB_TYPE_FLOAT => $field->getXMLDBTypeName(XMLDB_TYPE_FLOAT),
XMLDB_TYPE_DATETIME=> $field->getXMLDBTypeName(XMLDB_TYPE_DATETIME),
XMLDB_TYPE_CHAR => $field->getXMLDBTypeName(XMLDB_TYPE_CHAR),
XMLDB_TYPE_TEXT => $field->getXMLDBTypeName(XMLDB_TYPE_TEXT),
XMLDB_TYPE_BINARY => $field->getXMLDBTypeName(XMLDB_TYPE_BINARY));
/// If current field isnt float, delete such column type to avoid its creation from the interface
/// Note that float fields are supported completely but it's possible than in a next future
/// we delete them completely from Moodle DB, using, exlusively, number(x,y) types
if ($field->getType() != XMLDB_TYPE_FLOAT) {
unset ($typeoptions[XMLDB_TYPE_FLOAT]);
}
/// Also we hide datetimes. Only edition of them is allowed (and retrofit) but not new creation
if ($field->getType() != XMLDB_TYPE_DATETIME) {
unset ($typeoptions[XMLDB_TYPE_DATETIME]);
}
$o.= ' <tr valign="top"><td><label for="menutype" accesskey="t">Type:</label></td>';
$o.= ' <td colspan="2">' . choose_from_menu($typeoptions, 'type', $field->getType(), '', '', '', true) . '</td></tr>';
/// XMLDBField Length
$o.= ' <tr valign="top"><td><label for="length" accesskey="l">Length:</label></td>';
$o.= ' <td colspan="2"><input name="length" type="text" size="6" maxlength="6" id="length" value="' . s($field->getLength()) . '" /><span id="lengthtip"></span></td></tr>';
/// XMLDBField Decimals
$o.= ' <tr valign="top"><td><label for="decimals" accesskey="d">Decimals:</label></td>';
$o.= ' <td colspan="2"><input name="decimals" type="text" size="6" maxlength="6" id="decimals" value="' . s($field->getDecimals()) . '" /><span id="decimalstip"></span></td></tr>';
/// XMLDBField Unsigned
$unsignedoptions = array (0 => 'signed', 1 => 'unsigned');
$o.= ' <tr valign="top"><td><label for="menuunsigned" accesskey="u">Unsigned:</label></td>';
$o.= ' <td colspan="2">' . choose_from_menu($unsignedoptions, 'unsigned', $field->getUnsigned(), '', '', '', true) . '</td></tr>';
/// XMLDBField NotNull
$notnulloptions = array (0 => 'null', 'not null');
$o.= ' <tr valign="top"><td><label for="menunotnull" accesskey="n">Not Null:</label></td>';
$o.= ' <td colspan="2">' . choose_from_menu($notnulloptions, 'notnull', $field->getNotNull(), '', '', '', true) . '</td></tr>';
/// XMLDBField Sequence
$sequenceoptions = array (0 => $this->str['no'], 1 => 'auto-numbered');
$o.= ' <tr valign="top"><td><label for="menusequence" accesskey="s">Sequence:</label></td>';
$o.= ' <td colspan="2">' . choose_from_menu($sequenceoptions, 'sequence', $field->getSequence(), '', '', '', true) . '</td></tr>';
/// XMLDBField Enum and enumvalues
$enumoptions = array (0 => $this->str['no'], 1 => $this->str['yes']);
$o.= ' <tr valign="top"><td><label for="menuenum" accesskey="s">Enum:</label></td>';
$o.= ' <td>' . choose_from_menu($enumoptions, 'enum', $field->getEnum(), '', '', '', true) . '</td>';
if (is_array($field->getEnumValues())) {
$enumvalues = implode(', ', $field->getEnumValues());
} else {
$enumvalues = '';
}
$o.= ' <td><textarea name="enumvalues" rows="3" cols="70" id="enumvalues">' . s($enumvalues) . '</textarea></td></tr>';
/// XMLDBField Default
$o.= ' <tr valign="top"><td><label for="default" accesskey="d">Default:</label></td>';
$o.= ' <td colspan="2"><input type="text" name="default" size="30" maxlength="80" id="default" value="' . s($field->getDefault()) . '" /></td></tr>';
/// Change button
$o.= ' <tr valign="top"><td>&nbsp;</td><td colspan="2"><input type="submit" value="' .$this->str['change'] . '" /></td></tr>';
$o.= ' </table>';
$o.= '</form>';
/// Calculate the buttons
$b = ' <p align="center" class="buttons">';
/// The view original XML button
if ($table->getField($fieldparam)) {
$b .= '&nbsp;<a href="index.php?action=view_field_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;select=original&amp;table=' . $tableparam . '&amp;field=' . $fieldparam . '" target="_blank">[' . $this->str['vieworiginal'] . ']</a>';
} else {
$b .= '&nbsp;[' . $this->str['vieworiginal'] . ']';
}
/// The view edited XML button
if ($field->hasChanged()) {
$b .= '&nbsp;<a href="index.php?action=view_field_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;select=edited&amp;table=' . $tableparam . '&amp;field=' . $fieldparam . '" target="_blank">[' . $this->str['viewedited'] . ']</a>';
} else {
$b .= '&nbsp;[' . $this->str['viewedited'] . ']';
}
/// The back to edit table button
$b .= '&nbsp;<a href="index.php?action=edit_table&amp;table=' . $tableparam . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '">[' . $this->str['back'] . ']</a>';
$b .= '</p>';
$o .= $b;
$this->output = $o;
/// Launch postaction if exists (leave this here!)
if ($this->getPostAction() && $result) {
return $this->launch($this->getPostAction());
}
/// Return ok if arrived here
return $result;
}
}
?>
@@ -0,0 +1,187 @@
/// $Id $
///////////////////////////////////////////////////////////////////////////
// //
// NOTICE OF COPYRIGHT //
// //
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
// http://moodle.com //
// //
// Copyright (C) 2001-3001 Martin Dougiamas http://dougiamas.com //
// (C) 2001-3001 Eloy Lafuente (stronk7) http://contiento.com //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details: //
// //
// http://www.gnu.org/copyleft/gpl.html //
// //
///////////////////////////////////////////////////////////////////////////
/// Register the needed events
onload=function() {
/// Adjust the form on load
transformForm();
/// Get the required fields
var typeField = document.getElementById('menutype');
var sequenceField = document.getElementById('menusequence');
var enumField = document.getElementById('menuenum');
/// Register the rest of events
if (typeField.addEventListener) {
/// Standard
typeField.addEventListener('change', transformForm, false);
sequenceField.addEventListener('change', transformForm, false);
enumField.addEventListener('change', transformForm, false);
} else {
/// IE 5.5
typeField.attachEvent('onchange', transformForm);
sequenceField.attachEvent('onchange', transformForm);
enumField.attachEvent('onchange', transformForm);
}
}
/**
* This function controls all modifications to perform when any field changes
*/
function transformForm(event) {
/// Initialize all the needed variables
var typeField = document.getElementById('menutype');
var lengthField = document.getElementById('length');
var decimalsField = document.getElementById('decimals');
var unsignedField = document.getElementById('menuunsigned');
var notnullField = document.getElementById('menunotnull');
var sequenceField = document.getElementById('menusequence');
var enumField = document.getElementById('menuenum');
var enumvaluesField = document.getElementById('enumvalues');
var defaultField = document.getElementById('default');
var lengthTip = document.getElementById('lengthtip');
var decimalsTip = document.getElementById('decimalstip');
/// Initially, enable everything
decimalsField.disabled = false;
unsignedField.disabled = false;
notnullField.disabled = false;
sequenceField.disabled = false;
enumField.disabled = false;
enumvaluesField.disabled = false;
defaultField.disabled = false;
/// Based on enum, disable some items
if (enumField.value == '0') {
enumvaluesField.disabled = true;
enumvaluesField.value = '';
};
/// Based on sequence, disable some items
if (sequenceField.value == '1') {
unsignedField.disabled = true;
unsignedField.value = '1';
notnullField.disabled = true;
notnullField.value = '1';
defaultField.disabled = true;
defaultField.value = '';
enumField.disabled = true;
enumField.value = '0';
enumvaluesField.disabled = true;
enumvaluesField.value = '';
}
/// Based on type, disable some items
switch (typeField.value) {
case '1': // XMLDB_TYPE_INTEGER
lengthTip.innerHTML = ' 1...20';
decimalsTip.innerHTML = '';
decimalsField.disabled = true;
decimalsField.value = '';
enumField.disabled = true;
enumField.value = '0';
enumvaluesField.disabled = true;
enumvaluesField.value = '';
break;
case '2': // XMLDB_TYPE_NUMBER
lengthTip.innerHTML = ' 1...20';
decimalsTip.innerHTML = ' 0...length or empty';
enumField.disabled = true;
enumField.value = '0';
enumvaluesField.disabled = true;
enumvaluesField.value = '';
break;
case '3': // XMLDB_TYPE_FLOAT
lengthTip.innerHTML = ' 1...20 or empty';
decimalsTip.innerHTML = ' 0...length or empty';
enumField.disabled = true;
enumField.value = '0';
enumvaluesField.disabled = true;
enumvaluesField.value = '';
break;
case '4': // XMLDB_TYPE_CHAR
lengthTip.innerHTML = ' 1...255';
decimalsTip.innerHTML = '';
decimalsField.disabled = true;
decimalsField.value = '';
unsignedField.disabled = true;
unsignedField.value = '0';
sequenceField.disabled = true;
sequenceField.value = '0';
break;
case '5': // XMLDB_TYPE_TEXT
lengthTip.innerHTML = ' small, medium, big';
decimalsTip.innerHTML = '';
decimalsField.disabled = true;
decimalsField.value = '';
unsignedField.disabled = true;
unsignedField.value = '0';
sequenceField.disabled = true;
sequenceField.value = '0';
defaultField.disabled = true;
defaultField.value = '';
break;
case '6': // XMLDB_TYPE_BINARY
lengthTip.innerHTML = ' small, medium, big';
decimalsTip.innerHTML = '';
decimalsField.disabled = true;
decimalsField.value = '';
unsignedField.disabled = true;
unsignedField.value = '0';
sequenceField.disabled = true;
sequenceField.value = '0';
enumField.disabled = true;
enumField.value = '0';
enumvaluesField.disabled = true;
enumvaluesField.value = '';
defaultField.disabled = true;
defaultField.value = '';
break;
case '7': // XMLDB_TYPE_DATETIME
lengthTip.innerHTML = '';
lengthField.disabled = true;
lengthField.value = '';
decimalsTip.innerHTML = '';
decimalsField.disabled = true;
decimalsField.value = '';
unsignedField.disabled = true;
unsignedField.value = '0';
sequenceField.disabled = true;
sequenceField.value = '0';
enumField.disabled = true;
enumField.value = '0';
enumvaluesField.disabled = true;
enumvaluesField.value = '';
defaultField.disabled = true;
defaultField.value = '';
break;
}
}
@@ -0,0 +1,350 @@
<?php // $Id$
///////////////////////////////////////////////////////////////////////////
// //
// NOTICE OF COPYRIGHT //
// //
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
// http://moodle.com //
// //
// Copyright (C) 2001-3001 Martin Dougiamas http://dougiamas.com //
// (C) 2001-3001 Eloy Lafuente (stronk7) http://contiento.com //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details: //
// //
// http://www.gnu.org/copyleft/gpl.html //
// //
///////////////////////////////////////////////////////////////////////////
/// This class will save the changes performed to one field
class edit_field_save extends XMLDBAction {
/**
* Init method, every subclass will have its own
*/
function init() {
parent::init();
/// Set own custom attributes
/// Get needed strings
$this->loadStrings(array(
'fieldnameempty' => 'xmldb',
'incorrectfieldname' => 'xmldb',
'duplicatefieldname' => 'xmldb',
'integerincorrectlength' => 'xmldb',
'numberincorrectlength' => 'xmldb',
'floatincorrectlength' => 'xmldb',
'charincorrectlength' => 'xmldb',
'textincorrectlength' => 'xmldb',
'binaryincorrectlength' => 'xmldb',
'numberincorrectdecimals' => 'xmldb',
'floatincorrectdecimals' => 'xmldb',
'enumvaluesincorrect' => 'xmldb',
'wronglengthforenum' => 'xmldb',
'defaultincorrect' => 'xmldb',
'administration' => ''
));
}
/**
* Invoke method, every class will have its own
* returns true/false on completion, setting both
* errormsg and output as necessary
*/
function invoke() {
parent::invoke();
$result = true;
/// Set own core attributes
$this->does_generate = ACTION_NONE;
//$this->does_generate = ACTION_GENERATE_HTML;
/// These are always here
global $CFG, $XMLDB;
/// Do the job, setting result as needed
if (!data_submitted('nomatch')) { ///Basic prevention
error('Wrong action call');
}
/// Get parameters
$dirpath = required_param('dir', PARAM_PATH);
$dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
$tableparam = strtolower(required_param('table', PARAM_PATH));
$fieldparam = strtolower(required_param('field', PARAM_PATH));
$name = substr(trim(strtolower(optional_param('name', $fieldparam, PARAM_PATH))),0,30);
$comment = required_param('comment', PARAM_CLEAN);
$comment = trim(stripslashes_safe($comment));
$type = required_param('type', PARAM_INT);
$length = strtolower(optional_param('length', NULL, PARAM_ALPHANUM));
$decimals = optional_param('decimals', NULL, PARAM_INT);
$unsigned = optional_param('unsigned', false, PARAM_BOOL);
$notnull = optional_param('notnull', false, PARAM_BOOL);
$sequence = optional_param('sequence', false, PARAM_BOOL);
$enum = optional_param('enum', false, PARAM_BOOL);
$enumvalues = optional_param('enumvalues', 0, PARAM_CLEAN);
$enumvalues = trim(stripslashes_safe($enumvalues));
$default = optional_param('default', NULL, PARAM_PATH);
$default = trim(stripslashes_safe($default));
$editeddir =& $XMLDB->editeddirs[$dirpath];
$structure =& $editeddir->xml_file->getStructure();
$table =& $structure->getTable($tableparam);
$field =& $table->getField($fieldparam);
$oldhash = $field->getHash();
$errors = array(); /// To store all the errors found
/// Perform some automatic asumptions
if ($sequence) {
$unsigned = true;
$notnull = true;
$enum = false;
$default = NULL;
}
if ($type != XMLDB_TYPE_NUMBER && $type != XMLDB_TYPE_FLOAT) {
$decimals = NULL;
}
if ($type != XMLDB_TYPE_CHAR && $type != XMLDB_TYPE_TEXT) {
$enum = false;
}
if ($type == XMLDB_TYPE_BINARY) {
$default = NULL;
}
if (!$enum) {
$enumvalues = NULL;
}
if ($default === '') {
$default = NULL;
}
/// Perform some checks
/// Check empty name
if (empty($name)) {
$errors[] = $this->str['fieldnameempty'];
}
/// Check incorrect name
if ($name == 'changeme') {
$errors[] = $this->str['incorrectfieldname'];
}
/// Check duplicate name
if ($fieldparam != $name && $table->getField($name)) {
$errors[] = $this->str['duplicatefieldname'];
}
/// Integer checks
if ($type == XMLDB_TYPE_INTEGER) {
if (!(is_numeric($length) && !empty($length) && intval($length)==floatval($length) &&
$length > 0 && $length <= 20)) {
$errors[] = $this->str['integerincorrectlength'];
}
if (!(empty($default) || (is_numeric($default) &&
!empty($default) &&
intval($default)==floatval($default)))) {
$errors[] = $this->str['defaultincorrect'];
}
}
/// Number checks
if ($type == XMLDB_TYPE_NUMBER) {
if (!(is_numeric($length) && !empty($length) && intval($length)==floatval($length) &&
$length > 0 && $length <= 20)) {
$errors[] = $this->str['numberincorrectlength'];
}
if (!(empty($decimals) || (is_numeric($decimals) &&
!empty($decimals) &&
intval($decimals)==floatval($decimals) &&
$decimals >= 0 &&
$decimals < $length))) {
$errors[] = $this->str['numberincorrectdecimals'];
}
if (!(empty($default) || (is_numeric($default) &&
!empty($default)))) {
$errors[] = $this->str['defaultincorrect'];
}
}
/// Float checks
if ($type == XMLDB_TYPE_FLOAT) {
if (!(empty($length) || (is_numeric($length) &&
!empty($length) &&
intval($length)==floatval($length) &&
$length > 0 &&
$length <= 20))) {
$errors[] = $this->str['floatincorrectlength'];
}
if (!(empty($decimals) || (is_numeric($decimals) &&
!empty($decimals) &&
intval($decimals)==floatval($decimals) &&
$decimals >= 0 &&
$decimals < $length))) {
$errors[] = $this->str['floatincorrectdecimals'];
}
if (!(empty($default) || (is_numeric($default) &&
!empty($default)))) {
$errors[] = $this->str['defaultincorrect'];
}
}
/// Char checks
if ($type == XMLDB_TYPE_CHAR) {
if (!(is_numeric($length) && !empty($length) && intval($length)==floatval($length) &&
$length > 0 && $length <= 255)) {
$errors[] = $this->str['charincorrectlength'];
}
if ($default !== NULL && $default !== '') {
if (substr($default, 0, 1) == "'" ||
substr($default, -1, 1) == "'") {
$errors[] = $this->str['defaultincorrect'];
}
}
}
/// Text checks
if ($type == XMLDB_TYPE_TEXT) {
if ($length != 'small' &&
$length != 'medium' &&
$length != 'big') {
$errors[] = $this->str['textincorrectlength'];
}
if ($default !== NULL && $default !== '') {
if (substr($default, 0, 1) == "'" ||
substr($default, -1, 1) == "'") {
$errors[] = $this->str['defaultincorrect'];
}
}
}
/// Binary checks
if ($type == XMLDB_TYPE_BINARY) {
if ($length != 'small' &&
$length != 'medium' &&
$length != 'big') {
$errors[] = $this->str['binaryincorrectlength'];
}
}
/// Enum checks
if ($enum) {
$enumerr = false;
$enumarr = explode(',',$enumvalues);
$maxlength = 0;
if ($enumarr) {
foreach ($enumarr as $key => $enumelement) {
/// Clear some spaces
$enumarr[$key] = trim($enumelement);
$enumelement = trim($enumelement);
/// Calculate needed length
$le = strlen(str_replace("'", '', $enumelement));
if ($le > $maxlength) {
$maxlength = $le;
}
/// Skip if under error
if ($enumerr) {
continue;
}
/// Look for quoted strings
if (substr($enumelement, 0, 1) != "'" ||
substr($enumelement, -1, 1) != "'") {
$enumerr = true;
}
}
} else {
$enumerr = true;
}
if ($enumerr) {
$errors[] = $this->str['enumvaluesincorrect'];
} else {
$enumvalues = $enumarr;
}
if ($length < $maxlength) {
$errors[] = $this->str['wronglengthforenum'];
}
}
if (!empty($errors)) {
$tempfield = new XMLDBField($name);
$tempfield->setType($type);
$tempfield->setLength($length);
$tempfield->setDecimals($decimals);
$tempfield->setUnsigned($unsigned);
$tempfield->setNotNull($notnull);
$tempfield->setSequence($sequence);
$tempfield->setEnum($enum);
$tempfield->setEnumValues($enumvalues);
$tempfield->setDefault($default);
/// Prepare the output
$site = get_site();
print_header("$site->shortname: XMLDB",
"$site->fullname",
"<a href=\"../index.php\">" . $this->str['administration'] . "</a> -> <a href=\"index.php\">XMLDB</a>");
notice ('<p>' .implode(', ', $errors) . '</p>
<p>' . $tempfield->readableInfo(),
'index.php?action=edit_field&amp;field=' .$field->getName() . '&amp;table=' . $table->getName() . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)));
die; /// re-die :-P
}
/// Continue if we aren't under errors
if (empty($errors)) {
/// If there is one name change, do it, changing the prev and next
/// atributes of the adjacent fields
if ($fieldparam != $name) {
$field->setName($name);
if ($field->getPrevious()) {
$prev =& $table->getField($field->getPrevious());
$prev->setNext($name);
$prev->setChanged(true);
}
if ($field->getNext()) {
$next =& $table->getField($field->getNext());
$next->setPrevious($name);
$next->setChanged(true);
}
}
/// Set comment
$field->setComment($comment);
/// Set the rest of fields
$field->setType($type);
$field->setLength($length);
$field->setDecimals($decimals);
$field->setUnsigned($unsigned);
$field->setNotNull($notnull);
$field->setSequence($sequence);
$field->setEnum($enum);
$field->setEnumValues($enumvalues);
$field->setDefault($default);
/// If the hash has changed from the old one, change the version
/// and mark the structure as changed
$field->calculateHash(true);
if ($oldhash != $field->getHash()) {
$field->setChanged(true);
$table->setChanged(true);
/// Recalculate the structure hash
$structure->calculateHash(true);
$structure->setVersion(userdate(time(), '%Y%m%d', 99, false));
/// Mark as changed
$structure->setChanged(true);
}
/// Launch postaction if exists (leave this here!)
if ($this->getPostAction() && $result) {
return $this->launch($this->getPostAction());
}
}
/// Return ok if arrived here
return $result;
}
}
?>
@@ -0,0 +1,159 @@
<?php // $Id$
///////////////////////////////////////////////////////////////////////////
// //
// NOTICE OF COPYRIGHT //
// //
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
// http://moodle.com //
// //
// Copyright (C) 2001-3001 Martin Dougiamas http://dougiamas.com //
// (C) 2001-3001 Eloy Lafuente (stronk7) http://contiento.com //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details: //
// //
// http://www.gnu.org/copyleft/gpl.html //
// //
///////////////////////////////////////////////////////////////////////////
/// This class will provide the interface for all the edit index actions
class edit_index extends XMLDBAction {
/**
* Init method, every subclass will have its own
*/
function init() {
parent::init();
/// Set own custom attributes
/// Get needed strings
$this->loadStrings(array(
'change' => 'xmldb',
'vieworiginal' => 'xmldb',
'viewedited' => 'xmldb',
'yes' => '',
'no' => '',
'back' => 'xmldb'
));
}
/**
* Invoke method, every class will have its own
* returns true/false on completion, setting both
* errormsg and output as necessary
*/
function invoke() {
parent::invoke();
$result = true;
/// Set own core attributes
$this->does_generate = ACTION_GENERATE_HTML;
/// These are always here
global $CFG, $XMLDB;
/// Do the job, setting result as needed
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
$dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
/// Get the correct dirs
if (!empty($XMLDB->dbdirs)) {
$dbdir =& $XMLDB->dbdirs[$dirpath];
} else {
return false;
}
if (!empty($XMLDB->editeddirs)) {
$editeddir =& $XMLDB->editeddirs[$dirpath];
$structure =& $editeddir->xml_file->getStructure();
}
/// ADD YOUR CODE HERE
/// Fetch request data
$tableparam = required_param('table', PARAM_CLEAN);
if (!$table =& $structure->getTable($tableparam)) {
$this->errormsg = 'Wrong table specified: ' . $tableparm;
return false;
}
$indexparam = required_param('index', PARAM_CLEAN);
if (!$index =& $table->getIndex($indexparam)) {
/// Arriving here from a name change, looking for the new key name
$indexparam = required_param('name', PARAM_CLEAN);
$index =& $table->getIndex($indexparam);
}
$dbdir =& $XMLDB->dbdirs[$dirpath];
$origstructure =& $dbdir->xml_file->getStructure();
/// Add the main form
$o = '<form name="form" id="form" action="index.php" method="post">';
$o.= ' <input type="hidden" name ="dir" value="' . str_replace($CFG->dirroot, '', $dirpath) . '" />';
$o.= ' <input type="hidden" name ="table" value="' . $tableparam .'" />';
$o.= ' <input type="hidden" name ="index" value="' . $indexparam .'" />';
$o.= ' <input type="hidden" name ="action" value="edit_index_save" />';
$o.= ' <input type="hidden" name ="postaction" value="edit_table" />';
$o.= ' <table id="formelements" align="center">';
/// XMLDB index name
/// If the index has dependencies, we cannot change its name
$disabled = '';
if ($structure->getIndexUses($table->getName(), $index->getName())) {
$disabled = ' disabled="disabled " ';
}
$o.= ' <tr valign="top"><td><label for="name" accesskey="n">Name:</label></td><td colspan="2"><input name="name" type="text" size="30" id="name"' . $disabled . 'value="' . s($index->getName()) . '" /></td></tr>';
/// XMLDB key comment
$o.= ' <tr valign="top"><td><label for="comment" accesskey="c">Comment:</label></td><td colspan="2"><textarea name="comment" rows="3" cols="80" id="comment">' . s($index->getComment()) . '</textarea></td></tr>';
/// XMLDBIndex Type
$typeoptions = array (0 => 'not unique',
1 => 'unique');
$o.= ' <tr valign="top"><td><label for="menuunique" accesskey="t">Type:</label></td>';
$o.= ' <td colspan="2">' . choose_from_menu($typeoptions, 'unique', $index->getUnique(), '', '', '', true) . '</td></tr>';
/// XMLDBIndex Fields
$o.= ' <tr valign="top"><td><label for="fields" accesskey="f">Fields:</label></td>';
$o.= ' <td colspan="2"><input name="fields" type="text" size="40" maxlength="80" id="fields" value="' . s(implode(', ', $index->getFields())) . '" /></td></tr>';
/// Change button
$o.= ' <tr valign="top"><td>&nbsp;</td><td colspan="2"><input type="submit" value="' .$this->str['change'] . '" /></td></tr>';
$o.= ' </table>';
$o.= '</form>';
/// Calculate the buttons
$b = ' <p align="center" class="buttons">';
/// The view original XML button
if ($table->getIndex($indexparam)) {
$b .= '&nbsp;<a href="index.php?action=view_index_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;select=original&amp;table=' . $tableparam . '&amp;index=' . $indexparam . '" target="_blank">[' . $this->str['vieworiginal'] . ']</a>';
} else {
$b .= '&nbsp;[' . $this->str['vieworiginal'] . ']';
}
/// The view edited XML button
if ($index->hasChanged()) {
$b .= '&nbsp;<a href="index.php?action=view_index_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;select=edited&amp;table=' . $tableparam . '&amp;index=' . $indexparam . '" target="_blank">[' . $this->str['viewedited'] . ']</a>';
} else {
$b .= '&nbsp;[' . $this->str['viewedited'] . ']';
}
/// The back to edit table button
$b .= '&nbsp;<a href="index.php?action=edit_table&amp;table=' . $tableparam . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '">[' . $this->str['back'] . ']</a>';
$b .= '</p>';
$o .= $b;
$this->output = $o;
/// Launch postaction if exists (leave this here!)
if ($this->getPostAction() && $result) {
return $this->launch($this->getPostAction());
}
/// Return ok if arrived here
return $result;
}
}
?>

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