Compare commits

...

1265 Commits

Author SHA1 Message Date
moodler f6641be6b7 Bumped version 2008-07-11 05:24:46 +00:00
skodak 726d8b5805 MDL-15450 CSRF prevention 2008-07-08 13:03:59 +00:00
skodak 04ea70175b MDL-15516 prevent access to profiles of deleted users; backported from HEAD 2008-07-05 15:02:10 +00:00
arborrow 4497e89c9f MDL-7571 - shuffles 'mode' before displaying, merged from MOODLE_18_STABLE 2008-07-04 22:28:20 +00:00
gbateson 4fc304ca82 MDL-15184: fix sql injection vulnerability 2008-07-01 10:44:23 +00:00
moodler 8fd3d38509 MDL-15413 Added some code to stop access to this page directly 2008-06-27 03:31:27 +00:00
moodler 6e6f33e6f2 MDL-15413 Added some code to prevent this script being run on it's own 2008-06-27 03:29:08 +00:00
scyrma 5104726b9f MDL-15392: fix output sanitization. 2008-06-25 03:56:59 +00:00
gbateson 97e2fee8d2 replace get_jmatch_items by set_jmatch_items 2008-06-20 22:26:04 +00:00
gbateson a9456360f9 allow <img> and other tags in LHS of JMatch in "v6" outputformat 2008-06-19 05:55:46 +00:00
gbateson 376a031f4c 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:41:18 +00:00
mchurch 2c450e82d9 MDL-15035 - Changed error message to more meaningful one. 2008-05-28 14:59:47 +00:00
stronk7 7658e24915 Avoid $_REQUEST["id"] usage. MDL-14806 ; backported from 19_STABLE 2008-05-13 01:55:32 +00:00
tjhunt 60ec12e055 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:52 +00:00
tjhunt be074bc3e6 MDL-14797 - Error when moving a course to an empty category on Postgres 2008-05-12 10:44:42 +00:00
moodler 0259eda698 New uz installer lang 2008-05-10 02:57:14 +00:00
tjhunt cfdfc85ddc 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:46 +00:00
tjhunt 6fa56c54f3 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:58 +00:00
moodler c14c54c22a New lang supported by installer: cy_utf8 2008-05-04 00:42:16 +00:00
scyrma ae4b11cbfd MDL-8592: Get spellchecking to work over https (backport from 1.9) 2008-05-02 03:40:42 +00:00
gbateson f452e874bc removed setting of timeclose and timeopen when course format == "weeks" 2008-04-18 00:57:49 +00:00
nicolasconnault 21d1ce8edd MDL-13919 Fixed undefined variable 2008-03-13 14:01:08 +00:00
ethem 45d22afdcc 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:50:54 +00:00
pichetp 7f33aa0cd4 MDL-12503 Loguniform merging from head 2008-03-10 21:58:20 +00:00
gbateson df489b8217 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:36 +00:00
skodak f19e9ea7e7 MDL-13705 2008-03-01 13:13:14 +00:00
skodak 48b31fcc65 MDL-13705 2008-02-28 21:19:54 +00:00
skodak 6a4fc5046f MDL-13705 2008-02-28 21:03:35 +00:00
moodler 947d915a8f Fix subject lines and corrupted emails from messages MDL-13364 (merged) 2008-02-07 05:22:52 +00:00
gbateson d37502617e MDL-13328 correct the counting of attempts when clickreporting has been enabled 2008-02-07 04:18:14 +00:00
nicolasconnault a22772f8e3 MDL-12158 Applied Matt's patch 2008-02-05 10:38:00 +00:00
gbateson 0b2f6d13cf fix odd escaping of quotes by "stripslashes()" on Windows server with MSSQL 2008-02-05 06:00:10 +00:00
gbateson 767e292319 MDL-10451 remove extraneous closing </b> tag from lang/en_utf8/help/hotpot/outputformat.html 2008-02-05 04:22:27 +00:00
gbateson 2c6041eb5a MDL-13048 fix undefined course id when importing a Hot Potatoes quiz into the Lesson module 2008-02-05 04:08:54 +00:00
scyrma 94e5a9c78f MDL-13060 - removing old entries fro VA and CD 2008-02-04 00:48:31 +00:00
gbateson 4b4b981562 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:24:44 +00:00
scyrma b74bd9ce19 MDL-4218 - deprecatedlib.php doesn't exist in 1.6 2008-01-31 00:50:52 +00:00
tjhunt 2519a70a19 MDL-13110 - Manually grading random questions does not work. Fix thanks to Ken Burres. 2008-01-30 18:18:41 +00:00
tjhunt 5ed379d713 Fix invalid XML in example file. 2008-01-30 17:24:42 +00:00
mchurch 5fbb72ba43 MDL-13252 Fix context to always use course context, rather than instance->page. 2008-01-30 16:52:19 +00:00
scyrma 7c0be404c8 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:45:43 +00:00
scyrma e724611042 Upgrade path for MDL-13060. 2008-01-29 05:51:46 +00:00
gbateson 5a66d54c05 fix for MDL-13173: quotes in HotPot activity name 2008-01-26 08:25:51 +00:00
nicolasconnault 58b037a501 MDL-4218 Added require_once deprecatedlib.php 2008-01-17 08:45:55 +00:00
nicolasconnault 71dbb2abb0 MDL-4218 Disabling the check for admin dir 2008-01-17 08:09:53 +00:00
nicolasconnault fdebc24f38 MDL-4218 Disabling the check for web root URL 2008-01-17 07:48:14 +00:00
Martin Langhoff 761ed63243 cvsimport fixups - related to the MOODLE_16_STABLE bogus force-move - binary 2008-01-14 08:53:41 +00:00
Martin Langhoff 378464df6a cvsimport fixups - related to the MOODLE_16_STABLE bogus force-move 2008-01-14 08:53:41 +00:00
moodler 8720c8d50c Moved to + after release 2008-01-14 08:53:41 +00:00
poltawski f7f5109386 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:08:05 +00:00
skodak 71092feb39 MDL-12914 Register globals trouble; backported from MOODLE_19_STABLE 2008-01-11 23:29:23 +00:00
moodler e216127ee6 Bumped to 1.6.6 2008-01-11 14:43:20 +00:00
skodak 9aafb499a7 MDL-12793 PARAM_HOST incorrect cleaning; backported from MOODLE_19_STABLE 2008-01-01 17:28:55 +00:00
stronk7 e410c5e2e8 Prevent race condition in event creation. MDL-5956.
Credit goes to Penny, Luke and Martin @ Catalyst.
2007-12-28 18:35:55 +00:00
stronk7 2277a1409c Fix navbar buttons. 16_STABLE only. MDL-8305 2007-12-08 17:02:56 +00:00
moodler 8ef47e0880 New installer files added - stronk7
Backported from HEAD
2007-11-29 17:07:51 +00:00
moodler 1eae77d4f6 file installer.php was added on branch MOODLE_16_STABLE on 2007-11-29 17:07:51 +0000 2007-11-29 16:59:26 +00:00
gbateson f1efb1f1c6 reinstated calls to hpInterceptFeedback/Hints/Clues (lines 2919-2921), which had been commented out during testing of an earlier bug. 2007-11-20 23:56:20 +00:00
sam_marshall 89fea782d9 MDL-6701 (broken wiki admin pages) merge to 1.6 2007-11-15 11:43:17 +00:00
arborrow d3401c2db5 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:51:38 +00:00
gbateson da1aa1b461 replace CFG->dbfamily with CFG->dbtype, because CFG->dbfamily is not available on Moodle 1.7 and less 2007-11-13 03:53:06 +00:00
gbateson 2e47a8968e 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:52:16 +00:00
skodak 3b9e6de01d MFC: MDL-12079 fixed use of clean_param() 2007-11-10 14:53:20 +00:00
fmarier c313ffa5db Add missing fields when upgrading/installing on Postgres
mod/exercise, mod/scorm and question/type/rqp
MDL-12023
2007-11-09 01:21:14 +00:00
moodler 1b09c97190 Adding some missing new installer langs to 1.6. 2007-11-05 08:34:10 +00:00
moodler d9aff3e8ba file installer.php was added on branch MOODLE_16_STABLE on 2007-11-05 08:34:10 +0000 2007-11-04 17:10:18 +00:00
tjhunt f238441d45 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:25 +00:00
tjhunt 12e5b3c2b1 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:13 +00:00
tjhunt b7515bca14 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:33 +00:00
nicolasconnault 9f94e60e36 MDL-10905 iterating properly through readdir() 2007-10-15 05:53:55 +00:00
gbateson 9ec94a8623 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:05:05 +00:00
nfreear e188ec9b1f Fixes MDL-11676, Skip block links are broken in Internet Explorer 6. Merged. 2007-10-09 16:10:10 +00:00
skodak 0165dea2c6 MDL-11663 sanitise submitted data when editing users 2007-10-08 19:55:39 +00:00
gbateson a3a940c7fb added escaping of quotes in TimesUp message, so that apostrophes do not cause Javascript errors 2007-10-08 06:39:23 +00:00
pichetp 0227d32dff checking that there remain $oldwrappedids before deleting them lines 87-..
add         if(is_array($oldwrappedids) && count($oldwrappedids)){
2007-10-06 21:10:13 +00:00
whchuang 2fa9af0d78 added missing string definition for sectionerror. Fixed MDL-10766 2007-10-03 00:00:11 +00:00
skodak 24f32e4836 MDL-11413 I hope now it is correct solution; backported from HEAD 2007-09-25 14:08:26 +00:00
skodak 9e6ab88530 MDL-11413 revisited; backported from HEAD 2007-09-24 15:29:07 +00:00
skodak de9eaaac1d MDL-11414 fixed handling of log urls (problem reported by Andreas Nolden); backported from HEAD 2007-09-23 13:16:53 +00:00
skodak 9a72d21147 MDL-11413 improved text cleaning (problem reported by Andreas Nolden); backported from HEAD 2007-09-23 12:30:43 +00:00
skodak a9673e7550 MDL-11413 improved text cleaning (problem reported by Andreas Nolden); backported from HEAD 2007-09-23 12:26:27 +00:00
tjhunt 8a3df96e52 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. 2007-09-13 17:28:31 +00:00
pichetp 3e3a8001b2 Correcting a little error: datesetitem = array(); instead of datasetitem = array();
line +-550 $question->dataset[$datasetname]->datasetitem = array();
2007-09-07 02:47:37 +00:00
nicolasconnault ae7805aec3 MDL-9005 Fixed this and another multilang issue (module name in preview didn't filter multilang tags either). 2007-08-28 15:07:13 +00:00
nicolasconnault 4912fa485e 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:14:02 +00:00
pichetp 575447dd68 Merging MDL-10680 resolved by thepurplebob from 1.9 2007-08-08 02:03:43 +00:00
wildgirl 071b220cbb MDL-4912 docs directory clean-up 2007-07-28 20:25:13 +00:00
wildgirl 282aeac984 MDL-4912 docs directory clean-up 2007-07-28 20:06:16 +00:00
stronk7 af49230f9a English is English is English is English... :-( 2007-07-25 22:06:13 +00:00
stronk7 dae85a4750 Adding two missing strings. MDL-6017
NOTE: These are OUT for Moodle 1.9 and new Grade System, so don't
      translate them!
2007-07-25 22:04:04 +00:00
stronk7 f622567f6c Fixing two get_string() calls when restoring gradebook preferences. MDL-6017 2007-07-25 21:30:23 +00:00
moodler a8c857d3c2 Bye bye CHANGES http://moodle.org/mod/forum/discuss.php?d=75777 2007-07-17 02:21:57 +00:00
skodak 3bd4380e4a MDL-10341 fixed user search cleaning; backported from MOODLE_18_STABLE 2007-07-04 08:33:58 +00:00
bobopinna 9e3e85eb05 Refixed bug MDL-7325 2007-07-03 13:44:19 +00:00
skodak 91cf2fb230 MDL-10276 Text cleaning trouble; backported from HEAD 2007-06-27 12:07:35 +00:00
gbateson 8acecdb821 make sure $hotpot->id is set when adding calendar events for new HotPot 2007-06-26 12:05:49 +00:00
gbateson e29a752173 in XML source files of HP quizzes, convert relative URLs to absolute URLs in links using window.open(...) 2007-06-26 04:59:56 +00:00
gbateson a0001e3a6d change relative URLs to absolute URLs in window.open(...) 2007-06-26 02:39:30 +00:00
jamiesensei edbbeb02f2 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:03:19 +00:00
jamiesensei d8e68c5e51 added styles to install.php for colours for environment table 2007-06-20 06:31:33 +00:00
jamiesensei c82a4d6d36 *** empty log message *** 2007-06-19 17:45:07 +00:00
jamiesensei 9d8453becd MDL-10168 improvements to display of results from environment checks 2007-06-19 16:26:45 +00:00
jamiesensei 52f79e8fd4 elaborated phpdoc comment slightly for doc_link 2007-06-19 15:20:16 +00:00
jamiesensei 3bc52bdb1e 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:54:43 +00:00
ethem 8c239c8315 MDL-9836
Authorize.net / SSL Config Bug prevents display of options from enrol/authorize/enrol.php
2007-06-15 18:00:13 +00:00
csantossaenz 57fead9527 Fixed bug MDL-7516 2007-06-15 08:15:10 +00:00
pichetp 5394e9c99b Removing question/type/datasetdependent/categorydatasetdefinitions.php MDL-10072 2007-06-13 07:47:52 +00:00
pichetp 1dbbbb3118 removing no more used variable $sharedwildcard 2007-06-13 07:36:57 +00:00
pichetp 9cf8933ec3 solving lost of dataitems MDL-10087 merging from 1.8 2007-06-13 07:32:18 +00:00
pichetp 9b0f6ae71d giving to questiondatasets.html all the features of datasetdefinitions_form.php of HTML
QuickForm
2007-06-12 03:16:40 +00:00
pichetp 32993fef61 removing doudle html code at the end 2007-06-11 20:10:07 +00:00
pichetp 9cd0ada241 replacing "saveas" by "next page" and a greater size to answers formula <input> 2007-06-11 16:55:29 +00:00
pichetp 009d136f72 Adding various improvements (MDL-8565, MDL-9496, MDL10070 etc.)to calculated question 2007-06-11 07:44:29 +00:00
martinlanghoff 719ef5f313 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:24:40 +00:00
jamiesensei df5039c5ca MDL-9885 Use Permissions from Roles and Permissions System 2007-05-28 00:51:20 +00:00
jamiesensei a18c40a892 MDL-9734 fix for clean_param PARAM_LOCALURL bug 2007-05-27 11:24:58 +00:00
jamiesensei 3281b7d075 MDL-9885 'Use Permissions from Roles and Permissions System' almost done. Need to allow "Save as New Question" for those who have view permission on a question and add permission in at least one context. 2007-05-27 05:58:31 +00:00
jamiesensei ea7a090955 MDL-9883 Use new fields in question table - created, modified, createdby and modifiedby 2007-05-22 04:59:53 +00:00
jamiesensei 788376bb52 bump up version to install new fields in question table 2007-05-22 04:57:16 +00:00
jamiesensei 1c496238c3 MDL-9869 Add fields to question table - created, modified, createdby and modifiedby 2007-05-22 01:23:03 +00:00
jamiesensei cd3f0da747 UI for editing questions changed to support sharing questions in multiple contexts. Also changed import / export and category editing form to use formslib. 2007-05-20 16:18:00 +00:00
pichetp d8720eebc3 Small numerical answers i.e. 1e-18 are not graded correctly MDL-8473 merging from head 2007-05-17 17:30:35 +00:00
jamiesensei b7f1aeee3f started work on MOODLE_19_QUESTIONS branch. Have coded display of question categories page with categories shared in different category levels. Changes made to the db to remove publish and course fields and replace them with contextid field in category table. 2007-05-11 22:26:27 +00:00
pichetp 9c53d3286c merging from head so that calculated questions can be imported and other improvments 2007-05-11 15:29:50 +00:00
pichetp fc418ee754 Setting import_process =true in defaultquestion() function used on imports 2007-05-11 15:26:21 +00:00
pichetp 8a3043d26d Setting export_process =true so to be used for export in xml format of calculated
question
2007-05-11 15:14:01 +00:00
pichetp 973342ab16 adding calculated question import and export functions for webct MDL-5650 and xml
formats merged from head
2007-05-11 15:07:00 +00:00
csantossaenz 15b10f5cab Deleted addslashes_js() because it was impossible to add it to weblib.php 2007-05-11 11:11:21 +00:00
csantossaenz c00bb02c52 Added addslashes_js() to make the javascript code work properly 2007-05-11 10:54:23 +00:00
gbateson afccfe8752 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:11:55 +00:00
moodler 78e4c3dd6c Added language class for CSS MDL-9750 2007-05-09 06:45:07 +00:00
gbateson b4af3c2f48 modified "hpNewFunction" to allow Rottmeier quizze (Find-It, Dropdown) s to run on Safari (Mac) 2007-05-07 02:46:03 +00:00
gbateson b3f9b5c1c2 remove duplicate id attribute from body tag; microincrement version to 2006082902 (release 2.1.25) 2007-05-04 02:40:44 +00:00
gbateson 81ee42cb0f set default body font-size to "small" 2007-05-03 00:57:16 +00:00
gbateson f7fe32525a add HP 6.2 templates; add compatability with Safari (Mac browser); microincrement version to 2006082901 (release 2.1.24) 2007-05-01 03:19:09 +00:00
tjhunt dad0965802 Fix comedy require_once. 2007-04-24 21:15:37 +00:00
tjhunt 10e2074684 Fix error message to say the right thing. 2007-04-19 17:16:43 +00:00
cataluke 419a0bb0a8 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:46:19 +00:00
cataluke 485726e71f MDL-8569 - mod/data sorting by numerical field now works with PostgreSQL
Author: Luke Hudson <luke@catalyst.net.nz>
2007-04-18 02:17:00 +00:00
cataluke bc1f84e618 MDL-7856 - make database search case-insensitive for PostgreSQL too.
Author: Andrew Walbran <andrew.walbran@catalyst.net.nz>
Committer: Luke Hudson <luke@catalyst.net.nz>
2007-04-18 01:56:14 +00:00
thepurpleblob fc144c4992 Backport from 1.7. Was completely broken (class constructed wrongly), so nothing much to lose! 2007-04-16 09:28:29 +00:00
moodler 902590a7d1 FIxed some standard theme headers by copying from "standard" as they were out of date 2007-04-16 08:06:52 +00:00
stronk7 d7a7b5b5db Fixing typo causing some (a few) sites to break on upgrade. Credit
goes to Rafa Gutierrez. MDL-9316
2007-04-12 15:30:03 +00:00
martinlanghoff 35decbd8be 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:46:27 +00:00
mjollnir_ 284060cc7e fixing warnings in stats lib - rather than doing an include_once and noticing for every missing mod, check the file exists first 2007-04-11 23:51:19 +00:00
moodler 20a37a126e Automatic installer.php lang files by installer_builder (20070410) 2007-04-10 03:29:27 +00:00
stronk7 1b6fbd596c Now $CFG->apachemaxmem is respected.
Merged from MOODLE_15_STABLE
2007-04-07 16:03:15 +00:00
martinlanghoff 17b39b6c95 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 04:51:22 +00:00
moodler a1cac4a086 Automatic installer.php lang files by installer_builder (20070405) 2007-04-05 03:31:56 +00:00
nicolasconnault 09f187c0db MDL-9204 New submission wasn't given a timemodified upon creation. 2007-04-05 03:24:49 +00:00
moodler 1e0a4f87fc Automatic installer.php lang files by installer_builder (20070404) 2007-04-04 03:57:00 +00:00
nicolasconnault 9fb8e5ed17 MDL-9192
a.dimmed:link,
a.dimmed:visited {
  color:#AAAAAA;
}
2007-04-04 02:41:23 +00:00
nicolasconnault ffd9b01913 MDL-9193 2007-04-04 02:19:30 +00:00
nicolasconnault 3c582678cf MDL-9194 2007-04-04 02:05:48 +00:00
nicolasconnault c63af80f85 MDL-9147 2007-04-03 08:42:33 +00:00
toyomoyo 09bd9bb66b fix for broken blog utf8 migration 2007-04-02 08:41:26 +00:00
moodler 244c10cf84 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:05 +00:00
paca70 f4959dc939 To fix MDL-8614 2007-04-01 07:50:16 +00:00
tjhunt e7a84ec034 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.6 stable branch.

Backported from MOODLE_17_STABLE.
2007-03-30 16:05:14 +00:00
moodler 00e53e7c36 Updated for post 1.6.5 2007-03-30 08:31:54 +00:00
moodler cdf10a35ab Bump to 1.6.5 for release 2007-03-30 07:47:20 +00:00
moodler 561bb4feac Recent changes 2007-03-30 07:31:16 +00:00
gbateson eaf134b1bb fix the display of the special chars keypad (in JCloze and JQuiz) 2007-03-30 03:47:29 +00:00
skodak f035daedca MDL-4313 LDAP doesn't properly escape extra quotes in course details; backported from MOODLE_18_STABLE 2007-03-29 22:07:41 +00:00
csantossaenz 4e3ee63c2e 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:07:42 +00:00
csantossaenz d58e4f8a04 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 14:57:05 +00:00
stronk7 4afc877819 Last commit of the glorious glossary files to 16_STABLE, performed now
that everything is properly branched. See MDL-9032
2007-03-25 15:31:20 +00:00
moodler 86f4390922 Removed to match original MOODLE_16_STABLE ... not sure how this got in again. 2007-03-25 15:16:39 +00:00
moodler cddc532c21 Latest tags for 1.6 2007-03-25 15:14:11 +00:00
moodler cd4858ed49 Just removed some unneeded braces (and testing MOODLE_16_STABLE again!) 2007-03-25 15:10:58 +00:00
moodler 609618521b Restoring changes all the changes in MOODLE_16_STABLE since MOODLE_16_BETA.
This had to be done because the MOODLE_16_STABLE branch tags were moved.

Hopefully after this MOODLE_16_STABLE will be back to how it was (and a
proper branch) but some of the history may look a bit odd.

See MDL-9032 for more discussion and details.
2007-03-25 14:48:26 +00:00
moodler 123f94ad3a Checking MOODLE_16_STABLE branch 2007-03-25 08:34:30 +00:00
stronk7 5da4f6bf37 And finally, I can send again the only two files that were committed
after the disaster.
2007-03-25 02:31:58 +00:00
stronk7 57ba54429f Adding some files that were never merged after branch disaster 2007-03-25 01:54:28 +00:00
stronk7 84ef448820 Adding some files that were never merged after branch disaster 2007-03-25 01:48:51 +00:00
stronk7 80e2ce03fb Updating some binary files changed after branch disaster 2007-03-25 01:09:47 +00:00
stronk7 812d7e4a29 Deleting non-existing files in 16_STABLE after branch disaster 2007-03-25 00:56:44 +00:00
stronk7 4c74467eae Re-applying unmerged changes to 16_STABLE after branch disaster 2007-03-25 00:29:47 +00:00
stronk7 f10bf825df Re-applying unmerged changes to 16_STABLE after branch disaster 2007-03-25 00:01:20 +00:00
stronk7 3676309617 Committing changes performed on 16_STABLE after wrong move of tag. 2007-03-24 11:42:14 +00:00
stronk7 8bcbbf13e3 Committing changes performed on 16_STABLE after wrong move of tag. 2007-03-24 11:25:45 +00:00
stronk7 81e7672216 Fix a problem with glossary not being able to sort by firstname.
Backported from MOODLE_18_STABLE
2007-03-24 01:02:04 +00:00
stronk7 183185d12b One default was causing author view not being able to sortby firstname or lastname.
Backported from MOODLE_18_STABLE
2007-03-24 00:41:43 +00:00
moodler bdea788034 Automatic installer.php lang files by installer_builder (20070323) 2007-03-23 03:39:40 +00:00
tjhunt 5c3a0f7cf6 MDL-7241 - Manual grading report, sort by completed time didn't. 2007-03-22 21:31:12 +00:00
moodler 13d1518108 Automatic installer.php lang files by installer_builder (20070322) 2007-03-22 03:53:27 +00:00
tjhunt a24948b64f MDL-7259 - Item analysis report does not use the right format_text settings. 2007-03-21 23:25:09 +00:00
tjhunt c6d0697e7a Fix whitespace problems and Eclipse warnings in Item Analysis quiz report. 2007-03-21 23:04:41 +00:00
skodak 82dd519e4f MDL-7647 Broken links on confirmation email (or others) - patch by Paulo Matos; backported from MOODLE_17_STABLE 2007-03-21 22:01:19 +00:00
moodler 08da658c0b Automatic installer.php lang files by installer_builder (20070321) 2007-03-21 03:48:28 +00:00
tjhunt e6fb20e1b4 MDL-8978 - Regression from MDL-6386. 2007-03-21 00:13:01 +00:00
skodak c9bd758adb MDL-8975 fix parameter handling in repository plugin; backported from MOODLE_18_STABLE 2007-03-20 19:49:00 +00:00
skodak 1bc1ee7884 SC#374 removing obsoleted utf8migration code; merged from MOODLE_17_STABLE 2007-03-20 16:25:23 +00:00
tjhunt 05318aa55a 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:08 +00:00
moodler 87577fc045 Automatic installer.php lang files by installer_builder (20070320) 2007-03-20 03:33:47 +00:00
stronk7 f08799bc80 small typo in var name
Merged from MOODLE_15_STABLE
2007-03-19 15:55:41 +00:00
martinlanghoff 0f1f94408a 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:03:00 +00:00
moodler 61231d5b66 Automatic installer.php lang files by installer_builder (20070318) 2007-03-18 03:26:49 +00:00
poltawski d8793bf35c 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:58:30 +00:00
pichetp d88d4d9309 adding </p> lines 106,108 2007-03-16 22:29:59 +00:00
tjhunt 911812794c MDL-6462 - Cloze (multianswer) question special character issues. 2007-03-15 12:58:38 +00:00
moodler e29818bf9c Automatic installer.php lang files by installer_builder (20070315) 2007-03-15 03:29:38 +00:00
tjhunt 8ec981d1eb MDL-8127 - bad use of DESCRIPTION constant in quiz module causes upgrade to fail. Thanks to Pavel Krejci for the fix. 2007-03-14 21:23:39 +00:00
skodak 52a257bb99 MDL-8897 fixed shell commands in tex and algebra filters; backported from MOODLE_17_STABLE 2007-03-14 15:15:26 +00:00
ethem 4955f652fa Code cleanup 2007-03-14 13:48:30 +00:00
moodler 39eda5c5e8 Automatic installer.php lang files by installer_builder (20070314) 2007-03-14 03:48:10 +00:00
tjhunt 3e93268a0a Eliminate bizarre use of function_exists. 2007-03-13 17:43:10 +00:00
moodler a61217d94e Automatic installer.php lang files by installer_builder (20070313) 2007-03-13 03:31:07 +00:00
skodak 7dcc760e18 MDL-5229 and MDL-6196 fixed infinite loop for gb18030 encoding, line breaking for gb18030 does not work though 2007-03-12 08:54:23 +00:00
skodak acb6697543 MDL-8849 use proper value quoting; backported from MOODLE_18_STABLE 2007-03-11 20:01:53 +00:00
moodler 77d6f641ba Merged from head MDL-8842 2007-03-10 14:52:17 +00:00
moodler 2cc1083e86 Automatic installer.php lang files by installer_builder (20070310) 2007-03-10 03:26:29 +00:00
tjhunt 50219aacc1 MDL-8177 - Random questions selected deleted questions. Backported from MOODLE_18_STABLE. 2007-03-10 00:34:55 +00:00
moodler b84d9721c0 Automatic installer.php lang files by installer_builder (20070309) 2007-03-09 03:43:18 +00:00
moodler f466b19ca6 chaning require_once to include_once to tolerate faulty mods 2007-03-08 03:28:09 +00:00
tjhunt 1e1ac99513 MDL-8349 - responses not being filtered in history display. Backported from MOODLE_18_STABLE. 2007-03-06 18:00:51 +00:00
moodler 6a1596099d Mrged new string locations for modules 2007-03-05 12:30:45 +00:00
skodak d827e21645 MDL-8584 forum reset now disabled if using PostgreSQL in Moodle 1.6.x 2007-03-04 09:10:18 +00:00
skodak dab8f5a24d MDL-8584 forum reset now disabled if using PostgreSQL in Moodle 1.6.x 2007-03-04 09:08:01 +00:00
moodler 7ecfb0c038 Automatic installer.php lang files by installer_builder (20070304) 2007-03-04 03:38:41 +00:00
gbateson f5a13d3f08 set JQuiz[7]=false, to fix checking answers for JQuiz Hybrid questions when in ShortAnswer mode 2007-03-04 01:18:07 +00:00
skodak 6317484ca7 MDL-8733 fixed approving logic when editing; fixed approve icon 2007-03-03 12:17:35 +00:00
skodak bd90f02488 sesskey added to logout.php MDL-8727 ; backported from HEAD 2007-03-02 17:15:53 +00:00
moodler 3ce0e8274f fix for MDL-8491, comments not saved in backups for essay questions 2007-03-02 04:48:21 +00:00
mjollnir_ bd2cf8f046 fixing bug MDL-8651: import course data should clean up after itself 2007-03-02 01:42:25 +00:00
defacer 2dd1350d64 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:01:13 +00:00
defacer 55a30b97ad Fix for MDL-4701: Event URLs now include anchor so that the event is immediately visible. 2007-02-27 14:25:17 +00:00
defacer e2ea245646 Bugfix: skodak's fix for MDL-5991 is needed here as well. 2007-02-27 13:55:29 +00:00
defacer 9b2fb1535b Changing email addresses that caught my eye in the comments. 2007-02-27 13:44:17 +00:00
defacer 8960cc3780 Not needing this anymore, we now have Moodle Docs. 2007-02-27 13:38:06 +00:00
moodler 541411b819 fixing typo 2007-02-27 04:38:54 +00:00
moodler 0c9a031f46 Automatic installer.php lang files by installer_builder (20070226) 2007-02-26 03:35:58 +00:00
defacer c109bb608a Fix for MDL-4940: Social Activities block disappears when editing course settings. 2007-02-24 23:07:32 +00:00
moodler cc9232e04f Automatic installer.php lang files by installer_builder (20070224) 2007-02-24 03:34:27 +00:00
thepurpleblob 5914b10e9c MDL-8602
Don't count modules where course=0 (ie, they must exist in real courses)
2007-02-21 14:58:52 +00:00
stronk7 830f83030c Changing iso-8859-1 encoding of excel files to windows-1252. It adds support for
some more (a few) characters. MDL-7993
2007-02-19 23:19:04 +00:00
stronk7 9c08fcb1a3 Backporting excellib with support to $CFG->excelisofiles to 16_STABLE.
MDL-7993. http://moodle.org/mod/forum/discuss.php?d=53302
2007-02-19 22:29:49 +00:00
ethem d421c0df1a Removed unnecesary code. 2007-02-19 11:57:49 +00:00
tjhunt e4f0ab116b MDL-8145 - Add more options to the add random questions dropdown. 2007-02-19 04:23:58 +00:00
moodler ead0918c36 Automatic installer.php lang files by installer_builder (20070219) 2007-02-19 03:30:54 +00:00
koenr 73ba657df4 MDL-8400 Changed currency of peru to Nuevo Sol 2007-02-17 23:37:26 +00:00
tjhunt 7d11d206b0 MDL-8154 - Typo in course search code. Fix thanks to Anthony Borrow. 2007-02-17 17:16:44 +00:00
moodler b19040a294 Automatic installer.php lang files by installer_builder (20070216) 2007-02-16 03:35:41 +00:00
moodler 48026c58cb Automatic installer.php lang files by installer_builder (20070214) 2007-02-14 03:47:19 +00:00
stronk7 6172a24c6e Some minor js problems. MDL-7811 and MDL-6481 2007-02-13 23:35:15 +00:00
moodler b5a1d81585 Automatic installer.php lang files by installer_builder (20070213) 2007-02-13 03:48:43 +00:00
moodler ee2c3b4de9 Automatic installer.php lang files by installer_builder (20070212) 2007-02-12 03:48:54 +00:00
vyshane 62154f84d7 Fix for MDL-8404.
Admin couldn't edit posts for each user one discussion forums.
2007-02-09 07:32:21 +00:00
stronk7 ad8c93de3e Delete backup records on course delete. MDL-8314 2007-02-09 00:09:05 +00:00
moodler 88cd5d6f9f Automatic installer.php lang files by installer_builder (20070207) 2007-02-07 03:32:02 +00:00
gbateson f733b58e83 allow empty JQuiz questions (which have at least one answer) 2007-02-03 01:11:39 +00:00
gbateson 3f4df7071b omit empty answers from JQuiz import 2007-02-03 00:35:31 +00:00
moodler fc35fab7ec Automatic installer.php lang files by installer_builder (20070202) 2007-02-02 03:44:42 +00:00
moodler 66be99b9b6 Automatic installer.php lang files by installer_builder (20070201) 2007-02-01 03:29:00 +00:00
tjhunt c19838ded3 Fix type on close tag. 2007-01-29 16:22:24 +00:00
skodak f5e90caea6 MDL-6128 special chars and messaging system; backported from HEAD 2007-01-28 21:47:21 +00:00
gbateson 8bc93dfa68 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:11:06 +00:00
moodler 9ede45bcc1 Automatic installer.php lang files by installer_builder (20070127) 2007-01-27 03:18:08 +00:00
moodler 8f716e31b3 Fixed site identifier 2007-01-23 05:01:17 +00:00
moodler 1c0d156bd4 Automatic installer.php lang files by installer_builder (20070123) 2007-01-23 03:23:05 +00:00
moodler 8b1f05f897 Automatic installer.php lang files by installer_builder (20070119) 2007-01-19 03:18:58 +00:00
bobopinna 348355c4b8 Fixed an error in $score initialization 2007-01-18 20:32:33 +00:00
skodak 753f1af690 do not send passowrd hashes to other sites SC#353 2007-01-17 20:08:10 +00:00
skodak 53ab66c884 force login in course calendar SC#349; backported from HEAD 2007-01-17 19:56:15 +00:00
moodler aaba34cc52 Bumped to post-1.6.4 2007-01-17 04:28:57 +00:00
moodler 326a83e109 Bumped to 1.6.4 2007-01-17 04:13:23 +00:00
moodler 182e92853e Automatic installer.php lang files by installer_builder (20070117) 2007-01-17 03:17:44 +00:00
mchurch dcd74d318f Fixing bug where quizzes from 1.4 will lose their answers when upgraded to later versions.
Fixes MDL-8207.
2007-01-16 21:33:11 +00:00
thepurpleblob 19874f6151 MDL-6769 Backported to 1.6 as requested. Shuffleanswers default as set in $CFG 2007-01-16 10:49:10 +00:00
moodler b5bbd35f96 Automatic installer.php lang files by installer_builder (20070116) 2007-01-16 03:15:52 +00:00
moodler c2dd7cadf8 Automatic installer.php lang files by installer_builder (20070113) 2007-01-13 10:19:45 +00:00
moodler 801ec7da79 Automatic installer.php lang files by installer_builder (20070113) 2007-01-12 17:43:29 +00:00
moodler 8ffb888712 Automatic installer.php lang files by installer_builder (20070112) 2007-01-12 03:16:31 +00:00
skodak 7a16844405 MDL-7990 Undefined variable: my_course - already fixed in 1.7 2007-01-08 21:53:31 +00:00
moodler 11e8c61f48 Automatic installer.php lang files by installer_builder (20070108) 2007-01-08 03:19:44 +00:00
skodak 38d5b701af revised adobe XSS protection SC#346 - backported from HEAD 2007-01-06 15:25:52 +00:00
moodler 9201c4146f Automatic installer.php lang files by installer_builder (20070105) 2007-01-05 03:28:18 +00:00
gbateson b15b35f6e6 fix import of Hot Potatoes quizzes using two-byte characters 2007-01-04 11:59:05 +00:00
skodak 5cdfc06bd3 Adobe Acrobat JavaScript Execution Bug SC#346; backported from HEAD 2007-01-04 00:11:09 +00:00
moodler 653d21470d Automatic installer.php lang files by installer_builder (20070103) 2007-01-03 03:20:19 +00:00
moodler 53be4b873f Automatic installer.php lang files by installer_builder (20070102) 2007-01-02 03:14:37 +00:00
moodler 18425af78f Automatic installer.php lang files by installer_builder (20061231) 2006-12-31 03:18:04 +00:00
skodak 795a0d8c34 MDL-7829 zipping with binary zip broken under windows when moodledata on different disk; backported from HEAD 2006-12-29 22:56:09 +00:00
skodak c545000a26 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:19:59 +00:00
skodak 0b5657c765 MDL-7404 updated currencies in 1.6.x - backport from HEAD 2006-12-29 19:20:29 +00:00
moodler ec354d2a91 Automatic installer.php lang files by installer_builder (20061229) 2006-12-29 03:09:55 +00:00
moodler ea7dee0d8a Automatic installer.php lang files by installer_builder (20061228) 2006-12-28 03:12:11 +00:00
moodler 19fc43f5eb Automatic installer.php lang files by installer_builder (20061226) 2006-12-26 03:14:13 +00:00
tjhunt d985ae5bdd MDL-7975 - Make import and export of truefalse questions more reliable. 2006-12-18 18:06:08 +00:00
tjhunt ad4dd3d4b8 MDL-7972 - improve GIFT import export for truefalse questions.
Also clean up whitespace in question/format/gift/format.php
2006-12-18 16:30:13 +00:00
moodler 0e7b1d7ac7 Automatic installer.php lang files by installer_builder (20061218) 2006-12-18 03:41:40 +00:00
moodler 9d3ea5340d Automatic installer.php lang files by installer_builder (20061215) 2006-12-15 03:17:10 +00:00
mits 513a01bfaf Fixed a missing closing brace }. 2006-12-14 20:18:56 +00:00
skodak 4ee3d4ac06 SC#341 fixed initilaization of navtail variable; backported from HEAD 2006-12-14 08:15:55 +00:00
moodler 696f45ea73 fix for MDL-7696, adding addslash for message 2006-12-12 02:48:16 +00:00
tjhunt 3866b318aa MDL-7896 - error from random question type in adaptive mode. 2006-12-11 23:33:15 +00:00
tjhunt da4c604c9d MDL-7886 - typo in overview report javascript. 2006-12-11 14:03:04 +00:00
skodak 348375da21 MDL-6668 Database mod search error on Postgres; patch by Lorenzo Nicora; backported from HEAD 2006-12-10 19:29:04 +00:00
skodak 337b664176 MDL-6613 Apostrophe in locked field prevents user updating profile - patch by Iñaki Arenaza; backported from HEAD 2006-12-10 17:44:56 +00:00
moodler 297b1bd905 Automatic installer.php lang files by installer_builder (20061210) 2006-12-10 03:04:10 +00:00
moodler ff1f958c13 Automatic installer.php lang files by installer_builder (20061209) 2006-12-09 03:12:43 +00:00
gbateson 3bdb864d50 abandoned attempts are now included in all reports. Added new help file regarding columns in "Click Trail Report" table 2006-12-08 04:16:59 +00:00
moodler 192f479e2b Automatic installer.php lang files by installer_builder (20061208) 2006-12-08 03:03:30 +00:00
gbateson 24644d6a56 fix undefined property "cr_timefinish", when viewing clickreport 2006-12-08 02:38:49 +00:00
ethem 231836a596 Don't show authorize.net login info at config page due to security precautions; Backported from MOODLE_17_STABLE. 2006-12-06 09:51:18 +00:00
mark-nielsen f9fbfb4659 Changed the fix to match what is in HEAD 2006-12-06 01:45:31 +00:00
mark-nielsen 9b00e4cf72 Bug fix: student response was not displaying for numerical questions, this bug does not exist in 1.7 2006-12-06 01:35:11 +00:00
tjhunt 0bf87d3181 MDL-7804 - Essay questions do not backup properly. 2006-12-05 18:46:45 +00:00
tjhunt 5b77a01ea4 Add $level parameters to each backup method. 2006-12-05 18:13:56 +00:00
moodler f0a7c95b24 Automatic installer.php lang files by installer_builder (20061205) 2006-12-05 03:19:49 +00:00
tjhunt adec76796a Typo in help. Thanks to Ken Wilson. 2006-12-04 16:08:04 +00:00
moodler d8b440ec76 Latest timezones from 1.8 2006-12-04 07:02:29 +00:00
moodler 19ff614093 Automatic installer.php lang files by installer_builder (20061204) 2006-12-04 03:12:15 +00:00
skodak 917a1974a3 MDL-7756 Recent Activity block gives 'Fatal error' when displayed on 'Sticky blocks' admin page; backported MDL-5931 from MOODLE_17_STABLE 2006-12-03 21:29:04 +00:00
skodak 2c54796fcb MDL-7783 Non-internal authentication change password URL doesn't work - patch by Iñaki Arenaza; backported from HEAD 2006-12-03 20:09:26 +00:00
skodak fab42b82f3 MDL-7757 URL check is too restrictive, allow port; backported from HEAD 2006-12-03 10:26:51 +00:00
skodak 6886a6fc5b MDL-7234 Smilies don't load in HTML editor for some languages; backported from HEAD 2006-12-01 09:55:13 +00:00
skodak 240e3cde63 Forgotten password page does not check secret MDL-7755; backported from HEAD 2006-12-01 09:18:23 +00:00
thepurpleblob d6751efc2b Fixed typo and notice 2006-11-28 09:36:28 +00:00
moodler f09a285a6a Automatic installer.php lang files by installer_builder (20061128) 2006-11-28 03:14:28 +00:00
moodler 5480a9bee0 Automatic installer.php lang files by installer_builder (20061127) 2006-11-27 03:12:41 +00:00
skodak 3dd1cc23b6 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:03:15 +00:00
skodak edf174b46a Double quotes breaking short answers in a multianswer/cloze question MDL-6676; backported from HEAD 2006-11-26 21:59:23 +00:00
skodak 15d0d20614 incorrect table width in Exercise MDL-7690; backported from HEAD 2006-11-26 21:38:57 +00:00
moodler 33a50fa858 Automatic installer.php lang files by installer_builder (20061125) 2006-11-25 03:17:50 +00:00
moodler e9bbfc15fc Automatic installer.php lang files by installer_builder (20061123) 2006-11-23 03:09:22 +00:00
urs_hunkler 066f42726a '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:35:23 +00:00
urs_hunkler e2a93751ff '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:34:51 +00:00
moodler b06d0196b4 Automatic installer.php lang files by installer_builder (20061121) 2006-11-21 03:16:31 +00:00
thepurpleblob 54ccc96b58 Various improvements to Examview import.
Fixes MDL-7087 and MDL-7349. Fixes Examview part in MDL-7184
2006-11-20 12:57:04 +00:00
ethem ef10728a74 Make Zend Studio happy :)
Code Analyzer Output:

Variable $errno was used before it was defined (line 221)
Variable $errstr was used before it was defined (line 221)

Category: Coding Style

A local variable is used before it is defined.
Even though PHP initializes variables with empty values on the first use,
it is considered a good practice to explicitly initialize variables
to make code more readable and avoid unnecessary bugs.
2006-11-20 08:20:30 +00:00
moodler 0960421191 Automatic installer.php lang files by installer_builder (20061119) 2006-11-19 03:10:47 +00:00
gbateson 7cdd2a596f fix sorting 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:52:14 +00:00
moodler a2f89145fd Automatic installer.php lang files by installer_builder (20061118) 2006-11-18 03:11:30 +00:00
ethem d810bd41cb Renamed some form fields. 2006-11-17 08:10:08 +00:00
moodler f6f75237a9 Automatic installer.php lang files by installer_builder (20061117) 2006-11-17 03:09:57 +00:00
ethem 5402e5dec3 choosemethod is too long for heading, added <br /> 2006-11-16 14:13:07 +00:00
tjhunt 14a62bfcd5 MDL-7428 - Quiz regrade removes student answers from essay questions that have been graded. 2006-11-15 17:32:32 +00:00
tjhunt 3a4cd9d998 MDL-7567 Numerical questions occasionally mix up the order of their answers 2006-11-15 16:55:40 +00:00
tjhunt 32fd8433d9 Remove obsolete code. 2006-11-15 16:47:58 +00:00
tjhunt f9cd1321ac 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. 2006-11-15 12:33:14 +00:00
moodler 2718918af5 Automatic installer.php lang files by installer_builder (20061115) 2006-11-15 03:14:30 +00:00
tjhunt 5c578b2bc2 MDL-6380 - added required include to make blocks work on the quiz pages. Backported from HEAD. See also MDL-7420. 2006-11-15 00:30:30 +00:00
moodler 2357b57391 Initial commit of gu_utf8 installer file 2006-11-14 19:56:25 +00:00
moodler bbf1f5d397 file installer.php was added on branch MOODLE_16_STABLE on 2006-11-14 19:56:25 +0000 2006-11-14 19:52:55 +00:00
ethem 8ef0bbf6c3 * Lessen the course list.
* Fixed pagination problem for orders when selected a course.
2006-11-13 14:25:53 +00:00
ikawhero da70138cfa Replacing with working image 2006-11-13 06:31:12 +00:00
ethem 84f7bcc8ee Get course before require_login(); 2006-11-12 13:17:46 +00:00
moodler 362c2fd638 Automatic installer.php lang files by installer_builder (20061112) 2006-11-12 03:09:58 +00:00
moodler 440d212f5c Automatic installer.php lang files by installer_builder (20061111) 2006-11-11 03:14:52 +00:00
moodler c7c6c2ea0b Automatic installer.php lang files by installer_builder (20061110) 2006-11-10 09:46:29 +00:00
moodler bc63c4bac3 field data should be backed up/restored regardless of whether user data is selected 2006-11-10 04:20:57 +00:00
moodler 89edf6b390 Automatic installer.php lang files by installer_builder (20061110) 2006-11-10 03:15:56 +00:00
moodler 5d7a6597c1 Automatic installer.php lang files by installer_builder (20061107) 2006-11-07 03:09:25 +00:00
skodak b13cfe12a6 prevent duplicate content in search engines MDL-7299; backported from MOODLE_17_STABLE 2006-11-06 21:50:49 +00:00
skodak a4495be67a better param handling SC#331; backported from MOODLE_17_STABLE 2006-11-06 20:36:16 +00:00
stronk7 0f7cac279c And, finally, IE is able to display IMS packages properly! B-)
One of the worst to solve bugs in my life! MDL-6417

Backported from HEAD
2006-11-06 17:23:54 +00:00
skodak eff26434e0 MDL-7176 fixed comment; backported from MOODLE_17_STABLE 2006-11-05 18:28:54 +00:00
moodler 74fe60674c Automatic installer.php lang files by installer_builder (20061105) 2006-11-05 03:14:26 +00:00
stronk7 e8e05625ec Now GD is checked before displaying course overview graphs. MDL-7204
Backported from HEAD
2006-11-04 23:35:50 +00:00
wildgirl 1040d76e82 MDL-6474 fix 2006-11-04 21:57:58 +00:00
wildgirl 4531718527 file langswitchstorage.html was added on branch MOODLE_16_STABLE on 2006-11-04 21:57:58 +0000 2006-11-04 21:56:42 +00:00
ethem d56eaba132 Show site name at top when selecting courses. 2006-11-03 12:45:12 +00:00
urs_hunkler a8c20a1629 'CSS update, mainly for MDL-7330' 2006-11-03 07:42:39 +00:00
moodler 12ef3b787b Automatic installer.php lang files by installer_builder (20061103) 2006-11-03 03:03:45 +00:00
watcanz 4aeab730e9 Updated for 1.6 2006-11-02 18:10:14 +00:00
bobopinna 18a742f9c6 Fixed a storic problem with & during package import
NOW Moodle full support prerequisites
2006-11-02 16:15:42 +00:00
moodler 822d3bfdc4 fix for MDL-7139 print_paging_bar at the bottom of page 2006-11-02 05:52:48 +00:00
moodler b620f6843b fix for MDL-7140, duplicate course name in header 2006-11-02 03:19:37 +00:00
ethem 6351bf91c9 Make authorize.net config page secure.
See: http://moodle.org/mod/forum/discuss.php?d=56728
Backported from 17stable.
2006-11-01 13:06:37 +00:00
ethem fffe36691f Make authorize.net config page secure.
See: http://moodle.org/mod/forum/discuss.php?d=56728
Backported from 17stable.
2006-11-01 12:55:24 +00:00
moodler 8327b31057 Merged fix from 1.7 MDL-7211 2006-11-01 06:59:26 +00:00
tjhunt 3080f36495 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. Backported from MOODLE_17_STABLE. 2006-10-31 12:12:11 +00:00
tjhunt 4bb30981a0 Make the close_window function better. Backported from MOODLE_17_STABLE. 2006-10-31 11:58:04 +00:00
bobopinna 423ffdeda2 Fixed a typo 2006-10-31 11:38:58 +00:00
tjhunt 3f12881e16 Fix junk being output before print_header, which happened sometimes. Backported from MOODLE_17_STABLE. 2006-10-31 10:48:13 +00:00
tjhunt 4ca8d4783b Add return option to notify(). Backported from MOODLE_17_STABLE. 2006-10-31 10:48:01 +00:00
moodler fee8ca9ee9 Argh, no-one bumped it to post-1.6.3 2006-10-31 05:25:55 +00:00
martinlanghoff e22ebd9267 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:05:35 +00:00
thepurpleblob 81b65d5a10 Whoops - left some debugging stuff in place. 2006-10-30 16:19:32 +00:00
thepurpleblob 272871028e Removed loads of tabs and fixed a notice. 2006-10-30 16:13:27 +00:00
ethem 48e8c9562e Sorry, this string is not necesary for 1.6. 2006-10-30 13:28:44 +00:00
ethem 5f118ae0dd New string: All Pending Orders 2006-10-30 11:07:39 +00:00
gbateson 2456a9fbf6 corrected the settiing of fixed flag in JMatch quizzes 2006-10-30 08:52:40 +00:00
ethem 5dc9e87812 Get only courses made transactions. This lessens the course list. 2006-10-30 08:17:15 +00:00
moodler 2143ce3083 fix for MDL-6895, gradebook group view missing optional_param, thanks for the fix 2006-10-30 03:59:26 +00:00
moodler 94a7364394 Automatic installer.php lang files by installer_builder (20061030) 2006-10-30 03:05:47 +00:00
moodler dc1b9006e5 Automatic installer.php lang files by installer_builder (20061028) 2006-10-28 03:10:42 +00:00
urs_hunkler e6c83418a4 'added min-width: 0; and overflow: hidden; to clearfix to make clearing work in IE7' 2006-10-27 13:27:52 +00:00
gbateson 7b6c589a50 corrected the detection and display of fixed JMatch items (jmt files) 2006-10-27 00:41:28 +00:00
ethem 745c14145b get_courses() is only getting visible courses. This is a problem when an user wants to view old payments.
Backported from HEAD.
2006-10-26 09:09:26 +00:00
moodler b86e99c98d Automatic installer.php lang files by installer_builder (20061026) 2006-10-26 03:20:31 +00:00
skodak 7bead1ecf8 better cleaning of rss feeds SC#328; backported from MOODLE_17_STABLE 2006-10-25 21:29:32 +00:00
skodak 14400b8274 Query to get a list of tags in block_blog_tags.php broken with PostgreSQL MDL-6259; already fixed in MOODLE_17_STABLE 2006-10-25 19:32:23 +00:00
skodak 8f8ac09b6d select_color.php popup should specify charset MDL-7193; patch by Hiroto Kagotani; backported from MOODLE_17_STABLE 2006-10-24 21:40:28 +00:00
skodak 1e1a04a695 Lang file for auth specifies incorrect file path in lang/en_utf8/auth.php MDL-7205 revisited - new patch by Martin Langhoff; backported from MOODLE_17_STABLE 2006-10-24 21:31:02 +00:00
skodak 55e677148c Lang file for auth specifies incorrect file path in lang/en_utf8/auth.php MDL-7205 - found by Inaki Arenaza; backported from MOODLE_17_STABLE 2006-10-24 20:49:05 +00:00
skodak 2fc775008e Assignment Reports incomplete MDL-6301 ; backported from MOODLE_17_STABLE 2006-10-23 21:04:09 +00:00
skodak b204171348 Excel export returns a zero bytes file when system temp not writable MDL-7176; backported from MOODLE_17_STABLE 2006-10-23 19:28:33 +00:00
moodler 0ee781c85a Automatic installer.php lang files by installer_builder (20061023) 2006-10-23 03:01:20 +00:00
moodler 9af0972fd1 Automatic installer.php lang files by installer_builder (20061022) 2006-10-22 03:08:46 +00:00
moodler 447f9047cd Automatic installer.php lang files by installer_builder (20061021) 2006-10-21 03:01:25 +00:00
moodler d61edeec07 New automatic installer lang file added (from HEAD) 2006-10-20 06:56:23 +00:00
moodler 5987855a0a file installer.php was added on branch MOODLE_16_STABLE on 2006-10-20 06:56:23 +0000 2006-10-20 06:52:11 +00:00
moodler 86668a76ec Automatic installer.php lang files by installer_builder (20061020) 2006-10-20 03:03:12 +00:00
thepurpleblob 855165f531 Focus is now loaded in Name edit box. 2006-10-19 13:03:31 +00:00
moodler ee766268a3 fix for MDL-7095, missing string 2006-10-19 06:52:30 +00:00
moodler 0a0c56807c Automatic installer.php lang files by installer_builder (20061019) 2006-10-19 03:01:19 +00:00
skodak 3c4d4cd8e7 Delete user fails if apostrophe in email address MDL-4762 ; found and solution provided by Inaki Arenaza - backported from MOODLE_17_STABLE 2006-10-18 21:47:40 +00:00
skodak 3d5690d8b0 improved validation when deleting comments from glossary SC#325 ; backported from MOODLE_17_STABLE 2006-10-18 20:22:47 +00:00
skodak 2aaed68eee changed email obfuscation character to * MDL-6935 ; backported from MOODLE_17_STABLE 2006-10-18 19:42:43 +00:00
thepurpleblob ca477ee66a Put the cursor in the edit box for a label rather than do nothing. 2006-10-18 13:01:39 +00:00
urs_hunkler d535f143ac 'added Bitstream Vera Serif for better display in Linux browsers. It looks better than Georgia on Windows ;-)' 2006-10-18 06:29:41 +00:00
moodler eec943ef26 Automatic installer.php lang files by installer_builder (20061018) 2006-10-18 03:02:19 +00:00
tjhunt 24fcdd14c0 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. 2006-10-17 23:19:15 +00:00
tjhunt dd08b0d166 MDL-6848 - Display problem with < > characters in shortanswer when outputting the correct answer. 2006-10-17 22:16:47 +00:00
tjhunt 3d365baa65 MDL-6386 - stripslashes missing in multianswer qustions. Thank to Joseph Rezeau. 2006-10-17 22:00:51 +00:00
tjhunt 70a892eb51 MDL-7054 - Prevent creation of question categories with blank names. 2006-10-17 21:38:51 +00:00
skodak 6ec0b677e7 Automatic deletion of users when deleteunconfirmed is setted to 'never' MDL-6726 ; backported from MOODLE_17_STABLE; patch submitted by Jesús Torres 2006-10-17 20:50:04 +00:00
thepurpleblob 224a2b4c05 fix for bug MDL-7040. Focus not set when form loaded. 2006-10-17 12:26:00 +00:00
vyshane ac9bdaadc1 Fixes for MDL-6363 2006-10-17 07:16:50 +00:00
skodak 98b4d4d6a8 RSS update and caching broken for some feeds MDL-7045; backported from MOODLE_17_STABLE 2006-10-17 07:11:28 +00:00
moodler 914a7bcad3 Automatic installer.php lang files by installer_builder (20061017) 2006-10-17 03:03:39 +00:00
ethem 75ad2e9487 Fix for sending welcome messages to students.
Iterate arrays by reset and next, access by array[index] cannot be accepted due to the fact that get_records_sql() returns primary key as index.
Backported from HEAD.
2006-10-16 10:08:36 +00:00
tjhunt 6117074c05 MDL-6984 - Problem with Blackboard 5 import in PHP5. Fix based on a suggestion from Arthur Manning. 2006-10-16 09:59:36 +00:00
skodak 02d62036db MDL-6444 Typo in Course/Report/Participation/index.php, patch by Stephen Bourget; backported from MOODLE_17_STABLE 2006-10-16 09:09:01 +00:00
moodler bb19f33228 Automatic installer.php lang files by installer_builder (20061016) 2006-10-16 03:04:09 +00:00
danmarsden 6b06e02c33 Fix for MDL-6550 - patch from Graeme Byrne thanks! :-)
+ a bit of a tidy - get rid of all those tabs! :-)
2006-10-15 23:56:36 +00:00
moodler 6a66541391 Automatic installer.php lang files by installer_builder (20061015) 2006-10-15 03:00:48 +00:00
moodler 3f62782cd9 Automatic installer.php lang files by installer_builder (20061014) 2006-10-14 03:02:24 +00:00
gustav_delius c848b76045 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 22:28:42 +00:00
moodler d75825e75b Automatic installer.php lang files by installer_builder (20061013) 2006-10-13 03:04:00 +00:00
gbateson 64d92486a5 removed a debug line which showed up in Rottmeier DropDown quizzes 2006-10-12 21:46:03 +00:00
gbateson c049c12abf add "Group Mode" and "Visible to students" as per other standard modules 2006-10-12 07:56:29 +00:00
gbateson fef4937cb1 fixed the reporting of results from Rottmeier DropDown 2.4 quizzes 2006-10-12 07:50:23 +00:00
moodler 375a0ea8de Automatic installer.php lang files by installer_builder (20061012) 2006-10-12 03:02:56 +00:00
gbateson d4f098178a removed "Selecting courses" section and modfied "Selecting users" section 2006-10-11 01:46:44 +00:00
gbateson 268ab771b6 use "noattemptstoshow" instead of "noattempts" 2006-10-11 01:41:26 +00:00
gbateson cb94fd11d5 allow selection of groups in reports 2006-10-11 01:29:51 +00:00
gbateson 8ec2d86edf removed "Select course" drop-down menu, because it is unusable, and separated enrolled and unenrolled students in "Select users" drop-down list 2006-10-10 23:54:14 +00:00
moodler ce422c25d6 Bump for release 2006-10-10 06:05:19 +00:00
vyshane e4af9c32ff Fix for MDL-6537. Added checkbox to allow deletion of forum subscriptions when resetting a course. Added code for forum subscriptions deletion. 2006-10-10 05:15:10 +00:00
vyshane 94d52f8f02 Added string for forum reset fix (MDL-6537) 2006-10-10 05:12:30 +00:00
stronk7 46b5cf7cb7 Raising MSSQL min req. to 2005 (9.0) 2006-10-09 16:17:33 +00:00
skodak 856683e596 fixed data/index.php when no databases available, initialized array in get_all_instances_in_course() from datalib.php 2006-10-08 19:44:33 +00:00
skodak d4d2a5bc3e problem with incorrect redirect url - wwwroot without the trailning slash in not standard compliant MDL-6193 ; backported from HEAD 2006-10-08 19:03:52 +00:00
skodak fbda575645 Insert a Chinese charachter string to label resource result error MDL-6757 ; backported from HEAD 2006-10-08 10:07:54 +00:00
gustav_delius 572badbdce Fixed bug that prevented guest access to courses that are not enrollable 2006-10-08 09:53:12 +00:00
skodak bcde80f2b3 add note to admin settings to check max_allowed_packet when enabling db sessions in MySQL - MDL-6866 , fixed quotes :-( backported from HEAD 2006-10-08 09:21:32 +00:00
skodak 6b63e3d905 add note to admin settings to check max_allowed_packet when enabling db sessions in MySQL - MDL-6866 ; backported from HEAD 2006-10-08 09:18:22 +00:00
skodak 39cbc2bf7b Grades computed incorrectly if assignment name appears more than twice in a course MDL-6876 , patch submitted by Gary Anderson; backported from HEAD 2006-10-08 09:06:21 +00:00
skodak 33f0ea4178 fixed encoding header() in messaging frames MDL-6128 - 1.6, special chars and messaging system; backported from HEAD 2006-10-08 08:31:12 +00:00
skodak 992d6a3a44 Resource frameset error in IE6 MDL-6842, patch submitted by Chris Fryer; backported from HEAD 2006-10-08 08:21:54 +00:00
skodak ea0d8cea76 Scalable Vector Graphics (SVG) files in Moodle are not correctly displayed in many Browsers MDL-6878, patch submitted by Geoffrey Rowland, thanks! backported from HEAD 2006-10-08 08:14:36 +00:00
moodler 1b6cc50342 Automatic installer.php lang files by installer_builder (20061008) 2006-10-08 02:54:24 +00:00
gustav_delius 3d2e01f6c8 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:07:36 +00:00
gustav_delius 4ae8c9aca1 Don't use addslashes on data coming from form and don't use stripslashes on data coming from database 2006-10-07 16:34:20 +00:00
tjhunt e1088a97ec Hopefully improve performance on site with lots of question categories. 2006-10-06 16:45:16 +00:00
stronk7 80006e6017 Typo recently introduced. MDL-6336 2006-10-06 15:00:20 +00:00
toyomoyo b9f4f2227c fix for MDL-6336 2006-10-06 08:29:29 +00:00
gbateson 509f5d23e0 change default setting for reportusers to "allusers" (was "all") 2006-10-06 03:41:03 +00:00
gbateson ffd7d3d7c2 replace indent tabs with 4 spaces 2006-10-06 03:19:33 +00:00
moodler eb0208d591 Automatic installer.php lang files by installer_builder (20061006) 2006-10-06 02:58:31 +00:00
gustav_delius a32090a4c1 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:19:10 +00:00
gustav_delius 7b66125271 Incomplete user record (the one where the username is still 'changeme') should not be included in user listing. See bug 4570 2006-10-05 21:22:43 +00:00
tjhunt 98632cd3c8 MDL-6837 - move warning about pupup blockers into the lang file. 2006-10-05 15:53:18 +00:00
vyshane 0a60ef6e45 Fix for MDL-6819. Patch submitted by Nicolas Martignoni 2006-10-05 07:20:42 +00:00
gbateson 49ebbad5fa as per other mods, use "strip_slashes" and "format_string" when printing HotPot name to browser 2006-10-05 07:12:15 +00:00
gbateson e873787168 added names of unenrolled students to drop-down list of users names for which a report can be generated 2006-10-05 06:43:32 +00:00
gbateson fb4990ca39 In the "Selecting Users" section, "All users" was added and "All participants" was modified. 2006-10-05 06:21:26 +00:00
gbateson 7032c917e3 In the "Selecting users" section, "All Users" has been added and "All participants" has been modified. 2006-10-05 06:19:27 +00:00
gbateson a4a6aafe48 enabled display of attempts by students who are no longer enrolled in the course 2006-10-05 06:02:47 +00:00
vyshane 718647bcb1 Fixes for MDL-2583 2006-10-05 03:14:20 +00:00
stronk7 14a60a077b One missing global was preventig users becoming teacher of
the course being restored. MDL-6084
2006-10-04 17:33:48 +00:00
urs_hunkler 14e0fcb120 'MDL-6824, redundant declaration: .categorybox .category' 2006-10-04 15:41:39 +00:00
moodler 64422b601f Merged fixes from HEAD, bug MDL-6791 2006-10-04 12:59:05 +00:00
tjhunt 8419513e13 MDL-6297 shuffleanswers option not imported correctly for MC questions. Backported from HEAD. 2006-10-04 10:07:42 +00:00
moodler f990f10f77 Automatic installer.php lang files by installer_builder (20061004) 2006-10-04 02:58:37 +00:00
ethem 4ab16d477d Put back last commit. Some functions check $extra->id. 2006-10-03 19:35:57 +00:00
ethem 2e633ad500 If an error occures, id returns 0.
The user, who will be sent email, may be confused for $record->id=0.
2006-10-03 18:16:19 +00:00
gustav_delius 00ba27c582 The course upload size limit applies to students only, it should not be imposed for teacher uploads. 2006-10-03 18:13:47 +00:00
tjhunt 6ca5cf268b Reverting last change. I committed the wrong file. 2006-10-03 17:59:51 +00:00
tjhunt b9bdd0c7b6 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. 2006-10-03 17:56:51 +00:00
tjhunt 594c911aad MDL-6649 Only show the HTML editor for the first essay question on a page, since it is unreliable when there are lots. 2006-10-03 17:28:43 +00:00
ethem cfca034aed No need extra $order->status check. These functions expired() and settled() do it for us. 2006-10-03 09:00:20 +00:00
moodler 2c669a7383 Removed focus as too much trouble. MDL-6750 2006-10-03 07:30:23 +00:00
moodler ca72bce30c Automatic installer.php lang files by installer_builder (20061003) 2006-10-03 02:57:41 +00:00
moodler c8f1d1ca37 Added extra conditions to loops to prevent infinite loops
ref the same fix made for daily loops already:

   http://moodle.cvs.sourceforge.net/moodle/moodle/lib/statslib.php?r1=1.21.2.4&r2=1.21.2.5
2006-10-03 01:44:15 +00:00
moodler f18c648ae7 Patched login action on news forum 2006-10-03 01:17:37 +00:00
gbateson 2da3d6983b version number of final HotPot v1 (2005050900) was beyond version number of initial HotPot v2 (2004122000), added code to adjust $oldversion to trigger correct upgrade of tables for HotPot v1 2006-10-02 23:57:37 +00:00
skodak 2a02ff39c6 Student cannot see handed-in upload single assignment MDL-6770; backported from HEAD 2006-10-02 08:36:49 +00:00
moodler 0a69834d90 Automatic installer.php lang files by installer_builder (20061002) 2006-10-02 02:58:41 +00:00
gbateson a8fdaa5c38 corrected display of best grade on "index.php" when maximum grade for the HotPot is not 100 2006-10-02 00:30:32 +00:00
gbateson 1387c879d5 removed a leftover debug print "SELECT ... GROUP BY ..." 2006-10-01 23:59:51 +00:00
tjhunt dfa4dd740a Fix performance problem with lots of categories. http://moodle.org/mod/forum/discuss.php?d=54945#252145 2006-10-01 20:31:47 +00:00
gbateson 164c865fc7 calendar events are now added/deleted when hotpots are added/updated/deleted 2006-10-01 06:22:12 +00:00
gbateson 1dfae875f2 added "hotpotopens" and "hotpotcloses" for calendar events 2006-10-01 06:20:58 +00:00
gbateson ff5d1865c4 do not join attempts and details tables when select attempts details. This may speed up display of hotpot/index.php where there are many, many hotpots 2006-09-30 22:40:59 +00:00
julmis 29177c6a0d Fixing $tempfiledir path 2006-09-30 16:04:22 +00:00
skodak 4454213c7b fixed parameter cleanup SC#318 2006-09-29 20:53:09 +00:00
toyomoyo e340d9f14b fix for MDL-6182 2006-09-29 03:16:51 +00:00
stronk7 d36d45416f Added PHP 5.0.x restriction to Moodle 1.7. MDL-5653 2006-09-28 16:41:00 +00:00
gbateson 3fc2c3c266 added PARAM types when calling "required_param" and "optional_param" functions 2006-09-28 12:41:49 +00:00
vyshane 008537d5c3 Fixed unneeded notify output for bug MDL-6681. 2006-09-28 08:26:32 +00:00
moodler f65b8599b5 Much smaller tags :-) 2006-09-28 07:23:46 +00:00
martinlanghoff 80161aad61 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:16:01 +00:00
martinlanghoff dc77f7b55c 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:04:49 +00:00
martinlanghoff c83afe4ec2 Set student enrolment end date to course enrolment period for external
database enrolments.  (fix MDL-6272)
2006-09-28 00:15:54 +00:00
martinlanghoff 8aa18dddc8 Comments. 2006-09-28 00:12:42 +00:00
martinlanghoff d0f5c048e2 Allow Chinese/Japanese UTF-8 strings to be truncated at character
boundaries instead of word boundaries. (fix MDL-5378)
2006-09-28 00:10:15 +00:00
martinlanghoff 498ce7e832 Fix for breadcrumb problem (MDL-6271). 2006-09-28 00:07:51 +00:00
moodler f329c16428 Added EU to country list 2006-09-27 12:58:24 +00:00
moodler 3398e99d5d Merged fixes for MDL-6334 from HEAD 2006-09-27 08:32:36 +00:00
gbateson 158210e49f added functions for participation report: hotpot_get_view_actions + hotpot_get_post_actions 2006-09-26 12:21:38 +00:00
moodler 85fb025135 Automatic installer.php lang files by installer_builder (20060926) 2006-09-26 02:49:20 +00:00
vyshane 4fbf8bd7b3 Forums of type 'single' should not be splittable. Added check for this. 2006-09-25 05:08:38 +00:00
vyshane 1762e9204c Fix for MDL-6521 2006-09-25 04:55:49 +00:00
vyshane 5f57a74789 Merged fix for MDL-6363 2006-09-25 04:01:53 +00:00
vyshane f009e194ec Fix for MDL-6615. Patch by Luis Peralta. 2006-09-24 15:19:54 +00:00
urs_hunkler 9f686c8a69 'add height to sideblock commands div against collapsing' 2006-09-24 09:44:05 +00:00
mark-nielsen c630b0ba86 MDL-6628 bug fix 2006-09-24 06:03:18 +00:00
moodler 38c1666070 Automatic installer.php lang files by installer_builder (20060923) 2006-09-23 02:45:13 +00:00
urs_hunkler debad50603 'reduced the distance above the footer from 100px to 40px' 2006-09-22 15:17:12 +00:00
moodler a234a89cc8 Hive updates 2006-09-22 13:23:12 +00:00
moodler 8583655bf9 Allow personal dictionaries in spell checker using $CFG->aspellextradicts
Aspell files look like this:

=========================
personal_ws-1.1 en 4
moodle
moodler
moodlemoot
moodling
=========================
2006-09-22 04:37:35 +00:00
moodler 1796aa9fcc Automatic installer.php lang files by installer_builder (20060921) 2006-09-21 02:46:11 +00:00
skodak 7c1376125d fix for old email confirmation - spotted by Dirk Grunwald 2006-09-20 21:46:50 +00:00
skodak 1c66afe8f1 minor fix backport from HEAD 2006-09-20 18:33:24 +00:00
moodler 2989d4cc7c Automatic installer.php lang files by installer_builder (20060920) 2006-09-20 03:01:53 +00:00
tjhunt f0db2fe9c3 Fix JavaScript problem reported in this thread: http://moodle.org/mod/forum/discuss.php?d=54432 2006-09-19 21:47:44 +00:00
bobopinna 5679493192 Removed the scorm_string_wrap unused function 2006-09-19 09:45:19 +00:00
bobopinna d6bddd46c6 Fixed multiattempt grading system 2006-09-19 09:07:44 +00:00
moodler 7ac61104a3 FIx for message icons, changed style to avoid problems with MDL-6020 2006-09-19 04:52:56 +00:00
urs_hunkler 987e0d3be5 'MDL-6020 - CSS changes to align text beside images' 2006-09-18 11:49:51 +00:00
moodler 7980ea00c3 Automatic installer.php lang files by installer_builder (20060918) 2006-09-18 03:06:31 +00:00
gustav_delius 02cc013abf Removed a PHP notice 2006-09-17 17:33:42 +00:00
gustav_delius 01b91ac459 Fixed bug MDL-6341 which meant that studentview was not working in hidden courses. 2006-09-17 10:14:05 +00:00
martinlanghoff 4f70e2756a Fix bug 6342 - cannot move forum post to other forum when the subject includes an apostrophe
This is actually a merge of a similar fix from HEAD
2006-09-17 02:32:00 +00:00
martinlanghoff f6965dc685 datalib: Fixed erroneous documentation.
The function sql_fullname had the same documentation as the function sql_ilike, which was not correct.  Now updated to reflect what the function
actually does.


Author: Luke Hudson <luke@catalyst.net.nz>
2006-09-17 01:35:49 +00:00
skodak 86218462fc fixed recursive backing up of backup folder when resource diretory reference is course files root - MDL-6280 2006-09-16 18:14:15 +00:00
skodak 383df89595 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 2006-09-16 17:11:00 +00:00
moodler dc7dd83b88 Automatic installer.php lang files by installer_builder (20060916) 2006-09-16 02:52:24 +00:00
vyshane a901d8fd4c Changes to ensure the xhtml markup validates 2006-09-15 08:05:08 +00:00
thepurpleblob ea8e7f9936 Removed bunch of tabs and sorted out badly formatted comments
Provides fix for bug MDL-5893
2006-09-14 13:58:09 +00:00
moodler 0d2b4325ec Added fix from http://moodle.org/mod/forum/discuss.php?d=38860#178716 2006-09-14 05:45:32 +00:00
moodler b1d70beafa Bump version to 1.6.2+ 2006-09-14 05:17:55 +00:00
moodler 3827e2d359 Merged fix for MDL-6247 2006-09-14 05:16:02 +00:00
moodler 58d079df96 Remove obsolete themes link MDL-6518 2006-09-14 03:36:04 +00:00
vyshane b139f7ae4b Fix for bug MDL-6517. Patch by David Mudrak (thanks!). 2006-09-14 03:11:56 +00:00
gbateson 0e448ae3c0 removed unnecessary $db declaration 2006-09-14 00:24:31 +00:00
gbateson 79fc4a6726 copied code from "hotpot/db/postgres.php" to detect hotpot_attempts.details field 2006-09-13 23:27:21 +00:00
gbateson 0d3b042fec fix bug 6538, in which $db->MetaColumns was not defined in some PG sites 2006-09-13 21:25:58 +00:00
urs_hunkler 2864912fe0 some style updates 2006-09-13 17:11:00 +00:00
moodler 5b3a7e59a8 Fix for MDL-6508, bad version number in Hotpot 2006-09-13 15:08:55 +00:00
urs_hunkler 7b0d235253 Added CSS to correct the login form - See bug MDL-6028 2006-09-13 14:45:54 +00:00
gbateson 22c633e8b7 when updating, if the version number indicates this could be an early HotPot v2.1 (Moodle 1.6) then check this is not HotPot v2.0 (Moodle 1.5) with an overly advanced version number. Also, added backwards compatability back to Moodle 1.1.1 New release is HotPot v2.1.23, version is 2006082900 2006-09-13 08:26:16 +00:00
gbateson 664f80662e don't show &nbsp; in empty grades cells in Excel format 2006-09-13 08:19:26 +00:00
gbateson ac63de90c6 add get_coursemodule functions for Moodle <1.5.4 2006-09-13 08:17:50 +00:00
gbateson 5f4a37b5b2 limit worksheet length to 31 chars on Moodle 1.5: prevents fatal error lib/excel/workbook.php 2006-09-13 08:16:00 +00:00
moodler 666ebd7bcf Automatic installer.php lang files by installer_builder (20060913) 2006-09-13 02:53:55 +00:00
moodler 9b4f94bd92 Bumping to 1.6.2 for releasing 2006-09-12 16:05:51 +00:00
moodler a88c450679 Merged fix from HEAD 2006-09-12 14:28:04 +00:00
bobopinna 6a973240af added support to hyphen and tilde in CMIIdentifier 2006-09-12 08:46:23 +00:00
moodler 3e3c6eec08 Automatic installer.php lang files by installer_builder (20060912) 2006-09-12 02:48:41 +00:00
exe-cutor 8de4f2e23e Again added get_first_string ... 2006-09-11 09:05:35 +00:00
stronk7 9d3089562a 1.6 installer langs files added. 2006-09-11 08:28:49 +00:00
moodler 77ec0e627e Automatic installer.php lang files by installer_builder (20060911) 2006-09-11 08:12:16 +00:00
stronk7 abf39fb332 file installer.php was added on branch MOODLE_16_STABLE on 2006-09-11 08:28:54 +0000 2006-09-11 08:09:58 +00:00
skodak 2877856383 validate local redirection actions in jumpto.php SC#310; backported from HEAD 2006-09-11 07:13:03 +00:00
gbateson f03e81eb03 removed reportselector.html as it was unused and has been replaced by reportcontent.html and reportformat.html 2006-09-10 05:27:41 +00:00
gbateson 75e59b1a22 correct a small formatting error in "Show Legend" -> "No" explanation 2006-09-10 05:25:13 +00:00
mark-nielsen e2eb506371 MDL-5430 - branch table redirect problem 2006-09-09 17:25:21 +00:00
mark-nielsen 9f811896b8 Security fix for grading Essays. Mentioned in MDL-6477 2006-09-08 18:01:12 +00:00
skodak a12743a49b fixed typo - trailing backslash; backported from HEAD 2006-09-08 15:51:40 +00:00
thepurpleblob e8131aa214 Added Clifford Tham's changes - Thanks Clifford :-)
Also fixed some notices
2006-09-08 10:21:51 +00:00
skodak faafe84561 fixed serious breakage during upgrades caused by double redirects 2006-09-07 20:33:03 +00:00
skodak df8ac6d2e6 forced conversion to proper numeric type in _adodb_column_sql() SC#259; backported from HEAD 2006-09-07 10:21:43 +00:00
skodak c98d228b96 allow less verbose operation of forget_password.php SC#282, backported from HEAD 2006-09-07 05:50:05 +00:00
vyshane 9180b308f4 Added $CFG->pagepath so that editing questions will link to the relevant question types in moodle docs. Fix for bug MDL-5866. 2006-09-06 08:50:50 +00:00
skodak 586e08ac32 backported detection of potentially insecure dataroot location SC#295 2006-09-05 22:38:59 +00:00
skodak 13ad4e12e1 fix for bug MDL-5403 , you can now force redirect with 0 delay even when header already printed 2006-09-05 21:51:31 +00:00
moodler f83a24b87b Stripping tags from titles MDL-6431 2006-09-05 03:14:02 +00:00
moodler bf08108c94 Added $CFG->coursesperpage which changes default paging of category listing 2006-09-05 03:03:42 +00:00
gustav_delius f610ac5e18 Had to comment out the line that updates the timemodified field when a discussion is moved from one forum to another one because the timemodified field is used to sort the list of discussions and also to provide the "Last post" date. It should really be renamed to something like "timeoflastpost". 2006-09-04 22:00:26 +00:00
moodler bfd5c5d7f6 Change the format of the email signup link to make it work better on Hotmail 2006-09-04 02:25:35 +00:00
moodler 5decc6f064 DOn't process stats if it's blocked 2006-09-03 15:44:25 +00:00
moodler f598a45f2e Added a hidden $CFG->disablestatsprocessing variable to disable stats completely 2006-09-03 15:42:05 +00:00
gustav_delius eb9b7f1a3e 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:22:02 +00:00
gustav_delius 4508fdd282 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:39:54 +00:00
gustav_delius 6a2f9ca922 Remove undefined variable notice 2006-09-03 11:22:48 +00:00
moodler a565cb2f8e Automatic installer.php lang files by installer_builder (20060902) 2006-09-02 02:44:29 +00:00
gustav_delius bf9cdc2b90 Fix by Jesse Scott so that database sessions respect sessiontimeout setting. Closing bug 5912 2006-09-01 20:27:54 +00:00
ethem 19660487d0 + Don't show AVS message if not applicable.
+ Email message that translated instead of english if cc will be autoconfigured.
2006-09-01 14:39:52 +00:00
gbateson 5ab3937c6e correct the detection of HotPot 2.0 backups (from Moodle 1.5) 2006-09-01 03:58:09 +00:00
ethem 22fa4da34f New feature: Autoconfigure credit card types, if the merchant does not accept this type of credit card; Backported from HEAD. 2006-08-31 07:35:16 +00:00
ethem 0ee1574512 New feature: Autoconfigure credit card types, if the merchant does not accept this type of credit card; Backported from HEAD. 2006-08-31 07:29:44 +00:00
skodak b02b2f70d7 better input validation in files/index.php SC#307; backported from HEAD 2006-08-30 08:04:43 +00:00
gbateson 0679583490 convert relative URLs to absolute URLs in quiz questions and answers 2006-08-30 07:54:48 +00:00
moodler 5ba8b19939 Automatic installer.php lang files by installer_builder (20060830) 2006-08-30 02:46:44 +00:00
skodak 4d21686218 better handling of anchor name in docs index SC#306; backported from HEAD 2006-08-29 20:39:24 +00:00
ethem 79cd394c82 fixo 2006-08-29 08:11:04 +00:00
skodak 18e2de4313 show detailed log messages only when debug is not off SC#303; backported from HEAD 2006-08-28 21:34:39 +00:00
skodak 0eeec1a96f create safer .htaccess SC#302; backported from HEAD 2006-08-28 21:13:12 +00:00
mark-nielsen 4e2cbb28e5 MDL-6325 Bug Fix 2006-08-28 20:01:13 +00:00
gustav_delius 5a521aa30f Small correction in the documentation for the $CFG global 2006-08-28 08:59:57 +00:00
moodler 01b9db69e2 Automatic installer.php lang files by installer_builder (20060826) 2006-08-26 02:50:02 +00:00
mark-nielsen 91bfeb65ea MDL-6323 - Fixed - changed feedback to response 2006-08-25 22:51:24 +00:00
mark-nielsen 16ae471c30 Removed undefined index notices by using empty to make sure the index exists 2006-08-25 18:27:12 +00:00
danmarsden e22b34ec32 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:10:01 +00:00
tjhunt 7025366210 MDL-6338 - Short answer questions with ' in the answer don't work. Yet another unpleasant quiz bug caused by the current broken way we do things with addslashes. 2006-08-23 18:53:40 +00:00
stronk7 e133c32ff3 Adding one PHP close tag that has been missing (but working) since years! 2006-08-23 15:18:20 +00:00
stronk7 84e6ee9c38 Bump to 1.6.2 (no DB changes) 2006-08-23 15:04:05 +00:00
thepurpleblob 4c831b7078 bug MDL-5458
XML format now supports Essay questions
Improved the comments
2006-08-23 14:54:05 +00:00
skodak cd79115069 debug off level is now 5 instead of 7 to prevent E_WARNING on production sites SC#294 2006-08-22 22:19:54 +00:00
skodak cd1e684b2c fixed trailing whitespace in last commit :-( 2006-08-22 22:09:33 +00:00
skodak d67514acb8 Rewritten help.php by Tim Hunt with minor fixes - SC#292 2006-08-22 22:03:08 +00:00
tjhunt 0d4537c796 SC 299 2006-08-22 21:33:27 +00:00
skodak fdb76e639f fixed some notices in scheduled backup 2006-08-21 20:38:44 +00:00
stronk7 e59fded4ef Solved hh (horrible-hidden) bug in backup_scheduled code.
Credits go to Thirot Jean-Luc. http://moodle.org/mod/forum/discuss.php?d=52156
2006-08-21 19:06:38 +00:00
tjhunt 8529d9b6d8 Bug #6305 - Quiz settings form field order could be better - proper fix this time.
Sorry, I screwed up with the previous revision. This is the proper fix. Diff this with revision 1.61 to see what the change really is, and ignore 1.61.2.1.
2006-08-21 10:07:48 +00:00
tjhunt c23339e968 Bug #6305 - Quiz settings form field order could be better. 2006-08-20 20:10:15 +00:00
tjhunt 5fc3c306f4 Bug #6303 - True / False applies penalty factor wrongly. 2006-08-20 15:37:06 +00:00
moodler 207793f82f Automatic installer.php lang files by installer_builder (20060819) 2006-08-19 02:47:51 +00:00
tjhunt 2b64c31597 Bug #6293 - Cannot regrade a question when a teacher has added a comment with a ' 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:25 +00:00
tjhunt f7abe85cc0 Code cleanup. 2006-08-18 22:25:39 +00:00
tjhunt 5cd1517bc3 Fix some Eclipse code warnings. 2006-08-18 21:21:59 +00:00
ethem 7ecefcb090 Colorize refunds and show refunded total.
Red: Refunded/Pending Settlement
Green: Refunded/Settled
Black: Cancelled

Backported from HEAD(1.25-1.26)
2006-08-18 16:11:30 +00:00
ethem 7a23b4d63c Display capture/void/delete instead of 'Yes'. 2006-08-18 14:48:41 +00:00
tjhunt 00c5890a15 Bug #3481 - wildcard problem in cloze question. Thanks to Joseph Rezeau. 2006-08-18 10:28:15 +00:00
tjhunt 45cd0cfde8 Changed include to use dirroot not wwwroot. 2006-08-18 08:05:45 +00:00
skodak 0a861d4506 Bug #6276 - Multiple questions not showing up from scale page 2006-08-17 21:33:26 +00:00
tjhunt dcd2895639 Bug #6277 - Missed function renaming in question/format/multianswer. 2006-08-17 17:37:54 +00:00
ethem b88378acb9 Allow teachers to cancel refunded transactions if admin set up $CFG->an_teachermanagepay.
enrol_authorize.courseid must be passed to authorize_get_status_action function; Joined 2 tables to get courseid field.
2006-08-17 15:30:20 +00:00
moodler 06bbfff66e Automatic installer.php lang files by installer_builder (20060817) 2006-08-17 02:54:23 +00:00
tjhunt da4714358a Bug #6267 - questionlib.php delete_question infinite loop with rantom questions. Thanks to mbockol at carleton dot edu. 2006-08-16 16:16:42 +00:00
moodler 48e2bf159a Automatic installer.php lang files by installer_builder (20060816) 2006-08-16 02:52:23 +00:00
thepurpleblob 48b358ba56 Bug #6231. Question name truncated to 250 characters. 2006-08-15 14:38:38 +00:00
skodak 029d0a28bd $CFG->debug=0 from config.php is not overriden by setup.php anymore SC#293 2006-08-14 20:55:58 +00:00
skodak c26ac7924f adding proper checks that the requested help file exists SC#292 2006-08-14 20:07:35 +00:00
moodler 51034f13f8 In rare cases (some timezones?) this while loop went forever because
$timestart == $nextmidnight

which led to disks filling up   :-(
2006-08-14 15:19:36 +00:00
moodler a1ecd20a19 Merged fixes from HEAD 2006-08-14 09:01:31 +00:00
skodak a7ea2d7dcc prevent access to filters when disabled in filter settings SC#291 2006-08-14 06:22:15 +00:00
tjhunt 915db857b8 SC 289, small, but non-exploitable hole in backup permissions checking. 2006-08-13 20:25:46 +00:00
moodler 6c05439a08 Automatic installer.php lang files by installer_builder (20060813) 2006-08-13 02:51:13 +00:00
skodak b5c240e397 fixed format_text caching - now respects text format, current language and course id (lang fix is needed for my multilang filter rewrite ;-) 2006-08-12 12:41:55 +00:00
stronk7 e8e814e5c7 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)
2006-08-12 09:12:15 +00:00
bobopinna 0fc2503718 Fixed a problem during scorm update.
Now tracks are deleted only if the scoes are really changed
2006-08-11 12:21:23 +00:00
thepurpleblob f5c2ff517f Correctly reflect 1.6 match grades change and make it more clear about blank line usage - bug #6231 2006-08-11 10:42:19 +00:00
stronk7 74948bb2e7 Changing //TRANSLIT to //IGNORE because some weird bug
in the OS iconv libraries was breaking some texts.
2006-08-11 09:34:47 +00:00
thepurpleblob ec7a860ff5 Removed credits section (along with very out of date 'last-updated' bit). Doesn't seem appropriate any more. 2006-08-11 08:10:15 +00:00
skodak 0f69811d98 new function get_coursemodule_from_id() is now used for obtaining of valid $cm from coursemodule id SC#283; backported from HEAD 2006-08-10 15:30:49 +00:00
moodler 0b038e2d43 Automatic installer.php lang files by installer_builder (20060810) 2006-08-10 03:02:49 +00:00
toyomoyo 02f0217c20 fix a bug when user's lang is not set, fall back to site lang 2006-08-10 02:41:19 +00:00
skodak 105a8f399f obfuscation of the email addresses 2006-08-09 20:39:24 +00:00
skodak c071606525 Bug #6199 - A typo in edit.php 2006-08-09 19:45:41 +00:00
skodak dfa8b0f06a Bug #4936 - Highlighting a question text fragment with different color 2006-08-09 19:29:34 +00:00
skodak 8953a3b44f Bug #6225 - Moodle bug #4658 Breaks assignment type: Upload Single 2006-08-09 18:35:42 +00:00
skodak 6223b2eb1e Bug #6106 - HTML editor inserting unwanted hard return between images 2006-08-09 09:36:01 +00:00
bobopinna f4f18fb00c Fixed a bug in AICC package importing 2006-08-08 07:25:19 +00:00
moodler 98830278dc Automatic installer.php lang files by installer_builder (20060808) 2006-08-08 02:50:28 +00:00
skodak 2928e3d2d6 Swf now disabled by default in Mediaplugin and added explanation SC#284 2006-08-07 14:48:51 +00:00
moodler ea07be815b Automatic installer.php lang files by installer_builder (20060806) 2006-08-06 02:52:42 +00:00
bobopinna 10d7f1525d fixed a problem with Explorer and popup windows 2006-08-04 13:49:00 +00:00
bobopinna d51d6583a7 Fixed a problem with explorer and popup windows 2006-08-04 13:41:54 +00:00
bobopinna 6703e4af2d removed object tags. I'm thinking to return to frameset... 2006-08-04 13:01:35 +00:00
martinlanghoff 530c61afe7 login: forgot password now works for guest again (bug #6214) 2006-08-04 06:11:34 +00:00
martinlanghoff 58c98fa207 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:47:37 +00:00
tjhunt beb6c6cdb7 Bug #6206 - Quiz can't be created on some mysql configurations 2006-08-03 16:30:21 +00:00
tjhunt 964f6d4f17 Bug #6048 - Fix 'are you sure you want to start an attempt' warning. Backported from HEAD. 2006-08-03 14:51:34 +00:00
moodler 905c6f3261 Pushing beyond 1.6.1 2006-08-02 06:18:26 +00:00
moodler e1210ad3c3 Automatic installer.php lang files by installer_builder (20060802) 2006-08-02 02:49:38 +00:00
toyomoyo 2492b30859 fix for 6178 2006-08-01 05:10:33 +00:00
ethem 8e9f9bec69 Don't show authorize.net password for security reasons. 2006-07-31 12:30:44 +00:00
skodak 47c8660050 Bug #6146 - Smiley popup can not be translated 2006-07-31 10:26:18 +00:00
skodak 8860ceb4d2 fixed warning when no referer available 2006-07-31 10:04:18 +00:00
skodak a45c1d139a Bug #6168 - missing link for course request - fixed 2006-07-31 09:17:53 +00:00
skodak ecdb04ca06 Bug #6168 - missing link for course request 2006-07-31 09:14:13 +00:00
martinlanghoff 0f7fcc8377 Backing out fix for bug #4874 2006-07-31 05:56:48 +00:00
martinlanghoff 4b8df782c6 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
2006-07-31 05:38:20 +00:00
martinlanghoff 3ad4a1097b 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:57:08 +00:00
martinlanghoff 21c2f2ef29 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:55:59 +00:00
martinlanghoff c58f4f10b3 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:06 +00:00
julmis 9978506b11 Removing formathtml function since it is never going to work. 2006-07-30 23:16:12 +00:00
julmis 980b1e04bc Trying to get rid of insert link bug once and for all 2006-07-30 23:07:49 +00:00
skodak 0fc71cc508 SC #280 force downloading of database files 2006-07-30 22:43:58 +00:00
skodak 9a0d8fd2b3 Bug #6170 - Glossary bug: it displays nothing when autolinking to non-ascii text and other minor cleanup 2006-07-30 22:23:43 +00:00
skodak d2b00aae1d Bug #6170 - Glossary bug: it displays nothing when autolinking to non-ascii text and other minor cleanup 2006-07-30 22:18:14 +00:00
skodak 2a94a64a06 Bug #6135 - Reduce unnecessary use of strtolower to make non-English languages look better 2006-07-30 21:46:31 +00:00
skodak d7a5c75f30 Bug #6176 - locale setting on config variables page not functioning correctly 2006-07-30 10:30:07 +00:00
moodler 54ac3dd31a Automatic installer.php lang files by installer_builder (20060730) 2006-07-30 02:49:23 +00:00
skodak be029bdf25 Bug #6181 - icelandic doesn't migrate 2006-07-29 09:43:36 +00:00
skodak b573d77752 Bug #6183 - typo in clean_param() description 2006-07-28 20:56:21 +00:00
urs_hunkler db5219aacd adding missing icons 2006-07-27 19:51:21 +00:00
skodak 9a2539db21 Fixed Call to undefined function: print_progress() in /usr/share/moodle/admin/upgradeforumread.php 2006-07-27 11:48:19 +00:00
ethem dd241f341a Select records as tablename.fieldname when joining tables.
Someone, can add  these fields userid,courseid to course table . :)
2006-07-27 11:23:25 +00:00
ethem fe2bc06329 Bug: 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.
2006-07-27 10:49:54 +00:00
moodler 58643a8110 Automatic installer.php lang files by installer_builder (20060727) 2006-07-27 02:52:30 +00:00
moodler 1a10d9049f Automatic installer.php lang files by installer_builder (20060726) 2006-07-26 02:45:50 +00:00
ethem 4221b8647c Cron error: When authorizenetlib.php require enrol.php, it includes admin/enrol.php. Interesting. Solved as $CFG->dirroot.'/enrol/authorize/enrol.php 2006-07-25 17:34:00 +00:00
ethem 8fd49aa444 New string: costdefaultdesc
<strong>In course settings, enter -1</strong> to cost field to use this default cost.
2006-07-25 17:03:55 +00:00
ethem d91f79789a New string: costdefaultdesc
<strong>In course settings, enter -1</strong> to cost field to use this default cost.
2006-07-25 16:58:22 +00:00
ethem 5eeebefba9 Sometimes ssl connections are slow. Increase max_execution_time to 5 minutes. 2006-07-24 16:27:51 +00:00
tjhunt 87cb44ac9f Bug #6157 - lang strings using concatenation, not $a. 2006-07-24 14:35:03 +00:00
ethem 644600315c * 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. :)
2006-07-24 11:42:17 +00:00
skodak 905fdcaa31 Bug #6159 Site settings interface typo - Combo list - my first commit form UK MoodleMoot :-) 2006-07-24 10:31:21 +00:00
danmarsden a97a4a87bd Bug #5882 ldap enrolment doesn't work. $USER->student getting munged 2006-07-24 00:32:06 +00:00
danmarsden c3d36a923f Bug 6130 session has bad entries causes calendar to fail showing events
Workaround untill Session is fixed properly.
2006-07-24 00:14:07 +00:00
danmarsden 3cfe476b39 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:40:00 +00:00
danmarsden 146a1735ac Fix for Bug 6119 - gives error when choice full, and user submits a choice they have already selected 2006-07-23 22:12:40 +00:00
danmarsden 8dc6117433 fix for Bug #4733 title gets garbled when html inside title. 2006-07-23 22:03:39 +00:00
moodler 08f72e477c Automatic installer.php lang files by installer_builder (20060722) 2006-07-22 02:46:09 +00:00
tjhunt d1c93d9605 Replace a few odd tabs with spaces. 2006-07-21 08:01:34 +00:00
stronk7 eede7619ef Bump to 1.6.1. No DB changes. 2006-07-21 07:55:35 +00:00
tjhunt bf6f63ae00 Bug #5946 - matching question php notice 2006-07-21 07:19:04 +00:00
urs_hunkler 2f1dff3561 corrected bug with teacher rights 2006-07-21 04:53:08 +00:00
urs_hunkler d0b4e8226f corrected a bug with teacher rights 2006-07-21 04:49:47 +00:00
gbateson 889d2b5ead microincrement version to 2.1.21 2006-07-21 00:10:29 +00:00
moodler 43935e12c9 Bump to 1.6.1 2006-07-20 23:43:47 +00:00
skodak ad44e5c049 fixed minor PHP5 compatibility problem with clone() 2006-07-20 06:53:29 +00:00
skodak 4075eb10da Bug #6075 - file admin/index.php is ISO encoded - headers broken by ob_end_flush(), fixed version check 2006-07-20 06:38:12 +00:00
skodak 10bafd3d21 Bug #6141 - Cron output is not plain text - <pre> and missing encoding, minor lang issues 2006-07-20 06:35:25 +00:00
skodak 605737cdfb Bug #6097 - HTML editor and brackets - fixes lesson problems 2006-07-20 06:30:10 +00:00
ikawhero 595eda8d9c Fixed typo. 2006-07-20 00:42:56 +00:00
skodak 56def90b83 yet another fix for course list for guests 2006-07-19 13:57:57 +00:00
skodak 74f6a9fb7e fixed course list for guests 2006-07-19 13:43:40 +00:00
skodak 8e764b36b1 admin should not see list of courses on the frontpage when there are too many of them 2006-07-19 13:33:18 +00:00
skodak 93f973f08b fixed course/index.php category display affected by previous commit - improved category and course list display on front page 2006-07-19 13:15:11 +00:00
skodak 4e7d821b34 section not always moved when requested - page reloading prevented by anchor; added random parameter to force reloading 2006-07-19 12:49:55 +00:00
skodak 31c46027aa Bug #6093 - Removed course sections re-appear after moving existing sections 2006-07-19 12:28:41 +00:00
skodak 4e2b4b1bc2 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 2006-07-19 12:01:38 +00:00
moodler 2fa6e1ff26 Added missing global 2006-07-19 10:17:48 +00:00
moodler e63dc8ea91 Just simplifying logic a little 2006-07-19 10:16:15 +00:00
skodak 8c251d1a93 Bug #6136 - Hard coded admin paths 2006-07-19 07:59:16 +00:00
stronk7 4985c39b50 minor bump to perform some changes on grade_letter 2006-07-18 16:23:28 +00:00
stronk7 4f1c93d6dc Fixing one recently added DB upgrade. Please be careful on STABLE! ;-) 2006-07-18 16:22:36 +00:00
tjhunt 96ef5c792a Fixed typo which caused images in questions to fail to display if NOT using slasharguments. Merged from HEAD - original checkin was 1.49 to 1.50 by danstowell. 2006-07-18 15:37:17 +00:00
tjhunt e10e4fdd55 Bug #6033 - missing string for unknown questiontype. Also tidied up some messy code. 2006-07-18 15:27:50 +00:00
tjhunt f2ea23a1bd SC#277 2006-07-18 13:32:54 +00:00
tjhunt 6b319a8087 Bug #6116 - Quiz database upgrade scripts call renamed function by the old name. 2006-07-18 10:58:40 +00:00
urs_hunkler 172d326c41 enhancements and bugfixes, works now in Safari and Konqueror 2006-07-18 09:06:06 +00:00
urs_hunkler 8d6c9a68b1 some style updates 2006-07-18 07:22:06 +00:00
skodak e2337127eb Bug #2149 - admin/creators.html javascript error 2006-07-18 07:16:29 +00:00
skodak 462a25fe75 Bug #6134 - error of coding, in function grade_download_form() 2006-07-18 06:42:21 +00:00
martinlanghoff 8a774fddb7 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:35:45 +00:00
martinlanghoff 059366fe22 Course restore - Restrict shortname to <= 15 characters, like the database table.
Author: Donal McMullan <donal@catalyst.net.nz>
2006-07-18 03:32:51 +00:00
moodler 834f10e9b2 Automatic installer.php lang files by installer_builder (20060718) 2006-07-18 02:42:48 +00:00
toyomoyo 14080bd00a fixed a bug where user can view site posts when not logged in 2006-07-18 02:27:17 +00:00
martinlanghoff 23ea06dfbe 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:34:19 +00:00
martinlanghoff 8d2529e59e 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:33:45 +00:00
martinlanghoff 8f527a42ee 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:31:45 +00:00
jgraham909 f8100e3629 Fix for grade_letter table and how MySQL version 5.0.3+ handles DECIMAL
fields

Versions: 5.0.3+ truncate to 99.99 if a value of 100.00 or greater is
input for grade_high or grade_low.

See the following for more info:
http://dev.mysql.com/doc/refman/5.0/en/precision-math-decimal-changes.html
2006-07-17 22:38:58 +00:00
skodak 25cbc9d08f Bug #1395 - Calandar view.php should respect forcelogin 2006-07-17 21:07:06 +00:00
skodak 88e912b1b1 Bug #6129 - Incorrect glossary import file size limit 2006-07-17 13:34:17 +00:00
tjhunt 31222bc4ef Bug 5840 - Image not displayed in Cloze question. 2006-07-17 08:47:29 +00:00
skodak 34db6d30a0 Bug #6120 - Course creation - loginproblem 2006-07-17 08:38:45 +00:00
skodak 63d337cf47 correction - bug 6130, not 3130 2006-07-17 07:29:46 +00:00
skodak 285105fbf1 workaround by Dan for bug #3130, fixed some warnings 2006-07-17 07:28:54 +00:00
martinlanghoff b1682ee480 enrol API: Updated documentation 2006-07-17 06:01:31 +00:00
stronk7 226f066ed5 Close properly the showentry page. Bug 5986.
(http://moodle.org/bugs/bug.php?op=show&bugid=5986)
2006-07-16 08:59:33 +00:00
gbateson 08a1da2bb9 micro-increment version number to v2.1.21 2006-07-16 06:54:53 +00:00
gbateson 9b2f93bcf3 add double quotes to index fields to avoid reserved words errors in pg7. correct setting of default values in HotPot 2006050201 which was incompatible with pg7.3 2006-07-16 06:53:41 +00:00
moodler ec64d5223d Automatic installer.php lang files by installer_builder (20060716) 2006-07-16 02:40:00 +00:00
gbateson 6ce20e4d58 initialized objects using new stdClass() and adjusted use use of empty() and isset() in hotpot_restore_records() function 2006-07-15 14:28:22 +00:00
gbateson e48bc9eb25 fixed setting of empty secondary fields during restore (bug 6113) 2006-07-15 13:47:09 +00:00
stronk7 74b29acec4 Soled bug 6089 plus some minor iteration savings...
(http://moodle.org/bugs/bug.php?op=show&bugid=6089)
2006-07-15 08:38:19 +00:00
skodak 613b02036f Bug #6080 - Loancalc block doesn't define a footer string 2006-07-14 21:04:27 +00:00
skodak 495f166ec4 todo: add detection of incorrect chars in wwwroot 2006-07-14 20:56:16 +00:00
tjhunt d0f8a899f8 Bug 6111 - Rewrite the code for making an indented list of question categories, becase the existing code was so horrible. 2006-07-14 15:32:57 +00:00
moodler 0183254bc5 Automatic installer.php lang files by installer_builder (20060714) 2006-07-14 02:39:22 +00:00
skodak bbdb1c3815 Bug #6099 - Restore alternatively failing on data module - fixed status codes of module restore process 2006-07-13 15:33:37 +00:00
moodler e9dbe49121 Document $CFG->allowvisiblecoursesinhiddencategories 2006-07-13 14:17:49 +00:00
moodler e714706c42 In Moodle 1.6 the behaviour of course access was changed so that visible
courses would be invisible if they were within a hidden category.

However, the old behaviour was useful in many instances, so I've added
a $CFG->coursesinhiddencategoriesarehidden that will return to that old
behaviour if required.
2006-07-13 13:58:14 +00:00
moodler f450edd426 Updates to assignment language file to support upload assignment type
(which is not in 1.6, it's 1.7, but should work in 1.6 in case people
want to try it already)
2006-07-13 07:42:13 +00:00
mark-nielsen 09447862c0 [BugFix] Bug #5466 - Cluster and End of Cluster pages no longer display scores in extended editing view. Also added page type display for cluster and end of cluster pages in the extended editing view (which is displayed for all other pages as well). 2006-07-13 00:34:20 +00:00
skodak 96856b5798 Bug #6087 - alphabetic problem in glossary 2006-07-12 20:28:21 +00:00
moodler 28e58deb41 Automatic installer.php lang files by installer_builder (20060712) 2006-07-12 08:18:08 +00:00
moodler ab6508500c FIxed bad lines 2006-07-12 08:12:16 +00:00
moodler 0b32ca3ba0 Removed bad lines 2006-07-12 08:11:24 +00:00
moodler 9a2e6ce88c Automatic installer.php lang files by installer_builder (20060712) 2006-07-12 08:08:58 +00:00
martinlanghoff 070a7cc0c2 Fixing up broken language packs for sm and to in install. 2006-07-12 06:31:46 +00:00
skodak 2277cfb8fb fixed printing of filenames from zip archives - SC#273 2006-07-12 05:54:37 +00:00
martinlanghoff 551d2b59bf 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.

Author: Donal McMullan <donal@catalyst.net.nz>
2006-07-12 02:28:37 +00:00
tjhunt 7203acd306 Bug #6077 - Teacher saving their grades destroys student essay! 2006-07-11 16:10:56 +00:00
moodler 07f579d0bd Automatic installer.php lang files by installer_builder (20060711) 2006-07-11 14:22:47 +00:00
moodler 732581eb56 Manually fixed 2006-07-11 14:14:15 +00:00
skodak 344c23c0ef better cleaning of $file parameter SC#276 2006-07-11 13:18:59 +00:00
skodak b515688ddb workaround for Bug #6035 - editing quiz in one tab changes quiz in other 2006-07-11 13:00:34 +00:00
skodak 76f8821cfc Bug #6067 - The restore process behaves differently depending on which module contains the absolute links 2006-07-11 10:00:02 +00:00
moodler 95e34d9299 new installer.php files added. (stronk7) 2006-07-11 09:41:13 +00:00
toyomoyo bc77686a08 changed feedback in the function that handles user table 2006-07-11 03:35:19 +00:00
moodler 720669a6db Automatic installer.php lang files by installer_builder (20060711) 2006-07-11 02:39:43 +00:00
skodak d6b7aa9c25 Bug #5988 - Branch Tables in 1.6+ (Lesson Module) 2006-07-10 22:38:45 +00:00
skodak 4287b1f51b Bug #5732 - Lesson Scores &quot;out of XX&quot; marks report incorrect mark 2006-07-10 21:51:20 +00:00
ethem 2dc90eb90e - authorize_expired function added to lessen the code.
- All functions in authorize plugin are named with authorize_ prefix.
2006-07-10 09:43:00 +00:00
moodler 243c0e302a Merged fixes from HEAD for missing backup data 2006-07-09 16:26:37 +00:00
mudrd8mz f392379a36 Replaced by improved lang.php from HEAD which is now considered as stable. 2006-07-09 15:20:34 +00:00
skodak 8fdaba4020 Bug #6050 - import glossary entries to new glossary not creating new glossary 2006-07-07 19:53:28 +00:00
thepurpleblob 7e1a25bbdd Note that 'span' tags are permitted as well as 'lang' in multi-language
filter
2006-07-07 10:36:01 +00:00
skodak d8b7f70be3 fixed warning in glossary export 2006-07-06 21:25:42 +00:00
skodak ca567fc69b Bug #5820 - IE returns unsecure items with SSL on login 2006-07-06 15:51:17 +00:00
thepurpleblob ef1c5c394e Bug #4375 - did not work correctly in blocks. 2006-07-06 14:00:43 +00:00
ethem f5a4f9a980 Some outputting debugging info for cron. 2006-07-06 13:23:05 +00:00
ethem 905c4d38ad Performance for welcome message sending to students.
Order by students.
Dear student, welcome to these courses:
Coursename1
Coursename2
Coursename3

This sends an email for each student.
2006-07-06 11:57:43 +00:00
ethem 2044f30ec3 New string: welcometocoursesemail 2006-07-06 11:53:02 +00:00
tjhunt 52bf72770c Bug 6031 - missing parameter for warningmissingtype in libquestionlib.php 2006-07-06 11:09:03 +00:00
skodak 3294198a19 Bug #4698 - Login block is broken!, improved cookie test 2006-07-06 10:09:34 +00:00
tjhunt 68f039dedf 6030 - Can't move question categories back to the top level. 2006-07-06 10:07:02 +00:00
skodak 8c68b750a8 Bug #5921 - editing forum post bug 2006-07-06 10:00:08 +00:00
skodak de288c6099 Bug #5615 - Assigment listing shows duplicate names with paged display 2006-07-06 09:46:49 +00:00
thepurpleblob 39c18c39d1 Bug #4838 - removing spurious blank line at end 2006-07-06 08:36:38 +00:00
martinlanghoff 05a289bf1f 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:35:47 +00:00
martinlanghoff 904bd828c7 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.

Author: Donal McMullan
2006-07-06 05:06:07 +00:00
ethem 27b1d9d581 Daily cron seperated from main cron for performance.
To do:
Performance for welcome message sending to students. Group by student and courses. Like this:
Dear student, welcome to these courses:
1- Coursename 1
2- Coursename 2
3- Coursename 3
2006-07-05 16:54:43 +00:00
thepurpleblob cdc03b2a02 Bug #6011 - fixed bug dropping question name from cloze questions. 2006-07-05 12:38:51 +00:00
thepurpleblob 87e2569a2b Fix for bug #6013. Unable to import blackboard. Some of the changes
in moving to question banks had broken the format.
Also tidied up some notices.
2006-07-05 10:55:24 +00:00
tjhunt e4f8392813 Bug 6019: Quiz timer does not submit the form when it reaches zero. 2006-07-05 10:43:13 +00:00
skodak ce4af6df62 changed memory limit test in healthcenter 2006-07-05 08:37:32 +00:00
skodak a520b47745 healthcenter fixes - new extra whitespace detection, fixed automatic slasharguments detection 2006-07-05 07:41:51 +00:00
toyomoyo e1ddd943fb fixing a bug where global lang is not respected in user table 2006-07-05 01:53:43 +00:00
skodak cb43ec58fb fix for mysqladmin links 2006-07-04 09:39:21 +00:00
skodak c72387b7a0 removing healthcenter link in MOODLE_16_STABLE 2006-07-04 09:30:27 +00:00
skodak 57ba975b11 Bug #5909 - Fix use of user_group() because it returns arrays now - part 2 forum search fixed too 2006-07-04 08:30:16 +00:00
skodak 2cfa6389c8 fixed $site->id warning 2006-07-04 06:04:35 +00:00
skodak fc62b3ed36 Bug #6007 - &quot;The requested URL /course/report/log/view.php was not found on this server&quot; 2006-07-04 05:25:39 +00:00
moodler 825eadf070 Automatic installer.php lang files by installer_builder (20060704) 2006-07-04 02:39:44 +00:00
skodak 25e80a87f9 Bug #5909 - Fix use of user_group() because it returns arrays now - part 1 2006-07-03 21:07:41 +00:00
skodak fdfffda00f 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 2006-07-03 15:42:29 +00:00
skodak 173de2e8fa Bug #5991 - The calendar does not show the month's first day's event 2006-07-03 09:09:15 +00:00
skodak 9f1eaeda4f Bug #5995 - poor English in expiry notice 2006-07-03 07:18:58 +00:00
skodak daf27b51b4 Bug #5996 - block+resource=problem 2006-07-03 06:25:40 +00:00
moodler 2fe6249d41 Automatic installer.php lang files by installer_builder (20060701) 2006-07-01 02:39:58 +00:00
skodak 27e7895379 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 -continued 2006-06-30 13:39:04 +00:00
skodak 0b7911a748 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 2006-06-30 13:38:05 +00:00
skodak 92a6edf143 cleanup in admin/index.php; preparation for health center, loginas gui, password salts 2006-06-30 12:54:41 +00:00
skodak 4a4c960d99 fixed // in course root when browsing files 2006-06-30 11:55:41 +00:00
tjhunt 2f12aae186 Bug 5967 - Missing lang strings and help for quiz reports. 2006-06-30 10:27:17 +00:00
skodak 1530745ba6 Bug #5961 - small grammar error 2006-06-30 07:33:16 +00:00
skodak bd93091c8a Bug #5802 - Incorrect length in http partial content (206) packets. 2006-06-30 07:21:55 +00:00
moodler 609784e0aa Automatic installer.php lang files by installer_builder (20060630) 2006-06-30 02:42:55 +00:00
skodak 7c58698a8a 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
2006-06-29 21:19:10 +00:00
ethem 0cf39f9160 Put back last commit. If cost is 0, it always falls back to manual method. 2006-06-29 19:15:26 +00:00
ethem e65b5a1dce Bug #5941, Petr's patch is incorrect. Rewritten.
If course cost is 0 then always fall back to manual method. This is not authorize problem if enrolment key is empty and guest access with key.
2006-06-29 18:59:49 +00:00
ethem ec4fda2d3d Bug #5941, Petr's patch is incorrect. Rewritten.
If course cost is 0 then fall back manual method.
2006-06-29 18:13:03 +00:00
moodler e8b5984085 new installer.php file added. (stronk7) 2006-06-29 16:53:32 +00:00
ethem 0dafbf714a $teacher is used in manual form. No need global. 2006-06-29 15:00:17 +00:00
ethem 381cc85743 get_student_courses and get_teacher_courses functions added for future reference.
Cron description added.
2006-06-29 12:39:42 +00:00
ethem f59c789b28 Don't show choose method string if course cost is 0. 2006-06-29 11:25:04 +00:00
ethem f6c29f43ae New string. No cost yet. 2006-06-29 11:10:27 +00:00
ethem e99b6fb404 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
2006-06-29 10:24:08 +00:00
ethem a395180a81 Bug #5941 - Myriad of problems with Paypal enrollmemts, au_enrol.patch 2006-06-29 09:46:10 +00:00
skodak ce72ff9018 Bug #5944 - error message when moving thread 2006-06-29 08:00:48 +00:00
skodak 4314bcdd89 Bug #5952 - bad links in &quot;about wysiwyg editor&quot; 2006-06-29 07:19:44 +00:00
skodak d23f9f5d48 Bug #5953 - problem in /auth/ldap/lib.php 2006-06-29 07:03:38 +00:00
skodak 1eb6f0cd22 Bug #5955 - link to help item for html editor looks funny 2006-06-29 06:59:26 +00:00
skodak fee582844b Bug #5959 - save and view takes to wrong place 2006-06-29 06:52:48 +00:00
skodak 1c813b4080 Bug #5960 - can't delete or edit comments 2006-06-29 06:47:35 +00:00
moodler 993d8956ea Automatic installer.php lang files by installer_builder (20060629) 2006-06-29 02:40:22 +00:00
tjhunt e067c3a1f0 Bug #5918 - essay question comments from teachers lost in 1.6 upgrade. Thanks to Mark Nielsen the suggestion of how to fix. 2006-06-28 17:13:17 +00:00
skodak 1a833b5836 Bug #5941 - Myriad of problems with Paypal enrollmemts, part 3 - fixed 'login as student' button, now plain guest login action 2006-06-28 15:36:53 +00:00
skodak 48653e6c05 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 2006-06-28 15:25:05 +00:00
skodak 804cc92184 minor loginas cleanup 2006-06-28 14:57:44 +00:00
ethem e5cf77cd19 Multienrol FIX: Move error message from this to manual plugin to show error message. This plugin is never inherited anymore. Each time, we create new manual_plugin() and this causes hiding error message. 2006-06-28 14:47:01 +00:00
skodak 0ea68a9cdd Bug #5941 - Myriad of problems with Paypal enrollmemts, part 1 2006-06-28 12:42:43 +00:00
tjhunt 6d812d61a2 Bug #5922 - comment from manualgraded questions lost during regrade. Thanks to Jean-Michel Vedrine for the fix. 2006-06-28 11:40:56 +00:00
tjhunt a9f56a8f0d Bug #5945: Lang string name missmatch when starting quiz attempt. 2006-06-28 10:10:28 +00:00
moodler 2dc8a5c519 Automatic installer.php lang files by installer_builder (20060628) 2006-06-28 02:39:18 +00:00
skodak 7bd9c89714 Bug #5927 - extending enrollments doesn't 2006-06-26 21:57:42 +00:00
skodak 24999ce035 Bug #5931 - blocks block database 2006-06-26 21:34:13 +00:00
skodak 31053d630f assignments on mymoodle page, Bug #5839 - Found more than one record in get_record_sql ! 2006-06-26 16:15:29 +00:00
skodak 01ac5c3191 fixed broken stats image link, Bug #5924 - User profile statistics tab 2006-06-26 13:47:52 +00:00
tjhunt 6aeb5a1f35 Bug 5889 - Regrading a quiz wipes student answers. Thanks to Jean-Michel Vedrine for the fix. 2006-06-26 11:21:08 +00:00
toyomoyo a73a0a6d8c fix for 5916, when blogs disabled do not print link of blog in profile 2006-06-26 08:30:32 +00:00
skodak d3d91e9a72 fixed Turkish problems see, Bug #5878 - Teachers can't add blog and blocks. 2006-06-26 07:21:13 +00:00
vyshane f64475c360 Using notify instead of error to display error message when purging of RSS
files fail during a discussion move between forums.
2006-06-26 03:59:28 +00:00
stronk7 459154ffbd Some minor changes in order to avoid some notices... 2006-06-25 10:15:31 +00:00
julmis b7504102dc commenting out ob_gzhandler. 2006-06-23 19:50:42 +00:00
toyomoyo 4590fe5598 added support for custom langs, and Eloy's change to 1000 record, see HEAD commit message 2006-06-23 01:51:36 +00:00
toyomoyo f7c1de925b added support for custom lang packs, and Eloy's change to 1000 records before system responds. Please see his commit msg on HEAD for details. 2006-06-23 01:48:18 +00:00
thepurpleblob 07ccf0a68d Fixed mix-up between MikTeX and MimeTeX. 2006-06-21 10:18:51 +00:00
toyomoyo 6408f30173 fix for 5881, no closing tag 2006-06-21 03:12:54 +00:00
moodler bdaee88fac Automatic installer.php lang files by installer_builder (20060621) 2006-06-21 02:43:53 +00:00
ethem 552f0e47dc 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.
2006-06-20 17:07:56 +00:00
moodler 84331e061f Bump past 1.6 2006-06-20 14:58:55 +00:00
stronk7 de43be04ae helper string to explain $CFG->doctonewwindow added. 2006-06-20 14:22:14 +00:00
stronk7 54374e63f0 Now docs are showed in a new window based on $CFG->doctonewwindow 2006-06-20 13:51:47 +00:00
stronk7 294c6adb0a Added new option to decide if docs will be showed in a new window. 2006-06-20 13:40:27 +00:00
moodler 1c05b46ac2 Added back homelink to standard theme 2006-06-19 16:30:00 +00:00
moodler ddc6b0e31d Merged error fix for RSS deletion 2006-06-19 16:21:33 +00:00
moodler 1d9a81c347 OKAY! THIS IS IT! MOODLE 1.6! 2006-06-19 15:35:50 +00:00
moodler 262ec64be3 New tags file 2006-06-19 15:33:01 +00:00
moodler 4541181369 When the tags block is shown in a course context, then make the
links to blogs stay in the same context.
2006-06-19 14:16:42 +00:00
moodler 4d0036e8be Don't show users tab if you can't go there 2006-06-19 13:51:58 +00:00
moodler 0e83e4f5ca FIxed some missing headers 2006-06-19 13:34:46 +00:00
toyomoyo d40b3e1034 changed &amp;copy; to &#169 to validate better 2006-06-19 03:52:23 +00:00
toyomoyo 72343793f6 give IE a bit more time 2006-06-19 03:29:15 +00:00
moodler d4e8a03c53 Added new class FPDF_Protection (see Bug #5855). Code submitted by chardelle at lifeworkouts dot com, commited by vy-shane at moodle dot com. 2006-06-19 02:39:05 +00:00
moodler 6c979e8a24 Some changes to improve the UTF migration output a little 2006-06-18 10:09:12 +00:00
moodler 794e4a05a3 The forum search form was always wrapping no matter what I tried.
I swapped the textbox and helpbutton around (and got rid of one more table)
2006-06-18 08:20:48 +00:00
moodler d067b2005b Moved the "helplink" CSS span outside the help text and image. No effect on themes. 2006-06-18 08:09:51 +00:00
moodler c6d79e46d9 FIxed up the print_header calls 2006-06-18 07:44:21 +00:00
moodler 2b8a5e83ac Fix for resource parameters for users not logged in 2006-06-16 09:41:41 +00:00
moodler 2a1e7c302c Added check for $CFG->disablemycourses 2006-06-16 04:29:22 +00:00
toyomoyo 59b4825741 fixing centering of tabs on blog page 2006-06-16 02:58:44 +00:00
mjollnir_ 38d0c10e3c participants list last access filter should only show for teachers! I noticed this on moodle.org this morning :| 2006-06-15 21:33:06 +00:00
ethem 50d2685d0e $a->course: course information added. 2006-06-15 14:19:49 +00:00
ethem f187b7f98b $a->course: course information added. 2006-06-15 14:06:53 +00:00
ethem 0726456942 pendingordersemailteacher string added 2006-06-15 13:34:30 +00:00
ethem 1bf6b1cc18 pendingordersemailteacher string added 2006-06-15 13:29:10 +00:00
ethem efbd1fc514 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. 2006-06-15 12:23:46 +00:00
ethem 9900b2f103 If we enabled manual-capture and teachers can manage payment and teachers can be notified about pending orders expiring,
admins can also chooise that what is the sort of importance of expiring orders? 'Sum of total' or 'Count of orders' are emailed first.
You know that the amount of money is important :)
2006-06-15 10:30:55 +00:00
ethem 2716e73e9e Order by order count. Courses that have many orders are emailed first. 2006-06-15 07:45:18 +00:00
toyomoyo abe51bbed9 fix for 5633 2006-06-15 06:32:26 +00:00
toyomoyo cd09750495 fix for 5814 2006-06-15 03:23:47 +00:00
ethem 3377c60427 Email subject for pending orders expiring. 2006-06-14 16:30:46 +00:00
ethem 5242595975 Email subject for pending orders expiring. 2006-06-14 16:19:23 +00:00
tjhunt 2605a5ba8f Moved constant definitions out of function, so they are not run repeatedly giving lots of warnings. 2006-06-14 15:34:22 +00:00
tjhunt 1aa43ea576 Corrected reference to lang string. 2006-06-14 15:30:55 +00:00
ethem f12b2a7d5d If admin set up 'Teachers can manage the payments of the course' and enabled 'Manual-Capture', course teachers are notified about pending orders expiring. 2006-06-14 11:52:01 +00:00
ethem 834d5863b9 If admin set up 'Teachers can manage the payments of the course' and enabled 'Manual-Capture', course teachers are notified about pending orders expiring. 2006-06-14 11:33:00 +00:00
moodler c8825cfd2d Fix for bug:
Notice: Undefined property: id in /home/moodle/public_html/certificate/mod/forum/discuss.php on line 38

when user is not logged in and want to view a forum of type news.
2006-06-14 08:44:36 +00:00
moodler 380b3b305c Added missing $a to print_error 2006-06-14 03:15:34 +00:00
moodler 2ae294c9d6 Automatic installer.php lang files by installer_builder (20060614) 2006-06-14 02:37:39 +00:00
tjhunt cb82934b8d * Quiz module sometimes left the user staring at a blank page. Now there is an error message. 2006-06-13 18:58:17 +00:00
tjhunt c1c70a909a Bug #5812 - Standard theme font size CSS not sufficiently defensive 2006-06-13 18:52:17 +00:00
ethem 541ba098e7 Link to Payment Management page? 2006-06-13 18:29:28 +00:00
ethem c298a8b8e0 Link to help file 'Order Review'. 2006-06-13 18:02:24 +00:00
ethem 94863d1946 Help file for 'Order Review'. Merged from HEAD 2006-06-13 17:52:58 +00:00
ethem 6b8155d4a8 file orderreview.html was added on branch MOODLE_16_STABLE on 2006-06-13 17:52:58 +0000 2006-06-13 17:51:11 +00:00
ethem d9e4f9eb2a Handle also formatted time 00:30 for settlement time. 2006-06-13 15:59:11 +00:00
ethem d864c083c2 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.
Function used: get_user_timezone_offset()
2006-06-13 15:24:28 +00:00
tjhunt 80970e2938 Bug #5810 missing ' > 7' in debug test. 2006-06-13 14:36:08 +00:00
vyshane c196e0f3cb Merged from 1.5. Fix for Bug #5767 - Section links block is removed from
course view after settings update.
2006-06-13 07:47:51 +00:00
tjhunt 5a6dba91bb Fix restore notice. 2006-06-12 15:35:28 +00:00
tjhunt 4600286cd2 Bug #5793: remember whether Show all has been clicked in the question bank. 2006-06-12 13:51:11 +00:00
tjhunt 4bbd7130f1 Bug #5790: Answer order for MC qtype not specified. Fix. Thanks to Peter Bulmer. 2006-06-12 11:03:11 +00:00
toyomoyo b862c77e93 proper html for help file 2006-06-12 07:24:24 +00:00
toyomoyo 1a149c0d33 a few mismatches between db and this html 2006-06-12 07:17:59 +00:00
toyomoyo 84f3391271 adding help file 2006-06-12 04:07:27 +00:00
moodler 1f66b55e6e Fixed hardcoded style widths in all formats 2006-06-11 06:47:43 +00:00
moodler 4339f32452 Removing hardcoded style widths and replaced with table widths, which improves page build appearance 2006-06-11 06:42:42 +00:00
stronk7 00b8db5f4f 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)
2006-06-10 23:31:21 +00:00
stronk7 b0bba0e704 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)
2006-06-10 10:38:27 +00:00
moodler d501331e75 Automatic installer.php lang files by installer_builder (20060610) 2006-06-10 02:36:19 +00:00
moodler ac9ed861a4 Automatic installer.php lang files by installer_builder (20060610) 2006-06-09 18:58:21 +00:00
moodler effa8cd5d1 Automatic installer.php lang files by installer_builder (20060610) 2006-06-09 17:19:42 +00:00
stronk7 3dbdb64c89 The absolutely incredible bug! It was working being wrong! Bug 5775.
(http://moodle.org/bugs/bug.php?op=show&bugid=5775)
2006-06-09 14:21:49 +00:00
ethem 660e6d5f9d Sending email for pending orders expiring string (adminemailexpired) seperated.
Settings moved to adminemailexpsetting.
2006-06-09 11:24:09 +00:00
ethem 277ea82b49 Sending email for pending orders expiring string (adminemailexpired) seperated.
Settings moved to adminemailexpsetting.
2006-06-09 11:18:16 +00:00
ethem dce99d41f4 Show 'name on card' string instead of moodle.php's user string. 2006-06-09 10:56:54 +00:00
ethem 44c4e47a1c Some config sections 'Order Review' moved to
an_teachermanagepay -> Site-Wide Settings
an_emailexpired: -> Email-Sending Settings
an_cutoff: -> Authorize.net Settings
2006-06-09 10:25:24 +00:00
stronk7 ba4f9b230f Moving from lastIP to lastip everywhere. Bug 5763.
(http://moodle.org/bugs/bug.php?op=show&bugid=5763)
2006-06-09 10:00:47 +00:00
stronk7 2ba777cd5a Moving from lastIP to lastip everywhere. Bug 5763.
(http://moodle.org/bugs/bug.php?op=show&bugid=5763)
2006-06-09 09:43:59 +00:00
stronk7 03b40486ca Avoid empty processing both for PLAIN_SQL_UPDATE and PHP_FUNCTION
Merged from HEAD
2006-06-09 09:18:35 +00:00
toyomoyo ea257a167e typo should be 0 not 1 2006-06-09 02:52:05 +00:00
toyomoyo a666b9dbcf disable the blog tag if blog is disabled 2006-06-09 02:44:49 +00:00
bobopinna 986a50e26d change advanced to parameters 2006-06-08 15:35:06 +00:00
bobopinna 625c8a70aa Fixed some language refinements 2006-06-08 15:24:23 +00:00
moodler 66a14b7292 Help content for available tags. 2006-06-08 08:26:50 +00:00
skodak 0a265f0fcd Bug #5663 - errors after changing grade weight 2006-06-08 06:38:08 +00:00
skodak be8137a81b Fixed course searching 2006-06-08 06:23:34 +00:00
vyshane 8bdb6d99a8 Added missing string norecentactivity. 2006-06-08 06:18:06 +00:00
toyomoyo 07c8c52cbf bug fix for 5748 2006-06-08 04:07:24 +00:00
toyomoyo b588ef46f4 changed recordset size to 50 2006-06-08 02:45:48 +00:00
stronk7 cdb048acd7 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)
2006-06-07 22:17:31 +00:00
ethem dd9a68560e Unnecesary strings removed. 2006-06-07 18:42:47 +00:00
skodak c731399ff1 Bug #5522 - question/restorelib.php error 2006-06-07 14:56:36 +00:00
skodak c8d483b80c incorrect course number in categories after course delete 2006-06-07 14:04:55 +00:00
vyshane 75775efcf7 Fix for Bug #5131 - RSS Feeds and Moving Discussions. 2006-06-07 08:16:01 +00:00
toyomoyo de8c6852d3 fix for 5720 2006-06-07 06:03:41 +00:00
toyomoyo 36d7c02847 fix for 5720 2006-06-07 05:56:59 +00:00
vyshane 64375cb146 Fixed bug: SCORM module window options were not being saved properly - array
values used instead of keys in scorm_option2text().
2006-06-07 04:34:29 +00:00
toyomoyo 1f7569c38a some javescript progress bar changes, 1) status updates correctly when resuming 2) table numbers is not hardcoded anymore 2006-06-07 04:30:50 +00:00
toyomoyo d636096334 changes are made to facilitate the migration of user table by row. function migrate2utf_user is added. This only affects mysql atm. Please help test and report bugs! 2006-06-07 04:09:37 +00:00
skodak 1f1a9a809c Bug #5659 - Problem with build-in buttons when creating templates 2006-06-06 20:54:16 +00:00
skodak fe19f91525 Bug #5734 - Enrolled students can't access metacourse after unhiding while logged in 2006-06-06 19:00:51 +00:00
tjhunt aea38264b5 Fix notices when you restore a course with an empty forum. 2006-06-06 17:23:42 +00:00
tjhunt 44e2500992 Bug #5559: revised fix - using better CSS class names. 2006-06-06 17:07:58 +00:00
stronk7 ecf140979f Adding two new strings for RESTRICTED tests in environmenlib. 2006-06-06 16:56:16 +00:00
stronk7 9531202c10 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_15_STABLE
2006-06-06 16:15:35 +00:00
skodak a5436ee747 Bug #5535 - Database module backup error in 1.5.4, patch submitted by Patrick Pollet 2006-06-06 15:11:34 +00:00
bobopinna 826067335c Fixed some regular expression Bug 5041 2006-06-06 14:33:10 +00:00
tjhunt d5306794ec Fix for calculated questions where each one builds on the last. 2006-06-06 14:27:45 +00:00
tjhunt 89905101b7 Fix notices from the quiz module on backup and restore. 2006-06-06 14:13:55 +00:00
tjhunt f6849778a7 Make cron a bit more rebust by changing the way the require is done. 2006-06-06 14:10:33 +00:00
skodak c0f904046c Bug #5678 - Question marks, single quotes in field name cause trouble - cleaning hack ported from clean_filename() 2006-06-06 10:15:49 +00:00
tjhunt 23da79eff2 Fix notice. 2006-06-06 10:10:07 +00:00
skodak 176d1229af Bug #5680 - Fixed duplicate field names 2006-06-06 09:34:23 +00:00
skodak 6aef11722c Bug #5444 - Import PowerPoint - PHP5 clone bug 2006-06-06 08:52:51 +00:00
vyshane 5218d67aca New stats admin report. This shares code with /course/report/stats. Basically
the same report, but in an admin context.
2006-06-06 04:18:16 +00:00
vyshane 9b037d3842 New files with required code after refactoring this report module. 2006-06-06 04:13:44 +00:00
vyshane 6481349eb3 Refactored this report module so that we can also use it from
/admin/reports/stats.
2006-06-06 04:09:31 +00:00
tjhunt 9abb0f813a Bug #5672: Make calculated questions less confusing to create. 2006-06-05 16:56:31 +00:00
tjhunt 914d8f5801 Fixed reference to incorrect language string. 2006-06-05 14:14:12 +00:00
ethem 7a553f06a3 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.
2006-06-05 12:58:16 +00:00
skodak a9fd047eea Bug #5725 - Assignment grading pop up windows do not close, broken by 4976 2006-06-05 12:17:20 +00:00
bobopinna b225c41b53 Fixed a typo 2006-06-05 08:23:34 +00:00
bobopinna 2d0ee29b15 Added class name for IFRAME element 2006-06-05 07:40:18 +00:00
bobopinna 0bfac2fe7a Fixed a modified name for some constants 2006-06-05 07:19:07 +00:00
skodak c7d9b99dae Bug #5715 - error message in messaging - notice lastaccess 2006-06-04 23:10:32 +00:00
skodak f87c87b9ba Bug #5721 - students cannot take quiz when course language set to French 2006-06-04 23:00:00 +00:00
skodak 88c0c27c83 fixed warning when no students graded yet (caused by useless assignment) 2006-06-04 21:34:14 +00:00
stronk7 395c75becd 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)
2006-06-04 15:17:03 +00:00
stronk7 b02e4ee384 report XXXX actions added. Bug 5714.
(http://moodle.org/bugs/bug.php?op=show&bugid=5714)
2006-06-04 00:35:04 +00:00
stronk7 fae3f45758 course report xxxx actions now are supported on restore. Bug 5714.
(http://moodle.org/bugs/bug.php?op=show&bugid=5714)
2006-06-04 00:00:02 +00:00
skodak 5d46f73a3c Bug #5716 - Impossible to turn off highlighted current topic 2006-06-03 23:46:50 +00:00
stronk7 1ac7d05730 course report xxxx actions must send courseid in the info field. Bug 5714.
(http://moodle.org/bugs/bug.php?op=show&bugid=5714)
2006-06-03 20:33:44 +00:00
stronk7 27f60090f6 And some more (the last) notices out! Bug 5713.
(http://moodle.org/bugs/bug.php?op=show&bugid=5713)
2006-06-03 20:16:19 +00:00
stronk7 28dc928f43 And one more collection of innocent notices avoided. Bug 5712.
(http://moodle.org/bugs/bug.php?op=show&bugid=5712)
2006-06-03 20:00:10 +00:00
skodak 7fe8550e18 clarification for restrict modules option - bug #5688 2006-06-03 19:57:42 +00:00
stronk7 c9aecec6be And another notice in restore out. Bug 5711.
(http://moodle.org/bugs/bug.php?op=show&bugid=5711)
2006-06-03 19:48:50 +00:00
stronk7 69b693dbc9 One less notice. Bug 5710.
(http://moodle.org/bugs/bug.php?op=show&bugid=5710)
2006-06-03 19:44:15 +00:00
stronk7 0803379406 Avoid one notice in backup. Bug 5709.
(http://moodle.org/bugs/bug.php?op=show&bugid=5709&)
2006-06-03 18:59:35 +00:00
stronk7 4eb4b874ba Adding support to the forum user report action
in restore. Bug 3854.
(http://moodle.org/bugs/bug.php?op=show&bugid=3854)
2006-06-03 17:44:05 +00:00
skodak aff589d128 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:01:05 +00:00
tjhunt c4c9a5d860 Bug #5559: Move CLOZE qtype hightight colours into CSS insted of hardcoding, so themes can override. 2006-06-02 15:37:10 +00:00
nfreear 805720ebd3 Fix, bug 5614 - added ALT text for link icons (x 5), based on TITLE. 2006-06-02 13:11:38 +00:00
ethem af70ea6a96 Merged from HEAD. 2006-06-02 09:48:27 +00:00
thepurpleblob ae8df5acdf Added CLOZE question support.
Thanks to Joseph Rezeau for this one!
2006-06-02 09:44:13 +00:00
vyshane 1e900c139d Fixed bug: php warnings when there are no users in the selected course. 2006-06-02 07:35:36 +00:00
skodak ef93a24f23 fixed warning and removed ugly hack in attachment path 2006-06-02 06:47:26 +00:00
vyshane 47737013d3 Fix for Bug #5682 - 'Reset template' button in CSS template adds HTML 2006-06-02 04:27:42 +00:00
vyshane 476b3195fa Added missing language string. 2006-06-02 04:19:06 +00:00
toyomoyo ed7ce12186 fix for 5686, include_once course/lib.php in case it doesn't get included when interrupted 2006-06-02 02:53:31 +00:00
stronk7 de78b7e81b Adding propper support for the forum->user report log action. It was
a bit wrong. Code credits go to Petr!
2006-06-01 23:11:55 +00:00
skodak bf48c7abcd fixed problem in restricted modules - mods were accessed using strtolower(translated module name) instead of directory name as usual, it partially worked for English 2006-06-01 19:48:37 +00:00
skodak 26e6e8c048 fixed - unable to disable blocks 2006-06-01 19:12:42 +00:00
ethem d0bdb4d3c9 Documentation for status codes and actions. 2006-06-01 16:05:29 +00:00
skodak 7af4d79611 Bug #5643 - add Yahoo online status to user profile 2006-06-01 15:18:10 +00:00
skodak 49f020ec0c Bug #5684 - frameset page in UTF8 doesn't appear on IE 2006-06-01 14:49:31 +00:00
thepurpleblob a4bb593422 Fixing bugs #5676 and #5677
Text strings not properly escaped in a couple of places.
Conditional check inserted for optional units data in numerical questions.
2006-06-01 10:12:00 +00:00
ethem d799a9aef2 Just some tidy-ups 2006-06-01 08:44:01 +00:00
vyshane 6b611eb82d Fix for Bug #5552 - Filters conf. table looks awful. 2006-06-01 08:08:23 +00:00
ethem 1e04f3179a Just some tidy-ups 2006-06-01 07:38:23 +00:00
skodak ec7418d3ce Bug #5661 - mymoodle redirect problem 2006-06-01 05:39:46 +00:00
vyshane 6d895ae5e9 Fixed missing string 2006-06-01 04:07:23 +00:00
vyshane b194dfbf15 Fix for get_string(), which was not building the path to the language files
for reports correctly.
2006-06-01 03:05:18 +00:00
toyomoyo 278bd07a17 bug fix for 5352, setting ignore_user_abort to false 2006-06-01 02:30:20 +00:00
danmarsden 2aa86d2d33 BUG 5662 - bad check for 1.6 version. 2006-05-31 20:25:37 +00:00
stronk7 74e97cf096 Prevent doubleslashes once and again in paths. Also prevent them when writing config.php 2006-05-31 17:50:42 +00:00
tjhunt d86503c7cf 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.
2006-05-31 15:53:12 +00:00
julmis ee16e98eb1 Another try to fix IE's problem to load editable iframe. 2006-05-31 11:35:32 +00:00
moodler 800085d9ae Don't show stupid warnings to teachers 2006-05-31 08:24:28 +00:00
toyomoyo c8937fb8ea changepassword obsolete 2006-05-31 07:23:11 +00:00
toyomoyo 08d1ef9d83 changepassword is obsolete 2006-05-31 07:11:16 +00:00
toyomoyo 2fd3511227 changepassword obsolete 2006-05-31 06:57:58 +00:00
toyomoyo 3abe15dd14 change password obsolete 2006-05-31 06:41:55 +00:00
toyomoyo 213b568441 always allow admin to check the force password change box, if using internal_auth 2006-05-31 06:28:07 +00:00
stronk7 91a036b599 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_15_STABLE
2006-05-30 16:57:20 +00:00
nfreear 5484222182 Fix bug 5628 (Farsi RTL language), modify '.accesshide' style so top is large negative, not left. 2006-05-30 11:16:52 +00:00
skodak 321a23004b blacklist PHP 5.0.x in installation precheck 2006-05-30 09:49:22 +00:00
skodak 272fecfce4 blacklist PHP 5.0.x in installation precheck 2006-05-30 09:37:26 +00:00
ethem ffccc532c6 If config wwwroot starts with 'https', ignore config loginhttps value.
Dependency: Bug #5647
2006-05-30 08:25:57 +00:00
skodak ad6ae2c4e5 fixed typo - randomsmatch notice bug 5652 2006-05-30 06:27:59 +00:00
toyomoyo 76816913ed fix for 5648, utf-8 migration bug 2006-05-30 02:50:16 +00:00
martinlanghoff 4c74601224 auth/ldap: better handling of empty values from ldap 2006-05-30 00:42:53 +00:00
stronk7 b4c8301258 Bump or I'll forget it. 2006-05-29 22:49:54 +00:00
skodak c446109283 fixed warning from clone($SITE) during site setup 2006-05-29 20:30:07 +00:00
stronk7 b4ab174902 Normalize oracle driver name.
Merged from HEAD.
2006-05-29 17:43:07 +00:00
stronk7 2deb9e2501 Adding environmental checks for 1.7 (mssql and oracle added)
Merged from HEAD
2006-05-29 17:38:48 +00:00
moodler be02c7520a Improved title 2006-05-29 09:55:07 +00:00
moodler 364f1151a6 Updated some "my moodle" strings 2006-05-29 09:39:55 +00:00
moodler fb3a583b2b Improved the appearance of the My Moodle page with some CSS 2006-05-29 09:27:01 +00:00
moodler 83bf9af99e DOn't even show assignments without a due date 2006-05-29 09:20:53 +00:00
moodler a00095da48 FIxed some bugs 2006-05-29 09:09:22 +00:00
moodler 3ed4068ee1 Cleaned up admin reports a little 2006-05-29 09:03:13 +00:00
skodak 949f570992 Bug #5620 - MyMoodle shows bogus Assignment due date 2006-05-29 08:36:52 +00:00
moodler 2bef2c7dca FIxed admin block link for reports 2006-05-29 08:35:33 +00:00
moodler 36e32ba459 Checking in skodak's fixes to help blocks in more contexts (esp MyMoodle) 2006-05-29 08:15:23 +00:00
moodler baa1209e37 Merged from HEAD, better definition of $COURSE 2006-05-29 07:34:55 +00:00
skodak 4878c5a6d2 fixed array warning when editting blocks 2006-05-29 06:03:17 +00:00
skodak 5d4353a158 global $course fix 2006-05-29 05:55:39 +00:00
wildgirl 446088fa5d Updated small MP3 player to handle autoPlay (by Andrew Walker, Alton College) 2006-05-28 20:20:55 +00:00
skodak 33f519119b sanitize submitted numerical values 2006-05-26 11:52:35 +00:00
skodak 7acc6626c5 sanitize submitted numerical values 2006-05-26 11:46:32 +00:00
skodak e616f403eb sanitize submitted numerical values 2006-05-26 11:38:16 +00:00
skodak b51b3dd05c sanitize submitted numerical values 2006-05-26 11:31:16 +00:00
skodak e4fd3f4f06 Bug #5619 - Assignment Feedback mail lacks linefeed 2006-05-26 09:06:05 +00:00
skodak bce3627ed9 Bug #4647 - Undefined property in lib/statslib.php 2006-05-26 08:59:52 +00:00
skodak 567596e8c2 Bug #5456 - Item Analysis fails to calculate results for random question type 2006-05-26 06:54:22 +00:00
skodak f703afe925 Bug #5472 - Download quiz grades in Excel format does not show correct foelds 2006-05-26 06:47:32 +00:00
skodak 6483738028 Bug #5612 - language string missing in blog 2006-05-25 19:23:54 +00:00
skodak 086018ae01 Bug #5582 - sort by numerical field doesn't work properly with decimals 2006-05-25 15:55:55 +00:00
nfreear ae04fba0cd Ongoing fix, bug 5614 - added ALT text for link icons, based on TITLE. 2006-05-25 15:50:19 +00:00
skodak db9529f65f Bug #5416 - sorting by question column in overview report plugin broken - please test 2006-05-25 09:59:06 +00:00
skodak 97ae5efdf0 Bug #5566 - wrong display of student's answers in MATCHING question type 2006-05-25 08:12:30 +00:00
skodak a636a125da Bug #4779 - lib/moodlelib.php: typo 2006-05-25 06:33:01 +00:00
vyshane b3ed98f7ba Changed string to make it more general so we can use it for error message that
is shown when a student tries to add an entry and no fields are defined.
2006-05-25 05:16:43 +00:00
vyshane 46941b6043 Fix for bug: when students try to add an entry while no field is defined, the
foreach barfs on the value of $fields, which is false.
2006-05-25 05:14:53 +00:00
gbateson 670cced63a added blank lines for to improve readability 2006-05-25 05:14:49 +00:00
toyomoyo f6c74641dd backup-restore, utfmigrate for rsstitletemplate field 2006-05-25 02:29:15 +00:00
toyomoyo 3141843a1a dropping backticks 2006-05-25 02:06:44 +00:00
toyomoyo 4da8b58b36 forgot to check this in 2006-05-25 01:43:32 +00:00
gbateson 7c8304a6c9 clarified the wording in point (5) of the "TO USE" section 2006-05-25 00:00:34 +00:00
skodak fee588e503 fixed my yet another bug 2006-05-24 21:53:46 +00:00
skodak 42e2fba317 fixed broken operations in subfolders - result of my recent patching :-( :-( bug #5603 2006-05-24 21:49:25 +00:00
skodak 48c54e90ce Bug #5604 - LDAP error notice when users update profile 2006-05-24 21:11:56 +00:00
skodak dad92a063d fixed warnings on save profile 2006-05-24 21:04:33 +00:00
skodak 9033ed3212 Bug #5587 - Redirect fails after a failed login and proper variable initialisation 2006-05-24 20:54:59 +00:00
skodak 146132bffc fixed bug #5562 I hope 2006-05-24 18:55:41 +00:00
gbateson 331c6f4620 fixed typos in $string['configshowtimes'] 2006-05-24 11:22:07 +00:00
toyomoyo ed501d3e98 added a rsstitle field 2006-05-24 07:01:33 +00:00
toyomoyo d2780b2594 added rsstitletemplate field 2006-05-24 06:14:16 +00:00
toyomoyo 3054f2faf2 renaming reads and writes to statsreads and statswrites 2006-05-24 05:02:09 +00:00
vyshane 3c0fd35102 Fix for undefined property notice when cron.php is run. 2006-05-24 03:06:16 +00:00
stronk7 67e55d7e0b Solving one SQL error in data_get_participants()
plus some improved readability.
2006-05-23 22:30:58 +00:00
stronk7 5b0d565bcd course_modules->deleted and user->guid are now out.
(they disappeared from DB ages ago)
2006-05-23 22:04:50 +00:00
skodak ade83600e1 fix for printing of multiple group pictures bug #5548 2006-05-23 19:16:04 +00:00
skodak b87862b89a fixed bug #5593 - logged in nested in <p> and <div> 2006-05-23 18:58:37 +00:00
skodak 30faf003ba fixed file backup and converted other forgotten "assignments" 2006-05-23 18:37:05 +00:00
skodak c9a53bb206 fixed broken SQL that was throwing errors in backup 2006-05-23 18:14:56 +00:00
skodak 6fb6c9d960 fixed bug 5594 - can not save group details 2006-05-23 17:59:19 +00:00
skodak 5d502dc3e4 fixed warning 2006-05-23 13:32:43 +00:00
skodak 30d36e2f3e fixed incorrect output buffer use - bug #5590 2006-05-23 10:54:43 +00:00
skodak 989e230b3d fixed RSS feeds warning bug #5591 2006-05-23 10:24:40 +00:00
skodak f45b5a05c0 make sure variables are properly cleaned 2006-05-23 09:46:56 +00:00
skodak 48cd99809d proper initialisation of $oldquestionid 2006-05-23 09:31:04 +00:00
skodak 6ebca3c77e removed reliance on register globals 2006-05-23 09:10:23 +00:00
skodak 2e311d898c extra cleaning of variables 2006-05-23 09:00:58 +00:00
stronk7 a87bbde1a1 Allowing also numbers and underscores in sessioncookie.
Merged from MOODLE_15_STABLE
2006-05-22 17:54:13 +00:00
skodak 71777355b1 fixed register globals issues for $sort SC #256 2006-05-22 16:51:56 +00:00
tjhunt 01d50616ee Fix for Bug #5588 - Editing a question after sorting leads to an error. 2006-05-22 15:42:42 +00:00
skodak d44136dee7 fixed bug #5578 - remove login as button for other teachers in course 2006-05-22 13:14:14 +00:00
tjhunt 5c9fe50894 Fix an undefined variable notice. 2006-05-22 13:04:17 +00:00
tjhunt e620c033cb Fix an undefined variable notice. 2006-05-22 11:19:32 +00:00
nfreear d3b5c5f081 Ongoing, fix bug 5400, navbar/breadcrumb TABLE to DIV, to improve semantics. 2006-05-22 09:11:10 +00:00
skodak 6936ef91df fixed bug #5572 missing PARAM_CLEAN 2006-05-22 05:59:06 +00:00
toyomoyo 3f94709321 fix for 5551, can not edit post when set to 1 discussion 2006-05-22 02:38:11 +00:00
gbateson 6428434a5f fixed typo: clck -> click 2006-05-22 00:21:00 +00:00
gbateson 9bb14972af modified CVS URLs to start http://moodle.cvs.sourceforge.net 2006-05-22 00:19:51 +00:00
gbateson 01f3128264 Give Up button modified to send results and set status to abandoned. Microincrement version to 2006052200 (release = v2.1.20) 2006-05-22 00:07:33 +00:00
skodak 3e55705455 fixed register globals issue with $loginasguest 2006-05-21 20:50:50 +00:00
skodak 889209d1fa fixed redirection to https:// for edit profile and change password when loginhttps on 2006-05-21 20:34:31 +00:00
skodak efc346b5ca temporary workaround for bug #5534, html editor now disabled for IE when loginhttps on and wwwroot starts with http:// 2006-05-21 20:20:45 +00:00
skodak 5eb64d447e removed isset 2006-05-21 10:10:54 +00:00
skodak 9446d15749 fixed register globals issue with $text 2006-05-21 08:08:48 +00:00
skodak dc28278d18 proper initialisation of passwordchangeurl 2006-05-21 07:50:21 +00:00
skodak d04f1621e8 proper initialisation of sqlsortkey SC#258 2006-05-21 07:42:05 +00:00
koenr ef38765d91 adding missing </p> and one point 2006-05-20 19:14:13 +00:00
skodak 7c3c8b7249 fixed register globals issues in course/search.php 2006-05-20 18:39:48 +00:00
skodak eb676fdf9a proper initialisation of $focus SC#257 2006-05-20 18:18:30 +00:00
skodak bf55369e5d do not show pending courses button for nonadmins bug #5564 2006-05-20 18:07:25 +00:00
skodak 56a6a9ff49 fixed cleaning of path in custom scripts SC#221 2006-05-20 17:21:44 +00:00
stronk7 91e4976c08 Bump to Beta5 2006-05-20 00:10:13 +00:00
skodak 299560a9fc fixed block width calculation 2006-05-19 21:00:28 +00:00
skodak 23cb8a304c submission in post.php cleanup, fixes for bugs #5530, #5484 and SC#252 2006-05-19 20:15:44 +00:00
skodak 9c71eb42b8 fixed - disabled autologinguest not always respected in require_login() SC#255 2006-05-19 19:10:19 +00:00
nfreear f642809590 Ongoing, fix bug 5400, DIV to H1, to improve semantics. 2006-05-19 13:24:48 +00:00
nfreear 3edb646260 Fix bug 5434 - hardcoded missing Alt text, with a warning comment. 2006-05-19 10:29:08 +00:00
vyshane 7828580904 Fix for Bug #5541 2006-05-19 06:23:16 +00:00
mark-nielsen 2711fbb039 [BugFix] Bug #5405 - made a new function that grades a lesson for a specific user's attempt. This is then used for grad
ing 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 00:59:22 +00:00
mark-nielsen d226adef8b [BugFix] Bug #5405 - made a new function that grades a lesson for a specific user's attempt. This is then used for grad
ing 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 00:54:15 +00:00
skodak 88aba6189b deprecated nvl() function similar to optional_variable() - fixed missing global $CFG 2006-05-18 22:10:40 +00:00
skodak e371190c10 deprecated nvl() function similar to optional_variable() 2006-05-18 22:09:25 +00:00
dwoolhead dd3b147a87 Bug 5536 Replaced references to hide by show 2006-05-18 16:10:33 +00:00
ethem 653c70a063 Removed </td>. Help button appears on top :))
Merged from HEAD
2006-05-18 10:04:42 +00:00
ethem bb75ef114c I have just found a cute function called print_checkbox. :)
Merged from HEAD.
2006-05-18 07:58:54 +00:00
skodak f220d982f2 fixed bug #5533, could not choose from file root 2006-05-18 05:46:58 +00:00
martinlanghoff 1db555e84d login: Changing passwords now works when logged in as guest 2006-05-18 00:53:08 +00:00
skodak 2c97ca5d59 admins can now edit user images even when $CFG->disableuserimages = true; see bug #5494 and SC#253 2006-05-17 18:57:18 +00:00
skodak 4a1f1588f0 fixed version number 2006-05-17 18:15:43 +00:00
skodak 2b5c23c82b fixed some warnings and removed ugly hack error_reporting(E_ALL ^ E_NOTICE); that was only hiding warnings in this and other code
I am going to watch forums and bug tracker and fix any other problems that may surface before the release
2006-05-17 18:05:28 +00:00
tjhunt e1b8eb512c Convert tabs to spaces in files where there were only a few rogue tabs. 2006-05-17 16:37:14 +00:00
exe-cutor fca3ef18aa Removed all tabs 2006-05-17 12:37:13 +00:00
exe-cutor d2c77a0dc0 Fixed some typos 2006-05-17 12:33:01 +00:00
tjhunt f76e87652c Fix URL syntax error when slasharguments is off. 2006-05-17 11:29:31 +00:00
tjhunt 108145970d Fix wrong variable name. 2006-05-17 11:28:59 +00:00
ethem d4d1873933 action.php renamed to authorizenetlib.php 2006-05-17 08:12:41 +00:00
martinlanghoff 52a85b5475 moodle16cleanup: lib/db correct prefix, patch by Tim Hunt for bug 5515 2006-05-17 06:26:32 +00:00
martinlanghoff 6f1c69ec02 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:25:46 +00:00
martinlanghoff f184d1610b moodle16cleanup: mod/forum correctly dropping the constraint, so it does
not report an error during upgrade
2006-05-17 06:25:20 +00:00
martinlanghoff 7832d94156 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:24:59 +00:00
martinlanghoff 289b648803 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:24:28 +00:00
martinlanghoff c86c9b30c5 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:20:52 +00:00
martinlanghoff a722923c62 moodle16cleanup: backup/ set the correct column datatype and default value 2006-05-17 06:20:37 +00:00
martinlanghoff ae3f15fac1 moodle16cleanup: blocks/rss_client set the correct column default value 2006-05-17 06:20:09 +00:00
martinlanghoff d5b0187a32 moodle16cleanup: enrol/authorize not null set which is similar to mysql
and that was upgraded on postgres7.php
2006-05-17 06:19:50 +00:00
martinlanghoff 100aa1d7be moodle16cleanup: mod/hotpot set the correct column datatype and default
value
2006-05-17 06:19:34 +00:00
martinlanghoff 4ff35d69bc moodle16cleanup: mod/lesson drop unused table lesson_essay, set the
correct column datatype and default value
2006-05-17 06:19:17 +00:00
martinlanghoff ec29c403be moodle16cleanup: mod/dialog we need to drop some more dialog module tables 2006-05-17 06:18:43 +00:00
martinlanghoff a576feacb8 moodle16cleanup: mod/scorm drop a weird check constraint that is showing
up after upgrade
2006-05-17 06:18:16 +00:00
martinlanghoff 9c44a6972c moodle16cleanup: mod/scrom set the correct defaults and correctly recreate
the new check constraint
2006-05-17 06:17:53 +00:00
martinlanghoff 1ce5928d35 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:17:32 +00:00
martinlanghoff 35c30e915e 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:17:06 +00:00
martinlanghoff f59139d640 moodle16cleanup: mod/forum added notification message 2006-05-17 06:15:48 +00:00
martinlanghoff b4bdcbe535 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:51:12 +00:00
skodak b6d175eeb7 I hope this is the last patch for header already printed trouble in error() and redirect() 2006-05-16 20:29:20 +00:00
ethem a7084ab10b confirm_sesskey() implementation for capture,delete,refund and void. I hope it works. :)
Merged from HEAD.
2006-05-16 15:37:06 +00:00
ethem 6a4c28904a Allow showing error message when insert_record fails. 2006-05-16 15:00:08 +00:00
ethem d0e1fd06c5 Manual capture settings for sending email: cron=enabled, an_review=checked, an_capture_day=0, an_emailexpired=1-5
merged from HEAD
2006-05-16 11:40:00 +00:00
nfreear 287a93580b Fix bug 5477 "Strange 'you are here'...", <span> now <h2> in function print_navigation. 2006-05-16 11:31:50 +00:00
ethem 53fedccb0b (Manual capture settings: cron=enabled, an_review=checked, an_capture_day=0)
Merged from HEAD.
2006-05-16 10:46:55 +00:00
thepurpleblob a08ccf0a61 Added note that export now exports all subcategories. 2006-05-16 09:38:03 +00:00
toyomoyo df8baa04c3 forgot to take out comment 2006-05-16 08:22:03 +00:00
toyomoyo 3b0e0d4df4 fix for 5513 2006-05-16 07:57:54 +00:00
vyshane 250ea6271e Fixed bug #5467. Converted newlines to UNIX format, tabs to spaces and removed
extra newlines at the end of php scripts.
2006-05-16 07:04:05 +00:00
vyshane f356fbe45e Fix for grade_drop_lowest (missed from last fix for bug 5354) 2006-05-16 06:57:08 +00:00
vyshane 37f401637b Fixed Bug #5354 - Gradebook [DropXLowest and Exclude] 2006-05-16 05:49:59 +00:00
mark-nielsen 13f944bc55 [BugFix] Bug 5485 - problem with regular expressions with simple analysis 2006-05-16 03:04:44 +00:00
stronk7 3e21f15895 Updated to latest version (1.56). Bug 5165.
(http://moodle.org/bugs/bug.php?op=show&bugid=5165)
2006-05-15 23:29:13 +00:00
danmarsden fc410020b8 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:21:39 +00:00
mjollnir_ 200460b0c8 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>
2006-05-15 21:51:30 +00:00
skodak d1014faf32 fixed problem when set both loginhttps and https in wwwroot, closes bug #5507 and #3848 2006-05-15 21:32:21 +00:00
gustav_delius b692cb65b7 Answers to essay questions are now saved correctly when navigating to another page, fixing bug 4478 2006-05-15 20:27:04 +00:00
mark-nielsen 3f566d8f2e [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:05:58 +00:00
stronk7 46beca01b3 Avoid [[namesite]] to appear when ADDING site activities.
I sent this on May 8th! :-(
2006-05-15 17:52:39 +00:00
stronk7 0257c6d6b0 Changing session->data to medium text. Bug 5406.
(http://moodle.org/bugs/bug.php?op=show&bugid=5406)

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:28:02 +00:00
stronk7 b10192c1e4 Changing session->data to medium text. Bug 5406.
(http://moodle.org/bugs/bug.php?op=show&bugid=5406)

IMPORTANT: I sent this to CVS on May, 8th and changes had dissapear!
           It could be possible than other commits sent near SF crash
           were affected too!
2006-05-15 17:26:38 +00:00
skodak 0772879f24 fix my previous incorrect short tag fix, fixed register globals, IP address used as mail user when not logged in 2006-05-15 15:44:36 +00:00
skodak 5563b4e151 fixed short php tags 2006-05-15 15:10:49 +00:00
skodak ffcce04152 changed cleaning of entry title, now matches handling of forum post titles 2006-05-15 15:03:44 +00:00
skodak b374d60430 better cleaning of post title SC#251 revisited 2006-05-15 14:47:09 +00:00
skodak 848e124eab better cleaning of post title SC#251 2006-05-15 14:31:09 +00:00
exe-cutor a53b09c16b Fixed an inconsistent link 2006-05-15 12:18:40 +00:00
toyomoyo 8374432bdb fix for 5493 2006-05-15 02:58:43 +00:00
toyomoyo 18ab64ef11 tidying up constants 2006-05-15 02:56:56 +00:00
toyomoyo e1b6fbf2eb fix for 4404 2006-05-15 02:25:42 +00:00
toyomoyo a37df0735f fix for 5465 2006-05-15 02:01:54 +00:00
skodak 8b0c3b6551 fixed secure forms handling when POST url contained GET parameters (cookieless mode and some other forms) 2006-05-14 20:57:01 +00:00
skodak 5ee7e12e26 fixed bug #5489 - can not edit file, minor bugfixes and whitespace cleanup 2006-05-14 19:08:34 +00:00
skodak f4aaf2f7b5 fixed whitespace and Id tag 2006-05-14 17:21:02 +00:00
skodak c385f70296 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. 2006-05-14 17:10:35 +00:00
gbateson 00fe4b8045 microincrement version number to v2.1.19 2006-05-14 08:34:23 +00:00
gustav_delius 0472d056f6 Removing obsolete defaults 2006-05-13 17:04:11 +00:00
gustav_delius 07f8831194 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:41:22 +00:00
ethem a7f53e74f6 Fix: Redirect to order details page 10 seconds later, not home page. 2006-05-13 16:14:36 +00:00
gustav_delius 8a6733ead1 Updated comments and made sure teacher preview gets restarted when changes are saved, fixing bug 5478 2006-05-13 10:34:02 +00:00
ethem e5bafac7d2 *** empty log message *** 2006-05-13 08:55:38 +00:00
ethem f101e4f736 Language direction is important. Changed as: <b>AVS Result:</b> $a 2006-05-13 08:51:12 +00:00
thepurpleblob 53b824ef1f Fixes for bugs #5435 - subcategories were not exported and
#5470 - true/false questions not exported due to internal format
change.
2006-05-13 08:47:57 +00:00
ethem 672007443c More readable coding. Now, I understand everything. :) 2006-05-13 08:30:06 +00:00
ethem 1180c98509 Deleting test transactions are not good. They may be in proggress. Let's update WHERE transid<>'0'. 2006-05-13 05:58:17 +00:00
ethem 337f36b459 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.
2006-05-12 19:48:42 +00:00
ethem be1ed90464 Fix: Delete test transactions before update status as AN_STATUS_AUTHCAPTURE. 2006-05-12 18:32:02 +00:00
ethem 55c0d5b8a4 Status: 'New' string. Merged from HEAD. 2006-05-12 17:23:59 +00:00
stronk7 aa912c49e2 Changing session->data to medium text. Bug 5406.
(http://moodle.org/bugs/bug.php?op=show&bugid=5406)
2006-05-08 16:36:40 +00:00
nfreear 8abfee6962 Fixes bug 5412 "Recent Activity block, New Users, markup should be a list" - style and lib.php: print_recent_activity. 2006-05-08 11:24:35 +00:00
thepurpleblob f1068df6c6 Moved some category functions back to questionlib. Original move
caused all sorts of problems.
2006-05-08 10:40:42 +00:00
thepurpleblob 3b438e0db9 Moved some of the category functions back here. Caused much
more grief than I anticipated.
2006-05-08 10:38:03 +00:00
toyomoyo 6d699a924d fix for 5438 2006-05-08 07:07:51 +00:00
vyshane f6de1e03d7 Fix for Bug #5441. Typo was causing an undefined variable notice. 2006-05-08 03:53:49 +00:00
vyshane 0416a3be25 Changed field length to 20 for module field in log table (Bug #5419). 2006-05-08 03:07:27 +00:00
moodler 1e4f7f125b Updated hints about stable versions 2006-05-08 01:47:25 +00:00
stronk7 1b2472e584 glossary print view is now valid XHTML. 2006-05-07 10:48:10 +00:00
stronk7 51aca6a92f 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_15_STABLE
2006-05-06 16:55:38 +00:00
ethem 04803a039d Admin can setup which credit card types will be accepted. 2006-05-05 18:25:03 +00:00
ethem 8d101bc522 Admin can setup which credit card types will be accepted. 2006-05-05 18:09:38 +00:00
stronk7 474c8d3f00 Now the help link in the admin block points to Docs. Bug 4803.
(http://moodle.org/bugs/bug.php?op=show&bugid=4803)
2006-05-05 17:54:59 +00:00
vyshane e48f4e502d Fix for Bug #5419 - Inconsistency between log_display and log tables. 2006-05-05 08:01:27 +00:00
toyomoyo 00b9ff724b fix for 4478 2006-05-05 06:43:36 +00:00
toyomoyo d5be1194cb fix for 5428 2006-05-05 05:13:12 +00:00
thepurpleblob d3176779c8 htmlentities() replaced by s() 2006-05-04 11:15:11 +00:00
stronk7 8e4485c69b Anything against the ISO-8859-1 word? 2006-05-04 10:38:17 +00:00
toyomoyo e565767d24 fix for 5426, inconsistent prefixes, and lengthened some index to varchar(100) during migration 2006-05-04 09:36:32 +00:00
ethem aca29171b4 Enable 'Authorize.net plugin' and setup cron properly; or uncheck an_review again. 2006-05-04 08:15:29 +00:00
toyomoyo 1710f639ae fix for 3644 2006-05-04 06:56:24 +00:00
moodler 711d6de23f Whoops, proper merge now 2006-05-04 05:47:27 +00:00
moodler fdee3caacb Merged fixes from stable 2006-05-04 04:42:18 +00:00
vyshane 0c19b8fd99 Fix for Bug #4805 2006-05-04 04:25:22 +00:00
toyomoyo 1bad990a14 fix for 5417 2006-05-04 02:22:37 +00:00
stronk7 155a4e17a2 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:45:55 +00:00
stronk7 11a5d6c147 Fixing some non-production values I left after testing.
Thanks James!
2006-05-03 22:03:06 +00:00
stronk7 ca5b6b6506 XHTML validation. Bug 5332.
(http://moodle.org/bugs/bug.php?op=show&bugid=5332)
2006-05-03 18:20:09 +00:00
urs_hunkler d0fcd925f9 patch: 2 if propertyIsEnumerable blocks added to make HTMLeditor work with the prototype AJAX library 2006-05-03 18:14:42 +00:00
stronk7 b985f62858 1.6 compliance added
Merged from HEAD
2006-05-03 17:57:26 +00:00
stronk7 e793cddc22 Solving some changes in course-view and sections... 2006-05-03 17:47:29 +00:00
739 changed files with 36279 additions and 41357 deletions
-12256
View File
File diff suppressed because it is too large Load Diff
+8 -9
View File
@@ -26,7 +26,6 @@
if ($config = data_submitted()) {
$config = (array)$config;
validate_form($config, $err);
// extract and sanitize the auth key explicitly
$modules = get_list_of_plugins("auth");
@@ -36,6 +35,14 @@
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)) {
@@ -233,14 +240,6 @@
/// 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
+1 -1
View File
@@ -60,7 +60,7 @@
// $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/' . $strblockname . '/config';
$CFG->pagepath = 'block/' . $block->name() . '/config';
print_header($site->shortname.': '.$strblockname.": $strconfiguration", $site->fullname,
"<a href=\"index.php\">$stradmin</a> -> ".
+2 -2
View File
@@ -156,7 +156,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');
@@ -218,7 +218,7 @@
$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');
+18 -7
View File
@@ -3,6 +3,8 @@
require_once('../config.php');
$installing = optional_param('installing', 0, PARAM_BOOL);
$focus = '';
if ($site = get_site()) { // If false then this is a new installation
@@ -34,7 +36,7 @@
if (count($err) == 0) {
foreach ($config as $name => $value) {
if ($name == "sessioncookie") {
$value = eregi_replace("[^a-zA-Z]", "", $value);
$value = eregi_replace("[^a-zA-Z0-9_]", "", $value);
}
if ($name == "defaultallowedmodules") {
$value = implode(',',$value);
@@ -46,7 +48,10 @@
$value = implode(',',$value);
}
}
unset($conf);
if ($name == "locale") {
$value = trim($value);
}
$conf = new object();
$conf->name = $name;
$conf->value = $value;
if ($current = get_record('config', 'name', $name)) {
@@ -60,8 +65,16 @@
}
}
}
redirect('index.php', get_string('changessaved'), 1);
exit;
if ($installing) {
print_header();
notify(get_string('changessaved'), 'notifysuccess');
print_continue('index.php');
exit;
} else {
// the following redirect was randomly breaking upgrades because it did double redirects,
// we must not use it during install/upgrade
redirect('index.php', get_string('changessaved'), 1);
}
} else {
foreach ($err as $key => $value) {
@@ -74,9 +87,6 @@
if (empty($config)) {
$config = $CFG;
if (!$config->locale = get_field('config', 'value', 'name', 'locale')) {
$config->locale = $CFG->lang;
}
}
$sesskey = !empty($USER->id) ? $USER->sesskey : '';
@@ -143,6 +153,7 @@
}
echo '<center>';
echo '<input type="hidden" name="installing" value="'.$installing.'" />';
echo '<input type="hidden" name="sesskey" value="'.$sesskey.'" />';
echo '<input type="submit" value="'.get_string('savechanges').'" />';
echo '</center>';
+16 -7
View File
@@ -69,7 +69,7 @@ class configvar {
/// debug
unset($options);
$options[7] = $strno;
$options[5] = $strno;
$options[15] = $stryes;
$misc['debug'] = new configvar (get_string('configdebug', 'admin'),
@@ -157,8 +157,8 @@ class configvarrss extends configvar {
/// slasharguments
unset($options);
$options[0] = "file.php?file=/pic.jpg";
$options[1] = "file.php/pic.jpg";
$options[0] = "file.php?file=/1/pic.jpg";
$options[1] = "file.php/1/pic.jpg";
$operatingsystem['slasharguments'] = new configvar (get_string('configslasharguments', 'admin'),
choose_from_menu ($options, 'slasharguments', $config->slasharguments, '', '', '', true) );
@@ -312,17 +312,20 @@ class configvarrss extends configvar {
/// 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" />' );
'<input name="locale" type="text" size="15" value="'.s($config->locale).'" alt="locale" />' );
/// docroot
$interface['docroot'] = new configvar ( get_string('configdocroot', 'admin'),
'<input name="docroot" type="text" size="60" value="'.s($config->docroot).'" alt="docroot" />' );
/// doctonewwindow
$interface['doctonewwindow'] = new configvar ( get_string('configdoctonewwindow', 'admin'),
choose_from_menu($noyesoptions, 'doctonewwindow', $config->doctonewwindow, '', '', '', true) );
/// timezone
$interface['timezone'] = new configvar ( get_string('configtimezone', 'admin'),
choose_from_menu (get_list_of_timezones(), 'timezone', $config->timezone, get_string('serverlocaltime'), '', '99', true ) );
@@ -447,6 +450,9 @@ class configvarrss extends configvar {
$security['notifyloginthreshold'] = new configvar (get_string('confignotifyloginthreshold', 'admin'),
choose_from_menu($options, 'notifyloginthreshold', $config->notifyloginthreshold, '', '', '', true) );
$security['protectusernames'] = new configvar (get_string('configprotectusernames', 'admin'),
choose_from_menu($noyesoptions, 'protectusernames', $config->protectusernames, '', '', '', true) );
/// secureforms
$security['secureforms'] = new configvar (get_string('configsecureforms', 'admin'),
choose_from_menu ($noyesoptions, 'secureforms', $config->secureforms, '', '', '', true) );
@@ -588,6 +594,7 @@ class configvarrss extends configvar {
}
/// enable stats
if (empty($CFG->disablestatsprocessing)) {
$stats['enablestats'] = new configvar (get_string('configenablestats','admin'),
choose_from_menu($noyesoptions, 'enablestats', $config->enablestats, '', '', '', true) );
@@ -633,7 +640,7 @@ class configvarrss extends configvar {
$stats['statsuserthreshold'] = new configvar (get_string('configstatsuserthreshold','admin'),
'<input type="text" name="statsuserthreshold" size="4" value="'.$config->statsuserthreshold.'" />');
}
////////////////////////////////////////////////////////////////////
@@ -646,6 +653,8 @@ class configvarrss extends configvar {
$configvars['permissions'] = $permissions;
$configvars['requestedcourse'] = $reqcourse;
$configvars['misc'] = $misc;
if (empty($CFG->disablestatsprocessing)) {
$configvars['stats'] = $stats;
}
?>
+42
View File
@@ -0,0 +1,42 @@
<?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");
$strcourses = get_string("courses");
print_header("$site->shortname: $stradministration: $strcourses", "$site->fullname",
"<a href=\"index.php\">$stradministration</a> -> $strcourses");
print_heading($strcourses);
$table->align = array ("right", "left");
$table->data[] = array('<b><a href="../course/index.php?edit=on&amp;sesskey='.$USER->sesskey.'">'.get_string("managecourses")."</a></b>",
get_string("adminhelpcourses"));
$table->data[] = array("<b><a href=\"enrol.php?sesskey=$USER->sesskey\">".get_string("enrolmentplugins")."</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);
?>
-3
View File
@@ -64,9 +64,6 @@
?>
</select>
<br />
<script type="text/javascript">
function
</script>
<input type="text" name="searchtext" size="30" value="<?php p($searchtext) ?>"
onFocus ="document.creatorsform.add.disabled=true;
document.creatorsform.remove.disabled=true;
+30 -14
View File
@@ -26,7 +26,7 @@
chdir(dirname($_SERVER['argv'][0]));
}
require_once("../config.php");
require_once(dirname(__FILE__) . '/../config.php');
require_once($CFG->dirroot.'/lib/adminlib.php');
if (!$alreadyadmin = isadmin()) {
@@ -42,11 +42,23 @@
//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
@header('Content-Type: text/plain; charset='.current_charset());
/// Start output log
$timenow = time();
mtrace("<pre>");
mtrace("Server Time: ".date('r',$timenow)."\n\n");
/// Run all cron jobs for each module
@@ -129,11 +141,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)");
}
}
}
}
@@ -143,11 +157,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)");
}
}
}
}
@@ -262,10 +278,10 @@
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)
+1 -1
View File
@@ -43,7 +43,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') {
+3 -1
View File
@@ -57,10 +57,12 @@
$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);
"<a href=\"index.php\">$stradmin</a> -> <a href=\"misc.php\">$strmisc</a> -> "
.$strenvironment);
/// Print the component download link
echo '<div class="reportlink"><a href="environment.php?action=updatecomponent&amp;sesskey='.$USER->sesskey.'">'.$strupdate.'</a></div>';
+28
View File
@@ -34,4 +34,32 @@
</PHP_EXTENSION>
</PHP_EXTENSIONS>
</MOODLE>
<MOODLE version="1.7">
<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="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>
</COMPATIBILITY_MATRIX>
+8 -3
View File
@@ -188,10 +188,15 @@
// construct the flexible table ready to display
$table = new flexible_table(FILTER_TABLE);
$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/admin/filters.php");
$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();
// iterate through filters adding to display table
@@ -202,13 +207,13 @@
// get hide/show link
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>";
}
+52 -28
View File
@@ -1,14 +1,23 @@
<?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;
}
}
define('SEVERITY_NOTICE', 'notice');
define('SEVERITY_ANNOYANCE', 'annoyance');
define('SEVERITY_SIGNIFICANT', 'significant');
define('SEVERITY_CRITICAL', 'critical');
$resetsesserrorcounter = optional_param('resetsesserrorcounter', 0, PARAM_BOOL);
$solution = optional_param('solution', 0, PARAM_SAFEDIR); //in fact it is class name alhanumeric and _
$solution = optional_param('solution', 0, PARAM_SAFEDIR); //in fact it is class name alhanumeric and _
require_login();
if (!isadmin()) {
@@ -18,9 +27,11 @@
$site = get_site();
$stradmin = get_string('administration');
$strhealthcenter = get_string('healthcenter');
$strmisc = get_string('miscellaneous');
print_header($site->shortname.': '.$strhealthcenter, $site->fullname,
'<a href="index.php">'.$stradmin.'</a> -> '.$strhealthcenter);
'<a href="index.php">'.$stradmin.'</a> -> <a href="misc.php">'.$strmisc.'</a> ->'.
$strhealthcenter);
echo <<<STYLES
<style type="text/css">
@@ -216,18 +227,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;
}
@@ -235,11 +241,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.';
}
}
@@ -350,24 +356,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.';
}
}
@@ -421,7 +444,7 @@ class problem_000010 extends problem_base {
$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 {
@@ -462,13 +485,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;
@@ -499,7 +522,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');
}
@@ -535,6 +558,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
*/
+54 -52
View File
@@ -5,20 +5,28 @@
header('Location: ../install.php');
die;
}
/// Check that PHP is of a sufficient 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');
include_once($CFG->dirroot.'/lib/adminlib.php'); // Contains various admin-only functions
$id = optional_param('id', '', PARAM_ALPHANUM);
$confirmupgrade = optional_param('confirmupgrade', 0, PARAM_BOOL);
$agreelicence = optional_param('agreelicence',0, PARAM_BOOL);
/// Check that PHP is of a sufficient version
if (!check_php_version("4.1.0")) { //TODO: should we bump it up to 4.3.0??
$phpversion = phpversion();
print_heading("Sorry, Moodle requires PHP 4.1.0 or later (currently using version $phpversion)");
die;
}
/// Check some PHP server settings
@@ -68,13 +76,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.
@@ -221,7 +222,7 @@
/// If any new configurations were found then send to the config page to check
if (!empty($configchange)) {
redirect("config.php");
redirect("config.php?installing=1");
}
/// Find and check all main modules and load them up or upgrade them if necessary
@@ -257,7 +258,7 @@
/// Define the unique site ID code if it isn't already
if (empty($CFG->siteidentifier)) { // Unique site identification code
set_config('siteidentifier', random_string(32));
set_config('siteidentifier', random_string(32).$_SERVER['HTTP_HOST']);
}
/// Check if the guest user exists. If not, create one.
@@ -318,10 +319,13 @@
print_spacer(10,10);
}
if (ini_get_bool('register_globals') && !ini_get_bool('magic_quotes_gpc')) {
print_simple_box(get_string('globalsquoteswarning', 'admin'), 'center', '60%');
if (ini_get_bool('register_globals')) {
print_simple_box(get_string('globalswarning', 'admin'), 'center', '60%');
}
if (is_dataroot_insecure()) {
print_simple_box(get_string('datarootsecuritywarning', 'admin', $CFG->dataroot), 'center', '60%');
}
/// If no recently cron run
$lastcron = get_field_sql('SELECT max(lastcron) FROM ' . $CFG->prefix . 'modules');
@@ -399,38 +403,44 @@
$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('enrolmentplugins').
'</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="../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>');
$table->data[] = array('<strong><a href="report.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>');
$coursedata = '<div class="adminlink"><a href="../course/index.php?edit=on&amp;sesskey='.$USER->sesskey.'">'.get_string('managecourses').
'</a> - <span class="explanation">'.get_string('adminhelpcourses').'</span></div>';
$coursedata .= '<div class="adminlink"><a href="enrol.php?sesskey='.$USER->sesskey.'">'.get_string('enrolmentplugins').
'</a> - <span class="explanation">'.get_string('adminhelpenrolments').'</span></div>';
$coursedata .= '<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>';
$coursedata .= '<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>';
$coursedata .= '<div class="adminlink"><a href="creators.php?sesskey='.$USER->sesskey.'">'.get_string('assigncreators').
'</a> - <span class="explanation">'.get_string('adminhelpassigncreators').'</span></div>';
$coursedata .= '<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="courses.php">'.get_string('courses').'</a></strong>', $coursedata);
$miscdata = '<div class="adminlink"><a href="../files/index.php?id='.$site->id.'">'.get_string('sitefiles').
'</a> - <span class="explanation">'.get_string('adminhelpsitefiles').'</span></div>';
$miscdata .= '<div class="adminlink"><a href="stickyblocks.php">'.get_string('stickyblocks','admin').
'</a> - <span class="explanation">'.get_string('adminhelpstickyblocks').'</span></div>';
$miscdata .= '<div class="adminlink"><a href="report.php">'.get_string('reports').
'</a> - <span class="explanation">'.get_string('adminhelpreports').'</span></div>';
//to be enabled later
/* $miscdata .= '<div class="adminlink"><a href="health.php">'.get_string('healthcenter').
'</a> - <span class="explanation">'.get_string('adminhelphealthcenter').'</span></div>';*/
$miscdata .= '<div class="adminlink"><a href="environment.php">'.get_string('environment', 'admin').
'</a> - <span class="explanation">'.get_string('adminhelpenvironment').'</span></div>';
/// Optional stuff
if (file_exists("$CFG->dirroot/$CFG->admin/$CFG->dbtype")) {
$table->data[] = array("<strong><a href=\"$CFG->dbtype/frame.php\">".get_string('managedatabase').'</a></strong>',
'<div class="explanation">'.get_string('adminhelpmanagedatabase').'</div>');
$miscdata .= '<div class="adminlink"><a href="'.$CFG->dbtype.'/frame.php">'.get_string('managedatabase').
'</a> - <span class="explanation">'.get_string('adminhelpmanagedatabase').'</span></div>';
}
$table->data[] = array('<strong><a href="misc.php">'.get_string('miscellaneous').'</a></strong>', $miscdata);
/// Hooks for Matt Oquists contrib code for repositories and portfolio.
/// The eventual official versions may not look like this
if (isset($CFG->portfolio) && file_exists("$CFG->dirroot/$CFG->portfolio")) {
@@ -468,14 +478,6 @@ epository').'</a></strong>',
print_simple_box_end();
if (optional_param('dbmigrate')) { // ??? Is this actually used?
print_simple_box_start('center','60%');
require_once($CFG->dirroot.'/admin/utfdbmigrate.php');
db_migrate2utf8();
print_simple_box_end();
}
print_footer($site);
+381 -126
View File
@@ -1,9 +1,59 @@
<?PHP // $Id$
/**
* Display the admin/language menu and process strings translation.
*
* CHANGES
*
* 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');
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?
$mode = optional_param('mode', '', PARAM_ALPHA);
$currentfile = optional_param('currentfile', 'moodle.php', PARAM_FILE);
$currentfile = optional_param('currentfile', LANG_DEFAULT_FILE, PARAM_FILE);
$uselocal = optional_param('uselocal', -1, PARAM_INT);
if ($uselocal == -1) {
if (isset($SESSION->langtranslateintolocal)) {
$uselocal = $SESSION->langtranslateintolocal;
} else {
$uselocal = LANG_DEFAULT_USELOCAL;
}
} else {
$SESSION->langtranslateintolocal = $uselocal;
}
require_login();
@@ -23,9 +73,30 @@
$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,7 +117,6 @@
break;
}
$currentlang = current_language();
print_header("$site->shortname: $title", "$site->fullname",
"<a href=\"index.php\">$stradministration</a> -> ".
@@ -55,7 +125,7 @@
if (!$mode) {
print_simple_box_start('center','80%');
echo '<table align="center" width="100%"><tr><td width="50%" align="center">';
echo '<table summary="" align="center" width="100%"><tr><td width="50%" align="center">';
print_string('managelang','admin');
echo '</td><td align="center" width="50%">';
print_string('editlang','admin');
@@ -65,7 +135,7 @@
echo '</td><td>';
$currlang = current_language();
$langs = get_list_of_languages();
echo "<table align=\"center\"><tr><td align=\"right\">";
echo "<table summary=\"\" align=\"center\"><tr><td align=\"right\">";
echo "<b>$strcurrentlanguage:</b>";
echo "</td><td>";
echo popup_form ("$CFG->wwwroot/$CFG->admin/lang.php?lang=", $langs, "chooselang", $currlang, "", "", "", true);
@@ -84,8 +154,13 @@
// Get a list of all the root files in the English directory
$langdir = "$CFG->dataroot/lang/$currentlang";
$enlangdir = "$CFG->dirroot/lang/en_utf8";
if ($currentlang == 'en_utf8') {
$langdir = $enlangdir;
} else {
$langdir = "$CFG->dataroot/lang/$currentlang";
}
$locallangdir = "$CFG->dataroot/lang/{$currentlang}_local";
if (! $stringfiles = get_directory_list($enlangdir, "", false)) {
error("Could not find English language pack!");
@@ -105,20 +180,31 @@
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) {
@@ -127,18 +213,39 @@
$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 ($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!");
}
@@ -169,12 +276,26 @@
}
} else if ($mode == "compare") {
if (!file_exists($langdir)) {
error ('to edit this language pack, you need to put it in '.$CFG->dataroot.'/lang');
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'));
@@ -188,12 +309,28 @@
}
unset($newstrings['currentfile']);
if (lang_save_file($langdir, $currentfile, $newstrings)) {
notify(get_string("changessaved")." ($langdir/$currentfile)", "green");
if ($uselocal) {
include("$langdir/$currentfile");
if (isset($string)) {
$packstring = $string;
} else {
$packstring = array();
}
unset($string);
$saveinto = $locallangdir;
} else {
error("Could not save the file '$currentfile'!", "lang.php?mode=compare&amp;currentfile=$currentfile");
$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");
@@ -209,133 +346,213 @@
echo '</font></center>';
print_simple_box_end();
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;
print_simple_box_start("center", "80%");
echo '<center>'.$strfilestoredin.' <strong>';
echo $uselocal ? "{$currentlang}_local" : $currentlang;
echo '</strong> ';
helpbutton('langswitchstorage', $strfilestoredinhelp, 'moodle');
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+") && ($currentlang != "en_utf8")) {
$editable = true;
fclose($f);
} else {
$editable = false;
echo "<p><font size=\"1\">".get_string("makeeditable", "", "$langdir/$currentfile")."</font></p>";
}
///added code here to prevent en_utf8 being edited
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'.lang_form_string_key($key).'" cols="'.$cols.'" rows="'.$rows.'">'.$value.'</textarea>'."\n";
} else {
if ($valuelen) {
$cols = $valuelen + 2;
}
echo '<input type="text" name="stringXXX'.lang_form_string_key($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();
//////////////////////////////////////////////////////////////////////
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
}
@@ -343,16 +560,55 @@ 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 directory name under $CFG->dataroot/lang eg cs_utf8_local
* @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
@@ -362,7 +618,6 @@ 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);
}
+1 -1
View File
@@ -186,7 +186,7 @@ $langdir/$currentfile")."</font></p>";
echo "<textarea rows=\"$fileeditorrows\" cols=\"$fileeditorcols\" name=\"filedata\">\n";
if (file_exists("$langdir/$currentfile")) {
echo htmlspecialchars(file_get_contents("$langdir/$currentfile"));
echo htmlspecialchars(file_get_contents("$langdir/$currentfile"));
} else {
echo ($filetemplate);
}
+47
View File
@@ -0,0 +1,47 @@
<?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");
$strmisc = get_string("miscellaneous");
print_header("$site->shortname: $stradministration: $strmisc", "$site->fullname",
"<a href=\"index.php\">$stradministration</a> -> $strmisc");
print_heading($strmisc);
$table->align = array ("right", "left");
$table->data[] = array('<b><a href="../files/index.php?id='.$site->id.'">'.get_string('sitefiles').'</a></b>',
get_string("adminhelpsitefiles"));
$table->data[] = array('<b><a href="stickyblocks.php">'.get_string('stickyblocks','admin')."</a></b>",
get_string('adminhelpstickyblocks'));
$table->data[] = array('<b><a href="report.php">'.get_string('reports')."</a></b>",
get_string('adminhelpreports'));
// to be enabled later
/* $table->data[] = array('<b><a href="health.php">'.get_string('healthcenter')."</a></b>",
get_string('adminhelphealthcenter'));*/
$table->data[] = array('<b><a href="environment.php">'.get_string('environment', 'admin')."</a></b>",
get_string('adminhelpenvironment'));
if (file_exists("$CFG->dirroot/$CFG->admin/$CFG->dbtype")) {
$table->data[] = array('<b><a href="'.$CFG->dbtype.'/frame.php">'.get_string('managedatabase')."</a></b>",
get_string('adminhelpmanagedatabase'));
}
print_table($table);
print_footer($site);
?>
+6 -6
View File
@@ -39,7 +39,7 @@
print_heading($strmanagemodules);
$courseaffected = false;
$coursesaffected = false;
/// If data submitted, then process and store.
@@ -149,10 +149,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;
}
// Deal with modules which are lacking the language string
if ($strmodulename == '[[modulename]]') {
$strmodulename = $module->name;
}
$modulebyname[$strmodulename] = $module;
}
ksort($modulebyname);
@@ -177,7 +177,7 @@
$settings = "";
}
$count = count_records("$module->name");
$count = count_records_select("$module->name",'course<>0');
if ($module->visible) {
$visible = "<a href=\"modules.php?hide=$module->name&amp;sesskey=$USER->sesskey\" title=\"$strhide\">".
+1 -1
View File
@@ -26,7 +26,7 @@
}
if (empty($CFG->siteidentifier)) { // Unique site identification code
set_config('siteidentifier', random_string(32));
set_config('siteidentifier', random_string(32).$_SERVER['HTTP_HOST']);
}
+3 -1
View File
@@ -9,9 +9,11 @@
$stradmin = get_string('administration');
$strreports = get_string('reports');
$strmisc = get_string('miscellaneous');
print_header($strreports, $strreports,
'<a href="index.php">'.$stradmin.'</a> -> '.$strreports);
'<a href="index.php">'.$stradmin.'</a> -> <a href="misc.php">'.$strmisc.'</a> ->'.
$strreports);
$directories = get_list_of_plugins('admin/report');
+11 -14
View File
@@ -23,7 +23,7 @@
$strreports = get_string('reports');
$strcourseoverview = get_string('courseoverview');
$strnav = '<a href="'.$CFG->wwwroot.'/admin/index.php">'.get_string('administration').'</a> -> <a href="'.$CFG->wwwroot.'/admin/report.php">'.$strreports.'</a> -> '.$strcourseoverview;
$strnav = '<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/index.php">'.get_string('administration').'</a> -> <a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/report.php">'.$strreports.'</a> -> '.$strcourseoverview;
$reportoptions = stats_get_report_options($course->id,STATS_MODE_RANKED);
@@ -75,10 +75,14 @@
$courses = get_records_sql($sql);
if (empty($courses)) {
error(get_string('statsnodata'),$CFG->wwwroot.'/admin/report/courseoverview/index.php');
error(get_string('statsnodata'),$CFG->wwwroot.'/'.$CFG->admin.'/report/courseoverview/index.php');
}
echo '<center><img src="'.$CFG->wwwroot.'/admin/report/courseoverview/reportsgraph.php?time='.$time.'&report='.$report.'&numcourses='.$numcourses.'" /></center>';
if (empty($CFG->gdversion)) {
echo "<center>(".get_string("gdneed").")</center>";
} else {
echo '<center><img src="'.$CFG->wwwroot.'/'.$CFG->admin.'/report/courseoverview/reportsgraph.php?time='.$time.'&report='.$report.'&numcourses='.$numcourses.'" /></center>';
}
$table = new object();
$table->align = array('left','center','center','center');
@@ -93,12 +97,13 @@
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);
$a[] = $c->line1;
if (isset($c->line2)) {
$a[] = print_numeric_value($c->line2);
$a[] = $c->line2;
}
if (isset($c->line3)) {
$a[] = print_numeric_value($c->line3);
$a[] = $c->line3;
}
$table->data[] = $a;
}
@@ -107,12 +112,4 @@
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;
}
?>
+47 -1
View File
@@ -5,7 +5,53 @@
}
if (!empty($CFG->enablestats)) {
echo '<a href="'.$CFG->wwwroot.'/admin/report/courseoverview/index.php">'.get_string('courseoverview').'</a>';
$strreports = get_string('reports');
$strcourseoverview = get_string('courseoverview');
print_heading("$strcourseoverview:");
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);
$course = get_site();
$statsstatus = stats_check_uptodate($course->id);
$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);
$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').'" />') ;
echo '<form action="report/courseoverview/index.php" method="post">'."\n";
print_table($table);
echo '</form>';
if ($statsstatus !== NULL) {
notify ($statsstatus);
}
}
?>
+1 -1
View File
@@ -28,7 +28,7 @@
$courses = get_records_sql($sql);
if (empty($courses)) {
error(get_string('statsnodata'),$CFG->wwwroot.'/admin/report/course/index.php');
error(get_string('statsnodata'),$CFG->wwwroot.'/'.$CFG->admin.'/report/course/index.php');
}
+63
View File
@@ -0,0 +1,63 @@
<?php // $Id$
require_once('../../../config.php');
require_once($CFG->dirroot.'/lib/statslib.php');
require_once($CFG->dirroot.'/course/report/stats/lib.php');
if (empty($CFG->enablestats)) {
error("Stats is not enabled.");
}
$courseid = required_param('course', 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);
if ($report == STATS_REPORT_USER_LOGINS) {
$courseid = SITEID; //override
}
if ($mode == STATS_MODE_RANKED) {
redirect($CFG->wwwroot.'/'.$CFG->admin.'/report.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 (!isteacher($course->id)) {
error("You need to be a teacher to use this page");
}
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');
print_footer();
?>
+16
View File
@@ -0,0 +1,16 @@
<?php //$Id$
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
if (!empty($CFG->enablestats)) {
echo '<p style="text-align:center;">';
echo '<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/report/stats/index.php?course='.$course->id.'">'.get_string('stats').'</a>';
echo '</p>';
$statsstatus = stats_check_uptodate($course->id);
if ($statsstatus !== NULL) {
notify ($statsstatus);
}
}
?>
+29 -9
View File
@@ -33,26 +33,46 @@
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<?php
$coursecount = (count_records('course') <= FRONTPAGECOURSELIMIT);
$options = array(FRONTPAGENEWS => get_string("frontpagenews"),
FRONTPAGECOURSELIST => get_string("frontpagecourselist"),
FRONTPAGECATEGORYNAMES => get_string("frontpagecategorynames"),
FRONTPAGECATEGORYCOMBO => get_string("frontpagecategorycombo"),
);
$values = array(get_string('hide'), get_string('order1', 'admin'), get_string('order2', 'admin'));
$values = array(get_string('hide'), get_string('order1', 'admin'), get_string('order2', 'admin'), get_string('order3', 'admin'), get_string('order4', 'admin'));
$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[] = get_string('order3', 'admin');
if (!$coursecount and isset($seq[FRONTPAGECOURSELIST])) {
unset($seq[FRONTPAGECOURSELIST]); //disable course list option when too many course present
}
foreach ($options as $key => $option) {
$disabled = (!$coursecount and ($key == FRONTPAGECOURSELIST));
echo "<td>$option<br />";
choose_from_menu ($values, "frontpage[$key]", isset($seq[$key])?$seq[$key]:0, '', '', 0, false, $disabled);
echo '</td>';
}
?>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td align="right"><?php print_string("frontpageformatloggedin") ?>:</td>
<td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<?php
$seq = array_flip(explode(',',$form->frontpageloggedin));
foreach ($seq as $k => $s) {
$seq[$k]++;
}
foreach ($options as $key => $option) {
echo "<td>$option<br />";
choose_from_menu ($values, "frontpage[$key]", isset($seq[$key])?$seq[$key]:0, "");
choose_from_menu ($values, "frontpageloggedin[$key]", isset($seq[$key])?$seq[$key]:0, '');
echo '</td>';
}
?>
+14 -1
View File
@@ -37,6 +37,13 @@
$form->numsections = 1; // Force the topic display for this format
}
$form->frontpageloggedin = array_flip($form->frontpageloggedin);
unset($form->frontpageloggedin[0]);
$form->frontpageloggedin = array_flip($form->frontpageloggedin);
asort($form->frontpageloggedin);
$form->frontpageloggedin = implode(',',array_flip($form->frontpageloggedin));
set_config("frontpageloggedin", $form->frontpageloggedin);
$form->timemodified = time();
if ($form->id) {
@@ -98,12 +105,18 @@
if (isset($CFG->frontpage)) {
$form->frontpage = $CFG->frontpage;
} else {
$form->frontpage = FRONTPAGECOURSELIST; // Show course list by default
set_config("frontpage", $form->frontpage);
}
if (isset($CFG->frontpageloggedin)) {
$form->frontpageloggedin = $CFG->frontpageloggedin;
} else {
$form->frontpageloggedin = $form->frontpage;
set_config("frontpageloggedin", $form->frontpageloggedin);
}
$stradmin = get_string("administration");
$strconfiguration = get_string("configuration");
$strsitesettings = get_string("sitesettings");
+3 -2
View File
@@ -34,7 +34,8 @@
$strheading = get_string('adminhelpstickyblocks');
print_header($strtitle,$strtitle,'<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/index.php">'.
get_string('admin').'</a> -> '.$strtitle);
get_string('admin').'</a> -> <a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/misc.php">'.
get_string('miscellaneous').'</a> ->'.$strtitle);
echo '<table border="0" cellpadding="3" cellspacing="0" width="100%" id="layout-table">';
echo '<tr valign="top">';
@@ -62,7 +63,7 @@
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>';
+1
View File
@@ -2,6 +2,7 @@
require_once('../config.php');
require_once($CFG->dirroot.'/mod/forum/lib.php');
require_once($CFG->libdir.'/adminlib.php');
$confirm = optional_param('confirm', 0, PARAM_BOOL);
-1
View File
@@ -264,7 +264,6 @@ if ($um->preprocess_files() && confirm_sesskey()) {
//This can be used to obtain a list of userids for existing users
notify("$user->id ".get_string('usernotaddedregistered', 'error', $username));
$userserrors++;
continue;
}
} else { // new user
+1 -1
View File
@@ -158,7 +158,7 @@
$updateuser = new object();
$updateuser->id = $user->id;
$updateuser->deleted = "1";
$updateuser->username = "$user->email.".time(); // Remember it just in case
$updateuser->username = addslashes("$user->email.".time()); // Remember it just in case
$updateuser->email = ""; // Clear this field to free it up
$updateuser->idnumber = ""; // Clear this field to free it up
$updateuser->timemodified = time();
+1 -13
View File
@@ -24,27 +24,15 @@
$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("enrolmentplugins")."</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);
?>
+417 -335
View File
@@ -1,12 +1,54 @@
<?php //$Id$
///dummy field names are used to help adding and dropping indexes. There's only 1 case now, in scorm_scoes_track
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/environmentlib.php');
require_once($CFG->dirroot.'/course/lib.php');
require_login();
// decalre once
global $enc;
$customlang = array();
$enc = array('af' => 'iso-8859-1', 'ar' => 'windows-1256', 'be' => 'windows-1251', 'bg' => 'windows-1251', 'bs' => 'windows-1250', 'ca' => 'iso-8859-1', 'cs' => 'iso-8859-2', 'da' => 'iso-8859-1', 'de' => 'iso-8859-1', 'de_du' => 'iso-8859-1', 'de_utf8' => 'utf-8', 'el' => 'windows-1253', 'en' => 'iso-8859-1', 'en_ja' => 'euc-jp', 'en_us' => 'iso-8859-1', 'en_utf8' => 'utf-8', 'es' => 'iso-8859-1', 'es_ar' => 'iso-8859-1', 'es_es' => 'iso-8859-1', 'es_mx' => 'iso-8859-1', 'et' => 'iso-8859-1', 'eu' => 'iso-8859-1', 'fa' => 'windows-1256', 'fa_utf8' => 'utf-8', 'fi' => 'iso-8859-1', 'fil' => 'iso-8859-15', 'fr' => 'iso-8859-1', 'fr_ca' => 'iso-8859-15', 'ga' => 'iso-8859-1', 'gl' => 'iso-8859-1', 'he' => 'ISO-8859-8-I', 'he_utf8' => 'utf-8', 'hi' => 'iso-8859-1', 'hr' => 'windows-1250', 'hr_utf8' => 'utf-8', 'hu' => 'iso-8859-2', 'id' => 'iso-8859-1', 'is' => 'iso-8859-1', 'it' => 'iso-8859-1', 'ja' => 'EUC-JP', 'ja_utf8' => 'UTF-8', 'ka_utf8' => 'UTF-8', 'km_utf8' => 'UTF-8', 'kn_utf8' => 'utf-8', 'ko' => 'EUC-KR', 'ko_utf8' => 'UTF-8', 'lt' => 'windows-1257', 'lv' => 'ISO-8859-4', 'mi_nt' => 'iso-8859-1', 'mi_tn_utf8' => 'utf-8', 'ms' => 'iso-8859-1', 'nl' => 'iso-8859-1', 'nn' => 'iso-8859-1', 'no' => 'iso-8859-1', 'no_gr' => 'iso-8859-1', 'pl' => 'iso-8859-2', 'pt' => 'iso-8859-1', 'pt_br' => 'iso-8859-1', 'ro' => 'iso-8859-2', 'ru' => 'windows-1251', 'sk' => 'iso-8859-2', 'sl' => 'iso-8859-2', 'sl_utf8' => 'utf-8', 'so' => 'iso-8859-1', 'sq' => 'iso-8859-1', 'sr_utf8' => 'utf-8', 'sv' => 'iso-8859-1', 'th' => 'TIS-620', 'th_utf8' => 'UTF-8', 'tl' => 'iso-8859-15', 'tl_utf8' => 'UTF-8', 'tr' => 'iso-8859-9', 'uk' => 'windows-1251', 'vi_utf8' => 'UTF-8', 'zh_cn' => 'GB18030', 'zh_cn_utf8' => 'UTF-8', 'zh_tw' => 'Big5', 'zh_tw_utf8' => 'UTF-8');
/**************************************
* Custom lang pack handling *
**************************************/
// scan list of langs, including customs packs
$langs = get_list_of_languages();
// foreach lang
foreach ($langs as $lang => $lang1) {
if (in_array($lang, array_keys($enc))) {
// if already in array, ignore
continue;
}
// if this lang has got a charset
if ($result = get_string_from_file('thischarset',$CFG->dirroot.'/lang/'.$lang.'/moodle.php', "\$resultstring")) {
eval($result);
$enc[$lang] = $resultstring;
} else if ($result = get_string_from_file('parentlanguage',$CFG->dirroot.'/lang/'.$lang.'/moodle.php',"\$resultstring")) {
// else if there's a parent lang we can use
eval($result);
$enc[$lang] = $enc[$resultstring];
} else {
notify ('unknown lang pack detected '.$lang);
}
}
/**************************************
* End custom lang pack handling *
**************************************/
if (!isadmin()) {
error('Only admins can access this page');
}
@@ -45,9 +87,12 @@
print_simple_box_end();
db_migrate2utf8();
print_heading('db unicode migration has been completed!');
unlink($filename); //no longer in maintenance mode
if (!get_config('', 'migrate_maintmode')) { // already in maint mode
unlink($filename); //no longer in maintenance mode
}
delete_records('config', 'name', 'migrate_maintmode');
@require_logout();
print_continue($CFG->wwwroot.'/admin/langimport.php');
print_continue($CFG->wwwroot.'/'.$CFG->admin.'/langimport.php');
}
//else if $migrate
@@ -73,12 +118,16 @@
//put the site in maintenance mode
check_dir_exists($CFG->dataroot.'/'.SITEID, true);
if (touch($filename)) {
$file = fopen($filename, 'w');
fwrite($file, get_string('maintinprogress','admin'));
fclose($file);
if (file_exists($filename)) {
set_config('migrate_maintmode', 1); // already in maintenance mode
} else {
notify (get_string('maintfileopenerror','admin'));
if (touch($filename)) {
$file = fopen($filename, 'w');
fwrite($file, get_string('maintinprogress','admin'));
fclose($file);
} else {
notify (get_string('maintfileopenerror','admin'));
}
}
//print second confirmation box
echo '<form name="migratefrom" action="utfdbmigrate.php" method="POST">';
@@ -107,7 +156,6 @@
}
//print the "i-know-what-lang-to-use" menu
$enc = array('af' => 'iso-8859-1', 'ar' => 'windows-1256', 'be' => 'windows-1251', 'bg' => 'windows-1251', 'bs' => 'windows-1250', 'ca' => 'iso-8859-1', 'cs' => 'iso-8859-2', 'da' => 'iso-8859-1', 'de' => 'iso-8859-1', 'de_du' => 'iso-8859-1', 'de_utf8' => 'utf-8', 'el' => 'windows-1253', 'en' => 'iso-8859-1', 'en_ja' => 'euc-jp', 'en_us' => 'iso-8859-1', 'en_utf8' => 'utf-8', 'es' => 'iso-8859-1', 'es_ar' => 'iso-8859-1', 'es_es' => 'iso-8859-1', 'es_mx' => 'iso-8859-1', 'et' => 'iso-8859-1', 'eu' => 'iso-8859-1', 'fa' => 'windows-1256', 'fa_utf8' => 'utf-8', 'fi' => 'iso-8859-1', 'fil' => 'iso-8859-15', 'fr' => 'iso-8859-1', 'fr_ca' => 'iso-8859-15', 'ga' => 'iso-8859-1', 'gl' => 'iso-8859-1', 'he' => 'ISO-8859-8-I', 'he_utf8' => 'utf-8', 'hi' => 'iso-8859-1', 'hr' => 'windows-1250', 'hr_utf8' => 'utf-8', 'hu' => 'iso-8859-2', 'id' => 'iso-8859-1', 'it' => 'iso-8859-1', 'ja' => 'EUC-JP', 'ja_utf8' => 'UTF-8', 'ka_utf8' => 'UTF-8', 'km_utf8' => 'UTF-8', 'kn_utf8' => 'utf-8', 'ko' => 'EUC-KR', 'ko_utf8' => 'UTF-8', 'lt' => 'windows-1257', 'lv' => 'ISO-8859-4', 'mi_nt' => 'iso-8859-1', 'mi_tn_utf8' => 'utf-8', 'ms' => 'iso-8859-1', 'nl' => 'iso-8859-1', 'nn' => 'iso-8859-1', 'no' => 'iso-8859-1', 'no_gr' => 'iso-8859-1', 'pl' => 'iso-8859-2', 'pt' => 'iso-8859-1', 'pt_br' => 'iso-8859-1', 'ro' => 'iso-8859-2', 'ru' => 'windows-1251', 'sk' => 'iso-8859-2', 'sl' => 'iso-8859-2', 'sl_utf8' => 'utf-8', 'so' => 'iso-8859-1', 'sq' => 'iso-8859-1', 'sr_utf8' => 'utf-8', 'sv' => 'iso-8859-1', 'th' => 'TIS-620', 'th_utf8' => 'UTF-8', 'tl' => 'iso-8859-15', 'tl_utf8' => 'UTF-8', 'tr' => 'iso-8859-9', 'uk' => 'windows-1251', 'vi_utf8' => 'UTF-8', 'zh_cn' => 'GB18030', 'zh_cn_utf8' => 'UTF-8', 'zh_tw' => 'Big5', 'zh_tw_utf8' => 'UTF-8');
echo '<br />The whole site is in this encoding: (leave blank if you are not sure)';
echo '<select name="globallang"><option value="">I am not sure</option>';
@@ -178,8 +226,12 @@ function db_migrate2utf8(){ //Eloy: Perhaps some type of limit parameter here
//mtrace() and return 0. (showing the current
//table/field/recordid)
global $db, $CFG, $dbtablename, $fieldname, $record;
global $db, $CFG, $dbtablename, $fieldname, $record, $processedrecords;
$debug = ($CFG->debug > 7);
//echo date("H:i:s");
ignore_user_abort(false); // see bug report 5352. This should kill this thread as soon as user aborts.
@set_time_limit(0);
@ob_implicit_flush(true);
@@ -191,8 +243,22 @@ function db_migrate2utf8(){ //Eloy: Perhaps some type of limit parameter here
$ignoretables = array(); //list of tables to ignore, optional
//one gigantic array to hold all db table information read from all the migrate2utf8.xml file.
require_once($CFG->dirroot.'/lib/xmlize.php');
$xmls = utf_get_xml(1);
$tablestoconvert = 0; // total number of tables to convert
foreach ($xmls as $xml) { ///foreach xml file, we must get a list of tables
$dbtables = $xml['DBMIGRATION']['#']['TABLES'][0]['#']['TABLE']; //real db tables
foreach ($dbtables as $dbtable) {
$tablestoconvert++;
}
}
// progress bar handling
// first let's find out how many tables there are
$done = 0;
print_progress($done, 158, 5, 1);
print_progress($done, $tablestoconvert, 5, 1);
$textlib = textlib_get_instance(); //only 1 reference
@@ -279,18 +345,10 @@ function db_migrate2utf8(){ //Eloy: Perhaps some type of limit parameter here
$crash->table = $crashdata[0];
$crash->field = $crashdata[1];
$crash->record = $crashdata[2];
print_heading('Resume information :');
echo '<br>Resuming from @ table : '.$crash->table;
echo '<br>Resuming from @ field : '.$crash->field;
echo '<br>Resuming from @ record : '.$crash->record;
notify("Resuming migration from: $crash->table / .$crash->field, Record: $crash->record");
}
require_once($CFG->dirroot.'/lib/xmlize.php');
//one gigantic array to hold all db table information read from all the migrate2utf8.xml file.
$xmls = utf_get_xml(1);
/************************************************************************
* Now we got all our tables in order *
************************************************************************/
@@ -302,7 +360,7 @@ function db_migrate2utf8(){ //Eloy: Perhaps some type of limit parameter here
foreach ($dbtables as $dbtable) {
$done++;
print_progress($done, 158, 5, 1);
print_progress($done, $tablestoconvert, 5, 1);
$dbtablename = $dbtable['@']['name'];
@@ -315,6 +373,7 @@ function db_migrate2utf8(){ //Eloy: Perhaps some type of limit parameter here
}
if ($crash && ($dbtablename != $crash->table)) { //resuming from crash
$done++; // need to update progress bar
continue;
}
@@ -322,348 +381,372 @@ function db_migrate2utf8(){ //Eloy: Perhaps some type of limit parameter here
print_heading("<br><b>Processsing db table ".$dbtablename.'...</b>');
}
if (!empty($dbtable['#']) && ($fields = $dbtable['#']['FIELDS'][0]['#']['FIELD']) and (!in_array($dbtablename, $ignoretables))) {
/**********************************************************
* This is the by pass structure. It allows us to process *
* tables on row basis instead of column/field basis *
* It relies on a single function in migrate2utf8.php *
**********************************************************/
$colnames = array();
$coltypes = array(); //array to hold all column types for the table
$collengths = array(); //array to hold all column lengths for the table
$defaults = array(); //array to hold defaults, if any
//reset holders
$addindexarray = array();
$adduniqueindexarray = array();
$addprimaryarray = array();
/// first, check to see if there's a function for the whole table. By pass point (1)
if (file_exists($CFG->dirroot.'/'.$dir.'/db/migrate2utf8.php')) {
require_once($CFG->dirroot.'/'.$dir.'/db/migrate2utf8.php');
// this is a function to process table on role basis, e.g. user table in moodorg
$tablefunction = 'migrate2utf8_'.$dbtablename;
}
if ($CFG->dbtype=='mysql' && function_exists($tablefunction)) {
$tablefunction($dbtable['#']['FIELDS'][0]['#']['FIELD'], $crash, $debug, $maxrecords, $done, $tablestoconvert); // execute it.
} else {
foreach ($fields as $field){
/******************************************************
* No function for converting whole table, we proceed *
******************************************************/
if (!empty($dbtable['#']) && ($fields = $dbtable['#']['FIELDS'][0]['#']['FIELD']) and (!in_array($dbtablename, $ignoretables))) {
//if in crash state, and field name is not the same as crash field name
$colnames = array();
$coltypes = array(); //array to hold all column types for the table
$collengths = array(); //array to hold all column lengths for the table
$defaults = array(); //array to hold defaults, if any
//reset holders
$addindexarray = array();
$adduniqueindexarray = array();
$addprimaryarray = array();
$fieldname = isset($field['@']['name'])?$field['@']['name']:"";
$method = isset($field['@']['method'])?$field['@']['method']:"";
$type = isset($field['@']['type'])?$field['@']['type']:"";
$length = isset($field['@']['length'])?$field['@']['length']:"";
foreach ($fields as $field){
if ($crash && ($crash->field != $fieldname)) {
continue;
}
//if in crash state, and field name is not the same as crash field name
$dropindex = isset($field['@']['dropindex'])?$field['@']['dropindex']:"";
$addindex = isset($field['@']['addindex'])?$field['@']['addindex']:"";
$adduniqueindex = isset($field['@']['adduniqueindex'])?$field['@']['adduniqueindex']:"";
$fieldname = isset($field['@']['name'])?$field['@']['name']:"";
$method = isset($field['@']['method'])?$field['@']['method']:"";
$type = isset($field['@']['type'])?$field['@']['type']:"";
$length = isset($field['@']['length'])?$field['@']['length']:"";
$dropprimary = isset($field['@']['dropprimary'])?$field['@']['dropprimary']:"";
$addprimary = isset($field['@']['addprimary'])?$field['@']['addprimary']:"";
$default = isset($field['@']['default'])?"'".$field['@']['default']."'":"''";
if ($fieldname != 'dummy') {
$colnames[] = $fieldname;
$coltypes[] = $type;
$collengths[]= $length;
}
if ($debug) {
echo "<br>--><b>processing db field ".$fieldname.'</b>';
echo "<br>---><b>method ".$method.'</b>';
}
if ($CFG->dbtype == 'mysql') {
/* Drop the index, because with index on, you can't change it to longblob */
if ($dropindex){ //drop index if index is varchar, text etc type
$SQL = 'ALTER TABLE '.$prefix.$dbtablename.' DROP INDEX '.$dropindex.';';
$SQL1 = 'ALTER TABLE '.$prefix.$dbtablename.' DROP INDEX '.$CFG->prefix.$dropindex.';'; // see bug 5205
if ($debug) {
$db->debug=999;
}
execute_sql($SQL, false); // see bug 5205
execute_sql($SQL1, false); // see bug 5205
if ($debug) {
$db->debug=0;
}
} else if ($dropprimary) { // drop primary key
$SQL = 'ALTER TABLE '.$prefix.$dbtablename.' DROP PRIMARY KEY;';
if ($debug) {
$db->debug=999;
}
execute_sql($SQL, $debug);
if ($debug) {
$db->debug=0;
}
if ($crash && ($crash->field != $fieldname)) {
continue;
}
/* Change to longblob, serves 2 purposes:
1. column loses encoding, so when we finally change it to unicode,
mysql does not do a double convertion
2. longblobs puts no limit (ok, not really but it's large enough)
to handle most of the problems such as in bug 5194
*/
$SQL = 'ALTER TABLE '.$prefix.$dbtablename;
$SQL.= ' CHANGE '.$fieldname.' '.$fieldname.' LONGBLOB';
$dropindex = isset($field['@']['dropindex'])?$field['@']['dropindex']:"";
$addindex = isset($field['@']['addindex'])?$field['@']['addindex']:"";
$adduniqueindex = isset($field['@']['adduniqueindex'])?$field['@']['adduniqueindex']:"";
$dropprimary = isset($field['@']['dropprimary'])?$field['@']['dropprimary']:"";
$addprimary = isset($field['@']['addprimary'])?$field['@']['addprimary']:"";
$default = isset($field['@']['default'])?"'".$field['@']['default']."'":"''";
/*
if ($length > 0) {
$SQL.='('.$length.') ';
}
$SQL .= ' CHARACTER SET binary NOT NULL DEFAULT '.$default.';';
*/
if ($debug) {
$db->debug=999;
}
if ($fieldname != 'dummy') {
execute_sql($SQL, $debug);
$colnames[] = $fieldname;
$coltypes[] = $type;
$collengths[]= $length;
}
if ($debug) {
$db->debug=0;
echo "<br>--><b>processing db field ".$fieldname.'</b>';
echo "<br>---><b>method ".$method.'</b>';
}
}
$patterns[]='/RECORDID/'; //for preg_replace
$patterns[]='/\{\$CFG\-\>prefix\}/i'; //same here
if ($method == 'PLAIN_SQL_UPDATE') {
$sqldetectuser = $field['#']['SQL_DETECT_USER'][0]['#'];
$sqldetectcourse = $field['#']['SQL_DETECT_COURSE'][0]['#'];
}
else if ($method == 'PHP_FUNCTION') {
$phpfunction = 'migrate2utf8_'.$dbtablename.'_'.$fieldname;
}
///get the total number of records for this field
// could not use count_records because it addes prefix to adodb_logsql
$totalrecords = count_records_sql("select count(*) from {$prefix}$dbtablename");
$counter = 0;
$recordsetsize = 4;
if ($CFG->dbtype == 'mysql') {
if ($crash) { //if resuming from crash
//find the number of records with id smaller than the crash id
$indexSQL = 'SELECT COUNT(*) FROM '.$prefix.$dbtablename.' WHERE id < '.$crash->record;
$counter = count_records_sql($indexSQL);
}
/* Drop the index, because with index on, you can't change it to longblob */
if ($debug) {
echo "<br>Total number of records is ..".$totalrecords;
echo "<br/>Counter is $counter";
}
if ($dropindex){ //drop index if index is varchar, text etc type
$SQL = 'ALTER TABLE '.$prefix.$dbtablename.' DROP INDEX '.$dropindex.';';
$SQL1 = 'ALTER TABLE '.$prefix.$dbtablename.' DROP INDEX '.$CFG->prefix.$dropindex.';'; // see bug 5205
if ($debug) {
$db->debug=999;
}
execute_sql($SQL, false); // see bug 5205
execute_sql($SQL1, false); // see bug 5205
/**************************
* converting each record *
**************************/
while(($counter < $totalrecords) and ($fieldname !='dummy') and ($method!='NO_CONV')) { //while there is still something
$SQL = 'SELECT * FROM '.$prefix.$dbtablename.' ORDER BY id ASC '.sql_paging_limit($counter, $recordsetsize);
if ($records = get_records_sql($SQL)) {
foreach ($records as $record) {
if ($debug) {
$db->debug=0;
}
} else if ($dropprimary) { // drop primary key
$SQL = 'ALTER TABLE '.$prefix.$dbtablename.' DROP PRIMARY KEY;';
if ($debug) {
$db->debug=999;
}
execute_sql($SQL, $debug);
if ($debug) {
$db->debug=0;
}
}
//if we are up this far, either no crash, or crash with same table, field name.
if ($crash){
if ($crash->record != $record->id) { //might set to < just in case record is deleted
continue;
} else {
$crash = 0;
print_heading('recovering from '.$dbtablename.'--'.$fieldname.'--'.$record->id);
/* Change to longblob, serves 2 purposes:
1. column loses encoding, so when we finally change it to unicode,
mysql does not do a double convertion
2. longblobs puts no limit (ok, not really but it's large enough)
to handle most of the problems such as in bug 5194
*/
$SQL = 'ALTER TABLE '.$prefix.$dbtablename;
$SQL.= ' CHANGE '.$fieldname.' '.$fieldname.' LONGBLOB';
/*
if ($length > 0) {
$SQL.='('.$length.') ';
}
$SQL .= ' CHARACTER SET binary NOT NULL DEFAULT '.$default.';';
*/
if ($debug) {
$db->debug=999;
}
if ($fieldname != 'dummy') {
execute_sql($SQL, $debug);
}
if ($debug) {
$db->debug=0;
}
}
$patterns[]='/RECORDID/'; //for preg_replace
$patterns[]='/\{\$CFG\-\>prefix\}/i'; //same here
if ($method == 'PLAIN_SQL_UPDATE') {
$sqldetectuser = $field['#']['SQL_DETECT_USER'][0]['#'];
$sqldetectcourse = $field['#']['SQL_DETECT_COURSE'][0]['#'];
}
else if ($method == 'PHP_FUNCTION') {
$phpfunction = 'migrate2utf8_'.$dbtablename.'_'.$fieldname;
}
///get the total number of records for this field
// could not use count_records because it addes prefix to adodb_logsql
$totalrecords = count_records_sql("select count(*) from {$prefix}$dbtablename");
$counter = 0;
$recordsetsize = 50;
if ($crash) { //if resuming from crash
//find the number of records with id smaller than the crash id
$indexSQL = 'SELECT COUNT(*) FROM '.$prefix.$dbtablename.' WHERE id < '.$crash->record;
$counter = count_records_sql($indexSQL);
}
if ($debug) {
echo "<br>Total number of records is ..".$totalrecords;
echo "<br/>Counter is $counter";
}
/**************************
* converting each record *
**************************/
while(($counter < $totalrecords) and ($fieldname !='dummy') and ($method!='NO_CONV')) { //while there is still something
$SQL = 'SELECT * FROM '.$prefix.$dbtablename.' ORDER BY id ASC '.sql_paging_limit($counter, $recordsetsize);
if ($records = get_records_sql($SQL)) {
foreach ($records as $record) {
//if we are up this far, either no crash, or crash with same table, field name.
if ($crash){
if ($crash->record != $record->id) { //might set to < just in case record is deleted
continue;
} else {
$crash = 0;
}
}
$migrationconfig = get_record('config','name','dbmigration');
$migrationconfig->name = 'dbmigration';
$migrationconfig->value = $dbtablename.'##'.$fieldname.'##'.$record->id;
update_record('config',$migrationconfig);
$replacements = array(); //manual refresh
$replacements[] = $record->id;
$replacements[] = $prefix;
if (!empty($record->{$fieldname})) { //only update if not empty
switch ($method){
case 'PLAIN_SQL_UPDATE': //use the 2 statements to update
if ($debug) {
$db->debug=999;
}
//if global lang is set, we just use that
if ($globallang) {
$fromenc = $globallang;
} else {
$userid = get_record_sql(preg_replace($patterns, $replacements, $sqldetectuser));
$courseid = get_record_sql(preg_replace($patterns, $replacements, $sqldetectcourse));
$sitelang = $CFG->lang;
$courselang = get_course_lang(isset($courseid->course)?$courseid->course:1);
$userlang = get_user_lang(isset($userid->userid)?$userid->userid:1);
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
}
//only update if non utf8
if (($fromenc != 'utf-8') && ($fromenc != 'UTF-8')) {
$result = utfconvert($record->{$fieldname}, $fromenc);
$newrecord = new object;
$newrecord->id = $record->id;
$newrecord->{$fieldname} = $result;
migrate2utf8_update_record($dbtablename,$newrecord);
}
if ($debug) {
$db->debug=0;
}
break;
case 'PHP_FUNCTION': //use the default php function to execute
if ($debug) {
$db->debug=999;
}
require_once($CFG->dirroot.'/'.$dir.'/db/migrate2utf8.php');
$phpfunction($record->id);
if ($debug) {
$db->debug=0;
}
break;
default: //no_conv, don't do anything ;-)
break;
}
}
$counter++;
if ($maxrecords) {
if ($processedrecords == $maxrecords) {
notify($maxrecords.' records processed. Migration Process halted');
print_continue('utfdbmigrate.php?confirm=1&amp;maxrecords='.$maxrecords.'&amp;sesskey='.sesskey());
print_footer();
die();
}
}
$processedrecords++;
//print some output once in a while
if (($processedrecords) % 1000 == 0) {
print_progress($done, $tablestoconvert, 5, 1,
'Processing: '.$dbtablename.'/'.$fieldname.' ');
}
}
$migrationconfig = get_record('config','name','dbmigration');
$migrationconfig->name = 'dbmigration';
$migrationconfig->value = $dbtablename.'##'.$fieldname.'##'.$record->id;
update_record('config',$migrationconfig);
$replacements = array(); //manual refresh
$replacements[] = $record->id;
$replacements[] = $prefix;
switch ($method){
case 'PLAIN_SQL_UPDATE': //use the 2 statements to update
if (!empty($record->{$fieldname})) { //only update if not empty
if ($debug) {
$db->debug=999;
}
//if global lang is set, we just use that
if ($globallang) {
$fromenc = $globallang;
} else {
$userid = get_record_sql(preg_replace($patterns, $replacements, $sqldetectuser));
$courseid = get_record_sql(preg_replace($patterns, $replacements, $sqldetectcourse));
$sitelang = $CFG->lang;
$courselang = get_course_lang(isset($courseid->course)?$courseid->course:1);
$userlang = get_user_lang(isset($userid->userid)?$userid->userid:1);
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
}
//only update if non utf8
if (($fromenc != 'utf-8') && ($fromenc != 'UTF-8')) {
$result = utfconvert($record->{$fieldname}, $fromenc);
$newrecord = new object;
$newrecord->id = $record->id;
$newrecord->{$fieldname} = $result;
migrate2utf8_update_record($dbtablename,$newrecord);
}
if ($debug) {
$db->debug=0;
}
}
break;
case 'PHP_FUNCTION': //use the default php function to execute
if ($debug) {
$db->debug=999;
}
require_once($CFG->dirroot.'/'.$dir.'/db/migrate2utf8.php');
$phpfunction($record->id);
if ($debug) {
$db->debug=0;
}
break;
default: //no_conv, don't do anything ;-)
break;
}
$counter++;
if ($maxrecords) {
if ($processedrecords == $maxrecords) {
notify($maxrecords.' records processed. Migration Process halted');
print_continue('utfdbmigrate.php?confirm=1&amp;maxrecords='.$maxrecords.'&amp;sesskey='.sesskey());
print_footer();
die();
}
}
$processedrecords++;
//print some output once in a while
if (($processedrecords) % 5000 == 0) {
echo 'Processing...'.$dbtablename.'...'.$fieldname.'...'.$record->id;
}else {
if ($debug) {
notify('no records found!');
}
}
}else {
} //close the while loop
/********************
* Drop index here **
********************/
if ($CFG->dbtype == 'mysql') {
/*********************************
* Change column encoding 2 phase*
*********************************/
/*
$SQL = 'ALTER TABLE '.$CFG->prefix.$dbtablename;
$SQL.= ' CHANGE '.$fieldname.' '.$fieldname.' LONGTEXT';
// if ($length > 0) {
// $SQL.='('.$length.') ';
// }
$SQL .= ' CHARACTER SET binary NOT NULL DEFAULT '.$default.';';
if ($debug) {
notify('no records found!');
$db->debug=999;
}
if ($fieldname != 'dummy') {
execute_sql($SQL, $debug);
}
if ($debug) {
$db->debug=0;
}*/
//phase 2
$SQL = 'ALTER TABLE '.$prefix.$dbtablename;
$SQL.= ' CHANGE '.$fieldname.' '.$fieldname.' '.$type;
if ($length > 0) {
$SQL.='('.$length.') ';
}
$SQL.=' CHARACTER SET utf8 NOT NULL DEFAULT '.$default.';';
if ($debug) {
$db->debug=999;
}
if ($fieldname != 'dummy') {
execute_sql($SQL, $debug);
}
if ($debug) {
$db->debug=0;
}
/********************************************
* build an array to add index back together*
********************************************/
if ($addindex){
$addindexarray[] = $addindex;
} else if ($adduniqueindex) {
$adduniqueindexarray[] = $adduniqueindex;
} else if ($addprimary) {
$addprimaryarray[] = $addprimary;
}
} else {
//posgresql code here
//No we don't need to do anything here
}
}
/********************************
* Adding the index back *
********************************/
$alter = 0;
if ($CFG->dbtype=='mysql'){
$SQL = 'ALTER TABLE '.$prefix.$dbtablename;
if (!empty($addindexarray)) {
foreach ($addindexarray as $aidx){
$SQL .= ' ADD INDEX '.$aidx.',';
$alter++;
}
}
} //close the while loop
/********************
* Drop index here **
********************/
if (!empty($adduniqueindexarray)) {
foreach ($adduniqueindexarray as $auidx){
$SQL .= ' ADD UNIQUE INDEX '.$auidx.',';
$alter++;
}
}
if ($CFG->dbtype == 'mysql') {
if (!empty($addprimaryarray)) {
foreach ($addprimaryarray as $apm){
$SQL .= ' ADD PRIMARY KEY '.$apm.',';
$alter++;
}
}
/*********************************
* Change column encoding 2 phase*
*********************************/
/*
$SQL = 'ALTER TABLE '.$CFG->prefix.$dbtablename;
$SQL.= ' CHANGE '.$fieldname.' '.$fieldname.' LONGTEXT';
// if ($length > 0) {
// $SQL.='('.$length.') ';
// }
$SQL .= ' CHARACTER SET binary NOT NULL DEFAULT '.$default.';';
if ($debug) {
$db->debug=999;
}
if ($fieldname != 'dummy') {
execute_sql($SQL, $debug);
}
if ($debug) {
$db->debug=0;
}*/
//phase 2
$SQL = 'ALTER TABLE '.$prefix.$dbtablename;
$SQL.= ' CHANGE '.$fieldname.' '.$fieldname.' '.$type;
if ($length > 0) {
$SQL.='('.$length.') ';
}
$SQL.=' CHARACTER SET utf8 NOT NULL DEFAULT '.$default.';';
if ($debug) {
$db->debug=999;
}
if ($fieldname != 'dummy') {
execute_sql($SQL, $debug);
}
if ($debug) {
$db->debug=0;
}
/********************************************
* build an array to add index back together*
********************************************/
if ($addindex){
$addindexarray[] = $addindex;
} else if ($adduniqueindex) {
$adduniqueindexarray[] = $adduniqueindex;
} else if ($addprimary) {
$addprimaryarray[] = $addprimary;
}
$SQL = rtrim($SQL, ', ');
$SQL.=';';
} else {
///posgresql code here
///No we don't need to do anything here
//posgresql code here
//No we don't need to do anything here
}
}
/********************************
* Adding the index back *
********************************/
$alter = 0;
if ($CFG->dbtype=='mysql'){
$SQL = 'ALTER TABLE '.$prefix.$dbtablename;
if (!empty($addindexarray)) {
foreach ($addindexarray as $aidx){
$SQL .= ' ADD INDEX '.$aidx.',';
$alter++;
if ($alter) {
if ($debug) {
$db->debug=999;
}
execute_sql($SQL, $debug);
if ($debug) {
$db->debug=0;
}
}
if (!empty($adduniqueindexarray)) {
foreach ($adduniqueindexarray as $auidx){
$SQL .= ' ADD UNIQUE INDEX '.$auidx.',';
$alter++;
}
}
if (!empty($addprimaryarray)) {
foreach ($addprimaryarray as $apm){
$SQL .= ' ADD PRIMARY KEY '.$apm.',';
$alter++;
}
}
$SQL = rtrim($SQL, ', ');
$SQL.=';';
} else {
///posgresql code here
///No we don't need to do anything here
}
if ($alter) {
if ($debug) {
$db->debug=999;
}
execute_sql($SQL, $debug);
if ($debug) {
$db->debug=0;
}
}
} //if there are fields
} //if there are fields
} /// Point 1 - bypass should end here.
/************************************
* now we modify the table encoding *
************************************/
@@ -723,8 +806,8 @@ function db_migrate2utf8(){ //Eloy: Perhaps some type of limit parameter here
}
//finish the javascript bar
$done=159;
print_progress($done, 158, 5, 1);
$done = $tablestoconvert;
print_progress($done, $tablestoconvert, 5, 1);
//prints the list of langs used in this site
print_simple_box_start('center','50%');
@@ -737,7 +820,7 @@ function db_migrate2utf8(){ //Eloy: Perhaps some type of limit parameter here
echo $lang.', ';
}
}
echo '</b><br/><a href="'.$CFG->wwwroot.'/admin/langimport.php">Language Import Utility</a></div>';
echo '</b><br/><a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/langimport.php">Language Import Utility</a></div>';
print_simple_box_end();
delete_records('config','name','langsused');
@@ -756,7 +839,8 @@ function db_migrate2utf8(){ //Eloy: Perhaps some type of limit parameter here
//set the final flag
migrate2utf8_set_config('unicodedb','true'); //this is the main flag for unicode db
//echo date("H:i:s");
}
@@ -809,7 +893,7 @@ function get_main_teacher_lang($courseid) {
function get_original_encoding($sitelang, $courselang, $userlang){
global $CFG;
global $CFG, $enc;
$lang = '';
if ($courselang) {
@@ -825,8 +909,6 @@ function get_original_encoding($sitelang, $courselang, $userlang){
error ('no language found!');
}
$enc = array('af' => 'iso-8859-1', 'ar' => 'windows-1256', 'be' => 'windows-1251', 'bg' => 'windows-1251', 'bs' => 'windows-1250', 'ca' => 'iso-8859-1', 'cs' => 'iso-8859-2', 'da' => 'iso-8859-1', 'de' => 'iso-8859-1', 'de_du' => 'iso-8859-1', 'de_utf8' => 'utf-8', 'el' => 'windows-1253', 'en' => 'iso-8859-1', 'en_ja' => 'euc-jp', 'en_us' => 'iso-8859-1', 'en_utf8' => 'utf-8', 'es' => 'iso-8859-1', 'es_ar' => 'iso-8859-1', 'es_es' => 'iso-8859-1', 'es_mx' => 'iso-8859-1', 'et' => 'iso-8859-1', 'eu' => 'iso-8859-1', 'fa' => 'windows-1256', 'fa_utf8' => 'utf-8', 'fi' => 'iso-8859-1', 'fil' => 'iso-8859-15', 'fr' => 'iso-8859-1', 'fr_ca' => 'iso-8859-15', 'ga' => 'iso-8859-1', 'gl' => 'iso-8859-1', 'he' => 'ISO-8859-8-I', 'he_utf8' => 'utf-8', 'hi' => 'iso-8859-1', 'hr' => 'windows-1250', 'hr_utf8' => 'utf-8', 'hu' => 'iso-8859-2', 'id' => 'iso-8859-1', 'it' => 'iso-8859-1', 'ja' => 'EUC-JP', 'ja_utf8' => 'UTF-8', 'ka_utf8' => 'UTF-8', 'km_utf8' => 'UTF-8', 'kn_utf8' => 'utf-8', 'ko' => 'EUC-KR', 'ko_utf8' => 'UTF-8', 'lt' => 'windows-1257', 'lv' => 'ISO-8859-4', 'mi_nt' => 'iso-8859-1', 'mi_tn_utf8' => 'utf-8', 'ms' => 'iso-8859-1', 'nl' => 'iso-8859-1', 'nn' => 'iso-8859-1', 'no' => 'iso-8859-1', 'no_gr' => 'iso-8859-1', 'pl' => 'iso-8859-2', 'pt' => 'iso-8859-1', 'pt_br' => 'iso-8859-1', 'ro' => 'iso-8859-2', 'ru' => 'windows-1251', 'sk' => 'iso-8859-2', 'sl' => 'iso-8859-2', 'sl_utf8' => 'utf-8', 'so' => 'iso-8859-1', 'sq' => 'iso-8859-1', 'sr_utf8' => 'utf-8', 'sv' => 'iso-8859-1', 'th' => 'TIS-620', 'th_utf8' => 'UTF-8', 'tl' => 'iso-8859-15', 'tl_utf8' => 'UTF-8', 'tr' => 'iso-8859-9', 'uk' => 'windows-1251', 'vi_utf8' => 'UTF-8', 'zh_cn' => 'GB18030', 'zh_cn_utf8' => 'UTF-8', 'zh_tw' => 'Big5', 'zh_tw_utf8' => 'UTF-8');
if ($enc[$lang]) {
return $enc[$lang];
} else {
@@ -862,7 +944,7 @@ function log_the_problem_somewhere() { //Eloy: Nice function, perhaps we could
}
}
//only this function should be used during db migraton, because of addslashes at the end of the convertion
// only this function should be used during db migraton, because of addslashes at the end of the convertion
function utfconvert($string, $enc, $slash=true) {
global $textlib;
if ($result = $textlib->convert($string, $enc)) {
@@ -1020,7 +1102,7 @@ function utf_get_xml ($mode=0) { // if mode is 1, do not perform check for scrip
foreach ($enrols as $enrol){
if (file_exists($CFG->dirroot.'/enrol/'.$enrol.'/db/migrate2utf8.xml')) {
$xmls[] = xmlize(file_get_contents($CFG->dirroot.'/enrol/'.$enrol.'/db/migrate2utf8.xml'));
$xmls[] = xmlize(file_get_contents($CFG->dirroot.'/enrol/'.$enrol.'/db/migrate2utf8.xml'));
}
}
+8
View File
@@ -121,6 +121,14 @@ Optional:
Userinformation in array ( name => value, ....
or false in case of error
auth_validate_form(&$form, &$err)
Validate form data.
Returns:
Bool. Manipulates $form and $err arrays in place
COURSE CREATING
auth_iscreator($username)
+3 -8
View File
@@ -36,14 +36,9 @@
</form>
<?php } ?>
<?php if ($CFG->changepassword or is_internal_auth() ) {
if (is_internal_auth()) {
$changepassword = "forgot_password.php";
$changebuttonname = get_string("senddetails");
} else {
$changepassword = $CFG->changepassword;
$changebuttonname = get_string("passwordrecovery");
}
<?php if (is_internal_auth() ) {
$changepassword = "forgot_password.php";
$changebuttonname = get_string("senddetails");
?>
<hr width="80%" />
<p><?php print_string("forgotten") ?></p>
+3 -9
View File
@@ -18,7 +18,7 @@ defined('MOODLE_INTERNAL') or die('Direct access to this script is forbidden.');
if (empty($CFG->loginhttps)) {
$wwwroot = $CFG->wwwroot;
} else {
$wwwroot = str_replace('http','https',$CFG->wwwroot);
$wwwroot = str_replace('http:','https:',$CFG->wwwroot);
}
$langmenu = popup_form ("$wwwroot/login/index.php?lang=", $langs, "chooselang", $currlang, "", "", "", true);
}
@@ -109,10 +109,7 @@ defined('MOODLE_INTERNAL') or die('Direct access to this script is forbidden.');
//Select password change url
if (is_internal_auth() || $CFG->{'auth_'.$USER->auth.'_stdchangepassword'}){
$passwordchangeurl=$CFG->wwwroot.'/login/change_password.php';
} elseif($CFG->changepassword) {
$passwordchangeurl=$CFG->changepassword;
}
// check whether the user should be changing password
if (get_user_preferences('auth_forcepasswordchange', false)){
@@ -219,10 +216,7 @@ defined('MOODLE_INTERNAL') or die('Direct access to this script is forbidden.');
//Select password change url
if (is_internal_auth() || $CFG->{'auth_'.$USER->auth.'_stdchangepassword'}){
$passwordchangeurl=$CFG->wwwroot.'/login/change_password.php';
} elseif($CFG->changepassword) {
$passwordchangeurl=$CFG->changepassword;
}
}
// check whether the user should be changing password
if (get_user_preferences('auth_forcepasswordchange', false)){
@@ -319,4 +313,4 @@ defined('MOODLE_INTERNAL') or die('Direct access to this script is forbidden.');
// No footer on this page
?>
?>
+51 -2
View File
@@ -118,6 +118,16 @@ function auth_get_userinfo($username){
}
function auth_user_update_password($username, $newpassword) {
global $CFG;
if ($CFG->auth_dbpasstype === 'internal') {
return set_field('user', 'password', md5($newpassword), 'username', $username);
} else {
// we should have never been called!
return false;
}
}
/**
* syncronizes user fron external db to moodle user table
*
@@ -201,7 +211,7 @@ function auth_sync_users ($do_updates=0) {
$updatekeys = array();
foreach ($all_keys as $key) {
if (preg_match('/^field_updatelocal_(.+)$/',$key, $match)) {
if ($pcfg->{$match[0]}) { // if it has a true value
if ($pcfg->{$key} === 'onlogin') {
array_push($updatekeys, $match[1]); // the actual key name
}
}
@@ -409,4 +419,43 @@ function auth_db_update_user_record($username, $updatekeys=false) {
return get_record_select("user", "username = '$username' AND deleted <> '1'");
}
?>
// A chance to validate form data, and last chance to
// do stuff before it is inserted in config_plugin
function auth_validate_form(&$form, &$err) {
// compat until we rework auth a bit
if ($form['auth_dbpasstype'] === 'internal') {
$CFG->auth_db_stdchangepassword = true;
if ($conf = get_record('config', 'name', 'auth_db_stdchangepassword')) {
$conf->value = 1;
if (! update_record('config', $conf)) {
notify("Could not update $name to $value");
}
} else {
$conf = new StdClass;
$conf->name = 'auth_db_stdchangepassword';
$conf->value = 1;
if (! insert_record('config', $conf)) {
notify("Error: could not add new variable $name !");
}
}
} else {
$CFG->auth_db_stdchangepassword = false;
if ($conf = get_record('config', 'name', 'auth_db_stdchangepassword')) {
$conf->value = 0;
if (! update_record('config', $conf)) {
notify("Could not update $name to $value");
}
} else {
$conf = new StdClass;
$conf->name = 'auth_db_stdchangepassword';
$conf->value = 0;
if (! insert_record('config', $conf)) {
notify("Error: could not add new variable $name !");
}
}
}
return true;
}
?>
+3 -2
View File
@@ -111,7 +111,8 @@ class fcFPP
$this->_user = $userid;
$this->_pwd = $passwd;
return TRUE;
} elseif (preg_match ("/^\Sorry/",$line)){ //Denied access but a valid user and password
} elseif (strpos($line, 'You are not allowed')){ // Denied access but a valid user and password
// "Sorry. You are not allowed to login with the FPP interface"
return TRUE;
} else { //Invalid user or password
return FALSE;
@@ -215,4 +216,4 @@ class fcFPP
}
?>
?>
+7 -5
View File
@@ -144,7 +144,9 @@ function auth_get_userinfo($username){
$ldapval = $newval;
}
}
$result[$key] = $ldapval;
if (!is_null($ldapval)) {
$result[$key] = $ldapval;
}
}
}
@@ -709,7 +711,7 @@ function auth_ldap_bulk_insert($users){
// bulk insert -- superfast with $bulk_insert_records
$sql = 'INSERT INTO '.$CFG->prefix.'extuser (idnumber) VALUES ';
// make those values safe
array_map('addslashes', $users);
$users = array_map('addslashes', $users);
// join and quote the whole lot
$sql = $sql . '(\'' . join('\'),(\'', $users) . '\')';
print "+ " . count($users) . " users\n";
@@ -838,7 +840,7 @@ function auth_user_update($olduser, $newuser) {
if ($user_info_result){
$user_entry = auth_ldap_get_entries($ldapconnection, $user_info_result);
if (count($user_entry)) {
if (count($user_entry) > 1) {
trigger_error("ldap: Strange! More than one user record found in ldap. Only using the first one.");
}
$user_entry = $user_entry[0];
@@ -1080,8 +1082,8 @@ function auth_ldap_getdefaults(){
);
$default['ldap_memberattribute_isdn'] = array(
'edir' => '1',
'rfs2307' => '0',
'rfs2307bis' => '1',
'rfc2307' => '0',
'rfc2307bis' => '1',
'samba' => '0', //is this right?
'ad' => '1',
'default' => '0'
+8 -11
View File
@@ -19,8 +19,8 @@ Changes:
Moodle Configuration with Dual login
-------------------------------------------------------------------------------
1. Protect the file moodle/auth/shibboleth/ directory with Shibboleth.
The page index.php actually logs in a Shibboleth user.
1. Protect the directory moodle/auth/shibboleth/ with Shibboleth.
The page index.php in that directory actually logs in a Shibboleth user.
For Apache you have to define a rule like the following in the Apache config:
--
@@ -63,7 +63,7 @@ Moodle Configuration with Dual login
4. The large text field 'Instructions' must contain a link to the
moodle/auth/shibboleth/index.php file which is protected by
Shibboleth (see step 1) and causes the Shibboleth login procedure to start.
You also could use HTML code in that field, e.g. to create your own
You could also use HTML code in that field, e.g. to create your own
Shibboleth login button.
5. Save the changes for the Shibboleth authentication method.
@@ -79,11 +79,11 @@ described in the dual login section above and do the following steps:
How the Shibboleth authentication works
--------------------------------------------------------------------------------
For a user to get Shibboleth authenticated in Moodle he basically must go to the
To get Shibboleth authenticated in Moodle a user basically must access the
Shibboleth-protected page /auth/shibboleth/index.php. If Shibboleth is the only
authentication method (see 4.a), this happens automatically when a user wants to
login. Otherwise the user has to click on the link on the login page you
provided in step 4.
login in Moodle. Otherwise, the user has to click on the link on the login page
you provided in step 4.
Moodle basically checks whether the Shibboleth attribute that you mapped
as the username is present. This attribute should only be present if a user is
@@ -98,19 +98,16 @@ these are checked by Shibboleth itself. Only users who met these rules
actually can access /auth/shibboleth/index.php and get logged in.
You can use Shibboleth AND another authentication method (it was tested with
manual login). So if there are a few users that don't have a Shibboleth
manual login). So, if there are a few users that don't have a Shibboleth
login, you could create manual accounts for them and they could use the manual
login. For other authentication methods you first have to configure them and
then set Shibboleth as your authentication method. Users can log in only via one
authentication method unless they have two accounts in Moodle.
Users that provide a non-existing login name for non-Shibboleth authentication
methods are automatically redirected to auth/shibboleth/index.php and it is
tried to authenticate them via Shibboleth.
Shibboleth dual login with custom login page
--------------------------------------------------------------------------------
Of course you can create a dual login page that better fits your needs. For this
to work you have to set up the two authentication methods (e.g. 'Manual' and
to work, you have to set up the two authentication methods (e.g. 'Manual' and
'Shibboleth') and specify an alternate login link to your own dual login page.
On that page you basically need a link to the Shibboleth-protected page
('/auth/shibboleth/index.php') for the Shibboleth login and a
+1 -1
View File
@@ -3,7 +3,7 @@
$pluginconfig = get_config('auth/shibboleth');
if (!isset($config->auth_instructions) or empty($pluginconfig->shib_user_attribute)) {
$config->auth_instructions = get_string('auth_shib_instructions', 'auth', $CFG->wwwroot.'/auth/shibboleth/shib-protected.php');
$config->auth_instructions = get_string('auth_shib_instructions', 'auth', $CFG->wwwroot.'/auth/shibboleth/index.php');
}
if (!isset ($pluginconfig->user_attribute)) {
+1 -1
View File
@@ -16,7 +16,7 @@
redirect($urltogo);
}
$pluginconfig = get_config('auth/shibboleth');
// Check whether Shibboleth is configured properly
+16 -4
View File
@@ -1,6 +1,7 @@
<?PHP // $Id$
//CHANGELOG:
//28.10.2004 SHIBBOLETH Authentication functions v.0.1
//2005-2006 Various extensions and fixes by Lukas Haemmerle
//Distributed under GPL (c)Markus Hagman 2004-
function auth_user_login($username, $password) {
@@ -41,9 +42,9 @@ function auth_get_userinfo($username) {
foreach ($attrmap as $key=>$value) {
if (!empty($CFG->unicodedb)) {
$result[$key]=$_SERVER[$value];
$result[$key]=get_first_string($_SERVER[$value]);
} else {
$result[$key]=utf8_decode($_SERVER[$value]);
$result[$key]=utf8_decode(get_first_string($_SERVER[$value]));
}
}
@@ -65,7 +66,7 @@ function auth_get_userinfo($username) {
function auth_shib_attributes(){
//returns array containg attribute mappings between Moodle and shibboleth
global $CFG;
global $CFG;
$pluginconfig = get_config('auth/shibboleth');
$pluginconfig = (array) $pluginconfig;
@@ -82,6 +83,17 @@ function auth_shib_attributes(){
}
$moodleattributes['username']=$pluginconfig["shib_user_attribute"];
return $moodleattributes;
return $moodleattributes;
}
function get_first_string($string){
// Cleans and returns first of potential many values (multi-valued attributes)
$list = split( ';', $string);
$clean_string = rtrim($list[0]);
return $clean_string;
}
?>
+11 -9
View File
@@ -17,13 +17,7 @@
if (!empty($id)) {
if (!isteacheredit($id)) {
if (empty($to)) {
error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php");
} else {
if (!isteacheredit($to)) {
error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php");
}
}
error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php");
}
} else {
if (!isadmin()) {
@@ -31,6 +25,12 @@
}
}
if (!empty($to)) {
if (!isteacheredit($to)) {
error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php");
}
}
//Check site
if (!$site = get_site()) {
error("Site not found!");
@@ -117,7 +117,9 @@
//Call the form, depending the step we are
if (!$launch) {
// if we're at the start, clear the cache of prefs
unset($SESSION->backupprefs[$course->id]);
if (isset($SESSION->backupprefs[$course->id])) {
unset($SESSION->backupprefs[$course->id]);
}
include_once("backup_form.html");
} else if ($launch == "check") {
include_once("backup_check.html");
@@ -126,7 +128,7 @@
}
print_simple_box_end();
//Print footer
//Print footer
print_footer();
?>
+1 -1
View File
@@ -107,7 +107,7 @@
if (isset($backupprefs->$var) && $backupprefs->$var) {
$var = "backup_".$modname;
//Only if selected
if ($backupprefs->$var == 1) {
if (!empty($backupprefs->$var) and ($backupprefs->$var == 1)) {
//Print the full tr
echo "<tr>";
echo "<td colspan=\"2\">";
+1 -1
View File
@@ -145,7 +145,7 @@
//If we have selected to backup quizzes, backup categories and
//questions structure (step 1). See notes on mod/quiz/backuplib.php
if ($status and $preferences->mods['quiz']->backup) {
if ($status and !empty($preferences->mods['quiz']->backup)) {
echo "<li>".get_string("writingcategoriesandquestions").'</li>';
require_once($CFG->dirroot.'/mod/quiz/backuplib.php');
if (!$status = backup_question_categories($backup_file,$preferences)) {
+23 -14
View File
@@ -98,18 +98,19 @@ function schedule_backup_cron() {
if (!$backup_course) {
mtrace(" ERROR (in backup_courses detection)");
$status = false;
continue;
}
//Now we backup every course with nextstarttime < now
if ($backup_course->nextstarttime > 0 && $backup_course->nextstarttime < $now) {
// Skip backup of unavailable courses that have remained unmodified in a month
$skipped = false;
if (!$course->visible && ($now - $course->timemodified) > 31*24*60*60) { //Hidden + unmodified last month
mtrace(" SKIPPING - hidden+unmodified");
set_field("backup_courses","laststatus","3","courseid",$backup_course->courseid);
$skipped = true;
}
//Now we backup every non skipped course with nextstarttime < now
if (!$skipped && $backup_course->nextstarttime > 0 && $backup_course->nextstarttime < $now) {
//We have to send a email because we have included at least one backup
$emailpending = true;
// Skip backup of unavailable courses that have remained unmodified in a month
if (!$course->visible && ($now - $course->timemodified) > 31) { //Hidden + unmodified last month
//if (!$course->visible && ($now - $course->timemodified) > 31*24*60*60) { //Hidden + unmodified last month
mtrace(" SKIPPING - hidden+unmodified");
set_field("backup_courses","laststatus","3","courseid",$backup_course->courseid);
continue;
}
//Only make the backup if laststatus isn't 2-UNFINISHED (uncontrolled error)
if ($backup_course->laststatus != 2) {
//Set laststarttime
@@ -334,7 +335,7 @@ function schedule_backup_course_configure($course,$starttime = 0) {
$backup_config->backup_sche_coursefiles = 1;
}
if (!isset($backup_config->backup_sche_messages)) {
$backup_config->backup_sche_messages = 1;
$backup_config->backup_sche_messages = 0;
}
if (!isset($backup_config->backup_sche_active)) {
$backup_config->backup_sche_active = 0;
@@ -407,8 +408,8 @@ function schedule_backup_course_configure($course,$starttime = 0) {
if (empty($preferences->mods[$mod->modname]->instances)) {
$preferences->mods[$mod->modname]->instances = array(); // avoid warnings
}
$preferences->mods[$mod->modname]->instances[$mod->instance]->backup = $preferences->mods[$modname]->backup;
$preferences->mods[$mod->modname]->instances[$mod->instance]->userinfo = $preferences->mods[$modname]->userinfo;
$preferences->mods[$mod->modname]->instances[$mod->instance]->backup = $preferences->mods[$mod->modname]->backup;
$preferences->mods[$mod->modname]->instances[$mod->instance]->userinfo = $preferences->mods[$mod->modname]->userinfo;
// there isn't really a nice way to do this...
$preferences->mods[$mod->modname]->instances[$mod->instance]->name = get_field($mod->modname,'name','id',$mod->instance);
}
@@ -513,7 +514,13 @@ function schedule_backup_course_configure($course,$starttime = 0) {
//Now calculate the users
if ($status) {
schedule_backup_log($starttime,$course->id," calculating users");
user_check_backup($course->id,$backup_unique_code,$preferences->backup_users,$preferences->backup_messages);
//Decide about include users with messages, based on SITEID
if ($preferences->backup_messages && $preferences->backup_course == SITEID) {
$include_message_users = true;
} else {
$include_message_users = false;
}
user_check_backup($course->id,$backup_unique_code,$preferences->backup_users,$include_message_users);
}
//Now calculate the logs
@@ -765,7 +772,9 @@ function schedule_backup_course_delete_old_files($preferences,$starttime=0) {
$dirtocheck = $CFG->dataroot."/".$preferences->backup_course."/backupdata";
}
schedule_backup_log($starttime,$preferences->backup_course," checking $dirtocheck");
mtrace(" Keeping backup files in $dirtocheck");
if ($CFG->debug > 7) {
mtrace(" Keeping backup files in $dirtocheck");
}
//Get all the files in $dirtocheck
$files = get_directory_list($dirtocheck,"",false);
+11 -8
View File
@@ -460,10 +460,11 @@
function xml_tag_safe_content($content) {
global $CFG;
//If enabled, we strip all the control chars from the text but tabs, newlines and returns
//If enabled, we strip all the control chars (\x0-\x1f) from the text but tabs (\x9),
//newlines (\xa) and returns (\xd). The delete control char (\x7f) is also included.
//because they are forbiden in XML 1.0 specs. The expression below seems to be
//UTF-8 safe too because it simply ignores the rest of characters.
$content = preg_replace("/(?(?=[[:cntrl:]])[^\n\r\t])/is","",$content);
$content = preg_replace("/[\x-\x8\xb-\xc\xe-\x1f\x7f]/is","",$content);
if (!empty($CFG->unicodedb)) {
// Don't perform the conversion. Contents are Unicode.
$content = preg_replace("/\r\n|\r/", "\n", htmlspecialchars($content));
@@ -520,7 +521,8 @@
fwrite ($bf,full_tag("INCLUDED",4,false,$included));
fwrite ($bf,full_tag("USERINFO",4,false,$userinfo));
if (is_array($preferences->mods[$element->name]->instances)
if (isset($preferences->mods[$element->name]->instances)
&& is_array($preferences->mods[$element->name]->instances)
&& count($preferences->mods[$element->name]->instances)) {
fwrite ($bf, start_tag("INSTANCES",4,true));
foreach ($preferences->mods[$element->name]->instances as $id => $object) {
@@ -1001,7 +1003,6 @@
fwrite ($bf,full_tag("TYPE",6,false,$moduletype));
fwrite ($bf,full_tag("INSTANCE",6,false,$course_module[$tok]->instance));
fwrite ($bf,full_tag("ADDED",6,false,$course_module[$tok]->added));
fwrite ($bf,full_tag("DELETED",6,false,$course_module[$tok]->deleted));
fwrite ($bf,full_tag("SCORE",6,false,$course_module[$tok]->score));
fwrite ($bf,full_tag("INDENT",6,false,$course_module[$tok]->indent));
fwrite ($bf,full_tag("VISIBLE",6,false,$course_module[$tok]->visible));
@@ -1048,7 +1049,6 @@
//Output all user data
fwrite ($bf,full_tag("ID",4,false,$user_data->id));
fwrite ($bf,full_tag("AUTH",4,false,$user_data->auth));
fwrite ($bf,full_tag("GUID",4,false,$user_data->guid));
fwrite ($bf,full_tag("CONFIRMED",4,false,$user_data->confirmed));
fwrite ($bf,full_tag("POLICYAGREED",4,false,$user_data->policyagreed));
fwrite ($bf,full_tag("DELETED",4,false,$user_data->deleted));
@@ -1078,7 +1078,7 @@
fwrite ($bf,full_tag("LASTACCESS",4,false,$user_data->lastaccess));
fwrite ($bf,full_tag("LASTLOGIN",4,false,$user_data->lastlogin));
fwrite ($bf,full_tag("CURRENTLOGIN",4,false,$user_data->currentlogin));
fwrite ($bf,full_tag("LASTIP",4,false,$user_data->lastIP));
fwrite ($bf,full_tag("LASTIP",4,false,$user_data->lastip));
fwrite ($bf,full_tag("SECRET",4,false,$user_data->secret));
fwrite ($bf,full_tag("PICTURE",4,false,$user_data->picture));
fwrite ($bf,full_tag("URL",4,false,$user_data->url));
@@ -1240,7 +1240,8 @@
//See if it is a valid module to backup
if ($log->module == "course" or
$log->module == "user" or
$preferences->mods[$log->module]->backup == 1) {
(array_key_exists($log->module, $preferences->mods) and $preferences->mods[$log->module]->backup == 1)) {
// logs with 'upload' in module field are ignored, there is no restore code anyway
//Begin log tag
fwrite ($bf,start_tag("LOG",3,true));
@@ -1662,7 +1663,8 @@
require_once($CFG->dirroot.'/mod/'.$module.'/backuplib.php');
if (is_array($preferences->mods[$module]->instances)) {
if (isset($preferences->mods[$module]->instances)
&& is_array($preferences->mods[$module]->instances)) {
$onemodbackup = $module.'_backup_one_mod';
if (function_exists($onemodbackup)) {
foreach ($preferences->mods[$module]->instances as $instance => $object) {
@@ -1719,6 +1721,7 @@
foreach ($mypreferences->mods as $name => $info) {
//Check if the xxxx_encode_content_links exists
include_once("$CFG->dirroot/mod/$name/backuplib.php");
$function_name = $name."_encode_content_links";
if (function_exists($function_name)) {
$result = $function_name($result,$mypreferences);
+1 -1
View File
@@ -9,7 +9,7 @@ require_once($CFG->dirroot.'/backup/bb/xsl_emulate_xslt.inc');
function get_subdirs($directory){
$opendirectory = opendir( $directory );
while($filename = readdir($opendirectory)) {
while(false !== ($filename = readdir($opendirectory))) {
if (is_dir($directory.$filename) and $filename != ".." and $filename != "."){
$subdirs[] = $filename;
}
+11
View File
@@ -50,6 +50,17 @@ function backup_upgrade($oldversion=0) {
}
}
if ($oldversion < 2006042801) {
table_column('backup_log', 'time', 'time', 'integer', '', '', '0');
table_column('backup_log', 'laststarttime', 'laststarttime', 'integer', '', '', '0');
table_column('backup_log', 'courseid', 'courseid', 'integer', '', '', '0');
table_column('backup_courses', 'lastendtime', 'lastendtime', 'integer', '', '', '0');
table_column('backup_courses', 'laststarttime', 'laststarttime', 'integer', '', '', '0');
table_column('backup_courses', 'courseid', 'courseid', 'integer', '', '', '0');
table_column('backup_courses', 'nextstarttime', 'nextstarttime', 'integer', '', '', '0');
}
//Finally, return result
return $result;
+10 -6
View File
@@ -118,7 +118,7 @@
}
// Loop through all directory entries, and construct two temporary arrays containing files and sub directories
while($entry = readdir($handle)) {
while(false !== ($entry = readdir($handle))) {
if (is_dir($dir. $slash .$entry) && $entry != ".." && $entry != "." && $entry != $excludeddir) {
$dir_subdirs[] = $dir. $slash .$entry;
}
@@ -195,7 +195,7 @@
$results = null;
$dir = opendir($rootdir);
while ($file=readdir($dir)) {
while (false !== ($file=readdir($dir))) {
if ($file=="." || $file=="..") {
continue;
}
@@ -214,7 +214,7 @@
$results = "";
$dir = opendir($rootdir);
while ($file=readdir($dir)) {
while (false !== ($file=readdir($dir))) {
if ($file=="." || $file=="..") {
continue;
}
@@ -293,13 +293,15 @@
global $CFG;
$status = true; // Initialize this, next code will change its value if needed
if (!is_dir($to_file)) {
//echo "<br />Creating ".$to_file; //Debug
umask(0000);
$status = mkdir($to_file,$CFG->directorypermissions);
}
$dir = opendir($from_file);
while ($file=readdir($dir)) {
while (false !== ($file=readdir($dir))) {
if ($file=="." || $file=="..") {
continue;
}
@@ -411,8 +413,10 @@
$rec->old_id = $old_id;
$rec->new_id = ($new_id === null? 0 : $new_id);
$rec->info = $info_to_save;
$status = insert_record('backup_ids', $rec, false);
if (!insert_record('backup_ids', $rec, false)) {
$status = false;
}
}
return $status;
}
+1 -1
View File
@@ -140,7 +140,7 @@
if (!$launch) {
include_once("restore_precheck.html");
} else if ($launch == "form") {
if ($SESSION->restore->importing) {
if (!empty($SESSION->restore->importing)) {
// set up all the config stuff and skip asking the user about it.
restore_setup_for_check($SESSION->restore,$backup_unique_code);
include_once("restore_execute.html");
+2 -2
View File
@@ -45,7 +45,7 @@
$$var = optional_param( $var,0);
$var = "restore_user_info_".$modname;
$$var = optional_param( $var,0);
$instances = $info->mods[$mod->name]->instances;
$instances = !empty($info->mods[$mod->name]->instances) ? $info->mods[$mod->name]->instances : NULL;
if ($instances === NULL) {
continue;
}
@@ -86,7 +86,7 @@
$restore->mods[$modname]->restore=$$var;
$var = "restore_user_info_".$modname;
$restore->mods[$modname]->userinfo=$$var;
$instances = $info->mods[$mod->name]->instances;
$instances = !empty($info->mods[$mod->name]->instances) ? $info->mods[$mod->name]->instances : NULL;
if ($instances === NULL) {
continue;
}
+10 -2
View File
@@ -48,12 +48,20 @@
error ("An error has occurred and the restore could not be completed!");
}
if (!$restore->importing) {
echo $output;
if (empty($restore->importing)) {
//Print final message
print_simple_box(get_string("restorefinished"),"center");
} else {
print_simple_box(get_string("importdatafinished"),"center");
$file = $CFG->dataroot . '/'
. $SESSION->import_preferences->backup_course
. '/backupdata/' . $SESSION->import_preferences->backup_name;
if (is_readable($file)) {
unlink($file);
}
else {
error_log("import course data: couldn't unlink $file");
}
unset($SESSION->restore);
}
print_continue("$CFG->wwwroot/course/view.php?id=".$restore->course_id);
+74 -40
View File
@@ -63,6 +63,8 @@
//from backup format to destination site/course in order to mantain inter-activities
//working in the backup/restore process
function restore_decode_content_links($restore) {
global $CFG;
$status = true;
if (!defined('RESTORE_SILENTLY')) {
@@ -72,6 +74,7 @@
//If the module is being restored
if ($info->restore == 1) {
//Check if the xxxx_decode_content_links_caller exists
include_once("$CFG->dirroot/mod/$name/restorelib.php");
$function_name = $name."_decode_content_links_caller";
if (function_exists($function_name)) {
if (!defined('RESTORE_SILENTLY')) {
@@ -477,7 +480,8 @@
$suffixshort = "";
}
$currentfullname = $fullname.$suffixfull;
$currentshortname = $shortname.$suffixshort;
// Limit the size of shortname - database column accepts <= 15 chars
$currentshortname = substr($shortname, 0, 15 - strlen($suffixshort)).$suffixshort;
$coursefull = get_record("course","fullname",addslashes($currentfullname));
$courseshort = get_record("course","shortname",addslashes($currentshortname));
$counter++;
@@ -889,7 +893,6 @@
$course_module->module = $module->id;
$course_module->section = $newid;
$course_module->added = $mod->added;
$course_module->deleted = $mod->deleted;
$course_module->score = $mod->score;
$course_module->indent = $mod->indent;
$course_module->visible = $mod->visible;
@@ -962,7 +965,7 @@
//Process info about metacourse
if ($status and $info) {
//Process child records
if ($info->childs) {
if (!empty($info->childs)) {
foreach ($info->childs as $child) {
$dbcourse = false;
$dbmetacourse = false;
@@ -994,7 +997,7 @@
sync_metacourse($restore->course_id);
}
//Process parent records
if ($info->parents) {
if (!empty($info->parents)) {
foreach ($info->parents as $parent) {
$dbcourse = false;
$dbmetacourse = false;
@@ -1074,7 +1077,7 @@
if (!$preferencescount) {
$continue = false;
if (!defined('RESTORE_SILENTLY')) {
echo '<li>'.get_string('backupwithoutgradebook','grade').'</li>';
echo '<li>'.get_string('backupwithoutgradebook','grades').'</li>';
}
}
@@ -1085,7 +1088,7 @@
if ($pref_rec->value == 0) {
$continue = false;
if (!defined('RESTORE_SILENTLY')) {
echo '<li>'.get_string('respectingcurrentdata','grade').'</li>';
echo '<li>'.get_string('respectingcurrentdata','grades').'</li>';
}
}
}
@@ -1268,7 +1271,11 @@
$itemid = insert_record('grade_item',$item);
//Now process grade_exceptions
$exceptions = $ite_info['#']['GRADE_EXCEPTIONS']['0']['#']['GRADE_EXCEPTION'];
if (!empty($ite_info['#']['GRADE_EXCEPTIONS'])) {
$exceptions = $ite_info['#']['GRADE_EXCEPTIONS']['0']['#']['GRADE_EXCEPTION'];
} else {
$exceptions = array();
}
//Iterate over exceptions
for($j = 0; $j < sizeof($exceptions); $j++) {
@@ -1375,6 +1382,19 @@
$user->lang = 'mi_nt';
}
//Country list updates - MDL-13060
//Any user whose country code has been deleted or modified needs to be assigned a valid one.
$country_update_map = array(
'ZR' => 'CD',
'TP' => 'TL',
'FX' => 'FR',
'KO' => 'RS',
'CS' => 'RS',
'WA' => 'GB');
if (array_key_exists($user->country, $country_update_map)) {
$user->country = $country_update_map[$user->country];
}
//Check if it's admin and coursecreator
$is_admin = !empty($user->roles['admin']);
$is_coursecreator = !empty($user->roles['coursecreator']);
@@ -1851,14 +1871,7 @@
foreach ($info as $category) {
//Skip empty categories (some backups can contain them)
if (!empty($category->id)) {
$catrestore = "restore_question_categories";
if (function_exists($catrestore)) {
//print_object ($category); //Debug
$status = $catrestore($category,$restore);
} else {
//Something was wrong. Function should exist.
$status = false;
}
$status = restore_question_categories($category,$restore);
}
}
@@ -2196,19 +2209,6 @@
//Assign it to admin
$eve->userid = $adminid;
}
//We must recode the repeatid if the event has it
if (!empty($eve->repeatid)) {
$repeat_rec = backup_getid($restore->backup_unique_code,"event_repeatid",$eve->repeatid);
if ($repeat_rec) { //Exists, so use it...
$eve->repeatid = $repeat_rec->new_id;
} else { //Doesn't exists, calculate the next and save it
$oldrepeatid = $eve->repeatid;
$max_rec = get_record_sql('SELECT 1, MAX(repeatid) AS repeatid FROM '.$CFG->prefix.'event');
$eve->repeatid = empty($max_rec) ? 1 : $max_rec->repeatid + 1;
backup_putid($restore->backup_unique_code,"event_repeatid", $oldrepeatid, $eve->repeatid);
}
}
//We have to recode the groupid field
$group = backup_getid($restore->backup_unique_code,"groups",$eve->groupid);
@@ -2221,6 +2221,22 @@
//The structure is equal to the db, so insert the event
$newid = insert_record ("event",$eve);
//We must recode the repeatid if the event has it
//The repeatid now refers to the id of the original event. (see Bug#5956)
if ($newid && !empty($eve->repeatid)) {
$repeat_rec = backup_getid($restore->backup_unique_code,"event_repeatid",$eve->repeatid);
if ($repeat_rec) { //Exists, so use it...
$eve->repeatid = $repeat_rec->new_id;
} else { //Doesn't exists, calculate the next and save it
$oldrepeatid = $eve->repeatid;
$eve->repeatid = $newid;
backup_putid($restore->backup_unique_code,"event_repeatid", $oldrepeatid, $eve->repeatid);
}
$eve->id = $newid;
// update the record to contain the correct repeatid
update_record('event',$eve);
}
} else {
//get current event id
$newid = $eve_db->id;
@@ -2483,7 +2499,7 @@
$modrestore = $mod->modtype."_restore_mods";
if (function_exists($modrestore)) {
//print_object ($mod); //Debug
$status &= $modrestore($mod,$restore);
$status = $status and $modrestore($mod,$restore); //bit operator & not reliable here!
} else {
//Something was wrong. Function should exist.
$status = false;
@@ -2732,6 +2748,31 @@
$log->info = "";
$toinsert = true;
break;
case "report log":
$log->url = "report/log/index.php?id=".$log->course;
$log->info = $log->course;
$toinsert = true;
break;
case "report live":
$log->url = "report/log/live.php?id=".$log->course;
$log->info = $log->course;
$toinsert = true;
break;
case "report outline":
$log->url = "report/outline/index.php?id=".$log->course;
$log->info = $log->course;
$toinsert = true;
break;
case "report participation":
$log->url = "report/participation/index.php?id=".$log->course;
$log->info = $log->course;
$toinsert = true;
break;
case "report stats":
$log->url = "report/stats/index.php?id=".$log->course;
$log->info = $log->course;
$toinsert = true;
break;
default:
echo "action (".$log->module."-".$log->action.") unknown. Not restored<br />"; //Debug
break;
@@ -3591,8 +3632,6 @@
$this->info->tempmod->instance;
$this->info->tempsection->mods[$this->info->tempmod->id]->added =
$this->info->tempmod->added;
$this->info->tempsection->mods[$this->info->tempmod->id]->deleted =
$this->info->tempmod->deleted;
$this->info->tempsection->mods[$this->info->tempmod->id]->score =
$this->info->tempmod->score;
$this->info->tempsection->mods[$this->info->tempmod->id]->indent =
@@ -3618,9 +3657,6 @@
case "ADDED":
$this->info->tempmod->added = $this->getContents();
break;
case "DELETED":
$this->info->tempmod->deleted = $this->getContents();
break;
case "SCORE":
$this->info->tempmod->score = $this->getContents();
break;
@@ -3847,9 +3883,6 @@
case "AUTH":
$this->info->tempuser->auth = $this->getContents();
break;
case "GUID":
$this->info->tempuser->guid = $this->getContents();
break;
case "CONFIRMED":
$this->info->tempuser->confirmed = $this->getContents();
break;
@@ -4819,7 +4852,7 @@
}
function restore_execute(&$restore,$info,$course_header,&$errorstr) {
global $CFG;
global $CFG, $USER;
$status = true;
//Checks for the required files/functions to restore every module
//and include them
@@ -5218,6 +5251,7 @@
if (!defined('RESTORE_SILENTLY')) {
echo '<li>'.get_string('creatingblocks').'</li>';
}
$course_header->blockinfo = !empty($course_header->blockinfo) ? $course_header->blockinfo : NULL;
if (!$status = restore_create_blocks($restore, $info->backup_block_format, $course_header->blockinfo, $xml_file)) {
if (!defined('RESTORE_SILENTLY')) {
notify('Error while creating the course blocks');
@@ -5281,9 +5315,9 @@
}
if (!$status = restore_decode_content_links($restore)) {
if (!defined('RESTORE_SILENTLY')) {
notify("Could not refresh events for activities!");
notify("Could not decode content links!");
} else {
$errorstr = "Could not refresh events for activities!";
$errorstr = "Could not decode content links!";
return false;
}
}
+4 -2
View File
@@ -5,6 +5,8 @@
// database (backup_version) to determine whether upgrades should
// be performed (see db/backup_*.php)
$backup_version = 2006042800; // The current version is a date (YYYYMMDDXX)
$backup_version = 2006082300; // The current version is a date (YYYYMMDDXX)
$backup_release = "1.6beta4"; // User-friendly version number
$backup_release = "1.6.2"; // User-friendly version number
?>
-1232
View File
File diff suppressed because it is too large Load Diff
@@ -14,7 +14,9 @@ class block_activity_modules extends block_list {
// data from db if the course format has already fetched them
if(!isset($GLOBALS['modnamesplural']) || !isset($GLOBALS['modnamesused'])) {
require_once($CFG->dirroot.'/course/lib.php');
get_all_mods($this->instance->pageid, $mods, $modnames, $modnamesplural, $modnamesused);
if (!empty($this->instance)) {
get_all_mods($this->instance->pageid, $mods, $modnames, $modnamesplural, $modnamesused);
}
}
else {
$modnamesplural = $GLOBALS['modnamesplural'];
@@ -30,7 +32,7 @@ class block_activity_modules extends block_list {
$this->content->icons = array();
$this->content->footer = '';
if ($modnamesused) {
if (isset($modnamesused) && $modnamesused) {
foreach ($modnamesused as $modname => $modfullname) {
if ($modname != 'label') {
$this->content->items[] = '<a href="'.$CFG->wwwroot.'/mod/'.$modname.'/index.php?id='.$this->instance->pageid.'">'.$modnamesplural[$modname].'</a>';
+18 -14
View File
@@ -56,10 +56,8 @@ class block_admin extends block_list {
$this->content->icons[] = '<img src="'.$CFG->pixpath.'/i/log.gif" alt="" />';
if (!empty($CFG->enablestats)) {
$this->content->items[] = '<a href="'.$CFG->wwwroot.'/course/report/stats/index.php?course='.SITEID.'">'.get_string('stats').'</a>';
$this->content->icons[] = '<img src="'.$CFG->pixpath.'/i/stats.gif" alt="" />';
}
$this->content->items[] = '<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/report.php">'.get_string('reports').'</a>';
$this->content->icons[] = '<img src="'.$CFG->pixpath.'/i/stats.gif" alt="" />';
$this->content->items[] = '<a href="'.$CFG->wwwroot.'/files/index.php?id='.SITEID.'">'.get_string('sitefiles').'</a>';
$this->content->icons[] = '<img src="'.$CFG->pixpath.'/i/files.gif" alt="" />';
@@ -92,6 +90,12 @@ class block_admin extends block_list {
return $this->content;
}
if(empty($CFG->loginhttps)) {
$securewwwroot = $CFG->wwwroot;
} else {
$securewwwroot = str_replace('http:','https:',$CFG->wwwroot);
}
$course = get_record('course', 'id', $this->instance->pageid);
if (isteacher($this->instance->pageid)) {
@@ -111,9 +115,9 @@ class block_admin extends block_list {
$fullname = fullname($USER, true);
$editmyprofile = '<a title="'.$fullname.'" href="'.$CFG->wwwroot.'/user/edit.php?id='.$USER->id.'&amp;course='.$this->instance->pageid.'">'.get_string('editmyprofile').'</a>';
$editmyprofile = '<a title="'.$fullname.'" href="'.$securewwwroot.'/user/edit.php?id='.$USER->id.'&amp;course='.$this->instance->pageid.'">'.get_string('editmyprofile').'</a>';
if (empty($USER->description)) {
//Accessibility: replace non-standard <blink> with CSS (<a> makes title visible in IE).
//Accessibility: replace non-standard <blink> with CSS (<a> makes title visible in IE).
$text = get_string('profile').' '.get_string('missingdescription');
$this->content->items[]= $editmyprofile.' <a title="'.$text.'" class="useredit blink">*<span class="accesshide">'.$text.'</span></a>';
} else {
@@ -186,7 +190,9 @@ class block_admin extends block_list {
$this->content->icons[] = '<img src="'.$CFG->pixpath.'/i/payment.gif" alt="" />';
}
$this->content->items[]='<a href="'.$CFG->wwwroot.'/doc/view.php?id='.$this->instance->pageid.'&amp;file=teacher.html">'.get_string('help').'</a>';
$lang = str_replace('_utf8', '', current_language());
$this->content->items[]='<a href="http://docs.moodle.org/'.$lang.'/Teacher_documentation">'.get_string('help').'</a>';
$this->content->icons[]='<img src="'.$CFG->modpixpath.'/resource/icon.gif" alt="" />';
if ($teacherforum = forum_get_course_forum($this->instance->pageid, 'teacher')) {
@@ -206,10 +212,10 @@ class block_admin extends block_list {
}
$fullname = fullname($USER, true);
$editmyprofile = '<a title="'.$fullname.'" href="'.$CFG->wwwroot.'/user/edit.php?id='.
$editmyprofile = '<a title="'.$fullname.'" href="'.$securewwwroot.'/user/edit.php?id='.
$USER->id.'&amp;course='.$this->instance->pageid.'">'.get_string('editmyprofile').'</a>';
if (empty($USER->description)) {
//Accessibility: replace non-standard <blink> with CSS (<a> makes title visible in IE).
//Accessibility: replace non-standard <blink> with CSS (<a> makes title visible in IE).
$text = get_string('profile').' '.get_string('missingdescription');
$this->content->items[]= $editmyprofile.' <a title="'.$text.'" class="useredit blink">*<span class="accesshide">'.$text.'</span></a>';
} else {
@@ -218,12 +224,10 @@ class block_admin extends block_list {
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/user.gif" alt="" />';
if (is_internal_auth() && !is_restricted_user($USER->username)) {
$this->content->items[]='<a href="'.$CFG->wwwroot.'/login/change_password.php?id='.$this->instance->pageid.'">'.get_string('changepassword').'</a>';
$this->content->items[]='<a href="'.$securewwwroot.'/login/change_password.php?id='.$this->instance->pageid.'">'.get_string('changepassword').'</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/user.gif" alt="" />';
} else if ($CFG->changepassword && !is_restricted_user($USER->username)) {
$this->content->items[]='<a href="'.$CFG->changepassword.'">'.get_string('changepassword').'</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/user.gif" alt="" />';
}
}
if ($CFG->allowunenroll && !$course->metacourse) {
$this->content->items[]='<a href="unenrol.php?id='.$this->instance->pageid.'">'.get_string('unenrolme', '', $course->shortname).'</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/user.gif" alt="" />';
+8 -8
View File
@@ -1,5 +1,7 @@
<?php //$Id$
require_once($CFG->dirroot .'/blog/lib.php');
class block_blog_menu extends block_base {
function init() {
@@ -15,13 +17,13 @@ class block_blog_menu extends block_base {
$course = SITEID;
}
if ($CFG->bloglevel < 1) {
if ($CFG->bloglevel < BLOG_USER_LEVEL) {
$this->content->text = '';
return $this->content;
}
// don't display menu block if block is set at site level, and user is not logged in
if ($CFG->bloglevel < 5 && !(isloggedin() && !isguest())) {
if ($CFG->bloglevel < BLOG_GLOBAL_LEVEL && !(isloggedin() && !isguest())) {
$this->content->text = '';
return $this->content;
}
@@ -48,15 +50,13 @@ class block_blog_menu extends block_base {
$this->content->text = $output;
return $this->content;
}
require_once($CFG->dirroot .'/blog/lib.php');
//if ( blog_isLoggedIn() && !isguest() ) {
$courseviewlink = '';
$addentrylink = '';
$coursearg = '';
if((isloggedin() && !isguest()) && isset($course) && isset($course->id) && $course->id !=0 && $course->id!=SITEID && $CFG->bloglevel >=3 ) {
if((isloggedin() && !isguest()) && isset($course) && isset($course->id) && $course->id !=0 && $course->id!=SITEID && $CFG->bloglevel >= BLOG_COURSE_LEVEL) {
$coursearg = '&amp;courseid='. $course->id;
// a course is specified
@@ -66,10 +66,10 @@ class block_blog_menu extends block_base {
$blogmodon = false;
if ((isloggedin() && !isguest()) && (isadmin() || !$blogmodon || ($blogmodon && $coursearg != '')) && $CFG->bloglevel >= 1) {
if ((isloggedin() && !isguest()) && (isadmin() || !$blogmodon || ($blogmodon && $coursearg != '')) && $CFG->bloglevel >= BLOG_USER_LEVEL) {
// show Add entry link - user is not admin, moderation is off, or moderation is on and the user is viewing the block within the context of a course
$addentrylink = '<a href="'. $CFG->wwwroot. '/blog/edit.php?userid='. $userBlog->userid . $coursearg .'">'. get_string('addnewentry', 'blog') .'</a><br />';
$addentrylink = '<a href="'. $CFG->wwwroot. '/blog/edit.php?userid='. $userBlog->userid . $coursearg .'">'. get_string('addnewentry', 'blog') .'</a><br />';
// show View my entries link
$addentrylink .= '<a href="'. $CFG->wwwroot .'/blog/index.php?userid='. $userBlog->userid.'">';
@@ -83,7 +83,7 @@ class block_blog_menu extends block_base {
}
// show View site entries link
if ($CFG->bloglevel >= 4) {
if ($CFG->bloglevel >= BLOG_SITE_LEVEL) {
$output .= '<a href="'. $CFG->wwwroot .'/blog/index.php?filtertype=site&amp;">';
$output .= get_string('viewsiteentries', 'blog') .'</a><br />';
}
+14 -16
View File
@@ -4,13 +4,7 @@ define('BLOGDEFAULTTIMEWITHIN', 90);
define('BLOGDEFAULTNUMBEROFTAGS', 20);
define('BLOGDEFAULTSORT', 'text');
if (!defined('BLOG_USER_LEVEL')) {
define ('BLOG_USER_LEVEL', 1);
define ('BLOG_GROUP_LEVEL', 2);
define ('BLOG_COURSE_LEVEL', 3);
define ('BLOG_SITE_LEVEL', 4);
define ('BLOG_GLOBAL_LEVEL', 5);
}
require_once($CFG->dirroot .'/blog/lib.php');
class block_blog_tags extends block_base {
function init() {
@@ -47,7 +41,7 @@ class block_blog_tags extends block_base {
function get_content() {
global $CFG;
global $CFG, $SITE, $COURSE;
if (empty($this->config->timewithin)) {
$this->config->timewithin = BLOGDEFAULTTIMEWITHIN;
@@ -77,13 +71,13 @@ class block_blog_tags extends block_base {
$timewithin = $this->config->timewithin * 24 * 60 * 60; /// convert to seconds
$sql = 'SELECT t.*, COUNT(DISTINCT bt.id) as ct ';
$sql = 'SELECT t.id, t.type, t.text, COUNT(DISTINCT bt.id) as ct ';
$sql .= "FROM {$CFG->prefix}tags as t, {$CFG->prefix}blog_tag_instance as bt, {$CFG->prefix}post as p ";
$sql .= 'WHERE t.id = bt.tagid ';
$sql .= 'AND p.id = bt.entryid ';
$sql .= 'AND (p.publishstate = "site" or p.publishstate="public") ';
$sql .= 'AND (p.publishstate = \'site\' or p.publishstate=\'public\') ';
$sql .= "AND bt.timemodified > {$timewithin} ";
$sql .= 'GROUP BY bt.tagid ';
$sql .= 'GROUP BY t.id, t.type, t.text ';
$sql .= 'ORDER BY ct DESC, t.text ASC ';
$sql .= "LIMIT {$this->config->numberoftags} ";
@@ -137,17 +131,21 @@ class block_blog_tags extends block_base {
case BLOG_COURSE_LEVEL:
$filtertype = 'course';
global $course; // Need to do this unfortunately for pages like blog pages
if (isset($course->id)) {
$filterselect = $course->id;
if (isset($COURSE->id)) {
$filterselect = $COURSE->id;
} else {
$filterselect = $this->instance->pageid;
}
break;
default:
$filtertype = 'site';
$filterselect = SITEID;
if (isset($COURSE->id) && $COURSE->id != SITEID) {
$filtertype = 'course';
$filterselect = $COURSE->id;
} else {
$filtertype = 'site';
$filterselect = SITEID;
}
break;
}
+4 -10
View File
@@ -11,7 +11,7 @@ class block_calendar_month extends block_base {
}
function get_content() {
global $USER, $CFG, $SESSION;
global $USER, $CFG, $SESSION, $COURSE;
$cal_m = optional_param( 'cal_m', 0, PARAM_INT );
$cal_y = optional_param( 'cal_y', 0, PARAM_INT );
@@ -28,12 +28,7 @@ class block_calendar_month extends block_base {
// [pj] To me it looks like this if would never be needed, but Penny added it
// when committing the /my/ stuff. Reminder to discuss and learn what it's about.
// It definitely needs SOME comment here!
if (!empty($this->instance->pageid)) {
$courseshown = $this->instance->pageid;
}
else {
$courseshown = SITEID;
}
$courseshown = $COURSE->id;
if($courseshown == SITEID) {
// Being displayed at site level. This will cause the filter to fall back to auto-detecting
@@ -58,13 +53,12 @@ class block_calendar_month extends block_base {
$this->content->text .= calendar_get_mini($courses, $group, $user, $cal_m, $cal_y);
// No filters for now
} elseif (!empty($courseshown)) {
} else {
// For any other course
$this->content->text .= calendar_overlib_html();
$this->content->text .= calendar_top_controls('course', array('id' => $courseshown, 'm' => $cal_m, 'y' => $cal_y));
$this->content->text .= calendar_get_mini($courses, $group, $user, $cal_m, $cal_y);
$course = get_record('course', 'id', $this->instance->pageid);
$this->content->text .= '<div class="filters">'.calendar_filter_controls('course', '', $course).'</div>';
$this->content->text .= '<div class="filters">'.calendar_filter_controls('course', '', $COURSE).'</div>';
}
@@ -7,7 +7,7 @@ class block_calendar_upcoming extends block_base {
}
function get_content() {
global $USER, $CFG, $SESSION;
global $USER, $CFG, $SESSION, $COURSE;
$cal_m = optional_param( 'cal_m', 0, PARAM_INT );
$cal_y = optional_param( 'cal_y', 0, PARAM_INT );
@@ -27,12 +27,7 @@ class block_calendar_upcoming extends block_base {
$this->content->footer = '';
} else {
if (!empty($this->instance->pageid)) {
$courseshown = $this->instance->pageid;
}
else {
$courseshown = SITEID;
}
$courseshown = $COURSE->id;
$this->content->footer = '<br /><a href="'.$CFG->wwwroot.
'/calendar/view.php?view=upcoming&amp;course='.$courseshown.'">'.
get_string('gotocalendar', 'calendar').'</a>...';
+1 -1
View File
@@ -34,7 +34,7 @@ class block_course_list extends block_list {
}
}
if (isset($USER->id) and !(isadmin() and $adminseesall)) { // Just print My Courses
if (empty($CFG->disablemycourses) and isset($USER->id) and !(isadmin() and $adminseesall)) { // Just print My Courses
if ($courses = get_my_courses($USER->id)) {
foreach ($courses as $course) {
if ($course->id == SITEID) {
+7 -11
View File
@@ -7,13 +7,14 @@ class block_course_summary extends block_base {
}
function specialization() {
if($this->instance->pagetype == PAGE_COURSE_VIEW && $this->instance->pageid != SITEID) {
global $COURSE;
if($this->instance->pagetype == PAGE_COURSE_VIEW && $COURSE->id != SITEID) {
$this->title = get_string('coursesummary', 'block_course_summary');
}
}
function get_content() {
global $CFG, $THEME;
global $CFG, $COURSE;
if($this->content !== NULL) {
return $this->content;
@@ -23,19 +24,14 @@ class block_course_summary extends block_base {
return '';
}
if (empty($this->instance->pageid)) {
$this->instance->pageid = SITEID;
}
$course = get_record('course', 'id', $this->instance->pageid);
$this->content = New stdClass;
$options->noclean = true; // Don't clean Javascripts etc
$this->content->text = format_text($course->summary, FORMAT_HTML, $options);
if(isediting($this->instance->pageid)) {
if($this->instance->pageid == SITEID) {
$this->content->text = format_text($COURSE->summary, FORMAT_HTML, $options);
if(isediting($COURSE->id)) {
if($COURSE->id == SITEID) {
$editpage = $CFG->wwwroot.'/'.$CFG->admin.'/site.php';
} else {
$editpage = $CFG->wwwroot.'/course/edit.php?id='.$this->instance->pageid;
$editpage = $CFG->wwwroot.'/course/edit.php?id='.$COURSE->id;
}
$this->content->text .= "<div align=\"right\"><a href=\"$editpage\"><img src=\"$CFG->pixpath/t/edit.gif\" alt=\"\" /></a></div>";
}
+58
View File
@@ -61,6 +61,35 @@ function migrate2utf8_block_instance_configdata($recordid){
return $blah;
} else if ($blocktype -> name == 'glossary_random'){
///find course
if ($globallang) {
$fromenc = $globallang;
} else {
$sitelang = $CFG->lang;
$courselang = get_course_lang($blockinstance->pageid); //Non existing!
$userlang = get_main_teacher_lang($blockinstance->pageid); //N.E.!!
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
}
$blah = unserialize(base64_decode($blockinstance->configdata));
/// We are going to use textlib facilities
/// Convert the text
$blah->title = utfconvert($blah->title, $fromenc, false);
$blah->addentry = utfconvert($blah->addentry, $fromenc, false);
$blah->viewglossary = utfconvert($blah->viewglossary, $fromenc, false);
$blah->invisible = utfconvert($blah->invisible, $fromenc, false);
$blockinstance->configdata = base64_encode(serialize($blah));
migrate2utf8_update_record('block_instance',$blockinstance);
return $blah;
}
}
@@ -127,6 +156,35 @@ global $CFG, $globallang;
return $blah;
} else if ($blocktype -> name == 'glossary_random'){
///find course
if ($globallang) {
$fromenc = $globallang;
} else {
$sitelang = $CFG->lang;
$courselang = get_course_lang($blockpinned->pageid); //Non existing!
$userlang = get_main_teacher_lang($blockpinned->pageid); //N.E.!!
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
}
$blah = unserialize(base64_decode($blockpinned->configdata));
/// We are going to use textlib facilities
/// Convert the text
$blah->title = utfconvert($blah->title, $fromenc, false);
$blah->addentry = utfconvert($blah->addentry, $fromenc, false);
$blah->viewglossary = utfconvert($blah->viewglossary, $fromenc, false);
$blah->invisible = utfconvert($blah->invisible, $fromenc, false);
$blockinstance->configdata = base64_encode(serialize($blah));
migrate2utf8_update_record('block_instance',$blockinstance);
return $blah;
}
}
?>
@@ -13,8 +13,8 @@ class block_glossary_random extends block_base {
}
function specialization() {
global $CFG;
$this->course = get_record('course', 'id', $this->instance->pageid);
global $CFG, $COURSE;
$this->course = $COURSE;
// load userdefined title and make sure it's never empty
if (empty($this->config->title)) {
+6 -6
View File
@@ -12,26 +12,26 @@
<td><input type="text" name="title" size="50" value="<?php p($this->config->title) ?>" /></td>
</tr>
<tr valign=top>
<tr valign=top>
<td align=right><?php print_string("select_glossary","block_glossary_random") ?>:</td>
<td><?php choose_from_menu($glossaries,"glossary",$this->config->glossary) ?></td>
</tr>
<tr valign=top>
<tr valign=top>
<td align=right><?php print_string("refresh","block_glossary_random") ?>:</td>
<td><input type="text" name="refresh" size="5" value="<?php p($this->config->refresh) ?>" /></td>
</tr>
<tr valign=top>
<td align=right><?php print_string("type","block_glossary_random") ?>:</td>
<tr valign=top>
<td align=right><?php print_string("type","block_glossary_random") ?>:</td>
<td><?php
choose_from_menu($type, "type", $this->config->type, "");
helpbutton("",get_string("type","block_glossary_random"),"moodle",true,false,get_string("typehelp","block_glossary_random"));
?></td>
</tr>
<tr valign=top>
<td align=right><?php print_string("showconcept","block_glossary_random") ?>:</td>
<tr valign=top>
<td align=right><?php print_string("showconcept","block_glossary_random") ?>:</td>
<td>
<input type="hidden" name="showconcept" value="0" />
<input type="checkbox" name="showconcept" value="1" <?php if(!empty($this->config->showconcept)) echo 'checked="checked"'; ?> /></td>
+1 -1
View File
@@ -2,7 +2,7 @@
<table cellpadding="9" cellspacing="0">
<tr valign="top">
<td align="right"><?php print_string('configtitle', 'block_html'); ?>:</td>
<td><input type="text" name="title" size="30" value="<?php echo isset($this->config->title)?$this->config->title:''; ?>" /> (<?php print_string('leaveblanktohide', 'block_html'); ?>)</td>
<td><input type="text" name="title" size="30" value="<?php echo isset($this->config->title)?p($this->config->title):''; ?>" /> (<?php print_string('leaveblanktohide', 'block_html'); ?>)</td>
</tr>
<tr valign="top">
<td align="right"><?php print_string('configcontent', 'block_html'); ?>:</td>
+1
View File
@@ -198,6 +198,7 @@ function comp(v) { // general entry point for all cases
</tr>
</table>
</form>';
$this->content->footer = '';
return $this->content;
+2 -3
View File
@@ -32,13 +32,12 @@ class block_login extends block_base {
$forgot = $wwwroot . '/login/forgot_password.php';
} else {
if (!empty($CFG->{'auth_'.$CFG->auth.'_stdchangepassword'})
|| $CFG->changepassword
|| is_internal_auth() ) {
if (is_internal_auth() || !empty($CFG->{'auth_'.$CFG->auth.'_stdchangepassword'})) {
$forgot = $wwwroot . '/login/forgot_password.php';
}
else {
$forgot = $CFG->changepassword;
$forgot = '';
}
}
}
@@ -53,7 +52,7 @@ class block_login extends block_base {
$this->content->text .= '<table align="center" cellpadding="2" cellspacing="0" class="logintable">';
$this->content->text .= '<tr><td class="c0 r0" align="right">'.get_string('username').':</td>';
$this->content->text .= '<td class="c1 r0"><input type="text" name="username" size="10" value="'.$username.'" /></td></tr>';
$this->content->text .= '<td class="c1 r0"><input type="text" name="username" size="10" value="'.s($username).'" /></td></tr>';
$this->content->text .= '<tr><td class="c0 r1" align="right">'.get_string('password').':</td>';
$this->content->text .= '<td class="c1 r1"><input type="password" name="password" size="10" value="" /></td></tr>';
+9 -14
View File
@@ -7,7 +7,7 @@ class block_news_items extends block_base {
}
function get_content() {
global $CFG, $USER;
global $CFG, $USER, $COURSE;
if ($this->content !== NULL) {
return $this->content;
@@ -22,44 +22,39 @@ class block_news_items extends block_base {
}
if ($this->instance->pageid == 0) {
$this->instance->pageid = SITEID;
}
$course = get_record('course', 'id', $this->instance->pageid);
if ($course->newsitems) { // Create a nice listing of recent postings
if ($COURSE->newsitems) { // Create a nice listing of recent postings
require_once($CFG->dirroot.'/mod/forum/lib.php'); // We'll need this
$text = '';
if (!$forum = forum_get_course_forum($course->id, 'news')) {
if (!$forum = forum_get_course_forum($COURSE->id, 'news')) {
return $this->content;
}
/// First work out whether we can post to this group and if so, include a link
if (isteacheredit($course->id)) { /// Teachers can always post
if (isteacheredit($COURSE->id)) { /// Teachers can always post
$visiblegroups = -1;
$text .= '<div align="center" class="newlink"><a href="'.$CFG->wwwroot.'/mod/forum/post.php?forum='.$forum->id.'">'.
get_string('addanewtopic', 'forum').'</a>...</div>';
} else { /// Check the group situation
$currentgroup = get_current_group($course->id);
$currentgroup = get_current_group($COURSE->id);
if (forum_user_can_post_discussion($forum, $currentgroup)) {
$text .= '<div align="center" class="newlink"><a href="'.$CFG->wwwroot.'/mod/forum/post.php?forum='.$forum->id.'">'.
get_string('addanewtopic', 'forum').'</a>...</div>';
}
if (!$cm = get_coursemodule_from_instance('forum', $forum->id, $course->id)) {
if (!$cm = get_coursemodule_from_instance('forum', $forum->id, $COURSE->id)) {
$this->content->text = $text;
return $this->content;
}
$groupmode = groupmode($course, $cm);
$groupmode = groupmode($COURSE, $cm);
/// Decides if current user is allowed to see ALL the current discussions or not
@@ -73,7 +68,7 @@ class block_news_items extends block_base {
/// Get all the recent discussions we're allowed to see
if (! $discussions = forum_get_discussions($forum->id, 'p.modified DESC', 0, false,
$visiblegroups, $course->newsitems) ) {
$visiblegroups, $COURSE->newsitems) ) {
$text .= '('.get_string('nonews', 'forum').')';
$this->content->text = $text;
return $this->content;
@@ -119,7 +114,7 @@ class block_news_items extends block_base {
} else {
$userid = $USER->id;
}
$this->content->footer .= '<br />'.rss_get_link($course->id, $userid, 'forum', $forum->id, $tooltiptext);
$this->content->footer .= '<br />'.rss_get_link($COURSE->id, $userid, 'forum', $forum->id, $tooltiptext);
}
}
+14 -16
View File
@@ -9,7 +9,7 @@ class block_online_users extends block_base {
function has_config() {return true;}
function get_content() {
global $USER, $CFG;
global $USER, $CFG, $COURSE;
if ($this->content !== NULL) {
return $this->content;
@@ -23,8 +23,6 @@ class block_online_users extends block_base {
return $this->content;
}
$course = get_record('course', 'id', $this->instance->pageid);
$timetoshowusers = 300; //Seconds default
if (isset($CFG->block_online_users_timetosee)) {
$timetoshowusers = $CFG->block_online_users_timetosee * 60;
@@ -32,10 +30,10 @@ class block_online_users extends block_base {
$timefrom = time()-$timetoshowusers;
//Calculate if we are in separate groups
$isseparategroups = ($course->groupmode == SEPARATEGROUPS && $course->groupmodeforce && !isteacheredit($this->instance->pageid));
$isseparategroups = ($COURSE->groupmode == SEPARATEGROUPS && $COURSE->groupmodeforce && !isteacheredit($COURSE->id));
//Get the user current group
$currentgroup = $isseparategroups ? get_current_group($this->instance->pageid) : NULL;
$currentgroup = $isseparategroups ? get_current_group($COURSE->id) : NULL;
$groupmembers = "";
$groupselect = "";
@@ -46,11 +44,11 @@ class block_online_users extends block_base {
$groupselect .= " AND u.id = gm.userid AND gm.groupid = '$currentgroup'";
}
if ($this->instance->pageid == SITEID) { // Site-level
if ($COURSE->id == SITEID) { // Site-level
$courseselect = '';
$timeselect = "AND (s.timeaccess > $timefrom OR u.lastaccess > $timefrom)";
} else {
$courseselect = "AND s.course = '".$this->instance->pageid."'";
$courseselect = "AND s.course = '".$COURSE->id."'";
$timeselect = "AND s.timeaccess > $timefrom";
}
@@ -69,7 +67,7 @@ class block_online_users extends block_base {
}
}
if ($this->instance->pageid == SITEID && $CFG->allusersaresitestudents) {
if ($COURSE->id == SITEID && $CFG->allusersaresitestudents) {
if ($siteusers = get_records_sql("SELECT u.id, u.username, u.firstname, u.lastname, u.picture, u.lastaccess
FROM {$CFG->prefix}user u
WHERE u.lastaccess > $timefrom AND u.username <> 'guest'
@@ -88,7 +86,7 @@ class block_online_users extends block_base {
$groupmembers
WHERE u.id = s.userid $courseselect $groupselect $timeselect ";
if (!isteacher($course->id)) {
if (!isteacher($COURSE->id)) {
// Hide hidden teachers from students.
$findteacherssql .= 'AND s.authority > 0 ';
}
@@ -110,17 +108,17 @@ class block_online_users extends block_base {
//Now, we have in users, the list of users to show
//Because they are online
if (!empty($users)) {
//Accessibility: Don't want 'Alt' text for the user picture; DO want it for the envelope/message link (existing lang string).
//Accessibility: Converted <div> to <ul>, inherit existing classes & styles.
$this->content->text .= "<ul class='list'>\n";
//Accessibility: Don't want 'Alt' text for the user picture; DO want it for the envelope/message link (existing lang string).
//Accessibility: Converted <div> to <ul>, inherit existing classes & styles.
$this->content->text .= "<ul class='list'>\n";
foreach ($users as $user) {
$this->content->text .= '<li class="listentry">';
$this->content->text .= '<li class="listentry">';
$timeago = format_time(time() - max($user->timeaccess, $user->lastaccess)); //bruno to calculate correctly on frontpage
$this->content->text .= print_user_picture($user->id, $this->instance->pageid, $user->picture, 16, true).' ';
$this->content->text .= '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$user->id.'&amp;course='.$this->instance->pageid.'" title="'.$timeago.'">'.$user->fullname.'</a>';
$this->content->text .= print_user_picture($user->id, $COURSE->id, $user->picture, 16, true).' ';
$this->content->text .= '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$user->id.'&amp;course='.$COURSE->id.'" title="'.$timeago.'">'.$user->fullname.'</a>';
if (!empty($USER->id) and ($USER->id != $user->id) and !empty($CFG->messaging) and !isguest()) { // Only when logged in
$this->content->text .= "\n".' <a title="'.get_string('messageselectadd').'" target="message_'.$user->id.'" href="'.$CFG->wwwroot.'/message/discussion.php?id='.$user->id.'" onclick="return openpopup(\'/message/discussion.php?id='.$user->id.'\', \'message_'.$user->id.'\', \'menubar=0,location=0,scrollbars,status,resizable,width=400,height=500\', 0);">'
.'<img class="icon message" src="'.$CFG->pixpath.'/t/message.gif" alt="'. get_string('messageselectadd') .'" /></a>';
.'<img class="messageicon" src="'.$CFG->pixpath.'/t/message.gif" alt="'. get_string('messageselectadd') .'" /></a>';
}
$this->content->text .= "</li>\n";
}
+4 -3
View File
@@ -7,7 +7,7 @@ class block_participants extends block_list {
}
function get_content() {
global $USER, $CFG;
global $USER, $CFG, $COURSE;
if ($this->content !== NULL) {
return $this->content;
@@ -27,13 +27,14 @@ class block_participants extends block_list {
$this->instance->pageid = SITEID;
}
if ($this->instance->pageid != SITEID ||
/// MDL-13252 Always get the course page id or else the id may be incorrect in the user/index.php
if ($COURSE->id != SITEID ||
$CFG->showsiteparticipantslist > 1 ||
($CFG->showsiteparticipantslist == 1 && isteacherinanycourse()) ||
isteacher(SITEID)) {
$this->content->items[] = '<a title="'.get_string('listofallpeople').'" href="'.
$CFG->wwwroot.'/user/index.php?id='.$this->instance->pageid.'">'.get_string('participants').'</a>';
$CFG->wwwroot.'/user/index.php?id='.$COURSE->id.'">'.get_string('participants').'</a>';
$this->content->icons[] = '<img src="'.$CFG->pixpath.'/i/users.gif" height="16" width="16" alt="" />';
}
@@ -7,6 +7,7 @@ class block_recent_activity extends block_base {
}
function get_content() {
global $COURSE;
if ($this->content !== NULL) {
return $this->content;
@@ -21,11 +22,9 @@ class block_recent_activity extends block_base {
$this->content->text = '';
$this->content->footer = '';
$course = get_record('course', 'id', $this->instance->pageid);
// Slightly hacky way to do it but...
ob_start();
print_recent_activity($course);
print_recent_activity($COURSE);
$this->content->text = ob_get_contents();
ob_end_clean();
+3 -3
View File
@@ -42,7 +42,7 @@
}
function get_content() {
global $CFG, $editing;
global $CFG, $editing, $COURSE;
require_once($CFG->libdir .'/rsslib.php');
@@ -89,7 +89,7 @@
$isteacher = false;
$this->courseid = SITEID;
if ($this->instance->pagetype == PAGE_COURSE_VIEW) {
$this->courseid = $this->instance->pageid;
$this->courseid = $COURSE->id;
$isteacher = isteacher($this->courseid);
}
@@ -123,7 +123,7 @@
$numids = count($rssidarray);
$count = 0;
foreach ($rssidarray as $rssid) {
$output .= $this->get_rss_by_id($rssid, $display_description, $shownumentries, ($numids > 1) ? true : false);
$output .= clean_text($this->get_rss_by_id($rssid, $display_description, $shownumentries, ($numids > 1) ? true : false), FORMAT_HTML);
if ($numids > 1 && $count != $numids -1 && !empty($rssfeedstring)) {
$output .= '<hr width="80%" />';
}
@@ -27,6 +27,7 @@ if (isguest()) {
error(get_string('noguestpost', 'forum'), $referrer);
}
$url = optional_param('url','',PARAM_URL);
if (!empty($url)) {
// attempting to replace feed and rss url types with http
@@ -41,7 +42,7 @@ if (!empty($url)) {
$act = optional_param('act', NULL, PARAM_ALPHA);
$rssid = optional_param('rssid', NULL, PARAM_INT);
$id = optional_param('id', SITEID, PARAM_INT);
$url = clean_param($url, PARAM_URL);
//$url = clean_param($url, PARAM_URL);
$preferredtitle = optional_param('preferredtitle', '', PARAM_ALPHA);
if (!defined('MAGPIE_OUTPUT_ENCODING')) {
+6
View File
@@ -12,6 +12,12 @@ function rss_client_upgrade($oldversion) {
table_column('block_rss_client','description','description','text');
}
if ($oldversion < 2005090201) {
modify_database('', 'ALTER TABLE prefix_block_rss_client
ALTER COLUMN title SET DEFAULT \'\',
ALTER COLUMN description SET DEFAULT \'\'');
}
return true;
}
+1 -1
View File
@@ -22,7 +22,7 @@ class block_section_links extends block_base {
}
function applicable_formats() {
return (array('course-view-weeks' => true, 'course-view-topics' => true));
return (array('course-view-weeks' => true, 'course-view-topics' => true, 'course-edit-weeks' => true, 'course-edit-topics' => true));
}
function get_content() {
+1 -1
View File
@@ -5,4 +5,4 @@
// database (blocks_version) to determine whether upgrades should
// be performed (see db/backup_*.php)
$blocks_version = 2005090200; // The current version is a date (YYYYMMDDXX)
$blocks_version = 2005090201; // The current version is a date (YYYYMMDDXX)
+4
View File
@@ -1,5 +1,9 @@
<?php // $Id$
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
/**
* Definition of blog page type.
*/
+6 -16
View File
@@ -115,8 +115,8 @@ if ($editid) { // User is editing a post
$blogEntry = get_record('post','id',$editid);
//using an unformatted entry body here so that extra formatting information is not stored in the db
$post->body = stripslashes_safe($blogEntry->summary);
$post->etitle = stripslashes_safe($blogEntry->subject);
$post->body = $blogEntry->summary;
$post->etitle = $blogEntry->subject;
$post->postid = $editid;
$post->userid = $blogEntry->userid;
$post->format = $blogEntry->format;
@@ -137,16 +137,6 @@ print_simple_box_start("center");
require('edit.html');
print_simple_box_end();
// Janne comment: Let's move this in here
// so IE gets more time to load the
// Page.
if ($usehtmleditor) {
// Janne comment: there are two text fields in form
// so lets try to replace them both with
// HTMLArea editors
use_html_editor();
}
include($CFG->dirroot .'/blog/footer.php');
@@ -204,8 +194,8 @@ function do_save($post) {
/// Write a blog entry into database
$blogEntry = new object;
$blogEntry->subject = addslashes($post->etitle);
$blogEntry->summary = addslashes($post->body);
$blogEntry->subject = $post->etitle;
$blogEntry->summary = $post->body;
$blogEntry->module = 'blog';
$blogEntry->userid = $USER->id;
$blogEntry->format = $post->format;
@@ -277,8 +267,8 @@ function do_update($post) {
// echo "id id ".$post->postid;
// print_object($blogentry); //debug
$blogEntry->subject = addslashes($post->etitle);
$blogEntry->summary = addslashes($post->body);
$blogEntry->subject = $post->etitle;
$blogEntry->summary = $post->body;
if ($blogEntry->summary == '<br />') {
$blogEntry->summary = '';
}
+11
View File
@@ -21,6 +21,17 @@ if (blocks_have_content($pageblocks, BLOCK_POS_RIGHT) || $editing) {
<?php
// Janne comment: Let's move this in here
// so IE gets more time to load the
// Page.
if (isset($usehtmleditor) && $usehtmleditor) {
// Janne comment: there are two text fields in form
// so lets try to replace them both with
// HTMLArea editors
use_html_editor();
}
if (isset($course) && ($course->id)) {
print_footer($course);
} else {
+25 -22
View File
@@ -15,9 +15,6 @@ $blockid = optional_param('blockid', 0, PARAM_INT);
/// If user has never visited this page before, install 2 blocks for him
blog_check_and_install_blocks();
if (!$site = get_site()) {
redirect($CFG->wwwroot.'/index.php');
}
// now check that they are logged in and allowed into the course (if specified)
if ($courseid != SITEID) {
@@ -26,7 +23,7 @@ if ($courseid != SITEID) {
}
require_login($course->id);
} else {
$course = get_site();
$course = $SITE;
}
// Bounds for block widths within this page
@@ -92,7 +89,7 @@ if ($ME == $CFG->wwwroot.'/blog/edit.php') { /// We are in edit mode, print the
$formHeading = get_string('addnewentry', 'blog');
}
print_header("$site->shortname: $blogstring", "$site->fullname",
print_header("$SITE->shortname: $blogstring", "$SITE->fullname",
'<a href="'.$CFG->wwwroot.'/user/view.php?id='.$filterselect.'">'.fullname($user).'</a> ->
<a href="'.$CFG->wwwroot.'/blog/index.php?userid='.$user->id.'">'.$blogstring.'</a> -> '. $formHeading,'','',true);
@@ -103,20 +100,20 @@ if ($ME == $CFG->wwwroot.'/blog/edit.php') { /// We are in edit mode, print the
switch ($filtertype) {
case 'site':
if ($tagid || !empty($tag)) {
print_header("$site->shortname: $blogstring", "",
print_header("$SITE->shortname: $blogstring", $SITE->fullname,
'<a href="index.php?filtertype=site">'. "$blogstring</a> -> $tagstring: $taginstance->text",'','',true,$PAGE->get_extra_header_string());
} else {
print_header("$site->shortname: $blogstring", "",
print_header("$SITE->shortname: $blogstring", $SITE->fullname,
$blogstring,'','',true,$PAGE->get_extra_header_string());
}
break;
case 'course':
if ($tagid || !empty($tag)) {
print_header_simple("$course->shortname: $blogstring", "",
print_header("$course->shortname: $blogstring", $course->fullname,
'<a href="index.php?filtertype=course&amp;filterselect='.$filterselect.'">'. "$blogstring</a> -> $tagstring: $taginstance->text",'','',true,$PAGE->get_extra_header_string());
} else {
print_header_simple("$course->shortname: $blogstring", "",
print_header("$course->shortname: $blogstring", $course->fullname,
$blogstring,'','',true,$PAGE->get_extra_header_string());
}
break;
@@ -126,11 +123,11 @@ if ($ME == $CFG->wwwroot.'/blog/edit.php') { /// We are in edit mode, print the
$thisgroup = get_record('groups', 'id', $filterselect);
if ($tagid || !empty($tag)) {
print_header_simple("$course->shortname: $blogstring", "$course->fullname",
print_header("$course->shortname: $blogstring", $course->fullname,
'<a href="'.$CFG->wwwroot.'/user/index.php?id='.$course->id.'&amp;group='.$filterselect.'">'.$thisgroup->name.'</a> ->
<a href="index.php?filtertype=group&amp;filterselect='.$filterselect.'">'. "$blogstring</a> -> $tagstring: $taginstance->text",'','',true,$PAGE->get_extra_header_string());
} else {
print_header_simple("$course->shortname: $blogstring", "$course->fullname",
print_header("$course->shortname: $blogstring", $course->fullname,
'<a href="'.$CFG->wwwroot.'/user/index.php?id='.$course->id.'&amp;group='.$filterselect.'">'.$thisgroup->name."</a> ->
$blogstring",'','',true,$PAGE->get_extra_header_string());
@@ -144,14 +141,14 @@ if ($ME == $CFG->wwwroot.'/blog/edit.php') { /// We are in edit mode, print the
if (isset($course->id) && $course->id && $course->id != SITEID) {
if ($tagid || !empty($tag)) {
print_header("$course->shortname: $blogstring", "$course->fullname",
print_header("$course->shortname: $blogstring", $course->fullname,
'<a href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">'.$course->shortname.'</a> ->
<a href="'.$CFG->wwwroot.'/user/index.php?id='.$course->id.'">'.$participants.'</a> ->
<a href="'.$CFG->wwwroot.'/user/view.php?id='.$filterselect.'&amp;course='.$course->id.'">'.fullname($user).'</a> ->
<a href="index.php?courseid='.optional_param('courseid', 0, PARAM_INT).'&amp;filtertype=user&amp;filterselect='.$filterselect.'">'. "$blogstring</a> -> $tagstring: $taginstance->text",'','',true,$PAGE->get_extra_header_string());
} else {
print_header("$course->shortname: $blogstring", "$course->fullname",
print_header("$course->shortname: $blogstring", $course->fullname,
'<a href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">'.$course->shortname.'</a> ->
<a href="'.$CFG->wwwroot.'/user/index.php?id='.$course->id.'">'.$participants.'</a> ->
<a href="'.$CFG->wwwroot.'/user/view.php?id='.$filterselect.'&amp;course='.$course->id.'">'.fullname($user).'</a> ->
@@ -163,12 +160,12 @@ if ($ME == $CFG->wwwroot.'/blog/edit.php') { /// We are in edit mode, print the
else {
if ($tagid || !empty($tag)) {
print_header("$site->shortname: $blogstring", "$site->fullname",
print_header("$SITE->shortname: $blogstring", $SITE->fullname,
'<a href="'.$CFG->wwwroot.'/user/view.php?id='.$filterselect.'">'.fullname($user).'</a> ->
<a href="index.php?filtertype=user&amp;filterselect='.$filterselect.'">'. "$blogstring</a> -> $tagstring: $taginstance->text",'','',true,$PAGE->get_extra_header_string());
} else {
print_header("$site->shortname: $blogstring", "$site->fullname",
print_header("$SITE->shortname: $blogstring", $SITE->fullname,
'<a href="'.$CFG->wwwroot.'/user/view.php?id='.$filterselect.'">'.fullname($user).'</a> ->
'.$blogstring,'','',true,$PAGE->get_extra_header_string());
@@ -178,7 +175,7 @@ if ($ME == $CFG->wwwroot.'/blog/edit.php') { /// We are in edit mode, print the
break;
default: //user click on add from block
print_header("$site->shortname: $blogstring", "$site->fullname",
print_header("$SITE->shortname: $blogstring", $SITE->fullname,
'<a href="'.$CFG->wwwroot.'/user/view.php?id='.$filterselect.'">'.fullname($user).'</a> ->
<a href="'.$CFG->wwwroot.'/blog/index.php?userid='.$user->id.'">'.$blogstring.'</a> -> '.get_string('addentry','blog'),'','',true,$PAGE->get_extra_header_string());
break;
@@ -186,18 +183,24 @@ if ($ME == $CFG->wwwroot.'/blog/edit.php') { /// We are in edit mode, print the
} /// close switch
// prints the tabs
$currenttab = 'blogs';
$user = $USER;
if (!$course) {
$course = get_record('course','id',optional_param('courseid', SITEID, PARAM_INT));
}
require_once($CFG->dirroot .'/user/tabs.php');
$editing = false;
if ($PAGE->user_allowed_editing()) {
$editing = $PAGE->user_is_editing();
}
// Calculate the preferred width for left, right and center (both center positions will use the same)
$preferred_width_left = optional_param('preferred_width_left', blocks_preferred_width($pageblocks[BLOCK_POS_LEFT]), PARAM_INT);
$preferred_width_right = optional_param('preferred_width_right', blocks_preferred_width($pageblocks[BLOCK_POS_RIGHT]), PARAM_INT);
$preferred_width_left = min($preferred_width_left, BLOCK_L_MAX_WIDTH);
$preferred_width_left = max($preferred_width_left, BLOCK_L_MIN_WIDTH);
$preferred_width_right = min($preferred_width_right, BLOCK_R_MAX_WIDTH);
$preferred_width_right = max($preferred_width_right, BLOCK_R_MIN_WIDTH);
$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);
// Display the blocks and allow blocklib to handle any block action requested
$pageblocks = blocks_get_by_page($PAGE);
+2 -10
View File
@@ -20,7 +20,7 @@ $limit = optional_param('limit', 0, PARAM_INT);
$start = optional_param('formstart', 0, PARAM_INT);
$userid = optional_param('userid',0,PARAM_INT);
$courseid = optional_param('courseid',SITEID,PARAM_INT);
$tag = s(urldecode(optional_param('tag', '', PARAM_NOTAGS)));
$tag = optional_param('tag', '', PARAM_NOTAGS);
$tagid = optional_param('tagid', 0, PARAM_INT);
$postid = optional_param('postid',0,PARAM_INT);
$filtertype = optional_param('filtertype', '', PARAM_ALPHA);
@@ -139,19 +139,11 @@ if ($limit == 'none') {
include($CFG->dirroot .'/blog/header.php');
// prints the tabs
$currenttab = 'blogs';
$user = $USER;
if (!$course) {
$course = get_record('course','id',optional_param('courseid', SITEID, PARAM_INT));
}
require_once($CFG->dirroot .'/user/tabs.php');
$blogpage = optional_param('blogpage',0,PARAM_INT);
blog_print_html_formatted_entries($userid, $postid, $limit, ($blogpage * $limit) ,$filtertype, $filterselect, $tagid, $tag, $filtertype, $filterselect);
add_to_log($site->id, 'blog', 'view', 'index.php?filtertype='.$filtertype.'&amp;filterselect='.$filterselect.'&amp;postid='.$postid.'&amp;tagid='.$tagid.'&amp;tag='.$tag, 'view blog entry');
add_to_log($courseid, 'blog', 'view', 'index.php?filtertype='.$filtertype.'&amp;filterselect='.$filterselect.'&amp;postid='.$postid.'&amp;tagid='.$tagid.'&amp;tag='.$tag, 'view blog entry');
include($CFG->dirroot .'/blog/footer.php');
+32 -18
View File
@@ -119,6 +119,9 @@
blog_print_entry($blogEntry, 'list', $filtertype, $filterselect); //print this entry.
$count++;
}
print_paging_bar(get_viewable_entry_count($userid, $postid, $limit, $start,$filtertype, $filterselect, $tagid, $tag, $sort='lastmodified DESC'), $blogpage, $bloglimit, get_baseurl($filtertype, $filterselect), 'blogpage');
if (!$count) {
print '<br /><center>'. get_string('noentriesyet', 'blog') .'</center><br />';
@@ -151,10 +154,10 @@
global $USER, $CFG, $course, $ME;
$template['body'] = get_formatted_entry_body(stripslashes_safe($blogEntry->summary), $blogEntry->format);
$template['title'] = '<a name="'. $blogEntry->subject .'"></a>';
$template['body'] = get_formatted_entry_body($blogEntry->summary, $blogEntry->format);
$template['title'] = '<a name="'. s($blogEntry->subject, true) .'"></a>';
//enclose the title in nolink tags so that moodle formatting doesn't autolink the text
$template['title'] .= '<span class="nolink">'. stripslashes_safe($blogEntry->subject);
$template['title'] .= '<span class="nolink">'. strip_tags(format_string($blogEntry->subject, true));
$template['title'] .= '</span>';
$template['userid'] = $blogEntry->userid;
$template['author'] = fullname(get_record('user','id',$blogEntry->userid));
@@ -339,7 +342,7 @@
if ($format) {
return format_text($body, $format);
}
return stripslashes_safe($body);
return $body;
}
/// Main filter function
@@ -408,8 +411,8 @@
case 'site':
if (!isguest() && isloggedin()) {
if (isloggedin()) {
$SQL = 'SELECT '.$requiredfields.' FROM '.$CFG->prefix.'post p, '.$tagtablesql
.$CFG->prefix.'user u
WHERE p.userid = u.id '.$tagquerysql.'
@@ -469,22 +472,33 @@
case 'group':
$SQL = 'SELECT '.$requiredfields.' FROM '.$CFG->prefix.'post p, '.$tagtablesql
.$CFG->prefix.'groups_members m, '.$CFG->prefix.'user u
WHERE p.userid = m.userid '.$tagquerysql.'
AND u.id = p.userid
AND m.groupid = '.$filterselect.'
AND (p.publishstate = \'site\' OR p.publishstate = \'public\' OR p.userid = '.$USER->id.')';
$SQL = 'SELECT '.$requiredfields.' FROM '.$CFG->prefix.'post p, '.$tagtablesql
.$CFG->prefix.'groups_members m, '.$CFG->prefix.'user u
WHERE p.userid = m.userid '.$tagquerysql.'
AND u.id = p.userid
AND m.groupid = '.$filterselect.'
AND (p.publishstate = \'site\' OR p.publishstate = \'public\' OR p.userid = '.$USER->id.')';
break;
case 'user':
$SQL = 'SELECT '.$requiredfields.' FROM '.$CFG->prefix.'post p, '.$tagtablesql
.$CFG->prefix.'user u
WHERE p.userid = u.id '.$tagquerysql.'
AND u.id = '.$filterselect.'
AND (p.publishstate = \'site\' OR p.publishstate = \'public\' OR p.userid = '.$USER->id.')';
if (isloggedin()) {
$SQL = 'SELECT '.$requiredfields.' FROM '.$CFG->prefix.'post p, '.$tagtablesql
.$CFG->prefix.'user u
WHERE p.userid = u.id '.$tagquerysql.'
AND u.id = '.$filterselect.'
AND (p.publishstate = \'site\' OR p.publishstate = \'public\' OR p.userid = '.$USER->id.')';
} else {
$SQL = 'SELECT '.$requiredfields.' FROM '.$CFG->prefix.'post p, '.$tagtablesql
.$CFG->prefix.'user u
WHERE p.userid = u.id '.$tagquerysql.'
AND u.id = '.$filterselect.'
AND p.publishstate = \'public\'';
}
break;
+1 -1
View File
@@ -8,7 +8,7 @@
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" value="<?php print_string("savechanges"); ?>" />
<input type="submit" value="<?php print_string("savechanges"); ?>" />
<input type="button" value="<?php print_string('cancel'); ?>" onclick="javascript:history.go(-1)" /></td>
</tr>
</table>
+2 -2
View File
@@ -29,7 +29,7 @@
/// If data submitted, then process and store.
if ($post = data_submitted()) {
if ($post = data_submitted()) {
$pagesize = optional_param('pagesize', 10, PARAM_INT);
if ($pagesize < 1 ) {
@@ -54,7 +54,7 @@
print_simple_box_start('center', '', '');
include('./preferences.html');
include('./preferences.html');
print_simple_box_end();
print_footer();
+25 -19
View File
@@ -9,14 +9,14 @@
// Copyright (C) 2003-2004 Greek School Network www.sch.gr //
// //
// Designed by: //
// Avgoustos Tsinakos (tsinakos@uom.gr) //
// Jon Papaioannou (pj@uom.gr) //
// Avgoustos Tsinakos (tsinakos@teikav.edu.gr) //
// Jon Papaioannou (pj@moodle.org) //
// //
// Programming and development: //
// Jon Papaioannou (pj@uom.gr) //
// Jon Papaioannou (pj@moodle.org) //
// //
// For bugs, suggestions, etc contact: //
// Jon Papaioannou (pj@uom.gr) //
// Jon Papaioannou (pj@moodle.org) //
// //
// The current module was developed at the University of Macedonia //
// (www.uom.gr) under the funding of the Greek School Network (www.sch.gr) //
@@ -116,7 +116,7 @@
if($form = data_submitted()) {
$form->name = clean_text(strip_tags($form->name,'<lang><span>'));
$form->name = clean_param(strip_tags($form->name,'<lang><span>'), PARAM_CLEAN);
$form->timestart = make_timestamp($form->startyr, $form->startmon, $form->startday, $form->starthr, $form->startmin);
if($form->duration == 1) {
@@ -205,13 +205,14 @@
if (count($err) == 0) {
$form->timemodified = time();
if ($form->repeat) {
$fetch = get_record_sql('SELECT 1, MAX(repeatid) AS repeatid FROM '.$CFG->prefix.'event');
$form->repeatid = empty($fetch) ? 1 : $fetch->repeatid + 1;
}
/// Get the event id for the log record.
$eventid = insert_record('event', $form, true);
/// Use the event id as the repeatid to link repeat entries together
if ($form->repeat) {
$form->repeatid = $form->id = $eventid;
update_record('event', $form); // update the row, to set its repeatid
}
/// Log the event entry.
add_to_log($form->courseid, 'calendar', 'add', 'event.php?action=edit&amp;id='.$eventid, stripslashes($form->name));
@@ -262,7 +263,7 @@
}
print_header($site->shortname.': '.$strcalendar.': '.$title, $strcalendar, $nav.' -> '.$title,
$focus, '', true, '', user_login_string($site));
'eventform.name', '', true, 'new.name', user_login_string($site));
echo calendar_overlib_html();
@@ -378,7 +379,7 @@
$form->timestart = make_timestamp($cal_y, $cal_m, 1, 0, 0, 0);
}
}
if($form->timestart < 0) {
if(!isset($form->timestart) or $form->timestart < 0) {
$form->timestart = time();
}
@@ -484,15 +485,20 @@
echo '<div class="header">'.get_string('newevent', 'calendar').$header.'</div>';
if($eventtype == 'select') {
$defaultcourse = $SESSION->cal_course_referer;
if(isteacheredit($defaultcourse, $USER->id)) {
$defaultgroup = $groupid = 0;
$courseid = optional_param('courseid', $SESSION->cal_course_referer, PARAM_INT);
if ($courseid == 0) { // workaround by Dan for bug #6130
$courseid = SITEID;
}
else {
$defaultgroup = user_group($defaultcourse, $USER->id);
$groupid = optional_param('groupid', $defaultgroup->id, PARAM_INT);
if (!$course = get_record('course', 'id', $courseid)) {
error('Incorrect course ID');
}
$courseid = optional_param('courseid', $defaultcourse, PARAM_INT);
if ($groupmode = groupmode($course)) { // Groups are being used
$changegroup = optional_param('group', -1, PARAM_INT);
$groupid = get_and_set_current_group($course, $groupmode, $changegroup);
} else {
$groupid = 0;
}
echo '<h2>'.get_string('eventkind', 'calendar').':</h2>';
echo '<div id="selecteventtype">';
include('event_select.html');
+1 -1
View File
@@ -1,4 +1,4 @@
<form method="post" action="event.php" name="edit">
<form method="post" action="event.php" name="eventform">
<table cellpadding="5" cellspacing="0">
<tr>
<td style="vertical-align: top; text-align: right;">
+3 -3
View File
@@ -2,7 +2,7 @@
// The following is a hack to fix bug 1488
$course = get_record('course', 'id', ($form->courseid) ? $form->courseid : $site->id);
?>
<form method="post" action="event.php" name="new">
<form method="post" action="event.php" name="eventform">
<table cellpadding="5">
<tr>
<td style="vertical-align: top; text-align: right;">
@@ -29,9 +29,9 @@
<?php print_string('eventdate', 'calendar'); ?>:
</td>
<td>
<?php print_date_selector('startday', 'startmon', 'startyr', $form->timestart);?>
<?php print_date_selector('startday', 'startmon', 'startyr', (int)$form->timestart);?>
<?php print_string('eventtime', 'calendar');?>
<?php print_time_selector('starthr', 'startmin', $form->timestart) ?>
<?php print_time_selector('starthr', 'startmin', (int)$form->timestart) ?>
<?php if (isset($err['timestart'])) formerr($err['timestart']); ?>
</td>
</tr>
+29 -18
View File
@@ -9,14 +9,14 @@
// Copyright (C) 2003-2004 Greek School Network www.sch.gr //
// //
// Designed by: //
// Avgoustos Tsinakos (tsinakos@uom.gr) //
// Jon Papaioannou (pj@uom.gr) //
// Avgoustos Tsinakos (tsinakos@teikav.edu.gr) //
// Jon Papaioannou (pj@moodle.org) //
// //
// Programming and development: //
// Jon Papaioannou (pj@uom.gr) //
// Jon Papaioannou (pj@moodle.org) //
// //
// For bugs, suggestions, etc contact: //
// Jon Papaioannou (pj@uom.gr) //
// Jon Papaioannou (pj@moodle.org) //
// //
// The current module was developed at the University of Macedonia //
// (www.uom.gr) under the funding of the Greek School Network (www.sch.gr) //
@@ -104,9 +104,15 @@ function calendar_get_mini($courses, $groups, $users, $cal_month = false, $cal_y
list($d, $m, $y) = array($date['mday'], $date['mon'], $date['year']); // This is what we want to display
$display->maxdays = calendar_days_in_month($m, $y);
// We 'll keep these values as GMT here, and offset them when the time comes to query the db
$display->tstart = gmmktime(0, 0, 0, $m, 1, $y); // This is GMT
$display->tend = gmmktime(23, 59, 59, $m, $display->maxdays, $y); // GMT
if (get_user_timezone_offset() < 99) {
// We 'll keep these values as GMT here, and offset them when the time comes to query the db
$display->tstart = gmmktime(0, 0, 0, $m, 1, $y); // This is GMT
$display->tend = gmmktime(23, 59, 59, $m, $display->maxdays, $y); // GMT
} else {
// no timezone info specified
$display->tstart = mktime(0, 0, 0, $m, 1, $y);
$display->tend = mktime(23, 59, 59, $m, $display->maxdays, $y);
}
$startwday = dayofweek(1, $m, $y);
@@ -236,14 +242,14 @@ function calendar_get_mini($courses, $groups, $users, $cal_month = false, $cal_y
$popupicon = $CFG->pixpath.'/c/user.gif';
$popupalt = '';
}
$popupcontent .= '<div><img height="16" width="16" src="'.$popupicon.'" style="vertical-align: middle; margin-right: 4px;" alt="'.$popupalt.'" /><a href="'.$dayhref.'">'.format_string($event->name,true).'</a></div>';
$popupcontent .= '<div><img height="16" width="16" src="'.$popupicon.'" style="vertical-align: middle; margin-right: 4px;" alt="'.$popupalt.'" /><a href="'.$dayhref.'#event_'.$event->id.'">'.format_string($event->name,true).'</a></div>';
}
//Accessibility: functionality moved to calendar_get_popup.
if($display->thismonth && $day == $d) {
$popup = calendar_get_popup(true, $events[$eventid]->timestart, $popupcontent);
$popup = calendar_get_popup(true, $events[$eventid]->timestart, $popupcontent);
} else {
$popup = calendar_get_popup(false, $events[$eventid]->timestart, $popupcontent);
$popup = calendar_get_popup(false, $events[$eventid]->timestart, $popupcontent);
}
// Class and cell content
@@ -279,15 +285,15 @@ function calendar_get_mini($courses, $groups, $users, $cal_month = false, $cal_y
}
// Special visual fx for today
//Accessibility: hidden text for today, and popup.
//Accessibility: hidden text for today, and popup.
if($display->thismonth && $day == $d) {
$class .= ' today';
$today = get_string('today', 'calendar').' '.userdate(time(), get_string('strftimedayshort'));
if(! isset($eventsbyday[$day])) {
$class .= ' eventnone';
$popup = calendar_get_popup(true, false);
$cell = '<a href="#" '.$popup.'>'.$day.'</a>';
$class .= ' eventnone';
$popup = calendar_get_popup(true, false);
$cell = '<a href="#" '.$popup.'>'.$day.'</a>';
}
$cell = '<span class="accesshide">'.$today.' </span>'.$cell;
}
@@ -327,13 +333,14 @@ function calendar_get_popup($is_today, $event_timestart, $popupcontent='') {
if (false === $event_timestart) {
$popupcaption .= userdate(time(), get_string('strftimedayshort'));
$popupcontent = get_string('eventnone', 'calendar');
} else {
$popupcaption .= get_string('eventsfor', 'calendar', userdate($event_timestart, get_string('strftimedayshort')));
}
$popupcontent = str_replace("'", "\'", htmlspecialchars($popupcontent));
$popupcaption = str_replace("'", "\'", htmlspecialchars($popupcaption));
$popup = 'onmouseover="return overlib(\''.$popupcontent.'\', CAPTION, \''.$popupcaption.'\');" onmouseout="return nd();"';
return $popup;
return $popup;
}
function calendar_get_upcoming($courses, $groups, $users, $daysinfuture, $maxevents, $fromtime=0) {
@@ -449,7 +456,7 @@ function calendar_print_event($event) {
static $strftimetime;
$event = calendar_add_event_metadata($event);
echo '<table class="event" cellspacing="0">';
echo '<a name="event_'.$event->id.'"></a><table class="event" cellspacing="0">';
echo '<tr><td class="picture">';
if (!empty($event->icon)) {
echo $event->icon;
@@ -862,7 +869,7 @@ function calendar_get_sideblock_upcoming($events, $linkhref = NULL) {
if(!empty($linkhref)) {
$ed = usergetdate($events[$i]->timestart);
$href = calendar_get_link_href(CALENDAR_URL.$linkhref, $ed['mday'], $ed['mon'], $ed['year']);
$content .= '<a href="'.$href.'">'.$events[$i]->name.'</a>';
$content .= '<a href="'.$href.'#event_'.$events[$i]->id.'">'.$events[$i]->name.'</a>';
}
else {
$content .= $events[$i]->name;
@@ -1087,6 +1094,10 @@ function calendar_set_filters(&$courses, &$group, &$user, $courseeventsfrom = NU
else {
$courses = false;
}
//BUG 6130 clean $courses array as SESSION has bad entries.
foreach ($courses as $index => $value) {
if (empty($value)) unset($courses[$index]);
}
if($SESSION->cal_show_user || $ignorefilters) {
// This doesn't work for arrays yet (maybe someday it will)
+4 -4
View File
@@ -9,14 +9,14 @@
// Copyright (C) 2003-2004 Greek School Network www.sch.gr //
// //
// Designed by: //
// Avgoustos Tsinakos (tsinakos@uom.gr) //
// Jon Papaioannou (pj@uom.gr) //
// Avgoustos Tsinakos (tsinakos@teikav.edu.gr) //
// Jon Papaioannou (pj@moodle.org) //
// //
// Programming and development: //
// Jon Papaioannou (pj@uom.gr) //
// Jon Papaioannou (pj@moodle.org) //
// //
// For bugs, suggestions, etc contact: //
// Jon Papaioannou (pj@uom.gr) //
// Jon Papaioannou (pj@moodle.org) //
// //
// The current module was developed at the University of Macedonia //
// (www.uom.gr) under the funding of the Greek School Network (www.sch.gr) //
+26 -12
View File
@@ -9,14 +9,14 @@
// Copyright (C) 2003-2004 Greek School Network www.sch.gr //
// //
// Designed by: //
// Avgoustos Tsinakos (tsinakos@uom.gr) //
// Jon Papaioannou (pj@uom.gr) //
// Avgoustos Tsinakos (tsinakos@teikav.edu.gr) //
// Jon Papaioannou (pj@moodle.org) //
// //
// Programming and development: //
// Jon Papaioannou (pj@uom.gr) //
// Jon Papaioannou (pj@moodle.org) //
// //
// For bugs, suggestions, etc contact: //
// Jon Papaioannou (pj@uom.gr) //
// Jon Papaioannou (pj@moodle.org) //
// //
// The current module was developed at the University of Macedonia //
// (www.uom.gr) under the funding of the Greek School Network (www.sch.gr) //
@@ -44,8 +44,8 @@
require_once($CFG->dirroot.'/course/lib.php');
require_once($CFG->dirroot.'/calendar/lib.php');
$course = optional_param('course', 0);
$view = optional_param('view', 'upcoming');
$courseid = optional_param('course', 0, PARAM_INT);
$view = optional_param('view', 'upcoming', PARAM_ALPHA);
$day = optional_param('cal_d', 0, PARAM_INT);
$mon = optional_param('cal_m', 0, PARAM_INT);
$yr = optional_param('cal_y', 0, PARAM_INT);
@@ -54,6 +54,12 @@
redirect($CFG->wwwroot.'/'.$CFG->admin.'/index.php');
}
if ($courseid) {
require_login($courseid);
} else if ($CFG->forcelogin) {
require_login();
}
//add_to_log($course->id, "course", "view", "view.php?id=$course->id", "$course->id");
$now = usergetdate(time());
$pagetitle = '';
@@ -83,8 +89,8 @@
}
// If a course has been supplied in the URL, change the filters to show that one
if (!empty($course)) {
if ($course = get_record('course', 'id', $course)) {
if (!empty($courseid)) {
if ($course = get_record('course', 'id', $courseid)) {
if ($course->id == SITEID) {
// If coming from the home page, show all courses
$SESSION->cal_courses_shown = calendar_get_default_courses(true);
@@ -96,6 +102,8 @@
calendar_set_referring_course($SESSION->cal_courses_shown);
}
}
} else {
$course = null;
}
if (empty($USER->id) or isguest()) {
@@ -298,9 +306,15 @@ function calendar_show_month_detailed($m, $y, $courses, $groups, $users) {
list($d, $m, $y) = array($date['mday'], $date['mon'], $date['year']); // This is what we want to display
$display->maxdays = calendar_days_in_month($m, $y);
// We 'll keep these values as GMT here, and offset them when the time comes to query the db
$display->tstart = gmmktime(0, 0, 0, $m, 1, $y); // This is GMT
$display->tend = gmmktime(23, 59, 59, $m, $display->maxdays, $y); // GMT
if (get_user_timezone_offset() < 99) {
// We 'll keep these values as GMT here, and offset them when the time comes to query the db
$display->tstart = gmmktime(0, 0, 0, $m, 1, $y); // This is GMT
$display->tend = gmmktime(23, 59, 59, $m, $display->maxdays, $y); // GMT
} else {
// no timezone info specified
$display->tstart = mktime(0, 0, 0, $m, 1, $y);
$display->tend = mktime(23, 59, 59, $m, $display->maxdays, $y);
}
$startwday = gmdate('w', $display->tstart); // $display->tstart is already GMT, so don't use date(): messes with server's TZ
@@ -436,7 +450,7 @@ function calendar_show_month_detailed($m, $y, $courses, $groups, $users) {
if(isset($eventsbyday[$day])) {
echo '<ul class="events-new">';
foreach($eventsbyday[$day] as $eventindex) {
echo '<li><a href="'.$dayhref.'">'.format_string($events[$eventindex]->name,true).'</a></li>';
echo '<li><a href="'.$dayhref.'#event_'.$events[$eventindex]->id.'">'.format_string($events[$eventindex]->name, true).'</a></li>';
}
echo '</ul>';
}
+6
View File
@@ -139,6 +139,9 @@ $CFG->admin = 'admin';
// Useful for webhost operators who have alternate methods of backups
// $CFG->disablescheduledbackups = true;
//
// Prevent stats processing and hide the GUI
// $CFG->disablestatsprocessing = true;
//
// Restrict certain usernames from doing things that may mess up a site
// This is especially useful for demonstration teacher accounts
// $CFG->restrictusers = 'teacher,fred,jim';
@@ -281,6 +284,9 @@ $CFG->admin = 'admin';
//
// $CFG->emailconnectionerrorsto = 'your@emailaddress.com';
//
// Restore pre-1.6 behaviour where courses could still be available
// even if the category they were in was hidden
// $CFG->allowvisiblecoursesinhiddencategories = true;
//
// NOTE: if you are using custompix in your theme, see /fixpix.php.
+12 -12
View File
@@ -8,7 +8,7 @@
$id = required_param('id', PARAM_INT); // Category id
$page = optional_param('page', 0, PARAM_INT); // which page to show
$perpage = optional_param('perpage', 20, PARAM_INT); // how many per page
$perpage = optional_param('perpage', $CFG->coursesperpage, PARAM_INT); // how many per page
$edit = optional_param('edit', -1, PARAM_BOOL);
$hide = optional_param('hide', 0, PARAM_INT);
$show = optional_param('show', 0, PARAM_INT);
@@ -301,33 +301,33 @@
echo "<td>";
echo '<a title="'.$strsettings.'" href="'.$CFG->wwwroot.'/course/edit.php?id='.
$acourse->id.'">'.
'<img src="'.$CFG->pixpath.'/t/edit.gif" height="11" width="11" border="0" alt="" /></a> ';
'<img src="'.$CFG->pixpath.'/t/edit.gif" height="11" width="11" border="0" alt="'.$stredit.'" /></a> ';
echo '<a title="'.$strassignteachers.'" href="'.$CFG->wwwroot.'/course/teacher.php?id='.
$acourse->id.'">'.
'<img src="'.$CFG->pixpath.'/t/user.gif" height="11" width="11" border="0" alt="" /></a> ';
'<img src="'.$CFG->pixpath.'/t/user.gif" height="11" width="11" border="0" alt="'.$strassignteachers.'" /></a> ';
echo '<a title="'.$strdelete.'" href="delete.php?id='.$acourse->id.'">'.
'<img src="'.$CFG->pixpath.'/t/delete.gif" height="11" width="11" border="0" alt="" /></a> ';
'<img src="'.$CFG->pixpath.'/t/delete.gif" height="11" width="11" border="0" alt="'.$strdelete.'" /></a> ';
if (!empty($acourse->visible)) {
echo '<a title="'.$strhide.'" href="category.php?id='.$category->id.'&amp;page='.$page.
'&amp;perpage='.$perpage.'&amp;hide='.$acourse->id.'&amp;sesskey='.$USER->sesskey.'">'.
'<img src="'.$CFG->pixpath.'/t/hide.gif" height="11" width="11" border="0" alt="" /></a> ';
'<img src="'.$CFG->pixpath.'/t/hide.gif" height="11" width="11" border="0" alt="'.$strhide.'" /></a> ';
} else {
echo '<a title="'.$strshow.'" href="category.php?id='.$category->id.'&amp;page='.$page.
'&amp;perpage='.$perpage.'&amp;show='.$acourse->id.'&amp;sesskey='.$USER->sesskey.'">'.
'<img src="'.$CFG->pixpath.'/t/show.gif" height="11" width="11" border="0" alt="" /></a> ';
'<img src="'.$CFG->pixpath.'/t/show.gif" height="11" width="11" border="0" alt="'.$strshow.'" /></a> ';
}
echo '<a title="'.$strbackup.'" href="../backup/backup.php?id='.$acourse->id.'">'.
'<img src="'.$CFG->pixpath.'/t/backup.gif" height="11" width="11" border="0" alt="" /></a> ';
'<img src="'.$CFG->pixpath.'/t/backup.gif" height="11" width="11" border="0" alt="'.$strbackup.'" /></a> ';
echo '<a title="'.$strrestore.'" href="../files/index.php?id='.$acourse->id.
'&amp;wdir=/backupdata">'.
'<img src="'.$CFG->pixpath.'/t/restore.gif" height="11" width="11" border="0" alt="" /></a> ';
'<img src="'.$CFG->pixpath.'/t/restore.gif" height="11" width="11" border="0" alt="'.$strrestore.'" /></a> ';
if ($up) {
echo '<a title="'.$strmoveup.'" href="category.php?id='.$category->id.'&amp;page='.$page.
'&amp;perpage='.$perpage.'&amp;moveup='.$acourse->id.'&amp;sesskey='.$USER->sesskey.'">'.
'<img src="'.$CFG->pixpath.'/t/up.gif" height="11" width="11" border="0" alt="" /></a> ';
'<img src="'.$CFG->pixpath.'/t/up.gif" height="11" width="11" border="0" alt="'.$strmoveup.'" /></a> ';
} else {
echo '<img src="'.$CFG->wwwroot.'/pix/spacer.gif" height="11" width="11" border="0" alt="" /> ';
}
@@ -335,7 +335,7 @@
if ($down) {
echo '<a title="'.$strmovedown.'" href="category.php?id='.$category->id.'&amp;page='.$page.
'&amp;perpage='.$perpage.'&amp;movedown='.$acourse->id.'&amp;sesskey='.$USER->sesskey.'">'.
'<img src="'.$CFG->pixpath.'/t/down.gif" height="11" width="11" border="0" alt="" /></a> ';
'<img src="'.$CFG->pixpath.'/t/down.gif" height="11" width="11" border="0" alt="'.$strmovedown.'" /></a> ';
} else {
echo '<img src="'.$CFG->wwwroot.'/pix/spacer.gif" height="11" width="11" border="0" alt="" /> ';
}
@@ -348,9 +348,9 @@
} else if (isteacheredit($acourse->id)) {
echo '<td>';
echo '<a title="'.$strsettings.'" href="'.$CFG->wwwroot.'/course/edit.php?id='.$acourse->id.'">'.
'<img src="'.$CFG->pixpath.'/t/edit.gif" height="11" width="11" border="0" alt="" /></a> ';
'<img src="'.$CFG->pixpath.'/t/edit.gif" height="11" width="11" border="0" alt="'.$strsettings.'" /></a> ';
echo '<a title="'.$strassignteachers.'" href="'.$CFG->wwwroot.'/course/teacher.php?id='.$acourse->id.'">'.
'<img src="'.$CFG->pixpath.'/t/user.gif" height="11" width="11" border="0" alt="" /></a> ';
'<img src="'.$CFG->pixpath.'/t/user.gif" height="11" width="11" border="0" alt="'.$strassignteachers.'" /></a> ';
}
echo '</td>';
} else {
+1
View File
@@ -68,6 +68,7 @@
print_heading($strdeletingcourse);
delete_course($course->id);
fix_course_sortorder(); //update course count in catagories
print_heading( get_string("deletedcourse", "", $course->shortname) );
+1
View File
@@ -145,6 +145,7 @@
$newteacher->course = $newcourseid;
$newteacher->authority = 1; // First teacher is the main teacher
$newteacher->editall = 1; // Course creator can edit their own course
$newteacher->enrol = 'manual';// enrol the teacher too - bug #6120
if (!$newteacher->id = insert_record("user_teachers", $newteacher)) {
error("Could not add you to this new course!");
+1 -1
View File
@@ -60,7 +60,7 @@
$strsummaryof = get_string('summaryof', '', " $sectionname $form->section");
}
print_header_simple($stredit, '', $stredit);
print_header_simple($stredit, '', $stredit, 'theform.summary' );
print_heading($strsummaryof);
print_simple_box_start('center');

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