Compare commits

...

328 Commits

Author SHA1 Message Date
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
351 changed files with 6622 additions and 3618 deletions
+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
+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');
+17 -6
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
@@ -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;
+14 -2
View File
@@ -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
@@ -262,7 +274,7 @@
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");
+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>';
+1 -1
View File
@@ -192,7 +192,7 @@
$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;');
+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
*/
+51 -41
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
@@ -322,6 +323,9 @@
print_simple_box(get_string('globalsquoteswarning', '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")) {
+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);
}
+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);
?>
+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');
+3 -3
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,10 @@
$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>';
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');
+5 -2
View File
@@ -18,8 +18,7 @@
$numcourses = optional_param('numcourses', 20, PARAM_INT);
$course = get_site();
stats_check_uptodate($course->id);
$statsstatus = stats_check_uptodate($course->id);
$reportoptions = stats_get_report_options($course->id,STATS_MODE_RANKED);
@@ -49,6 +48,10 @@
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');
}
+5 -1
View File
@@ -6,7 +6,11 @@
if (!empty($CFG->enablestats)) {
echo '<p style="text-align:center;">';
echo '<a href="'.$CFG->wwwroot.'/admin/report/stats/index.php?course='.$course->id.'">'.get_string('stats').'</a>';
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 -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);
?>
+50 -11
View File
@@ -1,4 +1,5 @@
<?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');
@@ -7,6 +8,47 @@
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');
}
@@ -47,7 +89,7 @@
print_heading('db unicode migration has been completed!');
unlink($filename); //no longer in maintenance mode
@require_logout();
print_continue($CFG->wwwroot.'/admin/langimport.php');
print_continue($CFG->wwwroot.'/'.$CFG->admin.'/langimport.php');
}
//else if $migrate
@@ -107,7 +149,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>';
@@ -297,7 +338,7 @@ function db_migrate2utf8(){ //Eloy: Perhaps some type of limit parameter here
$crash->table = $crashdata[0];
$crash->field = $crashdata[1];
$crash->record = $crashdata[2];
notify("Resuming migration from: $crash->table / .$crash->field, Record: $crash->record");
}
@@ -346,7 +387,7 @@ function db_migrate2utf8(){ //Eloy: Perhaps some type of limit parameter here
$tablefunction = 'migrate2utf8_'.$dbtablename;
}
if ($CFG->dbtype=='mysql' && function_exists($tablefunction)) {
$tablefunction($dbtable['#']['FIELDS'][0]['#']['FIELD'], $crash, $debug, $maxrecords); // execute it.
$tablefunction($dbtable['#']['FIELDS'][0]['#']['FIELD'], $crash, $debug, $maxrecords, $done, $tablestoconvert); // execute it.
} else {
/******************************************************
@@ -571,8 +612,8 @@ function db_migrate2utf8(){ //Eloy: Perhaps some type of limit parameter here
$processedrecords++;
//print some output once in a while
if (($processedrecords) % 5000 == 0) {
print_progress($done, $tablestoconvert, 5, 1,
if (($processedrecords) % 1000 == 0) {
print_progress($done, $tablestoconvert, 5, 1,
'Processing: '.$dbtablename.'/'.$fieldname.' ');
}
}
@@ -772,7 +813,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');
@@ -845,7 +886,7 @@ function get_main_teacher_lang($courseid) {
function get_original_encoding($sitelang, $courselang, $userlang){
global $CFG;
global $CFG, $enc;
$lang = '';
if ($courselang) {
@@ -861,8 +902,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 {
@@ -898,7 +937,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)) {
+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)
+50 -1
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
*
@@ -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;
}
?>
+2 -2
View File
@@ -1082,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'
+14 -2
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]));
}
}
@@ -84,4 +85,15 @@ function auth_shib_attributes(){
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;
}
?>
+8 -8
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!");
@@ -128,7 +128,7 @@
}
print_simple_box_end();
//Print footer
//Print footer
print_footer();
?>
+5 -3
View File
@@ -408,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);
}
@@ -772,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);
+7 -3
View File
@@ -521,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) {
@@ -1239,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));
@@ -1661,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) {
@@ -1718,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);
+7 -17
View File
@@ -51,24 +51,14 @@ function backup_upgrade($oldversion=0) {
}
if ($oldversion < 2006042801) {
modify_database('', 'ALTER TABLE prefix_backup_log
ALTER COLUMN "time" TYPE integer,
ALTER COLUMN "time" SET DEFAULT 0,
ALTER COLUMN laststarttime TYPE integer,
ALTER COLUMN laststarttime SET DEFAULT 0,
ALTER COLUMN courseid TYPE integer,
ALTER COLUMN courseid SET DEFAULT 0');
modify_database('', 'ALTER TABLE mdl_backup_courses
ALTER COLUMN lastendtime TYPE integer,
ALTER COLUMN lastendtime SET DEFAULT 0,
ALTER COLUMN laststarttime TYPE integer,
ALTER COLUMN laststarttime SET DEFAULT 0,
ALTER COLUMN courseid TYPE integer,
ALTER COLUMN courseid SET DEFAULT 0,
ALTER COLUMN nextstarttime TYPE integer,
ALTER COLUMN nextstarttime SET DEFAULT 0');
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
+6 -2
View File
@@ -293,6 +293,8 @@
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);
@@ -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;
}
+6 -2
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++;
@@ -2486,7 +2490,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;
+4 -2
View File
@@ -5,6 +5,8 @@
// database (backup_version) to determine whether upgrades should
// be performed (see db/backup_*.php)
$backup_version = 2006053000; // The current version is a date (YYYYMMDDXX)
$backup_version = 2006082300; // The current version is a date (YYYYMMDDXX)
$backup_release = "1.6"; // User-friendly version number
$backup_release = "1.6.2"; // User-friendly version number
?>
+1 -1
View File
@@ -56,7 +56,7 @@ class block_admin extends block_list {
$this->content->icons[] = '<img src="'.$CFG->pixpath.'/i/log.gif" alt="" />';
$this->content->items[] = '<a href="'.$CFG->wwwroot.'/admin/report.php">'.get_string('reports').'</a>';
$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>';
+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;
+1 -1
View File
@@ -143,7 +143,7 @@ $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');
+25 -14
View File
@@ -408,8 +408,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 +469,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;
+12 -7
View File
@@ -484,15 +484,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');
+2 -2
View File
@@ -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>
+13 -3
View File
@@ -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);
@@ -1087,6 +1093,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
View File
@@ -54,6 +54,10 @@
redirect($CFG->wwwroot.'/'.$CFG->admin.'/index.php');
}
if ($CFG->forcelogin) {
require_login();
}
//add_to_log($course->id, "course", "view", "view.php?id=$course->id", "$course->id");
$now = usergetdate(time());
$pagetitle = '';
+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.
+1 -1
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);
+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!");
+12 -18
View File
@@ -60,13 +60,13 @@
/// moved here to fix bug 5734
if ($course->metacourse) {
print_header_simple();
notice(get_string('coursenotaccessible'), $CFG->wwwroot);
notice(get_string('coursenotaccessible'), "$CFG->wwwroot/index.php");
}
/// Users can't enroll to site course
if (!$course->category) {
print_header_simple();
notice(get_string('enrollfirst'), $CFG->wwwroot);
notice(get_string('enrollfirst'), "$CFG->wwwroot/index.php");
}
/// Double check just in case they are enrolled to start in the future
@@ -75,14 +75,14 @@
if ($course->enrolperiod and $student->timestart and ($student->timestart >= time())) {
$message = get_string('enrolmentnotyet', '', userdate($student->timestart));
print_header();
notice($message, $CFG->wwwroot);
notice($message, "$CFG->wwwroot/index.php");
}
}
/// Check if the course is enrollable
if (!method_exists($enrol, 'print_entry')) {
print_header_simple();
notice(get_string('enrolmentnointernal'), $CFG->wwwroot);
notice(get_string('enrolmentnointernal'), "$CFG->wwwroot/index.php");
}
if (!$course->enrollable ||
@@ -90,7 +90,7 @@
($course->enrollable == 2 && $course->enrolenddate > 0 && $course->enrolenddate <= time())
) {
print_header_simple();
notice(get_string('notenrollable'), $CFG->wwwroot);
notice(get_string('notenrollable'), "$CFG->wwwroot/index.php");
}
/// Check the submitted enrollment key if there is one
@@ -98,21 +98,15 @@
if ($form = data_submitted()) {
//User is not enrolled in the course, wants to access course content
//as a guest, and course setting allow unlimited guest access
//Code cribbed from course/loginas.php
if ($loginasguest and ($course->guest==1)) {
$realuser = $USER->id;
$realname = fullname($USER, true);
$USER = guest_user();
$USER->loggedin = true;
$USER->site = $CFG->wwwroot;
$USER->realuser = $realuser;
$USER->sessionIP = md5(getremoteaddr()); // Store the current IP in the session
if (isset($SESSION->currentgroup)) { // Remember current cache setting for later
$SESSION->oldcurrentgroup = $SESSION->currentgroup;
//
//the original idea was to use "loginas" feature, but require_login() would have to be changed
//and we would have to explain it to all users - it is now plain login action
if ($loginasguest and !empty($CFG->guestloginbutton) and ($course->guest==1 or $course->guest==2)) {
if (isset($SESSION->currentgroup)) {
unset($SESSION->currentgroup);
}
$guest_name = fullname($USER, true);
add_to_log($course->id, "course", "loginas", "../user/view.php?id=$course->id&$USER->id$", "$realname -> $guest_name");
$USER = get_complete_user_data('username', 'guest'); // get full guest user data
add_to_log(SITEID, 'user', 'login', "view.php?id=$USER->id&course=".SITEID, $USER->id, 0, $USER->id);
if ($SESSION->wantsurl) {
$destination = $SESSION->wantsurl;
unset($SESSION->wantsurl);
+2 -2
View File
@@ -298,12 +298,12 @@ while ($section <= $course->numsections) {
}
if ($section > 1) { // Add a arrow to move section up
echo '<a href="view.php?id='.$course->id.'&amp;section='.$section.'&amp;move=-1&amp;sesskey='.$USER->sesskey.'#section-'.($section-1).'" title="'.$strmoveup.'">'.
echo '<a href="view.php?id='.$course->id.'&amp;random='.rand(1,10000).'&amp;section='.$section.'&amp;move=-1&amp;sesskey='.$USER->sesskey.'#section-'.($section-1).'" title="'.$strmoveup.'">'.
'<img src="'.$CFG->pixpath.'/t/up.gif" vspace="3" height="11" width="11" border="0" alt="'.$strmoveup.'" /></a><br />';
}
if ($section < $course->numsections) { // Add a arrow to move section down
echo '<a href="view.php?id='.$course->id.'&amp;section='.$section.'&amp;move=1&amp;sesskey='.$USER->sesskey.'#section-'.($section+1).'" title="'.$strmovedown.'">'.
echo '<a href="view.php?id='.$course->id.'&amp;random='.rand(1,10000).'&amp;section='.$section.'&amp;move=1&amp;sesskey='.$USER->sesskey.'#section-'.($section+1).'" title="'.$strmovedown.'">'.
'<img src="'.$CFG->pixpath.'/t/down.gif" vspace="3" height="11" width="11" border="0" alt="'.$strmovedown.'" /></a><br />';
}
+2 -2
View File
@@ -226,12 +226,12 @@
}
if ($section > 1) { // Add a arrow to move section up
echo '<a href="view.php?id='.$course->id.'&amp;section='.$section.'&amp;move=-1&amp;sesskey='.$USER->sesskey.'#section-'.($section-1).'" title="'.$strmoveup.'">'.
echo '<a href="view.php?id='.$course->id.'&amp;random='.rand(1,10000).'&amp;section='.$section.'&amp;move=-1&amp;sesskey='.$USER->sesskey.'#section-'.($section-1).'" title="'.$strmoveup.'">'.
'<img src="'.$CFG->pixpath.'/t/up.gif" vspace="3" height="11" width="11" border="0" alt="'.$strmoveup.'" /></a><br />';
}
if ($section < $course->numsections) { // Add a arrow to move section down
echo '<a href="view.php?id='.$course->id.'&amp;section='.$section.'&amp;move=1&amp;sesskey='.$USER->sesskey.'#section-'.($section+1).'" title="'.$strmovedown.'">'.
echo '<a href="view.php?id='.$course->id.'&amp;random='.rand(1,10000).'&amp;section='.$section.'&amp;move=1&amp;sesskey='.$USER->sesskey.'#section-'.($section+1).'" title="'.$strmovedown.'">'.
'<img src="'.$CFG->pixpath.'/t/down.gif" vspace="3" height="11" width="11" border="0" alt="'.$strmovedown.'" /></a><br />';
}
+2 -2
View File
@@ -217,12 +217,12 @@
'<img src="'.$CFG->pixpath.'/i/show.gif" vspace="3" class="icon hide" alt="'.$strweekshow.'" /></a><br />';
}
if ($section > 1) { // Add a arrow to move section up
echo '<a href="view.php?id='.$course->id.'&amp;section='.$section.'&amp;move=-1&amp;sesskey='.$USER->sesskey.'#section-'.($section-1).'" title="'.$strmoveup.'">'.
echo '<a href="view.php?id='.$course->id.'&amp;random='.rand(1,10000).'&amp;section='.$section.'&amp;move=-1&amp;sesskey='.$USER->sesskey.'#section-'.($section-1).'" title="'.$strmoveup.'">'.
'<img src="'.$CFG->pixpath.'/t/up.gif" vspace="3" class="icon up" alt="'.$strmoveup.'" /></a><br />';
}
if ($section < $course->numsections) { // Add a arrow to move section down
echo '<a href="view.php?id='.$course->id.'&amp;section='.$section.'&amp;move=1&amp;sesskey='.$USER->sesskey.'#section-'.($section+1).'" title="'.$strmovedown.'">'.
echo '<a href="view.php?id='.$course->id.'&amp;random='.rand(1,10000).'&amp;section='.$section.'&amp;move=1&amp;sesskey='.$USER->sesskey.'#section-'.($section+1).'" title="'.$strmovedown.'">'.
'<img src="'.$CFG->pixpath.'/t/down.gif" vspace="3" class="icon down" alt="'.$strmovedown.'" /></a><br />';
}
}
+2 -2
View File
@@ -221,12 +221,12 @@
'<img src="'.$CFG->pixpath.'/i/show.gif" class="icon hide" alt="'.$strweekshow.'" /></a><br />';
}
if ($section > 1) { // Add a arrow to move section up
echo '<a href="view.php?id='.$course->id.'&amp;section='.$section.'&amp;move=-1&amp;sesskey='.$USER->sesskey.'#section-'.($section-1).'" title="'.$strmoveup.'">'.
echo '<a href="view.php?id='.$course->id.'&amp;random='.rand(1,10000).'&amp;section='.$section.'&amp;move=-1&amp;sesskey='.$USER->sesskey.'#section-'.($section-1).'" title="'.$strmoveup.'">'.
'<img src="'.$CFG->pixpath.'/t/up.gif" class="icon up" alt="'.$strmoveup.'" /></a><br />';
}
if ($section < $course->numsections) { // Add a arrow to move section down
echo '<a href="view.php?id='.$course->id.'&amp;section='.$section.'&amp;move=1&amp;sesskey='.$USER->sesskey.'#section-'.($section+1).'" title="'.$strmovedown.'">'.
echo '<a href="view.php?id='.$course->id.'&amp;random='.rand(1,10000).'&amp;section='.$section.'&amp;move=1&amp;sesskey='.$USER->sesskey.'#section-'.($section+1).'" title="'.$strmovedown.'">'.
'<img src="'.$CFG->pixpath.'/t/down.gif" class="icon down" alt="'.$strmovedown.'" /></a><br />';
}
}
+3
View File
@@ -56,6 +56,9 @@
}
echo "<center>";
if (isloggedin() and !isguest() and !isadmin() and !iscreator()) { // Print link to request a new course
print_single_button("request.php", NULL, get_string("courserequest"), "get");
}
if (iscreator()) { // Print link to create a new course
print_single_button("edit.php", NULL, get_string("addnewcourse"), "get");
}
+4
View File
@@ -10,6 +10,10 @@
$jump = optional_param('jump', '', PARAM_RAW);
if (!confirm_sesskey()) {
print_error('confirmsesskeybad');
}
if (strpos($jump, $CFG->wwwroot) === 0) { // Anything on this site
redirect(urldecode($jump));
} else if (preg_match('/^[a-z]+\.php\?/', $jump)) {
+20 -22
View File
@@ -24,6 +24,9 @@ define("FRONTPAGENEWS", 0);
define("FRONTPAGECOURSELIST", 1);
define("FRONTPAGECATEGORYNAMES", 2);
define("FRONTPAGETOPICONLY", 3);
define("FRONTPAGECATEGORYCOMBO", 4);
define("FRONTPAGECOURSELIMIT", 200); // maximum number of courses displayed on the frontpage
function print_recent_selector_form($course, $advancedfilter=0, $selecteduser=0, $selecteddate="lastlogin",
$mod="", $modid="activity/All", $modaction="", $selectedgroup="", $selectedsort="default") {
@@ -410,7 +413,7 @@ function print_log($course, $user=0, $date=0, $order="l.time ASC", $page=0, $per
echo '<tr class="r'.$row.'">';
if ($course->id == SITEID) {
echo "<td class=\"r$row c0\" nowrap=\"nowrap\">\n";
echo " <a href=\"view.php?id={$log->course}\">".$courses[$log->course]."</a>\n";
echo " <a href=\"{$CFG->wwwroot}/course/view.php?id={$log->course}\">".$courses[$log->course]."</a>\n";
echo "</td>\n";
}
echo "<td class=\"r$row c1\" nowrap=\"nowrap\" align=\"right\">".userdate($log->time, '%a').
@@ -1034,7 +1037,7 @@ function make_categories_list(&$list, &$parents, $category=NULL, $path="") {
}
function print_whole_category_list($category=NULL, $displaylist=NULL, $parentslist=NULL, $depth=-1) {
function print_whole_category_list($category=NULL, $displaylist=NULL, $parentslist=NULL, $depth=-1, $files = true) {
/// Recursive function to print out all the categories in a nice format
/// with or without courses included
global $CFG;
@@ -1049,7 +1052,7 @@ function print_whole_category_list($category=NULL, $displaylist=NULL, $parentsli
if ($category) {
if ($category->visible or iscreator()) {
print_category_info($category, $depth);
print_category_info($category, $depth, $files);
} else {
return; // Don't bother printing children of invisible categories
}
@@ -1072,7 +1075,7 @@ function print_whole_category_list($category=NULL, $displaylist=NULL, $parentsli
$down = $last ? false : true;
$first = false;
print_whole_category_list($cat, $displaylist, $parentslist, $depth + 1);
print_whole_category_list($cat, $displaylist, $parentslist, $depth + 1, $files);
}
}
}
@@ -1093,7 +1096,7 @@ function make_categories_options() {
return $cats;
}
function print_category_info($category, $depth) {
function print_category_info($category, $depth, $files = false) {
/// Prints the category info in indented fashion
/// This function is only used by print_whole_category_list() above
@@ -1108,10 +1111,8 @@ function print_category_info($category, $depth) {
$catlinkcss = $category->visible ? '' : ' class="dimmed" ';
$frontpage = explode(',', $CFG->frontpage);
$frontpage = $frontpage?array_flip($frontpage):array();
$coursecount = count_records('course') <= 200;
if (isset($frontpage[FRONTPAGECATEGORYNAMES]) && !isset($frontpage[FRONTPAGECOURSELIST]) && $coursecount) {
$coursecount = count_records('course') <= FRONTPAGECOURSELIMIT;
if ($files and $coursecount) {
$catimage = '<img src="'.$CFG->pixpath.'/i/course.gif" width="16" height="16" border="0" alt="" />';
} else {
$catimage = "&nbsp;";
@@ -1119,7 +1120,7 @@ function print_category_info($category, $depth) {
echo "\n\n".'<table border="0" cellpadding="3" cellspacing="0" width="100%">';
if (isset($frontpage[FRONTPAGECATEGORYNAMES]) && !isset($frontpage[FRONTPAGECOURSELIST]) && $coursecount) {
if ($files and $coursecount) {
$courses = get_courses($category->id, 'c.sortorder ASC', 'c.id,c.sortorder,c.visible,c.fullname,c.shortname,c.password,c.summary,c.guest,c.cost,c.currency');
echo "<tr>";
@@ -1201,14 +1202,14 @@ function print_courses($category, $width="100%", $hidesitecourse = false) {
$categories = get_categories(0); // Parent = 0 ie top-level categories only
if (count($categories) == 1) {
$category = array_shift($categories);
$courses = get_courses($category->id, 'c.sortorder ASC', 'c.id,c.category,c.sortorder,c.visible,c.fullname,c.shortname,c.password,c.summary,c.teacher,c.cost,c.currency,c.enrol');
$courses = get_courses($category->id, 'c.sortorder ASC', 'c.id,c.category,c.sortorder,c.visible,c.fullname,c.shortname,c.password,c.summary,c.teacher,c.cost,c.currency,c.enrol,c.guest');
} else {
$courses = get_courses('all', 'c.sortorder ASC', 'c.id,c.category,c.sortorder,c.visible,c.fullname,c.shortname,c.password,c.summary,c.teacher,c.cost,c.currency,c.enrol');
$courses = get_courses('all', 'c.sortorder ASC', 'c.id,c.category,c.sortorder,c.visible,c.fullname,c.shortname,c.password,c.summary,c.teacher,c.cost,c.currency,c.enrol,c.guest');
}
unset($categories);
} else {
$categories = get_categories($category->id); // sub categories
$courses = get_courses($category->id, 'c.sortorder ASC', 'c.id,c.category,c.sortorder,c.visible,c.fullname,c.shortname,c.password,c.summary,c.teacher,c.cost,c.currency,c.enrol');
$courses = get_courses($category->id, 'c.sortorder ASC', 'c.id,c.category,c.sortorder,c.visible,c.fullname,c.shortname,c.password,c.summary,c.teacher,c.cost,c.currency,c.enrol,c.guest');
}
if ($courses) {
@@ -1509,20 +1510,17 @@ function move_section($course, $section, $move) {
course_set_display($course->id, $sectiondest);
}
// Check for duplicates.
// Check for duplicates and fix order if needed.
// There is a very rare case that some sections in the same course have the same section id.
if (($count_section = count_records('course_sections', 'course', $course->id) - 1) != $course->numsections) {
$sections = get_records_select('course_sections', "course = $course->id AND section > 0", 'section ASC');
$n = 1;
foreach ($sections as $section) {
$sections = get_records_select('course_sections', "course = $course->id", 'section ASC');
$n = 0;
foreach ($sections as $section) {
if ($section->section != $n) {
if (!set_field('course_sections', 'section', $n, 'id', $section->id)) {
return false;
}
$n++;
}
if (!set_field('course', 'numsections', $count_section, 'id', $course->id)) {
return false;
}
$n++;
}
return true;
}
+25 -20
View File
@@ -4,9 +4,32 @@
require_once("../config.php");
require_once("lib.php");
$id = required_param('id', PARAM_INT); // course id
$user = optional_param('user', 0, PARAM_INT); // login as this user
/// Reset user back to their real self if needed
$return = optional_param('return', 0, PARAM_BOOL); // return to the page we came from
if (!empty($USER->realuser)) {
$USER = get_complete_user_data('id', $USER->realuser);
if (isset($SESSION->oldcurrentgroup)) { // Restore previous "current group" cache.
$SESSION->currentgroup = $SESSION->oldcurrentgroup;
unset($SESSION->oldcurrentgroup);
}
if (isset($SESSION->oldtimeaccess)) { // Restore previous timeaccess settings
$USER->timeaccess = $SESSION->oldtimeaccess;
unset($SESSION->oldtimeaccess);
}
if ($return and isset($_SERVER["HTTP_REFERER"])) { // That's all we wanted to do, so let's go back
redirect($_SERVER["HTTP_REFERER"]);
} else {
redirect($CFG->wwwroot);
}
}
///-------------------------------------
/// try to login as student if allowed
$id = required_param('id', PARAM_INT); // course id
$user = required_param('user', PARAM_INT); // login as this user
$password = optional_param('password', '', PARAM_RAW); // site wide password
if (!$site = get_site()) {
@@ -21,24 +44,6 @@
require_login($course->id);
}
if (isset($USER->realuser)) { /// Reset user back to their real self
$USER = get_complete_user_data('id', $USER->realuser);
if (isset($SESSION->oldcurrentgroup)) { // Restore previous "current group" cache.
$SESSION->currentgroup = $SESSION->oldcurrentgroup;
unset($SESSION->oldcurrentgroup);
}
if (isset($SESSION->oldtimeaccess)) { // Restore previous timeaccess settings
$USER->timeaccess = $SESSION->oldtimeaccess;
unset($SESSION->oldtimeaccess);
}
if ($return) { /// That's all we wanted to do, so let's go back
redirect($_SERVER["HTTP_REFERER"]);
exit;
}
}
// $user must be defined to go on
if (!isteacher($course->id)) {
+2 -2
View File
@@ -503,7 +503,7 @@
$form->sesskey = !empty($USER->id) ? $USER->sesskey : '';
$sectionname = get_string("name$course->format");
$fullmodulename = strtolower(get_string("modulename", $module->name));
$fullmodulename = get_string("modulename", $module->name);
if ($form->section && $course->format != 'site') {
$heading->what = $fullmodulename;
@@ -563,7 +563,7 @@
$form->sesskey = !empty($USER->id) ? $USER->sesskey : '';
$sectionname = get_string("name$course->format");
$fullmodulename = strtolower(get_string("modulename", $module->name));
$fullmodulename = get_string("modulename", $module->name);
if ($form->section) {
$heading->what = $fullmodulename;
+5 -2
View File
@@ -86,7 +86,10 @@
require_once($CFG->dirroot.'/lib/statslib.php');
stats_check_uptodate($course->id);
$statsstatus = stats_check_uptodate($course->id);
if ($statsstatus !== NULL) {
notify ($statsstatus);
}
$earliestday = get_field_sql('SELECT timeend FROM '.$CFG->prefix.'stats_user_daily ORDER BY timeend LIMIT 1');
$earliestweek = get_field_sql('SELECT timeend FROM '.$CFG->prefix.'stats_user_weekly ORDER BY timeend LIMIT 1');
@@ -125,7 +128,7 @@
error(get_string('nostatstodisplay'), $CFG->wwwroot.'/course/user.php?id='.$course->id.'&user='.$user->id.'&mode=outline');
}
echo '<center><img src="'.$CFG->wwwroot.'/course/statsgraph.php?mode='.STATS_MODE_DETAILED.'&course='.$course->id.'&time='.$time.'&report='.STATS_REPORT_USER_VIEW.'&userid='.$user->id.'" /></center>';
echo '<center><img src="'.$CFG->wwwroot.'/course/report/stats/graph.php?mode='.STATS_MODE_DETAILED.'&course='.$course->id.'&time='.$time.'&report='.STATS_REPORT_USER_VIEW.'&userid='.$user->id.'" /></center>';
$stats = stats_fix_zeros($stats,$param->timeafter,$param->table,(!empty($param->line2)),(!empty($param->line3)));
+1 -1
View File
@@ -11,7 +11,7 @@
}
if (!empty($sub)) {
$sub = "#$sub";
$sub = '#'.s($sub);
} else {
$sub = "";
}
+1 -1
View File
@@ -114,7 +114,7 @@
by creating a file in the data directory called .htaccess, containing this line:
<blockquote>
<pre>deny from all</pre>
<pre>deny from all<br />AllowOverride None</pre>
</blockquote>
<p>To make sure that Moodle can save uploaded files in this directory, check that
the web server software (eg Apache) has permission to write
+78 -5
View File
@@ -3,13 +3,86 @@ ENROLMENT MODULES
(Yes, that's the correct English spelling ;-) )
enrol.class.php contains the base class and explains
all the possible functions that an enrolment module
can have.
enrol.class.php contains a simple 'factory' method that
will instantiate your class when called. For an example
of a complete class, take a look at the 'manual' class.
Each plugin is in a subfolder here and extends the
base class as necessary.
Each plugin is in a subfolder here.
Except for the configuration methods, most methods
defined in the API are optional -- callers will use
method_exists() to determine whether your plugin offers
the functionality they are after.
Mandatory methods
-----------------
config_form
process_config
Login-time methods
------------------
get_student_courses
get_teacher_courses
You probably will want to offer at least get_student_courses().
These methods are triggered when a user logs in successfully,
and they are expected to populate $USER->student and
$USER->teacher arrays and maintain (add/delete) entries from
user_students and user_teachers.
These methods are relevant for most plugins, and are the main
interest for plugins that work with a read-only backend such
as LDAP or a database. You probably will want to offer at
least get_student_courses().
Note that with the multi-enrol infrastructure two things have
changed. We now have an 'enrol' field in those tables, and
each plugin must maintain only its own enrolment records.
Conversely, the $USER->student and ->teacher arrays have the
enrolment type as value, like
$USER->student = array ( $courseid => $plugintype );
Interactive enrolment methods
-----------------------------
print_entry()
check_entry()
check_group_entry()
get_access_icons()
These methods are for enrolment plugins that allow for user
driven enrolment. These methods are relevant for plugins
that implement payment gateways (credit card, paypal),
as well as "magic password" schemes.
Only one interactive enrolment method can be active for
a given course. The site default can be set from
Admin->Enrolment, and then individual courses can be
set to specific interactive enrolment methods.
Cron
----
If your class offers a cron() method, it will be invoked by
the standard Moodle cron every 5 minutes. Note that if the
tasks are not lightweight you must control how frequently they
execute, perhaps offering a config option.
For really heavy cron processing, an alternative is to have
a separate script to be called separately. Currently the LDAP
and DB plugins have external scripts.
Guilty Parties
--------------
Martin Dougiamas and Shane Elliott, Moodle.com
Martin Langhoff and Patrick Li, Catalyst IT
+90 -37
View File
@@ -10,15 +10,16 @@ define('AN_ERROR', '3');
define('AN_DELIM', '|');
define('AN_ENCAP', '"');
require_once('const.php');
require_once($CFG->dirroot.'/enrol/authorize/const.php');
require_once($CFG->dirroot.'/enrol/authorize/enrol.php');
/**
* Gets settlement date and time
*
* @param int $time Processed time, usually now.
* @return int Settlement date
* @param int $time Time processed, usually now.
* @return int Settlement date and time
*/
function getsettletime($time)
function authorize_getsettletime($time)
{
global $CFG;
@@ -38,24 +39,55 @@ function getsettletime($time)
* @param object $order Order details
* @return bool true, if settled, false otherwise.
*/
function settled($order)
function authorize_settled($order)
{
return (($order->status == AN_STATUS_AUTHCAPTURE || $order->status == AN_STATUS_CREDIT) &&
($order->settletime > 0) && ($order->settletime < time()));
}
/**
* Performs an action on authorize.net
* Is order expired? 'Authorized/Pending Capture' transactions are expired after 30 days.
*
* @param object &$order Order details.
* @return bool true, transaction is expired, false otherwise.
*/
function authorize_expired(&$order)
{
static $timediff30;
if ($order->status == AN_STATUS_EXPIRE) {
return true;
}
elseif ($order->status != AN_STATUS_AUTH) {
return false;
}
if (empty($timediff30)) {
$timediff30 = authorize_getsettletime(time()) - (30 * 24 * 3600);
}
$isexpired = (authorize_getsettletime($order->timecreated) < $timediff30);
if ($isexpired) {
$order->status = AN_STATUS_EXPIRE;
update_record('enrol_authorize', $order);
}
return $isexpired;
}
/**
* Performs an action on authorize.net and updates/inserts records. If record update fails,
* sends email to admin.
*
* @param object &$order Which transaction data will be sent. See enrol_authorize table.
* @param string &$message Information about error messages.
* @param object &$extra Extra transaction data.
* @param string &$message Information about error message if this function returns false.
* @param object &$extra Extra data that used for refunding and credit card information.
* @param int $action Which action will be performed. See AN_ACTION_*
* @return bool true, transaction was successful, false otherwise.
* @param string $cctype Credit card type, used internally to configure types automatically.
* @return bool true Transaction was successful, false otherwise. Use $message for reason.
* @author Ethem Evlice <ethem a.t evlice d.o.t com>
* @uses $CFG
*/
function authorizenet_action(&$order, &$message, &$extra, $action=AN_ACTION_NONE)
function authorize_action(&$order, &$message, &$extra, $action=AN_ACTION_NONE, $cctype=NULL)
{
global $CFG;
static $conststring;
@@ -86,17 +118,16 @@ function authorizenet_action(&$order, &$message, &$extra, $action=AN_ACTION_NONE
$action = intval($action);
if (empty($order) || empty($order->id)) {
if (empty($order) or empty($order->id)) {
$message = "Check order->id!";
return false;
}
elseif ($action <= AN_ACTION_NONE || $action > AN_ACTION_VOID) {
$message = "No action taken!";
elseif ($action <= AN_ACTION_NONE or $action > AN_ACTION_VOID) {
$message = "Invalid action!";
return false;
}
$poststring = $conststring;
$timenowsettle = getsettletime(time());
switch ($action) {
case AN_ACTION_AUTH_ONLY:
@@ -125,10 +156,7 @@ function authorizenet_action(&$order, &$message, &$extra, $action=AN_ACTION_NONE
$message = "Order status must be authorized!";
return false;
}
$timediff = $timenowsettle - (30 * 3600 * 24);
$timecreatedsettle = getsettletime($order->timecreated);
if ($timecreatedsettle < $timediff) {
$order->status = AN_STATUS_EXPIRE;
if (authorize_expired($order)) {
$message = "Transaction must be captured within 30 days. EXPIRED!";
return false;
}
@@ -142,21 +170,21 @@ function authorizenet_action(&$order, &$message, &$extra, $action=AN_ACTION_NONE
$message = "Order status must be authorized/captured!";
return false;
}
if (!settled($order)) {
if (!authorize_settled($order)) {
$message = "Order must be settled. Try VOID, check Cut-Off time if it fails!";
return false;
}
$timenowsettle = authorize_getsettletime(time());
$timediff = $timenowsettle - (120 * 3600 * 24);
if ($order->settletime < $timediff) {
$message = "Order must be credited within 120 days!";
return false;
}
if (empty($extra)) {
$message = "need extra fields for CREDIT!";
$message = "Need extra fields to REFUND!";
return false;
}
$total = floatval($extra->sum) + floatval($extra->amount);
unset($extra->sum); // this is not used in refunds table.
if (($extra->amount == 0) || ($total > $order->amount)) {
$message = "Can be credited up to original amount.";
return false;
@@ -171,22 +199,19 @@ function authorizenet_action(&$order, &$message, &$extra, $action=AN_ACTION_NONE
case AN_ACTION_VOID:
{
if ($order->status == AN_STATUS_AUTH) {
$timediff = $timenowsettle - (30 * 3600 * 24);
$timecreatedsettle = getsettletime($order->timecreated);
if ($timecreatedsettle < $timediff) {
if (authorize_expired($order)) {
$message = "Authorized transaction must be voided within 30 days. EXPIRED!";
$order->status = AN_STATUS_EXPIRE;
return false;
}
}
elseif ($order->status == AN_STATUS_AUTHCAPTURE || $order->status == AN_STATUS_CREDIT) {
if (settled($order)) {
elseif ($order->status == AN_STATUS_AUTHCAPTURE or $order->status == AN_STATUS_CREDIT) {
if (authorize_settled($order)) {
$message = "Settled transaction cannot be voided. Check Cut-Off time!";
return false;
}
}
else {
$message = "Order status must be authorized, auth/captured or refunded!";
$message = "Order status must be authorized/pending capture or captured-refunded/pending settlement!";
return false;
}
$poststring .= '&x_type=VOID&x_trans_id=' . urlencode($order->transid);
@@ -194,7 +219,7 @@ function authorizenet_action(&$order, &$message, &$extra, $action=AN_ACTION_NONE
}
default: {
$message = "Missing action? $action";
$message = "Invalid action: $action";
return false;
}
}
@@ -211,6 +236,12 @@ function authorizenet_action(&$order, &$message, &$extra, $action=AN_ACTION_NONE
return false;
}
// critical section
@ignore_user_abort(true);
if (intval(ini_get('max_execution_time')) > 0) {
@set_time_limit(300);
}
fwrite($fp, "POST /gateway/transact.dll HTTP/1.0\r\n" .
"Host: $host\r\n" . $referer .
"Content-type: application/x-www-form-urlencoded\r\n" .
@@ -259,10 +290,14 @@ function authorizenet_action(&$order, &$message, &$extra, $action=AN_ACTION_NONE
$order->transid = $transid;
if ($action == AN_ACTION_AUTH_ONLY) {
$order->status = AN_STATUS_AUTH;
// dont't update settletime
// don't update order->settletime
} else {
$order->status = AN_STATUS_AUTHCAPTURE;
$order->settletime = getsettletime(time());
$order->settletime = authorize_getsettletime(time());
}
if (! update_record('enrol_authorize', $order)) {
enrolment_plugin_authorize::email_to_admin("Error while trying to update data " .
"in table enrol_authorize. Please edit manually this record: ID=$order->id.", $order);
}
break;
}
@@ -272,13 +307,23 @@ function authorizenet_action(&$order, &$message, &$extra, $action=AN_ACTION_NONE
// So, $extra must be updated, not $order.
$extra->status = AN_STATUS_CREDIT;
$extra->transid = $transid;
$extra->settletime = getsettletime(time());
$extra->settletime = authorize_getsettletime(time());
unset($extra->sum); // this is not used in refunds table.
if (! $extra->id = insert_record('enrol_authorize_refunds', $extra)) {
enrolment_plugin_authorize::email_to_admin("Error while trying to insert data " .
"into table enrol_authorize_refunds. Please add manually this record:", $extra);
}
break;
}
case AN_ACTION_VOID:
{
$tableupdate = ($order->status == AN_STATUS_CREDIT) ? 'enrol_authorize_refunds' : 'enrol_authorize';
$order->status = AN_STATUS_VOID;
// dont't update settletime
// don't update order->settletime
if (! update_record($tableupdate, $order)) {
enrolment_plugin_authorize::email_to_admin("Error while trying to update data " .
"in table $tableupdate. Please edit manually this record: ID=$order->id.", $order);
}
break;
}
default: return false;
@@ -287,16 +332,24 @@ function authorizenet_action(&$order, &$message, &$extra, $action=AN_ACTION_NONE
}
else
{
$reason = "reason" . $response[2];
$message = get_string($reason, "enrol_authorize");
if ($message == '[[' . $reason . ']]') {
$reasonno = $response[2];
$reasonstr = "reason" . $reasonno;
$message = get_string($reasonstr, "enrol_authorize");
if ($message == '[[' . $reasonstr . ']]') {
$message = isset($response[3]) ? $response[3] : 'unknown error';
}
if (!empty($CFG->an_avs)) {
if (! (empty($CFG->an_avs) or $response[5] == "P")) { // P = AVS not applicable
$avs = "avs" . strtolower($response[5]);
$stravs = get_string($avs, "enrol_authorize");
$message .= "<br />" . get_string("avsresult", "enrol_authorize", $stravs);
}
if (!$test && !empty($cctype) && ($reasonno == 17 or $reasonno == 28)) {
$ccaccepts = enrolment_plugin_authorize::get_list_of_creditcards();
unset($ccaccepts[$cctype]);
set_config('an_acceptccs', implode(',', array_keys($ccaccepts)));
enrolment_plugin_authorize::email_to_admin("$message: ($cctype)" .
"This is new config(an_acceptccs):", $ccaccepts);
}
return false;
}
}
+14 -7
View File
@@ -9,6 +9,7 @@ if (!isset($frm->enrol_mailadmins)) $frm->enrol_mailadmins = '';
if (!isset($frm->an_login)) $frm->an_login = '';
if (!isset($frm->an_tran_key)) $frm->an_tran_key = '';
if (!isset($frm->an_password)) $frm->an_password = '';
if (!isset($frm->delete_current)) $frm->delete_current = '';
if (!isset($frm->an_referer)) $frm->an_referer = 'http://';
if (!isset($frm->an_avs)) $frm->an_avs = '';
if (!isset($frm->an_test)) $frm->an_test = '';
@@ -31,7 +32,7 @@ if (!isset($frm->an_cutoff_hour)) {
}
if (!isset($frm->acceptccs)) {
$frm->acceptccs = array_keys(get_list_of_creditcards());
$frm->acceptccs = array_keys(enrolment_plugin_authorize::get_list_of_creditcards());
$CFG->an_acceptccs = implode(',', $frm->acceptccs);
}
@@ -48,7 +49,7 @@ if (!isset($frm->acceptccs)) {
<tr valign="top">
<td align="right">enrol_cost:</td>
<td><input type="text" size="5" name="enrol_cost" value="<?php p($frm->enrol_cost) ?>" /></td>
<td><?php print_string("costdefault") ?></td>
<td><?php print_string("costdefault") ?>. <?php print_string("costdefaultdesc", "enrol_authorize") ?></td>
</tr>
<tr valign="top">
@@ -84,20 +85,26 @@ if (!isset($frm->acceptccs)) {
</tr>
<tr valign="top">
<td align="right">#&nbsp;</td>
<td align="right">#&nbsp;#&nbsp;</td>
<td colspan="2"><?php print_string("chooseone", "enrol_authorize") ?></td>
</tr>
<tr valign="top">
<td align="right">an_tran_key:</td>
<td><input type="text" name="an_tran_key" value="<?php p($frm->an_tran_key) ?>" /></td>
<td><input type="text" name="an_tran_key" value="<?php p($frm->an_tran_key) ?>" /><sup>#1</sup></td>
<td><?php print_string("antrankey", "enrol_authorize") ?></td>
</tr>
<tr valign="top">
<td align="right">an_password:</td>
<td><input type="text" name="an_password" value="<?php p($frm->an_password) ?>" /></td>
<td><?php print_string("anpassword", "enrol_authorize") ?></td>
<td><input type="text" name="an_password" value="" /><sup>#2</sup></td>
<td><?php print_string("anpassword", "enrol_authorize") ?><br />(<?php print_string("leavetokeep") ?>)</td>
</tr>
<tr valign="top">
<td align="right">delete_current:</td>
<td><?php print_checkbox('delete_current', '1', !empty($frm->delete_current)) ?></td>
<td><?php print_string("deletecheck", "moodle", get_string('oldpassword')) ?><br /><br /></td>
</tr>
<tr valign="top">
@@ -127,7 +134,7 @@ if (!isset($frm->acceptccs)) {
<tr valign="top">
<td align="right">an_acceptccs:</td>
<td><?php
$allccs = get_list_of_creditcards(true);
$allccs = enrolment_plugin_authorize::get_list_of_creditcards(true);
foreach ($allccs as $key => $val) {
print_checkbox('acceptccs[]', $key, stristr($CFG->an_acceptccs, $key) !== false, $val); echo "<br />\n";
}
+1 -1
View File
@@ -23,7 +23,7 @@ define('AN_STATUS_TEST', 0x80);
/**#@-*/
/**#@+
* Actions used in authorizenet_action function.
* Actions used in authorize_action function.
*
* NONE: No action. Function always returns false.
* AUTH_ONLY: Used to authorize only, don't capture.
+1 -1
View File
@@ -69,7 +69,7 @@ function enrol_authorize_upgrade($oldversion=0) {
include_once("$CFG->dirroot/enrol/authorize/authorizenetlib.php");
foreach ($settlements as $settlement) {
execute_sql("UPDATE {$CFG->prefix}enrol_authorize SET settletime = '" .
getsettletime($settlement->settletime) . "' WHERE id = '$settlement->id'", false);
authorize_getsettletime($settlement->settletime) . "' WHERE id = '$settlement->id'", false);
}
}
}
+2 -2
View File
@@ -20,7 +20,7 @@ function enrol_authorize_upgrade($oldversion=0) {
// Authorize module was installed before. Upgrades must be applied to SQL file.
if ($oldversion && $oldversion < 2005071602) {
notify("If you are using the authorize.net enrolment plugin for credit card
notify("If you are using the authorize.net enrolment plugin for credit card
handling, please ensure that you have turned loginhttps ON in Admin >> Variables >> Security.");
}
@@ -80,7 +80,7 @@ function enrol_authorize_upgrade($oldversion=0) {
include_once("$CFG->dirroot/enrol/authorize/authorizenetlib.php");
foreach ($settlements as $settlement) {
execute_sql("UPDATE {$CFG->prefix}enrol_authorize SET settletime = '" .
getsettletime($settlement->settletime) . "' WHERE id = '$settlement->id'", false);
authorize_getsettletime($settlement->settletime) . "' WHERE id = '$settlement->id'", false);
}
}
}
+3 -2
View File
@@ -1,5 +1,6 @@
<?php // $Id$
enrolment_plugin_authorize::prevent_double_paid($course);
$formvars = array('password', 'ccaddress', 'cccity', 'ccstate', 'cccountry', 'cczip',
'ccfirstname', 'cclastname', 'cc', 'ccexpiremm', 'ccexpireyyyy', 'cctype', 'cvv');
@@ -9,7 +10,7 @@ foreach ($formvars as $var) {
}
}
$curcost = $this->get_course_cost($course);
$curcost = enrolment_plugin_authorize::get_course_cost($course);
$userfirstname = empty($form->ccfirstname) ? $USER->firstname : $form->ccfirstname;
$userlastname = empty($form->cclastname) ? $USER->lastname : $form->cclastname;
$useraddress = empty($form->ccaddress) ? $USER->address : $form->ccaddress;
@@ -59,7 +60,7 @@ $usercountry = empty($form->cccountry) ? $USER->country : $form->cccountry;
<tr>
<td align="right"><?php print_string("cctype", "enrol_authorize") ?>: </td>
<td align="left"><?php
choose_from_menu(get_list_of_creditcards(), 'cctype', $form->cctype);
choose_from_menu(enrolment_plugin_authorize::get_list_of_creditcards(), 'cctype', $form->cctype);
if (!empty($this->ccerrors['cctype'])) { formerr($this->ccerrors['cctype']); }
?>
</td>
+367 -262
View File
@@ -3,42 +3,6 @@
require_once($CFG->dirroot.'/enrol/enrol.class.php');
require_once($CFG->dirroot.'/enrol/authorize/const.php');
/**
* get_list_of_creditcards
*
* @param bool $getall
* @return array
*/
function get_list_of_creditcards($getall = false)
{
global $CFG;
$alltypes = array(
'mcd' => 'Master Card',
'vis' => 'Visa',
'amx' => 'American Express',
'dsc' => 'Discover',
'dnc' => 'Diners Club',
'jcb' => 'JCB',
'swi' => 'Switch',
'dlt' => 'Delta',
'enr' => 'EnRoute'
);
if ($getall || empty($CFG->an_acceptccs)) {
return $alltypes;
}
$ret = array();
$ccs = explode(',', $CFG->an_acceptccs);
foreach ($ccs as $key) {
$ret[$key] = $alltypes[$key];
}
return $ret;
}
/**
* enrolment_plugin_authorize
*
@@ -62,24 +26,54 @@ class enrolment_plugin_authorize
var $log;
/**
* Returns information about the courses a student has access to
*
* Set the $user->student course array
* Set the $user->timeaccess course array
*
* @param object &$user must contain $user->id already set
*/
function get_student_courses(&$user) {
$manual = enrolment_factory::factory('manual');
$manual->get_student_courses($user);
}
/**
* Returns information about the courses a teacher has access to
*
* Set the $user->teacher course array
* Set the $user->teacheredit course array
* Set the $user->timeaccess course array
*
* @param object &$user must contain $user->id already set
*/
function get_teacher_courses(&$user) {
$manual = enrolment_factory::factory('manual');
$manual->get_teacher_courses($user);
}
/**
* Shows a credit card form for registration.
*
* @param object $course Course info
* @access public
*/
function print_entry($course)
{
function print_entry($course) {
global $CFG, $USER, $form;
if ($this->zero_cost($course) or isguest()) {
$zerocost = enrolment_plugin_authorize::zero_cost($course);
if ($zerocost) {
$manual = enrolment_factory::factory('manual');
if (!empty($this->errormsg)) {
$manual->errormsg = $this->errormsg;
}
$manual->print_entry($course);
return; // No money for guests ;)
return;
}
$this->prevent_double_paid($course);
if (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off') {
if (empty($CFG->loginhttps)) {
error(get_string('httpsrequired', 'enrol_authorize'));
@@ -90,7 +84,8 @@ class enrolment_plugin_authorize
}
}
$teacher = get_teacher($course->id);
httpsrequired();
$strcourses = get_string('courses');
$strloginto = get_string('loginto', '', $course->shortname);
@@ -98,15 +93,28 @@ class enrolment_plugin_authorize
print_course($course, '80%');
if ($course->password) {
print_simple_box(get_string('choosemethod', 'enrol_authorize'), 'center');
$password = '';
include($CFG->dirroot.'/enrol/manual/enrol.html');
print_heading(get_string('choosemethod', 'enrol_authorize'), 'center');
}
print_simple_box_start('center');
include($CFG->dirroot.'/enrol/authorize/enrol.html');
if (isguest()) {
$curcost = enrolment_plugin_authorize::get_course_cost($course);
echo '<div align="center">';
echo '<p>'.get_string('paymentrequired').'</p>';
echo '<p><b>'.get_string('cost').": $curcost[currency] $curcost[cost]".'</b></p>';
echo '<p><a href="'.$CFG->httpswwwroot.'/login/">'.get_string('loginsite').'</a></p>';
echo '</div>';
} else {
include($CFG->dirroot.'/enrol/authorize/enrol.html');
}
print_simple_box_end();
if ($course->password) {
$password = '';
$teacher = get_teacher($course->id);
include($CFG->dirroot.'/enrol/manual/enrol.html');
}
print_footer();
}
@@ -119,9 +127,13 @@ class enrolment_plugin_authorize
* @access public
*/
function check_entry($form, $course) {
if ((!empty($form->password)) or isguest() or $this->zero_cost($course)) {
if (enrolment_plugin_authorize::zero_cost($course) or
(!empty($course->password) and !empty($form->password))) {
$manual = enrolment_factory::factory('manual');
$manual->check_entry($form, $course);
if (!empty($manual->errormsg)) {
$this->errormsg = $manual->errormsg;
}
} elseif ((!empty($form->ccsubmit)) and $this->validate_enrol_form($form)) {
$this->cc_submit($form, $course);
}
@@ -141,10 +153,10 @@ class enrolment_plugin_authorize
global $CFG, $USER, $SESSION;
require_once('authorizenetlib.php');
$this->prevent_double_paid($course);
enrolment_plugin_authorize::prevent_double_paid($course);
$useripno = getremoteaddr();
$curcost = $this->get_course_cost($course);
$curcost = enrolment_plugin_authorize::get_course_cost($course);
$exp_date = sprintf("%02d", $form->ccexpiremm) . $form->ccexpireyyyy;
// NEW ORDER
@@ -162,7 +174,7 @@ class enrolment_plugin_authorize
$order->currency = $curcost['currency'];
$order->id = insert_record("enrol_authorize", $order);
if (!$order->id) {
$this->email_to_admin("Error while trying to insert new data", $order);
enrolment_plugin_authorize::email_to_admin("Error while trying to insert new data", $order);
$this->ccerrors['header'] = "Insert record error. Admin has been notified!";
return;
}
@@ -194,9 +206,9 @@ class enrolment_plugin_authorize
$message = '';
$an_review = !empty($CFG->an_review);
$action = $an_review ? AN_ACTION_AUTH_ONLY : AN_ACTION_AUTH_CAPTURE;
$success = authorizenet_action($order, $message, $extra, $action);
$success = authorize_action($order, $message, $extra, $action, $form->cctype);
if (!$success) {
$this->email_to_admin($message, $order);
enrolment_plugin_authorize::email_to_admin($message, $order);
$this->ccerrors['header'] = $message;
return;
}
@@ -209,49 +221,37 @@ class enrolment_plugin_authorize
else {
$timestart = $timenow;
$timeend = $timestart + (3600 * 24); // just enrol for 1 days :)
enrol_student($USER->id, $course->id, $timestart, $timeend, 'authorize');
enrol_student($USER->id, $course->id, $timestart, $timeend, 'manual');
redirect("$CFG->wwwroot/course/view.php?id=$course->id");
}
return;
}
if ($an_review) { // review enabled, inform admin and redirect to main page.
if (update_record("enrol_authorize", $order)) {
$a = new stdClass;
$a->url = "$CFG->wwwroot/enrol/authorize/index.php?order=$order->id";
$a->orderid = $order->id;
$a->transid = $order->transid;
$a->amount = "$order->currency $order->amount";
$a->expireon = userdate(getsettletime($timenow + (30 * 3600 * 24)));
$a->captureon = userdate(getsettletime($timenow + (intval($CFG->an_capture_day) * 3600 * 24)));
$a->course = $course->fullname;
$a->user = fullname($USER);
$a->acstatus = ($CFG->an_capture_day > 0) ? get_string('yes') : get_string('no');
$emailmessage = get_string('adminneworder', 'enrol_authorize', $a);
$a = new stdClass;
$a->course = $course->shortname;
$a->orderid = $order->id;
$emailsubject = get_string('adminnewordersubject', 'enrol_authorize', $a);
$admins = get_admins();
foreach ($admins as $admin) {
email_to_user($admin, $USER, $emailsubject, $emailmessage);
}
}
else {
$this->email_to_admin("Error while trying to update data. Please edit manually this record: " .
"ID=$order->id in enrol_authorize table.", $order);
if ($an_review) { // review enabled, inform admin and redirect user to main page.
$a = new stdClass;
$a->url = "$CFG->wwwroot/enrol/authorize/index.php?order=$order->id";
$a->orderid = $order->id;
$a->transid = $order->transid;
$a->amount = "$order->currency $order->amount";
$a->expireon = userdate(authorize_getsettletime($timenow + (30 * 3600 * 24)));
$a->captureon = userdate(authorize_getsettletime($timenow + (intval($CFG->an_capture_day) * 3600 * 24)));
$a->course = $course->fullname;
$a->user = fullname($USER);
$a->acstatus = ($CFG->an_capture_day > 0) ? get_string('yes') : get_string('no');
$emailmessage = get_string('adminneworder', 'enrol_authorize', $a);
$a = new stdClass;
$a->course = $course->shortname;
$a->orderid = $order->id;
$emailsubject = get_string('adminnewordersubject', 'enrol_authorize', $a);
$admins = get_admins();
foreach ($admins as $admin) {
email_to_user($admin, $USER, $emailsubject, $emailmessage);
}
redirect($CFG->wwwroot, get_string("reviewnotify", "enrol_authorize"), '30');
return;
}
// credit card captured, ENROL student...
if (!update_record("enrol_authorize", $order)) {
$this->email_to_admin("Error while trying to update data. Please edit manually this record: " .
"ID=$order->id in enrol_authorize table.", $order);
// no error occured??? enrol student??? return??? Database busy???
}
// Credit card captured, ENROL student now...
if ($course->enrolperiod) {
$timestart = $timenow;
$timeend = $timestart + $course->enrolperiod;
@@ -259,7 +259,7 @@ class enrolment_plugin_authorize
$timestart = $timeend = 0;
}
if (enrol_student($USER->id, $course->id, $timestart, $timeend, 'authorize')) {
if (enrol_student($USER->id, $course->id, $timestart, $timeend, 'manual')) {
$teacher = get_teacher($course->id);
if (!empty($CFG->enrol_mailstudents)) {
$a = new stdClass;
@@ -292,7 +292,8 @@ class enrolment_plugin_authorize
}
}
} else {
$this->email_to_admin("Error while trying to enrol ".fullname($USER)." in '$course->fullname'", $order);
enrolment_plugin_authorize::email_to_admin("Error while trying to enrol " .
fullname($USER) . " in '$course->fullname'", $order);
}
if ($SESSION->wantsurl) {
@@ -341,7 +342,8 @@ class enrolment_plugin_authorize
$this->ccerrors['cvv'] = get_string('missingcvv', 'enrol_authorize');
}
if (empty($form->cctype) || !in_array($form->cctype, array_keys(get_list_of_creditcards()))) {
if (empty($form->cctype) or
!in_array($form->cctype, array_keys(enrolment_plugin_authorize::get_list_of_creditcards()))) {
$this->ccerrors['cctype'] = get_string('missingcctype', 'enrol_authorize');
}
@@ -368,45 +370,6 @@ class enrolment_plugin_authorize
return true;
}
/**
* zero_cost
*
* @param unknown_type $course
* @return number
* @access private
*/
function zero_cost($course) {
$curcost = $this->get_course_cost($course);
return (abs($curcost['cost']) < 0.01);
}
/**
* get_course_cost
*
* @param object $course
* @return array
* @access private
*/
function get_course_cost($course)
{
global $CFG;
$cost = (float)0;
$currency = (!empty($course->currency))
? $course->currency :( empty($CFG->enrol_currency)
? 'USD' : $CFG->enrol_currency );
if (!empty($course->cost)) {
$cost = (float)(((float)$course->cost) < 0) ? $CFG->enrol_cost : $course->cost;
}
$cost = format_float($cost, 2);
$ret = array('cost' => $cost, 'currency' => $currency);
return $ret;
}
/**
* Gets access icons.
@@ -419,7 +382,7 @@ class enrolment_plugin_authorize
$manual = enrolment_factory::factory('manual');
$str = $manual->get_access_icons($course);
$curcost = $this->get_course_cost($course);
$curcost = enrolment_plugin_authorize::get_course_cost($course);
if (abs($curcost['cost']) > 0.00) {
$strrequirespayment = get_string("requirespayment");
@@ -452,7 +415,7 @@ class enrolment_plugin_authorize
{
global $CFG;
if (!$this->check_openssl_loaded()) {
if (! enrolment_plugin_authorize::check_openssl_loaded()) {
notify('PHP must be compiled with SSL support (--with-openssl)');
}
@@ -503,7 +466,9 @@ class enrolment_plugin_authorize
global $CFG;
// site settings
set_config('enrol_cost', optional_param('enrol_cost', 5, PARAM_INT));
if (($cost = optional_param('enrol_cost', 5, PARAM_INT)) > 0) {
set_config('enrol_cost', $cost);
}
set_config('enrol_currency', optional_param('enrol_currency', 'USD', PARAM_ALPHA));
set_config('enrol_mailstudents', optional_param('enrol_mailstudents', 0, PARAM_BOOL));
set_config('enrol_mailteachers', optional_param('enrol_mailteachers', 0, PARAM_BOOL));
@@ -515,7 +480,9 @@ class enrolment_plugin_authorize
set_config('an_teachermanagepay', optional_param('an_teachermanagepay', 0, PARAM_BOOL));
set_config('an_referer', optional_param('an_referer', 'http://', PARAM_URL));
$acceptccs = optional_param('acceptccs', array_keys(get_list_of_creditcards()), PARAM_ALPHA);
$acceptccs = optional_param('acceptccs',
array_keys(enrolment_plugin_authorize::get_list_of_creditcards()),
PARAM_ALPHA);
set_config('an_acceptccs', implode(',', $acceptccs));
$cutoff_hour = optional_param('an_cutoff_hour', 0, PARAM_INT);
@@ -545,52 +512,102 @@ class enrolment_plugin_authorize
set_config('an_emailexpiredteacher', $emailexpiredteacher);
set_config('an_sorttype', $sorttype);
// required fields
$loginval = optional_param('an_login', '');
$tranval = optional_param('an_tran_key', '');
$passwordval = optional_param('an_password', '');
if ((empty($CFG->loginhttps) and substr($CFG->wwwroot, 0, 5) !== 'https') ||
!$this->check_openssl_loaded() ||
empty($loginval) ||
(empty($tranval) and empty($passwordval))) {
// https and openssl library is required
if ((substr($CFG->wwwroot, 0, 5) !== 'https' and empty($CFG->loginhttps)) or
!enrolment_plugin_authorize::check_openssl_loaded()) {
return false;
}
// required fields
$loginval = optional_param('an_login', '');
if (empty($loginval)) {
return false;
}
set_config('an_login', $loginval);
set_config('an_password', $passwordval);
set_config('an_tran_key', $tranval);
$tranval = optional_param('an_tran_key', '');
$passwordval = optional_param('an_password', '');
$deletecurrent = optional_param('delete_current', '');
if (!empty($passwordval)) { // password is changing
set_config('an_password', $passwordval);
}
elseif (!empty($deletecurrent) and !empty($tranval)) {
set_config('an_password', '');
$CFG->an_password = '';
}
if (empty($tranval) and empty($CFG->an_password)) {
return false;
}
set_config('an_tran_key', $tranval);
return true;
}
/**
* email_to_admin
* zero_cost (static method)
*
* @param string $subject
* @param mixed $data
* @access private
* @param unknown_type $course
* @return number
* @static
*/
function email_to_admin($subject, $data)
{
$site = get_site();
$admin = get_admin();
$data = (array)$data;
$message = "$site->fullname: Transaction failed.\n\n$subject\n\n";
foreach ($data as $key => $value) {
$message .= "$key => $value\n";
}
email_to_user($admin, $admin, "Authorize.net ERROR: ".$subject, $message);
function zero_cost($course) {
$curcost = enrolment_plugin_authorize::get_course_cost($course);
return (abs($curcost['cost']) < 0.01);
}
/**
* prevent_double_paid
* get_course_cost (static method)
*
* @param object $course
* @access private
* @return array
* @static
*/
function get_course_cost($course)
{
global $CFG;
$cost = (float)0;
$currency = (!empty($course->currency))
? $course->currency :( empty($CFG->enrol_currency)
? 'USD' : $CFG->enrol_currency );
if (!empty($course->cost)) {
$cost = (float)(((float)$course->cost) < 0) ? $CFG->enrol_cost : $course->cost;
}
$cost = format_float($cost, 2);
$ret = array('cost' => $cost, 'currency' => $currency);
return $ret;
}
/**
* email_to_admin (static method)
*
* @param string $subject
* @param mixed $data
* @static
*/
function email_to_admin($subject, $data)
{
global $SITE;
$admin = get_admin();
$data = (array)$data;
$message = "$SITE->fullname: Transaction failed.\n\n$subject\n\n";
$message .= print_r($data, true);
email_to_user($admin, $admin, "$SITE->fullname: Authorize.net ERROR", $message);
}
/**
* prevent_double_paid (static method)
*
* @param object $course
* @static
*/
function prevent_double_paid($course)
{
@@ -612,20 +629,60 @@ class enrolment_plugin_authorize
}
}
/**
* check_openssl_loaded
* check_openssl_loaded (static method)
*
* @return bool
* @access private
* @static
*/
function check_openssl_loaded() {
return extension_loaded('openssl');
}
/**
* get_list_of_creditcards (static method)
*
* @param bool $getall
* @return array
* @static
*/
function get_list_of_creditcards($getall = false)
{
global $CFG;
$alltypes = array(
'mcd' => 'Master Card',
'vis' => 'Visa',
'amx' => 'American Express',
'dsc' => 'Discover',
'dnc' => 'Diners Club',
'jcb' => 'JCB',
'swi' => 'Switch',
'dlt' => 'Delta',
'enr' => 'EnRoute'
);
if ($getall or empty($CFG->an_acceptccs)) {
return $alltypes;
}
$ret = array();
$ccs = explode(',', $CFG->an_acceptccs);
foreach ($ccs as $key) {
$ret[$key] = $alltypes[$key];
}
return $ret;
}
/**
* cron
* This function is run by admin/cron.php every time if admin has enabled this plugin.
*
* Everyday at settlement time (default is 00:05), it cleans up some tables
* and sends email to admin/teachers about pending orders expiring if manual-capture has enabled.
*
* If admin set up 'Order review' and 'Capture day', it captures credits cards and enrols students.
*
* @access public
*/
function cron()
@@ -635,91 +692,39 @@ class enrolment_plugin_authorize
$oneday = 86400;
$timenow = time();
$timenowsettle = getsettletime($timenow);
$timediff30 = $timenowsettle - (30 * $oneday);
$settlementtime = authorize_getsettletime($timenow);
$timediff30 = $settlementtime - (30 * $oneday);
$mconfig = get_config('enrol/authorize');
set_config('an_lastcron', $timenow, 'enrol/authorize');
if (intval($mconfig->an_dailysettlement) <= $timenowsettle) {
set_config('an_dailysettlement', $timenowsettle + $oneday, 'enrol/authorize');
// Some clean-up and update
$select = "(status='".AN_STATUS_NONE."') AND (timecreated<'$timediff30')";
delete_records_select('enrol_authorize', $select);
$select = "(status='".AN_STATUS_AUTH."') AND (timecreated<'$timediff30')";
execute_sql("UPDATE {$CFG->prefix}enrol_authorize SET status='".AN_STATUS_EXPIRE."' WHERE $select", false);
$timediff60 = $timenowsettle - (60 * $oneday);
$select = "(status='".AN_STATUS_EXPIRE."') AND (timecreated<'$timediff60')";
delete_records_select('enrol_authorize', $select);
// Daily warning email for expiring pending orders.
if (!empty($CFG->an_emailexpired)) {
$timediffem = $timenowsettle - ((30 - intval($CFG->an_emailexpired)) * $oneday);
$select = "(status='". AN_STATUS_AUTH ."') AND (timecreated<'$timediffem') AND (timecreated>'$timediff30')";
if ($count = count_records_select('enrol_authorize', $select)) {
$a = new stdClass;
$a->pending = $count;
$a->days = $CFG->an_emailexpired;
$a->course = $SITE->shortname;
$subject = get_string('pendingorderssubject', 'enrol_authorize', $a);
$a = new stdClass;
$a->pending = $count;
$a->days = $CFG->an_emailexpired;
$a->course = $SITE->fullname;
$a->enrolurl = "$CFG->wwwroot/$CFG->admin/users.php";
$a->url = $CFG->wwwroot."/enrol/authorize/index.php?status=".AN_STATUS_AUTH;
$message = get_string('pendingordersemail', 'enrol_authorize', $a);
$adminuser = get_admin();
email_to_user($adminuser, $adminuser, $subject, $message);
if (!empty($CFG->an_teachermanagepay) and !empty($CFG->an_emailexpiredteacher)) {
$sorttype = empty($CFG->an_sorttype) ? 'ttl' : $CFG->an_sorttype;
$sql = "SELECT E.courseid, E.currency, C.fullname, C.shortname, " .
"COUNT(E.courseid) AS cnt, SUM(E.amount) as ttl " .
"FROM {$CFG->prefix}enrol_authorize E " .
"INNER JOIN {$CFG->prefix}course C ON C.id = E.courseid " .
"WHERE $select GROUP BY E.courseid ORDER BY $sorttype DESC";
$message = ''; $subject = ''; $lastcourse = 0;
$courseidandcounts = get_records_sql($sql);
foreach($courseidandcounts as $courseidandcount) {
if ($lastcourse != $courseidandcount->courseid) {
$lastcourse = $courseidandcount->courseid;
$a = new stdClass;
$a->course = $courseidandcount->shortname;
$a->pending = $courseidandcount->cnt;
$a->days = $CFG->an_emailexpired;
$subject = get_string('pendingorderssubject', 'enrol_authorize', $a);
$a = new stdClass;
$a->course = $courseidandcount->fullname;
$a->pending = $courseidandcount->cnt;
$a->currency = $courseidandcount->currency;
$a->sumcost = $courseidandcount->ttl;
$a->days = $CFG->an_emailexpired;
$a->url = $CFG->wwwroot.'/enrol/authorize/index.php?course='.
$lastcourse.'&amp;status='.AN_STATUS_AUTH;
$message = get_string('pendingordersemailteacher', 'enrol_authorize', $a);
}
if ($teachers = get_course_teachers($lastcourse)) {
foreach ($teachers as $teacher) {
email_to_user($teacher, $adminuser, $subject, $message);
}
}
}
}
}
}
mtrace("Processing authorize cron...");
if (intval($mconfig->an_dailysettlement) < $settlementtime) {
set_config('an_dailysettlement', $settlementtime, 'enrol/authorize');
mtrace(" daily cron; some cleanups and sending email to admins the count of pending orders expiring", ": ");
$this->cron_daily();
mtrace("done");
}
if (empty($CFG->an_review) || (!empty($CFG->an_test)) ||
(intval($CFG->an_capture_day) < 1) || (!$this->check_openssl_loaded())) {
return;
mtrace(" scheduled capture", ": ");
if (empty($CFG->an_review) or
(!empty($CFG->an_test)) or
(intval($CFG->an_capture_day) < 1) or
(!enrolment_plugin_authorize::check_openssl_loaded())) {
mtrace("disabled");
return; // order review disabled or test mode or manual capture or openssl wasn't loaded.
}
$timediffcnf = $timenowsettle - (intval($CFG->an_capture_day) * $oneday);
$timediffcnf = $settlementtime - (intval($CFG->an_capture_day) * $oneday);
$sql = "SELECT E.*, C.fullname, C.enrolperiod " .
"FROM {$CFG->prefix}enrol_authorize E " .
"INNER JOIN {$CFG->prefix}course C ON C.id = E.courseid " .
"WHERE (status = '" .AN_STATUS_AUTH. "') " .
"WHERE (E.status = '" .AN_STATUS_AUTH. "') " .
" AND (E.timecreated < '$timediffcnf') AND (E.timecreated > '$timediff30')";
if (!$orders = get_records_sql($sql)) {
mtrace("no pending orders");
return;
}
@@ -729,9 +734,12 @@ class enrolment_plugin_authorize
$ordercount = count((array)$orders);
if (($ordercount * $eachconn) + intval($mconfig->an_lastcron) > $timenow) {
mtrace("blocked");
return;
}
mtrace(" $ordercount orders are being processed now", ": ");
$faults = '';
$sendem = array();
$elapsed = time();
@@ -741,19 +749,14 @@ class enrolment_plugin_authorize
foreach ($orders as $order) {
$message = '';
$extra = NULL;
$oldstatus = $order->status;
$success = authorizenet_action($order, $message, $extra, AN_ACTION_PRIOR_AUTH_CAPTURE);
$success = authorize_action($order, $message, $extra, AN_ACTION_PRIOR_AUTH_CAPTURE);
if ($success) {
if (!update_record("enrol_authorize", $order)) {
$this->email_to_admin("Error while trying to update data. Please edit manually this record: " .
"ID=$order->id in enrol_authorize table.", $order);
}
$timestart = $timeend = 0;
if ($order->enrolperiod) {
$timestart = $timenow;
$timeend = $order->settletime + $order->enrolperiod;
}
if (enrol_student($order->userid, $order->courseid, $timestart, $timeend, 'authorize')) {
if (enrol_student($order->userid, $order->courseid, $timestart, $timeend, 'manual')) {
$this->log .= "User($order->userid) has been enrolled to course($order->courseid).\n";
if (!empty($CFG->enrol_mailstudents)) {
$sendem[] = $order->id;
@@ -768,13 +771,12 @@ class enrolment_plugin_authorize
}
}
else {
$this->log .= "Order $order->id: " . $message . "\n";
if ($order->status != $oldstatus) { //expired
update_record("enrol_authorize", $order);
}
$this->log .= "Error, Order# $order->id: " . $message . "\n";
}
}
mtrace("processed");
$timenow = time();
$elapsed = $timenow - $elapsed;
$eachconn = ceil($elapsed / $ordercount);
@@ -789,30 +791,133 @@ class enrolment_plugin_authorize
if (!empty($CFG->enrol_mailadmins)) {
email_to_user($adminuser, $adminuser, "AUTHORIZE.NET CRON LOG", $this->log);
}
// Send emails to students about which courses have enrolled.
if (empty($sendem)) {
return;
}
$lastcourse = 0;
mtrace(" sending welcome messages to students", ": ");
$select = "SELECT E.id, E.courseid, E.userid, C.fullname " .
"FROM {$CFG->prefix}enrol_authorize E " .
"INNER JOIN {$CFG->prefix}course C ON C.id = E.courseid " .
"WHERE E.id IN(" . implode(',', $sendem) . ") " .
"ORDER BY E.courseid";
$orders = get_records_sql($select);
foreach ($orders as $order)
{
if ($lastcourse != $order->courseid) {
$lastcourse = $order->courseid;
$teacher = get_teacher($lastcourse);
"ORDER BY E.userid";
$emailinfo = get_records_sql($select);
$emailcount = count($emailinfo);
for($i = 0; $i < $emailcount; ) {
$usercourses = array();
$lastuserid = $emailinfo[$i]->userid;
for ($j=$i; $j < $emailcount and $emailinfo[$j]->userid == $lastuserid; $j++) {
$usercourses[] = $emailinfo[$j]->fullname;
}
$user = get_record('user', 'id', $order->userid);
$a = new stdClass;
$a->coursename = $order->fullname;
$a->profileurl = "$CFG->wwwroot/user/view.php?id=$user->id";
email_to_user($user, $teacher,
get_string("enrolmentnew", '', $order->fullname),
get_string('welcometocoursetext', '', $a));
$a->courses = implode("\n", $usercourses);
$a->profileurl = "$CFG->wwwroot/user/view.php?id=$lastuserid";
$a->paymenturl = "$CFG->wwwroot/enrol/authorize/index.php?user=$lastuserid";
$emailmessage = get_string('welcometocoursesemail', 'enrol_authorize', $a);
$user = get_record('user', 'id', $lastuserid);
email_to_user($user,
$adminuser,
get_string("enrolmentnew", '', $SITE->shortname),
$emailmessage);
$i = $j;
}
mtrace("sent");
}
/**
* Daily cron. It executes at settlement time (default is 00:05).
*
* @access private
*/
function cron_daily()
{
global $CFG, $SITE;
require_once($CFG->dirroot.'/enrol/authorize/authorizenetlib.php');
$oneday = 86400;
$timenow = time();
$settlementtime = authorize_getsettletime($timenow);
$timediff30 = $settlementtime - (30 * $oneday);
// Delete orders that no transaction was made.
$select = "(status='".AN_STATUS_NONE."') AND (timecreated<'$timediff30')";
delete_records_select('enrol_authorize', $select);
// Pending orders are expired with in 30 days.
$select = "(status='".AN_STATUS_AUTH."') AND (timecreated<'$timediff30')";
execute_sql("UPDATE {$CFG->prefix}enrol_authorize SET status='".AN_STATUS_EXPIRE."' WHERE $select", false);
// Delete expired orders 60 days later.
$timediff60 = $settlementtime - (60 * $oneday);
$select = "(status='".AN_STATUS_EXPIRE."') AND (timecreated<'$timediff60')";
delete_records_select('enrol_authorize', $select);
// Daily warning email for pending orders expiring.
if (empty($CFG->an_emailexpired)) {
return; // not enabled
}
// Pending orders count will be expired.
$timediffem = $settlementtime - ((30 - intval($CFG->an_emailexpired)) * $oneday);
$select = "(status='". AN_STATUS_AUTH ."') AND (timecreated<'$timediffem') AND (timecreated>'$timediff30')";
$count = count_records_select('enrol_authorize', $select);
if (!$count) {
return;
}
// Email to admin
$a = new stdClass;
$a->pending = $count;
$a->days = $CFG->an_emailexpired;
$a->course = $SITE->shortname;
$subject = get_string('pendingorderssubject', 'enrol_authorize', $a);
$a = new stdClass;
$a->pending = $count;
$a->days = $CFG->an_emailexpired;
$a->course = $SITE->fullname;
$a->enrolurl = "$CFG->wwwroot/$CFG->admin/users.php";
$a->url = $CFG->wwwroot.'/enrol/authorize/index.php?status='.AN_STATUS_AUTH;
$message = get_string('pendingordersemail', 'enrol_authorize', $a);
$adminuser = get_admin();
email_to_user($adminuser, $adminuser, $subject, $message);
// Email to teachers
if (empty($CFG->an_teachermanagepay) or empty($CFG->an_emailexpiredteacher)) {
return; // teachers can't manage payments or email feature disabled for teachers.
}
$sorttype = empty($CFG->an_sorttype) ? 'ttl' : $CFG->an_sorttype;
$where = "(E.status='". AN_STATUS_AUTH ."') AND (E.timecreated<'$timediffem') AND (E.timecreated>'$timediff30')";
$sql = "SELECT E.courseid, E.currency, C.fullname, C.shortname, " .
"COUNT(E.courseid) AS cnt, SUM(E.amount) as ttl " .
"FROM {$CFG->prefix}enrol_authorize E " .
"INNER JOIN {$CFG->prefix}course C ON C.id = E.courseid " .
"WHERE $where GROUP BY E.courseid ORDER BY $sorttype DESC";
$courseinfos = get_records_sql($sql);
foreach($courseinfos as $courseinfo) {
$lastcourse = $courseinfo->courseid;
if ($teachers = get_course_teachers($lastcourse)) {
$a = new stdClass;
$a->course = $courseinfo->shortname;
$a->pending = $courseinfo->cnt;
$a->days = $CFG->an_emailexpired;
$subject = get_string('pendingorderssubject', 'enrol_authorize', $a);
$a = new stdClass;
$a->course = $courseinfo->fullname;
$a->pending = $courseinfo->cnt;
$a->currency = $courseinfo->currency;
$a->sumcost = $courseinfo->ttl;
$a->days = $CFG->an_emailexpired;
$a->url = $CFG->wwwroot.'/enrol/authorize/index.php?course='.
$lastcourse.'&amp;status='.AN_STATUS_AUTH;
$message = get_string('pendingordersemailteacher', 'enrol_authorize', $a);
foreach ($teachers as $teacher) {
email_to_user($teacher, $adminuser, $subject, $message);
}
}
}
}
}
+1 -1
View File
@@ -17,7 +17,7 @@
}
/// Load strings. All strings should be defined here. locallib.php uses these strings.
$strs = get_strings(array('status','action','time','course','confirm','yes','no','all','none','error'));
$strs = get_strings(array('status','action','time','course','confirm','no','all','none','error'));
$authstrs = get_strings(array('orderid','nameoncard','void','capture','refund','delete',
'authcaptured','authorizedpendingcapture','capturedpendingsettle','capturedsettled',
'settled','refunded','cancelled','expired','tested','new',
+79 -57
View File
@@ -101,10 +101,10 @@ function authorize_print_orders()
}
if ($userid > 0) {
$where .= "AND (userid = '" . $userid . "') ";
$where .= "AND (E.userid = '" . $userid . "') ";
}
if ($courseid != SITEID) {
$where .= "AND (courseid = '" . $courseid . "') ";
$where .= "AND (E.courseid = '" . $courseid . "') ";
}
if ($sort = $table->get_sql_sort()) {
@@ -191,7 +191,7 @@ function authorize_print_order_details($orderno)
echo "<input type=\"hidden\" name=\"order\" value=\"$orderno\">\n";
echo "<input type=\"hidden\" name=\"sesskey\" value=\"" . sesskey() . "\" />";
$settled = settled($order);
$settled = authorize_settled($order);
$status = authorize_get_status_action($order);
$table->data[] = array("<b>$authstrs->orderid:</b>", $orderno);
@@ -217,14 +217,14 @@ function authorize_print_order_details($orderno)
if (empty($confirm)) {
$strcaptureyes = get_string('captureyes', 'enrol_authorize');
$table->data[] = array("<b>$strs->confirm:</b>",
"$strcaptureyes<br /><a href='index.php?order=$orderno&amp;sesskey=$USER->sesskey&amp;".ORDER_CAPTURE."=y&amp;confirm=1'>$strs->yes</a>
&nbsp;&nbsp;&nbsp;&nbsp;<a href='index.php?order=$orderno'>$strs->no</a>");
"$strcaptureyes <br />
<input type='hidden' name='confirm' value='1'><input type='submit' name='". ORDER_CAPTURE ."' value='$authstrs->capture' />
&nbsp;&nbsp;&nbsp;<a href='index.php?order=$orderno'>$strs->no</a>");
}
else {
$message = '';
$extra = NULL;
$success = authorizenet_action($order, $message, $extra, AN_ACTION_PRIOR_AUTH_CAPTURE);
update_record("enrol_authorize", $order); // May be expired.
$success = authorize_action($order, $message, $extra, AN_ACTION_PRIOR_AUTH_CAPTURE);
if (!$success) {
$table->data[] = array("<b><font color='red'>$strs->error:</font></b>", $message);
}
@@ -235,7 +235,7 @@ function authorize_print_order_details($orderno)
$timestart = time(); // early start
$timeend = $order->settletime + $order->enrolperiod; // lately end
}
if (enrol_student($order->userid, $order->courseid, $timestart, $timeend, 'authorize')) {
if (enrol_student($order->userid, $order->courseid, $timestart, $timeend, 'manual')) {
$user = get_record('user', 'id', $order->userid);
$teacher = get_teacher($order->courseid);
$a = new stdClass;
@@ -298,20 +298,11 @@ function authorize_print_order_details($orderno)
else {
$extra->amount = $amount;
$message = '';
$success = authorizenet_action($order, $message, $extra, AN_ACTION_CREDIT);
$success = authorize_action($order, $message, $extra, AN_ACTION_CREDIT);
if ($success) {
if (empty($CFG->an_test)) {
$extra->id = insert_record("enrol_authorize_refunds", $extra);
if (empty($extra->id)) {
$emailsubject = "Authorize.net: insert record error";
$emailmessage = "Error while trying to insert new data to enrol_authorize_refunds table:\n";
$data = (array)$extra;
foreach ($data as $key => $value) {
$emailmessage .= "$key => $value\n";
}
$adminuser = get_admin();
email_to_user($adminuser, $adminuser, $emailsubject, $emailmessage);
$table->data[] = array("<b><font color=red>$strs->error:</font></b>", $emailmessage);
$table->data[] = array("<b><font color=red>$strs->error:</font></b>", 'insert record error');
}
else {
if (!empty($unenrol)) {
@@ -333,27 +324,25 @@ function authorize_print_order_details($orderno)
print_table($table);
}
elseif (!empty($cmdvoid) and confirm_sesskey()) { // VOID
if (!in_array(ORDER_VOID, $status->actions)) {
$a = new stdClass;
$a->action = $authstrs->void;
error(get_string('youcantdo', 'enrol_authorize', $a));
}
$suborderno = optional_param('suborder', 0, PARAM_INT);
if (empty($suborderno)) { // cancel original transaction.
if (!in_array(ORDER_VOID, $status->actions)) {
$a = new stdClass;
$a->action = $authstrs->void;
error(get_string('youcantdo', 'enrol_authorize', $a));
}
if (empty($confirm)) {
$strvoidyes = get_string('voidyes', 'enrol_authorize');
$table->data[] = array("<b>$strs->confirm:</b>",
"$strvoidyes<br /><input type='hidden' name='".ORDER_VOID."' value='y'>
<input type='hidden' name='confirm' value='1'>
<input type='submit' value='$strs->yes'>
<input type='submit' value='$authstrs->void'>
&nbsp;&nbsp;&nbsp;&nbsp;<a href='index.php?order=$orderno'>$strs->no</a>");
}
else {
$extra = NULL;
$message = '';
$success = authorizenet_action($order, $message, $extra, AN_ACTION_VOID);
update_record("enrol_authorize", $order); // May be expired.
$success = authorize_action($order, $message, $extra, AN_ACTION_VOID);
if ($success) {
if (empty($CFG->an_test)) {
redirect("index.php?order=$orderno");
@@ -369,14 +358,22 @@ function authorize_print_order_details($orderno)
}
}
else { // cancel refunded transaction
$suborder = get_record('enrol_authorize_refunds',
'id', $suborderno,
'orderid', $orderno,
'status', AN_STATUS_CREDIT);
$sql = "SELECT R.*, E.courseid FROM {$CFG->prefix}enrol_authorize_refunds R " .
"INNER JOIN {$CFG->prefix}enrol_authorize E ON R.orderid = E.id " .
"WHERE R.id = '$suborderno' AND R.orderid = '$orderno' AND R.status = '" .AN_STATUS_CREDIT. "'";
$suborder = get_record_sql($sql);
if (!$suborder) { // not found
error("Transaction can not be voided because of already been voided.");
}
else {
$refundedstatus = authorize_get_status_action($suborder);
if (!in_array(ORDER_VOID, $refundedstatus->actions)) {
$a = new stdClass;
$a->action = $authstrs->void;
error(get_string('youcantdo', 'enrol_authorize', $a));
}
unset($suborder->courseid);
if (empty($confirm)) {
$a = new stdClass;
$a->transid = $suborder->transid;
@@ -388,14 +385,13 @@ function authorize_print_order_details($orderno)
"$strsubvoidyes<br /><input type='hidden' name='".ORDER_VOID."' value='y'>
<input type='hidden' name='confirm' value='1'>
<input type='hidden' name='suborder' value='$suborderno'>
<input type='submit' value='$strs->yes'>
<input type='submit' value='$authstrs->void'>
&nbsp;&nbsp;&nbsp;&nbsp;<a href='index.php?order=$orderno'>$strs->no</a>");
}
else {
$message = '';
$extra = NULL;
$success = authorizenet_action($suborder, $message, $extra, AN_ACTION_VOID);
update_record("enrol_authorize_refunds", $suborder); // May be expired.
$success = authorize_action($suborder, $message, $extra, AN_ACTION_VOID);
if ($success) {
if (empty($CFG->an_test)) {
if (!empty($unenrol)) {
@@ -428,7 +424,7 @@ function authorize_print_order_details($orderno)
$table->data[] = array("<b>$strs->confirm:</b>",
"<input type='hidden' name='".ORDER_DELETE."' value='y'>
<input type='hidden' name='confirm' value='1'>
<input type='submit' value='$strs->yes'>
<input type='submit' value='$authstrs->delete'>
&nbsp;&nbsp;&nbsp;&nbsp;<a href='index.php?order=$orderno'>$strs->no</a>");
}
else {
@@ -454,15 +450,21 @@ function authorize_print_order_details($orderno)
print_table($table);
if ($settled) { // show refunds.
$t2 = new stdClass;
$t2->size = array('15%', '15%', '20%', '35%', '15%');
$t2->size = array('45%', '15%', '20%', '10%', '10%');
$t2->align = array('right', 'right', 'right', 'right', 'right');
$t2->head = array($authstrs->transid,
$authstrs->amount,
$t2->head = array($authstrs->settlementdate,
$authstrs->transid,
$strs->status,
$authstrs->settlementdate,
$strs->action);
$refunds = get_records('enrol_authorize_refunds', 'orderid', $orderno);
$strs->action,
$authstrs->amount);
$sql = "SELECT R.*, E.courseid FROM {$CFG->prefix}enrol_authorize_refunds R " .
"INNER JOIN {$CFG->prefix}enrol_authorize E ON R.orderid = E.id " .
"WHERE R.orderid = '$orderno'";
$refunds = get_records_sql($sql);
if ($refunds) {
$sumrefund = floatval(0.0);
foreach ($refunds as $rf) {
$substatus = authorize_get_status_action($rf);
$subactions = '&nbsp;';
@@ -475,12 +477,36 @@ function authorize_print_order_details($orderno)
"<a href='index.php?$vl=y&amp;sesskey=$USER->sesskey&amp;order=$orderno&amp;suborder=$rf->id'>{$authstrs->$vl}</a> ";
}
}
$t2->data[] = array($rf->transid,
$rf->amount,
$authstrs->{$substatus->status},
userdate($rf->settletime),
$subactions);
$sign = '';
$color = '';
switch ($substatus->status) {
case 'cancelled':
$color = 'black';
break;
case 'refunded':
$sign = '-';
$color = 'red';
$sumrefund += floatval($rf->amount);
break;
case 'settled':
default:
$sign = '-';
$color = 'green';
$sumrefund += floatval($rf->amount);
break;
}
$t2->data[] = array(
userdate($rf->settletime),
$rf->transid,
$authstrs->{$substatus->status},
$subactions,
"<font color='$color'>" . format_float($sign . $rf->amount, 2) . "</font>"
);
}
$t2->data[] = array('','',get_string('total'),$order->currency,format_float('-'.$sumrefund, 2));
}
else {
$t2->data[] = array('','',get_string('noreturns', 'enrol_authorize'),'','');
@@ -501,12 +527,10 @@ function authorize_print_order_details($orderno)
function authorize_get_status_action($order)
{
global $CFG;
static $timediff30, $newordertime;
static $newordertime;
if (empty($timediff30)) {
$timenow = time();
$timediff30 = getsettletime($timenow) - (30 * 3600 * 24);
$newordertime = $timenow - 120; // -2 minutes. Order may be still in process.
if (empty($newordertime)) {
$newordertime = time() - 120; // -2 minutes. Order may be still in process.
}
$ret = new stdClass();
@@ -527,9 +551,7 @@ function authorize_get_status_action($order)
switch ($order->status) {
case AN_STATUS_AUTH:
if (getsettletime($order->timecreated) < $timediff30) {
$order->status = AN_STATUS_EXPIRE;
update_record("enrol_authorize", $order);
if (authorize_expired($order)) {
if (isadmin() || (!empty($CFG->an_teachermanagepay) && isteacher($order->courseid))) {
$ret->actions = array(ORDER_DELETE);
}
@@ -544,7 +566,7 @@ function authorize_get_status_action($order)
return $ret;
case AN_STATUS_AUTHCAPTURE:
if (settled($order)) {
if (authorize_settled($order)) {
if (isadmin() || (!empty($CFG->an_teachermanagepay) && isteacher($order->courseid))) {
$ret->actions = array(ORDER_REFUND);
}
@@ -559,7 +581,7 @@ function authorize_get_status_action($order)
return $ret;
case AN_STATUS_CREDIT:
if (settled($order)) {
if (authorize_settled($order)) {
$ret->status = 'settled';
}
else {
+12 -1
View File
@@ -81,6 +81,9 @@ function get_user_courses(&$user, $type) {
}
}
/// Add it to new list
$newenrolments[$course_obj->id] = 'ldap';
// deal with enrolment in the moodle db
if (!empty($course_obj)) { // does course exist now?
if(isset($user->{$type}[$course_obj->id]) && $user->{$type}[$course_obj->id] == 'ldap'){
@@ -105,18 +108,26 @@ function get_user_courses(&$user, $type) {
// array, those are old enrolments that we want to remove (or are they?)
if(!empty($user->{$type})){
foreach ($user->{$type} as $courseid => $value){
if($value == 'ldap'){ // this was a legacy
if($value === 'ldap'){ // this was a legacy
if ($type === 'student') { // enrol
unenrol_student($user->id, $courseid);
} else if ($type === 'teacher') {
remove_teacher($user->id, $courseid);
}
unset($user->{$type}[$course_obj->id]);
} else {
// This one is from a non-database
// enrolment. Add it to the newenrolments
// array, so we don't loose it.
$newenrolments[$courseid] = $value;
}
}
}
/// Overwrite the old array with the new one
$user->{$type} = $newenrolments;
@ldap_close($ldap_connection);
return true;
}
+1 -1
View File
@@ -37,7 +37,7 @@
print_simple_box_end();
if ($course->guest) {
if ($course->guest and !isguest()) {
print_simple_box_start('center');
?>
<form name="form" method="post" action="enrol.php">
+9 -7
View File
@@ -210,6 +210,12 @@ function check_entry($form, $course) {
$form->password = '';
}
if (empty($course->password)) {
// do not allow entry when no course password set
// automatic login when manual primary, no login when secondary at all!!
error("illegal enrolment attempted");
}
$groupid = $this->check_group_entry($course->id, $form->password);
if (($form->password == $course->password) or ($groupid !== false) ) {
@@ -240,7 +246,7 @@ function check_entry($form, $course) {
$subject = get_string("welcometocourse", "", $course->fullname);
$a->coursename = $course->fullname;
$a->profileurl = "$CFG->wwwroot/user/view.php?id=$USER->id&amp;course=$course->id";
$a->profileurl = "$CFG->wwwroot/user/view.php?id=$USER->id&course=$course->id";
$message = get_string("welcometocoursetext", "", $a);
if (! $teacher = get_teacher($course->id)) {
@@ -272,8 +278,6 @@ function check_entry($form, $course) {
/**
* Check if the given enrolment key matches a group enrolment key for the given course
*
* Check if the given enrolment key matches a group enrolment key for the given course
*
* @param courseid the current course id
* @param password the submitted enrolment key
*/
@@ -304,8 +308,6 @@ function config_form($page) {
/**
* Processes and stored configuration data for the enrolment plugin
*
* Processes and stored configuration data for the enrolment plugin
*
* @param config all the configuration data as entered by the admin
*/
function process_config($config) {
@@ -368,6 +370,8 @@ function cron() {
$a->extendurl = $CFG->wwwroot . '/user/index.php?id=' . $course->id;
$a->current = array();
$a->past = array();
$a->studentstr = $course->student;
$a->teacherstr = $course->teacher;
$a->current = $a->past = array();
$expiry = time() + $course->expirythreshold;
$sql = "SELECT * FROM {$CFG->prefix}user u INNER JOIN {$CFG->prefix}user_students s ON u.id=s.userid WHERE s.course = $course->id AND s.timeend > 0 AND s.timeend <= $expiry";
@@ -406,8 +410,6 @@ function cron() {
/**
* Returns the relevant icons for a course
*
* Returns the relevant icons for a course
*
* @param course the current course, as an object
*/
function get_access_icons($course) {
+53 -36
View File
@@ -39,21 +39,35 @@ function print_entry($course) {
print_course($course, "80%");
if ($course->password) { // Presenting two options
print_simple_box(get_string('costorkey', 'enrol_paypal'), 'center');
print_heading(get_string('costorkey', 'enrol_paypal'), 'center');
}
print_simple_box_start("center");
//Sanitise some fields before building the PayPal form
$coursefullname = $this->sanitise_for_paypal($course->fullname);
$courseshortname = $this->sanitise_for_paypal($course->shortname);
$userfullname = $this->sanitise_for_paypal(fullname($USER));
$userfirstname = $this->sanitise_for_paypal($USER->firstname);
$userlastname = $this->sanitise_for_paypal($USER->lastname);
$useraddress = $this->sanitise_for_paypal($USER->address);
$usercity = $this->sanitise_for_paypal($USER->city);
if (isguest()) {
if (empty($CFG->loginhttps)) {
$wwwroot = $CFG->wwwroot;
} else {
// This actually is not so secure ;-), 'cause we're
// in unencrypted connection...
$wwwroot = str_replace("http://", "https://", $CFG->wwwroot);
}
echo '<div align="center"><p>'.get_string('paymentrequired').'</p>';
echo '<p><b>'.get_string('cost').": $CFG->enrol_currency $cost".'</b></p>';
echo '<p><a href="'.$wwwroot.'/login/">'.get_string('loginsite').'</a></p>';
echo '</div>';
} else {
//Sanitise some fields before building the PayPal form
$coursefullname = $this->sanitise_for_paypal($course->fullname);
$courseshortname = $this->sanitise_for_paypal($course->shortname);
$userfullname = $this->sanitise_for_paypal(fullname($USER));
$userfirstname = $this->sanitise_for_paypal($USER->firstname);
$userlastname = $this->sanitise_for_paypal($USER->lastname);
$useraddress = $this->sanitise_for_paypal($USER->address);
$usercity = $this->sanitise_for_paypal($USER->city);
include($CFG->dirroot.'/enrol/paypal/enrol.html');
include($CFG->dirroot.'/enrol/paypal/enrol.html');
}
print_simple_box_end();
@@ -174,35 +188,38 @@ function process_config($config) {
//To avoid wrong (for PayPal) characters in sent data
function sanitise_for_paypal($text) {
global $CFG;
if (!empty($CFG->sanitise_for_paypal)) {
//Array of characters to replace (not allowed by PayPal)
//Can be expanded as necessary to add other diacritics
$replace = array('á' => 'a', //Spanish characters
'é' => 'e',
'í' => 'i',
'ó' => 'o',
'ú' => 'u',
'Á' => 'A',
'É' => 'E',
'Í' => 'I',
'Ó' => 'O',
'Ú' => 'U',
'ñ' => 'n',
'Ñ' => 'N',
'ü' => 'u',
'Ü' => 'U');
$text = strtr($text, $replace);
//Make here other sanities if necessary
}
$textlib = textlib_get_instance();
$text = $textlib->specialtoascii($text, current_charset());
// TODO: characters that have no ascii equivalents are not sanitized properly :-(
return $text;
}
/**
* This function enables internal enrolment when PayPal is primary and course key is set at the same time.
*
* @param form the form data submitted, as an object
* @param course the current course, as an object
*/
function check_entry($form, $course) {
$manual = enrolment_factory::factory('manual');
$manual->check_entry($form, $course);
if (isset($manual->errormsg)) {
$this->errormsg = $manual->errormsg;
}
}
/**
* Returns information about the courses a student has access to
*
* Set the $user->student course array
* Set the $user->timeaccess course array
*
* @param user referenced object, must contain $user->id already set
*/
function get_student_courses(&$user) {
$manual = enrolment_factory::factory('manual');
$manual->get_student_courses($user);
}
} // end of class definition
+8 -1
View File
@@ -150,7 +150,14 @@
email_paypal_error_to_admin("Error while trying to insert valid transaction", $data);
}
if (!enrol_student($user->id, $course->id)) { // Enrol the student
if ($course->enrolperiod) {
$timestart = time();
$timeend = time() + $course->enrolperiod;
} else {
$timestart = $timeend = 0;
}
if (!enrol_student($user->id, $course->id, $timestart, $timeend, 'manual')) {
email_paypal_error_to_admin("Error while trying to enrol ".fullname($user)." in '$course->fullname'", $data);
die;
} else {
+1
View File
@@ -93,6 +93,7 @@
and (strtolower($args[1]) == 'moddata')
and ((strtolower($args[2]) == 'forum')
or (strtolower($args[2]) == 'assignment')
or (strtolower($args[2]) == 'data')
or (strtolower($args[2]) == 'glossary')
or (strtolower($args[2]) == 'wiki')
or (strtolower($args[2]) == 'exercise')
+4 -4
View File
@@ -16,7 +16,7 @@
$action = optional_param('action', '', PARAM_ACTION);
$name = optional_param('name', '', PARAM_FILE);
$oldname = optional_param('oldname', '', PARAM_FILE);
$choose = optional_param('choose', '', PARAM_CLEAN);
$choose = optional_param('choose', '', PARAM_FILE); //in fact it is always 'formname.inputname'
$userfile= optional_param('userfile','',PARAM_FILE);
$save = optional_param('save', 0, PARAM_BOOL);
$text = optional_param('text', '', PARAM_RAW);
@@ -539,7 +539,7 @@
echo "<tr class=\"file\"><th align=\"left\" class=\"header name\">$strname</th><th align=\"right\" class=\"header size\">$strsize</th><th align=\"right\" class=\"header date\">$strmodified</th></tr>";
foreach ($list as $item) {
echo "<tr>";
print_cell("left", $item['filename'], 'name');
print_cell("left", s($item['filename']), 'name');
if (! $item['folder']) {
print_cell("right", display_size($item['size']), 'size');
} else {
@@ -769,9 +769,9 @@ function displaydir ($wdir) {
print_cell("center", "<input type=\"checkbox\" name=\"file$count\" value=\"$fileurl\" />", 'checkbox');
echo "<td align=\"left\" nowrap=\"nowrap\" class=\"name\">";
if ($CFG->slasharguments) {
$ffurl = "/file.php/$id/$fileurl";
$ffurl = str_replace('//', '/', "/file.php/$id/$fileurl");
} else {
$ffurl = "/file.php?file=/$id/$fileurl";
$ffurl = str_replace('//', '/', "/file.php?file=/$id/$fileurl");
}
link_to_popup_window ($ffurl, "display",
"<img src=\"$CFG->pixpath/f/$icon\" height=\"16\" width=\"16\" border=\"0\" alt=\"File\" />",
+10 -2
View File
@@ -7,6 +7,14 @@
require_once("../../config.php");
if (empty($CFG->textfilters)) {
error ('Filter not enabled!');
} else {
$filters = explode(',', $CFG->textfilters);
if (array_search('filter/algebra', $filters) === FALSE) {
error ('Filter not enabled!');
}
}
$CFG->texfilterdir = "filter/tex";
$CFG->algebrafilterdir = "filter/algebra";
@@ -302,9 +310,9 @@ function slasharguments($texexp, $md5) {
$image = tex2image($texexp,$md5,true);
echo "<p>If the following image displays correctly, set your ";
echo "<a href=\"$admin\" target=\"_blank\">Administration->Configuration->Variables</a> ";
echo "setting for slasharguments to file.php/pic.jpg: ";
echo "setting for slasharguments to file.php/1/pic.jpg: ";
echo "<img src=\"pix.php/$image\" align=\"absmiddle\"></p>\n";
echo "<p>Otherwise set it to file.php?file=pic.jpg ";
echo "<p>Otherwise set it to file.php?file=/1/pic.jpg ";
echo "It should display correctly as ";
echo "<img src=\"pix.php?file=$image\" align=\"absmiddle\"></p>\n";
echo "<p>If neither equation image displays correctly, please seek ";
+10
View File
@@ -6,6 +6,16 @@
$nomoodlecookie = true; // Because it interferes with caching
require_once('../../config.php');
if (empty($CFG->textfilters)) {
error ('Filter not enabled!');
} else {
$filters = explode(',', $CFG->textfilters);
if (array_search('filter/algebra', $filters) === FALSE) {
error ('Filter not enabled!');
}
}
require_once($CFG->libdir.'/filelib.php');
$CFG->texfilterdir = 'filter/tex';
+1 -1
View File
@@ -21,7 +21,7 @@
set_config( 'filter_mediaplugin_ignore_swf','' );
}
else {
set_config( 'filter_mediaplugin_enable_swf', 1 );
set_config( 'filter_mediaplugin_enable_swf', 0 ); //disable swf embedding by default for now
}
}
if (!isset($CFG->filter_mediaplugin_enable_mov) or $forcereset) {
+10
View File
@@ -6,6 +6,7 @@
$txt = new Object;
$txt->mediapluginmp3 = get_string( 'mediapluginmp3','admin' );
$txt->mediapluginswf = get_string( 'mediapluginswf','admin' );
$txt->mediapluginswfnote = get_string( 'mediapluginswfnote','admin' );
$txt->mediapluginmov = get_string( 'mediapluginmov','admin' );
$txt->mediapluginwmv = get_string( 'mediapluginwmv','admin' );
$txt->mediapluginmpg = get_string( 'mediapluginmpg','admin' );
@@ -25,41 +26,49 @@
<td align="right"><?php echo $txt->mediapluginmp3 ?></td>
<td><?php choose_from_menu( $yesno,'filter_mediaplugin_enable_mp3',
$CFG->filter_mediaplugin_enable_mp3 ); ?></td>
<td />
</tr>
<tr valign="top">
<td align="right"><?php echo $txt->mediapluginswf?></td>
<td><?php choose_from_menu( $yesno,'filter_mediaplugin_enable_swf',
$CFG->filter_mediaplugin_enable_swf ); ?></td>
<td><?php echo $txt->mediapluginswfnote ?></td>
</tr>
<tr valign="top">
<td align="right"><?php echo $txt->mediapluginmov ?></td>
<td><?php choose_from_menu( $yesno,'filter_mediaplugin_enable_mov',
$CFG->filter_mediaplugin_enable_mov ); ?></td>
<td />
</tr>
<tr valign="top">
<td align="right"><?php echo $txt->mediapluginwmv ?></td>
<td><?php choose_from_menu( $yesno,'filter_mediaplugin_enable_wmv',
$CFG->filter_mediaplugin_enable_wmv ); ?></td>
<td />
</tr>
<tr valign="top">
<td align="right"><?php echo $txt->mediapluginmpg ?></td>
<td><?php choose_from_menu( $yesno,'filter_mediaplugin_enable_mpg',
$CFG->filter_mediaplugin_enable_mpg ); ?></td>
<td />
</tr>
<tr valign="top">
<td align="right"><?php echo $txt->mediapluginavi ?></td>
<td><?php choose_from_menu( $yesno,'filter_mediaplugin_enable_avi',
$CFG->filter_mediaplugin_enable_avi ); ?></td>
<td />
</tr>
<tr valign="top">
<td align="right"><?php echo $txt->mediapluginflv ?></td>
<td><?php choose_from_menu( $yesno,'filter_mediaplugin_enable_flv',
$CFG->filter_mediaplugin_enable_flv ); ?></td>
<td />
</tr>
<tr valign="top">
<td align="right"><?php echo $txt->mediapluginram ?></td>
<td><?php choose_from_menu( $yesno,'filter_mediaplugin_enable_ram',
$CFG->filter_mediaplugin_enable_ram ); ?></td>
<td />
</tr>
<tr valign="top">
<td align="right"><?php echo $txt->mediapluginrpm ?></td>
@@ -70,5 +79,6 @@
<td align="right"><?php echo $txt->mediapluginrm ?></td>
<td><?php choose_from_menu( $yesno,'filter_mediaplugin_enable_rm',
$CFG->filter_mediaplugin_enable_rm ); ?></td>
<td />
</tr>
</table>
+4 -6
View File
@@ -47,7 +47,6 @@ function multilang_filter($courseid, $text) {
*/
// [pj] I don't know about you but I find this new implementation funny :P
$search = '/(<(?:lang|span) lang="[a-zA-Z0-9_-]*".*?>.+?<\/(?:lang|span)>\s*)+/is';
return preg_replace_callback($search, 'multilang_filter_impl', $text);
}
@@ -55,7 +54,6 @@ function multilang_filter($courseid, $text) {
function multilang_filter_impl($langblock) {
global $CFG;
// This callbackis going to get called multiple times, so cache $preflangs
static $preflangs = NULL;
@@ -99,16 +97,16 @@ function multilang_filter_impl($langblock) {
$preflangs[] = 'en';
}
}
// Setup is done, now do multilang replacement on the match we 've been called for
$searchtosplit = '/<(?:lang|span) lang="([a-zA-Z0-9_-]*)".*?>(.+?)<\/(?:lang|span)>/is';
preg_match_all($searchtosplit, $langblock[0], $langlist);
/// Get the existing sections langs
$lang = '';
$minpref = count($preflangs);
$bestkey = 0;
// Define the preference that will be enough if found
$stoppref = empty($CFG->unicodedb) ? 0 : 1;
//Iterate
foreach ($langlist[1] as $key => $lang) {
//Normalize: Moodle's langs are always lowercase and they use the underscore
@@ -118,8 +116,8 @@ function multilang_filter_impl($langblock) {
if ($foundkey !== false && $foundkey !== NULL && $foundkey < $minpref) {
$minpref = $foundkey;
$bestkey = $key;
if ($minpref == 0) {
continue; //The best has been found. Leave iteration.
if ($minpref <= $stoppref) {
break; //The best has been found. Leave iteration.
}
}
}
+10
View File
@@ -6,6 +6,16 @@
$nomoodlecookie = true; // Because it interferes with caching
require_once('../../config.php');
if (empty($CFG->textfilters)) {
error ('Filter not enabled!');
} else {
$filters = explode(',', $CFG->textfilters);
if (array_search('filter/tex', $filters) === FALSE) {
error ('Filter not enabled!');
}
}
require_once($CFG->libdir.'/filelib.php');
require_once('defaultsettings.php' );
require_once('latex.php');
+11 -2
View File
@@ -7,6 +7,15 @@
require_once("../../config.php");
if (empty($CFG->textfilters)) {
error ('Filter not enabled!');
} else {
$filters = explode(',', $CFG->textfilters);
if (array_search('filter/tex', $filters) === FALSE) {
error ('Filter not enabled!');
}
}
$CFG->texfilterdir = "filter/tex";
$CFG->teximagedir = "filter/tex";
@@ -178,9 +187,9 @@
$image = tex2image($texexp,true);
echo "<p>If the following image displays correctly, set your ";
echo "<a href=\"$admin\" target=\"_blank\">Administration->Configuration->Variables</a> ";
echo "setting for slasharguments to file.php/pic.jpg: ";
echo "setting for slasharguments to file.php/1/pic.jpg: ";
echo "<img src=\"pix.php/$image\" align=\"absmiddle\"></p>\n";
echo "<p>Otherwise set it to file.php?file=pic.jpg ";
echo "<p>Otherwise set it to file.php?file=/1/pic.jpg ";
echo "It should display correctly as ";
echo "<img src=\"pix.php?file=$image\" align=\"absmiddle\"></p>\n";
echo "<p>If neither equation image displays correctly, please seek ";
+9
View File
@@ -7,6 +7,15 @@
require_once("../../config.php");
if (empty($CFG->textfilters)) {
error ('Filter not enabled!');
} else {
$filters = explode(',', $CFG->textfilters);
if (array_search('filter/tex', $filters) === FALSE) {
error ('Filter not enabled!');
}
}
$CFG->texfilterdir = "filter/tex";
$CFG->teximagedir = "filter/tex";
+9 -4
View File
@@ -1,10 +1,15 @@
<?php // $Id$
require_once('../config.php');
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
require_once($CFG->dirroot.'/course/lib.php');
define('UNCATEGORISED', 'uncategorised');
global $GRADEPREFS, $GRADEPREFSDEFAULTS; // This variables are going to be global... :-/
$GRADEPREFS = array('use_advanced', // Only add new preferences to the end of this array!
'use_weighted_for_letter', // as the order counts and will affect backward compatibility
'display_weighted',
@@ -2872,7 +2877,7 @@ function grade_set_letter_grades() {
function grade_download_form($type='both') {
global $course,$USER, $action, $cview;
if ($type != 'both' || $type != 'excel' || $type != 'text') {
if ($type != 'both' and $type != 'excel' and $type != 'text') {
$type = 'both';
}
@@ -2881,13 +2886,13 @@ function grade_download_form($type='both') {
$options['id'] = $course->id;
$options['sesskey'] = $USER->sesskey;
if ($type = 'both' || $type == 'excel') {
if ($type == 'both' || $type == 'excel') {
$options['action'] = 'excel';
echo '<td align="center">';
print_single_button("index.php", $options, get_string("downloadexcel"));
echo '</td>';
}
if ($type = 'both' || $type == 'text') {
if ($type == 'both' || $type == 'text') {
$options['action'] = 'text';
echo '<td align="center">';
print_single_button("index.php", $options, get_string("downloadtext"));
+162 -131
View File
@@ -1,157 +1,188 @@
<?php
/**
* help.php - Displays help page.
*
* Prints a very simple page and includes
* page content or a string from elsewhere.
* Usually this will appear in a popup
* See {@link helpbutton()} in {@link lib/moodlelib.php}
*
* @author Martin Dougiamas
* @version $Id$
* @package moodlecore
*/
require_once('config.php');
/**
* help.php - Displays help page.
*
* Prints a very simple page and includes
* page content or a string from elsewhere.
* Usually this will appear in a popup
* See {@link helpbutton()} in {@link lib/moodlelib.php}
*
* @author Martin Dougiamas
* @version $Id$
* @package moodlecore
*/
// Get URL parameters.
$file = optional_param('file', '', PARAM_PATH);
$text = optional_param('text', 'No text to display', PARAM_CLEAN);
$module = optional_param('module', 'moodle', PARAM_ALPHAEXT);
$forcelang = optional_param('forcelang', '', PARAM_SAFEDIR);
// Start the output.
print_header();
print_simple_box_start('center', '96%');
require_once('config.php');
// We look for the help to display in lots of different places, and
// only display an error at the end if we can't find the help file
// anywhere. This variable tracks that.
$helpfound = false;
$file = optional_param('file', '', PARAM_CLEAN);
$text = optional_param('text', 'No text to display', PARAM_CLEAN);
$module = optional_param('module', 'moodle', PARAM_ALPHAEXT);
$forcelang = optional_param('forcelang', '', PARAM_ALPHAEXT);
if (!empty($file)) {
// The help to display is from a help file.
print_header();
if (detect_munged_arguments($module .'/'. $file)) {
error('Filenames contain illegal characters!');
}
print_simple_box_start('center', '96%');
$helpfound = false;
// Get the list of parent languages.
if (empty($forcelang)) {
$langs = array(current_language(), get_string('parentlanguage'), 'en_utf8'); // Fallback
} else {
$langs = array($forcelang);
}
if (!empty($file)) {
}
// Work through the possible languages, starting with the most specific.
foreach ($langs as $lang) {
if (empty($lang)) {
continue;
}
// Work out which directory the help files live in.
if ($lang == 'en_utf8') {
$helpdir = $CFG->dirroot;
} else {
$helpdir = $CFG->dataroot;
}
$helpdir .= "/lang/$lang/help";
// Then which file in there we should be serving.
if ($module == 'moodle') {
$filepath = "$helpdir/$file";
} else {
$filepath = "$helpdir/$module/$file";
// If that does not exist, try a fallback into the module code folder.
if (!file_exists($filepath)) {
$filepath = "$CFG->dirroot/mod/$module/lang/$lang/help/$module/$file";
}
}
// Now, try to include the help text from this file, if we can.
if (file_exists_and_readable($filepath)) {
$helpfound = true;
@include($filepath); // The actual helpfile
// Now, we process some special cases.
if ($module == 'moodle' and ($file == 'index.html' or $file == 'mods.html')) {
include_help_for_each_module($file, $langs, $helpdir);
}
// The remaining horrible hardcoded special cases should be delegated to modules somehow.
if ($module == 'moodle' and ($file == 'resource/types.html')) { // RESOURCES
include_help_for_each_resource($file, $langs, $helpdir);
}
if ($module == 'moodle' and ($file == 'assignment/types.html')) { // ASSIGNMENTS
include_help_for_each_assignment_type();
}
// Having found some help, we break out of the loop over languages.
break;
}
}
} else {
// The help to display was given as an argument to this function.
echo '<p>'.s($text).'</p>'; // This param was already cleaned
$helpfound = true;
}
print_simple_box_end();
// Display an error if necessary.
if (!$helpfound) {
notify('Help file "'. $file .'" could not be found!');
}
// End of page.
close_window_button();
echo '<p align="center"><a href="help.php?file=index.html">'. get_string('helpindex') .'</a></p>';
$CFG->docroot = ''; // We don't want a doc link here
print_footer('none');
// Utility function =================================================================
function file_exists_and_readable($filepath) {
return file_exists($filepath) and is_file($filepath) and is_readable($filepath);
}
// Some functions for handling special cases ========================================
function include_help_for_each_module($file, $langs, $helpdir) {
global $CFG;
if (!$modules = get_records('modules', 'visible', 1)) {
error('No modules found!!'); // Should never happen
}
foreach ($modules as $mod) {
$strmodulename = get_string('modulename', $mod->name);
$modulebyname[$strmodulename] = $mod;
}
ksort($modulebyname);
foreach ($modulebyname as $mod) {
foreach ($langs as $lang) {
if (empty($lang)) {
continue;
}
if ($module == 'moodle') {
if ($lang == 'en_utf8') {
$filepath = $CFG->dirroot .'/lang/'. $lang .'/help/'. $file;
} else {
$filepath = $CFG->dataroot .'/lang/'. $lang .'/help/'. $file;
}
} else {
if ($lang == 'en_utf8') {
$filepath = $CFG->dirroot .'/lang/'. $lang .'/help/'. $module .'/'. $file;
} else {
$filepath = $CFG->dataroot .'/lang/'. $lang .'/help/'. $module .'/'. $file;
if (!file_exists($filepath)) {
$filepath = $CFG->dirroot .'/lang/en_utf8/help/'. $module .'/'. $file;
}
}
if (!file_exists($filepath)) {
$filepath = $CFG->dirroot.'/mod/'.$module.'/lang/'. $lang .'/help/'. $module .'/'. $file;
}
$filepath = "$helpdir/$mod->name/$file";
// If that does not exist, try a fallback into the module code folder.
if (!file_exists($filepath)) {
$filepath = "$CFG->dirroot/mod/$mod->name/lang/$lang/help/$mod->name/$file";
}
if (file_exists($filepath)) {
$helpfound = true;
include($filepath); // The actual helpfile
if ($module == 'moodle' and ($file == 'index.html' or $file == 'mods.html')) {
// include file for each module
if (!$modules = get_records('modules', 'visible', 1)) {
error('No modules found!!'); // Should never happen
}
foreach ($modules as $mod) {
$strmodulename = get_string('modulename', $mod->name);
$modulebyname[$strmodulename] = $mod;
}
ksort($modulebyname);
foreach ($modulebyname as $mod) {
foreach ($langs as $lang) {
if (empty($lang)) {
continue;
}
if ($lang == 'en_utf8') {
$filepath = $CFG->dirroot .'/lang/'. $lang .'/help/'. $mod->name .'/'. $file;
} else {
$filepath = $CFG->dataroot .'/lang/'. $lang .'/help/'. $mod->name .'/'. $file;
}
if (file_exists($filepath)) {
echo '<hr size="1" />';
include($filepath); // The actual helpfile
break;
}
}
}
}
// Some horrible hardcoded stuff follows, should be delegated to modules to handle
if ($module == 'moodle' and ($file == 'resource/types.html')) { // RESOURCES
require_once($CFG->dirroot .'/mod/resource/lib.php');
$typelist = resource_get_resource_types();
$typelist['label'] = get_string('resourcetypelabel', 'resource');
foreach ($typelist as $type => $name) {
foreach ($langs as $lang) {
if (empty($lang)) {
continue;
}
if ($lang == 'en_utf8') {
$filepath = $CFG->dirroot .'/lang/'. $lang .'/help/resource/type/'. $type .'.html';
} else {
$filepath = $CFG->dataroot .'/lang/'. $lang .'/help/resource/type/'. $type .'.html';
}
if (file_exists($filepath)) {
echo '<hr size="1" />';
include($filepath); // The actual helpfile
break;
}
}
}
}
if ($module == 'moodle' and ($file == 'assignment/types.html')) { // ASSIGNMENTS
require_once($CFG->dirroot .'/mod/assignment/lib.php');
$typelist = assignment_types();
foreach ($typelist as $type => $name) {
echo '<p><b>'.$name.'</b></p>';
echo get_string('help'.$type, 'assignment');
echo '<hr size="1" />';
}
}
break;
if (file_exists_and_readable($filepath)) {
echo '<hr size="1" />';
@include($filepath); // The actual helpfile
break; // Out of loop over languages.
}
}
} else {
echo '<p>'.s($text).'</p>'; // This param was already cleaned
$helpfound = true;
}
}
print_simple_box_end();
function include_help_for_each_resource($file, $langs, $helpdir) {
global $CFG;
if (!$helpfound) {
//$file = clean_text($file); // Keep it clean!
notify('Help file "'. $file .'" could not be found!');
require_once($CFG->dirroot .'/mod/resource/lib.php');
$typelist = resource_get_resource_types();
$typelist['label'] = get_string('resourcetypelabel', 'resource');
foreach ($typelist as $type => $name) {
foreach ($langs as $lang) {
if (empty($lang)) {
continue;
}
$filepath = "$helpdir/resource/type/$type.html";
if (file_exists_and_readable($filepath)) {
echo '<hr size="1" />';
@include($filepath); // The actual helpfile
break; // Out of loop over languages.
}
}
}
}
close_window_button();
function include_help_for_each_assignment_type() {
global $CFG;
echo '<p align="center"><a href="help.php?file=index.html">'. get_string('helpindex') .'</a></p>';
require_once($CFG->dirroot .'/mod/assignment/lib.php');
$typelist = assignment_types();
$CFG->docroot = ''; // We don't want a doc link here
print_footer('none');
foreach ($typelist as $type => $name) {
echo '<p><b>'.$name.'</b></p>';
echo get_string('help'.$type, 'assignment');
echo '<hr size="1" />';
}
}
?>
+20 -4
View File
@@ -119,7 +119,13 @@
}
}
foreach (explode(',',$CFG->frontpage) as $v) {
if (isloggedin() and !isguest() and isset($CFG->frontpageloggedin)) {
$frontpagelayout = $CFG->frontpageloggedin;
} else {
$frontpagelayout = $CFG->frontpage;
}
foreach (explode(',',$frontpagelayout) as $v) {
switch ($v) { /// Display the main part of the front page.
case strval(FRONTPAGENEWS):
if ($SITE->newsitems) { // Print forums only when needed
@@ -151,10 +157,11 @@
case FRONTPAGECOURSELIST:
if (isloggedin() && !isset($USER->admin) && empty($CFG->disablemycourses)) {
if (isloggedin() and !isadmin() and !isguest() and empty($CFG->disablemycourses)) {
print_heading_block(get_string('mycourses'));
print_my_moodle();
} else {
} else if ((!isadmin() and !isguest()) or (count_records('course') <= FRONTPAGECOURSELIMIT)) {
// admin should not see list of courses when there are too many of them
print_heading_block(get_string('availablecourses'));
print_courses(0, '100%', true);
}
@@ -164,7 +171,16 @@
print_heading_block(get_string('categories'));
print_simple_box_start('center', '100%', '', 5, 'categorybox');
print_whole_category_list();
print_whole_category_list(NULL, NULL, NULL, -1, false);
print_simple_box_end();
print_course_search('', false, 'short');
break;
case FRONTPAGECATEGORYCOMBO:
print_heading_block(get_string('categories'));
print_simple_box_start('center', '100%', '', 5, 'categorybox');
print_whole_category_list(NULL, NULL, NULL, -1, true);
print_simple_box_end();
print_course_search('', false, 'short');
break;
+75 -56
View File
@@ -9,138 +9,157 @@
/// File generated by cvs://contrib/lang2installer/installer_builder
/// using strings defined in installer_strings (same dir)
$string['admindirerror'] = 'Adresář správy (admin) není určen správně';
$string['admindirname'] = 'Adresář správy (admin)';
$string['admindirsettinghead'] = 'Nastavení adresáře \'admin\'';
$string['admindirerror'] = 'Adresář pro správu (admin) není zadán správně.';
$string['admindirname'] = 'Adresář pro správu (admin)';
$string['admindirsettinghead'] = 'Nastavování adresáře \'admin\'...';
$string['admindirsettingsub'] = 'Na některých serverech je URL adresa /admin vyhrazena pro speciální účely (např. pro ovládací panel). Na takových serverech může dojít ke kolizi se standardním umístěním stránek pro správu Moodlu. Máte-li tento problém, přejmenujte adresář \'admin\' ve vaší instalaci Moodlu a do tohoto pole zadejte jeho nový název. Příklad: <br /> <br /><b>moodleadmin</b><br /> <br />
Všechny generované odkazy na stránky správy Moodlu budou používat tento nový název.';
$string['bypassed'] = 'Přeskočeno';
$string['cannotcreatelangdir'] = 'Nelze vytvořit adresář pro jazykové soubory.';
$string['cannotcreatetempdir'] = 'Nelze vytvořit dočasný adresář.';
$string['cannotdownloadcomponents'] = 'Nelze stáhnout komponenty.';
$string['cannotdownloadzipfile'] = 'Nelze stáhnout soubor ZIP.';
$string['cannotfindcomponent'] = 'Komponenta nenalezena.';
$string['cannotsavemd5file'] = 'Nelze uložit soubor MD5.';
$string['cannotsavezipfile'] = 'Nelze uložit soubor ZIP.';
$string['cannotunzipfile'] = 'Nelze dekomprimovat soubor.';
$string['caution'] = 'Varování';
$string['check'] = 'Prověřit';
$string['chooselanguagehead'] = 'Vyberte jazyk';
$string['chooselanguagesub'] = 'Zvolte si jazyk použitý PŘI INSTALACI. Jazykové nastavení stránek budete moci nastavit později. ';
$string['chooselanguagesub'] = 'Zvolte si jazyk PRO INSTALOVÁNÍ. Jazyk pro stránky Moodlu a pro uživatele budete moci vybrat později.';
$string['closewindow'] = 'Zavřít toto okno';
$string['compatibilitysettingshead'] = 'Kontrola nastavení vašeho PHP...';
$string['compatibilitysettingssub'] = 'Pro správný běh Moodlu by váš server měl projít ve všech následujících testech';
$string['configfilenotwritten'] = 'Instalační skript nemohl automaticky vytvořit soubor config.php s vaší konfigurací - pravděpodobně z důvodů nastavení práv k zápisu do adresáře Moodle. Můžete ručně zkopírovat následující kód do souboru s názvem config.php v hlavním adresáři vaší instalace Moodle.';
$string['configfilewritten'] = 'config.php byl úspěšně vytvořen';
$string['compatibilitysettingshead'] = 'Kontrola nastavení PHP...';
$string['compatibilitysettingssub'] = 'Pro správný běh Moodlu by váš server měl vyhovět ve všech následujících testech.';
$string['componentisuptodate'] = 'Komponenta je aktuální.';
$string['configfilenotwritten'] = 'Instalačnímu skriptu se nepodařilo automaticky vytvořit soubor config.php s vaší konfigurací -- proces webového serveru zřejmě nemá právo zapisovat do adresáře s instalací Moodlu. Můžete ručně zkopírovat následující kód do souboru s názvem config.php a uložit jej do kořenového adresáře vaší instalace Moodlu.';
$string['configfilewritten'] = 'Soubor config.php byl úspěšně vytvořen.';
$string['configurationcompletehead'] = 'Konfigurace dokončena';
$string['configurationcompletesub'] = 'Moodle se pokusil uložit soubor s konfigurací do kořenového adresáře jeho instalace';
$string['configurationcompletesub'] = 'Moodle se pokusil uložit soubor s konfigurací do kořenového adresáře instalace Moodlu.';
$string['continue'] = 'Pokračovat';
$string['database'] = 'Databáze';
$string['databasecreationsettingshead'] = 'Nyní musíte nakonfigurovat spojení k databázi, kde si bude Moodle ukládat většinu svých dat. Tato databáze může být vytvořena instalátorem automaticky podle následujícího nastavení.<br/>';
$string['databasecreationsettingssub'] = '<b>Typ:</b>instalátor nastaví na \"mysql\"<br />
<b>Hostitel:</b>instalátor nastaví na \"localhost\"<br />
$string['databasecreationsettingshead'] = 'Nyní musíte nastavit připojení k databázi, kam si bude Moodle ukládat většinu svých dat. Tato databáze může být vytvořena instalátorem automaticky podle následujícího nastavení.';
$string['databasecreationsettingssub'] = '<b>Typ:</b> instalátor nastaví na \"mysql\"<br />
<b>Hostitel:</b> instalátor nastaví na \"localhost\"<br />
<b>Název:</b> název databáze, např. moodle<br />
<b>Uživatel:</b>instalátor nastaví na \"root\"<br />
<b>Uživatel:</b> instalátor nastaví na \"root\"<br />
<b>Heslo:</b> heslo k tomuto účtu<br />
<b>Předpona tabulek:</b> volitelná předpona, která se vloží před názvy všech tabulek (umožňuje t jednu databázi pro více instalací Moodlu)';
$string['databasesettingshead'] = 'Nyní musíte nakonfigurovat spojení k databázi, kde si bude Moodle ukládat většinu svých dat. Tato databáze musí již existovat, stejně jako musí být nastaveno uživatelské jméno a heslo pro přístup k ní.';
<b>Předpona tabulek:</b> volitelná předpona, která se vloží před názvy všech tabulek (umožňuje používat jednu databázi pro více instalací Moodlu)';
$string['databasesettingshead'] = 'Nyní musíte nastavit připojení k databázi, kam si bude Moodle ukládat většinu svých dat. Tato databáze již musí být vytvořena, stejně jako musí být nastaveno uživatelské jméno a heslo pro přístup k ní.';
$string['databasesettingssub'] = '<b>Typ:</b> mysql nebo postgres7<br />
<b>Hostitel:</b> např. localhost nebo db.naseskola.cz<br />
<b>Název:</b> název databáze, např. moodle<br />
<b>Uživatel:</b> uživatelské jméno účtu pro přístup k databázi<br />
<b>Heslo:</b> heslo k tomuto účtu<br />
<b>Předpona tabulek:</b> volitelná předpona, která se vloží před názvy všech tabulek (umožňuje t jednu databázi pro více instalací Moodle)';
<b>Předpona tabulek:</b> volitelná předpona, která se vloží před názvy všech tabulek (umožňuje používat jednu databázi pro více instalací Moodlu)';
$string['dataroot'] = 'Datový adresář';
$string['datarooterror'] = 'Vámi specifikovaný datový adresář nebyl nalezen a nemohl být vytvořen. Buď opravte vloženou cestu, nebo vytvořte adresář ručně.';
$string['dbconnectionerror'] = 'Nemůžu se spojit s databází, kterou jste specifikovali. Prosím, zkontrolujte nastavení databáze.';
$string['dbcreationerror'] = 'Chyba při vytváření databáze. Nelze vytvořit databázi daného jména s poskytnutým nastavením';
$string['datarooterror'] = 'Zadaný datový adresář se nepodařilo nalézt nebo vytvořit. Buď opravte zadanou cestu, nebo vytvořte adresář ručně.';
$string['dbconnectionerror'] = 'Nepodařilo se připojit k databázi, kterou jste zadali. Zkontrolujte prosím nastavení databáze.';
$string['dbcreationerror'] = 'Chyba při vytváření databáze. Nelze vytvořit databázi zadaného jména a nastavení.';
$string['dbhost'] = 'Hostitelský server';
$string['dbprefix'] = 'Předpona tabulek';
$string['dbtype'] = 'Typ';
$string['dbwrongencoding'] = 'Podle detekce běží vybraná databáze pod nedoporučeným kódováním $a. Bylo by lepší používat databázi s kodováním Unicode (UTF-8). Tuto kontrolu můžete přeskočit zaškrtnutím pole \"Přeskočit test DB kódování\", ale můžete se v budoucnu dostat do problémů.';
$string['directorysettingshead'] = 'Prosím, potvrďte umístění této Moodle instalace';
$string['directorysettingssub'] = '<b>Webová adresa:</b>
Určete úplnou webovou adresu, na niž bude váš Moodle dostupný. Jsou-li vaše stránky dostupné přes více URL, vyberte z nich tu, kterou budou používat vaši studenti. Na konci adresy nevkládejte lomítko.
$string['dbwrongencoding'] = 'Vybraná databáze používá nedoporučené kódování $a. Vhodnější by bylo používat databázi s kódováním Unicode (UTF-8). Tuto kontrolu můžete přeskočit zaškrtnutím pole \"Přeskočit test kódování DB\", můžete však v budoucnu narazit na problémy.';
$string['directorysettingshead'] = 'Potvrďte prosím adresy této instalace Moodlu.';
$string['directorysettingssub'] = '<b>Webová adresa</b>:
zadejte úplnou webovou adresu, na níž bude Moodle dostupný. Jsou-li vaše stránky dostupné na více URL, vyberte z nich tu, kterou budou vaši studenti používat nejčastěji. Na konci adresy neuvádějte lomítko.
<br />
<br />
<b>Moodle adresář:</b>
Určtete úplnou cestu k adresáři s touto instalací. Ujistěte se, že vám odpovídají malá/VELKÁ písmena.
<b>Adresář Moodlu</b>:
zadejte úplnou cestu k adresáři s touto instalací. Ujistěte se, že jsou v ní správně uvedena malá/VELKÁ písmena.
<br />
<br />
<b>Datový adresář:</b>
Je třeba mít diskový prostor, kam může Moodle ukládat nahrané (uploadované) soubory. K tomuto adresáři musí mít proces webového serveru právo ke čtení I ZÁPISU (webový server bývá spouštěn pod uživatelem \'nobody\' nebo \'apache\' nebo něco podobného). Tento adresář by neměl být dostupný přímo přes webové rozhraní (může obsahovat neveřejná data).';
$string['dirroot'] = 'Moodle adresář';
$string['dirrooterror'] = 'Hodnota \'Moodle adresář\' nevypadá nastavená správně - nemůžu tam najít Moodle instalaci. Následující hodnota byla resetována.';
<b>Datový adresář</b>:
potřebujete diskový prostor, kam bude Moodle ukládat nahrané (uploadované) soubory. K tomuto adresáři musí mít proces webového serveru právo ke čtení I ZÁPISU (webový server bývá spouštěn pod uživatelem \'nobody\' nebo \'apache\' nebo podobně). Tento adresář by ale zároveň neměl být dostupný přímo přes webové rozhraní (může obsahovat neveřejná data).';
$string['dirroot'] = 'Adresář Moodlu';
$string['dirrooterror'] = 'Parametr \'Adresář Moodlu\' je zřejmě nastaven nesprávně -- v zadaném umístění se nepodařilo najít instalaci Moodlu. Ve formuláři níže byla automaticky nastavena výchozí hodnota.';
$string['download'] = 'Stáhnout';
$string['downloadedfilecheckfailed'] = 'Kontrola staženého souboru dopadla negativně';
$string['downloadlanguagebutton'] = 'Stáhnout jazykový balíček \"$a\"';
$string['downloadlanguagehead'] = 'Stáhnout jazykový balíček';
$string['downloadlanguagenotneeded'] = 'V instalaci lze nyní pokračovat v jazyce \"$a\".';
$string['downloadlanguagesub'] = 'Nyní máte možnost stáhnout si některý z jazykových balíčků Moodlu a pokračovat v tomto jazyce.<br /><br />Pokud si momentálně nemůžete nebo nechcete stáhnout jazykový balíček, bude instalační proces pokračovat v angličtině. Jazykové balíčky si budete moci stáhnout i později po ukončení instalace.';
$string['environmenterrortodo'] = 'Pro pokračování v instalaci této verze Moodlu je nutné nejdříve vyřešit problémy v programovém prostředí (chyby) serveru uvedené výše!';
$string['environmenthead'] = 'Kontrola vašeho prostředí...';
$string['environmenthead'] = 'Kontrola programového prostředí...';
$string['environmentrecommendinstall'] = 'doporučená komponenta';
$string['environmentrecommendversion'] = 'doporučena je verze $a->needed, nyní používáte verzi $a->current';
$string['environmentrequireinstall'] = 'vyžadovaná komponenta';
$string['environmentrequireversion'] = 'vyžadována je verze $a->needed, nyní používáte verzi $a->current';
$string['environmentsub'] = 'Prověřujeme nyní různé komponenty vašeho systému, zda splňují požadavky instalace';
$string['environmentsub'] = 'Nyní se prověřuje, zda vybrané komponenty vašeho systému splňují požadavky instalace.';
$string['environmentxmlerror'] = 'Chyba při zjišťování údajů o programovém prostředí ($a->error_code)';
$string['error'] = 'Chyba';
$string['fail'] = 'Selhalo';
$string['fileuploads'] = 'Nahrané soubory (uploads)';
$string['fileuploads'] = 'Nahrávání souborů (FIle Uploads)';
$string['fileuploadserror'] = 'Mělo by být zapnuto';
$string['gdversion'] = 'Verze GD';
$string['gdversionerror'] = 'Knihovna GD je potřebná ke zpracovávání a tvorbě obrázků (např. fotografie, grafy apod.)';
$string['gdversionerror'] = 'Knihovna GD se používá pro zpracovávání a tvorbu obrázků (např. fotografií, grafů apod.).';
$string['globalsquotes'] = 'Nezabezpečené zacházení s globálními proměnnými';
$string['globalsquoteserror'] = 'Upravte nastavení PHP: zakažte register_globals a/nebo povolte magic_quotes_gpc';
$string['help'] = 'Nápověda';
$string['iconvrecommended'] = 'Instalace volitelné knihovny ICONV je silně doporučena, neboť zvyšuje výkon stránek, zejména pokud používáte jazyky nezaložené na latince.';
$string['info'] = 'Informace';
$string['installation'] = 'Instalace';
$string['invalidmd5'] = 'Neplatný MD5 hash';
$string['langdownloaderror'] = 'Bohužel, jazyk \"$a\" se nepodařilo nainstalovat. Instalace bude pokračovat v angličtine.';
$string['langdownloadok'] = 'Úspěšně se podařilo nainstalovat jazykový balíček \"$a\". Instalace bude pokračovat v tomto jazyce.';
$string['langdownloadok'] = 'Podařilo se úspěšně nainstalovat jazykový balíček \"$a\". Instalace bude pokračovat v tomto jazyce.';
$string['language'] = 'Jazyk';
$string['magicquotesruntime'] = 'Magic Quotes Run Time';
$string['magicquotesruntimeerror'] = 'Mělo by být vypnuto';
$string['mbstringrecommended'] = 'Instalace volitelné knihovny MBSTRING je silně doporučena, neboť zvyšuje výkon stránek, zejména pokud používáte jazyky nezaložené na latince.';
$string['memorylimit'] = 'Limit paměti';
$string['memorylimiterror'] = 'Limit paměti pro PHP skripty je nastaven relativně nízko ... později vás to může stát problémy.';
$string['memorylimiterror'] = 'Limit paměti pro PHP skripty je nastaven relativně nízko ... v budoucnu byste mohli narazit na problémy.';
$string['memorylimithelp'] = '<p>Limit paměti pro PHP skripty je na vašem serveru momentálně nastaven na hodnotu $a.</p>
<p>Toto může později způsobovat Moodlu problémy, zvláště při větším množství modulů a/nebo uživatelů.</p>
<p>To může později způsobovat Moodlu problémy, zvláště při větším množství modulů a/nebo uživatelů.</p>
<p>Je-li to možné, doporučujeme vám nakonfigurovat PHP s vyšším limitem - např. 16M. Je několik způsobů, které můžete zkusit:
<p>Je-li to možné, doporučujeme vám nastavit v PHP vyšší limit, např. 16M. Můžete to provést několika způsoby:
<ol>
<li>Můžete-li, překompilujte PHP s volbou <i>--enable-memory-limit</i>.
Toto umožní Moodlu nastavit si pro sebe požadovaný limit.</li>
<li>Máte-li přístup k vašemu souboru php.ini, změňte nastavení <b>memory_limit</b>
na hodnotu blízkou 16M. Nemáte-li taková práva, požádejte vašeho správce webového serveru, aby to pro vás udělal.</li>
<li>Na některých PHP serverech můžete v Moodle adresáři vytvořit soubor .htaccess s následujícím řádkem:
Moodle si tak bude sám moci nastavit potřebný limit.</li>
<li>Máte-li přístup k souboru php.ini, změňte nastavení <b>memory_limit</b>
na hodnotu blízkou 16M. Nemáte-li taková práva, požádejte správce vašeho webového serveru, aby toto nastavení provedl on.</li>
<li>Na některých serverech můžete v kořenovém adresáři Moodlu vytvořit soubor .htaccess s následujícím řádkem:
<p><blockquote>php_value memory_limit 16M</blockquote></p>
<p>Bohužel, na některých serverech tímto vyřadíte z provozu <b>všechny</b> PHP stránky (při jejich prohlížení uvidíte chybové zprávy), takže budete muset soubor .htaccess odstranit.</li>
<p>Bohužel, v některých případech tím vyřadíte z provozu <b>všechny</b> PHP stránky (při jejich prohlížení uvidíte chybová hlášení), takže budete muset soubor .htaccess zase odstranit.</li>
</ol>';
$string['missingrequiredfield'] = 'Chybí některé z povinných polí';
$string['mysql416bypassed'] = 'Pokud ovšem ve vaší instalaci Moodlu používáte POUZE jazyky založené na latince (iso-8859-1), můžete nadále používat momentálně nainstalovanou verzi MySQL 4.1.12 (nebo vyšší).';
$string['mysql416required'] = 'Minimální verzí požadovanou pro Moodle 1.6 -- a pro pozdější bezpečný převod všech dat do UTF-8 -- je MySQL 4.1.16.';
$string['mysqlextensionisnotpresentinphp'] = 'PHP nebylo korektně nakonfigurováno pro komunikaci v MySQL. Zkontrolujte váš php.ini nebo překompilujte PHP.';
$string['name'] = 'Název';
$string['next'] = 'Další';
$string['ok'] = 'OK';
$string['pass'] = 'Prošlo';
$string['pass'] = 'V pořádku';
$string['password'] = 'Heslo';
$string['php50restricted'] = 'V PHP 5.0.x bylo nalezeno množství chyb; přejděte buď na vyšší verzi 5.1.x, nebo na nižší verzi 4.3.x či 4.4.x.';
$string['phpversion'] = 'Verze PHP';
$string['phpversionerror'] = 'Verze PHP musí být alespoň 4.1.0 nebo vyšší';
$string['phpversionhelp'] = '<p>Moodle vyžaduje verzi PHP alespoň 4.1.0.</p>
<p>Vaše stávající PHP verzi $a</p>
<p>Musíte upgradovat vaše PHP nebo Moodle nainstalovat na hostitele s vyšší verzí!</p>';
$string['phpversionerror'] = 'Verze PHP musí být alespoň 4.3.0 nebo 5.1.0 (PHP 5.0.x obsahuje množství chyb).';
$string['phpversionhelp'] = '<p>Moodle vyžaduje PHP alespoň verze 4.3.0 nebo 5.1.0 (PHP 5.0.x obsahuje množství chyb).</p>
<p>Nyní používáte PHP verze $a.</p>
<p>Musíte PHP upgradovat, nebo přejít k hostiteli s vyšší verzí!<br />
(U PHP 5.0.x můžete také přejít na nižší verzi 4.4.x či 4.3.x.)</p>';
$string['previous'] = 'Předchozí';
$string['report'] = 'Report';
$string['safemode'] = 'Bezpečný režim (safe mode)';
$string['safemodeerror'] = 'Moodle může mít problémy při zapnutém bezpečném režimu (safe mode)';
$string['remotedownloadnotallowed'] = 'Stahování komponent na server není povoleno (direktiva allow_url_fopen je ve stavu \'vypnuto\').<br /><br />Musíte soubor stáhnout <a href=\"$a->url\">$a->url</a> ručně, zkopírovat jej na serveru do umístění \"$a->dest\" a tam jej dekomprimovat.';
$string['report'] = 'Protokol';
$string['restricted'] = 'Nedostupné';
$string['safemode'] = 'Bezpečný režim (Safe Mode)';
$string['safemodeerror'] = 'Se zapnutým bezpečným režimem (Safe Mode) může mít Moodle problémy.';
$string['sessionautostart'] = 'Session Auto Start';
$string['sessionautostarterror'] = 'Mělo by být vypnuto';
$string['skipdbencodingtest'] = 'Přeskočit test DB kódování';
$string['skipdbencodingtest'] = 'Přeskočit test kódování DB';
$string['status'] = 'Stav';
$string['thischarset'] = 'UTF-8';
$string['thislanguage'] = 'Čeština';
$string['user'] = 'Uživatel';
$string['welcomep10'] = '$a->installername ($a->installerversion)';
$string['welcomep20'] = 'Pakliže vidíte tuto stránku, podařilo se vám úspěšně nainstalovat a spustit balíček <strong>$a->packname $a->packversion</strong>. Gratulujeme!';
$string['welcomep20'] = 'Podařilo se vám úspěšně nainstalovat a spustit balíček <strong>$a->packname $a->packversion</strong>. Gratulujeme!';
$string['welcomep30'] = '<strong>$a->installername</strong> obsahuje aplikace k vytvoření prostředí, ve kterém bude provozován váš <strong>Moodle</strong>. Jmenovitě se jedná o:';
$string['welcomep40'] = 'Balíček rovněž obsahuje <strong>Moodle ve verzi $a->moodlerelease ($a->moodleversion)</strong>.';
$string['welcomep50'] = 'Použití všech aplikací v tomto balíčku je vázáno jejich příslušnými licencemi. Kompletní balíček <strong>$a->installername</strong> je software s <a href=\"http://www.opensource.org/docs/definition_plain.html\"> otevřeným kódem (open source)</a> a je šířen pod licencí <a href=\"http://www.gnu.org/copyleft/gpl.html\">GNU/GPL</a>.';
$string['welcomep60'] = 'Následující stránky vás provedou skrze několik jednoduchých kroků potřebných k rozběhnutí <strong>Moodle</strong> na vašem počítači. Můžete přijmout výchozí nastavení, nebo si jej případně upravit podle svých potřeb.';
$string['welcomep70'] = 'Stisknutím následujícího tlačítka \"Další\" pokračujte v nastavení vaší instalace Moodlu.';
$string['welcomep50'] = 'Použití všech aplikací v tomto balíčku je vázáno jejich příslušnými licencemi. Kompletní balíček <strong>$a->installername</strong> je software s <a href=\"http://www.opensource.org/docs/definition_plain.html\"> otevřeným kódem (open source)</a> a je šířen pod licencí <a href=\"http://www.gnu.org/copyleft/gpl.html\">GPL</a>.';
$string['welcomep60'] = 'Následující stránky vás v několik jednoduchých krocích nastavením <strong>Moodlu</strong> na vašem počítači. Můžete přijmout výchozí nastavení, nebo si je upravit podle svých potřeb.';
$string['welcomep70'] = 'Stisknutím níže uvedeného tlačítka \"Další\" pokračujte v nastavení vaší instalace Moodlu.';
$string['wrongdestpath'] = 'Chybné cílové umístění';
$string['wrongsourcebase'] = 'Chybné URL zdrojového serveru';
$string['wrongzipfilename'] = 'Chybné jméno souboru ZIP';
$string['wwwroot'] = 'Webová adresa';
$string['wwwrooterror'] = 'Toto nevypadá jako platná webová adresa této instalace Moodle.';
$string['wwwrooterror'] = 'Parametr \'Webová adresa\' je zřejmě nastaven nesprávně -- v zadaném umístění se nepodařilo najít instalaci Moodlu. Ve formuláři níže byla automaticky nastavena výchozí hodnota.';
?>
+44 -41
View File
@@ -11,13 +11,13 @@
$string['admindirerror'] = 'Das angegebene Admin-Verzeichnis ist falsch.';
$string['admindirname'] = 'Name für das Admin-Verzeichnis';
$string['admindirsettinghead'] = 'admin-Verzeichnis festlegen ...';
$string['admindirsettingsub'] = 'Einige wenige Webhosting-Anbieter benutzen /admin als spezielles Verzeichnis für den Zugang zum Administrationstool oder andere Dinge. Leider kommt es dadurch zu Konflikten mit dem Standard für das Administrationsverzeichnis von moodle. Sie können dies ändern, indem Sie das admin-Verzeichnis in der moodle-Installation umbenennen. Den gewählten Namen dieses Verzeichnisses müssen Sie hier eingeben.
$string['admindirsettinghead'] = 'Admin-Verzeichnis festlegen ...';
$string['admindirsettingsub'] = 'Einige wenige Webhosting-Anbieter benutzen /admin als spezielles Verzeichnis für den Zugang zum Administrationstool oder andere Dinge. Leider kommt es dadurch zu Konflikten mit dem Standard für das Administrationsverzeichnis von Moodle. Sie können dies ändern, indem Sie das admin-Verzeichnis in der Moodle-Installation umbenennen. Den gewählten Namen dieses Verzeichnisses müssen Sie hier eingeben.
Zum Beispiel: <br /> <br /><b>moodleadmin</b><br />
Dies ändert die Links für das Admin-Verzeichnis in moodle.';
Dies ändert die Links für das Admin-Verzeichnis in Moodle.';
$string['bypassed'] = 'Uberbrückt';
$string['cannotcreatelangdir'] = 'lang-Verzeichnis kann nicht angelegt werden.';
$string['cannotcreatetempdir'] = 'Temporäres Verzeichnis kann nicht angelegt werden.';
$string['cannotcreatelangdir'] = 'Das Verzeichnis lang kann nicht angelegt werden.';
$string['cannotcreatetempdir'] = 'Das Verzeichnis temp kann nicht angelegt werden.';
$string['cannotdownloadcomponents'] = 'Komponenten können nicht heruntergeladen werden.';
$string['cannotdownloadzipfile'] = 'ZIP-Datei kann nicht heruntergeladen werden.';
$string['cannotfindcomponent'] = 'Komponente wurde nicht gefunden.';
@@ -26,29 +26,29 @@ $string['cannotsavezipfile'] = 'ZIP-Datei konnte nicht gespeichert werden';
$string['cannotunzipfile'] = 'Datei konnte nicht entpackt werden.';
$string['caution'] = 'Warnung';
$string['check'] = 'Prüfen';
$string['chooselanguagehead'] = 'Einige wenige Webhosting-Anbieter benutzen /admin als spezielles Verzeichnis für den Zugang zum Administrationstool oder andere Dinge. Leider kommt es dadurch zu Konflikten mit dem Standard für das Administrationsverzeichnis von moodle. Sie können dies ändern, indem Sie das admin-Verzeichnis in der moodle-Installation umbenennen. Den gewählten Namen dieses Verzeichnisses müssen Sie hier eingeben.';
$string['chooselanguagehead'] = 'Einige wenige Webhosting-Anbieter benutzen /admin als spezielles Verzeichnis für den Zugang zum Administrationstool oder andere Dinge. Leider kommt es dadurch zu Konflikten mit dem Standard für das Administrationsverzeichnis von Moodle. Sie können dies ändern, indem Sie das admin-Verzeichnis in der Moodle-Installation umbenennen. Den gewählten Namen dieses Verzeichnisses müssen Sie hier eingeben.';
$string['chooselanguagesub'] = 'Wählen Sie eine Sprache die Sie während der Installation verwenden wollen. Nach der Installation können Sie die Sprache für die Oberfläche und die Nutzer/innen festlegen.';
$string['closewindow'] = 'Dieses Fenster schließen';
$string['compatibilitysettingshead'] = 'Prüfung Ihrer PHP- Einstellungen ...';
$string['compatibilitysettingssub'] = 'Alle Tests sollten vom Server bestätigt werden, damit moodle später reibungslos laufen kann.';
$string['compatibilitysettingssub'] = 'Alle Tests sollten vom Server bestätigt werden, damit Moodle später reibungslos laufen kann.';
$string['componentisuptodate'] = 'Die Komponente ist nicht aktuell.';
$string['configfilenotwritten'] = 'Ds Installationsscript kann die Datei config.php, welche die gewählten Einstellungen enthält, nicht automatisch erstellen, weil der web-user keine Schreibrechte für das moodle-Verzeichnis hat. Sie können den folgenden Code manuell in einer Datei config.php speichern und diese ins moodle- Hauptverzeichnis kopieren.';
$string['configfilenotwritten'] = 'Ds Installationsscript kann die Datei config.php, welche die gewählten Einstellungen enthält, nicht automatisch erstellen, weil der web-user keine Schreibrechte für das Moodle-Verzeichnis hat. Sie können den folgenden Code manuell in einer Datei config.php speichern und diese ins Moodle- Hauptverzeichnis kopieren.';
$string['configfilewritten'] = 'Die Datei config.php wurde erfolgreich erstellt';
$string['configurationcompletehead'] = 'Die Konfiguration ist abgeschlossen.';
$string['configurationcompletesub'] = 'moodle speichert Ihre Konfigurationseinstellungen nun im root-Verzeichnis Ihrer moodle-Installation.';
$string['configurationcompletesub'] = 'Moodle speichert Ihre Konfigurationseinstellungen nun im root-Verzeichnis Ihrer Moodle-Installation.';
$string['continue'] = 'Weiter';
$string['database'] = 'Datenbank';
$string['databasecreationsettingshead'] = 'Sie müssen nun die Einstellungen für die Datenbank, in der die meisten moodle-Daten abgelegt werden, konfigurieren. Der Istallationsprozess erstellt die Datenbanktabellen automatisch auf der Grundlage der Einstellungen.';
$string['databasecreationsettingshead'] = 'Sie müssen nun die Einstellungen für die Datenbank, in der die meisten Moodle-Daten abgelegt werden, konfigurieren. Der Istallationsprozess erstellt die Datenbanktabellen automatisch auf der Grundlage der Einstellungen.';
$string['databasecreationsettingssub'] = '<b>Typ:</b> \"mysql\" vom Installer festgelegt<br />
<b>Host:</b> \"localhost\" vom Installer festgelegt<br />
<b>Name:</b> Datenbankname, z.B. moodle<br />
<b>User:</b> \"root\" vom Installer festgelegt<br />
<b>Password:</b> Ihr Datenbankpasswort<br />
<b>Tables Prefix:</b> optionaler Prefix für alle Tabellennamen';
$string['databasesettingshead'] = 'Sie müssen nun die Einstellungen für die Datenbank, in der die meisten moodle-Daten abgelegt werden, konfigurieren. Die Datenbank muß bereits mit Nutzernamen und Passwort angelegt worden sein, um auf sie zugreifen zu können.';
$string['databasesettingshead'] = 'Sie müssen nun die Einstellungen für die Datenbank, in der die meisten Moodle-Daten abgelegt werden, konfigurieren. Die Datenbank muss bereits mit Nutzernamen und Passwort angelegt worden sein, um auf sie zugreifen zu können.';
$string['databasesettingssub'] = '<b>Typ:</b> mysql oder postgres7<br />
<b>Host:</b> z.B. localhost oder db.isp.com<br />
<b>Name:</b> Datenbankname, Z.B. moodle<br />
<b>Name:</b> Datenbankname, z.B. moodle<br />
<b>Nutzer:</b> Ihr Benutzername für die Datenbank<br />
<b>Passwort:</b> Ihr Passwort für die Datenbank<br />
<b>Tabellen Prefix:</b> optionaler Prefix, der für aller Tabellen genutzt wird ';
@@ -60,38 +60,38 @@ $string['dbhost'] = 'Name des Datenbankservers';
$string['dbprefix'] = 'Prefix für alle Tabellen';
$string['dbtype'] = 'Datenbankart';
$string['dbwrongencoding'] = 'Die ausgewählte Datenbank läuft unter einem nicht empfohlenen Zeichensatz. Es wäre besser wenn Sie eine Unicode (UTF-8) basierte Datenbank verwenden würden. Sie haben die Möglichkeit diesen Schritt zu überspringen. Vermutlch wirddies später bei der Nutzung aber zu Problemen führen.';
$string['directorysettingshead'] = 'Bestätigen Sie bitte die Verzeichniseinträge für Ihre moodle-Installation';
$string['directorysettingshead'] = 'Bestätigen Sie bitte die Verzeichniseinträge für Ihre Moodle-Installation';
$string['directorysettingssub'] = '<b>URL Adresse:</b>
Geben Sie hier die vollständige URL für Ihre Moodle Installation an. Sollte Ihre Seite über mehrere Adressen erreichbar sein, geben Sie die Adresse an, die am häufigsten genutzt wird. Bitte geben Sie am Ende kein Backslash ein.<br/><br/>
Geben Sie hier die vollständige URL für Ihre Moodle Installation an. Sollte Ihre Seite über mehrere Adressen erreichbar sein, geben Sie die Adresse an, die am häufigsten genutzt wird. Bitte geben Sie am Ende kein Backslash ein.<br /><br />
<b>Moodle Verzeichnis:</b>
Geben Sie den absoluten Pfad für Ihre Moodle Installation an. Bitte beachten Sie ob Gross- und Kleinschreibung korrekt ist.<br/><br/>
Geben Sie den absoluten Pfad für Ihre Moodle Installation an. Bitte beachten Sie, ob die Groß- und Kleinschreibung korrekt ist.<br /><br />
<b>Datenverzeichnis:</b>
Moodle benötigt ein Verzeichnis, indem hochgeladene Dateien abgelegt werden. Dieses Verzeichnis muss Lese- und Schreibrechte für den
Webuser des Servers haben. (üblicherweise \'nobody\' or \'apache\'), aber es sollte nicht direkt über das Internet erreichbar sein.';
$string['dirroot'] = 'Moodle Verzeichnis';
$string['dirrooterror'] = 'Die Einstellungen für das Moodle-Verzeichnis sind nicht korrekt. Es wurde keine Moodle Installation gefunden. Die anderen Werte wurden gelöscht.';
$string['dirroot'] = 'Moodle-Verzeichnis';
$string['dirrooterror'] = 'Die Einstellungen für das Moodle-Verzeichnis sind nicht korrekt. Es wurde keine Moodle-Installation gefunden. Die anderen Werte wurden gelöscht.';
$string['download'] = 'Herunterladen';
$string['downloadedfilecheckfailed'] = 'Prüfung der heruntergeladenen Datei ist gescheitert';
$string['downloadlanguagebutton'] = 'Download des \"$a\" Sprachpakets';
$string['downloadlanguagehead'] = 'Download der Sprachpakete';
$string['downloadlanguagenotneeded'] = 'Sie können die Installation mit dem Sprachpaket \"$a\" fortsetzen.';
$string['downloadlanguagesub'] = 'Sie haben nun die Möglichkeit ein Sprachpaket herunterzuladen und den Installationsprozess mit dieser Sprache fortzusetzen. <br/><br/> Falls sie keinen Download durchführen können, wird die Installation auf Englisch fortgeführt. (Wenn die Installation abgeschlossen ist, haben Sie die Option weitere Sprachpakete herunterzuladen.)';
$string['environmenterrortodo'] = 'Sie müssen zunächst alle Probleme mit Einstellungen des Servers beheben, bevor Sie mit der Installation von moodle fortfahren können.';
$string['downloadlanguagesub'] = 'Sie haben nun die Möglichkeit ein Sprachpaket herunterzuladen und den Installationsprozess mit dieser Sprache fortzusetzen. <br /><br /> Falls sie keinen Download durchführen können, wird die Installation auf Englisch fortgeführt. (Wenn die Installation abgeschlossen ist, haben Sie die Option weitere Sprachpakete herunterzuladen.)';
$string['environmenterrortodo'] = 'Sie müssen zunächst alle Probleme mit Einstellungen des Servers beheben, bevor Sie mit der Installation von Moodle fortfahren können.';
$string['environmenthead'] = 'Prüfung der Installationsvoraussetzungen';
$string['environmentrecommendinstall'] = 'sollte installiert bzw. aktiviert werden';
$string['environmentrecommendversion'] = 'Version $a->needed wird empfohlen. Derzeit ist $a->current installiert.';
$string['environmentrequireinstall'] = 'muß installiert /aktiviert werden.';
$string['environmentrequireversion'] = 'Version $a->needed muß installiert werden. Derzeit ist $a->current installiert.';
$string['environmentrequireinstall'] = 'muss installiert /aktiviert werden.';
$string['environmentrequireversion'] = 'Version $a->needed muss installiert werden. Derzeit ist $a->current installiert.';
$string['environmentsub'] = 'Wir prüfen nun, ob die verschiedenen Komponenten Ihres Systems die Installationsanforderungen erfüllen.';
$string['environmentxmlerror'] = 'Beim Auslesen der Einstellungen auf dem Server ist ein Fehler aufgetreten ($a->error_code)';
$string['error'] = 'Fehler';
$string['fail'] = 'Fehlgeschlagen';
$string['fileuploads'] = 'Dateien hochladen';
$string['fileuploadserror'] = 'Dies sollte auf \'on\' stehen';
$string['gdversion'] = 'GD Version';
$string['gdversionerror'] = 'Die GD Bibliothek sollte verfügbar sein, um Bilder zu erzeugen und anzuzeigen.';
$string['gdversion'] = 'GD-Version';
$string['gdversionerror'] = 'Die GD-Bibliothek sollte verfügbar sein, um Bilder zu erzeugen und anzuzeigen.';
$string['globalsquotes'] = 'Unsichere Einstellung von Globals';
$string['globalsquoteserror'] = 'Prüfen Sie die PHP-Einstellungen: deaktivieren Sie register_globals und/oder aktivieren Sie magic_quotes_gpc';
$string['help'] = 'Hilfe';
@@ -106,19 +106,19 @@ $string['magicquotesruntime'] = 'Magic Quotes Run Time';
$string['magicquotesruntimeerror'] = 'Dies sollte ausgeschaltet sein (\'off\')';
$string['mbstringrecommended'] = 'Die Installation der MBSTRING Bibliothek wird zur Leistungsverbesserung dringend empfohlen. Dies ist besonders wichtig wenn Sie Sprachen mit anderen als lateinischen Zeichensätzen verwenden.';
$string['memorylimit'] = 'Memory Limit';
$string['memorylimiterror'] = 'Die Speichereinstellung PHP memory limit ist zu niedrig. Es wird bei der künftigen Nutzung vermutlich zu Problemen kommen.';
$string['memorylimithelp'] = '<p>Die Einstellung der PHP memory limit für Ihren Server ist zur Zeit auf $a eingestellt. </p>
<p>Dies wird vermutlich zu Problemen führen wenn Sie moodle mit vielen Aktivitäten oder vielen Nutzer/innen verwenden. </p>
$string['memorylimiterror'] = 'Die Speichereinstellung PHP memory_limit ist zu niedrig. Es wird bei der künftigen Nutzung vermutlich zu Problemen kommen.';
$string['memorylimithelp'] = '<p>Die Einstellung der PHP memory_limit für Ihren Server ist zur Zeit auf $a eingestellt. </p>
<p>Dies wird vermutlich zu Problemen führen wenn Sie Moodle mit vielen Aktivitäten oder vielen Nutzer/innen verwenden. </p>
<p>Wir empfehlen die Einstellung zu erhöhen. Empfohlen werden 16M oder mehr. Dies können Sie auf verschiedene Arten machen:</p>
<ol>
<li>Wenn Sie PHP neu kompilieren können, nehmen Sie die Einstellung <i>--enable-memory-limit</i>. Dann kann moodle die Einstellung selber vornehmen.
<li>Wenn Sie PHP neu kompilieren können, nehmen Sie die Einstellung <i>--enable-memory-limit</i>. Dann kann Moodle die Einstellung selber vornehmen.
<li>Wenn Sie Zugriff auf die Datei php.ini haben, können Sie die Einstellung <b>memory_limit</b> selber auf z.B. 16M anpassen. Wenn Sie selber keinen Zugriff haben, fragen Sie den/die Administrator/in, dies für Sie zu tun.
<li>Auf einigen PHP-Servern können Sie eine .htaccess-Datei im moodle-Verzeichnis einrichten. Tragen Sie darin die folgende Zeile ein: <p><blockquote>php_value memory_limit 16M</blockquote></p>
<li>Auf einigen PHP-Servern können Sie eine .htaccess-Datei im Moodle-Verzeichnis einrichten. Tragen Sie darin die folgende Zeile ein: <p><blockquote>php_value memory_limit 16M</blockquote></p>
<p>Achtung: auf einigen Servern hindert diese Einstellung <b>alle</b> PHP-Seiten und Sie erhalten Fehlermeldungen. Entfernen Sie dann den Eintrag in der .htaccess-Datei wieder.</p></li>
</ol>';
$string['missingrequiredfield'] = 'Einige erforderliche Felder sind nicht ausgefüllt.';
$string['mysql416bypassed'] = 'Wenn Sie auf Ihrer Site NUR iso-8859-1 (lateinische) Sprachen verwenden, können Sied ie derzeitige MySQL-Version 4.1.12 (oder höher) verwenden.';
$string['mysql416required'] = 'MySQL 4.1.16 odereine höhere Version ist für moodle 1.6 unbedingt erforderlich, um sicher zu stellen, dass alle Daten künftig nach UTF-8 konvertiert werden können.';
$string['mysql416required'] = 'MySQL 4.1.16 odereine höhere Version ist für Moodle 1.6 unbedingt erforderlich, um sicher zu stellen, dass alle Daten künftig nach UTF-8 konvertiert werden können.';
$string['mysqlextensionisnotpresentinphp'] = 'PHP wurde noch nicht richtig für diese MySQL Erweiterung konfiguriert. Daher kann es nicht mit MySQL kommunizieren. Prüfen Sie bitte die php.ini-Einstellungen oder kompilieren Sie PHP neu.';
$string['name'] = 'Name';
$string['next'] = 'Nächste';
@@ -126,18 +126,21 @@ $string['ok'] = 'OK';
$string['parentlanguage'] = 'en_utf8';
$string['pass'] = 'Durchgang';
$string['password'] = 'Kennwort';
$string['phpversion'] = 'PHP Version';
$string['phpversionerror'] = 'PHP muss mindestens in der Version 4.1.0 installiert sein.';
$string['phpversionhelp'] = '<p>moodle erwartet PHP mit der Version 4.1.0 oderhöher.</p>
$string['php50restricted'] = 'PHP 5.0.x hat eine Zahl von bekannten Fehlern Sie können die Versionen 5.1.x bzw. 4.3.x oder 4.4.x benutzen';
$string['phpversion'] = 'PHP-Version';
$string['phpversionerror'] = 'PHP muss mindestens in der Version 4.3.0 oder 5.1.0 installiert sein (5.0.x weist eine Reihe bekannter Fehler auf).';
$string['phpversionhelp'] = '<p>Moodle erwartet PHP mindestens in der Version 4.3.0 oder 5.1.0 (5.0.x weist eine Reihe bekannter Fehler auf).</p>
<p>Sie nutzen zur Zeit die Version $a.</p>
<p>Sie müssen Ihre PHP-Verson aktualisieren oder auf einen Rechner wechseln, der eine neuere Version von PHP nutzt.</p>';
<p>Sie müssen Ihre PHP-Verson aktualisieren oder auf einen Rechner wechseln, der eine neuere Version von PHP nutzt.<br />
(Im Falle von 5.0.x könnten Sie auch zu einer Version 4.4.x downgraden)</p>';
$string['previous'] = 'Frühere';
$string['remotedownloadnotallowed'] = 'Der Download von Komponenten auf Ihren Server ist nicht erlaubt (allow_url_fopen ist deaktiviert). <br/><br/> Die Datei <a href=\"$a->url\">$a->url</a> muß manuell heruntergeladen werden. Kopieren Sie die Datei nach \"$a->dest\" auf dem Server und entpacken Sie sie dort. ';
$string['remotedownloadnotallowed'] = 'Der Download von Komponenten auf Ihren Server ist nicht erlaubt (allow_url_fopen ist deaktiviert). <br /><br /> Die Datei <a href=\"$a->url\">$a->url</a> muss manuell heruntergeladen werden. Kopieren Sie die Datei nach \"$a->dest\" auf dem Server und entpacken Sie sie dort.';
$string['report'] = 'Bericht';
$string['restricted'] = 'eingeschränkt';
$string['safemode'] = 'Safe Mode';
$string['safemodeerror'] = 'Die Nutzung von moodle im safe mode kann zu Schwierigkeiten führen.';
$string['safemodeerror'] = 'Die Nutzung von Moodle im Safe Mode kann zu Schwierigkeiten führen.';
$string['sessionautostart'] = 'Session Auto Start';
$string['sessionautostarterror'] = 'Dies Option sollte abgestellt sein.';
$string['sessionautostarterror'] = 'Diese Option sollte abgeschaltet sein.';
$string['skipdbencodingtest'] = 'Prüfung der Datenbank-Verschlüsselung überspringen';
$string['status'] = 'Status';
$string['thischarset'] = 'UTF-8';
@@ -145,15 +148,15 @@ $string['thislanguage'] = 'Deutsch';
$string['user'] = 'Nutzer/in';
$string['welcomep10'] = '$a->installername ($a->installerversion)';
$string['welcomep20'] = 'Sie haben das Paket <strong>$a->packname $a->packversion</strong> erfolgreich auf Ihrem Computer installiert.';
$string['welcomep30'] = 'Diese Version von <strong>$a->installername</strong> enthält folgende Anwendungen mit denen Sie <strong>moodle</strong> ausführen können:';
$string['welcomep30'] = 'Diese Version von <strong>$a->installername</strong> enthält folgende Anwendungen, mit denen Sie <strong>Moodle</strong> ausführen können:';
$string['welcomep40'] = 'Das Paket enthält: <strong>Moodle $a->moodlerelease ($a->moodleversion)</strong>.';
$string['welcomep50'] = 'Die Nutzung dieser Anwendungen ist lizenzrechtlich geprüft. Alle Anwendungen von <strong>$a->installername</strong> sind
<a href=\"http://www.opensource.org/docs/definition_plain.html\">Open Source</a> und unterliegen der <a href=\"http://www.gnu.org/copyleft/gpl.html\">GPL</a> Lizenz.';
$string['welcomep60'] = 'Die folgenden Seiten führen Sie in einfachen Schritten durch die Konfiguration und Installation von <strong>moodle</strong> auf Ihrem Computer. Sie können die vorgeschlagenen Einstellungen übernehmen oder an Ihre Bedürfnisse anpassen. ';
$string['welcomep70'] = 'Klicken Sie auf den \"Weiter\"-Button, um mit dem Setup von <string>moodle</string> fortzufahren.';
$string['welcomep60'] = 'Die folgenden Seiten führen Sie in einfachen Schritten durch die Konfiguration und Installation von <strong>Moodle</strong> auf Ihrem Computer. Sie können die vorgeschlagenen Einstellungen übernehmen oder an Ihre Bedürfnisse anpassen.';
$string['welcomep70'] = 'Klicken Sie auf den \"Weiter\"-Button, um mit dem Setup von <string>Moodle</string> fortzufahren.';
$string['wrongdestpath'] = 'Falscher Pfad';
$string['wrongsourcebase'] = 'URL-Quelle ist falsch.';
$string['wrongzipfilename'] = 'Zip-Dateiname ist falsch';
$string['wwwroot'] = 'URL Adresse';
$string['wrongzipfilename'] = 'ZIP-Dateiname ist falsch';
$string['wwwroot'] = 'URL-Adresse';
$string['wwwrooterror'] = 'Diese URL scheint nicht gültig zu sein. Moodle ist nicht unter dieser Adresse installiert. ';
?>
+7 -2
View File
@@ -21,14 +21,17 @@ $string['continue'] = 'Jatka';
$string['database'] = 'Tietokanta';
$string['dataroot'] = 'Datahakemisto';
$string['datarooterror'] = '\"Datahakemistoa\", jonka määrittelit, ei voitu löytää, eikä luoda. Joko korjaa polku, tai luo hakemisto manuaalisesti.';
$string['dbconnectionerror'] = 'Emme pystyneet kytkeytymään tiedokantaan, jonka määrittelit. Tarkista tietokanta asetuksesi.';
$string['dbconnectionerror'] = 'Emme pystyneet kytkeytymään tietokantaan, jonka määrittelit. Tarkista tietokanta asetuksesi.';
$string['dbcreationerror'] = 'Tietokannan luomisvirhe. Ei pystytty luomaan annettua tietokannan nimeä tarjotuilla asetuksilla.';
$string['dbhost'] = 'Palvelin';
$string['dbprefix'] = 'Taulukon etumerkki';
$string['dbtype'] = 'Tyyppi';
$string['dirroot'] = 'Moodle hakemisto';
$string['dirrooterror'] = '\"Moodle hakemisto\" asetus näyttäisi olevan väärä-emme voi löytää Moodle asennusta sieltä. Arvo alapuolella on nollattu.';
$string['dirrooterror'] = '\"Moodle hakemisto\" asetus näyttäisi olevan väärin - emme voi löytää Moodle asennusta sieltä. Arvo alapuolella on nollattu.';
$string['download'] = 'Lataus';
$string['environmentrecommendinstall'] = 'suositellaa asennettavaksi/käyttöönotettavaksi';
$string['environmentrecommendversion'] = 'pitäsi käyttää varsiota $a->needed mutta käytössä on versio $a->current';
$string['environmentrequireinstall'] = 'vaaditaan asennettavaksi/käyttöönotettavaksi';
$string['error'] = 'Virhe';
$string['fail'] = 'Virhe';
$string['fileuploads'] = 'Tiedostojen lähettäminen';
@@ -69,6 +72,8 @@ $string['phpversionhelp'] = '<p>Moodle vaatii vähintään PHP version 4.1.0.</p
<p>Käytät parhaillaan versiota $a</p>
<p>Sinun täytyy päivittää PHP tai siirtää isäntä uudemman PHP version kanssa!</p>';
$string['previous'] = 'Edellinen';
$string['report'] = 'Raportti';
$string['restricted'] = 'Rajoitettu';
$string['safemode'] = 'Safe mode';
$string['safemodeerror'] = 'Moodlella saattaa olla ongelmia PHP:n Safe Moden ollessa päällä';
$string['sessionautostart'] = 'Istunnon automaattinen aloitus';
+31 -31
View File
@@ -11,8 +11,8 @@
$string['admindirerror'] = 'Le dossier d\'administration spécifié est incorrect';
$string['admindirname'] = 'Dossier d\'administration';
$string['admindirsettinghead'] = 'Réglage du dossier «&nbsp;admin&nbsp;»...';
$string['admindirsettingsub'] = 'De rares hébergeurs web utilisent le dossier «&nbsp;/admin&nbsp;» comme URL spéciale vous permettant d\'accéder à un tableau de bord ou autre chose. Ceci entre en collision avec l\'emplacement standard des pages d\'administration de Moodle. Vous pouvez corriger cela en renommant le dossier d\'administration de votre installation de Moodle, en inscrivant ici le nouveau nom, par exemple <br /><br /><strong>moodleadmin</strong>.<br /><br />Les liens vers l\'administration de Moodle seront ainsi corrigés.';
$string['admindirsettinghead'] = 'Réglage du dossier « admin »...';
$string['admindirsettingsub'] = 'De rares hébergeurs web utilisent le dossier « /admin » comme URL spéciale vous permettant d\'accéder à un tableau de bord ou autre chose. Ceci entre en collision avec l\'emplacement standard des pages d\'administration de Moodle. Vous pouvez corriger cela en renommant le dossier d\'administration de votre installation de Moodle, en inscrivant ici le nouveau nom, par exemple <br /><br /><strong>moodleadmin</strong>.<br /><br />Les liens vers l\'administration de Moodle seront ainsi corrigés.';
$string['bypassed'] = 'Court-circuité';
$string['cannotcreatelangdir'] = 'Création du dossier lang impossible.';
$string['cannotcreatetempdir'] = 'Création du dossier temp impossible.';
@@ -30,26 +30,26 @@ $string['closewindow'] = 'Fermer cette fenêtre';
$string['compatibilitysettingshead'] = 'Vérification de votre configuration PHP...';
$string['compatibilitysettingssub'] = 'Votre serveur doit passer tous ces tests pour que Moodle fonctionne correctement.';
$string['componentisuptodate'] = 'Le composant est à jour.';
$string['configfilenotwritten'] = 'Le programme d\'installation n\'a pas pu créer automatiquement le fichier de configuration «&nbsp;config.php&nbsp;» contenant vos réglages, vraisemblablement parce que le dossier principal de Moodle n\'est pas accessible en écriture. Vous pouvez copier le code ci-dessous dans un fichier appelé «&nbsp;config.php&nbsp;», que vous placerez à l\'intérieur du dossier principal de Moodle (là où se trouve un fichier «&nbsp;config-dist.php&nbsp;»).';
$string['configfilewritten'] = 'Le fichier «&nbsp;config.php&nbsp;» a été créé avec succès';
$string['configfilenotwritten'] = 'Le programme d\'installation n\'a pas pu créer automatiquement le fichier de configuration « config.php » contenant vos réglages, vraisemblablement parce que le dossier principal de Moodle n\'est pas accessible en écriture. Vous pouvez copier le code ci-dessous dans un fichier appelé « config.php », que vous placerez à l\'intérieur du dossier principal de Moodle (là où se trouve un fichier « config-dist.php »).';
$string['configfilewritten'] = 'Le fichier « config.php » a été créé avec succès';
$string['configurationcompletehead'] = 'Configuration terminée';
$string['configurationcompletesub'] = 'Moodle a tenté d\'enregistrer votre configuration dans un fichier à la racine de votre installation de Moodle.';
$string['continue'] = 'Continuer';
$string['database'] = 'Base de données';
$string['databasecreationsettingshead'] = 'La base de données dans laquelle sont enregistrées la plupart des données utilisées par Moodle doit maintenant être configurée. Cette base de données sera créée automatiquement par l\'installeur Moodle4Windows avec les options spécifiées ci-dessous.';
$string['databasecreationsettingssub'] = '<strong>Type&nbsp;:</strong> réglé sur «&nbsp;mysql&nbsp;» par l\'installeur<br />
<strong>Serveur&nbsp;:</strong> réglé sur «&nbsp;localhost&nbsp;» par l\'installeur<br />
<strong>Nom&nbsp;:</strong> nom de la base de données, par exemple «&nbsp;moodle&nbsp;»<br />
<strong>Utilisateur&nbsp;:</strong> réglé sur «&nbsp;root&nbsp;» par l\'installeur<br />
<strong>Mot de passe&nbsp;:</strong> le mot de passe de la base de données<br />
<strong>Préfixe des tables&nbsp;:</strong> le préfixe à utiliser pour les noms de toutes les tables (facultatif)';
$string['databasecreationsettingssub'] = '<strong>Type :</strong> réglé sur « mysql » par l\'installeur<br />
<strong>Serveur :</strong> réglé sur « localhost » par l\'installeur<br />
<strong>Nom :</strong> nom de la base de données, par exemple « moodle »<br />
<strong>Utilisateur :</strong> réglé sur « root » par l\'installeur<br />
<strong>Mot de passe :</strong> le mot de passe de la base de données<br />
<strong>Préfixe des tables :</strong> le préfixe à utiliser pour les noms de toutes les tables (facultatif)';
$string['databasesettingshead'] = 'La base de données dans laquelle sont enregistrées la plupart des données utilisées par Moodle doit maintenant être configurée. Cette base de données doit avoir déjà été créée sur le serveur, ainsi qu\'un nom d\'utilisateur et un mot de passe permettant d\'y accéder.';
$string['databasesettingssub'] = '<strong>Type&nbsp;:</strong> «&nbsp;mysql&nbsp;» ou «&nbsp;postgres7&nbsp;»<br />
<strong>Serveur hôte&nbsp;:</strong> le plus souvent «&nbsp;localhost&nbsp;» ou par exemple «&nbsp;db.isp.com&nbsp;»<br />
<strong>Nom&nbsp;:</strong> nom de la base de données, par exemple «&nbsp;moodle&nbsp;»<br />
<strong>Utilisateur&nbsp;:</strong> le nom d\'utilisateur de la base de données<br />
<strong>Mot de passe&nbsp;:</strong> le mot de passe de la base de données<br />
<strong>Préfixe des tables&nbsp;:</strong> le préfixe à utiliser pour les noms de toutes les tables (facultatif)';
$string['databasesettingssub'] = '<strong>Type :</strong> « mysql » ou « postgres7 »<br />
<strong>Serveur hôte :</strong> le plus souvent « localhost » ou par exemple « db.isp.com »<br />
<strong>Nom :</strong> nom de la base de données, par exemple « moodle »<br />
<strong>Utilisateur :</strong> le nom d\'utilisateur de la base de données<br />
<strong>Mot de passe :</strong> le mot de passe de la base de données<br />
<strong>Préfixe des tables :</strong> le préfixe à utiliser pour les noms de toutes les tables (facultatif)';
$string['dataroot'] = 'Dossier de données';
$string['datarooterror'] = 'Le dossier de données indiqué n\'a pas pu être trouvé ou créé. Veuillez corriger le paramètre ou créer manuellement le dossier.';
$string['dbconnectionerror'] = 'Moodle n\'a pas pu se connecter à la base de données indiquée. Veuillez vérifier les paramètres de votre base de données';
@@ -57,18 +57,18 @@ $string['dbcreationerror'] = 'Erreur lors de la création de la base de données
$string['dbhost'] = 'Serveur hôte';
$string['dbprefix'] = 'Préfixe des tables';
$string['dbtype'] = 'Type';
$string['dbwrongencoding'] = 'La base de données choisie fonctionne avec un encodage non recommandé ($a). La meilleure solution serait d\'utiliser plutôt une base de données encodée en Unicode (UTF-8). Vous pouvez cependant passer outre ce test en cochant l\'option «&nbsp;Ne pas effectuer le test d\'encodage de la base de données&nbsp;» ci-dessous, mais alors des problèmes pourraient survenir à l\'avenir.';
$string['dbwrongencoding'] = 'La base de données choisie fonctionne avec un encodage non recommandé ($a). La meilleure solution serait d\'utiliser plutôt une base de données encodée en Unicode (UTF-8). Vous pouvez cependant passer outre ce test en cochant l\'option « Ne pas effectuer le test d\'encodage de la base de données » ci-dessous, mais alors des problèmes pourraient survenir à l\'avenir.';
$string['directorysettingshead'] = 'Veuillez confirmer les emplacements de cette installation de Moodle.';
$string['directorysettingssub'] = '<strong>Adresse web :</strong> veuillez indiquer l\'adresse web complète par laquelle on accédera à Moodle. Si votre site web est accessible par plusieurs URL, choisissez celle qui est la plus naturelle ou la plus évidente. Ne placez pas de barre oblique à la fin de l\'adresse.<br /><br />
<strong>Dossier Moodle :</strong> veuillez spécifier le chemin complet de cette installation de Moodle («&nbsp;OS path&nbsp;»). Assurez-vous que la casse des caractères (majuscules/minuscules) est correcte.<br /><br />
<strong>Dossier de données :</strong> Moodle a besoin d\'un emplacement où enregistrer les fichiers déposés sur le site. Le serveur web (utilisateur dénommé habituellement «&nbsp;www&nbsp;», «&nbsp;apache&nbsp;» ou «&nbsp;nobody&nbsp;») doit avoir accès à ce dossier en lecture et EN ÉCRITURE. Toutefois ce dossier ne devrait pas être accessible directement depuis le web.';
<strong>Dossier Moodle :</strong> veuillez spécifier le chemin complet de cette installation de Moodle (« OS path »). Assurez-vous que la casse des caractères (majuscules/minuscules) est correcte.<br /><br />
<strong>Dossier de données :</strong> Moodle a besoin d\'un emplacement où enregistrer les fichiers déposés sur le site. Le serveur web (utilisateur dénommé habituellement « www », « apache » ou « nobody ») doit avoir accès à ce dossier en lecture et EN ÉCRITURE. Toutefois ce dossier ne devrait pas être accessible directement depuis le web.';
$string['dirroot'] = 'Dossier Moodle';
$string['dirrooterror'] = 'Le dossier Moodle semble incorrect : aucune installation de Moodle ne se trouve dans ce dossier. Le dossier Moodle indiqué ci-dessous est vraisemblablement correct.';
$string['download'] = 'Télécharger';
$string['downloadedfilecheckfailed'] = 'La vérification du fichier téléchargé à échoué.';
$string['downloadlanguagebutton'] = 'Télécharger les paquetages de langue «&nbsp;$a&nbsp;»';
$string['downloadlanguagehead'] = 'Télécharger les paquetages de langue';
$string['downloadlanguagenotneeded'] = 'Vous pouvez continuer la procédure d\'installation avec la langue par défaut «&nbsp;$a&nbsp;».';
$string['downloadlanguagebutton'] = 'Télécharger le paquetage de langue « $a »';
$string['downloadlanguagehead'] = 'Téléchargement du paquetage de la langue d\'installation';
$string['downloadlanguagenotneeded'] = 'Vous pouvez continuer la procédure d\'installation avec la langue par défaut « $a ».';
$string['downloadlanguagesub'] = 'Vous avez maintenant la possibilité de télécharger le paquetage de la langue que vous avez sélectionnée afin de poursuivre l\'installation dans cette langue.<br /><br />Si le téléchargement ne peut avoir lieu, la procédure d\'installation continuera en anglais. Une fois l\'installation terminée, vous pourrez alors télécharger et installer d\'autres langues.';
$string['environmenterrortodo'] = 'Vous devez résoudre tous les problèmes liés à l\'environnement (erreurs) décrits ci-dessus avant de continuer l\'installation de cette version de Moodle&nbsp;!';
$string['environmenthead'] = 'Vérification de l\'environnement...';
@@ -85,7 +85,7 @@ $string['fileuploadserror'] = 'Le téléchargement des fichiers sur le serveur d
$string['gdversion'] = 'Version de GD';
$string['gdversionerror'] = 'La librairie GD doit être activée pour traiter et créer les images';
$string['globalsquotes'] = 'Traitement non sûr des variables globales';
$string['globalsquoteserror'] = 'Veuillez corriger vos réglages PHP&nbsp;: désactivez «&nbsp;register_globals&nbsp;» et/ou activez «&nbsp;magic_quotes_gpc&nbsp;»';
$string['globalsquoteserror'] = 'Veuillez corriger vos réglages PHP : désactivez « register_globals » et/ou activez « magic_quotes_gpc »';
$string['help'] = 'Aide';
$string['iconvrecommended'] = 'Bien que la bibliothèque ICONV soit facultative, il est vivement recommandé de l\'installer sur le serveur pour de meilleures performance, notamment si votre site supporte des caractères non latins.';
$string['info'] = 'Information';
@@ -102,13 +102,13 @@ $string['memorylimiterror'] = 'La limite de mémoire de PHP est très basse. Vou
$string['memorylimithelp'] = '<p>La limite de mémoire de PHP sur votre serveur est actuellement de $a.</p><p>Cette valeur trop basse risque de générer des problèmes de manque de mémoire pour Moodle, notamment si vous utilisez beaucoup de modules et/ou si vous avez un grand nombre d\'utilisateurs.</p><p>Il est recommandé de configurer PHP avec une limite de mémoire aussi élevée que possible, par exemple 16 Mo. Vous pouvez obtenir cela de différentes façons :
<ol>
<li>si vous en avez la possibilité, recompilez PHP avec l\'option <em>--enable-memory-limit</em>. Cela permettra à Moodle de fixer lui-même sa limite de mémoire ;</li>
<li>si vous avez accès à votre fichier «&nbsp;php.ini&nbsp;», vous pouvez attribuer au paramètre <strong>memory_limit</strong> une valeur comme 16M. Si vous n\'y avez pas accès, demandez à l\'administrateur de le faire pour vous ;</li>
<li>sur certains serveur, vous pouvez créer dans le dossier principal de Moodle un fichier «&nbsp;.htaccess&nbsp;» contenant cette ligne : <p><blockquote>php_value memory_limit 16M</blockquote></p><p>Cependant, sur certains serveur, cela empêchera le fonctionnement correct de <strong>tous</strong> les fichiers PHP (vous verrez s\'afficher des erreurs lors de la consultation de pages). Dans ce cas, vous devrez supprimer le fichier «&nbsp;.htaccess&nbsp;».</li>
<li>si vous avez accès à votre fichier « php.ini », vous pouvez attribuer au paramètre <strong>memory_limit</strong> une valeur comme 16M. Si vous n\'y avez pas accès, demandez à l\'administrateur de le faire pour vous ;</li>
<li>sur certains serveurs, vous pouvez créer dans le dossier principal de Moodle un fichier « .htaccess » contenant cette ligne : <p><blockquote>php_value memory_limit 16M</blockquote></p><p>Cependant, sur certains serveur, cela empêchera le fonctionnement correct de <strong>tous</strong> les fichiers PHP (vous verrez s\'afficher des erreurs lors de la consultation de pages). Dans ce cas, vous devrez supprimer le fichier « .htaccess ».</li>
</ol>';
$string['missingrequiredfield'] = 'Un champ obligatoire n\'est pas renseigné';
$string['mysql416bypassed'] = 'Toutefois, si votre site utilise UNIQUEMENT des langues encodées en iso-8859-1 (latin), vous pouvez continuer à utiliser votre version actuelle de MySQL 4.1.12 (ou ultérieure).';
$string['mysql416required'] = 'MySQL 4.1.16 est la version minimale requise pour Moodle 1.6, afin de garantir que toutes les données pourront à l\'avenir être converties en encodage UTF-8.';
$string['mysqlextensionisnotpresentinphp'] = 'La configuration de l\'extension MySQL de PHP n\'a pas été effectuée correctement. De ce fait, PHP ne peut communiquer avec MySQL. Veuillez contrôler votre fichier «&nbsp;php.ini&nbsp;» ou recompiler PHP.';
$string['mysqlextensionisnotpresentinphp'] = 'La configuration de l\'extension MySQL de PHP n\'a pas été effectuée correctement. De ce fait, PHP ne peut communiquer avec MySQL. Veuillez contrôler votre fichier « php.ini » ou recompiler PHP.';
$string['name'] = 'Nom';
$string['next'] = 'Suivant';
$string['ok'] = 'Ok';
@@ -123,7 +123,7 @@ $string['remotedownloadnotallowed'] = 'Le téléchargement de composants sur vot
$string['report'] = 'Rapport';
$string['restricted'] = 'Interdit';
$string['safemode'] = 'Safe Mode';
$string['safemodeerror'] = 'Moodle risque de rencontrer des problèmes lorsque le mode «&nbsp;safe mode&nbsp;» est activé';
$string['safemodeerror'] = 'Moodle risque de rencontrer des problèmes lorsque le mode « safe mode » est activé';
$string['sessionautostart'] = 'Démarrage automatique des sessions';
$string['sessionautostarterror'] = 'Ce paramètre doit être désactivé';
$string['skipdbencodingtest'] = 'Ne pas effectuer le test d\'encodage de la base de données';
@@ -132,15 +132,15 @@ $string['thischarset'] = 'UTF-8';
$string['thislanguage'] = 'Français';
$string['user'] = 'Utilisateur';
$string['welcomep10'] = '$a->installername ($a->installerversion)';
$string['welcomep20'] = 'Vous voyez cette page, car vous avez installé Moodle correctement et lancé le logiciel <strong>$a->packname $a->packversion</strong> sur votre ordinateur. Félicitations&nbsp;!';
$string['welcomep30'] = 'Cette version du paquet <strong>$a->installername</strong> comprend des logiciels qui créent un environnement dans lequel <strong>Moodle</strong> va fonctionner, à savoir&nbsp;:';
$string['welcomep20'] = 'Vous voyez cette page, car vous avez installé Moodle correctement et lancé le logiciel <strong>$a->packname $a->packversion</strong> sur votre ordinateur. Félicitations !';
$string['welcomep30'] = 'Cette version du paquet <strong>$a->installername</strong> comprend des logiciels qui créent un environnement dans lequel <strong>Moodle</strong> va fonctionner, à savoir :';
$string['welcomep40'] = 'Ce paquet contient également <strong>Moodle $a->moodlerelease ($a->moodleversion)</strong>.';
$string['welcomep50'] = 'L\'utilisation de tous les logiciels de ce paquet est soumis à l\'acceptation de leurs licences respectives. Le paquet <strong>$a->installername</strong> est un <a href=\"http://www.opensource.org/docs/definition_plain.html\">logiciel libre</a>. Il est distribué sous licence <a href=\"http://www.gnu.org/copyleft/gpl.html\">GPL</a>.';
$string['welcomep60'] = 'Les pages suivantes vous aideront pas à pas à configurer et mettre en place <strong>Moodle</strong> sur votre ordinateur. Il vous sera possible d\'accepter les réglages par défaut ou, facultativement, de les adapter à vos propres besoins.';
$string['welcomep70'] = 'Cliquer sur le bouton «&nbsp;Suivant&nbsp;» ci-dessous pour continuer l\'installation de <strong>Moodle</strong>.';
$string['welcomep70'] = 'Cliquer sur le bouton « Suivant » ci-dessous pour continuer l\'installation de <strong>Moodle</strong>.';
$string['wrongdestpath'] = 'Chemin de destination incorrect.';
$string['wrongsourcebase'] = 'Adresse URL de base de la source incorrect.';
$string['wrongzipfilename'] = 'Nom de fichier ZIP incorrect.';
$string['wwwroot'] = 'Adresse web';
$string['wwwrooterror'] = 'L\'adresse web indiquée semble incorrecte&nbsp;: aucune installation de Moodle ne se trouve à cette adresse.';
$string['wwwrooterror'] = 'L\'adresse web indiquée semble incorrecte : aucune installation de Moodle ne se trouve à cette adresse.';
?>
+20 -2
View File
@@ -27,6 +27,7 @@ $string['closewindow'] = 'Loka þessum glugga';
$string['compatibilitysettingshead'] = 'Stillingar á PHP athugaðar';
$string['compatibilitysettingssub'] = 'Vefþjóninn verður að standast allar þessar prófanir til þess að tryggja að Moodle keyri án vandkvæða';
$string['configfilewritten'] = 'config.php skráin hefur verið mynduð';
$string['configurationcompletesub'] = 'Moodle gerði tilraun til þess að vista uppsetningarskránna í rót Moodle skráarsafnins.';
$string['continue'] = 'Áfram';
$string['database'] = 'Gagnagrunnur';
$string['databasecreationsettingssub'] = 'Nú er komið að því að setja upp gagnagrunninn þar sem flest gögn sem tilheyra Moodle eru hýst. Uppsetningarforritið skilgreinir gagnagrunninn með neðangreindum stillingum.
@@ -44,6 +45,7 @@ $string['databasesettingssub'] = '<b>Tegund:</b> mysql eða postgres7<br />
<b>Lykilorð:</b> lykilorð að gagnagrunni<br />
<b>Forskeyti á töflur:</b> valkvæmt forskeyti á töflur';
$string['dataroot'] = 'Gagnamappa';
$string['datarooterror'] = 'Gagnamappan sem þú tilgreindir fannst ekki eða ekki var hægt að búa hana til. Lagfærðu slóðina eða búðu möppuna til handvirkt.';
$string['dbconnectionerror'] = 'Ekki náðist tenging við uppgefinn gagnagrunn. Vinsamlegast athugaðu hvort stillingar séu réttar.';
$string['dbcreationerror'] = 'Villa við myndun á gagnagrunni. Gat ekki myndað gagnagrunn með uppgefnum stillingum';
$string['dbhost'] = 'Vefþjónn';
@@ -51,10 +53,13 @@ $string['dbprefix'] = 'fortáknun taflna';
$string['dbtype'] = 'Tegund';
$string['directorysettingshead'] = 'Vinsamlegast staðfestu staðsetningu á þessari Moodle uppsetningu';
$string['dirroot'] = 'Moodle skráarsafnið';
$string['dirrooterror'] = 'Ekki tókst að finna Moodle uppsetningu í uppgefnu Moodle skráarsafni. Gildið hér að neðan hefur verið endursett.';
$string['download'] = 'Sækja';
$string['downloadlanguagebutton'] = 'Sækja \"$a\" tungumálapakkann';
$string['downloadlanguagehead'] = 'Sækja tungumálapakka';
$string['downloadlanguagenotneeded'] = 'Þú getur haldið áfram með uppsetninguna með sjálfgefnum tungumálapakka, \"$a\".';
$string['downloadlanguagesub'] = 'Núna hefur þú kost á því að sækja tungumálapakka og halda uppsetningunni áfram á því tungumáli.<br /><br />
Ef þú getur ekki sótt tungumálapakkann þá heldur uppsetningarferlið áfram á ensku. Eftir að uppsetningu lýkur getur þú sótt og sett upp önnur tungumál.';
$string['environmentrecommendinstall'] = 'mælum við með að sé uppsett/virkt';
$string['environmentrecommendversion'] = 'mælt er með útgáfu $a->needed en þú notast við útgáfu $a->current';
$string['environmentrequireinstall'] = 'verður að vera uppsett/virkt';
@@ -68,11 +73,13 @@ $string['iconvrecommended'] = 'Mælt er með uppsetningu á ICONV safninu í þv
$string['info'] = 'Upplýsingar';
$string['installation'] = 'Uppsetning';
$string['invalidmd5'] = 'Ótækt md5';
$string['langdownloaderror'] = 'Því miður tókst ekki að setja upp tungumálið $a. Uppsetning heldur áfram á ensku.';
$string['langdownloadok'] = 'Tungumálið $a hefur verið sótt og sett upp. Innsetningarferlið heldur nú áfram á því máli.';
$string['language'] = 'Tungumál';
$string['mbstringrecommended'] = 'Mælt er með uppsetningu á MBSTRING safninu í því skyni að auka virkni vefsins, sérstaklega ef vefurinn styður við tungumál sem ekki eru af latneskum stofni (non-latin).';
$string['missingrequiredfield'] = 'Einhverjir reitir eru enn óútfylltir';
$string['mysql416bypassed'] = 'Ef vefurinn notast hinsvegar EINUNGIS við iso-8859-1 (latin) stafasettið er óhætt að notast áfram við MySQL 4.1.12 eða yngri útgáfur. ';
$string['mysql416required'] = ' Moodle gerir lágmarkskröfu um MySQL 4.1.16 gagnagrunninn til þess að trygga að mögulegt sé að yfirfæra öll gögn yfir í UTF-8.';
$string['mysql416bypassed'] = 'Ef vefurinn notast hinsvegar EINUNGIS við iso-8859-1 (latin) stafasettið er óhætt að notast áfram við MySQL 4.1.12 eða yngri útgáfur.';
$string['mysql416required'] = 'Moodle gerir lágmarkskröfu um MySQL 4.1.16 gagnagrunninn til þess að trygga að mögulegt sé að yfirfæra öll gögn yfir í UTF-8.';
$string['name'] = 'Nafn';
$string['next'] = 'Áfram';
$string['ok'] = 'OK';
@@ -81,8 +88,19 @@ $string['pass'] = 'Staðið';
$string['password'] = 'Lykilorð';
$string['phpversion'] = 'PHP útgáfa';
$string['phpversionerror'] = 'PHP útgáfan má ekki vera eldri en 4.1.0';
$string['phpversionhelp'] = '<p>Moodle requires a PHP version of at least 4.3.0 or 5.1.0 (5.0.x has a number of known problems).</p>
<p>You are currently running version $a</p>
<p>You must upgrade PHP or move to a host with a newer version of PHP!<br/>
(In case of 5.0.x you could also downgrade to 4.4.x version)</p>
<p>Moodle krefst útgáfu 4.3.0 eða 5.1.0 af PHP (5.0.x útgáfan inniheldur villur).</p>
<p>Þú er með útgáfu $a</p>
<p>Þú verður að uppfæra PHP eða velja vefþjónustu sem býður upp á nýrri útgáfu af PHP!<br/>
(Ef þú notar útgáfu 5.0.x gætir þú hugsanlega breytt yfir í 4.4.x)</p>';
$string['previous'] = 'Til baka';
$string['report'] = 'Skýrsla';
$string['restricted'] = 'Aðgangur takmarkaður';
$string['safemode'] = 'Safe Mode';
$string['safemodeerror'] = 'Moodle getur átt í vandræðum ef \"Save mode\" stillingin er virkjuð';
$string['status'] = 'Staða';
$string['thischarset'] = 'UTF-8';
+19 -3
View File
@@ -12,6 +12,8 @@
$string['admindirerror'] = 'La directory di amministrazione specificata non è corretta';
$string['admindirname'] = 'Directory di amministrazione';
$string['admindirsettinghead'] = 'Impostazione la directory admin...';
$string['admindirsettingsub'] = 'Pochissimi web server utilizzano /admin come un URL speciale per accedere al pannello di controllo o altro. Sfortunatamente questo collide con la posizione standard per le pagine di amministrazione di Moodle. È possibile risolvere questo problema rinominando la directory di amministrazione nella vostra installazione, e inserendo il nuovo nome qui. Per esempio:<p><b>moodleadmin</b></p>
Questo correggerà i collegamenti di amministrazione in Moodle.';
$string['bypassed'] = 'Aggirato';
$string['cannotcreatelangdir'] = 'Non è possibile creare la cartella delle lingue.';
$string['cannotcreatetempdir'] = 'Non è possibile creare la cartella temporanea.';
@@ -24,12 +26,15 @@ $string['cannotunzipfile'] = 'Non è possibile scompattare il file.';
$string['caution'] = 'Attenzione';
$string['check'] = 'Controlla';
$string['chooselanguagehead'] = 'Scegli la lingua';
$string['chooselanguagesub'] = 'Scegliere una lingua per SOLO l\'installazione. Si potrà scegliere le lingue del sito e dell\'utente in una schermata successiva';
$string['closewindow'] = 'Chiudi questa finestra';
$string['compatibilitysettingshead'] = 'Controllo impostazioni PHP...';
$string['compatibilitysettingssub'] = 'Il vostro server deve passare tutti questi test per permettere a Moodle di funzionare correttamente';
$string['componentisuptodate'] = 'Componente aggiornato.';
$string['configfilenotwritten'] = 'Il sistema di installazione non è in grado di creare il file config.php contenente le vostre impostazioni, probabilmente perchè la directory di Moodle non è scrivibile. È possbile copiare manualmente il codice seguente in un file chiamato config.php nella directory principale di Moodle.';
$string['configfilenotwritten'] = 'Il sistema di installazione non è in grado di creare il file config.php contenente le vostre impostazioni, probabilmente perchè la directory di Moodle non è scrivibile. È possibile copiare manualmente il codice seguente in un file chiamato config.php nella directory principale di Moodle.';
$string['configfilewritten'] = 'Il config.php è stato creato correttamente';
$string['configurationcompletehead'] = 'Configurazione completata';
$string['configurationcompletesub'] = 'Moodle tenta di salvare la configurazione in un file nella directory principale della vostra installazione di Moodle.';
$string['continue'] = 'Continua';
$string['database'] = 'Base di dati';
$string['dataroot'] = 'Directory dati';
@@ -39,15 +44,21 @@ $string['dbcreationerror'] = 'Errore durante la creazione della base dati. Non
$string['dbhost'] = 'Server della base dati';
$string['dbprefix'] = 'Prefisso tabelle';
$string['dbtype'] = 'Tipo';
$string['directorysettingshead'] = 'Si prega di confermare i posizionamenti di questa installazione di Moodle';
$string['dirroot'] = 'Directory di Moodle';
$string['dirrooterror'] = 'L\'impostazione \'Directory di Moodle\' sembra essere scorretta - non è possibile trovare un\'installazione di Moodle nel percorso specificato. Il valore sotto è stato ripristinato.';
$string['download'] = 'Download';
$string['downloadedfilecheckfailed'] = 'Controllo file scaricato fallito.';
$string['downloadlanguagebutton'] = 'Scarica il language pack &quot;$a&quot;';
$string['downloadlanguagehead'] = 'Scarica language pack';
$string['downloadlanguagenotneeded'] = 'È possibile continuare l\'installazione utilizzando il language pack standard, \"$a\"';
$string['environmenterrortodo'] = 'Dovete risolvere tutti i problemi relativi all\'ambiente (errori) trovati qui sopra prima di procedere con l\'installazione di questa versione di Moodle!';
$string['environmenthead'] = 'Controllo del vostro sistema';
$string['environmentrecommendinstall'] = 'è raccomandata l\'installazione/abilitazione';
$string['environmentrecommendversion'] = 'È raccomandata la versione $a->needed e la vostra versione attuale è $a->current';
$string['environmentrequireinstall'] = 'è necessaria l\'installazione/abilitazione';
$string['environmentrequireversion'] = 'È necessaria la versione $a->needed e la vostra versione attuale è $a->current';
$string['environmentsub'] = 'Stiamo controllando se i diversi conponenti del vostro sistema coincidano con le richieste del sistema';
$string['environmentxmlerror'] = 'Errore durante la lettura dei dati dell\'ambiente ($a->error_code)';
$string['error'] = 'Errore';
$string['fail'] = 'Fallito';
@@ -55,6 +66,8 @@ $string['fileuploads'] = 'Invio file';
$string['fileuploadserror'] = 'Questo deve essere impostato a on';
$string['gdversion'] = 'Versione GD';
$string['gdversionerror'] = 'La libreria GD deve essere presente per elaborare e creare immagini';
$string['globalsquotes'] = 'Gestione insicura dei Globals';
$string['globalsquoteserror'] = 'Correggere le impostazioni PHP: disabilitare register_globals e/o abilitare magic_quotes_gpc';
$string['help'] = 'Aiuto';
$string['iconvrecommended'] = 'Installare la libreria opzionale ICONV è caldamente consigliato per migliorare le prestazioni del sito, in particolare se il vostro sito supporta lingue non latine.';
$string['info'] = 'Informazioni';
@@ -86,6 +99,7 @@ $string['next'] = 'Prossimo';
$string['ok'] = 'OK';
$string['pass'] = 'Passato';
$string['password'] = 'Password';
$string['php50restricted'] = 'PHP 5.0.x ha diversi problemi conosciuti, si prega di aggiornare alla versione 5.1.x o tornare alle versioni 4.3.x o 4.4.x';
$string['phpversion'] = 'Versione PHP';
$string['phpversionerror'] = 'La versione del PHP deve essere come minimo la 4.1.0';
$string['phpversionhelp'] = '<p>Moodle richiede come minimo la versione 4.1.0 del PHP.</p>
@@ -98,13 +112,15 @@ $string['safemode'] = 'Safe Mode';
$string['safemodeerror'] = 'Moodle può avere problemi con il safemode impostato a on';
$string['sessionautostart'] = 'Session Auto Start';
$string['sessionautostarterror'] = 'Questo deve essere off';
$string['skipdbencodingtest'] = 'Salta il test del sistema di codifica della base dati';
$string['status'] = 'Status';
$string['thischarset'] = 'UTF-8';
$string['thislanguage'] = 'Italiano';
$string['user'] = 'Utente';
$string['welcomep10'] = '$a->installername ($a->installerversion)';
$string['wrongdestpath'] = 'Percorso della destinazione errato.';
$string['wrongsourcebase'] = 'Indirizzo (URL) base sorgente errato. ';
$string['wrongsourcebase'] = 'Indirizzo (URL) base sorgente errato.';
$string['wrongzipfilename'] = 'Nome file compresso errato.';
$string['wwwroot'] = 'Indirizzo web';
$string['wwwrooterror'] = 'L\'indirizzo web sembra non essere valido - questa installazione di Moodle non sembra esere li.';
$string['wwwrooterror'] = 'L\'indirizzo web sembra non essere valido - questa installazione di Moodle non sembra essere li. Il valore è stato reimpostato';
?>
+8 -8
View File
@@ -80,12 +80,12 @@ $string['downloadlanguagenotneeded'] = 'デフォルトの言語パック「 $a
$string['downloadlanguagesub'] = 'あなたは、この言語パックをダウンロードして、インストール処理を継続することができます。<br /><br />言語パックのダウンロードを無効にしている場合、インストール処理は英語で継続されます。 ( インストール処理が完了した後、他の言語パックをダウンロードして、インストールすることができます。 )';
$string['environmenterrortodo'] = 'このバージョンのMoodleをインストールする前に、発見された動作環境の問題 ( エラー ) を解消してください!';
$string['environmenthead'] = 'あなたの環境を確認しています ...';
$string['environmentrecommendinstall'] = 'インストールおよび Enabled を推奨します。';
$string['environmentrecommendversion'] = 'バージョン $a->needed 以上を推奨します。あなたは現在 $a->current を使用しています。';
$string['environmentrequireinstall'] = 'インストールおよび Enabled が必須です。';
$string['environmentrequireversion'] = 'バージョン $a->needed 以上が必須です。あなたは現在 $a->current を使用しています。';
$string['environmentrecommendinstall'] = 'インストールおよびEnabledを推奨します。';
$string['environmentrecommendversion'] = 'バージョン $a->needed以上を推奨します。あなたは現在 $a->current を使用しています。';
$string['environmentrequireinstall'] = 'インストールおよびEnabledが必須です。';
$string['environmentrequireversion'] = 'バージョン $a->needed以上が必須です。あなたは現在 $a->current を使用しています。';
$string['environmentsub'] = 'あなたのシステムに関する様々な要素が、システム要件に合致するか確認しています。';
$string['environmentxmlerror'] = '環境データ ($a->error_code) の読み込み中にエラーが発生しました。';
$string['environmentxmlerror'] = '環境データ ( $a->error_code ) の読み込み中にエラーが発生しました。';
$string['error'] = 'エラー';
$string['fail'] = '失敗';
$string['fileuploads'] = 'ファイルアップロード';
@@ -104,7 +104,7 @@ $string['langdownloadok'] = '言語「 $a 」が正常にインストールさ
$string['language'] = '言語設定';
$string['magicquotesruntime'] = 'Magic Quotesランタイム';
$string['magicquotesruntimeerror'] = 'これは無効にしてください。';
$string['mbstringrecommended'] = 'より良いパフォーマンスを得るため、MBSTRINGライブラリのインストールおよび稼動を強くお勧めします。あなたのサイトがラテン文字以外をサポートしている場合、特にお勧めします。';
$string['mbstringrecommended'] = 'より良いパフォーマンスを得るため、mbstringライブラリのインストールおよび稼動を強くお勧めします。あなたのサイトがラテン文字以外をサポートしている場合、特にお勧めします。';
$string['memorylimit'] = 'Memory Limit';
$string['memorylimiterror'] = 'PHPのmemory limitが低すぎます ... 後で問題が発生する可能性があります。';
$string['memorylimithelp'] = '<p>現在、サーバのPHPメモリー制限が $a に設定されています。</p>
@@ -119,8 +119,8 @@ $string['memorylimithelp'] = '<p>現在、サーバのPHPメモリー制限が $
<p>しかし、この設定が<b>すべての</b>PHPページの動作を妨げる場合もあります。ページ閲覧時にエラーが表示される場合は、.htaccessファイルを削除してください。</p>
</ol>';
$string['missingrequiredfield'] = 'いくつかの必須入力フィールドに入力されていません。';
$string['mysql416bypassed'] = 'あなたのサイトが iso-8859-1 ( ラテン ) 言語のみ使用している場合、現在インストールされている MySQL 4.1.12 ( またはそれ以上 ) を使用することができます。';
$string['mysql416required'] = 'Moodle1.6では、将来すべてのデータをUTF-8に変換するため、MySQL 4.1.16 が要求される最低限のバージョンです。';
$string['mysql416bypassed'] = 'あなたのサイトがiso-8859-1 ( ラテン ) 言語のみ使用している場合、現在インストールされている MySQL 4.1.12 ( またはそれ以上 ) を使用することができます。';
$string['mysql416required'] = 'Moodle1.6では、将来すべてのデータをUTF-8に変換するため、MySQL 4.1.16が要求される最低限のバージョンです。';
$string['mysqlextensionisnotpresentinphp'] = 'MySQLと通信できるようにPHPのMySQL extension設定が正しく設定されていません。php.iniを確認するか、PHPを再度コンパイルしてください。';
$string['name'] = '名称';
$string['next'] = '次へ';
+60 -56
View File
@@ -9,10 +9,10 @@
/// File generated by cvs://contrib/lang2installer/installer_builder
/// using strings defined in installer_strings (same dir)
$string['admindirerror'] = '명시된 관리 디렉토리가 맞지 않습니다';
$string['admindirerror'] = '지정한 관리 디렉토리가 적절치 않습니다';
$string['admindirname'] = '관리 디렉토리';
$string['admindirsettinghead'] = '관리자 디렉토리 설정 ...';
$string['admindirsettingsub'] = '몇개의 웹사이트만이 제어판 등을 제공하는 특별한 URL으로서 /admin을 사용합니다. 불행하게도 이것은 무들 관리페이지를 위한 표준 위치와 충돌을 일으킵니다. 설치도중 admin디렉토리 이름을 바꿈으로서 이문제를 고칠수 있습니다. 새이름을 여기에 넣을 수 있습니다. 예: <br /> <br /><b>moodleadmin</b><br /> <br /> 이렇게 하면 무들에서 관리자 링크문제가 해결됩니다.';
$string['admindirsettingsub'] = '몇 개의 웹사이트만이 제어판 등을 제공하는 특별한 URL으로서 /admin을 사용합니다. 불행하게도 이것은 무들 관리페이지를 위한 표준 위치와 충돌을 일으킵니다. 설치과정에서 관리 디렉토리 이름을 바꿈으로서 이 문제를 고칠수 있는 데, 다음의 예와 같이 새이름을 여기에 넣으면 됩니다. 예: <br /> <br /><b>moodleadmin</b><br /> <br /> 이렇게 하면 무들에서 관리자 링크문제가 해결됩니다.';
$string['bypassed'] = '건너뜀';
$string['cannotcreatelangdir'] = 'lang 디렉토리를 만들 수 없습니다.';
$string['cannotcreatetempdir'] = 'temp 디렉토리를 만들 수 없습니다.';
@@ -25,132 +25,136 @@ $string['cannotunzipfile'] = '파일 압축풀기를 할 수 없습니다.';
$string['caution'] = '주의';
$string['check'] = '점검';
$string['chooselanguagehead'] = '언어를 선택하시오';
$string['chooselanguagesub'] = '설치를 위한 언어를 선택하시오. 추후 화면에 사이트와 사용자 언어를 선택할 수 있습니다.';
$string['chooselanguagesub'] = '설치를 위한 언어를 선택하시오. 설치를 마치고 난 후에도 사이트와 사용자들을 위한 언어팩을 가져와서 다시 바꿀 수 있습니다.';
$string['closewindow'] = '이 창을 닫기';
$string['compatibilitysettingshead'] = 'PHP 설정을 검사하는 중 ..';
$string['compatibilitysettingssub'] = '당신의 서버는 무들이 잘 돌아가도록 하는데 필요한 모든 테스트를 통과해야 합니다.';
$string['compatibilitysettingssub'] = '당신의 서버는 무들이 잘 작동되기 위한 필요한 모든 테스트를 통과해야 합니다.';
$string['componentisuptodate'] = '구성 요소가 최신의 것입니다.';
$string['configfilenotwritten'] = '설치 스크립트는 당신이 선택한 설정으로 config.php파일을 자동적으로 생성할수 없습니다. 아마도 무들 경로 쓰기 허용이 되어 있지 않은 모양입니다. 당신은 수동으로 다음의 코드를 무들의 루트디렉토리안 config.php파일로 복사수 있습니다.';
$string['configfilenotwritten'] = '설치 스크립트는 당신이 선택한 설정으로 config.php파일을 자동적으로 생성할 수 없습니다. 아마도 무들 경로 쓰기 허용이 되어 있지 않은 모양입니다. 당신은 수동으로 다음의 코드를 무들의 루트디렉토리안 config.php파일로 복사해 넣을 수 있습니다.';
$string['configfilewritten'] = '성공적으로 contig.php가 생성되었음.';
$string['configurationcompletehead'] = '초기 설정 완료';
$string['configurationcompletesub'] = '무들이 당신의 무들 설치 루트디렉토리에 있는 파일에 당신의 설정을 저장하도록 시도하였습니다.';
$string['configurationcompletesub'] = '무들이 설치 루트디렉토리에 있는 파일에 당신의 설정을 저장하도록 시도하였습니다.';
$string['continue'] = '계속';
$string['database'] = '데이타 베이스';
$string['databasecreationsettingshead'] = '대부분의 무들 데이터가 저장될 데이터베이스를 설정하는 것이 필요합니다. 아래에 명시된 설정대로 데이터베이스가 자동으로 설치프로그램에 의해 생성될 것입니다.';
$string['databasecreationsettingshead'] = '대부분의 무들 데이터가 저장될 데이터베이스를 설정해야 합니다. 설치프로그램에 의해 자동으로 아래에 명시된 설정대로 데이터베이스가 생성될 것입니다.';
$string['databasecreationsettingssub'] = '<b>종류:</b> 설치프로그램에 의해 \"mysql\" 로 고정됨 <br />
<b>호스트:</b>설치프로그램에 의해 \"localhost\"로 고정됨<br />
<b>이름:</b>데이터베이스이름, 예:moodle<br />
<b>사용자:</b> 설치프로그램에 의해 \"root\" 로 고정됨 <br />
<b>암호:</b> 데이터베이스 암호 <br />
<b>테이블 첨두어:</b> 모든 테이블에 사용되는 선택적 두어';
$string['databasesettingshead'] = '모든 무들데이터가 저장되는 데이터베이스를 설정할 필요가 있습니다. 이 데이터베이스는 이미 만들어졌으며 데이터베이스를 접근할 수 있는사용자 이름과 암호가 생성되었습니다.';
<b>테이블 첨두어:</b> 모든 테이블에 사용되는 선택적 두어';
$string['databasesettingshead'] = '모든 무들데이터가 저장되는 데이터베이스를 설정할 필요가 있습니다. 이 데이터베이스는 이미 만들어졌으며 이에 접근할 수 있는 사용자과 암호가 등록되어 있어야만 합니다.';
$string['databasesettingssub'] = '<b>종류:</b> mysql 또는 postgres7<br />
<b>호스트:</b>예: localhost 또는 db.isp.com <br />
<b>이름:</b> 데이터베이스 이름, 예:moodle<br />
<b>사용자:</b> 데이터베이스 사용자이름<br />
<b>사용자:</b> 데이터베이스 사용자<br />
<b>암호:</b> 데이터베이스 암호<br />
<b>테이블 두어:</b> 모든 테이블에 사용되는 선택적 두어';
$string['dataroot'] = '데이타 디렉토리';
$string['datarooterror'] = '당신이 지정한 \'데이타 디렉토리\'가 없거나 생성되지 않았습니다. 정확한 경로를 적거나 수동으로 그 디렉토리를 생성해 놓으시오.';
<b>테이블 두어:</b> 모든 테이블에 사용되는 선택적 두어';
$string['dataroot'] = '데이타 경로';
$string['datarooterror'] = '당신이 지정한 \'데이타 경로\'가 없거나 생성되지 않았습니다. 정확한 경로를 적거나 수동으로 그 디렉토리를 생성해 놓으시오.';
$string['dbconnectionerror'] = '지정한 데이터베이스에 연결할 수 없습니다. 데이타베이스의 설정을 점검하시오.';
$string['dbcreationerror'] = '데이터베이스 생성 오류. 주어진 설정값으로 데이터베이스 이름을 생성할 수 없습니다.';
$string['dbcreationerror'] = '데이터베이스 생성 오류. 주어진 사용자명 및 암호로 데이터베이스 이름을 생성할 수 없습니다.';
$string['dbhost'] = '호스트 서버';
$string['dbprefix'] = '접두';
$string['dbprefix'] = '접두';
$string['dbtype'] = '형태';
$string['dbwrongencoding'] = '선택된 데이터베이스는 추천되지 않 엔코딩 방법($a)에 의해 동작하고 있습니다. 유니코드 UTF-8로 인코딩 되는 데이터베이스를 사용하는 것이 좋습니다. 아래의\"DB 엔코딩 테스트 건너뛰기\"를 선택하여 이 테스트를 건너뛸 수 있지만 추후 문제를 경험할 수 있습니다.';
$string['dbwrongencoding'] = '선택된 데이터베이스는 바람직하지 않 엔코딩 방법($a)에 의해 동작하고 있습니다. 유니코드 UTF-8로 인코딩 되는 데이터베이스를 사용하는 것이 좋습니다. 아래의\"DB 엔코딩 테스트 건너뛰기\"를 선택하여 이 테스트를 건너뛸 수 있지만 추후 문제가 야기될 수 있습니다.';
$string['directorysettingshead'] = '무들 설치 위치를 확인하기 바랍니다.';
$string['directorysettingssub'] = '<b>웹 주소:</b>
무들이 접속될 완전한 웹주소를 기입하시오.
만일 다중 URL을 통하여 웹사이트 접근할 수 있다면 학습자가 사용하기 쉬운 자연스런 주소를 선택하시오. 끝에 슬래시를 포함하지 마십시요.
만일 다중 URL을 통하여 웹사이트 접근할 수 있다면 학습자가 사용하기 쉬운 자연스런 주소를 선택하시오. 끝에 슬래시를 포함하지 마십시요.
<br />
<br />
<b>무들 경로:</b>
이 설치에 대한 완전한 디렉토리 경로를 명시하시오. 대문자/소문자가 맞는지 확인하시오.
무들이 설치 완전한 디렉토리 경로를 명시하시오. 대문자/소문자가 맞는지 확인하시오.
<br />
<br />
<b>데이터 디렉토리:</b>
무들이 올리기한 파일을 저장할 곳이 필요합니다. 이 디렉토리는 웹서버 사용자(\'nobody 나 \'apache\')들이 읽고 쓸 수 있어야 합니다. 그러나 직접 접근할 수 있어서는 안됩니다.';
무들로 업로드된 파일을 저장할 수 있는 장소가 필요합니다. 이 디렉토리는 웹 서버 사용자(보통 \"none\" 또는 \"apache\" )에 의해서 \'읽고쓰기 가능\' 권한을 보유하여야 합니다. 그러나 직접 접근할 수 있어서는 안됩니다.';
$string['dirroot'] = '무들 디렉토리';
$string['dirrooterror'] = '무들 경로의 위치가 바르지 않은 것 같습니다 - 모들설치 프로그램을 찾을 수 없습니다. 아래의 값들은 초기화 되었습니다.';
$string['download'] = '다운로드';
$string['dirrooterror'] = '무들 경로가 바르지 않은 것 같습니다 - 무들의 설치 프로그램을 찾을 수 없습니다. 아래의 값들은 초기화 되었습니다.';
$string['download'] = '내려 받음';
$string['downloadedfilecheckfailed'] = '내려받기 한 파일 체크가 실패하였습니다.';
$string['downloadlanguagebutton'] = '\"$a\" 언어팩 내려받기';
$string['downloadlanguagehead'] = '언어팩 다운로드';
$string['downloadlanguagenotneeded'] = '기본 언어팩인 \"$a\"을 사용하여 설치과정을 계속할 수 있습니다.';
$string['downloadlanguagesub'] = '이제 언어팩 선택을 하셨기 때문에 추후에는 선택한 언어로 설치를 계속할 수 있습니다.<br /><br />만일 해당 언어팩을 내려받지 못한다면, 영문으로 설치가 계속될 것입니다.(일단 영문으로 프로그램을 깐 후, 다시 또 다른 언어팩을 선택하여 설정할 수 있는 기회가 있습니다) ';
$string['environmenterrortodo'] = '이 무들버전을 설치하기 전에 에서 발견된 모든 환경설정 문제들을 해결해야 합니다.';
$string['environmenthead'] = '환경변수를 점검하십시요.';
$string['environmentrecommendinstall'] = '설치하거나 활성화되는 것을 추천합니다.';
$string['environmentrecommendversion'] = '$a->needed 버전을 추천합니다.당신은 $a->currentversion 을 사용하고 있습니다. ';
$string['environmentrequireinstall'] = '설치거나 활성화 되어야 합니다.';
$string['environmentrequireversion'] = '$a->needed 버전을 사용하여야 합니다.당신은 $a->currentversion 을 사용하고 있습니다.';
$string['environmentsub'] = '당신의 시스템의 여러 구성요소가 시스템 요구조건을 만족하는지 점검합니다.';
$string['downloadlanguagesub'] = '이제 언어팩 선택을 하셨기 때문에 추후에는 선택한 언어로 설치를 계속할 수 있습니다.<br /><br />만일 해당 언어팩을 내려받지 못한다면, 영문으로 설치가 계속될 것입니다.(일단 영문으로 프로그램을 깐 후, 다시 또 다른 언어팩을 선택하여 설정할 수 있는 기회가 있습니다)';
$string['environmenterrortodo'] = '이 무들버전을 설치하기 전에 에서 발견된 모든 환경설정 문제(오류)들을 해결해야 합니다!';
$string['environmenthead'] = '구동환경을 점검합니다...';
$string['environmentrecommendinstall'] = '설치하거나 활성화 것을 권고합니다.';
$string['environmentrecommendversion'] = '$a->needed 버전을 권장하고 있는 데 현재 $a->current 을 사용하고 있습니다.';
$string['environmentrequireinstall'] = '설치거나 활성화할 것을 권고합니다.';
$string['environmentrequireversion'] = '$a->needed 버전을 사용하여야 하는데 현재 $a->current 을 사용하고 있습니다.';
$string['environmentsub'] = '기존 운영체제가 무들의 여러 구성 요소들을 구동하는데 적합한지 점검합니다.';
$string['environmentxmlerror'] = '환경 설정 데이터 불러들이기 오류 ($a->error_code)';
$string['error'] = '오류';
$string['fail'] = '실패';
$string['fileuploads'] = '업로드된 파일 ';
$string['fileuploads'] = '파일 올리기';
$string['fileuploadserror'] = '이것은 켜져야 합니다.';
$string['gdversion'] = 'GD 의 버전';
$string['gdversionerror'] = 'GD 라이브러리는 진행과정과 사진을 만드는 것을 보여주어야 합니다.';
$string['gdversionerror'] = 'GD 라이브러리는 사진이나 그림을 처리하기 위해서는 필수적으로 있어야 합니다.';
$string['globalsquotes'] = '전역변수 조작 안전성 결여';
$string['globalsquoteserror'] = '여러분의 PHP 설정을 다음과 같이 고쳤습니다: register_globals 및 enable magic_quotes_gpc 을 껐습니다.';
$string['globalsquoteserror'] = 'PHP.ini 속의 설정을 다음과 같이 고치십시오: register_globals 및 enable magic_quotes_gpc 을 끄십시오(Off).';
$string['help'] = '도움';
$string['iconvrecommended'] = '당신의 사이트가 라틴언어계열이 아닌 언어를 지원하는 경우 사이트의 성능을 향상시키기 위해서는 ICONV라이브러리를 설치하는것을 권장합니다.';
$string['iconvrecommended'] = '당신의 사이트가 라틴언어계열이 아닌 언어를 지원하는 경우, 사이트의 성능을 향상시키기 위해서는 ICONV라이브러리를 설치것을 권장합니다.';
$string['info'] = '정보';
$string['installation'] = '설치';
$string['invalidmd5'] = '잘못된 md5';
$string['langdownloaderror'] = '안타깝게도 \"$a\" 언어팩이 설치되지 않았습니다. 대신 영어를 이용하여 설치될 것입니다.';
$string['langdownloadok'] = '\"$a\" 언어팩이 성공적으로 설치되었습니다. 해당 언어를 이용하여 설치가 진행될 것입니다.';
$string['language'] = '언어';
$string['magicquotesruntime'] = '매직 코트 실행 시간';
$string['magicquotesruntime'] = 'Magic Quotes 실행 시간';
$string['magicquotesruntimeerror'] = '이것은 꺼져야 합니다.';
$string['mbstringrecommended'] = '당신의 사이트가 라틴언어계열이 아닌 언어를 지원하는 경우 사이트의 성능을 향상시키기 위해서 MBSTRING 라이브러리 설치하는것을 권장합니다.';
$string['memorylimit'] = '기억 제한';
$string['memorylimiterror'] = 'php 기억 제한은 매우 낮게 설되어 있습니다. 당신은 후에 문제를 닥치게 될 것입니다.';
$string['memorylimithelp'] = '<p>서버의 PHP 메모리한계가 최근 $a 로 설정되습니다.</p>
$string['mbstringrecommended'] = '당신의 사이트가 라틴언어계열이 아닌 언어를 지원하는 경우, 사이트의 성능을 향상시키기 위해서 MBSTRING 라이브러리 설치 권장합니다.';
$string['memorylimit'] = '메모리 사용량';
$string['memorylimiterror'] = 'php의 메모리 사용량이 너무 작게 설되어 있습니다. 당신은 후에 문제에 봉착할 지도 모릅니다.';
$string['memorylimithelp'] = '<p>현재 서버의 PHP 메모리 사용량은 $a 로 설정되어 있습니다.</p>
<p>이것은 아마 무들이 나중에 기억의 문제를 갖게 되는 것을 야기시킬것입니다. 특히 만약 당신이 사용할 수 있는 많은 무들을 가지고 있거나 그런 사용자를 가지고 있다면 그러할 것입니다.</p>
<p>이는 추후에 무들이 원활히 구동되는 데 문제가 될 것입니다. 특히 여러분이 상당히 많은 모듈을 이용하고 또 사용자가 많아지게 되면 문제가 될 소지가 더 커집니다.</p>
<p>우리는 당신이 16M 와 같은 가능하면 더 높은 제한을 가지고 있는 PHP를 형성하기를 요구합니다.
당신이 시도 할 수 잇는 여러가지 방법들이 있습니다.</p>
<p>우리는 당신이 PHP가 사용할 수 있는 메모리 용랑을 16M 나 아니면 더 큰 값으로 설정하길 바랍니다. 설정하는 방법은
여러가지가 있습니다.</p>
<ol>
<li>만약 당신이 할 수 있다면 기억제한이 가능한 파일과 함께 PHP를 번역하세요. 이것은 무들이 자기 스스로 기억제한을 설치하는데 허락할 것입니다</li>
<li>만약 PHP소스를 재컴파일 할 수 있다면 옵션에 <i>--enable-memory-limit</i> 을 포함시켜 컴파일 하십시오. 이렇게 해 놓으면 무들 프로그램으로 메모리 용량을 제어할 수 있게 됩니다.</li>
<li>만약 다신이 php.ini.파일에 접속했다면 당신은 <b>memory_limit</b>을 16M와 같은 어떤 것으로 바꿔설치 할 수 있을것입니다. 만약 당신이 접속하지 않았다면 이것을 실행하기 위한 당신의관리자에게 문의하실 수 있습니다.</li>
<li>만약 php.ini 파일에 접근 가능하다면 당신은 <b>memory_limit 16M</b> 처럼 값을 바꿀 수 있을것입니다. 만약 여러분이 직접 접근 할 수 없다면 서버 관리자에게 요청하여 처리하실 수 있습니다.</li>
<li>당신이 만들어 낼수 있는 몇개의 PHP서버들에서 무들 주소성명록에 있는 접속파일은 이 라인을 포함하고 있습니다.
<li>또 도저히 php.ini 안에 있는 값을 바꿀 수가 없다면 무들 디렉토리에 아래와 같은 내용을 포함하는 .htaccess 를 넣어두면 됩니다.
<P><blockquote>php_value memory_limit 16M<blockquote></p>
<p>그러나 모든 php페이지가 (당신이 페이지를 살펴보았을때 문제를 찾을 것이다) 일하는 것으로부터 방해 할 이 몇개의 서버들이 있기때문에 당신은 .htaccess 를 제거해야 할 것입니다.</p></li></ol>';
<p>그러나 어떤 서버에서는 이러한 기능이 모든 PHP페이지에 적용되어 버릴 수도 있게 되는 데 (당신이 페이지를 살펴보았을때 문제를 찾을 것이다) 이 때에는 .htaccess 를 제거해야 하고 다른 방안을 찾아봐야 할 것입니다.</p></li></ol>';
$string['missingrequiredfield'] = '필요한 항목이 빠져 있습니다.';
$string['mysql416bypassed'] = '당신의 사이트가 iso-8859-1 (라틴) 언어만을 사용하는 경우 현재 설치된 MySQL 4.1.12 혹은 그 이상버전을 사용할 수 있습니다. ';
$string['mysql416required'] = '모든 데이터가 향후 UTF-8로 변환될 수 있도록 하기위해서는 MySQL 4.1.16 이상 버전이 무들 1.6버전에 필요합니다. ';
$string['mysqlextensionisnotpresentinphp'] = 'php는 php가 mysql과 연결할 수 있기 위해서 적절하게 형성됐다. 당신의 php.ini 파일이나 recompile php를 확인하세요.';
$string['mysql416bypassed'] = '당신의 사이트가 iso-8859-1 (라틴) 언어만을 사용하는 경우 현재 설치된 MySQL 4.1.12 혹은 그 이상 버전을 사용할 수 있습니다.';
$string['mysql416required'] = '모든 데이터가 향후 UTF-8로 변환될 수 있도록 하기위해서는 MySQL 4.1.16 이상 버전이 무들 1.6버전에 필요합니다.';
$string['mysqlextensionisnotpresentinphp'] = 'php.ini 는 mysql과 연동되도록 적절하게 설정되지 못했습니다. 당신의 php.ini 파일을 점검해 보거나 PHP를 재컴파일 하세요.';
$string['name'] = '이름';
$string['next'] = '다음으로';
$string['ok'] = 'OK';
$string['parentlanguage'] = 'en';
$string['pass'] = '통과하세요.';
$string['pass'] = '통과';
$string['password'] = '비밀번호';
$string['php50restricted'] = 'PHP 5.0.x 는 약간의 버그가 보고되었습니다. 5.1.x로 판올림 하시던가, 아니면 4.3.x 혹은 4.4.x로 바꿔주시기 바랍니다.';
$string['phpversion'] = 'php버젼';
$string['phpversionerror'] = 'php 버젼은 틀림없이 적어도 4.1.0.이어야합니다.';
$string['phpversionhelp'] = '무들은 적어도 4.1.0의 php버젼을 요구합니다.';
$string['phpversionerror'] = 'php 버젼은 최소한 4.3.0 혹은 5.1.0. 이상 이어야합니다.(5.0.x는 버그가 있다고 알려져 있습니다)';
$string['phpversionhelp'] = '<p>무들은 적어도 PHP4.3.0 혹은 5.1.0. 이상 이어야합니다.(5.0.x는 버그가 있다고 알려져 있습니다)</p>
<p>현재 구동되고 있는 PHP버전은 $a 입니다.</p>
<p>PHP를 업그레이드 하시거나 새버전을 제공하는 웹호스팅 업체로 이전하기를 권합니다!<br />(만일 5.0.x버전을 사용 중이라면 4.4.x 버전으로 다운그레이드 할 수 있습니다)</p>';
$string['previous'] = '이전으로';
$string['remotedownloadnotallowed'] = '서버로 구성요소를 내려받는 것이 허용되지 않습니다. (allow_url_fopen 이 비활성화 됨).<br /><br /> 수동으로 <a href=\"$a->url\">$a->url</a> 파일을 다운로드 하고, 서버의 \"$a->dest\" 에 복사한 후 압축을 푸셔야 합니다.';
$string['report'] = '보고';
$string['restricted'] = '제한됨';
$string['safemode'] = 'Safe Mode';
$string['safemodeerror'] = '아마 Safe Mode가 작동되어서 문제가 을 것입니다.';
$string['sessionautostart'] = '세션의 활동을 시작하세요.';
$string['sessionautostarterror'] = '이것은 종료되어야 합니다.';
$string['safemodeerror'] = '아마 Safe Mode가 작동되어서 문제가 생겼을 것입니다.';
$string['sessionautostart'] = '세션 자동 시작';
$string['sessionautostarterror'] = '이것은 꺼져 있어야(Off) 합니다.';
$string['skipdbencodingtest'] = 'DB 엔코딩 테스트 생략';
$string['status'] = '상태';
$string['thischarset'] = 'UTF-8';
$string['thislanguage'] = '한국어';
$string['user'] = '사용자';
$string['welcomep10'] = '$a->installername ($a->installerversion)';
$string['welcomep20'] = '당신의 컴퓨터에 <strong>$a->packname $a->packversion</strong> 패키지를 성공적으로 설치한 것을 축하합니다! ';
$string['welcomep20'] = '당신의 컴퓨터에 <strong>$a->packname $a->packversion</strong> 패키지를 성공적으로 설치한 것을 축하합니다!';
$string['welcomep30'] = '<strong>$a->installername</strong> 의 이 릴리스는 <strong>무들</strong>이 그 속에서 동작하는 환경을 생성하기 위한 어플리케이션을 포함하고 있습니다.';
$string['welcomep40'] = '이 패키지는 <strong>무들 $a->moodlerelease ($a->moodleversion)</strong> 을 포함하고 있습니다.';
$string['welcomep50'] = '이 패키지에 있는 모든 어플리케이션을 사용하는 것은 각각의 라이스에의해 지배받습니다. 완전한<strong>$a->installername</strong> 패키지는
$string['welcomep50'] = '이 패키지에 있는 모든 어플리케이션을 사용하는 것은 각각의 라이스에의해 지배받습니다. 완전한<strong>$a->installername</strong> 패키지는
<a href=\"http://www.opensource.org/docs/definition_plain.html\">공개 소스이며 </a> <a href=\"http://www.gnu.org/copyleft/gpl.html\">GPL</a> 라이선스에 의해 배포됩니다.';
$string['welcomep60'] = '다음 페이지들은 당신의 컴퓨터에 <strong>무들</strong>을 설정하고 설치하는데 따라하기 쉬운 방법으로 당신을 안내할 것입니다. 당신은 기본 설정을 선택하거나 당신의 목적에 맞게 선택적으로 수정할 수 있습니다.';
$string['welcomep70'] = '<strong>무들</strong> 설정을 계속하기 위해서는 \"다음\" 버튼을 클릭하세요.';
+2
View File
@@ -126,6 +126,7 @@ $string['next'] = 'Volgende';
$string['ok'] = 'OK';
$string['pass'] = 'OK';
$string['password'] = 'Wachtwoord';
$string['php50restricted'] = 'PHP 5.0.x heeft een heel aantal bekende problemen. Upgrade naar 5.1.x of downgrade naar 4.3.x of 4.4.x';
$string['phpversion'] = 'PHP-versie';
$string['phpversionerror'] = 'PHP-versie moet minstens 4.1.0 zijn';
$string['phpversionhelp'] = '<p>Moodle heeft minstens PHP-versie 4.1.0 nodig.</p> <p>De huidige versie op je server is $a</p>
@@ -133,6 +134,7 @@ $string['phpversionhelp'] = '<p>Moodle heeft minstens PHP-versie 4.1.0 nodig.</p
$string['previous'] = 'Vorige';
$string['remotedownloadnotallowed'] = 'Het downloaden van componenten naar je server is niet toegelaten (allow_url_fopen is uitgeschakeld)<br /><br />Je moet het <a href=\"$a->url\">$a->url</a>bestand manueel downloaden en het kopiëren naar \"$a->dest\" op je server en het daar unzippen.';
$string['report'] = 'Rapport';
$string['restricted'] = 'Beperkt';
$string['safemode'] = 'Safe Mode';
$string['safemodeerror'] = 'Moodle kan bestanden niet juist behandelen met safe mode ingeschakeld';
$string['sessionautostart'] = 'Session Auto Start';
+56
View File
@@ -11,36 +11,87 @@
$string['admindirerror'] = 'Podany katalod admin jest nieprawidłowy';
$string['admindirname'] = 'Katalog admin';
$string['admindirsettingsub'] = 'Niektóre webhosty używają / admin jako specjalne URL w celu akcesu do panela kontrolnego a także w innych celach. Niestety powoduje to konflikt ze standardową lokalizacją dla stron administratora w Moodle. Powyższy konflikt można naprawić zmieniając nazwę katalogu administratora podczas instalacji i wstawiając nową nazwę. Na przykład:
<br /> <br /><b>moodleadmin</b><br /> <br />
Zostaną również poprawione linki administratora w Moodle';
$string['bypassed'] = 'Ominięty';
$string['cannotcreatelangdir'] = 'Nie można utworzyć katelogu do \"paczki językowej\" (lang)';
$string['cannotcreatetempdir'] = 'Nie można utworzyć katalogu tymczasowego';
$string['cannotdownloadcomponents'] = 'Nie można pobrać składowych (komponentów)';
$string['cannotdownloadzipfile'] = 'Nie można pobrać spakowanego pliku (ZIP)';
$string['cannotfindcomponent'] = 'Nie można znaleźć składowej (komponentu)';
$string['cannotsavemd5file'] = 'Nie mozna zapisać pliku md5';
$string['cannotsavezipfile'] = 'Nie można zapisać spakowanego pliku ZIP';
$string['cannotunzipfile'] = 'Nie można rozpakować pliku ZIP';
$string['caution'] = 'Ostrzeżenie';
$string['check'] = 'Sprawdź';
$string['chooselanguagehead'] = 'Wybierz język';
$string['closewindow'] = 'Zamknij to okno';
$string['compatibilitysettingshead'] = 'Sprawdzanie Twoich ustawień PHP';
$string['componentisuptodate'] = 'Składowa (komponent) jest aktualny';
$string['configfilenotwritten'] = 'Instalator nie mógł automatycznie utworzyć plik config.php zawierający Twoje parametry instalacyjne, prawdopodobnie dlatego że katalog Moodle nie ma prawa zapisu. Musisz ręcznie przekopiować poniższy kod do pliku config.php, który powinien znajdować się w głównym katalogu Moodle.';
$string['configfilewritten'] = 'config.php został pomyślnie stworzony';
$string['configurationcompletehead'] = 'Konfiguracja skończona';
$string['continue'] = 'Kontynuuj';
$string['database'] = 'Baza danych';
$string['dataroot'] = 'Katalog z danymi';
$string['datarooterror'] = 'Katalog z danymi który podałeś nie może być znaleziony lub utworzony. Popraw ścieżkę lub utwórz katalog ręcznie.';
$string['dbconnectionerror'] = 'Nie można połączyć się z podaną bazą danych. Sprawdź ustawienia Twojej bazy danych.';
$string['dbcreationerror'] = 'Błąd tworzenia bazy danych. Nie można stworzyć bazy danych o takiej nazwie z dostarczonymi ustawieniami';
$string['dbhost'] = 'Serwer baz danych';
$string['dbprefix'] = 'prefiksy tabel';
$string['dbtype'] = 'Typ';
$string['dirroot'] = 'Katalog Moodle';
$string['dirrooterror'] = '\"Katalog Moodle\" wydaje się być nieprawidłowy - tam nie można znaleźć instalacji Moodle. Wartości poniżej zostaną usunięte.';
$string['download'] = 'Pobierz';
$string['downloadedfilecheckfailed'] = 'Pobierany plik jest uszkodzony';
$string['downloadlanguagebutton'] = 'Pobierz &quot;$a&quot; pakiet językowy';
$string['downloadlanguagehead'] = 'Pobierz pakiet językowy';
$string['environmenterrortodo'] = 'Musisz rozwiązać wszystkie problemy środowiska znalezione powyzej aby kontynuować instalacje.';
$string['environmentrecommendinstall'] = 'Polecane do zainstalowania/włączenia';
$string['environmentrecommendversion'] = 'wersja $a->needed jest polecana a Ty używasz $a->current';
$string['environmentrequireinstall'] = 'Wymagane do zainstalowania/włączenia';
$string['environmentrequireversion'] = 'wersja $a->needed jest wymagana ty masz $a->current';
$string['environmentxmlerror'] = 'Bład czytania danych środowiskowych ($a->error_code)';
$string['error'] = 'Błąd';
$string['fail'] = 'zawieść';
$string['fileuploads'] = 'Plik pobrany';
$string['fileuploadserror'] = 'Powinno być włączone';
$string['gdversion'] = 'versja biblioteki GD';
$string['gdversionerror'] = 'Aby przeprowadzać operacje i kreować obrazy niezbędna jest biblioteka GD';
$string['globalsquoteserror'] = 'Ustal swoje ustawienia PHP: niedostępne register_globals i/lub udostępnione magic_quotes_gpc';
$string['help'] = 'Pomoc';
$string['iconvrecommended'] = 'Zainstalowanie opcjonalnej biblioteki ICONV jest mocno polecane aby poprawić działanie strony, szczególnie jeśli strona używa języków nie-łacińskich.';
$string['info'] = 'Informacja';
$string['installation'] = 'Instalacja';
$string['invalidmd5'] = 'Nieważne md5';
$string['language'] = 'Język';
$string['magicquotesruntime'] = 'Magic Quotes Runtime';
$string['magicquotesruntimeerror'] = 'Powinno być wyłączone';
$string['mbstringrecommended'] = 'Zainstalowanie opcjonalnej biblioteki MBSTRING jest mocno polecane aby poprawić działanie strony, szczególnie jeśli strona używa języków nie łacińskich.';
$string['memorylimit'] = 'Ograniczenie pamięci';
$string['memorylimiterror'] = '= Limit pamięci PHP jest ustawiony zbyt nisko ... może to powodować problemy w przyszłości';
$string['memorylimithelp'] = 'Limit pamięci PHP dla Twojego serwera jest ustawiony obecnie na $a.</p>
<p> Może to stworzyć sytuację, w której Moodle będzie miał w przyszłości problemy z pamięcią, zwłaszcza jeśli masz udostępnionych wiele modułów i/lub wielu użytkowników.</p>
<p> Jeśli jest to możliwe, zalecamy ustawienie konfiguracji PHP z wyższym limitem, np. 16M.
Istnieje kilka sposobów przeprowadzenia tej operacji, których możesz spróbować: </p>
<ol>
<li> Jeśli możesz przekompiluj PHP za pomocą <i>--enable-memory-limit</i>.
Pozwoli to Moodle ustawić samoczynnie limit pamięci. </li>
<li> Jeśli masz dostęp do swojego pliku php.ini, możesz w nim zmienić ustawienie <b>memory_limit</b> do wielkođci 16M. Jeśli nie posiadasz tego dostępu możesz poprosić swojego administratora aby zrobił to za Ciebie.</li>
<li> Na niektórych serwerach PHP można stworzyć plik. htaccess w katalogu Moodle zawierający poniższą linię:
<p><blockquote>php_value memory_limit 16M</blockquote></p>
<p> jednakże na niektórych serwerach będzie uniemożliwiało to działanie <b> wszystkich </b> stron PHP (ujrzysz błędy na stronie), a więc będziesz zmuszony usunąć plik .htaccess. </p></li></ol>”';
$string['missingrequiredfield'] = 'Brak wymaganego pola';
$string['mysql416bypassed'] = 'Jezeli Twoja strona używa ISO-8859-1 możesz nadal używać właśnie zainstalowanej MySQL 4.1.12 (lub wyższej).';
$string['mysql416required'] = 'MySQL 4.1.16 jest najniższą wersją polecaną dla Moodle 1.6 gwarantującą że wszystkie dane będą konwertowane do UTF8.';
$string['mysqlextensionisnotpresentinphp'] = 'PHP nie został prawidłowo skonfigurowany z rozszerzeniem MySQL, co może zostać zakomunikowane przez MySQL. Sprawdź proszę swój plik php.ini lub przekompiluj PHP';
$string['name'] = 'Nazwa';
$string['next'] = 'Następne';
$string['ok'] = 'OK.';
$string['parentlanguage'] = '<<DO TŁUMACZY: Jeżeli Twój język ma Język nadrzędny który powinien być użyty w przypadku braku tlumaczenia, wpisz tutaj odpowiedni kod (np: nl). Pozostawienia pustego powoduje używanie języka angielskiego.';
$string['password'] = 'Hasło';
$string['phpversion'] = 'wersja PHP';
$string['phpversionerror'] = 'Wersja PHP musi być ca najmniej 4.1.0';
@@ -48,6 +99,8 @@ $string['phpversionhelp'] = '<p> Moodle wymaga wersji PHP co najmniej 4.1.0. </p
<p>Obecnie jest uruchomiona wersja $a</p>
<p> Musisz uaktualnić wersje PHP lub przenieść na host z nowszą wersją PHP!</p>';
$string['previous'] = 'Poprzedni';
$string['remotedownloadnotallowed'] = 'Pobieranie komponentów na Twój serwer jest niedozowolone. Musisz pobrać pliki ręcznie z <a href=\"$a->url\">$a->url</a> i skopiować do \"$a->dest\" na swoim serwerze i tam go otworzyć';
$string['report'] = 'Raport ';
$string['safemode'] = 'Bezpieczny tryb';
$string['safemodeerror'] = 'Moodle ma trudności z włączeniem bezpiecznego trybu';
$string['sessionautostarterror'] = 'To powinno być wyłączone';
@@ -55,6 +108,9 @@ $string['status'] = 'Status';
$string['thischarset'] = 'UTF-8';
$string['thislanguage'] = 'Polski';
$string['user'] = 'Użytkownik';
$string['wrongdestpath'] = 'Błędna scieżka docelowa';
$string['wrongsourcebase'] = 'Błędne żródło bazy URL';
$string['wrongzipfilename'] = 'Błędna nazwa pliku ZIP.';
$string['wwwroot'] = 'Adres w sieci';
$string['wwwrooterror'] = 'Adres w sieci wydaje się być niepoprawny - wydaje się że nie ma tam instalacji Moodle';
?>
+2
View File
@@ -129,6 +129,7 @@ $string['next'] = 'Próximo';
$string['ok'] = 'OK';
$string['pass'] = 'OK';
$string['password'] = 'Senha';
$string['php50restricted'] = 'O PHP 5.0.x apresenta muitos problemas conhecidos, faça o upgrade para a versão 5.1.x ou faça o downgrade para a versão 4.3.x ou 4.4.x';
$string['phpversion'] = 'Versão do PHP';
$string['phpversionerror'] = 'A versão do PHP não deve ser inferior a 4.1.0';
$string['phpversionhelp'] = '<p>Moodle requer a versão 4.1.0 de PHP ou posterior.</p>
@@ -137,6 +138,7 @@ $string['phpversionhelp'] = '<p>Moodle requer a versão 4.1.0 de PHP ou posterio
$string['previous'] = 'Anterior';
$string['remotedownloadnotallowed'] = 'Não é permitido baixar componentes no seu servidor (allow_url_fopen está desabilitado).).<br /><br />Você deve baixar o arquivo <a href=\"$a->url\">$a->url</a> manualmente, copiar em \"$a->dest\" no seu servidor e descomprimir o arquivo nesta posição.';
$string['report'] = 'Relatório';
$string['restricted'] = 'Restringido';
$string['safemode'] = 'Modalidade segura';
$string['safemodeerror'] = 'Moodle pode ter problemas se a modalidade segura estiver ativa';
$string['sessionautostart'] = 'Início da sessão automático';
+1
View File
@@ -12,6 +12,7 @@
$string['admindirerror'] = 'Указанный каталог администратора неверен';
$string['admindirname'] = 'Каталог администратора';
$string['caution'] = 'Предупреждение';
$string['check'] = 'Отметить';
$string['closewindow'] = 'Закрыть окно';
$string['configfilewritten'] = 'config.php успешно создан';
$string['continue'] = 'Продолжить';

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