Compare commits

...

2140 Commits

Author SHA1 Message Date
moodler 99312493b6 Bumped to Moodle 1.8.5 2008-04-08 14:48:01 +00:00
scyrma 0f4aa108d9 MDL-13792 - Commiting Patch by Skodak, fixing problem with japanese characters under some conditions. This has been reported to work, if nobody else
comes foward with bugs related to this, it will need to be changed everywhere else where there is no urlencoding done at this time.
2008-04-08 03:00:30 +00:00
moodlerobot 8e6e45aa1a Updated the 18 build version to 20080408 2008-04-08 02:01:15 +00:00
moodlerobot 040ea6d217 Automatic installer.php lang files by installer_builder (20080408) 2008-04-08 01:45:26 +00:00
diml 2e47bfb16b global sync to HEAD for passing fixes 2008-04-07 21:24:49 +00:00
diml 3702d88a6e upgrades Zend engine to version 1.5.0 2008-04-07 21:23:13 +00:00
diml 185441df1a file Wildcard.php was added on branch MOODLE_18_STABLE on 2008-04-07 21:23:15 +0000 2008-04-07 20:45:44 +00:00
diml 1394c591c6 file Range.php was added on branch MOODLE_18_STABLE on 2008-04-07 21:23:15 +0000 2008-04-07 20:45:43 +00:00
diml 278b82afec file Insignificant.php was added on branch MOODLE_18_STABLE on 2008-04-07 21:23:14 +0000 2008-04-07 20:45:43 +00:00
diml 5842492ff6 file Fuzzy.php was added on branch MOODLE_18_STABLE on 2008-04-07 21:23:14 +0000 2008-04-07 20:45:43 +00:00
diml c335b24901 file LowerCaseUtf8.php was added on branch MOODLE_18_STABLE on 2008-04-07 21:23:14 +0000 2008-04-07 20:44:21 +00:00
diml 3e70580216 file CaseInsensitive.php was added on branch MOODLE_18_STABLE on 2008-04-07 21:23:14 +0000 2008-04-07 20:43:30 +00:00
diml ae3071a0df file LockManager.php was added on branch MOODLE_18_STABLE on 2008-04-07 21:23:14 +0000 2008-04-07 20:38:19 +00:00
moodlerobot d778032a9e Updated the 18 build version to 20080407 2008-04-07 01:57:05 +00:00
stronk7 9d88867d0f Enforce DOT as decimal separator for Oracle. MDL-11629 ; backported from HEAD 2008-04-06 15:44:48 +00:00
moodlerobot 49d4be8ba5 Updated the 18 build version to 20080406 2008-04-06 01:51:26 +00:00
moodlerobot 7ca341ae94 Updated the 18 build version to 20080405 2008-04-05 01:35:54 +00:00
stronk7 b16206af1c Documenting local hack about MDL-14215 ; backporte from HEAD 2008-04-04 22:36:35 +00:00
stronk7 741859448b Fixed bug preventing correct detection of enums under mysqli. MDL-14215 ; backported from HEAD 2008-04-04 19:56:15 +00:00
stronk7 fd6024c0be Fix wrong conversion from '0' to '' in oracle_diry_hack. MDL-14182 ; backported from HEAD 2008-04-04 11:27:03 +00:00
moodlerobot 9037920594 Updated the 18 build version to 20080404 2008-04-04 01:35:25 +00:00
moodlerobot 203968ccae Automatic installer.php lang files by installer_builder (20080404) 2008-04-04 01:23:14 +00:00
stronk7 9eb290680b Fixed DST calculation when requesting explicit (parameter) timezones. MDL-14093 ; backported from HEAD 2008-04-03 18:10:21 +00:00
moodlerobot 1510c6c913 Updated the 18 build version to 20080403 2008-04-03 01:29:38 +00:00
moodlerobot faed109b67 Updated the 18 build version to 20080402 2008-04-02 03:38:59 +00:00
skodak a0a264068f MDL-13792 reverting previous commits - the use of urlencode() is not correct 2008-04-01 20:24:00 +00:00
tjhunt 8db9017fd8 MDL-8682 - once again. It won't work all the time if the javascript is inside an if statement. 2008-04-01 16:51:03 +00:00
skodak 96b4500a91 MDL-10660 reverting previous changes - see tracker 2008-04-01 08:52:19 +00:00
moodlerobot 2fbc9fcb8b Updated the 18 build version to 20080401 2008-04-01 03:33:04 +00:00
scyrma f9085923a2 MDL-13792 - Fix to prevent urlencoding of '/' 2008-04-01 01:55:00 +00:00
tjhunt c612c32231 Backport JS improvements from MDL-8682. 2008-03-31 15:09:41 +00:00
nicolasconnault f8d1a60893 MDL-13397 Fixed the language string. Merging from HEAD 2008-03-31 06:18:11 +00:00
skodak 947c93bc0a MDL-13506 backport of adodb 4.98 from MOODLE_19_STABLE 2008-03-31 06:12:48 +00:00
moodlerobot f63a256c87 Updated the 18 build version to 20080331 2008-03-31 03:34:17 +00:00
moodlerobot cdfbc956fc Updated the 18 build version to 20080330 2008-03-30 03:33:26 +00:00
stronk7 9922fbf9d6 Not visible courses don't cause unenrolment under LDAP anymore. Credit goes to Iñaki Arenaza. MDL-14097 ; backported from HEAD 2008-03-30 00:47:26 +00:00
moodlerobot 31df961fd2 Updated the 18 build version to 20080329 2008-03-29 03:28:15 +00:00
moodlerobot 288b5b4028 Updated the 18 build version to 20080328 2008-03-28 03:35:53 +00:00
moodlerobot e94ed1ae6e Updated the 18 build version to 20080327 2008-03-27 03:34:54 +00:00
scyrma 57be0ec8f7 MDL-13792 - Use urlencode for filename in upload and uploadsingle assignments to fix problems with multibytes filenames. 2008-03-27 01:48:17 +00:00
moodlerobot 1b7d1827de Updated the 18 build version to 20080326 2008-03-26 03:39:09 +00:00
moodlerobot b10c986edc Automatic installer.php lang files by installer_builder (20080326) 2008-03-26 03:24:57 +00:00
dongsheng 18dd81c215 MDL-12531 add institution to lockable fileds, thanks for your patch, Lgor Plisco 2008-03-26 00:45:06 +00:00
moodlerobot 2468aba863 Updated the 18 build version to 20080325 2008-03-25 03:34:45 +00:00
moodlerobot c4826181c8 Automatic installer.php lang files by installer_builder (20080325) 2008-03-25 03:22:08 +00:00
dongsheng 54ad70b035 MDL-10660, check whether memcache has been installed. 2008-03-25 02:16:59 +00:00
dongsheng 66feb0092d MDL-10606 Corrected course search box id 2008-03-25 01:13:34 +00:00
dongsheng c852b07683 MDL-10606, change course search box id 2008-03-25 01:01:00 +00:00
dongsheng 133e54629f MDL-13287, fix a link. 2008-03-25 00:27:35 +00:00
moodlerobot 7d9881cdea Updated the 18 build version to 20080324 2008-03-24 03:29:56 +00:00
moodlerobot 95ae6fbf1f Updated the 18 build version to 20080323 2008-03-23 03:27:50 +00:00
stronk7 169d90353f Update timezone rules to tzdata2008a. MDL-14024 ; backported from HEAD 2008-03-22 23:46:53 +00:00
moodlerobot dd6f51b926 Updated the 18 build version to 20080322 2008-03-22 03:28:19 +00:00
moodlerobot 8dea9afdee Updated the 18 build version to 20080321 2008-03-21 03:26:11 +00:00
diml 91b1bf8572 shooting out debug code see MDL-13993 2008-03-20 19:31:21 +00:00
ikawhero 948cff69a6 Fixed typo that was affecting the reordering of custom profile fields.
MDL-13909.
2008-03-20 09:13:14 +00:00
moodlerobot 1f1df4b191 Updated the 18 build version to 20080320 2008-03-20 03:33:04 +00:00
scyrma df226eb12d MDL-13959 - Fix from Eloy - this makes the timezone-related functions accept an optional parameter different from the current user timezone. (backport) 2008-03-20 03:08:06 +00:00
scyrma 88d8fff6d7 MDL-13934 - Commit patch by Eloy - prevent display of moodle docs link on redirect pages 2008-03-19 08:23:26 +00:00
moodlerobot afd64674a5 Updated the 18 build version to 20080319 2008-03-19 03:33:41 +00:00
moodlerobot 26eee29f1e Updated the 18 build version to 20080318 2008-03-18 03:35:10 +00:00
nicolasconnault 3c6767e8ad MDL-13743 Added realmedia support 2008-03-17 13:14:11 +00:00
stronk7 5bdab31478 Glossary extended search fixed. MDL-13947 ; backported from HEAD 2008-03-17 12:31:45 +00:00
moodlerobot e883fe1ab2 Updated the 18 build version to 20080317 2008-03-17 03:33:21 +00:00
moodlerobot fa6947c2cd Updated the 18 build version to 20080316 2008-03-16 03:31:33 +00:00
moodlerobot 8536a9fbc6 Updated the 18 build version to 20080315 2008-03-15 03:35:29 +00:00
moodlerobot 19a7b0aaff Automatic installer.php lang files by installer_builder (20080315) 2008-03-15 03:20:32 +00:00
moodlerobot d3b10b9746 Updated the 18 build version to 20080314 2008-03-14 03:33:02 +00:00
moodlerobot 38aa918f2f Automatic installer.php lang files by installer_builder (20080314) 2008-03-14 03:20:12 +00:00
nicolasconnault 3a9ad62295 MDL-13919 Fixed undefined variable. Merging from MOODLE_17_STABLE 2008-03-13 14:02:11 +00:00
moodlerobot efd1898dc0 Updated the 18 build version to 20080313 2008-03-13 03:34:45 +00:00
moodlerobot 719faf3548 Updated the 18 build version to 20080312 2008-03-12 03:43:56 +00:00
moodlerobot e155f2040b Automatic installer.php lang files by installer_builder (20080312) 2008-03-12 03:30:01 +00:00
danmarsden ec8d4ea9cd MDL-9666 Merged from 1.9 and HEAD 2008-03-11 23:44:17 +00:00
ethem 0425032153 Race condition in cron for Scheduled-Capture (very very big sites and order review enabled only).
In one cron, 250-500 orders may be processed (based on 5 minutes).
If an admin sets cron time up smaller than 5 minutes and
250-500> new transactions are made after last cron executed, it can be blocked.
Authorize cron sets up an_lastcron every time when admin/cron.php executes.
This must be set up after blocking check code.

As result, if pending orders aren't accepted with in 30 days at payment management page, they expired and users cannot enrol.
When an admin enabled order review, he is guaranteed 'Payment managers accept/deny transactions manually'.
Scheduled-Capture is designed for forgotten orders only ;)

Backported from HEAD.
2008-03-11 08:33:18 +00:00
moodlerobot d00f6bbccf Updated the 18 build version to 20080311 2008-03-11 03:45:53 +00:00
moodlerobot 2e43c17e57 Automatic installer.php lang files by installer_builder (20080311) 2008-03-11 03:29:59 +00:00
pichetp 8d7c19f5d1 MDL-12503 Loguniform and MDL-12421 rounding merging from head and 1.9 STABLE 2008-03-10 20:28:18 +00:00
andreabix e99f828c35 Fixed [MDL-12830] 2008-03-10 15:58:44 +00:00
andreabix 5d65584d34 Fixed label line height in course page 2008-03-10 15:32:11 +00:00
moodlerobot 92cb423293 Updated the 18 build version to 20080310 2008-03-10 04:27:06 +00:00
gbateson 7c3f0706a0 add "mp3" (used by DewPlayer) to the list of query string parameters to search for when converting relative urls to absolute urls 2008-03-10 01:35:51 +00:00
stronk7 9ebd5c666d Ensure only target groups_members are added to backup. MDL-12453 ; backported from HEAD 2008-03-09 17:33:17 +00:00
urs_hunkler df5be4fb9c set chameleonteachereditenabled to false as default. 2008-03-09 12:09:43 +00:00
moodlerobot 75b281a8a1 Updated the 18 build version to 20080309 2008-03-09 03:47:08 +00:00
moodlerobot dc01248261 Updated the 18 build version to 20080308 2008-03-08 03:52:40 +00:00
moodlerobot e4aad71ea4 Automatic installer.php lang files by installer_builder (20080308) 2008-03-08 03:37:18 +00:00
scyrma 79d00fd3af MDL-12860 - Patch from Joseph Rézeau, to fix a problem in the display of lesson result when using regexp. 2008-03-07 04:52:23 +00:00
moodlerobot 9456e28c08 Updated the 18 build version to 20080307 2008-03-07 03:52:09 +00:00
moodlerobot 7649ed1209 Automatic installer.php lang files by installer_builder (20080307) 2008-03-07 03:37:11 +00:00
gbateson 87042d5731 remove trailing whitespace on every line and standardize line endings 2008-03-06 07:39:21 +00:00
gbateson efcbd12a39 fix for Moodle 1.8 and 1.9 to allow students to access hidden hotpots which form part of a hotpot chain - see http://moodle.org/mod/forum/discuss.php?d=91861. In Moodle 1.8 and later the "require_login" function (lib/moodlelib.php) is stricter than in earlier versions of Moodle and checks a module's visibility and groupings access. From Moodle 2.0 on, this HotPot module does not need this fix. 2008-03-06 07:24:44 +00:00
moodlerobot 8efcefe411 Updated the 18 build version to 20080306 2008-03-06 04:03:59 +00:00
moodlerobot 751f367170 Updated the 18 build version to 20080305 2008-03-05 05:41:04 +00:00
moodler 528029df3f Merged release display fixes from 1.9 2008-03-05 05:38:04 +00:00
stronk7 b6a671d653 Simplify anydb_escape_string() to use simple-cross-db addslashes(). MDL-13793 ; backported from 19_STABLE 2008-03-04 23:42:00 +00:00
moodlerobot d8a7a8f691 Automatic installer.php lang files by installer_builder (20080304) 2008-03-04 03:47:39 +00:00
moodler 09e3e4efb6 Merged MDL-13717 Applied hack from Nicklas to fix sitemp etc. It worked for me in a quick test. 2008-03-02 01:25:18 +00:00
skodak e7d53ba351 MDL-13705 2008-03-01 13:11:58 +00:00
moodlerobot 558d74308f Automatic installer.php lang files by installer_builder (20080229) 2008-02-29 03:33:28 +00:00
tjhunt 1ba41a5caf MDL-12695 - Symantec Norton internet security pop up blocker seems to be stopping user starting a quiz attempt. Backport Jamie's fix from 1.9 now that it has had a time to cook and hasn't thrown up any problems. 2008-02-28 22:09:40 +00:00
skodak 41cc574f95 MDL-13705 2008-02-28 21:18:41 +00:00
skodak 5a7aef9c1c MDL-13705 2008-02-28 21:01:42 +00:00
pichetp 152f2f68ce MDL-13720 removing $files parameter from 1.9 version 2008-02-28 19:40:24 +00:00
tjhunt 7f761c27eb MDL-13189 - replace the $QTYPE_MENU global with a function call, so that we can set up the language strings later, after $COURSE is initialised. This ensures that the quesion names appear in the right language. 2008-02-28 12:53:05 +00:00
moodlerobot 0ce6c76982 Automatic installer.php lang files by installer_builder (20080228) 2008-02-28 03:37:58 +00:00
andreabix 6219090e2c Fixed MDL-12564 2008-02-27 17:38:19 +00:00
moodlerobot a0ea30a741 Automatic installer.php lang files by installer_builder (20080227) 2008-02-27 03:40:05 +00:00
moodler a40cd98d67 Merged MDL-13569 Mark N patch for notice 2008-02-26 09:06:39 +00:00
moodler d84e26d2c4 MDL-9367 Fix doc links for auth pages 2008-02-26 05:50:05 +00:00
skodak c8d51449f7 MDL-13237, MDL-13661 - fixing rcache regression, sorry :-(; merged from MOODLE_19_STABLE 2008-02-25 15:16:21 +00:00
poltawski b2fb1d4096 MDL-9667 - convert_tree_to_html doesn't set css class properly if
$tab->linkedwhenselected is set

Patch from Jeff Graham
backported from MOODLE_19_STABLE
2008-02-25 11:59:10 +00:00
skodak 2459ecc419 MDL-13565 Tracking forum fixes; merged from MOODLE_19_STABLE 2008-02-24 10:55:53 +00:00
moodlerobot 48441521aa Automatic installer.php lang files by installer_builder (20080223) 2008-02-23 03:24:57 +00:00
moodlerobot 2101eddc89 Automatic installer.php lang files by installer_builder (20080222) 2008-02-22 03:35:58 +00:00
tjhunt 33cc11661b MDL-13551 - preview question capability wrongly denied to student who has moodle/question:manage capability - This was already fixed in 1.9. 2008-02-21 22:34:45 +00:00
nicolasconnault 7e507929e6 MDL-13465 Implemented Martin's solution 2008-02-21 09:15:57 +00:00
moodler e671b92a2a Revert bad strings MDLSITE-359 2008-02-21 05:53:11 +00:00
moodler 53f5364123 MDL-13554 Fix from Mark Nielsen for bad block backups 2008-02-21 05:33:15 +00:00
moodlerobot 5b2f502112 Automatic installer.php lang files by installer_builder (20080221) 2008-02-21 03:38:25 +00:00
moodlerobot 34126fd8f1 Automatic installer.php lang files by installer_builder (20080220) 2008-02-20 03:35:16 +00:00
moodler fed8004f56 MDL-12277 Fixes relating to message sending from participants page in non-english 2008-02-20 02:20:57 +00:00
pichetp 74a2040332 Mergging from head MDL-12255 Adding questiontext decoding and subquestions validation 2008-02-19 23:39:45 +00:00
pichetp 9a5d3d9d3d Merging MDL-12063 from HEAD qtype_questions where left orphans when questions when deleted or
qtype change
2008-02-19 18:01:11 +00:00
tjhunt cda98581a5 Fix dangerous comment. (MDL-13536) 2008-02-19 17:14:13 +00:00
skodak 5e75f98c71 MDL-11816 fixed wiki export with quick hack; merged from MOODLE_19_STABLE 2008-02-19 11:06:24 +00:00
urs_hunkler 2dc20107b9 Added h1 - h4 fontsizes. Disabled the Chameleon engine by default. Wrote a short hint about the intearactive editing in the README. 2008-02-19 07:51:29 +00:00
moodler cd6323f517 MDL-13489 Merged fixes from 1.9 2008-02-19 06:55:54 +00:00
skodak cee5f24cc3 MDL-12382 allow admins to access any course - including courses where they have guest role and course does not allow guests; merged from MOODLE_19_STABLE 2008-02-18 23:38:37 +00:00
skodak a2e587548e MDL-12382 allow admins to access any course - including courses where they have guest role and course does not allow guests; merged from MOODLE_19_STABLE 2008-02-18 23:37:56 +00:00
moodlerobot 56e5cb78a8 Automatic installer.php lang files by installer_builder (20080218) 2008-02-18 03:33:55 +00:00
donal 5a3951e035 MDL-12492: Thanks to Nigel McNie, this addresses a problem which prevents hosts from re-keying when their keys expire. 2008-02-15 08:32:26 +00:00
donal bc1982446c Write to the log when the SSL key is created 2008-02-15 08:10:53 +00:00
donal eb3deee548 Remove unneeded mnet_host2service records 2008-02-15 08:04:24 +00:00
moodlerobot 262bc9a40b Automatic installer.php lang files by installer_builder (20080215) 2008-02-15 03:36:16 +00:00
nicolasconnault b8d8a34565 MDL-13430 I can only see this issue in the assignment submissions page. 2008-02-14 07:17:52 +00:00
donal a29910300d Ensure that the wwwroot has been supplied with a http:// or https:// prefix 2008-02-13 03:06:54 +00:00
pichetp d79dfb8586 merging MDL-13429 Go button problem from 1.9 2008-02-13 02:55:27 +00:00
donal 30f5739a46 MDL-12492: This patch addresses a problem which prevents hosts from re-keying when their keys expire. 2008-02-12 22:27:49 +00:00
nicolasconnault 1e51f8fa07 MDL-13397 Implemented the requiredentries parameter (previously not implemented). This includes a warning message and an SQL restriction on entries fetched for view.php 2008-02-12 15:54:20 +00:00
ethem 3211d8b265 Merged from MOODLE_17_STABLE 2008-02-11 15:31:10 +00:00
moodlerobot c9ab907641 Automatic installer.php lang files by installer_builder (20080209) 2008-02-09 03:32:45 +00:00
poltawski c095ae4364 MDL-13354 - wrong capability checked for view report link 2008-02-08 09:59:18 +00:00
moodler c9534efc10 Merged (sortof) fix from MDL-13378 2008-02-08 04:01:20 +00:00
moodlerobot 7edb720ac8 Automatic installer.php lang files by installer_builder (20080208) 2008-02-08 03:27:25 +00:00
poltawski 244cb43dff MDL-13339 - ensure we don't continue the restore process if there is
no course header in the backup file. This bug was causing blank course
records to be created when users tried to restore a non-moodle backup file
such as a scorm file.
backported from MOODLE_19_STABLE
2008-02-07 18:50:01 +00:00
ethem 2b72207cc3 Cron handles all expired unenrolments. It is time to use own enrolment method when calling funcs enrol_into_course, role_assign.
Zend Studio Warning: Assignment in condition (line XX), Solved, one more ()

Merged from MOODLE_17_STABLE
2008-02-07 16:18:48 +00:00
moodler a9aecc7b14 Fix subject lines and corrupted emails from messages MDL-13364 (merged) 2008-02-07 05:20:00 +00:00
gbateson c814ba2c1e MDL-13328 correct the counting of attempts when clickreporting has been enabled 2008-02-07 04:18:47 +00:00
moodlerobot 8823667015 Added missing lang 2008-02-07 03:30:27 +00:00
moodlerobot 6ffb4d547c file installer.php was added on branch MOODLE_18_STABLE on 2008-02-07 03:30:27 +0000 2008-02-07 03:29:58 +00:00
moodlerobot 3434f2553a Automatic installer.php lang files by installer_builder (20080207) 2008-02-07 03:24:04 +00:00
poltawski 1877680610 MDL-13314 count_role_users was showing different count to those returned from
get_role_users(), based on patch from Patrick Pollett
backported from MOODLE_19_STABLE
2008-02-06 14:49:57 +00:00
nicolasconnault 8fc5a75c11 MDL-6826 Removed the optional_param lines at the top, and set the submit buttons to PARAM_RAW. Also changed !empty() to isset() 2008-02-06 10:24:26 +00:00
stronk7 eda7a6b347 Backported from HEAD. Some old backups can contain empties in user->picture, fix them before insert. 2008-02-05 20:31:59 +00:00
andreabix 5d4b57cb07 Added missing classes
.rolecap .inherit.capdefault, .rolecap .allow.capdefault {
  background-color:#E3DFD4;
}

#admin-roles-override .capcurrent {
  background-color:#E3DFD4;
}
2008-02-05 18:52:31 +00:00
nicolasconnault 502e8e4c30 MDL-12158 Applied Matt's patch, merging from 1.7 2008-02-05 10:38:44 +00:00
nicolasconnault 93f56c2a9d MDL-10451 Fixed HTML errors 2008-02-05 09:49:43 +00:00
gbateson 98e8766b5b MDL-10451 remove extraneous closing </b> tag from lang/en_utf8/help/hotpot/outputformat.html 2008-02-05 04:20:47 +00:00
gbateson 5d5f22570f MDL-13048 fix undefined course id when importing a Hot Potatoes quiz into the Lesson module 2008-02-05 04:09:38 +00:00
moodler 88540a03e6 Merged logic fix for MDL-6826 from 1.9 2008-02-05 03:19:06 +00:00
skodak 7a222aa46e MDL-12976 workaround for unsupported false in update_record() 2008-02-04 23:54:40 +00:00
skodak 0dbc56ee8b MDL-7734 fixed global $COURSE 2008-02-04 21:12:45 +00:00
urs_hunkler 7c3bf2a16b MDL-13329 :: Buttons in the sidblocks looked quite different in the different browsers. Changed several CSS aspects to make them look more similar, specially added IE "hacks". 2008-02-04 20:50:12 +00:00
nicolasconnault c0d26d69f8 MDL-6826 Removed "changes" from both buttons, and implemented Tatsuya's patch 2008-02-04 12:57:32 +00:00
scyrma d33c47e381 MDL-13060 - removing old entries fro VA and CD 2008-02-04 00:48:25 +00:00
urs_hunkler 75d6eaaf31 MDL-13268 :: CSS added 2008-02-03 16:53:51 +00:00
moodler 6c5baec1b5 Automatic installer.php lang files by installer_builder (20080203) 2008-02-03 03:34:09 +00:00
stronk7 fdc6e017b5 Backported from HEAD. Add some browser output when restoring a lot of users. 2008-02-03 00:53:08 +00:00
skodak c7d80b3a25 MDL-13276 fixed footer when selecting file on frontpage 2008-02-02 21:10:45 +00:00
moodler 2979aead19 Automatic installer.php lang files by installer_builder (20080202) 2008-02-02 03:42:35 +00:00
skodak 68e9ee7163 MDL-13220 rebuild course cache after ajax edits - patch by Myles Carrick; merged from MOODLE_19_STABLE 2008-02-01 08:23:38 +00:00
moodler 7b462b46f0 Automatic installer.php lang files by installer_builder (20080201) 2008-02-01 03:37:18 +00:00
gbateson 8297db894e fix for MDL-13174 : replace calls to html_entity_decode() with hotpot_charcode_to_utf8() because html_entity_decode is broken in PHP 4 2008-01-31 07:25:47 +00:00
moodler 4babe7c31f MDL-13263 Add nopostforum string 2008-01-31 05:50:45 +00:00
moodler 000f9787f6 Automatic installer.php lang files by installer_builder (20080131) 2008-01-31 03:43:31 +00:00
scyrma 020fe631c3 MDL-11594 - Changes in image location broke chameleon 2008-01-31 00:35:27 +00:00
poltawski 970166d4ac MDL-13221 - doing wrong capability check for hidden activites. But we
don't need it at all as require_login() with the $cm argument does the
check for us
backported from MOODLE_19_STABLE
2008-01-30 20:44:08 +00:00
tjhunt df6447ef65 MDL-13110 - Manually grading random questions does not work. Fix thanks to Ken Burres. 2008-01-30 18:18:38 +00:00
mchurch 203b990fb0 MDL-13252 Fix context to always use course context, rather than instance->page. 2008-01-30 16:38:03 +00:00
scyrma ab6bd700d8 Imported and replaced country list to fix MDL-13060. The new list is the exact ISO list. Note that an official list also exists in French, but we will need to
do translations to other languages.  This commit also includes the restorelib upgrade path.
2008-01-30 07:49:47 +00:00
moodler e629e57a2b Automatic installer.php lang files by installer_builder (20080130) 2008-01-30 03:39:30 +00:00
skodak a8cd1b57da MDL-13237 rceche limiting through intcachemax finally implemented - this should prevent major memory leaks; backported from MOODLE_19_STABLE 2008-01-29 17:52:11 +00:00
scyrma 89d98b923b Upgrade path for MDL-13060. 2008-01-29 05:48:07 +00:00
moodler de13f5b6fd Automatic installer.php lang files by installer_builder (20080129) 2008-01-29 03:35:46 +00:00
moodler 098a26f514 Fixed PHP5 constructor for pdf which was overwriting values MDL-13207 2008-01-28 05:25:49 +00:00
moodler 802f6e34d7 Automatic installer.php lang files by installer_builder (20080128) 2008-01-28 03:39:23 +00:00
moodler d0494b6ec0 Fixed missing context argument MDL-13206 2008-01-28 03:22:41 +00:00
moodler f8faba784a Latest tags for 1.8 2008-01-28 03:15:40 +00:00
stronk7 a3534169ae Rename lesson->usegrademax to lesson->usemaxgrade. Some old sites can have it incorrect. MDL-13177 2008-01-27 15:28:11 +00:00
gbateson c447099bda fix for MDL-13173: quotes in HotPot activity name 2008-01-26 08:26:38 +00:00
moodler 14c5382464 Automatic installer.php lang files by installer_builder (20080126) 2008-01-26 03:30:58 +00:00
stronk7 e70e08fa8e Adding some missing parts to scheduled backup. MDL-10721
(will continue tomorrow with 19_STABLE and HEAD)
2008-01-26 01:15:24 +00:00
poltawski 2328428fe1 MDL-13068 - fix typo causing course delete to fail
backported from MOODLE_19_STABLE
2008-01-25 21:10:44 +00:00
nicolasconnault 123dcabe68 MDL-13043 get_users_listing() always returned the guest account, which was then used in the user count on this page. I made this inclusion conditional, and the bug disappeared. 2008-01-25 15:56:51 +00:00
nicolasconnault 1c1b5fc676 MDL-13043 get_users_listing() always returned the guest account, which was then used in the user count on this page. I made this inclusion conditional, and the bug disappeared. 2008-01-25 15:32:11 +00:00
moodler 89f02fd6b2 Merged choice fix for $current notice from 1.9 2008-01-25 06:28:26 +00:00
stronk7 3efca70fda General cleanup of backup users. Part of MDL-10721 2008-01-25 00:37:58 +00:00
nicolasconnault 24ab562c73 MDL-6826 backporting new "save changes and return to course" button for all modules' edit and add forms. 2008-01-24 19:23:10 +00:00
stronk7 3dcb2cda36 role_assignments are only exported for target users. MDL-13115 2008-01-24 18:44:11 +00:00
tjhunt e3d41efc04 MDL-13096 - Student can view all text for all questions in a course. 2008-01-24 15:26:58 +00:00
tjhunt 1b3fa338bb MDL-13150 - Remove extra <br /> tag for XHTML strict validation - Thanks to Joseph R?zeau 2008-01-24 15:06:46 +00:00
moodler 5a01c73780 Automatic installer.php lang files by installer_builder (20080124) 2008-01-24 04:05:27 +00:00
scyrma ba33284ca1 MDL-8810: changing require_once to include_once when looking for mod/.../lib.php 2008-01-24 02:26:15 +00:00
stronk7 5a661304aa Now the backup->users = none setting is properly populated to all
modules / instances, saving a lot of info to be always written. MDL-13115
2008-01-24 00:40:51 +00:00
mchurch f653c544e9 MDL-12694: Same change as in 1.9. Files that can be embedded will be embedded regardless of resource frame settings. 2008-01-23 16:32:30 +00:00
scyrma 52d3a9e351 MDL-8123 and MDL-11594 : make admin icons themeable. 2008-01-23 06:09:58 +00:00
scyrma b94db131e5 file open.gif was added on branch MOODLE_18_STABLE on 2008-01-23 06:09:59 +0000 2008-01-23 05:53:34 +00:00
scyrma 7cc7b0c033 file item.gif was added on branch MOODLE_18_STABLE on 2008-01-23 06:09:58 +0000 2008-01-23 05:53:34 +00:00
scyrma 81c049d9c2 file closed.gif was added on branch MOODLE_18_STABLE on 2008-01-23 06:09:58 +0000 2008-01-23 05:53:34 +00:00
moodler d119a6f42f Merged workshop disable from 1.9 MDL-13100 2008-01-23 04:39:45 +00:00
moodler f032a4bebd file defaults.php was added on branch MOODLE_18_STABLE on 2008-01-23 04:39:45 +0000 2008-01-23 04:38:43 +00:00
moodler 8b45b8e0a6 Automatic installer.php lang files by installer_builder (20080123) 2008-01-23 03:43:30 +00:00
moodler 27b1710b01 Automatic installer.php lang files by installer_builder (20080122) 2008-01-22 03:37:15 +00:00
poltawski 98928f94e9 MDL-9605 - fixed missing string which wasn't merged to 1.8 2008-01-21 16:46:36 +00:00
gbateson 0ee8a5280e fix MDL-13047 in which an invalid SQL was generated when the were no attempts which match the conditions for the required HotPot report 2008-01-21 08:21:22 +00:00
gbateson 4855134e63 fix Undefined property: stdClass::$studentfeedbackurl (line 282) and stdClass::$cellcontent2 (line 1081) in mod\hotpot\lib.php 2008-01-21 07:17:08 +00:00
moodler 96be763dc5 Automatic installer.php lang files by installer_builder (20080121) 2008-01-21 03:36:24 +00:00
moodler 8a8d3515d3 Automatic installer.php lang files by installer_builder (20080120) 2008-01-20 03:34:27 +00:00
mudrd8mz b59914d977 MDL-12291 help.php is now able to skip _local langpacks 2008-01-19 21:54:04 +00:00
skodak 4dc48514e5 MDL-13052 edit/user.php typo; merged from MOODLE_19_STABLE 2008-01-18 17:13:57 +00:00
skodak ac470e064e MDL-13029 Typo in groups_members_join_sql - patch by Chris Bandy 2008-01-18 10:31:00 +00:00
skodak 4b3f2d3739 MDL-12977 adding missing global $CFG 2008-01-18 10:18:47 +00:00
skodak b8ca891023 MDL-11759 group edit cleanup 2008-01-18 10:07:29 +00:00
moodler 70acd53078 Automatic installer.php lang files by installer_builder (20080118) 2008-01-18 03:38:22 +00:00
poltawski f1cac46f00 MDL-13039 - fix missing strings 2008-01-17 14:56:13 +00:00
moodler 990ae1bb9d Automatic installer.php lang files by installer_builder (20080117) 2008-01-17 03:39:22 +00:00
poltawski 904eea079b MDL-13003 - dont initalise array keys twice.. 2008-01-16 15:10:20 +00:00
scyrma 676174682e Fix for MDL-9669 : make it possible to specify 0 as cellpadding and cellspacing 2008-01-16 07:37:31 +00:00
moodler 870c9c02b3 Automatic installer.php lang files by installer_builder (20080116) 2008-01-16 03:35:59 +00:00
thepurpleblob 7356223a7d MDL-12016:
Read xml structure correctly to get category path
2008-01-15 14:58:10 +00:00
thepurpleblob 9deccd7a44 Reverting Mike C's change in MDL-12016 2008-01-15 14:37:11 +00:00
ethem 5580a59ba7 Tidy up 2008-01-15 10:58:24 +00:00
ethem 7bf7c697d3 MDL-12958 In the Authorize enrol plug-in when a credit card expiry date (year) is entered, a validate error is generated blocking credit card usage 2008-01-14 17:58:06 +00:00
moodler c539258b52 Moved to + after release 2008-01-14 08:55:06 +00:00
moodler 0c9945f5c6 Automatic installer.php lang files by installer_builder (20080114) 2008-01-14 03:50:26 +00:00
poltawski 74ec307700 reverting bad commit, sorry 2008-01-13 18:55:47 +00:00
poltawski f4687e66e7 MDL-8269 - stats wasn't paying attention to run time settings as the strtotime arguments were the wrong way round. Thanks to Mark Nielsen
backported from MOODLE_19_STABLE
2008-01-13 18:47:51 +00:00
urs_hunkler b4ed6f7392 MDL-12564 :: added font-family to the arrow properties. 2008-01-13 17:51:25 +00:00
moodler 54d9b6d847 Automatic installer.php lang files by installer_builder (20080113) 2008-01-13 03:32:30 +00:00
urs_hunkler 83941d0192 MDL-11154 :: added the missing code. 2008-01-12 18:38:31 +00:00
urs_hunkler 9109202550 MDL-9306 :: explanation added for hooks as comma separated lists in Chameleon. 2008-01-12 16:30:02 +00:00
urs_hunkler 669b80b1e2 MDL-11486 :: added width to the adminblock 2008-01-12 14:50:45 +00:00
urs_hunkler 49f5a957cd MDL-12210 :: set background-color: none to transparent 2008-01-12 14:31:20 +00:00
skodak c35b90ebed MDL-12914 Register globals trouble; backported from MOODLE_19_STABLE 2008-01-11 23:24:00 +00:00
moodler 68f67bbe75 Bumping to 1.8.4 2008-01-11 14:47:22 +00:00
poltawski 099d1c8f62 MDL-12400 - superfluous required_param causing problems in upload
assignment user report.
backported from MOODLE_19_STABLE
2008-01-11 11:47:23 +00:00
moodler e599ca7241 Automatic installer.php lang files by installer_builder (20080111) 2008-01-11 03:37:56 +00:00
skodak 19226c30b5 MDL-12911 fixed permission checks 2008-01-10 15:08:08 +00:00
moodler ccd33d6b19 Added support for db folders MDL-12904 2008-01-10 03:50:52 +00:00
moodler 4de6676739 Automatic installer.php lang files by installer_builder (20080110) 2008-01-10 03:36:28 +00:00
poltawski ae817db2f8 MDL-12889 - fix bad invalid capability check 2008-01-09 15:43:37 +00:00
arborrow e93291d5ee MDL-12889 - uncommitting previous change - since grade:viewall is new to 1.9 (my bad) 2008-01-09 15:17:39 +00:00
arborrow cfe0874655 MDL-12889 - bad capability check [thanks Tim!] in assignment recent activity report
merged from MOODLE_19_STABLE
2008-01-09 15:06:59 +00:00
moodler 75ed3a0add MDL-12801 Slight modifications to roles terminology to make it more consistent
"Global" and "Core" -->  "System" everywhere to match code and most docs
2008-01-09 06:46:44 +00:00
poltawski 6b3eca01f2 MDL-12882 - we were caching empty records which caused clone warnings
backported from MOODLE_19_STABLE
2008-01-08 20:21:30 +00:00
tjhunt 51f90f8839 MDL-12785 - Partially correct tick icon not displayed for MULTICHOICE, single answer questions. Fix thanks to Joseph R?zeau. 2008-01-08 18:28:51 +00:00
poltawski 99797689e6 MDL-9372 - only show RSS options in database module when RSS is enabled
backported from MOODLE_19_STABLE
2008-01-08 13:43:42 +00:00
poltawski 841dca3991 MDL-10813 - Course requests not respecting course request category.
Also made the course request category more robust, as breakage would
incur if $CFG->defaultrequestcategory didn't exist as a category.

backported from MOODLE_19_STABLE
2008-01-08 12:55:13 +00:00
skodak 28fb4d1027 MDL-12869 fixed minor security problem in installer - reported by hanno; backported from MOODLE_19_STABLE 2008-01-08 07:20:35 +00:00
martinlanghoff e54510d166 dmllib:rcache_set()/rcache_get() - use clone() function which we can support in PHP4 - MDL-12827 2008-01-08 04:15:48 +00:00
moodler 72cd33b6f4 Automatic installer.php lang files by installer_builder (20080108) 2008-01-08 03:36:41 +00:00
iarenaza c10708e9ce MDL-12858 fix print_error() usage.
print_error()'s third parameter is the URL we jump to (defaults to
$CFG->wwwroot if not set) when we click the 'Continue' button, not the message
string parameter object.
2008-01-07 23:40:12 +00:00
moodler ef1da4973c Automatic installer.php lang files by installer_builder (20080107) 2008-01-07 03:33:24 +00:00
moodler bd4c23edf3 Automatic installer.php lang files by installer_builder (20080106) 2008-01-06 03:22:02 +00:00
thepurpleblob 8354fc630f MDL-12701:
Missing string
2008-01-04 21:03:14 +00:00
nicolasconnault 737b745890 MDL-12827 Saving a clone of the $record in the cache instead of the record itself, to avoid referencing 2008-01-04 09:23:35 +00:00
nicolasconnault abd67b8e7f MDL-12429 Applied and tested Fran?ois' patches to 1.8, 1.9 and head. 2008-01-04 06:46:00 +00:00
moodler b70a71f3eb Automatic installer.php lang files by installer_builder (20080104) 2008-01-04 03:28:20 +00:00
poltawski 673b34647a MDL-12825 - add some extra height to popups in IE7, otherwise they cant
be used - backported from MOODLE_19_STABLE
2008-01-03 22:41:06 +00:00
moodler 1539445279 Automatic installer.php lang files by installer_builder (20080103) 2008-01-03 03:21:22 +00:00
skodak 9346aeddae MDL-9744 passwork field for ldap bind pw - patch by Iñaki Arenaza 2008-01-02 22:52:43 +00:00
stronk7 fba5ee935b Respect case of enumvalues. MDL-12803 2008-01-02 16:45:47 +00:00
skodak 2edb5cbdc4 MDL-12793 PARAM_HOST incorrect cleaning; backported from MOODLE_19_STABLE 2008-01-01 17:24:08 +00:00
stronk7 b3ed7949fb Better behaviour for "-" course searches under MSSQL and Oracle. MDL-7312 ; merged from 17_STABLE 2008-01-01 11:56:16 +00:00
moodler 4100f63ab4 Automatic installer.php lang files by installer_builder (20080101) 2008-01-01 03:12:18 +00:00
stronk7 06553cdb82 Removed old timezones file. MDL-12024 2007-12-31 15:26:30 +00:00
stronk7 34a90b1d22 Moving from old "timezones" location to the new "timezone" one. MDL-12024 2007-12-31 14:59:24 +00:00
stronk7 598100a16b Adding new (1976) timezone rules (africa, antarctica,
asia, australasia, europe, northamerica, southamerica).
CSV generated with 2007j olson files. MDL-12024
2007-12-31 13:20:36 +00:00
moodler 514dc2d92a Automatic installer.php lang files by installer_builder (20071231) 2007-12-31 03:16:09 +00:00
mark-nielsen beca85894e Fix for MDL-10752 (mostly a backport from MOODLE_19_STABLE or later) 2007-12-30 19:07:23 +00:00
moodler 022acf5df4 Automatic installer.php lang files by installer_builder (20071230) 2007-12-30 03:13:24 +00:00
poltawski 7d39e1b828 MDL-9925 - When a user presses cancel on restore they are sent to
/admin/. For teachers this gives an ugly access denied message,
so instead send them back to the course they came from.

Thanks to Wen Hao Chuang for the fix!

backported from MOODLE_18_STABLE
2007-12-29 23:45:38 +00:00
mark-nielsen 300185b2e4 Fixes for MDL-12383 and MDL-12605 2007-12-29 22:46:38 +00:00
mark-nielsen 20dce6a07d Fix for MDL-12605 2007-12-29 22:14:11 +00:00
mark-nielsen d630b81286 Fix for MDL-11900 2007-12-29 21:48:18 +00:00
mark-nielsen a59b768dee Fix for MDL-12606 2007-12-29 21:13:56 +00:00
mark-nielsen 338f490b98 Fix for MDL-12610: Ordering of jumps. Also fixed jump display for matching questions and a small display bug for matching questions. 2007-12-29 20:37:24 +00:00
moodler 37bff835b0 Automatic installer.php lang files by installer_builder (20071229) 2007-12-29 03:15:03 +00:00
stronk7 d0a2161941 Prevent race condition in event creation. MDL-5956.
Credit goes to Penny, Luke and Martin @ Catalyst.

Merged from MOODLE_17_STABLE
2007-12-28 18:39:50 +00:00
mchurch 757bc06941 MDL-12703 - Use the 'welcometocourse' language string if there is no 'welcomemessage' property set in the course object. Currently, there does not seem to be any code or data items that would set this property. 2007-12-28 17:10:34 +00:00
mchurch a20f71c7ef MDL-12704 - Added error handling to print_recent_activity() to prevent fatal errors in the case of missing files. 2007-12-28 15:56:21 +00:00
iarenaza 8a60457e13 MDL-12323 MDL-4061 Don't connect to the LDAP server if update external is not set for any field. 2007-12-28 12:03:12 +00:00
moodler 90dc0f3071 Automatic installer.php lang files by installer_builder (20071228) 2007-12-28 03:31:12 +00:00
mchurch 7cdb6ee4a9 MDL-12744 - Add ability to pass an extra button for use in print header for modules that use the course page to display themselves with blocks. 2007-12-27 21:25:19 +00:00
poltawski 5a8100234f MDL-12459 - fix missing quotes breaking navigation, thanks to Katja Krüger 2007-12-27 09:39:12 +00:00
skodak 1c6f3513d9 MDL-11927 setting proper cookie path - backported from MOODLE_19_STABLE 2007-12-26 23:02:30 +00:00
skodak fcfe44d8b4 MDL-11783 no uploads after finalising; backported from MOODLE_19_STABLE 2007-12-25 22:04:17 +00:00
skodak 28f18faa37 MDL-12338 prevent KSES from breaking í chars in alt/title tags - credit goes to Eloy; backported from MOODLE_19_STABLE 2007-12-25 20:57:23 +00:00
moodler 8e4a35943c Automatic installer.php lang files by installer_builder (20071225) 2007-12-25 03:14:48 +00:00
moodler 18284d3f65 Automatic installer.php lang files by installer_builder (20071224) 2007-12-24 03:18:52 +00:00
poltawski 45ee48d990 MDL-10611 - backslashes in username get doubled up with an nonsuccessful log in 2007-12-23 16:39:57 +00:00
poltawski abae4967bc MDL-10241 - unenrolling self wasn't working properly from user profile
because unenrol.php was doing wrong capability check when $userid set.o
Also improves the lanaguage used when unenrolling self.
2007-12-23 16:15:29 +00:00
skodak 6417390ca5 MDL-12705 disabled guest autoogin in upgrade scripts; backported from MOODLE_19_STABLE 2007-12-22 18:18:20 +00:00
nfreear 32db125642 Merged MDL-7493 further fix: strip_tags from title strings because the titles may have HTML in them.
-From Martin D/moodler in moodleblock.class.php - thanks.
2007-12-21 11:32:13 +00:00
moodler 13b78aa854 Automatic installer.php lang files by installer_builder (20071221) 2007-12-21 03:21:35 +00:00
poltawski 877c237cf5 MDL-12638 fixed typo, backported from MOODLE_19_STABLE 2007-12-20 16:20:09 +00:00
diml 8ed5c68a7f try update Zend directory to 1.9 equivalent 2007-12-19 22:08:24 +00:00
diml 54b9c5feb0 try update Zend directory to 1.9 equivalent 2007-12-19 21:59:41 +00:00
nfreear 03c03e08cc Followup for MDL-7493... - Finally the correct images! fix transparency, and improve contrast in Windows High Contrast Black mode. Merged. 2007-12-19 13:41:43 +00:00
mchurch 3dc3b31e77 Fixing warning that can break uploads. 2007-12-19 00:04:05 +00:00
nfreear 51f2cdd803 Fixes reopened MDL-7493... - foreground show/hide block icon/ALT text switched with Javscript. Merged. 2007-12-18 17:43:00 +00:00
tjhunt b12c6f2b1c MDL-12635 - Manual grading report does not check capabilites - also, only show the tabs for the reports people can access. Backported from MOODLE_19_STABLE. 2007-12-18 16:12:27 +00:00
moodler 2c15845dfb Automatic installer.php lang files by installer_builder (20071218) 2007-12-18 03:24:09 +00:00
skodak f4b987c7a4 MDL-12524 fixed quoting of phrases in mail header (problem with special chars in names of users); backported from MOODLE_19_STABLE 2007-12-17 21:40:25 +00:00
diml 61bfc7eaa1 Resolving MDL12577 2007-12-17 21:10:11 +00:00
skodak f6a9b4c9b8 MDL-12596 Timezone problem in PHPMailer RFCDate() Function - patch submitted by Leo Gaggl; backported from MOODLE_19_STABLE 2007-12-16 14:51:40 +00:00
skodak cd268329ef MDL-12597 fixed short php bugs; backported from MOODLE_19_STABLE 2007-12-16 14:14:42 +00:00
skodak 32b0172953 MDL-12581 fixed multiple xhtml strict; backported from MOODLE_19_STABLE 2007-12-15 16:06:44 +00:00
skodak 56d0ff42c0 MDL-8992 eoas hack added only when really needed, removed slow fullclone; backported from MOODLE_19_STABLE 2007-12-15 13:22:10 +00:00
stronk7 fc137768fd Version bump by delta. Modify some timezone fields to accept new olson files. MDL-12024 2007-12-14 23:33:03 +00:00
stronk7 5220582ed7 Modify some timezone fields to accept new olson files. MDL-12024 2007-12-14 23:27:27 +00:00
skodak 0b3cc31c2e MDL-12221 backported basic layout containers from MOODLE_19_STABLE - themes compatibility 2007-12-14 21:38:40 +00:00
toyomoyo e1cd6c73e5 MDL-9290, restore performance improvements on reading xml 2007-12-14 06:14:21 +00:00
diml 82df9925b8 Fixes MDL-12578
adding SEARCH_TYPE_LESSON and related keys to searchlib.
2007-12-13 21:42:32 +00:00
tjhunt bbe0467bff Fix Javascript error from essay questions on the review page. 2007-12-12 18:10:47 +00:00
toyomoyo 58c8f24909 MDL-12544, hide hidden roles in profile when user has no capability 2007-12-12 07:10:53 +00:00
toyomoyo a5c1df9bcf MDL-12550, wrong user count in role assignment 2007-12-12 03:30:50 +00:00
tjhunt b2744afe61 MDL-12542 - backup_todb not called on restore on date before it is inserted into mdl_user. This would cause a backup from a pre 1.7 site (or a pre 1.7 that has been upgraded to 1.9) to a 1.9 fresh install, to fail sometimes. Backported from MOODLE_19_STABLE. 2007-12-11 15:55:42 +00:00
nfreear 6d969cd512 Fixes MDL-12541 "Weeks course format - dates for each section should be marked up as heading". Merged. 2007-12-11 15:35:49 +00:00
scyrma 03c358e331 MDL-12528 - getElementById was misspelled. 2007-12-11 04:59:34 +00:00
stronk7 0db058ef58 Backporting MDL-12407 to 18_STABLE. Fix was missing there. 2007-12-10 09:37:34 +00:00
stronk7 1bc0bbb4ef Reverting latest commit that was breaking some sites
under MySQL. MDL-12427. http://moodle.org/mod/forum/discuss.php?d=86238
2007-12-09 23:28:24 +00:00
stronk7 32932231fd Deleting one "add course" button that shouldn't be there
if we aren't inside a category. MDL-12076
2007-12-07 23:53:59 +00:00
stronk7 9cdfe34923 MDL-12084. Using new cross-db sql_isnotempty() function. 2007-12-07 15:56:18 +00:00
fmarier 36c04a1bdb weblib: Fix typo in print_table() which was causing invalid <th> tag
MDL-11506
2007-12-07 04:58:35 +00:00
scyrma 73fcfef178 MDL-12321 : backport (excluding db changes) of patches in 11657 and 11606.
This should prevent the mass-mailing of forum digests from breaking in the
middle of a cron run.
2007-12-07 00:45:05 +00:00
mattc-catalyst f52a0de1c5 MDL-12433: course/info - missing context 2007-12-07 00:15:50 +00:00
moodler ea9af5b1a2 Automatic installer.php lang files by installer_builder (20071206) 2007-12-06 05:16:04 +00:00
toyomoyo 1ac5aabb2f MDL-12439, templates not imported in database preset import 2007-12-06 00:45:31 +00:00
diml ee7a11dc62 fixing security hole. reference : http://moodle.org/mod/forum/discuss.php?d=85748#p379857
Inaki Arenzana
2007-12-05 15:55:01 +00:00
martinlanghoff ca6f03263d datalib:get_my_courses() - fix CAST() to work in MySQL - MDL-12427
MySQL does not like CAST()s to VARCHAR. Change it to a CHAR() -- note
the lack of length definition -- which will do the cast without any
padding. That's what we are after, anyway.
2007-12-04 23:11:03 +00:00
martinlanghoff 77a53d26bb datalib: get_logs_user*() - fix invalid SQL - MDL-12426
Oracle does not accept column labels in the GROUP BY section -
get_logs_usercourse() and get_logs_userday() were computing the
day/hours column and using it in the GROUP BY. The compatible fix
is to reproduce the same computation in the GROUP BY section.

Credit for the fix goes to Dennis Rochford <Dennis.Rochford@usq.edu.au>.
2007-12-04 06:15:08 +00:00
martinlanghoff 414b66be32 blocks/online_users: Remove SQL "id,id" which causes errors on Oracle - MDL-12425
Credit for the fix goes to Dennis Rochford <Dennis.Rochford@usq.edu.au>
2007-12-04 06:13:47 +00:00
martinlanghoff b5558e5742 mod/assignment: Remove SQL "id,id" which causes errors on Oracle - MDL-12425
This loop also needs some rewriting - it is _very_ inefficient on
large courses.
2007-12-04 06:13:15 +00:00
martinlanghoff 9dbb215cf6 datalib:get_my_courses() - fix SQL compat Oracle - MDL-12427
One of the SQL queries in gmc is concatenating ctx.path with an id field.
Oracle barfs at the idea of casting the numeric id - so we CAST() it
explicitly, lest there be any confusion.

Credit for the fix to Dennis Rochford <Dennis.Rochford@usq.edu.au>
2007-12-04 06:07:12 +00:00
moodler 0a85b6161b Automatic installer.php lang files by installer_builder (20071204) 2007-12-04 05:21:30 +00:00
toyomoyo eb34ba19a9 MDL-12399, shorten_text() truncates all closing tags 2007-12-04 05:09:12 +00:00
fmarier 8a48b86836 ddllib: Mark table_column() as deprecated
Signed-off-by: Eloy Lafuente
2007-12-03 23:17:56 +00:00
stronk7 0196475e23 Adding some outer spaces to returned SQL to avoid wrong
sentences caused by concatenation.
2007-12-03 20:41:31 +00:00
stronk7 8245849ef9 Adding two new functions: sql_isempty() and sql_isnotempty() to perform
SQL comparisons to empties in a cross-db way. General solution for
problems like MDL-12084
2007-12-03 20:08:07 +00:00
nfreear 0b5a4199d0 Fixes bug MDL-12416, Help links - img ALT text should contain phrase "new window" to match link TITLE. Merged. 2007-12-03 16:47:23 +00:00
whchuang 3dd157d0ee MDL-12094. Added the /blocks/search/lang/en_utf8/block_search.php back based on the moodle 1.9 version 2007-11-30 02:13:44 +00:00
moodler 51528c6d6e New installer files added - stronk7
Backported from HEAD
2007-11-29 17:02:16 +00:00
moodler d07ae54371 file installer.php was added on branch MOODLE_18_STABLE on 2007-11-29 17:02:16 +0000 2007-11-29 16:59:26 +00:00
moodler 4f497b2c4e Automatic installer.php lang files by installer_builder (20071129) 2007-11-29 05:57:40 +00:00
toyomoyo 482221882b MDL-12289, fixing html strict for restore 2007-11-29 04:45:34 +00:00
toyomoyo fab9a8452a MDL-12346, lesson module GIFT import fails 2007-11-29 04:30:28 +00:00
urs_hunkler 0c7d5e2966 added missing pix 2007-11-28 16:14:07 +00:00
toyomoyo 50ab9935c0 MDL-10263, enable forum search for multiple groups 2007-11-28 07:49:55 +00:00
toyomoyo 1e81a1295e MDL-11818, single post forum descript = first post 2007-11-28 05:06:41 +00:00
arborrow 200f64d220 MDL-10523 - Removing DISTINCT from the query will enable the function to work with MSSQL which was having difficulty with the current syntax and should not impact other queries because the user id should already be unique. 2007-11-27 20:18:19 +00:00
nicolasconnault 1b1bd5929b MDL-8863 Initial page field was disabled when there were no entries in the wiki, making it useless. It is now always enabled 2007-11-27 13:29:36 +00:00
toyomoyo e489cc2f8d MDL-12331, hidden teacher should not be displayed in choice results 2007-11-26 05:58:21 +00:00
toyomoyo 827100874d MDL-12175, forum reset should delete attachments 2007-11-26 04:22:40 +00:00
toyomoyo 160684c811 fixing 2 restore problems 1) group sql is broken 2) sql could return multiple groups 2007-11-26 03:19:26 +00:00
toyomoyo afbb79e1c6 MDL-12081, teacher with import capability can not import course 2007-11-26 02:37:56 +00:00
gbateson 1cd4d9dffe fix MDL-12318: from Moodle 1.8 onward, the HotPot module has its own mediaplugin filter, because teh standard Moodle "filter/mediaplugin" can no longer insert media players into Javascript. 2007-11-26 00:14:54 +00:00
gbateson f548abb84c added new mediaplayer filter, because standard Moodle mediaplugin filter can no longer insert players into JavaScript. "mod/hotpot/mediaplayers/moodle/filter.php" mimics the behavior or the "filter/mediaplugin/filter.php" in Moodle 1.7 2007-11-26 00:12:56 +00:00
moodler 1f44541d17 Automatic installer.php lang files by installer_builder (20071125) 2007-11-25 03:54:21 +00:00
skodak 1cefec56ed MDL-12329 fixed last access when course not accessed yet - patch by Yolanda Ordóñez Rufat; backported from MOODLE_19_STABLE 2007-11-23 21:33:28 +00:00
moodler aeae7ec39d Automatic installer.php lang files by installer_builder (20071123) 2007-11-23 04:59:35 +00:00
toyomoyo 471e1be772 MDL-12320, problem viewing grades with separate groups 2007-11-23 04:12:12 +00:00
stronk7 3e5d5d5741 Deleting one ='' condition that isn't cross-db nor necessary. MDL-12186 2007-11-22 22:45:23 +00:00
scyrma f1deee8860 Replaces 'GMT' by 'UTC' where it showed in user interface and fixes MDL-9164. 2007-11-22 06:39:11 +00:00
toyomoyo c08b2ecf09 turn the block of if $CFG->messaging if off 2007-11-22 01:15:38 +00:00
toyomoyo fae700ba1c MDL-10028, adding a string 2007-11-22 01:03:30 +00:00
nfreear 7b8cd330a3 Fixes reopened bug MDL-7472, "Explicitly label radio buttons in Survey" - removes use of USER->screenreader using get_accesshide + many other accessibility fixes. MERGED. 2007-11-21 15:26:19 +00:00
toyomoyo 5645145115 MDL-10294, MDL-10028, changing messaging/bulk messaging system 2007-11-21 07:46:45 +00:00
diml ad91f3744e fix unchecked foreach loops 2007-11-20 23:25:46 +00:00
diml 7bf21a5064 fix table name for deletion of indexes before regeneration 2007-11-20 23:25:22 +00:00
tjhunt 3b37251a8a MDL-12282 - Numerical question type - the units are displayed on the editing form with a stupidly large number of decimal places. 2007-11-20 16:56:53 +00:00
ethem 80d7317a79 Fixo 2007-11-20 14:25:20 +00:00
ethem 47d75826be Fix for Canadian Postal Code
http://moodle.org/mod/forum/discuss.php?d=81736
2007-11-20 13:41:49 +00:00
moodler 8478d321ec Automatic installer.php lang files by installer_builder (20071120) 2007-11-20 05:14:28 +00:00
mattc-catalyst 9e9511ca48 MDL-12264 - course/info: check if course is hidden before displaying info about it.
Author: Matt Clarkson <mattc@catalyst.net.nz>
2007-11-20 02:36:53 +00:00
stronk7 451761a403 Some question formating... 2007-11-20 00:05:16 +00:00
nfreear f5a587ce76 Initial fix for MDL-12256, "Course AJAX has very poor accessibility - ALT text" - test, imgAttributes.length NOT attributes.length. Merged. 2007-11-19 17:11:51 +00:00
scyrma ffb13064dc MDL-3632 : this prevents people without mod/forum:viewhiddentimedposts to see hiddentimedposts. 2007-11-19 05:10:42 +00:00
iarenaza d359ac1491 MDL-11099 and MDL-11655 Don't show external db password in clear 2007-11-18 12:43:11 +00:00
moodler 7521250967 Automatic installer.php lang files by installer_builder (20071118) 2007-11-18 04:45:49 +00:00
mchurch 0b0f2f864b MDL-12016 Category text not being sent to 'create_category_path'. 2007-11-15 14:04:22 +00:00
mchurch ed0acd0904 MDL-12015 Import question count was wrong. 2007-11-15 13:40:13 +00:00
bobopinna b3f877de05 MDL-12161 Stripped slashes in LO titles 2007-11-15 08:41:51 +00:00
bobopinna 552254834b MDL-12161 Stripped slashes in LO titles 2007-11-15 07:54:37 +00:00
toyomoyo 894722ed9c MDL-12180, blocks capabilities not appearing when overriding block roles 2007-11-15 07:43:49 +00:00
toyomoyo dcc09c507e MDL-12160, do not force context creation when calling get_coursemodule_info() as context_rel table might not exist yet 2007-11-15 07:20:52 +00:00
toyomoyo da76b7ee70 MDL-8330, adding a warning to translators about updating of lang packs 2007-11-15 01:15:11 +00:00
tjhunt 3a041e458c Delete commented-out code that was actually not commented out properly, and so caused warnings. 2007-11-14 14:48:13 +00:00
bobopinna 134f59345f MDL-12118 Fixed learner_response report. It was changed by SCORM2004 3rd Ed. specification 2007-11-14 11:37:13 +00:00
bobopinna 1769403fbd Fixed MDL-11914 2007-11-14 09:49:39 +00:00
toyomoyo eb923b5cc1 MDL-4279, calendar double message lesson opens lesson closes 2007-11-14 07:15:20 +00:00
martinlanghoff 8e9fca4fff htmlarea: fix in FF - MDL-11242
The previous fix for IE left some problems in the FF side of
things because we were trying additions/substractions on
width once its had turned to a string of value + unit.

Do the math before we attach 'px' to it...
2007-11-14 02:48:17 +00:00
fmarier bcc37dd0c1 mod/quiz: Revert commit which added the "go back to course" link 2007-11-14 01:13:00 +00:00
mchurch 58e84d7044 MDL-11991 Fixing error on undefined method while using the manual plug-in. 2007-11-13 18:02:28 +00:00
mchurch c58364c3d3 MDL-12149 Added code to check for selected group as well, so that privileged users get correct count when changing groups. 2007-11-13 16:46:16 +00:00
arborrow f6a54f01e3 MDL-11743 - SHOW LOCAL VARIABLES more accurately returns database character set on some hosts and makes explicit what is normally the default behavior. 2007-11-13 16:00:40 +00:00
mchurch 678530de2b MDL-12114 Fixed typo in elements array. 2007-11-13 15:53:02 +00:00
mchurch ca6e796485 MDL-11646 Simplified. 2007-11-13 15:00:10 +00:00
mchurch 5d6dccfa8e MDL-11646 Cycled through all roles for a user, using role_unassign for reach role, when deleting the user. 2007-11-13 14:31:00 +00:00
sam_marshall e941d7248b MDL-12030 Double quotes used accidentally instead of single 2007-11-12 11:43:34 +00:00
gbateson fec02d75b9 fix for MDL-9713 : use XMLDB functions to create tables when mod/hotpot/db/mysql.sql is not found. This allows upgrade direct from Moodle 1.5 (or earlier) to Moodle 1.8 (or later) 2007-11-12 08:49:41 +00:00
martinlanghoff ab7005bfa4 htmlarea: Fix fullscreen editor on IE6/7 -- MDL-11242
Only say px if the width is a pure number. Under IE we
get the "100%" for the width of the editor, so blindly
appending "px" results in a JS execution error.

With this patch we only attach px if it's a pure int.

Also tested the sizing of HTMLArea in the messaging
window. So both should be working now.
2007-11-12 04:08:20 +00:00
urs_hunkler 2dd8e071a8 added missing "if ($heading)" to suppress empty page header. 2007-11-11 09:33:33 +00:00
mark-nielsen e041eb354e Fix for MDL-12088: Error occured when no feedback was entered into the question by the author 2007-11-11 01:14:03 +00:00
skodak d6358f2d18 MFC: MDL-12079 fixed use of clean_param() 2007-11-10 14:51:34 +00:00
skodak 6ba9ac7e71 MFC: MDL-12092 removed newline chars, we do not know the admin's platform, one line should be ok IMHO. 2007-11-10 14:38:24 +00:00
stronk7 5e1cef5b04 Adding lang support within profile fields to make them selfcontained. 2007-11-09 19:08:31 +00:00
toyomoyo 5789b52a35 MDL-11235, Gradebook Items with Grade of "0" not included in Total % calculation 2007-11-09 07:46:43 +00:00
toyomoyo eab947dabd MDL-12043, check existance of xyz_grades() functionsy 2007-11-09 05:43:53 +00:00
toyomoyo 2b2cdcd504 MDL-12065, do not force parents to enrol in student courses 2007-11-09 01:37:07 +00:00
fmarier d4833f2103 Add missing fields when upgrading/installing on Postgres
mod/exercise, mod/scorm and question/type/rqp
MDL-12023
2007-11-09 01:22:25 +00:00
fmarier f285e9514a mod/quiz: Add a link back to the course page after a quiz is completed 2007-11-09 01:07:17 +00:00
poltawski fc05711af3 MDL-12070 - PARAM_CLEANHTML strips magic quotes.. 2007-11-08 22:17:44 +00:00
diml 603042b740 General syncback from HEAD branch (2.0) 2007-11-08 20:13:14 +00:00
diml 386aed2335 General syncback from HEAD branch (2.0) 2007-11-08 20:00:50 +00:00
poltawski 4e48f83df8 MDL-12070 - re-enable the use of HTML in choice options 2007-11-08 18:25:49 +00:00
toyomoyo 7b57c10fb9 MDL-12061, <p> in html editor breaks xhtml strict 2007-11-08 05:36:21 +00:00
moodler 1ea523a8b1 Automatic installer.php lang files by installer_builder (20071108) 2007-11-08 05:21:53 +00:00
nicolasconnault 34d1510980 MDL-11790 Fixed hard-coded strings. Merci Nicolas! 2007-11-08 05:17:22 +00:00
urs_hunkler db6988d87f In the first table column class="header" was missing. 2007-11-07 18:08:00 +00:00
ethem c5edbc12e8 Fix for refactoring
Fatal error: Call to undefined method enrolment_plugin_authorize::print_enrolmentkeyfrom() in /usr/local/www/data/moodle/enrol/manual/enrol.html on line 7
2007-11-07 15:51:45 +00:00
moodler fa9e2d8b58 Merged simple grammar fix from 1.7 2007-11-07 07:13:35 +00:00
nicolasconnault 57aafd33f7 MDL-8853 Applied Ann's Patch 2007-11-06 13:38:34 +00:00
toyomoyo c9ff03bdf4 fixing bogus $scoid 2007-11-06 05:40:01 +00:00
toyomoyo e967dcc1a7 MDL-10509, LDAP username to be always in lowercase 2007-11-06 00:59:04 +00:00
nicolasconnault 15fbde6aee MDL-8992 Now only appearing once per page, and XHTML compliant. Also removed an ugly browser-sniffing css hack from the quicktime plugin, and applied the same browser detection as for the other plugins 2007-11-05 14:10:38 +00:00
toyomoyo 50b474966c MDL-12006, commenting out a line that doesn't seem to do anything 2007-11-05 02:17:28 +00:00
moodler eeb28d3ff4 New installer file added to CVS repo. 2007-11-04 17:06:59 +00:00
moodler 0f4452fcd0 file installer.php was added on branch MOODLE_18_STABLE on 2007-11-04 17:06:59 +0000 2007-11-04 17:05:25 +00:00
moodler 343c223111 Automatic installer.php lang files by installer_builder (20071103) 2007-11-03 05:06:50 +00:00
stronk7 726f2a45dc There was a mistake in the dir being created. It must be
the backup temp area one. MDL-11912
2007-11-02 13:01:02 +00:00
stronk7 6f23f8985a Changed check_dir_exists() behaviour to be more robust
and to work better when used recursively under sites
with open_basedir enabled. Credit goes to René Samselnig. MDL-11437
2007-11-02 09:50:33 +00:00
skodak 752569765e MDL-11999 reset the cap cache after switching role so that the first page gets correct permissions 2007-11-02 08:25:10 +00:00
donal72 0570c31a3b Propagate additional error info about XML parse failures 2007-11-02 00:14:11 +00:00
donal72 d1bbb75333 More error info about XML parse failures 2007-11-02 00:12:59 +00:00
donal72 9822b38f10 Initialize the $message variable properly this time. 2007-11-01 21:30:25 +00:00
donal72 dc2ea6fb26 Revert: Initialize the $message variable 2007-11-01 21:27:51 +00:00
stronk7 941f70858d Unsetting one white border. 2007-11-01 20:07:19 +00:00
nicolasconnault 3b0dc8cd12 MDL-11790 Added missing strings 2007-11-01 14:51:27 +00:00
nicolasconnault 5358318b6f MDL-8992 Added a simple script from http://mar.anomy.net/entry/2006/11/24/02.12.18/ to the mediaplugin filter output. Works like a charm on all tested browsers 2007-11-01 13:58:44 +00:00
nicolasconnault e88bc4a2c1 file eolas_fix.js was added on branch MOODLE_18_STABLE on 2007-11-01 13:58:44 +0000 2007-11-01 13:52:15 +00:00
nicolasconnault 4970ebb19c MDL-11328 added the missing variable 2007-11-01 09:29:12 +00:00
nicolasconnault a6ec1e9dd0 MDL-11912 Creating 1000's layer directory first, then userid directory: no need for recursion 2007-11-01 08:45:22 +00:00
donal72 e0033fb83c Test for empty dataset to suppress a warning 2007-11-01 06:13:19 +00:00
donal72 c5fbfafa62 Initialize the $message variable 2007-11-01 05:02:31 +00:00
pichetp 5e0da4b5ee MDL-11867 setting real null when response is null in calculated question merged from
head
2007-11-01 00:36:04 +00:00
nicolasconnault 4b952ed3ff MDL-11912 Removed recursive param 2007-10-31 19:04:26 +00:00
tjhunt c28f197deb MDL-10284 - wrong language string used on the quiz view page to inform students of the quiz deadline. I took the opportunity to strip out an unnecessary HTML table, and reviewing uses of the string /quiz(open|close)s?/ found one other inconsistency on the quiz editing form. 2007-10-31 17:08:38 +00:00
tjhunt b63b4c2c19 MDL-11624 - /mod/quiz/index.php too dependant on individual course format names. I basically changed it to do the same as the forum module. 2007-10-31 16:41:42 +00:00
nicolasconnault 1994116184 MDL-11912 Removed recursive param 2007-10-31 15:20:34 +00:00
moodler d2d4b56c83 Automatic installer.php lang files by installer_builder (20071031) 2007-10-31 04:34:57 +00:00
pichetp 439e93b27f solving MDL-7496 for calculated merged from head 2007-10-31 02:44:34 +00:00
pichetp 5234b78232 solving MDL-7496 for calculated merge from head 2007-10-31 02:34:33 +00:00
tjhunt cc701ed021 MDL-9375 (and dups) - Each attempt builds on last with multi-page quizzes gives the wrong score on the second attempt. It turns out that this was already fixed in Moodle 1.9 (part of commit 1.115 -> 1.116) so I have just backported the relevant changes. I have tested that this fixes the reported problem. I have not had time to test that it does not break one of the other billion possible combinations of settings possible with the quiz. Code review and testing welcome. 2007-10-30 18:22:28 +00:00
tjhunt 06ff2489ae Fix notice. 2007-10-30 17:52:43 +00:00
tjhunt aac7fcb6fe Unit tests for MDL-9295 - clean_param with PARAM_URL/PARAM_LOCALURL. 2007-10-30 10:46:01 +00:00
tjhunt 9f34d8341a MDL-9295 - PARAM_URL/PARAM_LOCALURL does not accept http://localhost/ or other hosts on lans. 2007-10-30 10:15:02 +00:00
tjhunt 921899fc20 MDL-11462 fixed PARAM_URL inline focs, uncommented old regex in URL validation library - official TLD not required anymore. Backported from MOODLE_19_STABLE. 2007-10-30 10:11:24 +00:00
toyomoyo f3768c4094 making multibyte filename appear correctly under IE download 2007-10-30 00:32:27 +00:00
mchurch 24ec59cd3c Removing the questionnaire language file from main release. 2007-10-29 21:27:03 +00:00
skodak 47b0cf06a3 MFC: MDL-11904 deny/accept Email settings conflict with text - now .example.com means all subdomains 2007-10-29 20:17:08 +00:00
mchurch 7a3fa1280f Removing the questionnaire language file main release. 2007-10-29 19:48:58 +00:00
tjhunt 2628f0bc16 MDL-11416 - Support for nonsortable columns in table lib. Backported from MOODLE_19_STABLE so that the fix for MDL-5262 works. 2007-10-29 15:25:09 +00:00
poltawski 070a606c68 MDL-11813 - Use existing group setting strings on course edit form so can be
better translated. Patch from Daniel Miksik

Merged from MOODLE_19_STABLE
2007-10-29 09:49:53 +00:00
poltawski 8ef593442b MDL-10810 silence warnings in PHP 4.x - the last param was added in PHP 5.0.2
copied apporach used further up file.. yukyukyuk
2007-10-29 00:58:01 +00:00
moodler 83a66c9f3b Automatic installer.php lang files by installer_builder (20071028) 2007-10-28 05:12:00 +00:00
tjhunt f312622c4e MDL-11825 - Force penaltyfactor to 1 for truefalse questions on GIFT import, as is done on the editing form. 2007-10-25 09:42:19 +00:00
danmarsden 5fa1dcdb43 MDL-11397 bug with IE 6 not displaying anonymous results correctly.
merged from HEAD
2007-10-24 21:33:16 +00:00
whchuang f2c0c26767 Fixed MDL-10506 Hide/Show Advanced button does not toggle in IE and Safari when edit profile 2007-10-23 22:12:57 +00:00
moodler f96fdd4505 Automatic installer.php lang files by installer_builder (20071023) 2007-10-23 05:10:33 +00:00
arborrow 4e36e57bcb MDL-11869 - javascript syntax error was preventing the call to the calc function. Adding in the double slashes around CDATA resolves the problem. 2007-10-22 20:29:45 +00:00
tjhunt dc99997eac MDL-11708 - Zero answers are not allowed in Matching questions - sometimes I hate PHP. 2007-10-22 16:56:24 +00:00
tjhunt 32a6bb301e MDL-11824 - Literal asterisk (\*) in shortanswer question not handled correctly by get_correct_responses + Unit tests. 2007-10-22 15:36:50 +00:00
gbateson b1062ec362 improve XHTML compatability of HotPot reports; correct termination of <input> tags in JCloze and JQuiz 2007-10-22 01:36:20 +00:00
moodler 14a6c97e6c Automatic installer.php lang files by installer_builder (20071021) 2007-10-21 04:21:13 +00:00
gbateson a78a688961 improvements to XHTML compatability in index.php:
(1) remove unnecessary quote in <form ";
(2) change </A> to lowercase;
(3) correctly terminate <input .. /> and <img /> tags;
(4) change & to &amp; in URLs
2007-10-21 02:33:10 +00:00
gbateson 661b8d9dec improvements to XHTML compatability:
(1) lib.php: change "&" to "&amp;" in URLs in "hotpot_print_show_links" function;
(2) mod.html: change size=40 to size="40", remove obselete </span>, change nowrap to nowrap="true", change "&" to "&amp;" in URLs;
(3) view.php: add closing </div> tags for "page" and "content" divs, change "&" to "&amp;" in URLs;
(4) template/v6.php: change "<=" to "&lt;="in strLastQCaption, change  "=>" to "=&gt;" in strNextQCaption
2007-10-21 02:09:28 +00:00
skodak 909abddce3 MFC: MDL-8605 fixed user image restore code 2007-10-20 21:04:27 +00:00
skodak 5678d4e4fa MFC: MDL-11857 missing addslashes on idnumber field during backup restore 2007-10-20 19:29:41 +00:00
skodak ee9568e574 MFC: MDL-11857 missing addslashes on idnumber field during backup restore 2007-10-20 19:29:02 +00:00
stronk7 60b5a1e50a Booleans are not always transformed to 0 /1. This was preventing install
under mysqli. Define block->multiple if needed.
2007-10-19 17:36:19 +00:00
stronk7 44f2b37760 Adding support to course/formats from within the editor. MDL-11842 2007-10-19 16:48:02 +00:00
poltawski c3b4148b48 MDL-11840 - curl was set to use CONNECTs for all http requests. This is disallowed
by most http proxies to prevent tunneling. Added some debugging in case of failure.

merged from MOODLE_19_STABLE
2007-10-19 14:48:38 +00:00
poltawski 8569a0b96f MDL-11766 download_file_content is quite broken with proxies - lacking global
CFG definition, so must never have worked, also incorrectly specified proxyhost..

Merged from MOODLE_19_STABLE
2007-10-19 11:46:58 +00:00
toyomoyo 1b14f9daf5 MDL-11667, admin blocks page should not count blocks not placed on courses 2007-10-19 07:52:16 +00:00
toyomoyo 0d2521b4d3 MDL-11831, gradebook will not show all participants when groups are defined but groupmode not set 2007-10-19 06:50:57 +00:00
toyomoyo 29a8cc034b MDL-9059, broken sql in calendar_set_filters() 2007-10-19 02:27:27 +00:00
donal72 5862de1d22 Remove reference to other applications from the Moodle 1.8 source. This is a 1.9+ feature. 2007-10-19 00:45:56 +00:00
toyomoyo 2022d08058 MDL-11241, adding logs for roles management 2007-10-18 05:45:14 +00:00
moodler e3d945e86a Automatic installer.php lang files by installer_builder (20071018) 2007-10-18 05:39:03 +00:00
donal72 b3225d1a2f Laying groundwork for more Mnet error reporting 2007-10-17 08:14:17 +00:00
donal72 d029c122af Rewrite testclient.php to be a service browser for remote Moodles. This should be useful to people who are trying to connect to the API from non-Moodle hosts, or write software to connect to Moodle. MDL-10214, MDL-10174, MDL-10172, MDL-10171 2007-10-17 08:11:29 +00:00
donal72 eb1bf09594 Change reflection methods to only report on methods that are being published to the inquiring host (instead of all methods that could be published). MDL-10214, MDL-10174, MDL-10172, MDL-10171 2007-10-17 08:07:24 +00:00
toyomoyo 6fdadd110b MDL-11687, the string 'capability' should not be translated in the links to capabilities docs page 2007-10-17 05:35:36 +00:00
toyomoyo b57ddf7b1d MDL-11687, the string 'capability' should not be translated in the links to capabilities docs page 2007-10-17 05:29:56 +00:00
tjhunt 3c7d829b22 MDL-5262 - PHP notice when sorting on R% coloumn in the Item analysis report - I adopted the simple solution of stopping people sorting on that column, since it is the same as sorting on rcount, I think. Backported from MOODLE_19_STABLE. 2007-10-16 21:26:38 +00:00
donal72 4a1db8bd3d Log error code and text in mnet_server_fault_xml function. MDL-10196 2007-10-16 14:02:17 +00:00
donal72 ed548587ab Label for wwwroot field 2007-10-16 10:19:34 +00:00
donal72 dbd1755a42 MDL-11329: fixed text: "Local courses for external users:" 2007-10-16 09:14:25 +00:00
skodak 09d1d1ac2e MDL-10535 Categories with quote in name cannot be added 2007-10-16 09:01:56 +00:00
donal72 90f3a22a0b More helpful MNet error messages in debug mode 2007-10-16 09:01:46 +00:00
donal72 753775479c MDL-11040: get_complete_user_data doesn't get the complete user data. Replace with get_record to bring over the user's description. 2007-10-16 08:50:41 +00:00
skodak c47b3a935b MDL-11759 missing RISK_XSS in manage groups capability 2007-10-16 08:42:51 +00:00
donal72 2eff9d1367 Removed a constraint that caused mnet to fail on clusters, vservers and other network configurations where the mnet client's hostname (as specified in the wwwroot) resolves to an IP address that differs from the IP address that it uses to contact other hosts. This should address MDL-10672 2007-10-16 08:00:03 +00:00
toyomoyo 1437b25532 fixing a warning 2007-10-16 04:33:04 +00:00
toyomoyo 4e39b6ff35 MDL-9059, admins don't see group event in course 2007-10-16 03:45:32 +00:00
thepurpleblob 01c48affff MDL-11769:
question name is properly truncated to less than 255 characters tom
stop PostGRES choking.
2007-10-15 13:48:48 +00:00
nfreear d6949b0238 Follow up fix for MDL-11436 'Encapsulate "accesshide" HTML class in function', and use. Merged. 2007-10-15 10:11:39 +00:00
nicolasconnault f60ecf6045 MDL-10905 iterating properly through readdir() 2007-10-15 05:42:36 +00:00
toyomoyo f0af72d2f9 MDL-10353, adding couse variable to nav bar in calendar preferences 2007-10-15 04:45:38 +00:00
moodler 9f51b7c925 Automatic installer.php lang files by installer_builder (20071015) 2007-10-15 04:31:36 +00:00
gbateson 4ad794c524 where the correct responses on a JQuiz multiple choice question all have a score of 0%, the scores will be corrected to 100% 2007-10-15 00:55:51 +00:00
skodak 4aec47adba MDL-8605 eh, forgot to undo some testing code before commit, sorry 2007-10-13 22:14:38 +00:00
skodak f38de13d68 MDL-8605 quick fix for broken user pix upgrade 2007-10-13 22:05:17 +00:00
mark-nielsen e6096b71e5 Fix for MDL-11684 2007-10-13 03:05:41 +00:00
mark-nielsen 8a789e52cc Fix for MDL-11696 2007-10-13 02:24:56 +00:00
mark-nielsen bbb0032181 Fix for MDL-11636 2007-10-13 01:54:25 +00:00
nicolasconnault 3751aaf098 MDL-8605 Backup and restore implemented, and using remove_dir instead of rmdir, which doesn't support deleting non-empty directories 2007-10-12 20:26:44 +00:00
nfreear 75e27a12be MDL-11695, Skip block links inaccessible for many keyboard-only users. Merged. 2007-10-12 09:18:22 +00:00
nicolasconnault c19977a6f5 MDL-8605 Minor typos and version.php fix 2007-10-11 14:16:32 +00:00
nicolasconnault 3d6d2b8153 MDL-8605 New user directories implemented 2007-10-11 13:19:53 +00:00
toyomoyo 7f4ea06814 MDL-9059, fixing students can't view group entries in calendar 2007-10-11 07:59:23 +00:00
moodler 3dda8f3cf3 Bumping post-1.8 2007-10-11 06:53:05 +00:00
moodler d78ec260b2 Bumping to new release 1.8.3 2007-10-11 06:22:27 +00:00
toyomoyo 0572e4291d MDL-10353, calender redirection broken when editting and exporting 2007-10-11 05:22:49 +00:00
moodler 8bc1d327c2 Automatic installer.php lang files by installer_builder (20071011) 2007-10-11 04:19:47 +00:00
iarenaza e0f57f0d56 Fix MDL-11632: Multiple files with emtpy lines outside PHP open/close tags
There are multiple issues with Moodle files containing empty or blank lines
(lines consisting of white spaces or tabs only) and/or white space before or
after the PHP open and close tags, notably with config.php and theme files.
2007-10-10 21:09:18 +00:00
jmg324 6886503616 merged from HEAD 2007-10-10 16:05:18 +00:00
tjhunt bc93860e9f MDL-11703 - escaped *'s in shortanswer answers were not matching properly. 2007-10-10 15:26:22 +00:00
nicolasconnault 1ffd2c0ac6 MDL-11608 Removed stripslashes_safe($rename) and changed PARAM_RAW to PARAM_TEXT for rename param 2007-10-10 04:59:52 +00:00
moodler e1be60d66c Automatic installer.php lang files by installer_builder (20071010) 2007-10-10 04:49:33 +00:00
nfreear 727031451d Fixes MDL-11676, Skip block links are broken in Internet Explorer 6. Merged. 2007-10-09 15:51:39 +00:00
tjhunt 947d3349ab MDL-9076 - Move the 'Add 3 more overall feedbacks' button inside that group of elements on the quiz settings form.
To make this possible, I added an extra argument to the repeat_elements method, which other people may find helpful on other forms.

backported from HEAD.
2007-10-09 15:45:11 +00:00
nicolasconnault 2bb9c62bf8 MDL_11608 The $rename param was obtained with PARAM_NOTAG, I changed that to PARAM_RAW. I also changed the rename field's value to htmlspecialchars($category->name) 2007-10-09 14:13:21 +00:00
thepurpleblob b65f805a91 MDL-11514:
Link to missing word information and help file removed. There
was no extra help.
2007-10-09 10:28:47 +00:00
thepurpleblob 4bc522672d MDL-11515:
Help file is not used.
2007-10-09 10:21:09 +00:00
thepurpleblob 1bb56f97c5 MDL-11425:
Process the text properly for the category path.
2007-10-09 10:08:36 +00:00
nfreear a11b2d8e72 Fixes MDL-11648, "Required" is inappropriate text for legend in user profile edit form. Merged. 2007-10-08 13:58:24 +00:00
gbateson 5a1920568c added escaping of quotes in TimesUp message, so that apostrophes do not cause Javascript errors 2007-10-08 06:32:05 +00:00
skodak dd85612a17 MDL-11448 FirstClass Authentication does not hold settings and has cosmetic and info leakage issues, patch by Dan Trockman; backported from HEAD 2007-10-07 14:10:51 +00:00
skodak 7e2aced51d MDL-11304 remerging fixes 2007-10-07 13:31:59 +00:00
moodler fe6e5f35b5 Added some require_logins to set up themes and lang MDL-10833 2007-10-07 09:25:51 +00:00
moodler de3499d458 Fixed the theme problem on activity reports MDL-10833 2007-10-07 09:15:37 +00:00
pichetp 26b131922b checking that there remain $oldwrappedids before deleting them lines 87-..
add         if(is_array($oldwrappedids) && count($oldwrappedids)){
2007-10-06 21:06:21 +00:00
pichetp f67882c305 missing global $CFG ; line 577
function save_dataset_items($question, $fromform){
global $CFG;
2007-10-06 19:10:28 +00:00
nicolasconnault eed1c7ca5b MDL-11525 When courseid is not present in the log entry, showing "Site" instead of $log->info 2007-10-05 07:19:29 +00:00
toyomoyo 34a2acfc72 MDL-11308, wrong capability check in print_user() function 2007-10-05 07:18:11 +00:00
toyomoyo bb0aa83341 MDL-10353, calender export not handling course variable correctly 2007-10-05 03:51:37 +00:00
toyomoyo dfae0ffa1b modinstance fed with wrong cmid, thanks shane 2007-10-05 03:27:23 +00:00
stronk7 c194ca1c70 MDL-11597. Backported from HEAD to 18_STABLE 2007-10-04 22:18:27 +00:00
whchuang 90b52b9486 added missing string definition for sectionerror. Fixed MDL-10401 2007-10-04 18:29:13 +00:00
gbateson b0e29954ae slight adjustment to the previous modification so that Hot Potatoes navigation buttons are removed when navigation is set to "Moodle navigation frame" 2007-10-04 05:29:12 +00:00
moodler ebd7bc06ce Automatic installer.php lang files by installer_builder (20071004) 2007-10-04 05:23:43 +00:00
toyomoyo 167a831615 MDL-10353, after setting preferences in calendar user should return to same course 2007-10-04 05:12:16 +00:00
gbateson efedb70895 in order to allow hotpots to appear in a frame when navigation is set to "Moodle navigation frame", it is necessary to use target="$CFG->framename" instead of CFG->frametarget 2007-10-04 05:11:07 +00:00
toyomoyo 3f9fd1987c MDL-10353, (calendar) accidentally backported new stuff from HEAD 2007-10-04 03:00:25 +00:00
tjhunt 048373691e MDL-10843 - Backporting lang string search changes from HEAD, so question type plugins can have their help file inside their lang folder. 2007-10-03 14:01:08 +00:00
exe-cutor baa0b3ceae Removed requirement for email, givenname and surname attributes 2007-10-03 12:32:55 +00:00
moodler e289bd8030 Automatic installer.php lang files by installer_builder (20071003) 2007-10-03 05:16:57 +00:00
toyomoyo 509f876de8 MDL-10353, fixing 2 more raised calendar issues 2007-10-03 04:20:14 +00:00
whchuang 6e21779482 added missing string definition for sectionerror. Fixed MDL-10766 2007-10-03 00:04:04 +00:00
tjhunt b65a82e1a4 MDL-8682: Pressing enter when answering a short answer question can submit the wrong one. To fix this, I have disabled the enter key unless the keyboard focus is on a submit button (or inside a text box or HTML editor).
MDL-9451: Quiz answers can be lost if user navigates before page reloads. I am not totally sure I have fixed this, but I hope so. I moved the printing of the hidden form field with the list of questions on the page to the end of the form, so no answers will be processed unless the whole form loaded. Note that you could still lose data, but only if the page takes a really long time to load and you answer the first question and click submit before the whole quiz is loaded.

Backported from HEAD.
2007-10-02 21:03:39 +00:00
tjhunt f6fc4e1891 PHP docs for choose_from_menu function. 2007-10-02 18:47:46 +00:00
nfreear a4bc586138 Fixes MDL-11161, Activity type text added to beginning of activity links in Screen Reader... (also MDL- 7436) 2007-10-02 09:28:55 +00:00
gbateson f0bcc27f90 removed duplicate declaration of "hotpot_stripslashes" function 2007-10-02 07:39:11 +00:00
donal72 75bbcfb74f Bugfix caused by typo in /mnet/lib.php: This issue will have broken mnet for many users. 2007-10-02 06:44:07 +00:00
toyomoyo 014c522eb8 MDL-10353, calendar not keeping course id in url, backporting MDL-10084 2007-10-02 06:26:57 +00:00
donal72 f99f716464 Bugfix caused by typo in /mnet/lib.php: This issue will have broken mnet for many users. 2007-10-02 06:21:26 +00:00
gbateson b1b4cdb7d8 use new function "hotpot_stripslashes()" instead of PHP's "stripslashes()" to remove slashes after preg_replace with "e" modifier, because when MSSQL Server is installed, PHP's "stripslashes()" does not remove slashes, even if the Moodle database is not MSSQL 2007-09-30 04:15:50 +00:00
skodak dda3fc5779 MDL-11472 fixed harcoded mdl_ prefix in sql queries; backported from HEAD 2007-09-27 08:41:55 +00:00
tjhunt 4e557706d3 MDL-5327 - When making up a default question name from the question text, strip any HTML tags. 2007-09-27 06:53:59 +00:00
tjhunt 0556edaf60 MDL-9331 - Problem with the tables on the quiz index page. 2007-09-26 20:44:58 +00:00
tjhunt 231e409849 MDL-5086 - Improve the formatting of the question import and export help so that the code samples fit. 2007-09-26 20:12:39 +00:00
tjhunt e7c9105d26 Tweak the styles for <pre> tags in help files. These are mostly used for code samples, and they have a grey background and are shown in a different font, so the indent I am getting rid of is not necessarly to make the structure of the document clearn, and usually just means that the code sample does not fit. 2007-09-26 20:09:47 +00:00
nfreear 8323fb4279 Follow-up for MDL-1149 Accessibility: Current week/topic is NOT indicated non-visually. Reorder. 2007-09-26 12:54:54 +00:00
nfreear 28e95b14e2 Follow-up for MDL-1149 Accessibility: Current week/topic is NOT indicated non-visually, only in styling. Prefer "This week" to "Current week" 2007-09-26 10:58:42 +00:00
tjhunt df4847fc1b Get rid of duplicate $Id$ tags. 2007-09-26 10:23:10 +00:00
tjhunt e0e0c00e94 Add $Id$ tags. 2007-09-26 10:13:28 +00:00
tjhunt e19f5f4ce5 Get rid of duplicate $Id$ tags. 2007-09-26 10:11:23 +00:00
tjhunt f5f696be2a MDL-11446 - when a set of radio buttons is a required field, don't colour the lables of all the individual radio buttons red. Backported from HEAD. 2007-09-26 10:07:48 +00:00
gbateson 36d38823c0 change CONTEXT_MODULE to CONTEXT_COURSE in order to fix "Invalid context creation for level 50 instance" error on "mod/hotpot/index.php" caused by get_context_instance(CONTEXT_MODULE, $course->id) in "mod/hotpot/lib.php" 2007-09-26 07:19:51 +00:00
skodak fadd42e097 MDL-11434 $CFG->filelifetime = 0 has no effect; patch by Chris Fryer; backported from HEAD 2007-09-25 19:09:08 +00:00
nfreear 23ae278546 Fix MDL-7436 Accessibility "Indicate type of resource in the name of the resource". Merged 2007-09-25 15:36:43 +00:00
skodak f86c86269e MDL-11413 I hope now it is correct solution; backported from HEAD 2007-09-25 14:05:16 +00:00
nfreear 89eccbccb2 MDL-1149 Accessibility: Current week/topic is NOT indicated non-visually, only in styling. Merged. 2007-09-25 12:08:19 +00:00
nfreear 5d88d553ef MDL-11436, Encapsulate "accesshide" HTML class in function, and use. Merged. 2007-09-25 11:39:55 +00:00
nfreear caba817fe7 Partial fix of reopened MDL-7436 Accessibility: "Indicate type of resource in the name of the resource" 2007-09-24 17:29:01 +00:00
skodak 419b95d2ad MDL-10729 Active tabs are now marked inactive; backported from HEAD (and fixed commit message :-( ) 2007-09-24 17:15:31 +00:00
nfreear 61bb817fd2 Partial fix for reopened MDL-7474, Accessibility: "Provide alt text for ascending/ descending icons in glossary" 2007-09-24 17:11:42 +00:00
nfreear a186848393 Partial fix reopened for MDL-7493, Accessibility: Make sure 'Show hide block' button-link visible under Windows High Contrast. 2007-09-24 16:44:32 +00:00
skodak 66738744f5 MDL-11237 raising memory limit for preg_xxxx(), backported from HEAD 2007-09-24 16:34:03 +00:00
skodak 961ffe486f MDL-10833 some more course theme fixes 2007-09-24 15:49:14 +00:00
skodak 04bb266b3f MDL-10833 course theme in live logs fixed; backported from HEAD 2007-09-24 15:40:08 +00:00
stronk7 d672ecf8e8 Backporting typo from HEAD 2007-09-24 15:37:52 +00:00
skodak 4f4f20e7fb MDL-11413 revisited; backported from HEAD 2007-09-24 15:25:47 +00:00
tjhunt b424feb1cd MDL-10916 - Import and Export of Cloze question misses out "generalfeedback" column. Merged from MOODLE_17_STABLE. 2007-09-24 14:17:18 +00:00
skodak 78ed8710e6 MDL-8850 hidden activities not shown in user activity reports anymore 2007-09-24 10:06:06 +00:00
tjhunt 5ff601c49e Fix PHP syntax errors. 2007-09-24 10:05:42 +00:00
samulik 186b0a1537 MDL-1883 - /course/scales.php very slow. "Backported" the fix by Petr from 1.9 to 1.8. Not a direct merge as the code has been refactored. 2007-09-24 06:32:14 +00:00
skodak f99ed7c86d MDL-11414 fixed handling of log urls (problem reported by Andreas Nolden); backported from HEAD 2007-09-23 13:14:34 +00:00
skodak bdbb8f02b2 MDL-11413 improved text cleaning (problem reported by Andreas Nolden); backported from HEAD 2007-09-23 12:29:13 +00:00
skodak 0c08447833 MDL-11413 improved text cleaning (problem reported by Andreas Nolden); backported from HEAD 2007-09-23 12:23:15 +00:00
tjhunt c6b4a16884 MDL-11316 - Extra slashes appearing in the correct answer of shortanswer questions when they contain a slash. 2007-09-21 18:28:31 +00:00
tjhunt f5446711d2 MDL-9952 - Cant escape # by using \ in a Cloze question. 2007-09-21 16:17:53 +00:00
tjhunt 919352d80a MDL-3731 - Help file for the Item Analysis report does not explain why Disc. Coeff. is sometimes reported at -999.00. 2007-09-21 13:28:31 +00:00
tjhunt 57c9510f1b MDL-10338 - quiz index page does not work in weekscss format. 2007-09-21 11:10:18 +00:00
nicolasconnault edf9554096 MDL-11351 Removed a redundant check for a multiLang JS variable 2007-09-21 09:12:45 +00:00
toyomoyo 874833bf64 MDL-11364, users assigned as teacher on front page has no access to hidden activities 2007-09-21 02:19:26 +00:00
tjhunt aac5f17176 XHTML Strict in question state history table. 2007-09-20 15:09:45 +00:00
urs_hunkler 725685f9fb Added the missing switch construct to the mymoodle page for flexible column positioning. 2007-09-20 09:45:29 +00:00
jmg324 cfbd464c72 MDL-10296 made print_user_picture cater for https possibility in user/edit 2007-09-20 09:33:32 +00:00
urs_hunkler 1a730605aa Added the missing switch construct to the mymoodle page for flexible column positioning. 2007-09-20 09:32:59 +00:00
martinlanghoff f33f60f78e eaccelerator: never set the mode if we failed to init 2007-09-20 06:50:29 +00:00
martinlanghoff 2b33092aba Revert - dmllib: check $MCACHE->status() before using it 2007-09-20 06:46:35 +00:00
martinlanghoff b874e680dc dmllib: check $MCACHE->status() before using it 2007-09-20 06:41:32 +00:00
moodler aa604cfa06 Automatic installer.php lang files by installer_builder (20070920) 2007-09-20 04:33:43 +00:00
tjhunt af8288c0e6 MDL-10671 - Content on question import and export pages sitting on the left side. 2007-09-19 17:57:52 +00:00
tjhunt 0920afeddc MDL-10824 - spaces in javascript URLs are not strictly valid. 2007-09-19 17:44:37 +00:00
tjhunt 1ad377cf12 MDL-10903 - Wrong capability checked in get_all_instances_in_course should be moodle/course:viewhiddenactivities, not moodle/course:viewhiddencourses. 2007-09-19 17:05:32 +00:00
tjhunt e9ba213148 MDL-10972 - The lang string 'fullname', which is normally used for course fullnames, was being used for a person's full name in some quiz reports. This dual usage is not translatable into all languages. 2007-09-19 15:52:08 +00:00
tjhunt 3fc8fbccd6 MDL-6315 - When processing a manul grading action, if both the comment and the score are blank - as might be the case on the 'Grade all' page of the manual grading when the teacher uses it to grade some, but not all of the students - then do not record the question as graded. 2007-09-19 10:55:31 +00:00
tjhunt eebb9e840d XHTML Strictness. 2007-09-19 10:31:53 +00:00
tjhunt d7ced1eca3 MDL-11095 - Use absolute path to include tabs.php, not a relative path, for greater robustness. 2007-09-19 10:26:19 +00:00
toyomoyo cbcae60bb4 MDL-11324, only display users with course/view when assigning them in mod or blocks context 2007-09-19 03:47:48 +00:00
thepurpleblob cf71b80e65 Typo! 2007-09-18 12:29:06 +00:00
tjhunt dc1a8255ba MDL-11317 - Slashes displayed in incorrect responses for short answer questions. Fix by adding stripslashes in the appropriate place. 2007-09-18 12:15:10 +00:00
jamiesensei 0b58276ad0 MDL-11318 formslib now respects a template for an element if it is set. But since formslib uses the templates to insert help buttons for setAdvanced functionality etc. if you use templates you will lose this functionality. 2007-09-18 09:44:58 +00:00
iarenaza 5d27c224dd MDL-11299 - Make objectClass string comparison case insensitive.
LDAP serves accept attribute names in a case insensitive way, so don't
force the users to use any particular spelling. (backported from HEAD).
2007-09-18 08:50:18 +00:00
toyomoyo 015edfa92e MDL-11234, if roles definitions matches exactly, mapping should be allowed with or without role assign capability 2007-09-18 06:59:46 +00:00
moodler c0b9b34aea Automatic installer.php lang files by installer_builder (20070918) 2007-09-18 04:30:55 +00:00
stronk7 c54982c11b Interlinking from/to data module added. MDL-9576
Backported from HEAD
2007-09-17 22:08:31 +00:00
stronk7 1714e789f4 Now, under quick grading, when new assignment_submissions records are
created, we provide a default for data1 and data2 text not null
columns. MDL-11268

Merged from MOODLE_17_STABLE
2007-09-17 16:58:54 +00:00
tjhunt 91d44be7b0 MDL-11267 - Anywone who can view quiz reports can delete student attempts. 2007-09-17 16:11:37 +00:00
tjhunt edd33b96b3 MDL-11310 - Multichoice edititing form should have space for 5 answers by default 2007-09-17 14:39:37 +00:00
thepurpleblob df63d62031 MDL-11104:
Markdown updated to latest version.
2007-09-17 12:36:14 +00:00
thepurpleblob ae066f4cae MDL-11104:
Added some extra information for markdown-extra features.
2007-09-17 12:29:05 +00:00
thepurpleblob fc1981bb71 Forgot to take out duplicate question count check. 2007-09-17 10:59:32 +00:00
thepurpleblob 3404e92ced MDL-11279:
Code was not properly checking for empty category.
Check moved to right place and proper print_error() function called as appropriate
2007-09-17 10:54:22 +00:00
nfreear e2e41efc2a MDL-11160 'Live cron runs out of memory ...' - added enrolment check, to match HEAD. 2007-09-17 09:19:00 +00:00
moodler 0e92e35575 Automatic installer.php lang files by installer_builder (20070917) 2007-09-17 05:04:44 +00:00
stronk7 eb2a551ce4 Typo causing wiki files not being saved in backup. MDL-9335 2007-09-16 23:01:28 +00:00
stronk7 82cb40f813 Hide the metacourse dropdown menu if the course
isn't a metacourse and general XHTML compliance. MDL-9922
2007-09-16 19:24:08 +00:00
stronk7 dbc6368462 Prevent some warning when restoring site courses... MDL-10054 MDL-10118 2007-09-16 18:32:50 +00:00
stronk7 f4afcf7efa Show the roll dates option only if the backup course has a start date
(some formats like main page, social..., haven't it and rolling dates
from 0 produces crazy dates. MDL-10125
2007-09-16 17:27:29 +00:00
stronk7 05c7e459ac Fixed wrong link to log report. Shouldn't these links be in php
code instead of lang files? MDL-11281
2007-09-16 08:28:55 +00:00
moodler 7608d5ccab Automatic installer.php lang files by installer_builder (20070916) 2007-09-16 04:22:31 +00:00
iarenaza c798b55df4 Remove additional check when dealing with hidden courses in LDAP enrolment.
The check is superfluous and uses an inexistant variable ($type) that
was removed when we switched to role based enrolment.

Fixes MDL-11098 MDL-10282 and MDL-8346. (backported from HEAD)
2007-09-15 21:54:13 +00:00
skodak 5a9528b959 applying the same patch to advcheckbox, backported from HEAD - Fixes MDL-8627, "HTML QuickForm displays (some?) disabled elements in a non-accessible way", overrides parent::getFrozenHtml. 2007-09-15 19:48:39 +00:00
skodak 45d99c3807 MDL-10277 Force password change cannot be unchecked once selected; backported from HEAD 2007-09-15 09:45:01 +00:00
skodak d26e72d1b2 MDL-11292 fixed Cannot create child auth plugins - patch by Mark Nielsen; used inlude_once() when searching for functions/methods in files; backported from HEAD 2007-09-15 09:31:58 +00:00
skodak 2baa6afc82 MDL-10995 backported basic perf improvement from HEAD - course parents are now cached when walking the context tree - this should substantially improve login time; HEAD will have a better solution soon by ML; 2007-09-15 09:08:25 +00:00
nfreear 0fcad934b6 MDL-11160 'Live cron runs out of memory, before "core" ...' - tailored get_recordset_.. fix for 1.8 branch. 2007-09-14 15:48:19 +00:00
tjhunt 9bee6187e4 MDL-11271 - The closing bracket "}" can't be used in cloze question type. Now, you can excape a closing } with a backslash. Do feedback, as well as answer. 2007-09-14 09:42:40 +00:00
tjhunt 4764cb3ee8 MDL-11271 - The closing bracket "}" can't be used in cloze question type. Now, you can excape a closing } with a backslash. 2007-09-14 09:34:40 +00:00
toyomoyo f2614f737b MDL-10904, fixing getElementById 2007-09-14 03:32:42 +00:00
stronk7 b7f2b64f2f Now using one cross-db solution to be able to
simulate the status boolean ins assignment
submissions. MDL-8164 & MDL-10846

Backported from MOODLE_HEAD
2007-09-13 17:58:55 +00:00
tjhunt 3b53ec29f8 MDL-11081 and MDL-11211 - Implement quiz_question_list_instances. The lach of this function was causing a horrible dataloss bug: MDL-11211. Fix thanks to Janne Mikkonen, refined by me. Merged from MOODLE_16_STABLE. 2007-09-13 17:29:13 +00:00
tjhunt 0498a4d517 MDL-11213 - Quiz preview attempts show up in item analysis. Fix thanks to Jean-Michel Vedrine. 2007-09-13 16:24:50 +00:00
tjhunt 7d0ffb0fe6 MDL-11231 - Missing "correct" tick in Close question with answer '0'. 2007-09-13 10:46:39 +00:00
bobopinna d3564a90ad Fixed a problem importing imsmanifest.xml file from course file system 2007-09-13 10:26:58 +00:00
nfreear d3ad764373 Fixes MDL-8627, "HTML QuickForm displays (some?) disabled elements in a non-accessible way", overrides parent::getFrozenHtml. Merged. 2007-09-12 11:25:11 +00:00
skodak 8a9febcdb0 MDL-10635 adding caching workaround for performance problems with update_course_icon() function - 1.9 will have a different solution 2007-09-12 10:45:32 +00:00
arborrow 0a78a5c67d MDL-10410 - for consistency using UNCATEGORISED constant rather than hardcoded string 2007-09-12 03:38:53 +00:00
martinlanghoff 16ce3928cc admin/cron: if $PERF->dbqueries is set, profile modules...
The cron() function of some modules can be a huge drag on the
server. Capture profiling data...
2007-09-12 03:33:38 +00:00
martinlanghoff 08c28a96f7 PERF logging - move handling to moodle_request_shutdown()
By moving the performance profile logging to the very
end of PHP processing, we cover more pages, notably those
that don't end up with a footer or a redirect, like file
serving.

This should improve quality of our performance logs, and
help catch some piggies...
2007-09-12 03:33:16 +00:00
martinlanghoff 1ba840fdbb redirect() - log performance profiling info
Many heavy pages end in a redirect. Log their profiling data!

Thanks to Matt Clarkson for spotting the problem.
2007-09-12 03:33:00 +00:00
martinlanghoff cfca081765 admin/modules: Avoid calling rebuild_course_cache()
rebuild_course_cache() over all courses is extremely expensive,
not suitable for interactive calling. Better to clear modinfo
and let course/view.php repopulate it as needed.

With this patch we clear out modinfo _only_ for courses affected
by the module we show/hide/delete.
2007-09-12 03:32:42 +00:00
martinlanghoff f6297ede8e course/index: move orphan fixups to an optimised fix_coursecategory_orphans()
Move the fixups for orphan courses to the newly minted
fix_coursecategory_orphans() -- and optimise it to take only 1 dbquery for
the common case.

If we do find lots of orphans, we issue 2 updates per orphan.

This cuts down dbqueries drastically - we used to have 2x the number of
courses in the site.
2007-09-12 03:32:21 +00:00
martinlanghoff 50a79cfecc fix_course_sortorder(): fix breakage with large categories, saner error
Two improvements for fix_course_sortorder()

 - If the category has more courses than the shift range
   use a larger shift range to avoid overlapping with itself

 - If things do go wrong during the per-course sortorder updates,
   rollback and try and call ourselves with a 'safe' flag.

Still - far from perfect. Probably the global sortorder approach
is broken. The sanest way is to rework things to always join against
course_categories and order by the combined sortorders.
2007-09-12 03:31:32 +00:00
arborrow 133f457cdc MDL-10407 fixed missing double quote 2007-09-12 03:23:26 +00:00
thepurpleblob 8f56f9d9a3 Missing a stripslashes() so TeX functions didn't work 2007-09-11 14:52:51 +00:00
thepurpleblob 1c632b934d MDL-10092:
Decode HTML entities before processing.
2007-09-11 13:53:24 +00:00
jgutierr25 12b7c16ffc pb with autologinguest 2007-09-11 07:55:51 +00:00
tjhunt 3580ad8ee1 Take out duplicate $Id$ CVS tags. 2007-09-10 11:06:01 +00:00
toyomoyo 5c6a0bad7b MDL-11062, 1.7=>1.8 groups upgrade problems 2007-09-10 01:54:33 +00:00
gbateson 697463d868 added "Enable" label to open/close time checkboxes 2007-09-08 23:30:37 +00:00
stronk7 8d20f40cb9 Fix excess of slashing in course names when restoring. MDL-11151 2007-09-08 22:56:29 +00:00
stronk7 347f90e704 Fix link in email to new admin report. MDL-7850 2007-09-08 22:48:23 +00:00
stronk7 b533156097 Adding some strings for the new backups report. MDL-7850 2007-09-08 22:44:42 +00:00
stronk7 22bf0fd32c Redirecting old backup log to the new one. MDL-7850 2007-09-08 22:39:23 +00:00
stronk7 2c4f2d4004 Adding new report to display scheduled backup logs. MDL-7850 2007-09-08 22:32:51 +00:00
moodler a2ed173893 Automatic installer.php lang files by installer_builder (20070908) 2007-09-08 04:05:55 +00:00
thepurpleblob ec6b89399a MDL-11147:
Debugging now has support for LaTeX/Ghostscrip renderer.
2007-09-07 14:21:09 +00:00
moodler e2d52b4b88 Automatic installer.php lang files by installer_builder (20070907) 2007-09-07 04:49:28 +00:00
toyomoyo c8733890c3 MDL-11111 number of search results is not always correct in the role assignment view 2007-09-07 03:13:53 +00:00
pichetp 5d72dbbe9d Correcting a little error: datesetitem = array(); instead of datasetitem = array();
line +-550 $question->dataset[$datasetname]->datasetitem = array();
2007-09-07 02:42:37 +00:00
moodler b214c00f01 Automatic installer.php lang files by installer_builder (20070907) 2007-09-07 02:12:53 +00:00
moodler c223acda18 Merged fixes for RTL support in 1.8 from Sharar Dolev and the Hebrew translation team
see  MDL-10768
2007-09-06 07:30:51 +00:00
toyomoyo 41fe0508eb MDL-11064, users can't see teacher's profile 2007-09-06 07:07:58 +00:00
toyomoyo 6673f18b1c MDL-9613, spliting the queries into 2 for site/course block respectively 2007-09-06 06:24:40 +00:00
stronk7 97bc9f4934 Now restoring groups is cross-db (the detection of existing groups)
Merged from MOODLE_17_STABLE
2007-09-05 18:40:25 +00:00
stronk7 07893c5239 Repeated fields aren't necessary at all since Moodle 1.7
and, in fact, they throw error if using limits! MDL-9592

Merged from MOODLE_17_STABLE
2007-09-05 15:27:53 +00:00
nfreear 4bedc06d42 MDL-11134, Accessibility: move help link into <label>, so it won't be ignored in JAWS forms mode. Merged. 2007-09-05 14:38:08 +00:00
stronk7 93d8244508 Now the Oracle XMLDB generator detects changes of precision
in NUMBERs without decimals (virtually INTs) and is able to perform the
change of precision properly
2007-09-04 23:16:14 +00:00
stronk7 77b7083885 Added one new test to change precission of a numeric field
to a smaller one. It breaks Oracle in its current status.
2007-09-04 22:10:11 +00:00
moodler a9fce7695e Merged fixes for MDL-10833 from HEAD 2007-09-04 08:18:27 +00:00
moodler bf4c59aa42 Fixes merged from HEAD for MDL-10833 2007-09-04 08:14:33 +00:00
moodler 6255297f0b Merged fixes for MDL-10833 from HEAD 2007-09-04 08:08:58 +00:00
poltawski 6164fc9080 MDL-9851 - RSS block links previously used to open in new window. Restoring this
behaviour. Had to tweak the cleaning to ensure the JS hack for XHTML complaint new
window gets through.
2007-09-03 10:18:59 +00:00
stronk7 a0d692e925 Now, the repository is able to set the resource->name if
it haven't been manuall defined. Part of MDL-10878.
2007-09-02 10:50:22 +00:00
urs_hunkler 1bc5e06312 corrected right column - had id "left-column" 2007-08-31 18:58:08 +00:00
jgutierr25 eb6591ca8b problem with autologinguest 2007-08-31 09:42:22 +00:00
toyomoyo f005a30c52 fixing a typo 2007-08-31 08:20:57 +00:00
moodler 73083f1705 Robustness - avoid possible divide by zero problem MDL-7425 2007-08-30 05:59:31 +00:00
skodak 2712b7f2dc MDL-10921 LDAP Auth to Active Directory requires LDAP_OPT_REFERRALS option set; backported from HEAD 2007-08-29 20:43:54 +00:00
skodak b9e6a03e3e MDL-11023 silence warnings in PHP 4.x - the last param was added in PHP 5.0.2 2007-08-29 20:19:14 +00:00
skodak cd93c36de6 MDL-11058 changeme password not always required to be changed; backported from HEAD 2007-08-29 18:20:52 +00:00
skodak 69e5b55d03 MDL-11043 misspelled get_string in login/index.php 2007-08-29 18:07:49 +00:00
skodak e0a8a35867 MDL-11053 Course object not escaped before insert - patch by Aaron C Spike; backported from HEAD 2007-08-29 13:54:09 +00:00
stronk7 a34487e2e5 Now Moodle >= 1.9 requires PostgreSQL >= 8.0. MDL-11033
Merged from MOODLE_17_STABLE
2007-08-28 15:33:37 +00:00
nicolasconnault bc1d20eea9 MDL-9005 Fixed this and another multilang issue (module name in preview didn't filter multilang tags either). 2007-08-28 13:22:02 +00:00
toyomoyo 7efe75fcc4 MDL-10818, forgot a global 2007-08-28 07:03:24 +00:00
toyomoyo 1f7790ffe5 MDL-10818, do not display graph if user has no permission 2007-08-28 07:01:42 +00:00
moodler c15b5c3c96 Automatic installer.php lang files by installer_builder (20070828) 2007-08-28 05:57:04 +00:00
nicolasconnault 03648520cc MDL-7574 Applying Matthew Davidson's patch. 2007-08-27 17:27:00 +00:00
stronk7 ea6f1fd569 New tables must have the id unsigned. 2007-08-27 14:42:19 +00:00
nicolasconnault d6c42bb205 MDL-10918 Applied Aaron's patch 2007-08-27 14:03:28 +00:00
moodler e3128055a2 Automatic installer.php lang files by installer_builder (20070827) 2007-08-27 06:13:50 +00:00
moodler 52c72b0079 Automatic installer.php lang files by installer_builder (20070826) 2007-08-26 05:55:50 +00:00
moodler e5d17c3450 Automatic installer.php lang files by installer_builder (20070825) 2007-08-25 04:14:03 +00:00
gbateson ee0875740d fixed results not being sent caused by commenting out of "interceptFeedback" (probably left over from debugging) 2007-08-25 01:44:39 +00:00
nicolasconnault ec5a8430eb MDL-10970 Someone was using
$locations = array('location1');
$locations += array('location2', 'location3', 'location4');

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

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

$locations: array('location1', 'location3', 'location4');
2007-08-24 07:19:05 +00:00
moodler 3fdb68a838 Automatic installer.php lang files by installer_builder (20070824) 2007-08-24 06:05:22 +00:00
moodler 1ebce948ec Merged XHTML fix from HEAD 2007-08-24 04:29:16 +00:00
moodler 8841cecde3 Hide roles button on sticky blocks MDL-9723 Merged from head 2007-08-24 02:23:43 +00:00
mchurch aa4be76082 Moving get $cm outside of the 'forum_enabletimedposts' condition as it is needed even if this isn't set. 2007-08-23 13:38:21 +00:00
moodler af191f3be2 Added new icons for file types MDL-9940 2007-08-23 06:44:09 +00:00
moodler 4cd5906993 Added new mime-types for Office 2007 documents MDL-9940 2007-08-23 06:42:24 +00:00
moodler 907e4a312d MDL-10960 fix rss user names 2007-08-23 06:13:48 +00:00
moodler 8eda8b6521 Automatic installer.php lang files by installer_builder (20070823) 2007-08-23 06:03:40 +00:00
moodler 16c5052e79 Remove timelimits from rebuild_course_cache() MDL-10954 2007-08-23 05:45:15 +00:00
moodler c6144706fb Removed checked default from teachers on course reset page MDL-10946 2007-08-23 05:14:57 +00:00
skodak 8ab04045ff MDL-10947 https was replaced with httpss when wwwroot already is https credit goes to Tobias Marx; backported from HEAD 2007-08-22 20:03:45 +00:00
moodler a280860c4e Automatic installer.php lang files by installer_builder (20070822) 2007-08-22 09:13:23 +00:00
moodler 5c8faf4728 Merged patch for MDLSITE-244 from HEAD 2007-08-22 07:52:10 +00:00
jamiesensei 9b71941eba Latest environment.xml from HEAD 2007-08-22 06:06:42 +00:00
jamiesensei 45e27a011b strings needed for custom checks and random question check. 2007-08-22 05:56:10 +00:00
jamiesensei 53f6ee19bd adding code for check for rqp questions and also small update to code for checking for random questions that fixes a small issue with the display of the error message. 2007-08-22 05:35:43 +00:00
jamiesensei 42e28aa6ca Merged various new functionalities from 1.9 into 1.8
---
MDL-9616 - Custom checks in environment.xml
MDL-9616 - tidy up
* add a better message in the table for these checks.
* improve existing strings for other types of check.
* remove a line of debug code.
---
Added new check to be able to compare current and target
moodle versions. Executed only on upgrade (not at install). MDL-10722
---
MDL-10938. 'only strings from lang files can be used as feedback in environment check. Some way is needed to include data from custom check function - a $a param to pass to get_string'. Custom check for questions uses new functionality to print more complex strings as feedback.
2007-08-22 05:29:35 +00:00
skodak 0d8b628813 MDL-10056 Fixed deleting of assignments when original plugin not present; backported from HEAD 2007-08-21 09:23:37 +00:00
toyomoyo 3f22efa141 MDL-10658, course short name repeated in breadcrumbs 2007-08-21 05:10:21 +00:00
jamiesensei 2142a30406 MDL-9872 Admin Report on Possible problems Random questions selecting questions from sub categories. Backporting from HEAD. Reports possible problems with question engine when upgrading to Moodle 1.9 2007-08-21 03:44:10 +00:00
moodler 1d671e8e4a Moved lang file MDL-10920 2007-08-21 03:39:23 +00:00
moodler 211a42594f Moved language files for presets MDL-10920 2007-08-21 03:34:53 +00:00
toyomoyo 041396c760 fixing typos 2007-08-21 02:11:50 +00:00
nicolasconnault dadcf5cc42 MDL-10177 Applied lovely hack (not ugly!) suggested by Pablo. It's lovely because it solves an ugly design error in the previous code: modifying a parameter variable in the function body. 2007-08-20 17:58:38 +00:00
thepurpleblob 0337694a7d MDL-9345:
Hard coded error message "cannot view profile" put into the errors file in
the language pack. Where it should be :-)
2007-08-20 15:13:35 +00:00
jamiesensei a936d39aed file index.php was added on branch MOODLE_18_STABLE on 2007-08-21 03:44:15 +0000 2007-08-20 11:12:11 +00:00
Martin Langhoff f5c39e0b23 cvsimport fixups 2007-08-29 13:13:58 +12:00
Martin Langhoff 53aab8ffd4 cvsimport fixups binary files 2007-08-29 13:13:53 +12:00
nfreear bc8f835f0d MDL-5400 "Accessibility modifications..." - fixing the 4 themes that don't use <h1>. Merged. 2007-08-20 10:57:04 +00:00
thepurpleblob b05c975e30 MDL-10819:
GIFT now exports grade fractions for numeric questions
2007-08-20 10:34:20 +00:00
thepurpleblob 908a8949b3 MDL-10689:
No questions imported if "stop on error" selected and there are invalid grades.
2007-08-20 10:05:40 +00:00
thepurpleblob dc4495783d MDL-10902:
Whoops! Overwrote question object. Variable name changed
Thanks to Adriane Boyd for spotting that one.
2007-08-18 09:32:09 +00:00
thepurpleblob 75ca3e0d01 Moved check for plugin import/export to the start rather than the end 2007-08-17 09:46:51 +00:00
toyomoyo 49b5de5ae4 MDL-10037, hide hidden user's blogs from course view 2007-08-17 08:15:38 +00:00
toyomoyo 9725881e50 MDL-10856, fixing mp3 filter by placing utf.js include in <head> 2007-08-17 04:57:08 +00:00
toyomoyo 3b817c7251 reversing a change causing multiple mp3s not to work 2007-08-17 02:06:43 +00:00
nfreear acb9bb129a MDL-9890 "Help should be well-formed..." - replacing abused (nested) <blockquote> and <ul> with <div class="indent">, especially in install.html, and other validation errors. Merged. 2007-08-16 10:58:57 +00:00
moodler 480e735763 Automatic installer.php lang files by installer_builder (20070816) 2007-08-16 06:53:00 +00:00
toyomoyo 6b94ff60e6 MDL-10856, mp3 filter not working in uploaded html files 2007-08-16 05:28:40 +00:00
toyomoyo 6214b779ff MDL-10818, do not display broken graph when user has no permission to view activity graph 2007-08-16 04:04:35 +00:00
tjhunt 9ce40f4de1 MDL-10858 - Edit field sizes for overall feedback are silly 2007-08-15 12:44:30 +00:00
tjhunt c72a4079b1 MDL-10834 - Restore of quiz module may create calendar events without a date/time. Fix thanks to Derek Woolhead. Merged from MOODLE_17_STABLE. 2007-08-14 13:33:44 +00:00
moodler 8f5b6a9308 Automatic installer.php lang files by installer_builder (20070814) 2007-08-14 06:14:36 +00:00
tjhunt 1138529ffa Notice on quiz config.html page. - backported from HEAD. 2007-08-13 11:20:59 +00:00
toyomoyo 80289b2543 MDL-10691, slow forum_role_unassign() 2007-08-13 05:38:14 +00:00
urs_hunkler 71f9356394 MDL-10704 and MDL-10793 corrected also the second letter-spacing 2007-08-12 12:48:49 +00:00
urs_hunkler dd48dfc480 MDL-10704 - removed letter-spacing to avoid the Khmer rendering issue 2007-08-12 10:42:35 +00:00
urs_hunkler 95dfead3b1 Added the $THEME->htmleditorpostprocess option. When the DOM tree of Moodle pages needs to be changed then the HTMLEditor must be applied after the DOM changes. With $THEME->htmleditorpostprocess developers get control when to render the HTMLEditor. They have to call the rendering function within their scripts. 2007-08-12 09:56:51 +00:00
urs_hunkler 22c22fe17c merged from 1.7, cleaned up and replaced the wrong colour name lightgreen with the CSS colour name lime. 2007-08-12 09:13:37 +00:00
moodler 6e4dbffd0a Straighten files in directory mode 2007-08-12 06:15:55 +00:00
moodler 6339452c3e Added a small exception to make a download link for zip files MDL-9478 2007-08-11 14:56:48 +00:00
tjhunt ffeb631f28 Fix whitespace. 2007-08-10 15:54:11 +00:00
tjhunt a44ce185fa MDL-10581 - Each attemtp builds on last & multi-page quizzes was casuing grading errors. 2007-08-10 15:22:15 +00:00
tjhunt 1c5d61d928 MDL-10799 - Question types do not accurately determine whether their state has changed or not. 2007-08-10 15:21:16 +00:00
tjhunt b766a48f3f MDL-10786 - Short Answer questions will not allow 0 as the sole answer 2007-08-10 10:48:27 +00:00
tjhunt eac3f48ca7 Accessing wrong field of $mod from course.modinfo. Merged from MOODLE_17_STABLE. 2007-08-10 10:37:38 +00:00
thepurpleblob 581ca3d354 MDL-10785:
empty() changed to !isset()
2007-08-10 07:16:36 +00:00
moodler 6ac9c77179 OK now the emailing problem is fixed properly I think 2007-08-10 05:23:18 +00:00
stronk7 31682b1276 Fixing one SQL that could cause problems with coincidences
in the associative array. MDL-10787
2007-08-10 01:44:46 +00:00
stronk7 daf3c36c51 MSSQL blobs doesn't like quoted binaries. MDL-9835 2007-08-10 00:55:44 +00:00
stronk7 0ab95f8bf6 Adding some comments about latest local changes. MDL-10788 2007-08-10 00:45:02 +00:00
stronk7 295ce0c81e Fixed bug when inserting strings beginning by single quotes. MDL-10788 2007-08-10 00:40:32 +00:00
stronk7 dda4bbbf25 Fixed insert/update of Oracle xLOBs. Credit goes to Rita Scholes. MDL-9835 2007-08-09 18:16:47 +00:00
stronk7 eee45d7fe6 Reverting deleted addslashes(). They are needed for proper testing after all. 2007-08-09 18:10:52 +00:00
stronk7 838e92f788 And binary tests should use addslahes at all. Testing cross-db right now. 2007-08-09 17:59:08 +00:00
stronk7 a904349624 Adding some difficulties to the CLOB/BLOB tests... (escape chars) 2007-08-09 17:51:37 +00:00
thepurpleblob bfbe9c52c1 Added hooks to qtype import/export 2007-08-09 14:11:08 +00:00
moodler 2e5815427b Further to MDL-10771 2007-08-09 13:28:15 +00:00
moodler 1c2d58cc99 Further fix for MDL-10771 2007-08-09 13:27:06 +00:00
moodler ebecdf8d14 Removed <P> tags MDL-10771 2007-08-09 13:24:13 +00:00
thepurpleblob 82cb7fe78c MDL-6367:
Backporting quiz import/export for plugins
2007-08-09 08:43:23 +00:00
moodler 9b2aa32147 FIxed display of results when groups have been defined
It was only showing the current group EVEN even the choice acticity itself was not in group mode
2007-08-09 06:25:49 +00:00
stronk7 196684087f Now sybase quotes are properly handled by the lang editor. Part of MDL-9835 2007-08-08 22:16:23 +00:00
urs_hunkler d86d8f5a99 added missing div before footer 2007-08-08 17:49:28 +00:00
tjhunt 4514f4bf4b MDL-10759 - Bogus get_context_instance call in quiz_print_recent_mod_activity. Merged from MOODLE_17_STABLE. 2007-08-08 11:31:09 +00:00
stronk7 4bcf2c2122 Reverting last commit I performed by mistake when debugging
a bit the plugin. Sorry! :-(
2007-08-08 11:10:41 +00:00
stronk7 ed4fd6c492 Detect the connection status before continue. Else no-one
will be able to connect with local alternatives. And
under SSO it's a problem!
2007-08-08 10:59:42 +00:00
tjhunt 809651502d MDL-10737 - Increase size of short answer text entry box 2007-08-07 12:39:33 +00:00
urs_hunkler ab717a9c26 MDL-8109 - removed comments and some changes to make merging easier 2007-08-07 07:11:44 +00:00
urs_hunkler 9ffa6198f3 MDL-8109 - found a way to work with the split print_header and print_footer part. Check the tracker for more info 2007-08-07 06:53:31 +00:00
stronk7 62ec0b2bd4 Id tag added + whitespace cleaning 2007-08-06 23:20:21 +00:00
stronk7 c6b2e4fce9 Added Id tag 2007-08-06 22:15:19 +00:00
poltawski 82ad3312a7 MDL-10624 Reverting forum part of last commit - it wasn't needed, I wasn't testing
correctly.
2007-08-06 19:16:17 +00:00
poltawski ca2af27934 Fixed typo in previous commit 2007-08-06 18:49:05 +00:00
poltawski 19ec0f2df2 MDL-9431 & MDL-10624 - we're not removing some tracking records from the
database when we unassign roles - remove forum_subscriptions & user_lastaccess
2007-08-06 18:44:10 +00:00
stronk7 4adbf6cf72 Added Id tag 2007-08-06 18:28:30 +00:00
stronk7 91cee36fe6 Adding Id tag + copyright notice. 2007-08-06 17:54:14 +00:00
moodler 0c93bd7340 Make sure that the receiving user has some messaging preferences set so they can see popups, get email etc.
MDL-10732
2007-08-06 15:09:18 +00:00
moodler 4be4e29a3b JUst tidying some comments while I was there 2007-08-06 14:50:12 +00:00
poltawski 8cd6f2b347 MDL-10714 - tweak language to clarify allowdeleteing 2007-08-06 13:37:36 +00:00
poltawski 87aa917219 MDL-10715 - remove inappropiate 'upload not allowed' options on upload assignment types! 2007-08-06 13:26:43 +00:00
tjhunt 1221d87de8 MDL-9519 - incorrectuse of language strings in quiz. 2007-08-06 13:22:06 +00:00
moodler caa413ece1 Some fixes relating to the unsubscribe link in emails for some types of forums 2007-08-06 13:08:05 +00:00
mattc-catalyst 4fb68891b0 MDL-7043: fix insert link functionality to allow linking to images again
Author: Matt Clarkson <mattc@catalyst.net.nz>
2007-08-06 05:21:30 +00:00
moodler acd404e309 Automatic installer.php lang files by installer_builder (20070806) 2007-08-06 03:56:00 +00:00
stronk7 1f31378d11 fix insert_record() call using arrays instead of objects
Merged from MOODLE_17_STABLE
2007-08-05 22:49:49 +00:00
stronk7 273c8bf204 $dataobject in insert_record() and update_record() must be objects.
Added code to detect, fix and debug array situations. Related to MDL-9751.
2007-08-05 22:35:31 +00:00
urs_hunkler db8a7ac9d1 $thumbheigt was calculated instead of $thumbwidth 2007-08-05 16:40:05 +00:00
moodler ef9b262c7c Added some whitespace to new discussion button 2007-08-05 05:38:16 +00:00
stronk7 5ce8c064dd Prevent one warning 2007-08-04 18:46:36 +00:00
stronk7 37c023fb5c Support some strings from within the auth plugin lang files added. MDL-10694 2007-08-04 17:16:05 +00:00
moodler 2ac86cbd24 Automatic installer.php lang files by installer_builder (20070804) 2007-08-04 05:46:18 +00:00
tjhunt 5573a51843 MDL-10709 - Shortanswer resonses should be trimmed before being saved in the database. 2007-08-03 14:26:33 +00:00
donal72 f4f534c675 MDL-8119 : Improvements to logging where Mnet hosts are involved 2007-08-03 13:18:00 +00:00
donal72 aa34400457 Link to profile editing should not appear on other users' profiles. 2007-08-03 12:20:46 +00:00
urs_hunkler 8ebd0d9f4d Added a space before divs too and removed the space behind req 2007-08-03 12:04:31 +00:00
donal72 1880a55e53 MDL-9288 : An additional addslashes() that was in Petr's patch but didn't get committed. Tested and required. 2007-08-03 11:15:59 +00:00
tjhunt 4fadd52878 Tabs to spaces. 2007-08-03 10:34:15 +00:00
tjhunt 87b9156edb MDL-10690 - Make quiz name a manditory field. 2007-08-03 10:32:53 +00:00
donal72 39bf0df228 MDL-9314 : typo of $access / $accessctrl 2007-08-03 10:08:52 +00:00
urs_hunkler 27a78fcd2d Added a space behind advancedimg to correct aligning in forms. 2007-08-03 09:28:52 +00:00
moodler 45debd50c5 Automatic installer.php lang files by installer_builder (20070803) 2007-08-03 07:17:02 +00:00
moodler a4f3137661 Fixed reportgraphs MDL-10700 2007-08-03 03:28:18 +00:00
stronk7 1002d7e22a Added space to perform correct N' queries under MSSQL. MDL-10423 2007-08-02 23:37:13 +00:00
donal72 587813b713 1 word doco fix 2007-08-02 05:36:06 +00:00
donal72 c21899e0dd Fix for PHP 5.2.2: $HTTP_RAW_POST_DATA not populated bug:
http://bugs.php.net/bug.php?id=41293
2007-08-02 05:13:10 +00:00
donal72 bcfbd8cbdf Rename 'promiscuous' to 'dangerous'. Minor bugfixing for mnet. 2007-08-02 04:30:34 +00:00
donal72 304182d210 Minor mnet bugfixes 2007-08-02 00:48:04 +00:00
thepurpleblob f4c0f3d062 MDL-10680:
subquestions/subanswers needed swapped for matching questions
2007-08-01 13:43:29 +00:00
thepurpleblob a871e630b2 MDL-10585:
MDL-10584:
Present more factually correct message when a guest attempts to enrol.
Provide a mechanism for specifying which role in a course holds the
enrolment key.
2007-08-01 11:50:00 +00:00
thepurpleblob 5ceecdaaff MDL-10585:
MDL-10584:
Present more factually correct message when a guest attempts to enrol.
Provide a mechanism for specifying which role in a course holds the
enrolment key.
2007-08-01 10:55:17 +00:00
gbateson 964b1bb8c5 fix 2 javascript errors: "getELementById not defined" and "parseint not defined" 2007-08-01 05:23:35 +00:00
moodler 5aada1957d FIx for HTML typo MDL-9222 2007-08-01 05:10:54 +00:00
moodler 6e0c3e4e4d Fixed broken docs links MDL-10670 2007-07-31 15:58:17 +00:00
tjhunt 1e6eb9da35 MDL-10663 - fix stupid typo on the stable branch. Somebody shoot me! 2007-07-31 09:38:52 +00:00
stronk7 960192ec0e search cron was killing the rest of cron tasks! 2007-07-30 23:40:41 +00:00
tjhunt 66f8778519 MDL-10661 - another bloody invisiblefieldset bug. 2007-07-30 22:14:16 +00:00
stronk7 da30f2babd Since now, Moodle 2.0 will require PHP 5.2. MDL-10390
Merged from MOODLE_17_STABLE
2007-07-30 16:41:54 +00:00
tjhunt 9ff3b4ab32 MDL-10300 - cleaning incorrectly applied to overall feedback. Backported from HEAD. 2007-07-30 10:41:15 +00:00
moodler f97583af41 Automatic installer.php lang files by installer_builder (20070730) 2007-07-30 04:38:50 +00:00
toyomoyo dfb723b481 MDL-10640, adding missing index for mdl_role_capabilities table during upgrade 2007-07-30 02:37:22 +00:00
wildgirl f40f3604c7 MDL-4912 docs directory clean-up 2007-07-28 20:17:08 +00:00
moodler 6483b3b16c Automatic installer.php lang files by installer_builder (20070728) 2007-07-28 06:12:34 +00:00
stronk7 a3daa6c40d Adding one Moodle note about the local hack performed. MDL-9911 2007-07-28 00:15:09 +00:00
stronk7 bb9950d1cc Moodle hack to make the excel generation lib really better
under UTF-8. Credit goes to Thomas Robb. MDL-9911
2007-07-28 00:00:45 +00:00
mchurch 4fb30fc90b Bug #MDL-10632, fixing the use of 'delete_event'. 2007-07-27 18:42:51 +00:00
toyomoyo 50ae935fd6 MDL-10256, when user is unassigned a role in course, if user has no course:view, user will be removed from all groups in course 2007-07-27 05:42:27 +00:00
thepurpleblob 3fcf436c16 MDL-10239:
Improper check for correct answer in true/false questions
2007-07-26 15:06:38 +00:00
thepurpleblob aa86e60148 Possible error passing course id from page to page resolved 2007-07-26 12:36:14 +00:00
thepurpleblob 529c18df40 Whoops - parameters need to match category check and display of course. 2007-07-26 11:03:07 +00:00
thepurpleblob 88f3ed390f MDL-9123:
Check that the selected category is allowed.
2007-07-26 10:54:53 +00:00
moodler 5008d3951f Automatic installer.php lang files by installer_builder (20070726) 2007-07-26 05:17:36 +00:00
toyomoyo 247879d0f3 fix for MDL-10564, wrong userid used for get_my_courses() in blogs 2007-07-26 02:44:35 +00:00
toyomoyo 3708bfc599 fix for MDL-9804, shortname on forms are limited to 15 chars 2007-07-26 02:28:43 +00:00
stronk7 59d1acce89 Adding two missing strings. MDL-6017
NOTE: These are OUT for Moodle 1.9 and new Grade System, so don't
      translate them!

Merged from MOODLE_17_STABLE
2007-07-25 22:10:50 +00:00
stronk7 e95c8bc282 Fixing two get_string() calls when restoring gradebook preferences. MDL-6017
Merged from MOODLE_17_STABLE
2007-07-25 21:34:11 +00:00
tjhunt c7ff87ee13 OU Bug 2867 - Overview report keeps forgetting the 'Display options' settings. Merged from OU Moodle. 2007-07-25 17:08:24 +00:00
urs_hunkler 520b973c8d added paddign-top:1em for removed <br /> in sitelink 2007-07-25 14:57:07 +00:00
urs_hunkler f76a2d832d removed <br /> in sitelink 2007-07-25 14:49:20 +00:00
thepurpleblob 18e1b648b9 MDL-10604:
Add ability to add sub categories directly from category screens.
2007-07-25 13:55:13 +00:00
thepurpleblob b30533ad22 MDL-10604:
Add ability to add sub categories directly from category screens.
2007-07-25 13:51:20 +00:00
urs_hunkler 8e797520d7 deleted commented old line. 2007-07-25 11:17:23 +00:00
urs_hunkler b552ea3586 changed old getElementById(id).submit() to the new submitFormById(id) call. 2007-07-25 11:16:17 +00:00
tjhunt bc898bed7b Regression from MDL-10515 - the a. b. was getting doubled. 2007-07-25 10:08:51 +00:00
mark-nielsen 13f4d81384 Fixed MDL-9923 2007-07-24 07:01:43 +00:00
moodler 12fa8f82fc Automatic installer.php lang files by installer_builder (20070724) 2007-07-24 06:20:51 +00:00
stronk7 cf5bb676dc Anihilate the last TEXT column having a default clause. With thin, Moodle > 1.8
builds under strict (mysql) and those defaults won't be there anymore. As part
of the upgrade to 1.9 one check is going to be performed to see if it's needed
to drop such default. MDL-6218
2007-07-23 23:26:32 +00:00
stronk7 02e7dadc05 Let's use the default (cached) list of fields here. MDL-10571 2007-07-23 16:33:54 +00:00
stronk7 439d39348d Now the my page retrieves all the fields (modinfo included) from
the course, so print_overview() calls are working again.  MDL-10232
2007-07-23 15:50:59 +00:00
jgutierr25 69860d5d10 *** empty log message *** 2007-07-23 11:38:14 +00:00
moodler 84345a1d0d Fixed a broken link to full post in searches 2007-07-23 09:10:47 +00:00
toyomoyo 41617e6525 ignore limits on first call in sql, so that we can cache all, but only return required portion 2007-07-23 08:55:43 +00:00
toyomoyo 864fbeda4b making get_my_courses cache respect limit and also back porting from HEAD to cut down loop time 2007-07-23 08:37:41 +00:00
stronk7 748d925acb Small improvement. Reducing the list of fields returned
by get_my_courses().
2007-07-22 22:58:34 +00:00
stronk7 f352ff4b83 Small improvement. Reducing the list of fields
returned by get_my_courses() in this block.
2007-07-22 10:29:01 +00:00
stronk7 3dc450db90 New cross-db version of the big union query used by get_my_courses() function.
I've tested both the "IN" subquery and the "FROM" subquery and, under sites
with more courses, the "FROM" one seems to perform slightly better. MDL-9381
2007-07-22 00:24:40 +00:00
thepurpleblob 11bf8a95e2 MDL-10531:
GIFT now handles Essay and Description type questions. See help/docs.
2007-07-21 07:47:49 +00:00
thepurpleblob 6a219918c2 MDL-10531:
GIFT now handles Essay and Description type questions. See help/docs.
2007-07-21 07:38:02 +00:00
tjhunt 6f6506058f MDL-7925 - it happened again. Stupid bloodly forms lib. I have no idea what it was playing at. 2007-07-20 17:10:11 +00:00
tjhunt cccd285acf Change where it looks for quiz report language files, to match the way the existing reports currenly work. 2007-07-20 16:12:06 +00:00
thepurpleblob 14f42baf18 MDL-10396:
Add an option and a check to (optionally) prevent users being enrolled
in hidden courses.
2007-07-20 13:01:24 +00:00
thepurpleblob 0dc4f14a26 MDL-10157:
Turn the diagnostic prints into error_logs. The more normal "course skipped"
message now requires DEBUG_ALL or greater before it is generated at all.
2007-07-20 08:55:44 +00:00
moodler 3dbdd5caa3 Automatic installer.php lang files by installer_builder (20070720) 2007-07-20 05:48:34 +00:00
urs_hunkler 38048ab4eb activated chamleon again 2007-07-19 19:55:24 +00:00
urs_hunkler 2329052916 MDL-10322 integrated the flat tabs from pre 1.8, several other enhancements 2007-07-19 19:53:40 +00:00
mchurch d715f651f4 Changing the doc. 2007-07-19 17:01:04 +00:00
tjhunt 597abe1a2c MDL-8056 - one if statement was missed during Matt Clarkson's/Eloy's commit on 15th July 2007. 2007-07-19 16:51:05 +00:00
mchurch 9a1dd76cfa Adding 'get_coursemodule_info' to the standard available functions for assignment types. As a minimum, this allows assignment types to add their own icon (like resource does). 2007-07-19 16:49:08 +00:00
toyomoyo 488fec2e70 fix for MDL-10445, adding of blocks on user blog page is not possible 2007-07-19 06:04:03 +00:00
moodler ece92348bf Merged fixes for mp3 and flv files from MDL-9739 2007-07-19 06:00:19 +00:00
moodler cf3ccea5e5 Automatic installer.php lang files by installer_builder (20070719) 2007-07-19 05:55:20 +00:00
moodler ee87411fa9 Merged support for flv from stable 1.8 2007-07-19 05:45:17 +00:00
toyomoyo b8f8058211 MDL-10149, preventing the deletion of the last admin role 2007-07-19 05:18:06 +00:00
moodler 29b30932c9 Merged fix for navigation from HEAD 2007-07-19 03:51:20 +00:00
toyomoyo 02bfbf0518 fix for MDL-10461, timemodified not preserved during restore 2007-07-19 03:36:09 +00:00
skodak 9d46c8fbbf MDL-10517 Use of addslashes in assignment/lib.php; backported from HEAD 2007-07-18 18:43:51 +00:00
tjhunt b77a1c30bd MDL-10515 - Change HTML to make it easier to style multiple choice questions 2007-07-18 13:57:08 +00:00
thepurpleblob 49240e1503 MDL-10496:
Correct role capability requirements had not been included, so menu
was not displayed for roles with only category update and/or bacup
selected (assigned at site level)
2007-07-18 09:12:23 +00:00
toyomoyo 7ea370a056 fix for MDL-10469, no courses shown for users with doanything 2007-07-18 07:00:18 +00:00
moodler 323871cbf3 Automatic installer.php lang files by installer_builder (20070718) 2007-07-18 06:29:58 +00:00
stronk7 d7fd82a2ca And key fields are lowercased too. End of MDL-10413 2007-07-17 18:56:40 +00:00
stronk7 6794ccb2b3 And index fields are lowercased too. Part of MDL-10413 2007-07-17 18:53:19 +00:00
stronk7 392e59c88e Ensuring we always retrofit lowercase tables. Part of MDL-10413. 2007-07-17 18:48:18 +00:00
tjhunt fdfe84df84 OU bug 3463 - warnings when you start an attempt in 'each attempt builds on last' mode. 2007-07-17 15:28:04 +00:00
thepurpleblob dc751c555e MDL-10395:
Course managers are now displayed in the order that the user
selects in the Define Roles page.
2007-07-17 13:58:50 +00:00
thepurpleblob ef9e26dd33 MDL-10495:
Course Manager's roles now in same order as Manage Roles screen
2007-07-17 13:12:05 +00:00
jgutierr25 28b9086750 test if cas activated and non parameters 2007-07-17 12:09:14 +00:00
jgutierr25 85b70ad4f6 *** empty log message *** 2007-07-17 11:55:09 +00:00
jgutierr25 1110888aee *** empty log message *** 2007-07-17 11:49:06 +00:00
toyomoyo 43a8efaadc fix for MDL-10475, before dropping student can post add an override for all legacy student role to prevent them from adding entries. 2007-07-17 02:45:47 +00:00
moodler 71ad20a5ca Bye bye CHANGES ... http://moodle.org/mod/forum/discuss.php?d=75777 2007-07-17 02:20:47 +00:00
stronk7 ca133f6ec3 Adding some course->xxxx missing fields to backup & restore. MDL-10444 2007-07-16 20:16:24 +00:00
urs_hunkler c69e712116 #admin-report-courseoverview-index .invisiblefieldset { display: block; } 2007-07-16 19:21:14 +00:00
skodak ce52f7c68c MDL-10482 incorrect texarea height; backported from HEAD 2007-07-16 14:51:03 +00:00
stronk7 1aca4eeaf0 Now the glossary->allowcoments setting is respected. MDL-8056
Credit goes to Matt Clarkson. Thanks.
2007-07-15 22:24:43 +00:00
skodak 3e57e4b578 MDL-8096 fixed & in htmlarea httpsrequired parameter - xhtml strict fix; backported from HEAD 2007-07-15 15:20:31 +00:00
mchurch d10350ce83 Tracker #MDL-9353 - Paypal cost of course not visible in course settings. 2007-07-13 20:12:32 +00:00
tjhunt e0fdaa9de0 MDL-10452 - start quiz UI is confusing if you have quiz:preview capability. Change the 'start/continue attempt button' to say 'start/continue preview' in this case. Merged from MOODLE_17_STABLE. 2007-07-13 15:58:32 +00:00
jamiesensei 2da97a4f23 merged in fix for MDL-10382 and MDL-10440 from HEAD. Revision 1.36 -1.38 from HEAD 2007-07-13 09:25:59 +00:00
moodler 5097b7269b Automatic installer.php lang files by installer_builder (20070713) 2007-07-13 08:37:27 +00:00
thepurpleblob f88c5b545d MDL-10380:
Check for randeredmatch plugin done using array_key_exists() for PHP4
compatibility
MDL-10317:
Question name is now the question ID, rather than the question text.
2007-07-13 08:35:09 +00:00
moodler be8963b70c Fixed a string for the no posts page 2007-07-13 03:04:25 +00:00
skodak 9bea47311f MDL-10433 Upgrade: undo_groupings() causes warnings (before groupings exist); backported from HEAD 2007-07-12 15:34:29 +00:00
nfreear be76a35ac3 Part fix of bug MDL-10332 "Data module not filtering list by group on .." - restore bug. Merged. 2007-07-12 14:15:58 +00:00
urs_hunkler eceb6476e1 One more of those .invisiblefieldset display inline issues. Please someone find another solutionand and throw out this general display:inline property. 2007-07-11 15:10:49 +00:00
thepurpleblob b0cd3f5453 MDL-10380:
Modified check for existence of renderedmatch plugin so that it sees it properly.
Bodged weird parameter passing issue so that correct answer choices are found.
2007-07-11 13:48:28 +00:00
thepurpleblob 24c07163d0 MDL-10415:
Documentation for Aiken format added back, plus a few other minor improvements.
2007-07-11 09:56:48 +00:00
moodler b95233e1e1 CHecked in a fix to make get_list_of_timezones calls more efficient MDL-8451 2007-07-11 09:07:34 +00:00
exe-cutor ba1b4cd1ef Got rid of warning messages 2007-07-11 08:29:10 +00:00
exe-cutor 21e00abf42 Fixed a but that caused problems with usernames (shibboleth attribute) that contained uppercase letters 2007-07-11 07:58:57 +00:00
urs_hunkler 9c257d8057 one more of these display: inline issues with invisiblefieldset :-( Can someone replace this problematic solution with another one - please!
after correcting the property to display:block the search button moves below the search field when the text gets longer or the block width very narrow.

.block_search_forums .invisiblefieldset {
  display: block;
}
2007-07-10 20:25:28 +00:00
moodler d0b9615cff Automatic installer.php lang files by installer_builder (20070710) 2007-07-10 06:35:14 +00:00
stronk7 fcbae39803 Now SQL sentences are all together and with proper terminators.
Tested against MySQL, PostgreSQL and MSSQL. MDL-7357
2007-07-09 18:03:15 +00:00
stronk7 25e5ce9a5f Reverting to previous version to respect cross-db. Final
tested solution arriving in hours. MDL-7357
2007-07-09 17:15:50 +00:00
jgutierr25 611e9f2a67 *** empty log message *** 2007-07-09 08:41:30 +00:00
toyomoyo 7936d32cf6 fix for MDL-9937, hidden teachers are visible during course enrol 2007-07-09 07:42:02 +00:00
moodler bc8f1674e9 CHanged XMLDB format slightly to make it easier to cut and paste MDL-7357 2007-07-09 03:56:04 +00:00
toyomoyo 5d29fd70a3 fix for MDL-9613, broken sql in online user block 2007-07-09 02:52:23 +00:00
moodler 6c8a956d90 Bump for post 1.8.2 2007-07-09 02:39:44 +00:00
stronk7 1aee1e5a27 Now tested against Oracle too. Adding option to XMLDB Editor interface. MDL-7357 2007-07-08 23:56:15 +00:00
stronk7 5e8255d651 First cut of the utility embeded in the XMLDB Editor used to
check any Moodle server looking for missing indexes. Tested
under MySQL, PostgreSQL and MSSQL. No frontend available
until tested for Oracle. MDL-7357
2007-07-08 23:18:16 +00:00
stronk7 6f8489e13d Adding some new strings to the XMLDB editor. MDL-7357 2007-07-08 23:12:54 +00:00
moodler b19909d9ae Bump to 1.8.2 release 2007-07-08 14:32:41 +00:00
Martin Langhoff 9084681497 cvsimport fixups 2007-07-07 14:09:13 +12:00
stronk7 305726a6a2 Small upgrade to fix some guest->mnethostid. MDL-10375 2007-07-06 17:43:33 +00:00
stronk7 62f3bee984 Use the new, central, create_guest_record() function. MDL-10375 2007-07-06 17:39:55 +00:00
stronk7 0183e41239 Adding new, central, create_guest_record() function. MDL-10375 2007-07-06 17:37:43 +00:00
poltawski 3b5d49f20c MDL-10311 - further groups import fixes 2007-07-06 16:28:43 +00:00
poltawski bdf5dce110 MDL-10311 Group import broken - missing lang strings & slight helpfile update 2007-07-06 15:30:43 +00:00
poltawski c278e8bc8f MDL-10311 Group import broken - groups import hadn't been updated for new groups,
also missing lang strings
2007-07-06 15:26:35 +00:00
moodler ed200fd420 New CAS module from Jérôme Gutierrez MDL-10366 2007-07-06 10:18:10 +00:00
urs_hunkler 44a718e930 In HTML resources the container box collapsed, when floats are used for content. Solved by adding "clearfix" to the classes. 2007-07-06 08:38:42 +00:00
moodler 5e4098df22 Automatic installer.php lang files by installer_builder (20070706) 2007-07-06 04:53:17 +00:00
skodak 300ade82c4 MDL-10355 fixed typo; backported from HEAD 2007-07-05 20:51:13 +00:00
moodler 275b342ce2 Automatic installer.php lang files by installer_builder (20070705) 2007-07-05 05:54:28 +00:00
skodak 84d7815107 MDL-10341 fixed user search cleaning 2007-07-04 08:30:53 +00:00
urs_hunkler cd1aa3bb76 working on MDL-10322 :: tabs. I added a space before the closing </li> to close the gap between the li elements used without images. I don't know why this space is necessary. 2007-07-03 20:14:20 +00:00
bobopinna 4b70ac02cd Fixed help title 2007-07-03 12:14:52 +00:00
bobopinna 2ad92ce59b Added a missing string 2007-07-03 12:09:39 +00:00
bobopinna bdf0b64635 Added missing help files 2007-07-03 12:06:39 +00:00
bobopinna fba486beb4 file whatgrade.html was added on branch MOODLE_18_STABLE on 2007-07-03 12:06:43 +0000 2007-07-03 12:04:18 +00:00
bobopinna 40bb4f3941 file stagesize.html was added on branch MOODLE_18_STABLE on 2007-07-03 12:06:43 +0000 2007-07-03 12:04:18 +00:00
bobopinna f5084fcf1f file skipview.html was added on branch MOODLE_18_STABLE on 2007-07-03 12:06:41 +0000 2007-07-03 12:04:18 +00:00
bobopinna 75f97e398e file maxattempt.html was added on branch MOODLE_18_STABLE on 2007-07-03 12:06:40 +0000 2007-07-03 12:04:18 +00:00
bobopinna 450eb77b78 file hidebrowse.html was added on branch MOODLE_18_STABLE on 2007-07-03 12:06:39 +0000 2007-07-03 12:04:17 +00:00
bobopinna 4caf41a177 Added a missing string 2007-07-03 10:28:30 +00:00
bobopinna d9a1a6f021 Fixed a bad definited string 2007-07-03 10:27:30 +00:00
bobopinna 880ae97916 Added activation string
fixed bug MDL-9570
2007-07-03 09:43:57 +00:00
bobopinna d10fd935b9 Readded Exit link now called "Exit Activity" 2007-07-03 09:36:31 +00:00
bobopinna d205581b9e Fixed bug MDL-9236 2007-07-03 09:27:42 +00:00
bobopinna e3c424e08c Fixed bug MDL-9776 2007-07-03 09:17:39 +00:00
bobopinna fa21044e08 Fixed bug MDL-10318 on db/update.php 2007-07-03 07:55:33 +00:00
bobopinna 5b696e30cc Fixed bug MDL-10318 2007-07-03 07:54:32 +00:00
stronk7 5c03a7d201 File no longer used. It's under formslib control since
Moodle 1.8. Thanks James! MDL-10036
2007-07-02 17:10:47 +00:00
stronk7 55c59f5050 XHTML conmpliance 2007-07-02 17:02:06 +00:00
stronk7 c9c54db3d8 Using the new "choose" parameter to navigate/preview/choose
IMS-CP resource packages. MDL-10036
2007-07-02 16:56:31 +00:00
stronk7 826b485ce1 Using the new choosecoursefileorimsrepo form element. MDL-10036 2007-07-02 16:53:26 +00:00
stronk7 bbbba10d73 Registering the choosecoursefileorimsrepo form element to
show the "Browse Repository" button
for IMS-CP resources type. (MDL-10036)
2007-07-02 16:50:47 +00:00
stronk7 493ac92129 Adding the choosecoursefileorimsrepo form element to
show the "Browse Repository" button
for IMS-CP resources type. (MDL-10036)
2007-07-02 16:48:32 +00:00
moodler 084712eadc Automatic installer.php lang files by installer_builder (20070702) 2007-07-02 04:56:52 +00:00
skodak 22f3e58605 MDL-9599 Glossary terms revert back to 'Not categorized' when using categories, patch by Alexander Pavlyutin 2007-07-01 15:47:46 +00:00
skodak dc6ef09c49 MDL-10309 Broken password expiration support for LDAP user types rfc2307 and rfc2307bis, patch by Iñaki Arenaza 2007-07-01 15:41:24 +00:00
thepurpleblob 3f9156bf56 MDL-10240:
Added Bb Short Response as a Moodle Essay type question.
Found quite a lot of stuff that could do to be checked and improved
in this code, so this should be considered an intermediate step.
2007-06-29 14:31:08 +00:00
moodler 52dce7612b Automatic installer.php lang files by installer_builder (20070629) 2007-06-29 04:59:49 +00:00
mchurch 552ae418de Bug MDL-8520. Adding target= to the logs buttons. 2007-06-28 18:15:13 +00:00
mchurch 4db3f36034 Bug MDL-8520. Adding target= to the prev/next buttons. 2007-06-28 18:07:09 +00:00
thepurpleblob 9259bf1c0e MDL-10234
Encoded images in subdirectories failed to load.
Thanks to Enrique Castro for fix.
2007-06-28 15:13:52 +00:00
moodler 9407c07c61 Automatic installer.php lang files by installer_builder (20070628) 2007-06-28 05:37:12 +00:00
toyomoyo 0b6c589f21 fix for MDL-10273, users with no capability sould not see New Event button 2007-06-28 03:58:39 +00:00
skodak 9da6b30269 MDL-10276 Text cleaning trouble; backported from HEAD 2007-06-27 12:00:26 +00:00
poltawski 5046d2353b MDL-10264 - fixed typo 2007-06-26 21:16:10 +00:00
gbateson 81f99d24f7 make sure $hotpot->id is set when adding calendar events for new HotPot 2007-06-26 12:04:00 +00:00
tjhunt a80094eff3 Error getting the context in old gradebook. Merged from OU moodle. 2007-06-26 11:50:19 +00:00
moodler f4921fb310 Implemented fix for MDL-10254, thanks Valery! 2007-06-26 09:07:56 +00:00
toyomoyo 6c709360f5 applying supplied patch to MDL-9051, missing $CFG->forum_enabletimedposts 2007-06-26 08:30:49 +00:00
moodler 8969caa059 Automatic installer.php lang files by installer_builder (20070626) 2007-06-26 07:56:55 +00:00
gbateson 226c671af7 in XML source files of HP quizzes, convert relative URLs to absolute URLs in links using window.open(...) 2007-06-26 05:03:38 +00:00
gbateson ca8c7dbc52 ange relative URLs to absolute URLs in window.open(...) 2007-06-26 02:45:40 +00:00
mchurch 1239139dd3 Fixing update_group_button and update_groups_button. They were no longer calling valid URL's. 2007-06-25 20:43:36 +00:00
mchurch fc1bdd6e88 Fixing update_group_button and update_groups_button. They were no longer calling valid URL's. 2007-06-25 20:33:52 +00:00
tjhunt b207f15ca2 Clean up whitespace. 2007-06-25 17:13:17 +00:00
urs_hunkler 9dd4a457c8 changed navmenuwidth to the standard value 2007-06-25 12:19:56 +00:00
moodler ea86a3aa8d Patch for JS problem in MDL-10027 (Chris Holmes did it) 2007-06-25 09:20:55 +00:00
moodler e33fc5a3ee Automatic installer.php lang files by installer_builder (20070625) 2007-06-25 06:49:18 +00:00
tjhunt 1cbf76c5fb MDL-10237 - Improve wording on true/false edit form. 2007-06-24 11:52:52 +00:00
urs_hunkler 06d11b581a Add an option $CFG->CSSEdit or $THEME->CSSEdit to Moodle. If one of both is set to true, Moodle does not write all CSS code in one single CSS file but adds CSS @include to the theme CSS file to load all single CSS files. These single CSS files can then be interactively edited and saved with CSSEdit. It's like Firebug with direct saving your changes. 2007-06-23 12:20:19 +00:00
moodler c519c19ab8 Automatic installer.php lang files by installer_builder (20070623) 2007-06-23 06:01:45 +00:00
tjhunt 357d918295 MDL-10213 - layuout problem for question in IE in Moodle 1.7. I'm taking the opportunity to clean up the CSS in 1.8 and HEAD to match what I did in 1.7. 2007-06-22 13:45:24 +00:00
jamiesensei 173e8c5dfb making environment colours css selector refer to table class instead of body id. So that colours show up on other pages besides admin page. 2007-06-22 11:06:21 +00:00
moodler 50e7e04949 Some fixups for the SCORM update page (missing strings etc) 2007-06-22 05:45:18 +00:00
tjhunt e1e9407acb MDL-7772 - improve the SQL for showing users without attemtps. 2007-06-21 16:14:32 +00:00
bobopinna 3f7cc1f861 Fixed a bad id definition for toc sublists 2007-06-20 09:23:22 +00:00
moodler 6a51d6a786 Automatic installer.php lang files by installer_builder (20070620) 2007-06-20 09:01:24 +00:00
bobopinna 8c36f3b9a9 Fixed a problem with utf8 bug MDL-10101 2007-06-20 08:53:00 +00:00
jamiesensei 2da68b0b32 added styles to install.php for colours for environment table 2007-06-20 06:37:01 +00:00
stronk7 55005a51ce Now calendar export have some correct defaults. MDL-10175 2007-06-19 17:53:14 +00:00
skodak c92d8dd677 (MDL-10155) detect failed regexes duing multilang upgrade (it was causing data loss on some sites); backported from HEAD 2007-06-19 17:26:45 +00:00
tjhunt e1e7d03480 Notices from T/F question is you submit without answering in adaptive mode. Merged from OU Moodle. 2007-06-19 16:35:58 +00:00
tjhunt 7ee50b87b8 XHTML Strict. 2007-06-19 16:32:54 +00:00
jamiesensei 687ce1c4e0 MDL-10168 improvements to display of results from environment checks 2007-06-19 16:32:07 +00:00
jamiesensei 3db1ddedd3 elaborated phpdoc comment slightly for doc_link 2007-06-19 15:17:14 +00:00
jamiesensei fc2df8c889 refactored page_doc_link into two functions. doc_link returns a link to docs. page_doc_link returns the link for this page. 2007-06-19 15:05:17 +00:00
toyomoyo 60a66a2bef fix for MDL-10122, accessibility for course search box 2007-06-19 03:20:42 +00:00
poltawski f7d555d577 MDL-10144 - Fix weak include not changed in STABLE 2007-06-18 19:37:28 +00:00
poltawski 974762e6f5 MDL-10148 - hard coded lang strings in user/message.html 2007-06-18 19:19:51 +00:00
bobopinna ab5642fe19 Fixed a typo added during last commit ;-) 2007-06-18 11:53:21 +00:00
andreabix b1b45674dd Fixed MDL-10100 2007-06-18 11:26:50 +00:00
thepurpleblob dee89d7ecc Missing a CVS Id tag 2007-06-18 10:27:08 +00:00
moodler 32caf9d6d9 Patch from Samuli Karevaara, thanks! 2007-06-18 06:34:13 +00:00
bobopinna 91c6c3dc85 Added some missing strings 2007-06-17 05:33:46 +00:00
mudrd8mz 331ecbe5b6 Undoing last three commits - I did not realized they should go into the HEAD and not into the STABLE :-( I am sorry...
I rolled back using
cvs update -j 1.88.2.8 -j 1.88.2.5 lang.php
2007-06-17 01:38:32 +00:00
mudrd8mz 46a4dde38c "Number of missing strings" or "No missing strings" displayed in the missing mode. Fixes MDL-7029 2007-06-17 01:21:16 +00:00
mudrd8mz 9b7d5f1aa8 Started to work on GUI improvements. Menu tabs introduced. Heading to fix MDL-8012 2007-06-17 00:41:22 +00:00
mudrd8mz 706ea2faf3 To choose a file to edit, popup_form() is used now. It saves some space on the screen. 2007-06-16 22:25:09 +00:00
ethem f8128f42a9 MDL-9836
Authorize.net / SSL Config Bug prevents display of options from enrol/authorize/enrol.php
2007-06-15 17:45:28 +00:00
andreabix 234e96d185 Fixed MDL-10073 2007-06-15 13:23:06 +00:00
csantossaenz 01b1fab671 Fixed bug MDL-7516 2007-06-15 09:09:36 +00:00
moodler 61d29b99d8 Skipping these may help some sites 2007-06-15 06:08:02 +00:00
moodler 8054e9aaad Push beyond 1.8.1 now 2007-06-15 04:19:22 +00:00
tjhunt ee4848432c XHTML strict! 2007-06-14 10:58:23 +00:00
tjhunt d3d4f4936e Whitespace cleanup in workshop help files. 2007-06-14 10:58:12 +00:00
toyomoyo d799be5424 backporting changes in HEAD to fix MDL-10093, administrator or course-creator assigned at course cat level can not restore new courses 2007-06-14 08:51:55 +00:00
urs_hunkler f24e0da312 MDL-9745 - added the fix for input field alignment to 1.8 too. 2007-06-14 07:08:58 +00:00
toyomoyo a8fbb9b4cd fix for MDL-10112 bulk messaging fails silently when messaging not enabled 2007-06-14 04:40:14 +00:00
stronk7 cfc673c112 Now the tokeniser is using the new textlib->entities_to_utf8()
own function (PHP4 and PHP compatible)
2007-06-13 23:21:36 +00:00
stronk7 6dfe1cc67c Added entities_to_utf8() function to textlib, suitable to convert
any entity (numerical and html) to utf-8, providing a PHP4 and PH5
way to do the work.
Also, added the code2utf8() function to convert Unicode code numbers
to UTF-8 chars.
2007-06-13 19:39:53 +00:00
tjhunt e796e306f8 Fix lang file sorting. 2007-06-13 16:39:53 +00:00
pichetp a7adb64678 Removing question/type/datasetdependent/categorydatasetdefinitions.php MDL-10072 2007-06-13 07:51:08 +00:00
toyomoyo bfd12c4dd5 fixing a bug related to setting the granular flag in restore 2007-06-13 06:33:18 +00:00
pichetp 8eede3f475 removing temporary debug print_r 2007-06-13 03:15:58 +00:00
pichetp 9267fe2f43 solving lost of dataitems MDL-10087 2007-06-13 03:11:14 +00:00
stronk7 1c09e6fe0c First cut of the tokeniser library. Modified from drupal search.module
code (see copyrights). The library converts any text/html into an array
of tokens with their score (weight). Supports stop_words, cjk basic
tokeniser (for indexers) and different modes of handling numbers.
2007-06-12 18:15:05 +00:00
pichetp 62fc4a966f set correctly default value for tolerencetype for answers 2007-06-12 15:50:24 +00:00
tjhunt 7ba648a011 Fix typo spotted by Eclipse. 2007-06-12 13:47:14 +00:00
tjhunt 19798dc28d Improve doc comments on get_context_* funcitions. 2007-06-12 11:11:34 +00:00
moodler 08f5787e35 Undoing MDL-9041 2007-06-12 07:05:30 +00:00
dwoolhead 5b99950ef1 Move Export calendar button to bottom of the page (IE especially) 2007-06-11 15:55:48 +00:00
pichetp 21cd4715de adding equation display in calculated question text(MDL-10070) and answers text length
greater.
2007-06-11 08:05:49 +00:00
moodler 9a9446e5b4 Automatic installer.php lang files by installer_builder (20070611) 2007-06-11 06:16:18 +00:00
moodler d3b57e5566 Bumping to Moodle 1.8.1 finally 2007-06-11 03:38:05 +00:00
skodak c70adc397a MDL-9696 used absolute path include in mod_forms; backported from HEAD 2007-06-10 23:28:44 +00:00
skodak a46a937d3e MDL-10057 XSS risk flag for Add/update course category; backported from HEAD 2007-06-10 19:36:49 +00:00
skodak c48083bc2d MDL-10068 "Lost Password" button does not work for ldap auth; backported from HEAD 2007-06-10 19:28:02 +00:00
skodak 9d0466e2a6 MDL-10074 User profile edition uses wrong variable for the (fatal) error message.; patch by Iñaki Arenaza; backported from HEAD 2007-06-10 19:08:27 +00:00
skodak 938122d7d2 MDL-10061 LDAP user creation broken for Novell eDirectory since 1.8; patch by Iñaki Arenaza; backported from HEAD 2007-06-09 15:34:21 +00:00
moodler 95f1ffc594 Added two recent installer langs to CVS 2007-06-09 08:24:52 +00:00
moodler 271013af0f file installer.php was added on branch MOODLE_18_STABLE on 2007-06-09 08:24:52 +0000 2007-06-09 08:22:45 +00:00
moodler 9bfb07349b Automatic installer.php lang files by installer_builder (20070609) 2007-06-09 04:50:32 +00:00
sam_marshall c6982f0c26 MDL-7541 Fixed wiki html diff 2007-06-08 13:44:02 +00:00
martinlanghoff 0989530df9 moodlelib:moodle_request_shutdown() - only call apache_child_terminate if child_terminate is true - MDL-9350
Apparently there _is_ a PHP ini setting controlling
it -- defaults to off.
2007-06-07 21:21:49 +00:00
tjhunt e32f1a5b98 OU Bug 3246 - No logs shown when a group is selected. Merged from OU Moodle. 2007-06-07 16:03:56 +00:00
tjhunt e23ec822d1 Fix logging of course settings updates. 2007-06-07 15:40:14 +00:00
tjhunt cbc29c7237 Make code slightly more robust. 2007-06-07 15:34:12 +00:00
moodler 3098552240 Teacher forums are now displayed to admins correctly MDL-9590 2007-06-07 02:44:58 +00:00
bobopinna 92addc1b42 Removed a white space in simple_play redirect function 2007-06-06 22:16:38 +00:00
bobopinna 2dc95960f4 MDL-9206 Readded unlimited attempts option (sorry I miss it) 2007-06-06 21:30:19 +00:00
bobopinna 146b674a33 MDL-9562 Fixed 2007-06-06 21:06:52 +00:00
moodler f7cc90e58c Fix for MDL-9557 and MDL-9007 (increased timeout when deleting files) 2007-06-06 09:16:21 +00:00
tjhunt a41779208c Eliminate trailing whitespace. 2007-06-05 14:56:16 +00:00
poltawski c9b9c609ba MDL-8080 Grade exceptions broken for teacher by invalid capability check. Thanks to Paul Ortman for the patch. Merged from MOODLE_17_STABLE 2007-06-04 22:57:13 +00:00
poltawski 9b602f0d3d MDL-10001 - Change the ordering of height and width parameters in the interface to reflect
previous ordering.
2007-06-04 22:23:01 +00:00
poltawski f4b35f935c MDL-9987 - Reffering to wrong capability name, thanks to seberin Terrier 2007-06-04 21:59:12 +00:00
skodak 667e06ed11 MDL-10018 Discussion for all groups not sent when groups used to users without access to all groups; backported from HEAD 2007-06-04 21:46:12 +00:00
moodler 0628867164 Fixing typos as per MDL-10013 2007-06-04 12:41:38 +00:00
skodak 39954f4087 MDL-10011 cleanup xhtml and code in report.php - forum, glossary and data mod; backported from HEAD 2007-06-03 16:18:53 +00:00
tjhunt fdd3ed4939 MDL-10006 - Sorting the quiz overview report on feedback breaks it. 2007-06-03 07:26:39 +00:00
skodak 951fd7910a MDL-10010 improved data validation in glossary rate.php; backported from HEAD 2007-06-02 15:58:01 +00:00
skodak b6c96ce21d minor xhtml strict fix and coding style; backport from HEAD 2007-06-02 14:09:42 +00:00
skodak ed0d8418ae MDL-10009 ratings settings do not work in glossary; backport from HEAD 2007-06-02 14:06:59 +00:00
nfreear 2e83e24b6d MDL-9660 - Fixed groups matches functions and added unit tests for them. Merged to 1.8 branch. 2007-06-01 14:21:57 +00:00
tjhunt 87f156a9da Remove invalid unit test. 2007-06-01 13:52:41 +00:00
tjhunt a2aa951267 Remove debug code. 2007-06-01 13:34:00 +00:00
tjhunt 21fa5360fc MDL-9996 - Multiple choice answer box too small in the question editing form in Moodle 1.8. 2007-06-01 09:14:44 +00:00
thepurpleblob f3d264801f MDL-9265:
'correctanswer' field missing for true/false.
2007-06-01 08:12:20 +00:00
thepurpleblob 5a0558be90 Fixed typo stopping image importing working 2007-05-31 08:31:09 +00:00
skodak 0f8a2e49ce MDL-4687 Password expiration support for AD (with patch) - patch by Iñaki Arenaza, thanks! backported from HEAD 2007-05-30 08:55:52 +00:00
skodak c36701675e MDL-9954 LDAP auth settings form problem with 'Member Attribute' and 'Member Attribute uses dn'; patch by Iñaki Arenaza - thanks! backported from HEAD 2007-05-30 08:50:00 +00:00
wildgirl f87414c0bb typo fix MDL-9767 2007-05-29 17:47:25 +00:00
dwoolhead 92b7f24d0d MDL-9729 Ensure start of week day calculation observes user timezone setting in the same way as month start and end dates. Prevents incorrect display of dates (1 out) on main Moodle calendar display although mini calendar display is correct. 2007-05-29 09:38:24 +00:00
mark-nielsen e8cd2b38cc Merging changes for MDL-9947 from MOODLE_17_STABLE 2007-05-28 18:50:58 +00:00
mark-nielsen b42cae480f Fixed MDL-9923, modified form to accept URLs
Media file was busted for framesets, fixed now
2007-05-28 18:48:52 +00:00
jamiesensei 58c70cace9 MDL-9745 "Checkboxes badly lined up in forms lib, e.g. "students may review" settings on quiz settings screen." Reverted previous fix for similar problem MDL-7779 as the fix for MDL-7779 causes worse problem MDL-9745 with form elements in groups. 2007-05-28 12:19:48 +00:00
jamiesensei aa38cccbdf MDL-9734 fix for clean_param PARAM_LOCALURL bug 2007-05-27 11:20:24 +00:00
moodler c417f26c85 Automatic installer.php lang files by installer_builder (20070527) 2007-05-27 04:36:10 +00:00
moodler f676fab333 Automatic installer.php lang files by installer_builder (20070526) 2007-05-26 04:11:43 +00:00
moodler 286914ebf9 Fix for footers on MDL-9826 2007-05-25 21:03:20 +00:00
moodler 8a12b18716 Automatic installer.php lang files by installer_builder (20070525) 2007-05-25 04:36:16 +00:00
sam_marshall 6ffa6bf848 MDL-9920 Allowed xmldb to create 32-bit serial fields if specified, in postgres 2007-05-24 15:18:26 +00:00
sam_marshall 36be12128c MDL-9932 Fixed calendar restore of events on same day with same description (but different names) 2007-05-24 12:09:43 +00:00
mark-nielsen 16ba21692e Fixed MDL-9619
Fixed MDL-9366
Fixed MDL-9757
Converted tabs to spaces
Cleaned up white space
2007-05-23 17:34:03 +00:00
nfreear a335226982 Follow up fix for bug MDL-9890 - replacing nicolasconnault's fixes that I overwrote - sorry! 2007-05-23 14:43:00 +00:00
thepurpleblob eb813e917e Added some set_time_limit()s to import in case of slow servers timing out. 2007-05-23 14:06:04 +00:00
nfreear 7c527b3b9d Big fix for MDL-9890 "Help should be well-formed, XHTML Strict and semantic". Merged from head. 2007-05-23 13:36:29 +00:00
thepurpleblob f9d81b4e36 Progress with making the code a bit more resilient.
Added XML tidy up if tidy extension is available.
2007-05-23 12:49:36 +00:00
nfreear 6f7cb89d17 Big fix for MDL-9890 "Help should be well-formed, XHTML Strict and semantic". Merged from head. 2007-05-23 12:08:19 +00:00
tjhunt 19ac11bd63 XHTML strict. Fix entity. 2007-05-23 10:52:00 +00:00
tjhunt be61c13c00 MDL-9914 - Can't download mark details from the quiz overview report 2007-05-23 10:21:02 +00:00
tjhunt 5f7519cd0f MDL-9881 - Attempting to delete large number of questions fails due to long URL 2007-05-22 14:03:36 +00:00
tjhunt 46b515a48c When using DEBUG_DEVELOPER, make error(...) output a stack trace. 2007-05-22 13:25:06 +00:00
tjhunt 6f304b3251 Switch a form from post to get, since that is more appropriate. 2007-05-22 13:24:47 +00:00
nfreear 3aa003edc4 Follow up for MDL-9753, accepts HTML for $text param (THEME->larrow, rarrow don't work in stock IE6). Merged 2007-05-22 09:02:39 +00:00
moodler 59cbc3ac9d Automatic installer.php lang files by installer_builder (20070522) 2007-05-22 05:25:23 +00:00
gbateson b72135d360 use PARAM_ALPHANUM on "section" parameter so that "section=all" is allowed 2007-05-22 04:27:55 +00:00
pichetp 844aed0573 adding or deleting more than 1 dataitems in one step in datasetitems_form.php 2007-05-22 02:29:33 +00:00
skodak e882741ec2 MDL-9861 Password expiration value is calculated wrong when ldap_expirationtime2unix() returns 0 - patch by Iñaki Arenaza 2007-05-21 20:07:25 +00:00
skodak 8dd34ce9bc MDL-9860 Incorrect check for password expiration at login - patch by Iñaki Arenaza 2007-05-21 19:58:50 +00:00
moodler a6989f9cbd Fix for manual unread/read marking MDL-9859 2007-05-21 14:41:21 +00:00
moodler dda9800184 Fix typo: MDL-9875 2007-05-21 13:32:39 +00:00
thepurpleblob d03d9d7a5a Turns out that the question text is not a required field.
Also fixed warning in essay questions.
2007-05-21 13:09:47 +00:00
moodler fb3557d4d9 Committed Iñaki's patch for 1.8 from MDL-7233 unchanged. Thanks! 2007-05-21 05:25:04 +00:00
moodler f895a66e50 Automatic installer.php lang files by installer_builder (20070521) 2007-05-21 04:53:33 +00:00
pichetp ff04b09e91 correcting display of datasetitems_form for multiple answers 2007-05-20 12:45:11 +00:00
moodler d10e19dca1 Automatic installer.php lang files by installer_builder (20070519) 2007-05-19 04:46:18 +00:00
pichetp 3449775fb9 correcting datasets to $datasets line 248 2007-05-18 12:53:43 +00:00
jmg324 3ba9c859b6 MDL-9802 added my:manageblocks capability so admins can define whether users can add/remove blocks from myMoodle page 2007-05-18 12:47:19 +00:00
skodak 54617ab56b MDL-984adding forgottent rs_close() - thanks Eloy! 2007-05-18 09:50:58 +00:00
skodak 77b81a215d MDL-9842 Groups from groupings not moved to "Not in a grouping" 2007-05-18 09:16:45 +00:00
thepurpleblob 722c4a9109 Check the files exist, and display ticks if they do, crosses if not. 2007-05-17 17:42:35 +00:00
martinlanghoff c54f92b59c get_my_courses() if the parameters passed are identical to the defaults... MDL-7416
We are using the defaults then ;-)

Credits for spotting it go to Yu!
Blames for the thinko to MartinL
2007-05-16 23:07:10 +00:00
skodak 4b4a3f4d40 MDL-9392 resource_popup: not working 2007-05-16 21:26:16 +00:00
skodak ddb5da6113 MDL-9618 Form remove option logic is incorrect - patch by Mark Nielsen 2007-05-16 20:31:20 +00:00
skodak 6e04be55d7 MDL-9761 Student's Gradebook view doesn't follow defaults establ;ished by the Instructor; patch by Jason Skinner 2007-05-16 20:24:04 +00:00
skodak 09048346de MDL-9418 use proper addslashes before each insert 2007-05-16 20:07:15 +00:00
skodak 9b7b42cc07 MDL-9825, MDL-9798, MDL-9799 - new workaround for the object trouble in IE caused by UFO; reverting previous patches 2007-05-16 18:14:45 +00:00
moodler 4cfaa3c85e Added navmenu icons as per MDL-9826
They can be disabled with $THEME->navmenuiconshide = true; in the theme
2007-05-16 08:01:11 +00:00
pichetp e722d7ab26 modifiyng save question so that $SESSION is not used MDL-8565 merged from HEAD 2007-05-16 02:33:11 +00:00
skodak ad2c6a55d1 MDL-9824 do not use sesskey check when user already logged out in logout.php 2007-05-15 21:11:57 +00:00
skodak bf92014116 MDL-9380 Adding a Resource of Type directory leads to SQL errors, patch by Andrew Schmadeke 2007-05-15 20:55:21 +00:00
skodak 7bda2db46d MDL-9799 can not use forms due to object bug in IE :-( 2007-05-15 20:21:04 +00:00
skodak 1422989b6a MDL-9730 resource name is now used in accessibility pdf link instead of summary hat may not be always present 2007-05-15 19:55:07 +00:00
skodak 27cde347a0 MDL-9823 Disclaimer HRef is repeated twice in the Link - Policy.php for some urls 2007-05-15 19:42:00 +00:00
skodak 321097aa82 MDL-9780 Groups 181 cleanup - part 3 2007-05-15 18:29:10 +00:00
skodak 190437b919 MDL-9780 Groups 181 cleanup - part 2 2007-05-15 18:26:48 +00:00
skodak 7ce2b7d43e MDL-9780 Groups 181 cleanup - part 1 2007-05-15 18:23:35 +00:00
skodak 52abd5d7c4 MDL-9821 incorrect permission to modify templates for non-editing teacher in db module 2007-05-15 16:57:08 +00:00
exe-cutor 0d3703f0e8 Fixed two errors that prevented the shibboleth settings from being saved unless
a file for the data modification api was given
2007-05-15 08:48:12 +00:00
skodak 439aad511a MDL-9798 fallback to html mimetype when missing index.php, index.html 2007-05-15 08:39:00 +00:00
skodak 62d35d727c MDL-9798 workaround for handling of object tag in buggy IE 2007-05-15 08:31:45 +00:00
moodler 7ce5c00bf1 Added some brackets that were missing 2007-05-15 07:48:34 +00:00
moodler 850ca88325 Automatic installer.php lang files by installer_builder (20070515) 2007-05-15 04:56:24 +00:00
pichetp dd9312b2c7 merging small modifications from head mostly for calculated questions 2007-05-15 02:57:05 +00:00
pichetp 2dfa65ae3e merging calculated question importing from last head modifications 2007-05-15 01:01:07 +00:00
pichetp 339bb9b746 merging from head so that calculated questions can be imported and other improvments 2007-05-15 00:53:21 +00:00
pichetp 63336df702 adding calculated question import and export functions for xml formats merged from head 2007-05-15 00:34:41 +00:00
stronk7 f7d5bed2d2 Add support for more tabs in module pages. Point 1. MDL-9736 2007-05-14 16:55:04 +00:00
moodler f073013d11 Automatic installer.php lang files by installer_builder (20070512) 2007-05-12 05:51:44 +00:00
nfreear d376f25fd2 Sorry, reverting my last commit which duplicated functions link_arrow_left, etc. (bug MDL-9753). 2007-05-11 13:54:28 +00:00
nfreear 8aa656699c Follow-up fix bug MDL-9753, "THEME->larrow, rarrow don't work in stock IE6". (Thought I committed this, what's going on?!) 2007-05-11 11:41:38 +00:00
nfreear da6677db3e Fixes bug MDL-9753, "THEME->larrow, rarrow don't work in stock IE6". Merged from HEAD. 2007-05-11 11:35:14 +00:00
nfreear 1e53ed8af3 Fixes bug MDL-9753, "THEME->larrow, rarrow don't work in stock IE6". Merged. 2007-05-11 11:29:45 +00:00
moodler 2b241253e4 Automatic installer.php lang files by installer_builder (20070511) 2007-05-11 06:40:04 +00:00
gbateson 8e4b3a8cd8 when inserting 'Give Up' button, if site encoding is not iso-8859-1, then set page encoding to get_string('thischarset') 2007-05-11 05:18:23 +00:00
skodak f8895a0de5 MDL-9642 auth/CAS: Dependence on external PEAR DB 2007-05-10 12:28:50 +00:00
andreabix 5aeb342d09 footer overlapping link fix 2007-05-10 09:49:49 +00:00
andreabix 3a13ab606b Strict compliance 2007-05-10 09:44:15 +00:00
skodak b68ae6fca7 MDL-9764 Require_course_login() should check cm visibility in frontpage course too 2007-05-10 08:55:10 +00:00
poltawski d09a98edf8 MDL-9649 'keep searching' in bulk messaging broken 2007-05-09 10:02:07 +00:00
Martin Langhoff 48cc1a0e6a cvsimport fixups - remove obsolete files 2007-05-09 22:01:21 +12:00
Martin Langhoff d27de862a6 cvsimport fixups - add missing files 2007-05-09 22:00:29 +12:00
sam_marshall 0b9a7f7bc6 MDL-9741: Fixed broken link on editor help page 2007-05-08 14:58:05 +00:00
thepurpleblob ebd87f75a9 MDL-9700:
Added more comprehensive checks for missing fields not exported in
previous versions.
More could be done, but this covers the basics and works for 1.6 (and
probably 1.5) exports.
2007-05-08 14:22:12 +00:00
thepurpleblob 2966e43548 Adding a couple of error messages for XML import 2007-05-08 14:14:26 +00:00
poltawski 9c85777a62 MDL-9726 - fixed phpdoc comment from MartinD's commit 2007-05-07 08:28:43 +00:00
toyomoyo a7e4899de4 fix for MDL-9727, capability typo 2007-05-07 04:59:01 +00:00
toyomoyo c9dc3ac1a5 fix for MDL-9656, blocks parents can be system context 2007-05-07 03:23:37 +00:00
moodler 6f45d0516c A little flag added to avoid checking enrolment plugins for each has_capability on other people MDL-9726 2007-05-07 03:06:30 +00:00
gbateson fc711515be modified "hpNewFunction" to allow Rottmeier quizze (Find-It, Dropdown) s to run on Safari (Mac) 2007-05-07 02:47:56 +00:00
mattc-catalyst 37c2fe3e1a MDL-9617: Fixed bug in previous commits.
- warnings being displayed in developer mode.
- caused by patch from patch series not being applied.
2007-05-06 23:41:37 +00:00
poltawski 0bf78b45f3 MDL-8917 - slasharguments description was slightly incorrect 2007-05-06 10:26:42 +00:00
poltawski 53f2fb98ac MDL-8436 Fixed typo 2007-05-06 09:55:49 +00:00
poltawski df9134b4e0 MDL-8971 - fixed typo 2007-05-06 09:43:32 +00:00
martinlanghoff df01c2f983 get_my_courses() - ensure we have groupmode, groupmodeforce in $d_fields - calendar/lib.php counts on it 2007-05-06 05:37:21 +00:00
martinlanghoff f08efe8517 get_my_courses() callers update - check of the $fields param - pass null instead
The default way to call get_my_courses() is now to pass null in the $fields
param to get the (cached copy) of the useful fields. Cuts down enormously
on DB traffic, memory footprint, and session size.
2007-05-06 05:32:03 +00:00
martinlanghoff dcf93f8107 get_my_courses() - added optimisation for guest login
- was causing very slow page generation
2007-05-06 05:28:22 +00:00
martinlanghoff b5f523ab6e get_my_courses() - tighten default fields - faster, risky
This makes get_my_courses() faster/lighter in 2 ways

 - We fetch a ton less data from the DB
 - We store a tone less data in the Session

In a test environment, with a student enrolled in  3 _empty_ courses
(just created, empty modinfo, etc), this shaves 50% off the session
size on-disk.

The problem is callers that may be expecting a given field to appear by
default. Next step: walk all callers...
2007-05-06 05:27:27 +00:00
martinlanghoff a728edc61f get_my_courses() - skip checks if we know the user has moodle/site:doanything and we are observing $doanything 2007-05-06 05:27:05 +00:00
martinlanghoff 309bb4021d get_my_courses(): tighten cache scheme - part 2
the tighter cache was fragile as we always edit $field
2007-05-06 05:25:57 +00:00
martinlanghoff f98c2af902 get_my_courses(): tighten cache scheme
This tightens the rather lax caching mechanism that
cached regardless of parameters.

Thanks to Matt Clarkson for the heads-up...
2007-05-06 05:21:52 +00:00
moodler ea5aabd1da Automatic installer.php lang files by installer_builder (20070506) 2007-05-06 04:59:29 +00:00
martinlanghoff de0489fd9f calendar: fixed group event display when only one course being viewed
Author: Matt Clarkson <mattc@catalyst.net.nz>
2007-05-06 04:38:06 +00:00
martinlanghoff 9caa000b8b calendar: bug fixed to previous commit (MDL-7416 MDL-9617)
Author: Matt Clarkson <mattc@catalyst.net.nz>
2007-05-06 04:37:24 +00:00
martinlanghoff 1a4a3b3380 calendar: performance optimisations + behaviour fix (MDL-7416 MDL-9617)
With 2500 courses the calendar was causing around 15000 queries at login and 5000 on the home page.

- Replaced queries inside loops with single unlooped queries.
- Fixed calendar so that course events will show when the users role is assigned at a category level.
- Moved calendar_session_vars() function call out of calendar/lib.php (including a lib should not have side effects)

Author: Matt Clarkson - with some conflict resolution from MartinL
2007-05-06 04:26:35 +00:00
poltawski 56fc04e3af Fixed MDL-9639 and syntax errror 2007-05-05 15:14:57 +00:00
thepurpleblob 5ceb953522 Fixing hard coded string 2007-05-04 14:30:44 +00:00
thepurpleblob eedcf27a55 Fixing hard coded string. 2007-05-04 14:05:25 +00:00
tjhunt fc56e73e49 Matching qestion type was failing to correctly determine wheterh the student had changed their answer - further improvements. 2007-05-04 10:03:56 +00:00
toyomoyo 7a543c5cfb fix for MDL-9617, calendar performance issues 2007-05-04 05:24:55 +00:00
gbateson 3cb6bd2c35 remove duplicate id attribute from body tag; microincrement version to 2007020202 (release 2.3.2) 2007-05-04 02:50:18 +00:00
gbateson 66eefc5b26 set default body font-size to "small" 2007-05-03 01:00:09 +00:00
gbateson 616f3a0584 add HP 6.2 templates; add compatability with Safari (Mac browser); microincrement version to 2007020201 (release 2.3.1) 2007-05-03 00:04:06 +00:00
tjhunt df3311ee1e Revert tiny bit that got committed to the stable branch alongside the fix to MDL-9565. 2007-05-02 19:34:57 +00:00
moodler 7d4ed65730 Automatic installer.php lang files by installer_builder (20070501) 2007-05-02 17:29:30 +12:00
andreabix 09eb1ec39c Fixed Task MDL-9611 2007-05-02 17:29:30 +12:00
donal72 d11ec62bd3 MDL-8973 : Undo API change in previous commit 2007-05-02 17:29:30 +12:00
toyomoyo 3ac3641547 Matthew's fix for MDL-9613 2007-05-02 17:29:30 +12:00
Martin Langhoff 0b1d21c0c3 Manual fixup - cvsps has dropped the CAS library 2007-04-30 10:47:39 +12:00
donal72 597cd7728e MDL-8973 : Update to the require_logout function to ensure that the user's auth plugin is the first (& only) one to have its prelogout_hook invoked. 2007-04-29 15:09:45 +00:00
donal72 791fbc5687 MDL-9288 - use addslashes to avoid injection attacks on data imported vi mnet 2007-04-29 13:59:01 +00:00
skodak ea714cfdbd MDL-8813 Cas auth for 1.8x - credit goes to Jérôme Gutierrez; TODO: redirection after failed login 2007-04-29 13:57:46 +00:00
donal72 4e0d03df62 Bugfix: The $this->response['faultCode'] was returning the 1th element of the $this->response string (because a non-empty string == 1). 2007-04-29 13:54:56 +00:00
donal72 6172153106 Prevent notices on user creation 2007-04-29 13:50:10 +00:00
skodak be1aef7fc4 MDL-9217 rearanged groups installation and upgrade - roles require groups 2007-04-29 11:36:46 +00:00
moodler 45541efc8e Automatic installer.php lang files by installer_builder (20070429) 2007-04-29 04:35:47 +00:00
moodler 26f421782d Automatic installer.php lang files by installer_builder (20070428) 2007-04-28 04:27:59 +00:00
tjhunt e7bbf42c5a MDL-9608 - Work around Firefox putting the user's password in the quiz password field. 2007-04-27 08:32:44 +00:00
moodler 122722c7aa Fix to prevent MDL-9606 happening if people delete courses before upgrade in the same session 2007-04-27 06:28:35 +00:00
pichetp e27f1fc122 MDL-9657 cleaning abstractype code merging from head 2007-04-26 23:37:38 +00:00
pichetp 4ca7cf3473 MDL-9496 Adding multianswer to calculated and MDL-9657 cleaning abstractype code merging
from head
2007-04-26 23:35:41 +00:00
pichetp b961b2249f MDL-9496 Adding multianswer to calculated and merging from head 2007-04-26 23:33:42 +00:00
mjollnir_ 1bb8b3818f MDL-9585 - mod/data: moved functions and classes out of preset.php into lib.php 2007-04-26 21:38:28 +00:00
moodler 146bc3bcf1 Fix for MDL-9594 (and removed some extra spaces) 2007-04-26 14:53:22 +00:00
moodler d74e64100c MOre XHTML strict for course category page MDL-9589 2007-04-26 08:48:07 +00:00
tjhunt c2baadf060 MDL-9565 - Fix error in previous commit. 2007-04-25 17:59:22 +00:00
thepurpleblob f9b27a7f86 :MDL-9577
Added 'correctanswer' field for true/false. Somebody changed this at some point
in the underlying questiontype class.
2007-04-25 09:39:37 +00:00
tjhunt d42dbcc1e7 Fix comedy require_once. Merged from MOODLE_16_STABLE. 2007-04-24 21:16:06 +00:00
skodak 7cc37fafdc MDL-9485 resource summary now optional again 2007-04-24 21:09:29 +00:00
skodak f98049b035 MDL-9568 Choice does not count correct 2007-04-24 20:08:16 +00:00
tjhunt 443768b8aa MDL-9565 - Question preview links don't work in developer debug mode, and not XHTML strict. Merged from OU Moodle. 2007-04-24 16:59:23 +00:00
skodak 9cb2c25061 MDL-9561 Langimport does not ignore langlist when langcache used
MDL-9563 Improve refreshing of langcache, detect permission problems
part 2
2007-04-24 16:29:34 +00:00
skodak 1a5e5787aa MDL-9561 Langimport does not ignore langlist when langcache used
MDL-9563 Improve refreshing of langcache, detect permission problems
2007-04-24 16:08:09 +00:00
skodak e1397186a9 MDL-9560 $CFG->langlist should accept both short (en) and long (en_utf8) names 2007-04-24 14:57:17 +00:00
nfreear 326129c87f Fixes bug MDL-9520, "groups_groupids_to_groups should return groups indexed by group ID" 2007-04-24 14:23:55 +00:00
skodak 0a45ab2fb2 MDL-9559 setup_lang_from_browser should respect $CFG->langlist 2007-04-24 14:21:48 +00:00
sam_marshall c5e4aebf29 MDL-9556: HTML editor shortcut button should only appear when JS enabled 2007-04-24 11:49:50 +00:00
tjhunt b74504fff3 MDL-9389 - True / False penalty factor field redundant 2007-04-23 16:23:04 +00:00
tjhunt 1e825b9dc1 MDL-9524 - Formslib gets confused if a required field is frozen. 2007-04-23 16:18:08 +00:00
tjhunt 7211a3733a MDL-9447 - Default grade field is redundant in embeded answer (Cloze) question 2007-04-23 13:55:00 +00:00
nicolasconnault cb7c915b10 MDL-9457 Missed a few files 2007-04-23 04:13:01 +00:00
toyomoyo e9b9c28e44 fix for MDL-7544, hidden users show up on participants block 2007-04-23 03:05:04 +00:00
stronk7 d09757da3f Now resource/view.php?r=XXX links are recoded properly in backup/restore. MDL-9450 2007-04-22 22:05:19 +00:00
skodak 67ca52345c MDL-9491 fixed problem with broken change/reset password in db auth when using internal passwords; backported from HEAD 2007-04-22 21:42:57 +00:00
stronk7 3e7759c3b6 Add one missing return causing db(internal) pass change not to work.
Partially, MDL-9491
2007-04-22 14:18:40 +00:00
skodak 43c99d82f1 MDL-9233 denied and allowed email address domains are not matched correctly; merged from HEAD 2007-04-21 20:10:40 +00:00
skodak f18e948bda MDL-9483 Problem with question restore relinking when quiz not selected; merged from MOODLE_17_STABLE 2007-04-21 12:40:35 +00:00
skodak e3eff7bf1c (MDL-9470) Survey submission JS broken 2007-04-20 17:51:30 +00:00
skodak e98649d7f1 MDL-9467 workaround for broken langcache problems when editting user profile 2007-04-20 14:42:15 +00:00
nicolasconnault c30e73badc Fixed many XHTML errors 2007-04-20 07:49:39 +00:00
tjhunt 181190d81b MDL-9432 - Forgot to return success/failure in two places. 2007-04-19 17:37:25 +00:00
tjhunt 8f290d7868 Fix error message to say the right thing. 2007-04-19 17:16:35 +00:00
ikawhero c9bbb97a8d Fixed typo.
Made constructor variables optional to reflect parent class
2007-04-19 07:39:51 +00:00
tjhunt 0bb51a9c00 MDL-9432 - When restoring questions, links are not recoded. Merged from OU moodle. 2007-04-18 15:57:12 +00:00
donal72 0145441c4d MDL-9420 - SSO fails over https 2007-04-18 07:12:32 +00:00
toyomoyo 3cd4774c59 fix for MDL-9398, users need site:config to add new categories 2007-04-18 04:51:59 +00:00
cataluke 7badfb42c7 admin/uploaduser.php: Fixed not enrolling user into course if user already exists
Author: Patrick Li <patrick@catalyst.net.nz>
Committer: Luke Hudson <luke@catalyst.net.nz>
2007-04-18 02:43:33 +00:00
cataluke 2ba01076aa MDL-8569 - mod/data sorting by numerical field now works with PostgreSQL
Author: Luke Hudson <luke@catalyst.net.nz>
2007-04-18 02:31:34 +00:00
ikawhero 13e0414d47 Fix for MDL-9415
New method is_empty() added.
2007-04-18 02:08:50 +00:00
skodak 72a5176d95 MDL-9409 User confirmation by admin doesn't support new auth->confirm_user function 2007-04-17 21:27:32 +00:00
skodak fb68fa74e3 MDL-9416 Double quotes and tags in helpable item breaks XHTML strict 2007-04-17 20:40:03 +00:00
moodler d696377711 Removed unnecessary requires as part of MDL-9402 2007-04-17 09:25:51 +00:00
moodler 0adcc16ccf Fix for problem caused when I removed some requires from the course formats
recently thinking they were not needed, doh.   MDL-9402
2007-04-17 09:24:26 +00:00
skodak 945bd325c4 MDL-9387 Message "Adding discussions to this forum requires group membership" if not logged 2007-04-17 08:35:40 +00:00
cataluke de06df20a4 MDL-7856 - make database search case-insensitive for PostgreSQL too.
Author: Andrew Walbran <andrew.walbran@catalyst.net.nz>
Committer: Luke Hudson <luke@catalyst.net.nz>
2007-04-17 05:49:21 +00:00
martinlanghoff f35c9f6f19 (iCalendar export) calendar: Removing filter controls from export page, as no purpose and buggy
Author: Andrew Walbran <andrew.walbran@catalyst.net.nz>
2007-04-17 03:04:20 +00:00
skodak f15eba9879 MDL-4421 unwanted space in formatted time 2007-04-16 18:50:17 +00:00
skodak ef7c98d04e MDL-6236 user editing - Default language not used instead of nonexisting one in user lang field - first lang chosen instead 2007-04-16 18:29:08 +00:00
stronk7 f68ff717aa Fixed quesry to work agains Oracle. Repeated fields + limit
are incompatible (and not needed) for Oracle. MDL-9321

Merged from MOODLE_17_STABLE
2007-04-16 14:43:37 +00:00
moodler 356e897da9 Small tweak to use format_text by default because it does some nice things like highlight URLs 2007-04-16 06:21:23 +00:00
moodler 1729e73566 Automatic installer.php lang files by installer_builder (20070416) 2007-04-16 04:27:44 +00:00
ikawhero a352220a48 Display custom profile fields in profile page - see MDL-9285
Menu type stores value rather than index - see comments on MDL-9285
General tidy up and renaming of functions in field class.
2007-04-16 02:45:50 +00:00
martinlanghoff 5ad59d2b07 moodle_request_shutdown(): silence errors when apache_child_terminate() is disallowed - (MDL-9350) 2007-04-16 00:24:42 +00:00
skodak fb733f80e3 MDL-8839 fixed markdown cleaning before editting of existing untrusted text 2007-04-15 21:53:32 +00:00
skodak c6d8a02649 fixed warning 2007-04-15 21:08:08 +00:00
skodak 28701c2fef MDL-9266 Frontpage teachers cannot ad "site" events to calendar 2007-04-15 21:06:42 +00:00
skodak 0038bff79e MDL-9225 short php tag 2007-04-15 17:22:45 +00:00
skodak 78a40f0c7f MDL-9226 missing closing label tag - patch by Mark Scherfling 2007-04-15 17:18:50 +00:00
skodak 650d657bb0 MDL-9300 The aspell spell-checker does not work in 1.8 2007-04-15 17:03:11 +00:00
skodak 396d2eefe7 MDL-9311 participants - duplicate "&perpage="; yet another forgotten debug code 2007-04-15 16:10:34 +00:00
skodak 8c961e6c84 MDL-9311 participants - duplicate "&perpage=" 2007-04-15 16:08:43 +00:00
skodak c9f6285685 MDL-9315 fixed incorrect use of localtion (should be city) in user profile 2007-04-15 15:49:15 +00:00
skodak dbf8cae35e MDL-9343 Course event filter icon incorrect 2007-04-15 15:20:32 +00:00
skodak fc9d151810 MDL-9363 update memory limit checks and docs - grrr, removed debug code; backported from HEAD 2007-04-15 14:45:22 +00:00
skodak ceb6ed3ab2 MDL-9363 update memory limit checks and docs 2007-04-15 14:25:10 +00:00
skodak d5a23c5f04 MDL-9362 unattended upgrade fixed 2007-04-15 12:49:55 +00:00
stronk7 1027fcce3b Fixing typo causing purge of accelerator cache not working. MDL-9349 2007-04-15 11:10:42 +00:00
moodler e48c333640 Added some consistency to the handling of "latest news" MDL-9308 2007-04-15 07:24:36 +00:00
tjhunt 346a83d25f Work round PHP4 being a stinking pile of crap. 2007-04-13 10:03:15 +00:00
tjhunt e904a8315b Reveted Nick's alleged typo fix. Thank you very much for trying to fix my code, but your change is definitely wrong. get_context_instance needs to be passed a coursemoduleid, not a coursemodule object. Why did you think there was a typo? And neither of us had noticed that I had left some debug code in. Removing that. 2007-04-13 08:12:19 +00:00
nicolasconnault a0eb0c7b14 MDL-9322 Fixed all non-compliant XHTML in mnet files (plus logs and enrol) 2007-04-13 06:33:00 +00:00
toyomoyo b43c3213ab some more MDL-9273 related fixes 2007-04-13 05:39:12 +00:00
martinlanghoff 8632e95b13 Bug fix: 'off by one'month bug in mupltiple locations.
When the system/user time zone was set to GMT-13 months would lag behind by
one month.


Author: Matt Clarkson <mattc@catalyst.net.nz>
2007-04-13 05:05:56 +00:00
nicolasconnault 20414f20ff Replaced all instances of old if(): else: endif; syntax with proper braces 2007-04-13 03:46:49 +00:00
nicolasconnault 65c78f2904 MDL-9220 Only fixed 1.8, since 1.7 doesn't seem affected. 2007-04-13 02:41:43 +00:00
nicolasconnault fdaeef002a MDL-9273 Applied suggested fix 2007-04-13 01:59:24 +00:00
nicolasconnault 3cba887fca Fixed a typo introduced by Tim Hunt in revision 1.85.2.11. No hard feelings :-) 2007-04-13 01:24:31 +00:00
tjhunt 0ece80c088 MDL-9325 - mod/quiz:ignoretimelimits does not work. This is a really horrific short-term fix to a problem not of my making. 2007-04-12 22:16:20 +00:00
stronk7 e3494d2af5 mnethosturl was never being restored. Detected while checking MDL-9309 2007-04-12 22:16:10 +00:00
skodak 5aeaecaa1e MDL-9324 group assignment does not work in uploaduser script 2007-04-12 21:29:38 +00:00
tjhunt 379447d88f MDL-5799 - quiz previews were sometimes showing up in the quiz overview report. Merged from MOODLE_18_STABLE. 2007-04-12 20:11:32 +00:00
stronk7 54b6d16e8c Fixing typo causing some (a few) sites to break on upgrade. Credit
goes to Rafa Gutierrez. MDL-9316

Merged from MOODLE_17_STABLE
2007-04-12 15:33:10 +00:00
jamiesensei bfeb2678df making notifytiny style a little bigger 2007-04-12 15:08:15 +00:00
csantossaenz 4c5b0669a0 Fixed problem for the Moodle 1.7 scorm packages which didn't show the structure when you updated your version to 1.8. Now is possible to access to that structure and to each sco as well. 2007-04-12 09:27:22 +00:00
csantossaenz 312191a8e9 Fixed problem with scorm_get_sco to connect with the API when there is no data in the scorm_scoes_data table. 2007-04-12 09:22:20 +00:00
nicolasconnault ade44744d7 Added a few more comments 2007-04-12 05:56:30 +00:00
nicolasconnault 7ae190c397 Typo, sorry 2007-04-12 05:00:25 +00:00
nicolasconnault b9a7a37ec0 Converted all function comments to PHPdoc style, and added stub phpdocs for functions without comments. 2007-04-12 04:21:41 +00:00
nicolasconnault f52c8e3912 MDL-9223 Fixed a coding error: $group->id changed to $discussion->groupid 2007-04-12 02:22:31 +00:00
toyomoyo ef52b6a434 MDL-9291, temporarily disabling blog this link 2007-04-12 02:16:00 +00:00
martinlanghoff 34177c462c Fixed 'off by one' month bug in month select boxes generated by
print_date_selector when users time zone set to GMT-13.


Author: Matt Clarkson <mattc@catalyst.net.nz>
Committer: Matt <mattc@catalyst.net.nz>
2007-04-12 00:42:05 +00:00
mjollnir_ 77d5965638 merged: fixing warnings in stats lib - rather than doing an include_once and noticing for every missing mod, check the file exists first from MOODLE_16_STABLE, and fixed up some weirdness in the reports 2007-04-11 23:59:11 +00:00
mjollnir_ 8a4f91b671 merged: fixing warnings in stats lib - rather than doing an include_once and noticing for every missing mod, check the file exists first from MOODLE_16_STABLE, and fixed up some weirdness in the reports 2007-04-11 23:53:14 +00:00
tjhunt b930d5a83b MDL-9082 - moodle/question:manage does not let you create questions. Also: * remove useless option from print_question_icon * use the right module context in question_list * a bit of XHTML strrrict in question_list 2007-04-11 22:56:50 +00:00
tjhunt 92b904642a MDL-9244 - If a question type provides both an old style editquestion.php and a new style moodle form, then use the moodle form. It was doing the opposite, which broke things for people who upgraded by untarring a new distribution over their old one. 2007-04-11 21:19:48 +00:00
tjhunt 724dbf2d0c MDL-9079 - Paging broken in quiz overview report. Merged from MOODLE_17_STABLE. 2007-04-11 20:38:08 +00:00
tjhunt 7ed1828798 MDL-9280 - JavaScript countdown timer did not work in 1.8 due to XHTML strict changes. Also, fixing a few more XHTML strrrrict things in attempt.php 2007-04-11 20:06:57 +00:00
tjhunt 12ff34e245 MDL-9303 - General Feedback not shown for essay questions on review screen. Merged from MOODLE_17_STABLE. 2007-04-11 19:04:59 +00:00
skodak a26c09be05 MDL-9297 - fixed broken mnet logout caused by my auth refactoring 2007-04-11 14:01:03 +00:00
skodak f2c2aeff2d MDL-9296 removing forgotten debug code in admin/mnet/trustedhosts.php 2007-04-11 13:21:09 +00:00
skodak 3f833b914c MDL-9286 Incorrect setting of defaults for rpc_negotiation_timeout 2007-04-11 13:00:10 +00:00
thepurpleblob 75b5701ae7 MDL-9123:
Added language string for error message
2007-04-11 12:16:06 +00:00
thepurpleblob 146b8728c7 MDL-9123:
No check was made of the validity of the category id read from the form.
So it could theoretically have been spoofed.
2007-04-11 10:57:21 +00:00
skodak f032cd818e MDL-9287 missing resultset check in mnet config_form() 2007-04-11 08:49:56 +00:00
skodak 9244a6be27 MDL-9286 Incorrect setting of defaults for rpc_negotiation_timeout 2007-04-11 08:45:22 +00:00
nicolasconnault 4d69204037 MDL-9241 Fixed a typo: used if($mimetype = 'application/x-pdf') instead of == 2007-04-11 06:14:35 +00:00
nicolasconnault 479206f6ff MDL-9213 Corrected $forum->format to $forum->type 2007-04-11 01:03:42 +00:00
donal72 d4c97b77a5 MNET: Uninitialised variable $timenow. Should be time()? 2007-04-10 22:20:07 +00:00
skodak 6b68f4e53b MDL-9075 utf-8 bom is now stripped from uploaded users cvs file 2007-04-10 15:30:51 +00:00
skodak 7ec5b06656 MDL-7888 rewritten email alerts to graders - "mod/assignment:grade" permission is now used instead of legacy teacher; it should also fix missing alerts when using separate groups 2007-04-10 14:49:36 +00:00
csantossaenz 445cebbdaa Removed some messages that were shown with unnecessary data 2007-04-10 14:21:29 +00:00
toyomoyo ac326d2f3b fix for MDL-9238, users assigned to a role at category-level don't view the courses of the subcategories 2007-04-10 08:56:59 +00:00
toyomoyo cf4a318f80 fix for MDL-9268 2007-04-10 04:21:48 +00:00
moodler d4c1b75664 Automatic installer.php lang files by installer_builder (20070410) 2007-04-10 03:34:39 +00:00
mjollnir_ 9076a56953 Merged from MOODLE_17_STABLE:
add support for https source for popups

previously fullscreen.php tried to load any javascript files that were
running in the popup's parent.
If the source of the script didn't start with "http:" it was assumed
that it must be a relative path. This caused problems when it tried to
make it into an absolute path.
Fixed Regex to include support for https
Credit: Peter Bulmer <peterb@catalyst.net.nz>
2007-04-09 20:39:41 +00:00
skodak 315184aeee MDL-9216 has capabilitiy does not respect doanything if admin userid specified and $USER is not admin 2007-04-09 11:10:26 +00:00
stronk7 d76f66dde9 Better approach. Use higher level MetaIndexes() and avoid some MySQL warnings. MDL-9256 2007-04-09 00:09:50 +00:00
stronk7 4f3f057884 Now MySQL looks for existing index names. MDL-9256 2007-04-08 22:56:23 +00:00
mark-nielsen c020af7119 Fix for MDL-9250 2007-04-08 20:55:23 +00:00
mark-nielsen 8a2366b231 Fix for MDL-8414 and some XHTML fixes 2007-04-08 20:47:23 +00:00
mark-nielsen 298f767799 Removing a "wtf" that someone else left in there 2007-04-07 19:21:31 +00:00
mudrd8mz c711a66af2 Fixes MDL-9248 and two other untracked bugs.
* MDL-9248 - lang.php now keeps &lt;, &gt;, &nbsp; and other HTML entities
* There was an XHTML compliance error with redundant </form></div> tags in non-editable mode
* There was an bug with ORPHANed strings in local language pack
2007-04-07 18:22:57 +00:00
stronk7 4abc65705c Now $CFG->apachemaxmem is respected.
Merged from MOODLE_17_STABLE
2007-04-07 16:07:32 +00:00
mudrd8mz 69a30a1c2f Fixed and error in rendering different background color of the row in non-editable environment. 2007-04-07 15:51:15 +00:00
skodak 0d4f86ce4b MDL-9239 New fromslib password element with reveal option 2007-04-06 14:15:16 +00:00
skodak da586c3430 MDL-9235 bad html produced when moving modules within a course; patch by Mark Scherfling 2007-04-06 08:21:14 +00:00
skodak 1c70d75ec0 MDL-9227 Inconsistent HTTPS for profile edit page; merged from MOODLE_17_STABLE 2007-04-06 07:50:10 +00:00
jamiesensei 326d894b83 see MDL-8886.
fixes bug that meant :

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

didn't work.
2007-04-06 06:09:12 +00:00
stronk7 f16220e6a9 Fixing authdb->close() in some places. Credir goes to Seiti. MDL-9212 2007-04-05 22:21:25 +00:00
tjhunt b60f49c799 MDL-9224 - Score sometimes relealed, even when the quiz settings say it should not be. Merged from OU Moodle. 2007-04-05 13:54:17 +00:00
nfreear 70c64c1a46 Fixes bug MDL-9221 "new group admin - can't view full group name". 2007-04-05 10:55:27 +00:00
nfreear 9b27aac9ba Fixes bug MDL-9221 "new group admin - can't view full group name". Merged. 2007-04-05 10:46:20 +00:00
nfreear 14bc58d411 Fixes bug MDL-9221 "new group admin - can't view full group name" 2007-04-05 10:39:13 +00:00
skodak 3ebaafd6e5 MDL-9219 Replace Inherit with Not set on role definition page 2007-04-05 09:16:34 +00:00
skodak 215692747d MDL-9218 Processing of role assignments produces PHP notices 2007-04-05 08:33:43 +00:00
toyomoyo d8feb56f5d fix for MDL-9186, capability fix for calendar 2007-04-05 07:57:48 +00:00
nicolasconnault f4d8da26f5 MDL-8537 Added $CFG as the object to check for enrol method when the course is being created. 2007-04-05 07:57:19 +00:00
toyomoyo 51c761454a fix for MDL-9165, admins should be able to see private blogs 2007-04-05 05:58:39 +00:00
nicolasconnault 3836cfd7e6 MDL-9198: Embedded PDF now works fine in FF 1.5, FF 2, IE5, IE6, IE7 and Opera, and degrades beautifully in non-supported browsers (or when plugin is missing). 2007-04-05 05:49:55 +00:00
martinlanghoff 89d6849793 lib/setup moodelib: Introducing moodle_request_shutdown()
Now Moodle will have a 'shutdown_function' function. Right now
registered (and useful) only when running under apache + mod_php.

This initial function checks whether memory usage in this process exceeded
10MiB or $CFG->apachemaxmem (int, in bytes). This is really useful to prevent
using more RAM than we have.
2007-04-05 05:00:39 +00:00
toyomoyo c4269c100d fix for MDL-9197, multilang filter is not applied to default role in course settings 2007-04-05 03:56:22 +00:00
moodler b2e3ce3b2b Automatic installer.php lang files by installer_builder (20070405) 2007-04-05 03:37:47 +00:00
nicolasconnault 9a14f39663 Finally fixed XHTML error on this page. 2007-04-05 03:36:08 +00:00
nicolasconnault b41ee5a874 MDL-9204 New submission wasn't given a timemodified upon creation. 2007-04-05 03:18:45 +00:00
nicolasconnault 79c8c1dba4 Fixed broken XHTML 2007-04-05 02:11:24 +00:00
nicolasconnault 6907f59129 MDL-9207 2007-04-05 01:53:28 +00:00
nicolasconnault 2413b939a7 MDL-9090 2007-04-05 01:43:42 +00:00
skodak e2dd0ea71e MDL-8802 fixed byteserving broken by adobe anti xss patch 2007-04-04 19:43:53 +00:00
tjhunt 8ef0022d29 MDL-9208 - Only hightlight the correct answer if that option is set. 2007-04-04 18:01:27 +00:00
tjhunt 8fe9be5d8c Bug 2951 - correct PARAM_ types for answers to multichoice and shortanswer questions. Merged from OU Moodle. 2007-04-04 16:51:05 +00:00
tjhunt 9f64c0e6b7 MDL-9183 - yet another invisiblefieldset causing layout problems. 2007-04-04 15:30:28 +00:00
jamiesensei 1859dfe70d fixes MDL-9195 mform->hardFreeze() doesn't remove id attribute of label for checkbox 2007-04-04 10:27:16 +00:00
skodak 78fdca9618 MDL-9191 fix for potential incorrect use of get_auth_plugin 2007-04-04 09:18:24 +00:00
moodler db9b5fc35c Increased online users allowed (50) and added some rounding for performance MDL-6553 2007-04-04 07:22:42 +00:00
nicolasconnault 62c50f8579 MDL-9124 Added a visual notification when group membership doesn't allow adding discussions. 2007-04-04 06:24:30 +00:00
nicolasconnault bb576411ca Added rows and cols to menu options textarea, fixing xhtml break. 2007-04-04 04:38:47 +00:00
nicolasconnault be5ceecd4d MDL-9144 2007-04-04 04:30:21 +00:00
nicolasconnault a7ad3d051a MDL-9135: 2007-04-04 04:21:31 +00:00
nicolasconnault b847c863d9 MDL-9136: Added a $selected attribute to the profile_field_menu object, which gets set during initialisation. 2007-04-04 04:08:54 +00:00
toyomoyo d857dbc1c3 fix for MDL-9185 2007-04-04 04:03:27 +00:00
moodler 0e62d79714 Automatic installer.php lang files by installer_builder (20070404) 2007-04-04 04:02:59 +00:00
nicolasconnault 86b331477a MDL-9138; Edited lib/xmlize.php to return false when the passed file doesn't return any entries (when it's not valid XML or is empty). Also made it much clearer that glossary/import requires an XML file, not just any old file. 2007-04-04 03:34:00 +00:00
nicolasconnault 1cad7ef6fe MDL-9192: 2007-04-04 02:39:26 +00:00
nicolasconnault f4493074ae MDL-9193 2007-04-04 02:21:47 +00:00
nicolasconnault a204aa1838 MDL-9145 Fixed 1) and 2) 2007-04-04 01:42:43 +00:00
stronk7 b3a55ad382 Show continue button after importing glossary. MDL-9071 2007-04-03 15:42:25 +00:00
skodak 74edbb3c5f MDL-9170 https redirect doesn't happen on login page - fixed problem when guest button disabled 2007-04-03 14:58:30 +00:00
nfreear 381070ab03 Fixes bug MDL-9175 "Groups simpletest, fatal errors", also DONOTCOMMIT. Merged. 2007-04-03 10:21:38 +00:00
nfreear a2e32e1603 Fixes bug MDL-9175 "Groups simpletest, fatal errors". 2007-04-03 10:15:23 +00:00
skodak 4d5dd30513 MDL-9190 Site policy xhtml compliance and other minor fixes 2007-04-03 09:50:39 +00:00
nicolasconnault 380a4235ff MDL-9147 2007-04-03 08:23:51 +00:00
nicolasconnault 0efd6699e2 MDL-9167 and MDL-9113 both solved 2007-04-03 06:38:40 +00:00
nicolasconnault e8a2e5e491 Removed experimental Preset class, only in HEAD now 2007-04-03 04:10:42 +00:00
nicolasconnault 89a4886523 MDL-8774 2007-04-03 03:30:36 +00:00
moodler 2f48f37d29 A bit more perfectionism about checkbox alignment MDL-9126 2007-04-03 02:20:18 +00:00
moodler 372bd6bd34 Fixing checkbox alignment in ie6 MDL-9126 2007-04-03 02:13:15 +00:00
moodler 28f2414b0d FIx for wierd alignment on IE6 MDL-9126 2007-04-03 01:59:32 +00:00
stronk7 9b3939b8f5 Fixed one wrong urlencoe after error. 2007-04-02 22:01:21 +00:00
stronk7 ecb80afb03 Disable the "save" button if the file isn't writable. 2007-04-02 21:50:03 +00:00
stronk7 f0a346c4ff Centering buttons in some actions... 2007-04-02 21:36:08 +00:00
skodak 823ea10f96 MDL-9180 Change password screen doesn't show the username like it should 2007-04-02 18:02:20 +00:00
skodak c57aac2fb1 MDL-9168 nested site policy when forcelogin enabled 2007-04-02 16:12:26 +00:00
tjhunt a57365af9c Make sure print_object output is always left-aligned. Also, make it look more like other debugging output. 2007-04-02 15:28:47 +00:00
tjhunt 8a5ebf7f29 Missing format_string. 2007-04-02 15:26:09 +00:00
skodak f1a1f86ede MDL-9174 do not use PARAM_URL for site policy - it is too restrictive 2007-04-02 15:12:22 +00:00
skodak 31c6df4382 fixed warning when upload fails 2007-04-02 14:53:13 +00:00
exe-cutor 69beb9a8af Fixed bug that showed username of Shib users in manual login form 2007-04-02 14:12:02 +00:00
skodak d66683e160 MDL-9170 https redirect doesn't happen on login page 2007-04-02 13:58:01 +00:00
skodak e4335c36db MDL-9172 "Turn editing off" button disappear from category page 2007-04-02 13:44:20 +00:00
skodak 66c8048d55 MDL-9169 Error in function call in ldap/enrol.php; typo found by Svante Agnestig 2007-04-02 13:15:36 +00:00
tjhunt db0f3b9159 MDL-9173 - Can't create match anything answer to numerical question type. Merged from OU Moodle. 2007-04-02 13:02:17 +00:00
skodak 4a4d9b02df MDL-9166 auth plugins can prevent showing of last logged in user 2007-04-02 09:24:40 +00:00
skodak 86d1a59ede MDL-9155 Error when creating an "image gallery" preset database when only some fields exist and do not remove existing data, comments and ratings when applying preset 2007-04-02 09:08:54 +00:00
exe-cutor 4dbb62e0c0 Corrected example script in README 2007-04-02 07:28:35 +00:00
moodler 05ffd0842e Bump post 1.8 2007-04-02 06:43:18 +00:00
toyomoyo 345b5ba60d fix for MDL-9160, get_my_courses caching issues 2007-04-02 03:50:55 +00:00
toyomoyo 9be1b6a45e admins should not have course:view capability 2007-04-02 02:36:27 +00:00
donal72 aecd299b7a MNET: Properly remove trailing slash from wwwroot: MDL-9157 2007-04-02 01:45:37 +00:00
moodler f02d236f78 Make coursemanager easier to set to nothing. MDL-9139 2007-04-01 15:58:13 +00:00
moodler 731fa029cd Centered the submit button when editing section summary 2007-04-01 15:16:09 +00:00
stronk7 cc1eb9113b Bump backup version 2007-04-01 10:32:25 +00:00
moodler e3a3eacf9e Moved the required fields message over to the right 2007-03-31 09:09:27 +00:00
moodler 15152a0a44 Fix for MDL-6458 2007-03-31 05:23:32 +00:00
moodler 0681430f0f Fixed up the block self-test 2007-03-30 18:00:47 +00:00
moodler e3db7108a8 Bumping to release 1.8! 2007-03-30 17:25:36 +00:00
moodler 2750460adc Fixed typo in capability! 2007-03-30 17:05:20 +00:00
moodler 23e1dc24f3 I've added some logic to applicable formats so that people don't see admin blocks in the list when they can't do anything with it. MDL-9119 2007-03-30 16:50:44 +00:00
stronk7 377da1a0e2 Adding a missing parameter to the "add new course" button. MDL-9129 2007-03-30 15:35:15 +00:00
moodler 8b33bf0124 Roles without moodle/course:view capability are now ignored in participant lists MDL-7943 MDL-8093 2007-03-30 15:10:37 +00:00
nfreear ce9d5ce529 Fixes bug MDL-8695 "Form 'required' icon is hidden", see commit 13 Jan. Merged from HEAD. 2007-03-30 10:54:08 +00:00
nfreear 9401569e39 Fixes bug MDL-8695 "Form 'required' icon is hidden", see commit 13 Jan (big woops, forgot to commit around 1/3). Merged from HEAD. 2007-03-30 10:45:32 +00:00
tjhunt 696b50fff2 Small code cleanup to fix an obscure warning. If you got an error in the middle of creating a quiz attempt, you could get an attempt with no states. Then that caused an error when the attempt was deleted. Merged from MOODLE_17_STABLE. 2007-03-30 10:17:20 +00:00
csantossaenz 85bf673124 Deleted code which had been previously added to skip some steps in the ADL Test suit to test some other steps. 2007-03-30 10:15:19 +00:00
tjhunt 3849917982 Fix notice. Merged from MOODLE_17_STABLE. 2007-03-30 09:34:11 +00:00
nicolasconnault ae4d27ee4e MDL-9115 Added new strings to lang/en_utf8/group.php (where in roles.php before!). Also cleaned up page a little more so the backend code is at the top, with the HTML output at the bottom. We may be able to use mform with this page eventually. AJAX would also help. 2007-03-30 08:29:30 +00:00
toyomoyo b70af87f04 fix for MDL-9021, missing add_to_log call 2007-03-30 07:59:32 +00:00
nicolasconnault ba9c840c99 MDL-9118: The group/edit page now fetches the groupingid for the selected group if it isn't already provided. Note that this will need changing when/if multiple grouping membership is implemented, since only the first grouping is returned at present. 2007-03-30 07:50:47 +00:00
stronk7 d90cb507f3 XHTML fix. Credit goes to Jeff Graham. MDL-9103 2007-03-30 07:44:29 +00:00
nicolasconnault 853bb906ba MDL-9114: Resolved the issue for the most part. However still a problem when jumping from a group with users to an empty group. If you do so too quickly, the empty group shows the members of the previously highlighted group. But there is no more accumulation of users from one group to the next. 2007-03-30 07:29:05 +00:00
toyomoyo 8f99b22439 fix for MDL-9097, xhtml fixes for glossary 2007-03-30 07:02:57 +00:00
nicolasconnault b608d7cad3 handled another potential xhtml error: empty select when no members in group. 2007-03-30 06:28:31 +00:00
nicolasconnault 60b6fc1004 MDL-9111: Changed to "Back to groups" 2007-03-30 06:13:30 +00:00
nicolasconnault 7dfca8bbb1 MDL-9112: Fixed htmleditor height. 2007-03-30 06:01:08 +00:00
nicolasconnault bf54a837aa MDL-7186: Removed offending angle brackets, 3 counts in 2 files. 2007-03-30 05:21:02 +00:00
nicolasconnault 8ed47badec 1. Converted grouping edit form to mform
2. Added 2 buttons to disable state when pseudogroup is selected
2007-03-30 05:13:19 +00:00
gbateson dab8b4662a fix the display of the special chars keypad (in JCloze and JQuiz) 2007-03-30 03:42:10 +00:00
moodler 6317557cfe Automatic installer.php lang files by installer_builder (20070330) 2007-03-30 03:39:01 +00:00
nicolasconnault ef5a26d701 1. Fixed xhtml errors
2. Added correct breadcrumb back to group/index page, preserving selections.
2007-03-30 03:13:47 +00:00
nicolasconnault 293d2ce08e 1. Added proper breadcrumb to group/edit|create page (preserves previous grouping/group selections)
2. Changed "Create Orphan group" to "Create orphan group"
3. Added help string for groupenrolmentkey
4. Edited moodle docs for groups edit page
2007-03-30 02:38:49 +00:00
toyomoyo 4cbacc2c88 chaing help file as helen suggested 2007-03-30 02:23:54 +00:00
danmarsden c7b1aaeed4 fix for MDL-9087 screwy page when user places table into online assignment. 2007-03-30 02:09:07 +00:00
stronk7 8a57655b50 Added one more style to center some tables in glossary. 2007-03-30 00:29:46 +00:00
stronk7 fa3ce02ba1 Fixing approval interface. Step4. MDL-8793 2007-03-30 00:24:54 +00:00
stronk7 344c50611d Fixing export interface. Step3. MDL-8793 2007-03-29 23:23:37 +00:00
tjhunt c9666935af MDL-9107 (regression from) MDL-8994 - adding random questions to a quiz was broken. 2007-03-29 23:11:47 +00:00
stronk7 7cf3b7fabd Fixing import interface. Step2. MDL-8793 2007-03-29 23:10:16 +00:00
tjhunt f81b4b1a1b MDL-9094 - Penalty factor is meaningless for Essay questions, so remove it from the editing form. Manual merge of the corresponding change from MOODLE_17_STABLE. 2007-03-29 23:00:44 +00:00
stronk7 79eebc83aa Moving options from 2nd tab to main area. Step1. MDL-8793 2007-03-29 22:16:42 +00:00
tjhunt 989f2ccd47 Putting back print_box in 1.8. I know, I cocked up and committed a print_box in 1.7 when I backported something. In 1.7, that function does not exist. Thanks to?Andrea Bicciolo for fixing it. But in 1.8, print_simple_box has been deprecated. 2007-03-29 22:09:35 +00:00
skodak daea824d68 MDL-4313 LDAP doesn't properly escape extra quotes in course details + minor role unassign change 2007-03-29 21:39:35 +00:00
skodak e21c0ffc23 MDL-3339 support md5 and sha1 in ldap when adding or changing passwords 2007-03-29 19:47:21 +00:00
skodak 41fd8ea177 MDL-8590 fixed magic quotes in config settings 2007-03-29 19:03:49 +00:00
andreabix e8a51e3f44 fixed "call to undefined function print_box()" 2007-03-29 18:53:04 +00:00
tjhunt fa62c456eb MDL-6269, MDL-8958, MDL-8990 - Major fix to do with each attempt builds on last:
It used not to work with random questions, and there were problems with the computation of the grade, and regrading. Fix thanks to Paulo Matos, who not only fixed the bug and tested it, but was also incredibly patient waiting for me to have time to commit the changes to CVS.

Merged from MOODLE_17_STABLE.
2007-03-29 16:35:55 +00:00
tjhunt cca01e1519 Add developer debugging to something that should not happen, and fix one instance of it. Backported from HEAD. 2007-03-29 16:06:13 +00:00
skodak 293d56acaa MDL-8590 fixed ldap creators, added new option to specify dn in member attribute 2007-03-29 15:51:16 +00:00
moodler b0bbcb5647 Fixed a typo (won't work in other languages) 2007-03-29 13:22:07 +00:00
csantossaenz d86dca38ec Spanish comment which was left has been translated to English. 2007-03-29 10:47:43 +00:00
skodak ac594757cb MDL-9099 LDAP auth does not allow dn in idnumber field (or other user attributes); patch by Jeff Graham 2007-03-29 08:40:36 +00:00
nicolasconnault fcdca8b2ba MDL-9062: Completed the new form. 2007-03-29 08:36:53 +00:00
nicolasconnault 0927364827 MDL-9062: Only thing left to do is enable grouping selection when editing an existing group. All the rest works great. 2007-03-29 07:49:28 +00:00
toyomoyo 7d5bb42327 fix for MDL-8983, hidden assignments need a help file 2007-03-29 06:37:46 +00:00
toyomoyo c807105f75 fixing a warning 2007-03-29 06:34:22 +00:00
nicolasconnault 5a60645dc7 MDL-9062: Getting close to finishing these two files. 2007-03-29 05:32:44 +00:00
moodler 64622defdd Committing fix for MDL-9101 from Jeff Graham 2007-03-29 03:27:52 +00:00
moodler 2fe9f46996 Renamed README -> README.txt to help the windows and mac people 2007-03-29 02:54:16 +00:00
danmarsden 9228be2bd2 MDL-9102 incorrect use of unset_config() 2007-03-28 23:35:07 +00:00
sam_marshall 5c33b48580 Undoing previous commit, which happened by accident - apologies 2007-03-28 17:13:17 +00:00
sam_marshall 993f282295 Improved performance status (bug 2924) 2007-03-28 16:58:34 +00:00
tjhunt 6df6296812 MDL-9061 - Only show global assign roles warning if you are assigning roles in the global context! Also, change name of admin menu entry to reduce confusion. 2007-03-28 16:57:05 +00:00
nicolasconnault 668ce6df14 MDL-9062 Created two new files so the unfinished conversion doesn't affect any current code. Also added a convenience groups_update_group($data) method. Patience, this is taking a while but I'm learning to use these mforms for the first time :-) 2007-03-28 08:39:42 +00:00
skodak 87e70ea390 MDL-8973 auth hooks final cleanup 2007-03-28 08:26:02 +00:00
moodler 60d12f2e35 Converted from dos 2 unix MDL-9088 2007-03-28 07:16:01 +00:00
toyomoyo 7330a604c7 fix for MDL-9068 2007-03-28 03:24:34 +00:00
moodler def6f22e27 Added patch from Mark for MDL-9083 2007-03-28 03:04:18 +00:00
moodler 7567dcd370 Fixed dos2unix and excess stuff in footer.html 2007-03-28 02:49:39 +00:00
toyomoyo a26f30774b fix for MDL-9065, use $CFG->creatornewroleid setting 2007-03-28 02:29:37 +00:00
moodler b24126e9a9 New cornflower from Jeff Watkins MDL-9009 2007-03-28 02:24:34 +00:00
skodak c9609a1f0d MDL-8781 fixed typo 2007-03-27 22:02:24 +00:00
skodak 37841afffe MDL-8781 survey converted to new formslib - empty intro now means use default from language pack 2007-03-27 21:58:01 +00:00
stronk7 81b65eaec6 Now XMLDBStatements support backslashed single quotes. 2007-03-27 20:30:22 +00:00
skodak 8c2eb9802e MDL-9053 - adding new function get_enabled_auth_plugins() - this should make the code simpler and the bug should be gone forever 2007-03-27 20:22:25 +00:00
sam_marshall 6920a2a59c MDL-9072 Made forum discussion list not show links to groups if you don't have permission to view them 2007-03-27 12:23:02 +00:00
nicolasconnault b6e33658e3 MDL-9061 2007-03-27 06:54:23 +00:00
moodler ed22c4f3bc Fix for data exposure MDL-9052 2007-03-27 05:13:09 +00:00
nicolasconnault 8d5e99f086 MDL-9040: Enabled disabling of any buttons that always lead to errors. Javascript dynamically displays/hides buttons depending on which groupings/groups are selected. This required a number of extensive modifications, but degrades nicely without JS. 2007-03-27 04:09:19 +00:00
nicolasconnault bd52a0145e MDL-9040: Enabled disabling of any buttons that always lead to errors. Javascript dynamically displays/hides buttons depending on which groupings/groups are selected. This required a number of extensive modifications, but degrades nicely without JS. 2007-03-27 04:03:02 +00:00
moodler 3c58497b82 Automatic installer.php lang files by installer_builder (20070327) 2007-03-27 03:54:55 +00:00
toyomoyo f48f0e399d fix for MDL-9057, invalid contexts should be ignored 2007-03-27 03:03:01 +00:00
stronk7 68b8dfa13b ignore this... 2007-03-26 23:30:57 +00:00
stronk7 b0e97aec74 Always print the entry when adding, updating/deleting comments. MDL-9047 2007-03-26 23:01:11 +00:00
donal72 c13722179f Patch for upgrade breakage on IIS (and maybe other non-Apache webservers) MDL-8926 2007-03-26 22:51:42 +00:00
stronk7 7e7b0ef002 Avoid to end SQL commands with a trailing ';'. MDL-9058 2007-03-26 21:51:18 +00:00
skodak 7b2ce0378b MDL-9056 Undefined property in lib/db/upgrade.php 2007-03-26 21:46:42 +00:00
skodak 42693210f1 MDL-9055 wrong creation of mnet auth object in require_logout() + minor cleanup 2007-03-26 20:33:27 +00:00
skodak 6e1cef3394 MDL-8513 fixed conversion of ldap settings during upgrade to 1.8 2007-03-26 20:14:27 +00:00
skodak cad6cf5134 MDL-8973 fixed typo in signup form validation 2007-03-26 19:27:04 +00:00
skodak d71004a3a2 MDL-9053 - detect + fix broken $CFG->auth setting from the login page; backported from HEAD 2007-03-26 19:01:41 +00:00
skodak 00db7acb37 MDL-9053 - detect + fix broken $CFG->auth setting from the login page. 2007-03-26 18:59:07 +00:00
nicolasconnault dcd981ac12 MDL-9041: Added a Groups button on the users page. Easy to spot. 2007-03-26 09:24:55 +00:00
nicolasconnault 97aa751b03 MDL-9039: Corrected old groupid and groupingid URL variables. 2007-03-26 09:11:16 +00:00
nicolasconnault 67b71d5027 MDL-9038: Groups can now be created outside of any groupings. The number of groups within [Not in a grouping] is also correct now. 2007-03-26 07:59:04 +00:00
nicolasconnault 1e89d31bf8 MDL-9025: Fixed the given line, plus one in user/index.php that didn't get filtered either when viewing all users with a given role: e.g. user/index.php?contextid=38&roleid=3 2007-03-26 07:07:05 +00:00
toyomoyo 33f23cb8df sorry wrong string used 2007-03-26 06:55:17 +00:00
toyomoyo e17732128a applying inaki's patch for MDL-9012, course autocreation doesn't work in enrol/database 2007-03-26 06:49:42 +00:00
toyomoyo 0e6b0d5c48 fix for MDL-9002, missing string 2007-03-26 06:44:40 +00:00
nicolasconnault 2659a6411d MDL-8982 : Cleaned up group/index.php and added options with &nbsp; to satisfy strict XHTML. 2007-03-26 06:41:38 +00:00
toyomoyo 91e546cc58 fix for MDL-9010, course request button should not appear when disabled 2007-03-26 05:52:29 +00:00
toyomoyo 6872a4ee5f fix for MDL-8336, lacking of viewuseractivitiesreport 2007-03-26 04:12:19 +00:00
nicolasconnault 3417898861 MDL-8730: These libxml_* functions are PHP5 only. I've wrapped them in function_exists() conditional structures. 2007-03-26 03:40:38 +00:00
nicolasconnault e8c36b7a7a MDL-8922: Had to modify another bunch of files to fix a simple problem:
when a config block contains a form, the previous form needs to be closed
properly (it was, but there were non-matching closing divs etc...).
2007-03-26 03:04:33 +00:00
nicolasconnault d099661cd4 MDL-8922: Had to modify another bunch of files to fix a simple problem:
when a config block contains a form, the previous form needs to be closed
properly (it was, but there were non-matching closing divs etc...).
2007-03-26 02:57:55 +00:00
skodak 466c30cf6e MDL-9028 prelogout_hook() is never executed in login/logout.php; patch by Inaki Arenaza 2007-03-25 20:18:15 +00:00
stronk7 b0aeae8288 Deleted one debug line... 2007-03-24 00:57:43 +00:00
stronk7 a655cd9a38 Fix a problem with glossary not being able to sort by firstname. 2007-03-24 00:56:31 +00:00
stronk7 401e26306e One default was causing author view not being able to sort
by firstname or lastname.
2007-03-24 00:37:16 +00:00
stronk7 a5762bd531 Now the underscore lines in tabrow1 aren't blue anymore. Really
complex to guess the modifiers to apply!
2007-03-24 00:00:40 +00:00
stronk7 6a1a294942 Fetch local guest user using DB index. 2007-03-23 15:56:41 +00:00
skodak 5b78424ea3 MDL-9017 add mime type for ico files 2007-03-23 13:05:34 +00:00
skodak 01f35fac14 MDL-8973 improved auth plugin docs 2007-03-23 11:26:23 +00:00
csantossaenz 5466503ec1 Fixed backup problem for scorm module. Now, it includes needed files in moddata/scorm. even though the backup is done without user data and files 2007-03-23 10:53:24 +00:00
nicolasconnault 2e177ee4bc MDL-8922 : More work on cleaning up RSS block, but not quite there yet. 2007-03-23 07:58:25 +00:00
nicolasconnault 13d6383c9a MDL-8922 : Fixed a number of xhtml simple issues, but heaps of hard-core fixes yet to do. 2007-03-23 07:46:17 +00:00
toyomoyo 250aa125bb fix for MDL-9016, clearing cache after deletion of course_content 2007-03-23 07:18:00 +00:00
moodler 6e7cd09c2f Automatic installer.php lang files by installer_builder (20070323) 2007-03-23 03:45:50 +00:00
moodler af2146d651 Merged create_course and update_course changes from head MDL-9015 2007-03-23 02:42:40 +00:00
toyomoyo 5f73b9b758 fix for MDL-8987, guests should not see blogs flagged as site blogs 2007-03-23 01:41:09 +00:00
nicolasconnault d62c52b985 Corrected XHTML: hidden inputs not surrounded by container. 2007-03-23 01:16:22 +00:00
skodak 9ba5cf85e0 MDL-8347 Cannot create new glossary category if category with same name exists in another course on site; patch by Ray Lawrence 2007-03-22 22:43:22 +00:00
tjhunt 9e6f284ae6 Followup to MDL-8994 - validate the category id we got from the form. 2007-03-22 22:01:45 +00:00
tjhunt 3c8c7ad245 MDL-7241 - Manual grading report, sort by completed time didn't. Merged from MOODLE_16_STABLE. 2007-03-22 21:31:33 +00:00
tjhunt acccc0148b Make debugging more helpful by printing a full stack trace. 2007-03-22 16:43:56 +00:00
skodak 1a91392796 MDL-9007 weblib.php breaks upper-case hex Numeric Character References; patch by Gareth Morgan 2007-03-22 16:36:19 +00:00
skodak 19f417f6c3 (MDL-8973) Fix OOP model of new multi auth plugins - updated docs 2007-03-22 13:28:41 +00:00
skodak e58aa8db4a ok, again and now properly 2007-03-22 12:57:29 +00:00
skodak 47578048b9 fixing some previous commit mess, no idea what happened with this file :-( 2007-03-22 12:47:42 +00:00
skodak a045329951 (MDL-8973) Fix OOP model of new multi auth plugins + some other auth related fixes, fixed change_password, ldap updates, etc.; TODO: fix docs
backported from HEAD
2007-03-22 12:40:16 +00:00
skodak bb82c7ba82 file authlib.php was added on branch MOODLE_18_STABLE on 2007-03-22 12:40:35 +0000 2007-03-22 12:28:00 +00:00
tjhunt 79dc9d16be MDL-9004 - Breadcrumb trail is wrong when editing a quiz question. 2007-03-22 11:46:03 +00:00
nicolasconnault 803efadffc MDL-8807: The icon's title attribute wasn't being updated along with its img.src
MDL-8997: A couple of typos: groupseparate instead of groupsseparate etc...
2007-03-22 07:15:05 +00:00
nicolasconnault f6ee732c66 MDL-8807 and MDL-8564: Jamie had replaced the three group modes with Yes and No, for some
undocumented reason (See http://moodle.cvs.sourceforge.net/moodle/moodle/lib/form/modgroupmode.php?diff_format=h&view=log&pathrev=MOODLE_18_STABLE#revtext).
I reverted his changes, and this seems to work normally now.
2007-03-22 05:23:40 +00:00
moodler 90b6a3282f Automatic installer.php lang files by installer_builder (20070322) 2007-03-22 03:59:00 +00:00
toyomoyo f9109b1c40 MDL-7164, Mark Nielsen's patch for remove_course_content not calling instance_destroy() in blocks 2007-03-22 02:08:01 +00:00
tjhunt 66adefcbf6 MDL-8994 - Question category selector on the question type editing forms is ignored. 2007-03-22 00:10:32 +00:00
tjhunt c01c3954af MDL-7259 - Item analysis report does not use the right format_text settings. Merged from MOODLE_16_STABLE. 2007-03-21 23:25:27 +00:00
tjhunt c48ca9308f Fix whitespace problems and Eclipse warnings in Item Analysis quiz report. 2007-03-21 23:04:35 +00:00
skodak f77192322f MDL-8804 two digests per day 2007-03-21 22:16:21 +00:00
skodak 73b318a63f MDL-7647 Broken links on confirmation email (or others) - patch by Paulo Matos; merged from MOODLE_17_STABLE 2007-03-21 21:58:58 +00:00
tjhunt fe4acc87a0 Improve string handling in the question type base class. 2007-03-21 17:12:38 +00:00
thepurpleblob db3f7a489c Check for empty text strings. Thanks to Quedoc. 2007-03-21 11:17:38 +00:00
tjhunt aff7b7bd00 MDL-8946 - Fix a regression that broke question export. Also, partially clean up the way that question bank navigation tabs are printed, so the code is not duplicated in the quiz. Some other miscellaneous code cleaning too. 2007-03-21 10:40:35 +00:00
nicolasconnault f213d5dd64 MDL-2974 Added multilang filter to roles in Admin->Appearance->Gradebook 2007-03-21 07:36:56 +00:00
toyomoyo 8489b65737 adding string 2007-03-21 06:16:56 +00:00
nicolasconnault 8d96b8a10a MDL-8963 : The code was using $group->password instead of $group->enrolmentkey. 2007-03-21 06:15:10 +00:00
toyomoyo af007d91ee fix for MDL-8981, roles assigned at site level may result n a lot of default subscriptions 2007-03-21 06:01:33 +00:00
moodler d60572c8dd Automatic installer.php lang files by installer_builder (20070321) 2007-03-21 03:53:48 +00:00
moodler bd9abfe3db Cleaned up the default coloring of the links in sub-tabs 2007-03-21 03:10:39 +00:00
tjhunt 1d3301fc3d MDL-8978 - Regression from MDL-6386. Merged from MOODLE_16_STABLE. 2007-03-21 00:16:55 +00:00
tjhunt 52742e6f05 MDL-8299 - Wrong capability on review.php. Merged from MOODLE_17_STABLE. 2007-03-20 22:45:04 +00:00
tjhunt f9cecaf2f1 MDL-8140 Other units disappear from the editing form when there is no unit with multiplier 1. Effectively the same fix as just applied to MOODLE_1.7_STABLE. 2007-03-20 22:23:50 +00:00
skodak d3e5a45ac7 MDL-8976 smilies alt text was cached in one static cache for all langs 2007-03-20 20:46:37 +00:00
skodak e80947d967 MDL-8975 fix parameter handling in repository plugin 2007-03-20 19:45:59 +00:00
skodak 5bd068b7ad MDL-8955 Multilang filter doesn't accept different attribute order 2007-03-20 17:12:51 +00:00
tjhunt 7f1908567b MDL-4084 Backup all question categories in a course, not just the ones from which questions are used in a quiz. 2007-03-20 15:06:33 +00:00
tjhunt 1043fa2dff MDL-6386/MDL-6462 - yet more special character issues with multianswer. I think I have got them all this time. Backported from HEAD. 2007-03-20 14:31:16 +00:00
tjhunt 900022293b Matching qestion type was failing to correctly determine wheterh the student had changed their answer. 2007-03-20 14:07:00 +00:00
moodler 36244d8f41 Some format fixes related to MDL-8947 (though this was also fixes on server5) 2007-03-20 08:13:39 +00:00
skodak 5838338e84 warning fix 2007-03-20 08:07:00 +00:00
skodak f90d3476c6 MDL-8968 no auth plugin broken 2007-03-20 07:54:39 +00:00
moodler 0bd255acd7 More fixes for login block 2007-03-20 07:40:18 +00:00
skodak b8b2eacad4 MDL-8840 Loginas cleanup, some more improvements 2007-03-20 07:38:16 +00:00
moodler 638a8adc7b Some cleanups for the login block input fields 2007-03-20 07:34:03 +00:00
nicolasconnault 3af559d414 More multilang support for site fullname, plus a couple extra comments. 2007-03-20 07:07:58 +00:00
nicolasconnault ca31757ba3 MDL-8832 : Undid the stripslashes and changed calls to s($string) to s($string, true) instead. 2007-03-20 05:12:17 +00:00
nicolasconnault d609b3a37b MDL-8832 : Added stripslashes around search parameters (6 in total). 2007-03-20 04:44:41 +00:00
moodler 09b4e87bf9 Automatic installer.php lang files by installer_builder (20070320) 2007-03-20 03:38:45 +00:00
toyomoyo c9b34a7861 fixing warning 2007-03-20 02:56:42 +00:00
nicolasconnault 32c0a71736 Removed changes related to APD profiling, this development is now geared
towards 1.9 only (in HEAD at the moment).
2007-03-20 00:37:48 +00:00
nicolasconnault 2f49a4fbbc MDL-8921 : Converted the page from table layout to divs (except tabular data) and added
related css rules in styles_layout.css. Looks the same and validates XHTML strict.
2007-03-20 00:26:23 +00:00
stronk7 5ce30e94ed urlencode() hook for correct parameter handling & XHTML. 2007-03-20 00:10:25 +00:00
stronk7 b1995508c1 Changing one generic class-name to a glossary specific one in themes. 2007-03-19 23:56:57 +00:00
stronk7 4b593df481 Changing one generic class-name to a glossary specific one. 2007-03-19 23:51:31 +00:00
skodak fe219370ad MDL-8840 Loginas cleanup, better course isolation 2007-03-19 22:24:13 +00:00
pichetp 2076251d51 Give the question bank code sensible PHPdocumentor package names. 2007-03-19 21:31:22 +00:00
stronk7 de41196269 One more class to align all glossary inline explanations. 2007-03-19 20:18:25 +00:00
stronk7 99feca8c8e Deleting some inline styles and clearing some unused code. MDL-8746 2007-03-19 20:10:50 +00:00
skodak e78860178a MDL-8840 Loginas cleanup 2007-03-19 18:52:48 +00:00
skodak a5566c36e8 MDL-8840 Loginas cleanup 2007-03-19 18:45:40 +00:00
stronk7 87290838c9 Now the add/update entry page XHTML validates and doesn't show
the tabs and intro anymore.
2007-03-19 18:42:01 +00:00
stronk7 20ad9953df Now glossary "add entry" is a button instead of a tab. Part of MDL-8746 2007-03-19 18:21:30 +00:00
stronk7 d3e7c0e206 Preparing some glossary css changes...for "add entry" buttons. MDL-8746 2007-03-19 18:12:16 +00:00
stronk7 a20d27df81 $CFG->tabselectedtofront is now out. Part of MDL-8746 2007-03-19 17:17:54 +00:00
stronk7 374e173f11 $CFG->tabselectedtofront is now out. Part of MDL-8746 2007-03-19 17:17:54 +00:00
stronk7 01cb839f5c $CFG->tabselectedtofront is now out. Part of MDL-8746 2007-03-19 17:17:53 +00:00
stronk7 0c2153fd8a XHTML compliance... 2007-03-19 16:37:55 +00:00
stronk7 633e1ee493 small typo in var name
Merged from MOODLE_17_STABLE
2007-03-19 16:11:36 +00:00
skodak 8921708582 MDL-8904 please no extract()s, fixed double string filtering 2007-03-19 10:34:29 +00:00
moodler 52f979d9a1 New tags files (replaced the one Nick deleted) 2007-03-19 08:24:21 +00:00
skodak 87cba17acf MDL-8956 Mistake in admin.php - wrong cron url 2007-03-19 08:22:58 +00:00
skodak 239a789ebd MDL-8957 Multimedia filter cleanup 2007-03-19 08:07:19 +00:00
skodak 8cc503ed77 fixed typo 2007-03-19 08:05:10 +00:00
toyomoyo 32c4ae7dc3 fix for MDL-8942, can't delete blog image 2007-03-19 07:51:12 +00:00
martinlanghoff 84d46ef3d5 Auto-linking filters: fix serious caching bug in forum mailouts
Autolinking of glossaries, activity, resources and wiki names were using a
trivial single-entry cache implemented with static vars. The cache was _not_
keyed on course.

This bug was visible during forum_cron() which walks many courses. The cache
would get "stuck" on the first course that had something to put in the cache.
All mailouts from there onwards would autolink to stuff in the wrong course.
2007-03-19 06:32:24 +00:00
toyomoyo 5c044b8812 fix for MDL-8934, role assignment statements incorrect 2007-03-19 04:47:51 +00:00
nicolasconnault f6cb1501e4 MDL-8860 - Enabled multilang filter for site title. 2007-03-19 04:15:06 +00:00
nicolasconnault 88e8672ef6 Removing a tags file I accidentally checked in 2007-03-19 04:11:27 +00:00
moodler 26cce91d9b Better way to do an error like this 2007-03-19 03:00:54 +00:00
nicolasconnault f80e271577 Initial changes to introduce APD profiling along with performance reports in the footer. Not yet functional. 2007-03-19 01:17:02 +00:00
stronk7 7bae742ae7 Minor fixes for XHTML compliance 2007-03-19 00:00:46 +00:00
stronk7 5930e65512 Fixing env table when displayed on upgrade. 2007-03-18 19:36:11 +00:00
stronk7 28894c72b2 Adding the environmentbox class to the box. 2007-03-18 19:18:51 +00:00
stronk7 d9c201e1a0 Add some space between the environment table and environment box. 2007-03-18 19:14:25 +00:00
moodler 27c18c1776 Automatic installer.php lang files by installer_builder (20070318) 2007-03-18 03:33:20 +00:00
poltawski ca9825f48e MDL-8831 - forum date checkboxes loose their checked status 2007-03-17 23:40:46 +00:00
poltawski 8a08a041f4 MDL-6386 - Regression from MDL-6462, lost stripslashes in CLOZE question,
thanks to Joseph Joseph Rézeau  for his attention to this issue
2007-03-17 22:53:45 +00:00
gbateson 843808a9d8 fix hotpot reports to handle new group structure in Moodle 1.8 (MDL-8944) 2007-03-17 13:28:34 +00:00
skodak b139c82dfc MDL-8883 fixed double backslashes problem in filter settings 2007-03-16 22:16:35 +00:00
skodak 5e57504798 MDL-8932 fix static cache in userdate() + wrong en.UTF-8 locale 2007-03-16 20:48:50 +00:00
skodak c7e53eba46 backporting fix for warning when no tabs from HEAD 2007-03-16 20:31:30 +00:00
pichetp 6bfdfaffe9 adding </p> line 112 ,114 2007-03-16 20:19:39 +00:00
skodak fa86dd5898 MDL-8841 Switch role cleanup 2007-03-16 20:17:45 +00:00
moodler f1d9c9af1d Added support for $CFG->formatstringstriptags if it's defined (will always strip tags from strings) MDL-8713 2007-03-16 05:35:18 +00:00
moodler 99fc498b2f SOme small fixes for filter_string ... MDL-8713 2007-03-16 05:20:45 +00:00
moodler e9f89ed558 Slight bump to version to correct de-synch (see MDL-8931) 2007-03-16 04:42:09 +00:00
mark-nielsen d3dd9635ea Fixes for MDL-8929: branch buttons displaying horizontally broke (again) and updated lang entry 2007-03-16 04:33:31 +00:00
mark-nielsen 7a3631b6ee Fixing language string calls as noted in MDL-8930 2007-03-16 04:07:25 +00:00
mark-nielsen 5e24f43df6 Merging in fix for MDL-8196 2007-03-16 03:48:53 +00:00
martinlanghoff d15c13904e get_complete_user_data(): speedup SQL selecting local users by their mnethostid 2007-03-16 03:39:16 +00:00
moodler e217284df4 CHanged the default for striplinks in format_string from false to true, as this is likely to be the safest for the kinds of places where such strings get used. MDL-8713 2007-03-16 03:21:25 +00:00
moodler 0f26f875f5 *** empty log message *** 2007-03-16 03:10:14 +00:00
moodler e5636d3015 FIxed a mistake (code was doubled!) in format_string MDL-8713 2007-03-16 02:46:03 +00:00
toyomoyo 1ccb8ec916 put empty <option/> only when <select> is empty, for xhtml, i am pretty sure i checked this in already... 2007-03-16 02:31:44 +00:00
moodler 0f5a44ca98 FIxed autofocus on reply posts 2007-03-16 01:44:11 +00:00
skodak aba846b248 MDL-8924 fixed UPGRADE fails from 1.6.4+ to 1.8 Beta+ 2007-03-15 22:42:09 +00:00
bobopinna 264062798b Fixed the problem with asset and review mode checkbox in view.php 2007-03-15 21:23:14 +00:00
bobopinna 1e7321b854 Fixed the problem with asset and review mode checkbox in view.php 2007-03-15 21:06:53 +00:00
stronk7 cafd7f019a Fix small bug only reproduced in tests about changing field names and
xmldb_field object becoming modified. Novice OOP bug :-(
2007-03-15 20:01:28 +00:00
stronk7 09ea9739f3 Testing comments and default clauses containing chars to be escaped. 2007-03-15 19:15:22 +00:00
stronk7 6a3d064a00 DB escaping comments. MDL-8918
Merged from MOODLE_17_STABLE
2007-03-15 19:01:53 +00:00
poltawski e1578125e4 MDL-8922 - some xhtml fixes 2007-03-15 16:57:05 +00:00
poltawski 88b367e331 MDL-8582 course logs xhtml fixes 2007-03-15 16:02:32 +00:00
poltawski 5c8e9c9d6e Further fix for MDL-8582 on participants page 2007-03-15 15:45:10 +00:00
moodler b1fcf3d343 More post link fixes (#123 --> #p123) 2007-03-15 14:09:46 +00:00
moodler bd72653e3c Fixed a link from user forum post listing 2007-03-15 13:37:36 +00:00
tjhunt 81cdbf08e9 MDL-6462 - Cloze (multianswer) question special character issues. Merged from MOODLE_16_STABLE. 2007-03-15 12:59:15 +00:00
tjhunt a2b74a9300 Fix notice. 2007-03-15 12:53:03 +00:00
skodak d2d26c34ba MDL-8913 use proper returned reference assignment for forms elements (PHP4 trouble) 2007-03-15 12:40:14 +00:00
skodak 0ace4d2116 MDL-8783 fixed incorrect quotes in forum lang file 2007-03-15 12:11:52 +00:00
poltawski 19db0355d3 MDL-8906 - Additional fix to prevent needless searching on blank query 2007-03-15 11:46:14 +00:00
toyomoyo 2e8ee5302f putting user/editprofile back 2007-03-15 08:28:56 +00:00
bobopinna 8bfa3f6c5f Bug fix MDL-8903 2007-03-15 07:45:32 +00:00
nicolasconnault 3271d9e6d1 MDL-8783: Added appropriate language strings to resolve this usability issue. 2007-03-15 06:23:54 +00:00
toyomoyo 98c51965c1 MDL-8908, draft blogs should not be visible 2007-03-15 06:11:57 +00:00
moodler 84b23dce22 New filter_string() function which uses a smaller range of filters than the normal filter_text. This solves MDL-8713. 2007-03-15 06:05:15 +00:00
toyomoyo 3563c6c420 fix for MDL-7939, default teacher, editting-teacher and course creators should see hidden courses 2007-03-15 04:21:50 +00:00
moodler 1e266ae4b0 Automatic installer.php lang files by installer_builder (20070315) 2007-03-15 03:34:46 +00:00
nicolasconnault b4d17605c1 MDL-8904: Used a numerical index for the navigation elements array instead of string index.
MDL-8713: Added $CFG->formatstring temporary variable
2007-03-15 03:16:12 +00:00
nicolasconnault cf6ffbe73b MDL-8870 - All major file formats (mp3, mpeg, wmv, mov, avi, swf) now support embedding when required, in all major browsers. 2007-03-15 01:50:06 +00:00
poltawski a628b65cfa Merging revert MDL-8906 2007-03-15 01:14:07 +00:00
poltawski 7f51421503 MDL-8906 - Actually, I'll Fix blocks editing on search pages, by adding the query 2007-03-15 00:52:19 +00:00
poltawski f6a157d14a MDL-8906 - Blocks Editting Broken on Admin Search Results page, so disable
edit button
2007-03-15 00:32:38 +00:00
danmarsden fc4ac66431 Fix for MDL-8862 - order of options in choice not logical - shift option for limiting options to aboe where limits are set. 2007-03-15 00:14:37 +00:00
skodak 94e16c079c (MDL-8820) moodle/user:editprofile now works in user contexts - reverted previous fix, adding new one 2007-03-14 23:35:08 +00:00
skodak f8c56dd156 MDL-8522 better label for role reset button and confirmation text 2007-03-14 22:06:10 +00:00
skodak d8fcdab45c fixed missing global CFG 2007-03-14 21:55:03 +00:00
skodak 27fb92f48f MDL-8867 Add setting to define role that is assigned to creators in new courses
MDL-8868 Set only minimal permissions for creator role

+ improved accesslib to handle changes of context levels in capability definitions
2007-03-14 21:38:15 +00:00
tjhunt 5dc53c6b7b MDL-8127 - bad use of DESCRIPTION constant in quiz module causes upgrade to fail. Thanks to Pavel Krejci for the fix. Merged from MOODLE_17_STABLE. 2007-03-14 21:24:04 +00:00
tjhunt f0d2d9ae0c Oops, reverting. Eloy had already fixed it. 2007-03-14 21:10:49 +00:00
tjhunt 7a43fb909b MDL-8232 - can't use = on TEXT colums with MSSQL - was breaking numerical question type upgrade. Merged from MOODLE_17_STABLE. 2007-03-14 21:08:04 +00:00
tjhunt 77f814a368 MDL-8772 - Use the same list of places to search in get_string and help.php. 2007-03-14 20:14:48 +00:00
poltawski 8eaa523a2c MDL-8900 Adding adminroot to redirects to clean up html 2007-03-14 17:23:30 +00:00
poltawski 01d38e9938 Fixed check for section for MDL-8360 2007-03-14 16:30:47 +00:00
tjhunt 04bfc2247d Notice when a student attempts a quiz, because there are no tabs to display. 2007-03-14 15:29:22 +00:00
thepurpleblob 050ed53908 Fixed true/false bug due to new 'correctanswer' field. 2007-03-14 15:14:14 +00:00
moodler 24243ec058 Fixes for wonky buttons in navigation 2007-03-14 14:54:15 +00:00
thepurpleblob 170ab43ad0 Fixed some hardcoded strings in GIFT format. 2007-03-14 14:08:57 +00:00
ethem f7b1762793 Code cleanup 2007-03-14 13:26:24 +00:00
thepurpleblob f4fb213988 Use $this->error for only error report. 2007-03-14 13:13:44 +00:00
poltawski d8572e7021 MDL-8455 - unslightly error if no course category 2007-03-14 13:05:30 +00:00
thepurpleblob 521a96d4ef MDL-8898
Improvements to error handling in question bank import/export.
2007-03-14 13:02:55 +00:00
thepurpleblob 2bab640cd6 MDL-8898
Improvements to error handling in question bank import/export.
2007-03-14 12:53:13 +00:00
poltawski ffe67636f7 MDL-8360 - Currently can't bookmark admin searches, so disable the ability to bookmark
the search page
2007-03-14 11:55:25 +00:00
tjhunt c2f3c09b3b Fix typo 2007-03-14 11:33:01 +00:00
skodak 9751ebf3ac MDL-8897 fixed shell commands in tex and algebra filters; merged from MOODLE_17_STABLE 2007-03-14 11:31:15 +00:00
toyomoyo 9e2c7c7fa3 fix for MDL-8020, bumping up version to get rid of moodle/user:editprofile as it is the same as moodle/user:update 2007-03-14 07:50:11 +00:00
nicolasconnault af7471c268 MDL-8870 - Added support for embedded flash, and css hooks for all embedded resources (e.g. class="resourceswf") 2007-03-14 05:23:03 +00:00
moodler eb87e4be97 Fixed user profile image size on message history 2007-03-14 04:48:12 +00:00
nicolasconnault e6a99eac77 MDL-8792 - Added a new language string: keepnavigationvisible 2007-03-14 04:30:41 +00:00
toyomoyo 1eca074507 fix for MDL-8885, teachers should not be able to set course to hidden if they can not view hidden courses 2007-03-14 04:29:42 +00:00
moodler 56bb24458a Automatic installer.php lang files by installer_builder (20070314) 2007-03-14 03:53:22 +00:00
nicolasconnault 538e5a2810 MDL-8792 - Added a new string: keepnavigationvisible 2007-03-14 03:17:52 +00:00
toyomoyo c6d9f6a175 fix for MDL-8885, do not show bulk message option if user has no capability 2007-03-14 01:49:43 +00:00
toyomoyo 116244fbae fix for MDL-8885, editting teacher should be able to see all messages in course 2007-03-14 01:35:31 +00:00
nicolasconnault 02c9b15942 *** empty log message *** 2007-03-14 00:45:10 +00:00
moodler 656e41c472 Further to MDL-8872 2007-03-14 00:15:25 +00:00
stronk7 fc80a68f89 Now documental search mimics real relational search behaviour. MDL-8884 2007-03-13 22:39:07 +00:00
bobopinna b40f8bad2f Fixed bug MDL-8725 and fixed some typo in regulars expressions in cmi.objectives elements store and retrieve 2007-03-13 22:09:24 +00:00
stronk7 2a0a625e35 Fix one awful background showed in form-buttons (that are enclosed in a fieldset????) 2007-03-13 18:30:15 +00:00
tjhunt 4f510e2ec8 Eliminate bizarre use of function_exists. 2007-03-13 17:43:03 +00:00
tjhunt 803b4bf64c Entity decoding only done the right number of times on import, not once too often.
Also, fix a notice and and Eclipse warning.
Backported from HEAD.
2007-03-13 16:27:56 +00:00
tjhunt 775db8e809 Use the right string processing when outputting question text on import/export. Backported from HEAD 2007-03-13 16:24:42 +00:00
tjhunt 7585949466 Use the right string processing functions when outputting question names. Backported from HEAD 2007-03-13 16:20:58 +00:00
jamiesensei 6b344faba7 small change to fix MDL-8788 which was a problem with non unique header element names 2007-03-13 14:46:17 +00:00
moodler 9609ee0a4f MDL-8872 Removed mentions of "course" from packages 2007-03-13 08:28:47 +00:00
nicolasconnault 4dfc8f1d79 MDL-8696 - Just reduced input field from 64 to 48 2007-03-13 07:37:07 +00:00
toyomoyo 9143ed3366 allow guests to see the reply link 2007-03-13 04:47:30 +00:00
toyomoyo 472da9a27d fix for MDL-8864, users with no replypost capability can see reply link 2007-03-13 04:36:23 +00:00
moodler 4d2892942a Automatic installer.php lang files by installer_builder (20070313) 2007-03-13 03:36:30 +00:00
nicolasconnault 831b76108a MDL-8855 - Wrote additional GD code to support alpha transparency in PNG files. 2007-03-13 02:37:26 +00:00
nicolasconnault 9eb89d835c commit test, ignore changes 2007-03-13 01:20:19 +00:00
toyomoyo 90459a1db8 fixing bad has_capability call 2007-03-13 00:51:12 +00:00
mark-nielsen ee4cee1a4c Converting navigation array to a breadcrumb string for MDL-8843 2007-03-12 22:59:28 +00:00
bobopinna 6c60a57d31 fixed a typo in library call 2007-03-12 20:11:59 +00:00
pichetp b97b59961e add nosharedwildcard' 2007-03-12 16:53:10 +00:00
thepurpleblob 858c53d8c9 MDL-8857
Make numerical and essay question formats more consistent.
2007-03-12 16:32:00 +00:00
moodler ae5c32e389 Straighten up registration button 2007-03-12 13:39:56 +00:00
moodler 1a9c4ef509 Tidied up the navigation menus a bit 2007-03-12 13:21:23 +00:00
sam_marshall 787b30c0c2 Merging MDL-8823 Made it so you can do require_js after header printed 2007-03-12 12:18:13 +00:00
skodak edfda53d51 MDL-5229 and MDL-6196 adding gb18030 mime header encoding 2007-03-12 08:38:33 +00:00
toyomoyo 26aac52ce0 fix for MDL-8821, do not display grade table if no grade available 2007-03-12 07:00:01 +00:00
nicolasconnault 1f322589be MDL-8737 - Added a focus() to the generated validation JS, so that if an element fails client-side validation, the focus jumps straight to it when the submit button is clicked. This doesn't yet work with HTMLArea elements. 2007-03-12 06:42:14 +00:00
nicolasconnault eab3ae18fc MDL-8792 - Simply added help icon to explain the options available regarding embedding media files in the site. 2007-03-12 05:38:02 +00:00
nicolasconnault 96ef423773 MDL-8792 - Simply added help icon to explain the options available regarding embedding media files in the site. 2007-03-12 05:27:43 +00:00
nicolasconnault a8d9136e89 MDL-8847 - Added a little 'p' :-) 2007-03-12 05:16:54 +00:00
mark-nielsen 1244ef78ac Fix for MDL-8843: Converted the breadcrumb to an array 2007-03-12 03:34:52 +00:00
toyomoyo 03008bca7e fixing a broken sql call to get_my_courses() 2007-03-12 03:05:12 +00:00
donal72 33981a427d MNET: Check that xml-rpc is installed: #MDL-8731 #MDL-8846 2007-03-12 02:32:08 +00:00
toyomoyo eea7d42fd1 parent blog forceloginforprofile fix 2007-03-12 01:11:59 +00:00
mudrd8mz a4fa47e7ea Merged the fix of MDL-8852 from the HEAD revision 1.90 2007-03-11 23:54:22 +00:00
skodak d4dd4c07fe MDL-8849 use proper value quoting 2007-03-11 19:59:13 +00:00
moodler df58100c31 Added patch from Petr (see MDL-8767) unchanged. Looks OK from a visual inspection. 2007-03-11 07:12:10 +00:00
moodler a080d1ec16 Just fixed an outdated parameter 2007-03-11 06:58:51 +00:00
moodler 321a287501 Merged new timezones from head MDL-8842 2007-03-10 14:49:37 +00:00
moodler 9ed43273aa Automatic installer.php lang files by installer_builder (20070310) 2007-03-10 03:31:39 +00:00
tjhunt 6365af1cf6 MDL-8177 - Random questions selected deleted questions. 2007-03-10 00:33:34 +00:00
stronk7 7044ea9423 Prevent some languages without word whitespace separators to use
documental searches over MySQL.
2007-03-09 20:55:18 +00:00
skodak 54618b81a4 MDL-8834 smtp debugging can now be turned off - now independent on $CFG->debug 2007-03-09 20:13:48 +00:00
stronk7 585b98c78c Adding support for forum documental searches. Disabled by default.
Only MySQL supported. Experimental under 1.8! MDL-8830
2007-03-09 18:28:11 +00:00
stronk7 b0c7638f9c Added the search_generate_text_SQL() function that generates
SQL clauses using documental indexes. Only MySQL for now.
Under 1.8 this isn't used officially (experimental!) but
we need it here right now (won't interfere at all). MDL-8830
2007-03-09 18:19:03 +00:00
sam_marshall 4fc82e8dc9 MDL-8825 Fixed html editor in wiki (invisible fieldset problem) 2007-03-09 15:41:19 +00:00
tjhunt b978bf3a87 Groups upgrade fails if you have groups defined, but none of them contain any members. 2007-03-09 14:33:43 +00:00
exe-cutor dda4dbce59 Adapted login to new authentication structure, but may need some additional adaptions 2007-03-09 12:34:03 +00:00
toyomoyo c6a5a391d4 fix for MDL-8782, adding a mentees block 2007-03-09 07:05:10 +00:00
pichetp ed6e226e64 modifs MDL-5650 2007-03-09 05:33:12 +00:00
pichetp 410cc4e472 other modifications MDL-5650 2007-03-09 05:10:47 +00:00
moodler e3ff4d6046 Fixed typo for MDL-8803 2007-03-09 05:03:44 +00:00
moodler e8e22b7718 Automatic installer.php lang files by installer_builder (20070309) 2007-03-09 03:48:39 +00:00
toyomoyo 445ef592dd forgot to check this in 2007-03-09 02:58:20 +00:00
toyomoyo 3fff3a34f7 fix for MDL-8681, importing a course creates duplicate roles 2007-03-09 02:36:56 +00:00
skodak a6376758d6 MDL-8814 fixed typo 2007-03-08 15:22:42 +00:00
moodler 8231ca599e Re-worked the forum_cron logic to fix posts display ... see MDLSTE-145
A lot more optimisation is still possible.
2007-03-08 13:53:34 +00:00
csantossaenz 80ababd00a Comments and debug messages deleted from last version 2007-03-08 12:42:58 +00:00
nfreear cab7778f18 Follow-up fixes for MDL-8531 "Groups icons..." -PARAM_ALPHANUM bug (merged from HEAD). 2007-03-08 10:38:33 +00:00
csantossaenz 950acb9c73 Fixed MDL-8600 http://tracker.moodle.org/browse/MDL-8600 2007-03-08 09:45:15 +00:00
csantossaenz d5fedfa4a3 Fixed MDL-8600 SQL Error with Postgres 7.4.16 2007-03-08 09:42:50 +00:00
moodler fa730d469f Merged and updated Yu's forum_cron optimising from head 2007-03-08 08:14:05 +00:00
moodler 9b4c44e5ed JUst fixed some notices with strangely-named files in RSS enclosures 2007-03-08 08:12:09 +00:00
nicolasconnault 1558c8e6b4 Converted embedded media files (avi, wmv and mov) to xhtml strict compliance. However, this is far from finished, since some browsers are not displaying correctly.
<table border="1" cellpadding="2" cellspacing="2">
<tr>
<td></td><th colspan="8">Browsers</th>
</tr>

<tr>
<th>File</th>
<td>FF 1.5</td>
<td>FF 2.0</td>
<td>IE 1.5</td>
<td>IE 1.6</td>
<td>IE 1.7</td>
<td>Safari 2.0</td>
<td>Opera 9.10</td>
<td>Konqueror</td>
</tr>

<tr>
<td>AVI (800x600)</td>
<td>?</td><!-- FF 1.5 -->
<td>?</td><!-- FF 2.0 -->
<td>?</td><!-- IE 1.5 -->
<td>?</td><!-- IE 1.6 -->
<td>?</td><!-- IE 1.7 -->
<td>?</td><!-- Safari 2.0 -->
<td>?</td><!-- Opera 2.0 -->
<td>?</td><!-- Konqueror 2.0 -->
</tr>

<tr>
<td>AVI (300x200)</td>
<td>?</td><!-- FF 1.5 -->
<td>OK (pb with size)</td><!-- FF 2.0 -->
<td>?</td><!-- IE 1.5 -->
<td>OK</td><!-- IE 1.6 -->
<td>OK</td><!-- IE 1.7 -->
<td>OK</td><!-- Safari 2.0 -->
<td>OK</td><!-- Opera 2.0 -->
<td>?</td><!-- Konqueror 2.0 -->
</tr>

<tr>
<td>WMV (800x600)</td>
<td>?</td><!-- FF 1.5 -->
<td>OK</td><!-- FF 2.0 -->
<td>?</td><!-- IE 1.5 -->
<td>OK</td><!-- IE 1.6 -->
<td>OK</td><!-- IE 1.7 -->
<td>NO</td><!-- Safari 2.0 -->
<td>OK</td><!-- Opera 2.0 -->
<td>?</td><!-- Konqueror 2.0 -->
</tr>

<tr>
<td>WMV (300x200)</td>
<td>?</td><!-- FF 1.5 -->
<td>OK (pb with size)</td><!-- FF 2.0 -->
<td>?</td><!-- IE 1.5 -->
<td>OK</td><!-- IE 1.6 -->
<td>OK</td><!-- IE 1.7 -->
<td>OK</td><!-- Safari 2.0 -->
<td>OK</td><!-- Opera 2.0 -->
<td>?</td><!-- Konqueror 2.0 -->
</tr>

<tr>
<td>MOV (800x600)</td>
<td>?</td><!-- FF 1.5 -->
<td>OK</td><!-- FF 2.0 -->
<td>?</td><!-- IE 1.5 -->
<td>OK</td><!-- IE 1.6 -->
<td>OK</td><!-- IE 1.7 -->
<td>NO</td><!-- Safari 2.0 -->
<td>OK</td><!-- Opera 2.0 -->
<td>?</td><!-- Konqueror 2.0 -->
</tr>

<tr>
<td>MOV (300x200)</td>
<td>?</td><!-- FF 1.5 -->
<td>OK</td><!-- FF 2.0 -->
<td>?</td><!-- IE 1.5 -->
<td>OK</td><!-- IE 1.6 -->
<td>OK</td><!-- IE 1.7 -->
<td>NO</td><!-- Safari 2.0 -->
<td>OK</td><!-- Opera 2.0 -->
<td>?</td><!-- Konqueror 2.0 -->
</tr>
</table>
2007-03-08 07:40:45 +00:00
toyomoyo b259fd9a25 fixing typo 2007-03-08 06:03:48 +00:00
moodler 6e18a9b615 Added some strings for Pierre Pichet (ppichet) he was having trouble ... 2007-03-08 05:14:25 +00:00
toyomoyo 3ad5be78b5 changing require_once to include_once to tolerate faulty mods 2007-03-08 03:23:38 +00:00
pichetp 9cd5f2f577 small correction improvements in calculated question interface MDL-8389 2007-03-08 02:56:28 +00:00
skodak 668483e068 MDL-8759 reverted previous incorrect patch with unset($USER), fixed logging function instead; solves the broken language in forum cron too 2007-03-08 01:05:13 +00:00
skodak 7da5cf7efd MDL-6196 minor related cleanup - should not be needed to backport it 2007-03-08 00:08:26 +00:00
pichetp 75889b48e3 improvements in calculated question interface MDL-8389 2007-03-08 00:05:27 +00:00
skodak d9571844fc MDL-6196 infinite loop in header encoding when using some site charsets (gb18030) 2007-03-08 00:03:09 +00:00
pichetp 30cdc044f7 adding a null, line 21 MDL-8806 2007-03-07 19:24:10 +00:00
nfreear f4f53da543 Fixes MDL-8531 "Groups icons are no longer being uploaded" (merged from HEAD). 2007-03-07 19:10:42 +00:00
pichetp d8b405fda9 correcting </divt> to </div>line 30 of mod/quiz/index.php 2007-03-07 15:02:13 +00:00
moodler 2237ea1c13 Petr's patch for MDL-8385 with only one minor change to clear the cache in require_login.
It's working OK for me in my tests now but I'm checking in to test further on a wider range of sites.

Thanks Petr!   :-)
2007-03-07 13:31:21 +00:00
skodak ad961eab24 fixed unassigning to use standard function in get_legacy_type(); backported from HEAD 2007-03-07 09:46:23 +00:00
urs_hunkler e92c4dcb0a removed commented old block widths definitions 2007-03-07 09:45:09 +00:00
urs_hunkler 52a84d9eb8 'block width definition did not work any more, needs to come after config.php is loaded' 2007-03-07 09:32:43 +00:00
moodler 64a6329f61 Some small changes to avoid notices 2007-03-07 07:49:03 +00:00
nicolasconnault 86c91b1210 MDL-8787 - Created new help file for News Forum Type, and overrode the help button for the forum type select in mod_form.php 2007-03-07 07:10:20 +00:00
toyomoyo 88dd35ee8e do not force parents to enrol 2007-03-07 06:22:04 +00:00
moodler b47bbe5255 Fixes to remove timestart and timeend from consideration when loading user capabilities
Instead, we delete role assignments in cron

This is resulting in a great speed increase!     MDL-8785

Thanks Eloy for the idea!
2007-03-07 04:54:57 +00:00
moodler 7a258d4168 FIxed up footer display of this block 2007-03-07 02:01:27 +00:00
nicolasconnault 4eaf16f264 MDL-8758 - Corrected the packagezip -> package.zip typo in 3 locations (2 in admin/langimport.php and 1 in install.php). The notification about allow_url_fopen has already been added to the default lang/en_utf8/error.php string. 2007-03-07 01:59:38 +00:00
toyomoyo 40242aaa8f fixing hidden teacher upgrade 2007-03-07 01:34:44 +00:00
nicolasconnault 1ad36c7821 MDL-2974 - Corrected notification of correctly entered new category with multilang display 2007-03-07 01:22:01 +00:00
skodak ba1d266228 MDL-8777 Failing setup_lang_from_browser if lang contains dash; user lang preference not respected; backported from HEAD 2007-03-06 23:53:18 +00:00
skodak 84bf769f6b MDL-8777 Failing setup_lang_from_browser if lang contains dash; backported from HEAD 2007-03-06 22:34:19 +00:00
skodak 80546a1195 MDL-7633 legacy capabilities now have special menu; backported from HEAD 2007-03-06 22:03:18 +00:00
skodak 45dd6a2241 MDL-8522 fixed role reset warnings + only one legacy cap type allowed now in each role; backported from HEAD 2007-03-06 19:23:34 +00:00
tjhunt 3b563f5893 MDL-8349 - responses not being filtered in history display. 2007-03-06 18:00:13 +00:00
skodak a33d21b7d9 (MDL-8745) prevent cannot logon trouble after update to 1.8; backported from HEAD 2007-03-06 16:58:53 +00:00
moodler b2ee750780 Some old fix for layout in recentactivity 2007-03-06 14:24:12 +00:00
moodler e53a867fa4 A few small fixes related to efficiency etc MDL-8767 2007-03-06 12:53:17 +00:00
skodak 3c5ecd5859 MDL-8765 user preference usage cleanup; backported from HEAD 2007-03-06 10:48:12 +00:00
tjhunt b332877b96 Add a couple more plugin types to get_string that Martin missed yesterday. 2007-03-06 07:57:13 +00:00
nicolasconnault 0ac94304fc MDL-8759 - Unset $USER 2007-03-06 06:10:34 +00:00
nicolasconnault 4e59cc4453 MDL-8771 - Restricted has_capability() sanity checks to DEVELOPER debug mode 2007-03-06 05:31:45 +00:00
toyomoyo 4a6638f689 missing user info 2007-03-06 05:15:09 +00:00
nicolasconnault e699a73bf4 Stub for a web-based integration test 2007-03-06 05:08:28 +00:00
nicolasconnault be19968cb3 Upgraded weblib::format_string() so it accepts unicode htmlentities. Also added more unit tests, including a stub for an integration web-based test. 2007-03-06 05:01:24 +00:00
moodler a2d608daf9 Fix for separate groups / all groups view MDL-8300 2007-03-06 04:28:45 +00:00
nicolasconnault 0b2db6dca0 MDL-8691 - Finally found the source of the error and fixed it. Add to apply s(format_string($week_summary)) on the optgroup's label. 2007-03-06 02:54:21 +00:00
skodak d9f6fdc21e MDL-8690 popup form now uses div instead of invisible fieldset 2007-03-05 21:41:14 +00:00
skodak a6109173a2 MDL-7693 fixed participans block on frontpage; notloggedin and authenticated roles overrides to be fixed later in separate bug 2007-03-05 20:09:55 +00:00
skodak c522818828 backporting whitespace and comments from HEAD 2007-03-05 20:03:44 +00:00
skodak 59316ec573 MDL-8765 user preference code cleanup 2007-03-05 19:57:12 +00:00
stronk7 4d4e0c7d3d Normalizing encoding by using textlib synonyms - parse_charset()
Credit goes to Petr.
2007-03-05 18:26:11 +00:00
tjhunt 196b6f3918 MDL-8764 - In menus, show question categories from this course first, then published categories from other courses. 2007-03-05 18:05:39 +00:00
nfreear e747435fcd Follow-up fix 2 for MDL-8507 "Local language pack-..." - Content-Language header (merged from HEAD). 2007-03-05 15:40:01 +00:00
moodler dcdb86c08a RSS enclosures now use main mimetypes file 2007-03-05 15:21:20 +00:00
moodler a396bc7d75 Added new string locations for plugins 2007-03-05 12:25:47 +00:00
skodak c1e4fa8fbf MDL-8756 fixed weeked days defaults 2007-03-05 11:56:15 +00:00
skodak 011d1af528 MDL-8524 general roles cleanup; MDL-8373 authenticated user role now created during upgrade from 1.7.x, xhtml and CSS cleanup in roles GUI; accesslib inline docs cleanup; risk bitmask fixes - backported from HEAD 2007-03-05 11:37:54 +00:00
pichetp 62e3a52588 stopping enter key side effects MDL-8389 2007-03-05 08:11:07 +00:00
donal72 461594cc72 Mnet: Permit 1.8 upgrade to continue, even if duplicate usernames exist in the user table. 2007-03-05 07:47:09 +00:00
moodler ecfecb994d Fixed up tabs some more, to avoid silly tabs that don't exist 2007-03-05 07:27:10 +00:00
moodler 1a5c004e96 Whoops accidentally checked insome head stuff I shouldn have. 2007-03-05 07:21:10 +00:00
moodler 8730f7dd53 Alternate fix for tabs, make it like head 2007-03-05 07:19:11 +00:00
moodler 0b22495f37 Tidied up tabs and template display 2007-03-05 07:15:23 +00:00
moodler 7aa951a2cc Use referer function 2007-03-05 05:57:41 +00:00
moodler 2fc29c74ab Fixed a notice when no REFERER was present 2007-03-05 05:46:35 +00:00
moodler c2a4225d1d Show cost info on info pages MDL-8318 2007-03-05 05:38:46 +00:00
moodler 31e1d6582c XHTML fixes for course/info.php to make it usable MDL-8755 2007-03-05 05:35:41 +00:00
donal72 ca4f8f38b3 XHTML Strict fix: # MDL-8754 2007-03-05 05:03:36 +00:00
moodler a8d101b5c4 Fixed a small notice 2007-03-05 04:46:29 +00:00
moodler 1235148f9f MOre little group tweaks MDL-8741 2007-03-05 02:52:02 +00:00
moodler a734c1f59f Undoing some of my previous fixes, which are better fixed by the change to groupmode() just made
MDL-8741
2007-03-05 02:14:14 +00:00
moodler 917aaad1a2 FIxed user picture size in messaging 2007-03-05 01:53:21 +00:00
moodler f4f655747d Further fix for groups support in forum MDL-8741 2007-03-05 01:48:13 +00:00
skodak b8b21c5d2a fomrat_string() tuning - memory, speed and accuracy in cron; backported from HEAD 2007-03-04 22:59:26 +00:00
skodak 1b94c6e4b7 fomrat_string() tuning - memory, speed and accuracy in cron; backported from HEAD 2007-03-04 22:53:46 +00:00
stronk7 6bfdf6cd1e re-re-re-re-fixing tabs for wood. :-P 2007-03-04 20:10:27 +00:00
urs_hunkler 9908a3f5a1 'MDL-8747 - added .buttons form div {display:inline} to aligen buttons beside each other' 2007-03-04 19:16:29 +00:00
urs_hunkler 211d5844d4 made tab gifs higher to give better display when font size is changed 2007-03-04 17:12:09 +00:00
urs_hunkler cd784f2438 made tab gifs higher to give better display when font size is changed 2007-03-04 17:10:34 +00:00
urs_hunkler 45e3b380d2 made tab gifs higher to give better display when font size is changed 2007-03-04 17:04:49 +00:00
urs_hunkler fabf55370a 'CSS for tabs changed to resolve IE6 + 7 tabs issues' 2007-03-04 16:59:17 +00:00
urs_hunkler c0b6773831 'convert_tree_to_html changed to resolve IE6 + 7 tabs issues' 2007-03-04 16:58:09 +00:00
urs_hunkler 74fefb48d5 'convert_tree_to_html changed to resolve IE6 + 7 issues' 2007-03-04 16:57:04 +00:00
moodler f138d59dba JUst fixing white space 2007-03-04 07:49:40 +00:00
moodler 7252b5889b If course groupmode is not forced, then we allow groups to mingle in forums. MDL-8741 2007-03-04 07:34:21 +00:00
moodler 0af074a894 Removed align-middle from group pics MDL-7861 2007-03-04 06:31:13 +00:00
moodler fa8452c1d7 Re-did fix for MDL-8385 performance problem 2007-03-04 05:40:45 +00:00
moodler 81de2d85a6 Automatic installer.php lang files by installer_builder (20070304) 2007-03-04 03:43:53 +00:00
gbateson 09182fa82d set JQuiz[7]=false, to fix checking answers for JQuiz Hybrid questions when in ShortAnswer mode 2007-03-04 01:22:19 +00:00
skodak 4e50a79a26 MDL-8522 Add role reset button into role definition form; fixed single button css; backported from HEAD 2007-03-03 22:32:59 +00:00
skodak b5820d9add MDL-8523 Show default capabilities in role definition; added CSS popup_form spacing; backported from HEAD 2007-03-03 21:09:56 +00:00
skodak a8ec259abf MDL-8733 fixed approving logic when editing; merged from MOODLE_16_STABLE 2007-03-03 12:27:02 +00:00
pichetp a62af9c397 don't allow null answers to be saved MDL-8475 2007-03-03 04:38:38 +00:00
pichetp ce53b30a7a correcting feedback comments display MDL-8588 2007-03-03 03:32:34 +00:00
skodak 9416fe3a9c notice_yesno install time fixes; backported from HEAD 2007-03-02 20:48:03 +00:00
pichetp b3cbec74d9 grading correctly small values 1e-24 MDL-8478 2007-03-02 20:40:52 +00:00
skodak 718ffbfb63 MDL-8690 fixed regression in notice_yesno ; backported from HEAD 2007-03-02 20:00:36 +00:00
skodak cc00f2763f MDL-8578 new capability for adding and replying to news in forum; backported from HEAD 2007-03-02 19:44:09 +00:00
skodak f10451c414 sesskey added to logout.php MDL-8727 ; backported from HEAD 2007-03-02 16:54:38 +00:00
pichetp 562dc5fdda changing MAX to MIN so that there is an item for each datasets MDL-8552 and 6777
could (will) be merged to older versions as this is an old problem
2007-03-02 13:59:46 +00:00
stronk7 e2dfe8bfca Skipping some thousands of require_once() calls because PHP5
is really slow (and heavy) with them. MDL-8700

Merged from MOODLE_17_STABLE
2007-03-02 09:41:22 +00:00
toyomoyo a28ee0a933 adding backward compatibility for question restores 2007-03-02 08:03:47 +00:00
toyomoyo 1fdce070c4 adding a progress bar 2007-03-02 07:57:43 +00:00
nicolasconnault 69d788e2af MDL-8597 - Fixed: weblib.php::print_speller_code was adding CDATA and <script> tags around the code, when this was already done by weblib.php::use_html_editor().
Check lib/editor/htmlarea/htmlarea.class.php for a seemingly duplicated print_speller_code method.
2007-03-02 05:04:38 +00:00
nicolasconnault 15f2ccbbbd Added a fix that Petr made only in HEAD: 2007-03-02 03:15:07 +00:00
moodler 66a988f08e Fixed formatting of title in print_header() (no bug) 2007-03-02 03:13:08 +00:00
nicolasconnault b9a6d9cd1e MDL-7861 - XHTML errors (strict) were found in course/editsection.html and mod/chat/view.php. They were corrected and additional css rules were written to replace the corrected inline styling. 2007-03-02 02:32:39 +00:00
toyomoyo 179fc95c04 changing this back to fieldset 2007-03-02 02:32:28 +00:00
toyomoyo a2182b2420 replacing fieldsets with divs in small forms 2007-03-02 02:16:17 +00:00
toyomoyo 86726446ab fixing indenting 2007-03-02 01:58:20 +00:00
mjollnir_ 3b3b5b4cc5 Merged from MOODLE_16_STABLE: fixing bug MDL-8651: import course data should clean up after itself 2007-03-02 01:43:33 +00:00
toyomoyo db68f9fedf replacing fieldsets with divs for small forms 2007-03-02 01:29:10 +00:00
nicolasconnault ea799baf48 MDL-8697 - Fixed the legacy HTML for the search table 2007-03-02 01:24:47 +00:00
toyomoyo 5bb9d213fe replacing fieldsets with divs in small forms 2007-03-02 01:18:47 +00:00
toyomoyo 2c550eefbd replacing fieldsets with divs for small forms 2007-03-02 01:03:36 +00:00
tjhunt c34b9b9c97 Make error messages non-ambiguous. 2007-03-01 16:41:50 +00:00
tjhunt 3ee2c02ec3 Make error messages non-ambiguous. 2007-03-01 16:41:43 +00:00
poltawski 59900bd490 Duplicate alt tags in course category page MDL-8711 2007-03-01 14:47:09 +00:00
nfreear c40999b0b6 Fixes Bug MDL-8709 "Javascript: pseudo-protocol in admin tree block is bad" merged from HEAD. 2007-03-01 13:08:48 +00:00
nfreear 36be64d1da Fix for bug MDL-8708 "Debug, multiple warnings in admin/uploaduser.php and user.php" (merged from HEAD). 2007-03-01 12:10:16 +00:00
nfreear 54e296b115 Follow-up fix for Bug MDL-8617 "Implement groupings & course modules..." internal - define, any_grouping=0. 2007-03-01 11:42:37 +00:00
nfreear 20ed8a7215 Follow-up fix for Bug MDL-8617 "Implement groupings & course modules..." internal (sam's patch, thank you!) 2007-03-01 11:33:35 +00:00
nfreear 504af96b2e Follow-up fix for Bug MDL-8617 "Implement groupings & course modules..." internal (sam's patch). 2007-03-01 11:32:04 +00:00
nfreear f1b29e2e69 Fixes MDL-6548 "... block should use lists" - blocks: blog tags, news items, recent activity - forum (merged from HEAD). 2007-03-01 11:17:33 +00:00
tjhunt 7c1fb23156 MDL-6773 - eliminate duplicate code for getting a list of question categories. 2007-03-01 09:45:19 +00:00
moodler 31eb4b15b8 Fixed unenrol_student MDL-8591 2007-03-01 08:05:12 +00:00
moodler 826ea2ba9a Don't redirect guests to mymoodle page! MDL-8594 2007-03-01 07:57:57 +00:00
toyomoyo 83dbd468f9 replacing fieldsets with divs in small forms 2007-03-01 07:45:06 +00:00
jamiesensei 68696f6aa8 fix to MDL-8659 Impossible to create Cloze type question in Moodle 1.8 beta 2007-03-01 07:40:25 +00:00
nicolasconnault b7e97fcc73 MDL-8693 Fixed the double-equal typos (2) 2007-03-01 07:33:01 +00:00
toyomoyo a836952539 replacing fieldsets with divs in small forms 2007-03-01 07:28:19 +00:00
defacer ba34f3372d Merging from MOODLE_16_STABLE:
Fix for MDL-8515: Prefixing chat messages with a slash should not hide the
user's name unless it's a special command we handle.

I completely removed the emoticon handling case, but it seems like it was
not needed for a long time now? Emoticons work just fine without it.
2007-03-01 07:18:32 +00:00
toyomoyo d6fd65c9c9 replacing fieldsets with divs in small forms 2007-03-01 06:57:03 +00:00
toyomoyo ed6df9192e replacing fieldsets with divs in small forms 2007-03-01 06:32:35 +00:00
toyomoyo 727c9ec658 replacing fieldsets with divs in small forms 2007-03-01 06:26:30 +00:00
toyomoyo 562a703ffd replacing fieldsets with divs in small forms 2007-03-01 06:05:22 +00:00
nicolasconnault 1bd32f7b63 MDL-8629 - Outputting correct messages during redirection after forum posting with mail-now selected 2007-03-01 05:59:46 +00:00
toyomoyo 19c8c196b2 replacing fieldsets with divs in small forms 2007-03-01 05:53:08 +00:00
toyomoyo 233fd3da0b fixing javascript error MDL-8652 2007-03-01 05:47:29 +00:00
toyomoyo 0f3a1c9382 replacing fieldset in small forms with divs 2007-03-01 05:36:50 +00:00
nicolasconnault d9fc0fc2ad MDL-8691
Added format_string() around $course->shortname in calendar.view.php
2007-03-01 05:14:27 +00:00
toyomoyo af8e80ec8a replacing fieldset in small forms with divs 2007-03-01 05:09:41 +00:00
toyomoyo c5150fe5a9 replacing fieldset with div for small forms 2007-03-01 05:02:45 +00:00
toyomoyo 09eb304cf7 replacing fieldset in small form to div 2007-03-01 04:40:38 +00:00
nicolasconnault 14b9196e8d MDL-8697 Moved inline text-align:right to stylesheet, and removed table and td text-align: center 2007-03-01 04:40:19 +00:00
toyomoyo fdefa7ef01 replacing single button fiedlsets with divs 2007-03-01 04:30:35 +00:00
nicolasconnault 9abd181aee Issue MDL-8697
Someone must have fixed this earlier, because there are no more tables. However I found the use of the align attribute which I replaced with inline CSS style=\"text-align:right\"
2007-03-01 04:07:29 +00:00
toyomoyo 2b7a363f02 changing fieldset to div 2007-03-01 04:06:14 +00:00
toyomoyo e85a202ba3 chaing fieldset in single button form to use div 2007-03-01 04:03:01 +00:00
nicolasconnault 3056105182 MDL-8701 2007-03-01 02:54:20 +00:00
toyomoyo 7c596baca7 fixing xhtml issue 2007-03-01 02:46:55 +00:00
toyomoyo ef3df6f086 fixing xhtml strict issues and display issues in restore 2007-03-01 02:44:29 +00:00
moodler 9e0c47a5bc Changed course formats to use the new ajaxenabled() so that only tested browsers are enabled. MDL-8417 2007-03-01 02:39:45 +00:00
nicolasconnault 8e4e1d73bd *** empty log message *** 2007-03-01 02:37:42 +00:00
nicolasconnault 052fdabdbd Issue 8417:
Added support for array of tested browsers to be passed to ajaxenabled()
2007-03-01 02:04:44 +00:00
nicolasconnault b336fbda27 Safari 2.0 and Opera 9.0 are now detected and supported for YUI. However, preliminary tests show that drag&drop behaviour is very slow on Opera and user-unfriendly on both browsers. A YUI debug window also pops up on Safari.
I added a unit test for ajaxlib.php

Issue MDL-8417
2007-03-01 01:16:48 +00:00
nfreear ae2ed9974a Fixes bug MDL-8695 "Form 'required' icon is hidden", see commit 13 Jan (merged from HEAD.) 2007-02-28 18:14:18 +00:00
tjhunt 28e9a6e43c When restoring numerical questions, don't create duplicate unit definitions. 2007-02-28 17:18:14 +00:00
tjhunt 1d0a5c8ff5 Improve validation code to match the recent improvements in shortanswer validation.
Also do some validation on the units entered to stop duplicate units being defined.
2007-02-28 17:16:44 +00:00
tjhunt 19623c973c Minor improvement to validation code. 2007-02-28 17:15:23 +00:00
poltawski c2b7ac3fb7 More fixes for MDL-8582 2007-02-28 16:15:36 +00:00
tjhunt 76b58ae598 XHTML Strrrrrrict! 2007-02-28 15:35:02 +00:00
tjhunt 6fce318ec5 Bug with editing essay questions. 2007-02-28 15:21:41 +00:00
tjhunt e3455f160a Remove CVS conflict markers. 2007-02-28 15:16:12 +00:00
tjhunt 95e5c19295 Remove CVS confilt markers. 2007-02-28 15:11:54 +00:00
nfreear a78af87881 Partial fix for MDL-8668 - group upgrade - applying part of the patch (merged from HEAD). 2007-02-28 13:39:11 +00:00
tjhunt 34949d8dcb XHTML Strrrrrrict! on quiz module config page.
Fix errors when config changes are saved.
2007-02-28 12:24:39 +00:00
tjhunt 1589c98c56 Correct logic for stopping people using guest access from doing quizzes. 2007-02-28 11:34:36 +00:00
toyomoyo 68060caee6 replacing <fieldset> with <div> 2007-02-28 08:00:45 +00:00
moodler 4089c20bd1 Just added an ID tag 2007-02-28 07:58:01 +00:00
nicolasconnault cbc2417b31 Added tests for moodlelib::check_browser_version (MDL-8417)
Need to add more User Agent strings for testing.
2007-02-28 07:40:39 +00:00
nicolasconnault 40e2eda7ae Added support for Opera and Safari in check_browser_version (MDL-8417) 2007-02-28 07:39:46 +00:00
toyomoyo 414c6bd2e7 fix for MDL-8655, replacing <fieldset> with <div> to remove display problems 2007-02-28 07:10:58 +00:00
toyomoyo 8732dca153 fix for MDL-8688, question pics should default to '' 2007-02-28 06:15:23 +00:00
nicolasconnault 7c08ef3653 Fixed MDL-8582
Not sure if the hotpot module is converting ampersands correctly. $heading and $title are set up differently than in other modules: instead of outputting $course->title, a temporary $title variable is created and assigned that value. That made it difficult for me to decide whether it was already formatted elsewhere or not.

Also I didn't format_string() any of the variables included in $navigation rings, because I assume these strings get processed by print_navigation(), which includes format_string().
2007-02-28 05:36:13 +00:00
gbateson e696821ea4 redo changes for 8062: replace "document.form" with "document.getELementById('form')" 2007-02-28 05:15:13 +00:00
gbateson cb8e73e2c7 redo change for MDL-8675: remove superfluous double-quote 2007-02-28 05:05:42 +00:00
toyomoyo d6693a3400 fix for MDL-8576,MDL-8686, changing <fieldset> to <div> to solve display issues 2007-02-28 04:56:27 +00:00
gbateson 104189c1f4 cogmitting merged changes for lib.php (MDL-8675) and mod.html(MDL-8062) 2007-02-28 04:41:46 +00:00
toyomoyo a727be0829 fixing insert_instance so that it can comply with the formslib form 2007-02-28 04:11:05 +00:00
gbateson 083dad4922 corrected typo (superfluous double-quote) when inserting $CFG->frametarget (see MDL-8675) 2007-02-28 03:29:29 +00:00
gbateson 9f60b599b9 replace document.form with document.forms[form], because <form> now uses an "id" instead of a "name" attribute. (see MDL-8062) 2007-02-28 03:26:33 +00:00
toyomoyo 1b98048119 fix for MDL-8645, assignment due dates not written to db 2007-02-28 03:24:43 +00:00
martinlanghoff 74f350d482 MDL-7385 - stats_cron_daily() - If a module is missing, continue processing 2007-02-28 03:04:24 +00:00
martinlanghoff 042117ea4f Fixing MDL-6795 - Stats never runs. stats_monthly table gets very full - avoid double tz calculations in stats_getmidnight() 2007-02-28 02:51:26 +00:00
martinlanghoff 7ac2e04a44 Stopping warning and possible errors in graphlib.php caused by bugs in statsgraph.php
Ported from LDC (1.5) branch


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


Author: Andrew Walbran <andrew.walbran@catalyst.net.nz>
2007-02-28 00:28:58 +00:00
martinlanghoff bec90d263d (Fixing upgrade script) Only try to disable lams if it is installed
Author: Andrew Walbran <andrew.walbran@catalyst.net.nz>
2007-02-28 00:26:20 +00:00
martinlanghoff 9920530563 Fixing 1.5->1.7 upgrade bug (get_courses was used unnecessarily in upgrade process, and relies on roles)
Author: Andrew Walbran <andrew.walbran@catalyst.net.nz>
2007-02-28 00:20:48 +00:00
stronk7 63513603e7 Fixing RSS link to source. http://moodle.org/mod/forum/discuss.php?d=65762
Merged from MOODLE_17_STABLE
2007-02-27 18:21:08 +00:00
tjhunt 41d7faf891 MDL-8671 - better checking when creating short answer questions. Fix thanks to Joseph R?zeau. 2007-02-27 16:20:14 +00:00
tjhunt ecec5caee8 MDL-8671 - better checking when creating short answer questions. Fix thanks to Joseph R?zeau. 2007-02-27 16:20:11 +00:00
urs_hunkler 95a3fb3aad '3 changes for better quiz display - MDL-8576' 2007-02-27 15:52:58 +00:00
defacer 04adc7de38 Not needing this anymore, we now have Moodle Docs. 2007-02-27 14:43:09 +00:00
defacer 4854bec6cf Merging from MOODLE_16_STABLE:
Fix for MDL-4701: Event URLs now include anchor so that the event is immediately visible.
2007-02-27 14:35:28 +00:00
defacer 8e74a6eb9e Merging from MOODLE_16_STABLE:
Bugfix: skodak's fix for MDL-5991 is needed here as well.
2007-02-27 13:59:22 +00:00
tjhunt 7a201b247e Improve quiz editing screen layout a little bit based on a usability suggestion in the forums.
Also, fix uppercase tag names in the tab row CSS, which did not work at DEVELOPER debug level.
2007-02-27 13:59:10 +00:00
defacer 437ef94eb2 Changing email addresses that caught my eye in the comments. 2007-02-27 13:49:14 +00:00
gbateson 8e1e849480 removed invalid use of $CFG->frametarget, and restored the original $CFG->framename.(see MDL-8675) 2007-02-27 12:54:11 +00:00
defacer e790b61e38 Merging from MOODLE_17_STABLE:
Fix for MDL-8402:
$CFG->calendar_weekdays wasn't saved correctly and misbehaved.

I took the opportunity to rewrite a little HTML too.
2007-02-27 12:40:37 +00:00
skodak 551f0b5d7e MDL-8669 broken auth signup code; backported from HEAD 2007-02-27 10:25:55 +00:00
urs_hunkler dbd594ed15 'sideblock list alignment corrected for .list line 1025 onward and line 1057. Don't know what .unlist and .inline-list are used for. Somebody should check and correct those if necessary' 2007-02-27 07:42:28 +00:00
toyomoyo ab1736ab1f fixing wrong capability check 2007-02-27 05:46:57 +00:00
toyomoyo 9f39ff6d96 fix for MDL-8666, groups import broken 2007-02-27 05:40:05 +00:00
toyomoyo 96f56bc4ff fix for MDL-8674, fixing real player multimedia filter 2007-02-27 05:25:35 +00:00
nicolasconnault 5d4c573887 Corrected end of line delimiters 2007-02-27 05:05:39 +00:00
nicolasconnault f1ad20d929 Fixed 2 typos identified by Dan (guset instead of guest). MDL-8676 2007-02-27 04:20:26 +00:00
moodler bf522dad40 Checking in Dan's patch for MDL-8670, thanks Dan! 2007-02-27 00:58:47 +00:00
defacer 2273ddbb27 Merged from MOODLE_17_STABLE:
Bugfix: $CFG->calendar_adminseesall was not working at all, Moodle behaved
as if it were always on. Reported at http://moodle.org/mod/forum/discuss.php?d=65500.
2007-02-27 00:37:35 +00:00
andreabix 5f70ddb676 Added string for 'Hide All courses' setting. 2007-02-26 15:13:05 +00:00
defacer a8088232b1 Fixing notices, I should 've done grep "BLOCK_TYPE_NUKE" earlier. 2007-02-26 13:58:14 +00:00
defacer ff1b96e9f0 Killing BLOCK_NUKE constant, since Martin nuked nuke blocks. 2007-02-26 13:26:56 +00:00
nfreear 7ccb369f67 Follow-up fix for Bug MDL-8638 "Can't move groups between groupings" (merged from HEAD.) 2007-02-26 10:57:31 +00:00
moodler 2eb638be81 Added feature is an admin config to hide the "all courses" link from users ...
Eloy wrote this I belive.  I've not tested this well .... Andrea will.
2007-02-26 08:51:22 +00:00
nicolasconnault 2ded7bc2eb Fixed MDL-8654: Added a few missing language strings. The patch attached to this issue also contained a string to be removed from moodle.php, but I didn't apply it. 2007-02-26 07:12:50 +00:00
jamiesensei c799044c2c fix for (MDL-8449) Quiz start and close times should allow the teacher to select a time as well as a date. 2007-02-26 06:32:15 +00:00
moodler 660d3b9530 Automatic installer.php lang files by installer_builder (20070226) 2007-02-26 03:42:03 +00:00
toyomoyo 0a6a753a7f taking care of context_rel cache when moving a course across categories 2007-02-26 02:33:41 +00:00
mjollnir_ 1c7166a8d4 merged from MOODLE_17_STABLE: fixing MDL-8662 2007-02-26 00:18:29 +00:00
stronk7 71989c5d39 Delete one condition used while debugging.
Merged from HEAD
2007-02-25 20:37:33 +00:00
stronk7 5066b1258c Comenting one debug sentence introduced by error in las commit. MDL-8264 2007-02-25 20:21:44 +00:00
stronk7 9c221df743 Now the editor detects if the xml file has been locally modified
since loading it. Second part of MDL-8264
2007-02-25 20:17:36 +00:00
moodler 47fcfc7317 Tidied up alignment of category counts MDL-8583 2007-02-25 07:07:08 +00:00
defacer ffeeed9b32 Fix for MDL-8653:
When updating languages through a proxy, skip to the end of the HTTP headers
as defined by RFC 1945 instead of skipping exactly 12 lines of chaff.

Credit for patch 100% to Dan Poltawski.
2007-02-25 01:31:56 +00:00
defacer f943a78cbe Updating local language packs was breaking XHTML in the "results" screen. 2007-02-25 01:07:52 +00:00
defacer 0e2b6268f0 Merged from MOODLE_16_STABLE:
Fix for MDL-4940: Social Activities block disappears when editing course settings.
2007-02-24 23:31:22 +00:00
skodak 8e0b21b0b2 MDL-8582 - reverted changes in print_navigation(), needs some minor rewrite to use print_title(); backported from HEAD 2007-02-24 10:20:35 +00:00
skodak 45864cc86e email selfregistration enabled by default again - thanks Eloy for noticing the problem; backported from HEAD 2007-02-24 09:49:51 +00:00
moodler ef8197d3af Automatic installer.php lang files by installer_builder (20070224) 2007-02-24 03:39:50 +00:00
stronk7 686bbac879 Only validate against schema if we have a schema. ;-) 2007-02-23 23:56:55 +00:00
stronk7 9ee705e74a Now XMLDB Editor performs check/validation of XML files
before loading them using the best parser available.
MDL-7726 and first part of MDL-8264
2007-02-23 20:57:06 +00:00
skodak a453501cdc MDL-8639 fixed installation notices; backported from HEAD 2007-02-23 20:26:20 +00:00
mark-nielsen af4a1292af Fixed the width of the box 2007-02-23 20:17:36 +00:00
mark-nielsen a5c3aabca8 Fixed some major display issues casued by the fieldset with class invisiblefieldset 2007-02-23 20:12:07 +00:00
skodak e0d92ff281 MDL-8582 - reverted changes in s() and added new function format_title() instead; backported from HEAD 2007-02-23 20:11:21 +00:00
mark-nielsen 03abe79e77 [Fixed] MDL-8609: Fieldset was added incorrectly causing the branch table buttons to "hide" 2007-02-23 19:23:15 +00:00
mark-nielsen b17d944267 Continued fix for MDL-8610 2007-02-23 18:54:27 +00:00
mark-nielsen 7aecee0977 [Fixed] MDL-8610: Updated code to work with the new tab API 2007-02-23 18:39:13 +00:00
stronk7 9988588aed Some more notices are now out. Caused by current_language() 2007-02-23 18:15:56 +00:00
mark-nielsen a7bd7637b4 Merged in fix for MDL-8637 2007-02-23 17:55:26 +00:00
nfreear dea80d1f30 Fixes MDL-8638 "Can't move groups between groupings" (merged from HEAD). 2007-02-23 17:50:15 +00:00
stronk7 60eaa2e72d Fixing course & category boxes in main page. 2007-02-23 16:38:10 +00:00
skodak 3364157a4b removed deprecated flag from addslashes_js() MDL-8582 and some more backporting from HEAD 2007-02-23 09:19:11 +00:00
moodler 7d728003ae Some beautification fixes for MDL-8583 2007-02-23 08:17:54 +00:00
moodler d1451e4f0e Cleaned up some strings for LDAP enrolment 2007-02-23 06:54:24 +00:00
moodler 0bc4168200 Fixed up some padding MDL-8285 2007-02-23 06:45:42 +00:00
moodler 6c6f7c851b Fixed missing strings etc on the database authentication settings page MDL-8285 2007-02-23 06:43:01 +00:00
toyomoyo 4bba5a6f44 fix for MDL-8582, adding s() to $title in print_header() 2007-02-23 05:57:58 +00:00
toyomoyo 4404eb3b01 removing 2 s() calls as they cause problems in header for survey 2007-02-23 05:45:53 +00:00
toyomoyo a65d282818 fix for MDL-8582, adding s() to course_list block 2007-02-23 05:44:36 +00:00
toyomoyo 8aee86e196 taking out s() on header 2007-02-23 05:22:22 +00:00
toyomoyo afb3efd947 checking in nick's patch for MDL-8582 2007-02-23 05:05:56 +00:00
toyomoyo 4987fdbaef fix for MDL-5736, retained search string problem 2007-02-23 03:54:49 +00:00
defacer 8f83745255 Merged from HEAD:
Fixing ugly blue border around help icon during installation
2007-02-23 01:44:22 +00:00
defacer 2f6b6e9241 Merging from HEAD:
Fixing a few tons of notices when installing
if error_reporting = E_ALL in php.ini.
2007-02-23 01:37:20 +00:00
toyomoyo 577a9f5805 fix for MDL-8585, add admin setting for $CFG->latinexcelexport 2007-02-23 01:22:15 +00:00
stronk7 7f871f939b Fix one small config name. 2007-02-23 00:35:20 +00:00
stronk7 73da033354 Now the "common settings" form in admin/auth looks like
one standard admin form.
2007-02-23 00:25:55 +00:00
stronk7 b94129bc1c Fixing the auth plugins visual. to use the flexible table properly. 2007-02-22 22:59:47 +00:00
skodak e8c5ac5251 MDL-8590 auth cleanup - reset password cleanup+fixes; backported from HEAD 2007-02-22 22:25:18 +00:00
koenr de4add7e1e fixed two typo's 2007-02-22 20:44:54 +00:00
stronk7 617ef2a336 "flexible" is now out from set_attribute() because
flexible tables are adding it automatically.
Point 3.3 of MDL-8419
2007-02-22 18:47:18 +00:00
stronk7 a55eff0fab All flexible tables will have the "flexible" class. Point 3.1 of MDL-8419 2007-02-22 18:25:21 +00:00
stronk7 a081748db4 admin modules tables styling. Points 1 & 2. MDL-8419
Backporting from HEAD.
2007-02-22 17:55:46 +00:00
sam_marshall d0afc97d3e MDL-8621 Fixed wiki locking 2007-02-22 17:46:13 +00:00
nfreear 4f7e719598 Fixes for Bug MDL-8617 "Implement groupings & course modules..." - localised mods (merged from HEAD). 2007-02-22 15:40:28 +00:00
toyomoyo ad2f4cff93 fix for MDL-8577, message textarea too big to fit 2007-02-22 03:21:49 +00:00
skodak 8bd763d2da MDL-8590 auth cleanup - part 8; backported from HEAD 2007-02-21 21:57:09 +00:00
skodak ea40ec3c8f MDL-8590 auth cleanup - part 7 and MDL-8598; backported from HEAD 2007-02-21 21:52:31 +00:00
skodak 20f2564695 MDL-8590 auth cleanup - part 6; backported from HEAD 2007-02-21 21:45:14 +00:00
thepurpleblob cc01353321 MDL-8602
Don't count modules where course=0 (ie, they must exist in real courses)
2007-02-21 14:54:18 +00:00
thepurpleblob 9cf078114f MDL-8563
$question->answer was swapped for $question->correctanswer in questiontype
for some reason! Compensated for in format type.
2007-02-21 14:18:41 +00:00
thepurpleblob 0542e675b9 D'oh - counting $totalcount wrongly (duplicate courses are ignored) 2007-02-21 13:08:27 +00:00
thepurpleblob 3cae7304e5 Slightly more helpful message if no courses can be shown. 2007-02-21 13:02:26 +00:00
thepurpleblob 59194f400e Whoops... missed setting $totalcount var 2007-02-21 11:56:34 +00:00
thepurpleblob 7577a51e48 MDL-8087
Modules and Blocks lists now link to course search page for
actual instances.
2007-02-21 11:41:39 +00:00
nfreear cd735125df Followup fix for Bug MDL-8507 "Local language pack-name can appear in language code" (Merged from HEAD). 2007-02-21 10:47:02 +00:00
stronk7 c6ce18c221 Bump to 1.8 Beta 2007-02-21 08:31:44 +00:00
urs_hunkler 4b8a063ad3 corrected hover gif on right side 2007-02-21 07:54:37 +00:00
toyomoyo 545fa9f30f replacing a trouble making fieldset with div 2007-02-21 00:58:49 +00:00
urs_hunkler 73de424b0b 'some tab display enhancements' 2007-02-20 21:01:23 +00:00
urs_hunkler 9bfb8bdbe3 'removed the uh changes comments' 2007-02-20 20:19:17 +00:00
skodak 154965a441 MDL-8590 auth cleanup - part 5; backported from HEAD 2007-02-20 17:31:37 +00:00
skodak 4b5fbbed17 MDL-8590 auth cleanup - part 4; backported from HEAD 2007-02-20 17:28:44 +00:00
skodak a2d6e38bd9 MDL-8590 auth cleanup - part 3; backported from HEAD 2007-02-20 17:23:08 +00:00
skodak 4ac48edb9b MDL-8590 auth cleanup - part 2; backported from HEAD 2007-02-20 17:13:35 +00:00
skodak 9f9743cb88 MDL-8590 auth cleanup - part 1; backported from HEAD 2007-02-20 17:06:47 +00:00
skodak 255e7cc375 file auth.php was added on branch MOODLE_18_STABLE on 2007-02-20 17:06:48 +0000 2007-02-20 17:03:43 +00:00
tjhunt 1c63d8955d Another wretched adslashes problem. Roll on placeholder. Thanks to Howard Miller. Merged from MOODLE_17_STABLE. 2007-02-20 15:18:22 +00:00
donal72 b74a216ad1 MNet goes from ISO8859-1 -> UTF-8; #MDL-8514 MDL-8514 2007-02-20 02:05:31 +00:00
lamsdev 41a5673659 Fixed javascript to be valid xhtml strict 2007-02-20 01:48:22 +00:00
tjhunt 56e1965f4f MDL-4793 - Option to show question text in the question bank. Also, fix layout problems on the quiz editing screen. 2007-02-20 01:46:01 +00:00
lamsdev d1e3c0f2ec Changed from using lib/soap/nusoap.lib library directly to using lib/soaplib.php.
Fix for MDL-6224
2007-02-20 01:11:45 +00:00
toyomoyo 7b8c690ecf applying nick's patch to MDL-8534, typo in restorelib.php 2007-02-20 01:06:20 +00:00
stronk7 f800bf46f6 Changing iso-8859-1 encoding of excel files to windows-1252. It adds support for
some more (a few) characters. MDL-7993

Merged from MOODLE_17_STABLE
2007-02-19 23:23:50 +00:00
nfreear fdcabcb3f1 Followup fix for Bug MDL-8434 "...can't delete groups" - delete _groupings_ (merged from HEAD). 2007-02-19 16:41:40 +00:00
moodler 28b7f29fbc Removed raquo from continue buttons MDL-8528 2007-02-19 13:33:56 +00:00
ethem 7575a38529 Removed unnecesary code. 2007-02-19 12:07:06 +00:00
jmg324 ca57f3dd0d MDL-8571 fixing broken links in help index 2007-02-19 11:38:55 +00:00
skodak c819e5cadd MDL-8570 broken flv player embedding and outdate player; backported from HEAD 2007-02-19 11:30:08 +00:00
tjhunt 872964f140 MDL-8145 - Add more options to the add random questions dropdown. 2007-02-19 04:24:02 +00:00
moodler 28a1d6e3c9 Automatic installer.php lang files by installer_builder (20070219) 2007-02-19 03:36:24 +00:00
moodler fc1e2380e4 SMall formatting fix, no code change 2007-02-19 02:27:55 +00:00
skodak eada4f02cc MDL-8560 Chameleon not loading pix list on start page; backported from HEAD 2007-02-18 13:01:42 +00:00
moodler 70cf311253 Fixed selector menus and strings etc at the top MDL-8558 2007-02-18 12:58:44 +00:00
moodler b0f625ebf3 I don't know why this function wasn't inheriting automatically but it works now ... 2007-02-18 06:11:41 +00:00
moodler 9c9c50d8ec Fixed a typo causing Feedback to be printed before the header 2007-02-18 05:50:43 +00:00
koenr e2f5df2d6f MDL-8400 Changed currency of peru to Nuevo Sol 2007-02-17 23:37:51 +00:00
tjhunt 3ca50b0dd3 MDL-8154 - Typo in course search code. Fix thanks to Anthony Borrow. 2007-02-17 17:16:50 +00:00
stronk7 1ecce737cc sync_users() now working both under MSSQL and Oracle. Big credits to
Jay Lee for his cool patch about MDL-7525 MDL-8023 MDL-8153
2007-02-17 01:24:16 +00:00
nfreear f882530904 Fixes bug MDL-8059 "... won't restore - error A required parameter (id) was missing" 2007-02-16 15:57:05 +00:00
nfreear 6a800f3825 Fixes bug MDL-8059 "... won't restore - error A required parameter (id) was missing", reapplied martinl's 16/1 Strict fix (merged from HEAD). 2007-02-16 15:55:59 +00:00
nfreear fb6c31f207 Fixes bug MDL-8059 "... won't restore - error A required parameter (id) was missing" (merged from HEAD). 2007-02-16 15:55:34 +00:00
nfreear 3d5bd70fea Fixes Bug MDL-8545 "Restore bugs, groups-members and role assignments" (merged from HEAD) 2007-02-16 14:47:58 +00:00
sam_marshall c32580cea0 MDL-8544 Fixed wiki locking require_js usage 2007-02-16 14:21:13 +00:00
skodak 88178d9b78 MDL-8542 External db auth cleanup
* some more sync script fixing

backported from HEAD
2007-02-16 10:56:21 +00:00
skodak 5553359aa4 MDL-8542 External db auth cleanup
* configurable encoding conversions
* fixed handling of magic quotes
* proper sybase quoting
* adodb debug mode
* fixed language strings
* sha1 support
* connection setup command (use names 'utf8')

backported from HEAD
* mysqli support
* form field labels
* general cleanup and minor fixing
2007-02-16 10:48:07 +00:00
skodak 503fc99f88 added recursive addslashes; backported from HEAD 2007-02-16 09:39:26 +00:00
vyshane ae21a6519b Merged from 1.7. 2007-02-16 08:43:10 +00:00
moodler cfc90a8c60 Automatic installer.php lang files by installer_builder (20070216) 2007-02-16 03:42:00 +00:00
toyomoyo a3572566d3 adding missing capabilities check 2007-02-16 02:40:05 +00:00
toyomoyo c8f324143a fixed wrong context, it should be possible to manage a single block 2007-02-16 01:24:58 +00:00
skodak bf4846358f fixed problem on user edit page when user not fully setup, reverted guest handling; backported from HEAD 2007-02-15 22:04:51 +00:00
skodak e3c1819c36 fixed problem on user edit page when user not fully setup; backported from HEAD 2007-02-15 20:49:06 +00:00
skodak fd95bf5153 fixed problems with undefined $USER->mnethostid causing page errors in IE during logout; backported from HEAD 2007-02-15 20:42:10 +00:00
nfreear 7342c508e7 Fixes Bug MDL-8533 "Can't add a user to more than 1 group in groupings" (merge from HEAD) 2007-02-15 14:55:34 +00:00
skodak d41d24ce4f MDL-7722 fixed wrong cleaning in backup paths; backported from HEAD 2007-02-15 09:45:37 +00:00
toyomoyo 37e936ab77 fix for MDL-8505 and some other assignemnt issues 2007-02-15 08:15:54 +00:00
moodler d8b289ae95 Latest tags 2007-02-15 07:03:11 +00:00
moodler 635b51757a Fixed a typo 2007-02-15 07:00:20 +00:00
moodler b7b0aa01a5 New strings for environment check MDL-8527 2007-02-15 06:32:10 +00:00
moodler 837a9c5c12 Added environment check to all upgrades MDL-8527 2007-02-15 06:29:32 +00:00
vyshane fe0bcf738c Merged from 1.7. 2007-02-15 06:14:00 +00:00
toyomoyo 3d18158bc8 fix for MDL-8517, fixing xhtml error for redirects 2007-02-15 05:10:59 +00:00
toyomoyo 1e35f5f18e fix for MDL-5829, blocks on blog page can not be minimized 2007-02-15 03:20:28 +00:00
moodler c3c9612c1c More fixes for format_time().. I removed weeks because they are a bit of a
language pack problem  (we already have a string 'week' = "Week" which we can not
re-use)
2007-02-15 03:13:32 +00:00
moodler e5da5f70ef FIxed some format_time changes that I checked in accidentally 2007-02-15 02:51:40 +00:00
moodler 864a2b3414 Can now login usefull as someone even if they require password change 2007-02-15 02:42:16 +00:00
stronk7 4eec1cbcee PHP 4 assignment is by value so course_header (containing edited names)
wasn't being modified. MDL-8298

Merged from MOODLE_17_STABLE
2007-02-14 23:51:54 +00:00
skodak d8f605d675 MDL-8268 fixed block get_string, patch by Mark Nielsen; backported from HEAD 2007-02-14 23:01:28 +00:00
skodak b3cac2f0e8 MDL-8268 cleanup in get_user_capability_course(); backported from HEAD 2007-02-14 22:54:03 +00:00
skodak 930eaf9ec8 MDL-8268 fixed get_user_capability_course(), patch by Mark Nielsen; backported from HEAD 2007-02-14 22:49:40 +00:00
skodak b3bef28cc0 notice_yesno() buttons now centered; merged from HEAD 2007-02-14 22:13:14 +00:00
skodak 444014a57e MDL-8520 resource navigation borked by accessibility frame changes; backported from HEAD 2007-02-14 22:07:02 +00:00
skodak 982a81c41f MDL-8519 teamspeak link support in resource mod; backported from HEAD 2007-02-14 21:32:59 +00:00
skodak fd9e9c6404 MDL-8518 incorrect link to frontpage settings from course summary block; backported from HEAD 2007-02-14 21:04:54 +00:00
skodak e8e6e54b7d MDL-8469 - 192M is much nicer than 196M; backported from HEAD 2007-02-14 20:59:14 +00:00
skodak 67faedb211 MDL-8469 increase memory limit everywhere due to changed calculation of used memory in PHP 5.2.x - the real memory useage is the same, but the reported size of used memory is now more accurate; backported from HEAD 2007-02-14 20:54:27 +00:00
1520 changed files with 80353 additions and 65712 deletions
-12256
View File
File diff suppressed because it is too large Load Diff
+156 -120
View File
@@ -7,117 +7,122 @@
*
*/
require_once dirname(dirname(__FILE__)) . '/config.php';
require_once $CFG->libdir . '/tablelib.php';
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/tablelib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('userauthentication', $adminroot);
$action = optional_param('action', '', PARAM_ACTION);
$auth = optional_param('auth', '', PARAM_SAFEDIR);
// get currently installed and enabled auth plugins
$authsavailable = get_list_of_plugins('auth');
if (empty($CFG->auth_plugins_enabled)) {
set_config('auth_plugins_enabled', $CFG->auth);
$CFG->auth_plugins_enabled = $CFG->auth;
}
$authsenabled = explode(',', $CFG->auth_plugins_enabled);
// save form
if ($form = data_submitted()) {
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
}
if (! isset($form->guestloginbutton)) {
$form->guestloginbutton = 1;
}
if (empty($form->alternateloginurl)) {
$form->alternateloginurl = '';
}
if (empty($form->register)) {
$form->register = 'manual';
}
set_config('guestloginbutton', $form->guestloginbutton);
set_config('alternateloginurl', $form->alternateloginurl);
set_config('auth', $form->register);
// add $CFG->auth to auth_plugins_enabled list
if (!array_search($form->register, $authsenabled)) {
$authsenabled[] = $form->register;
$authsenabled = array_unique($authsenabled);
set_config('auth_plugins_enabled', implode(',', $authsenabled));
}
//revert auth_plugins_enabled
if (isset($CFG->auth_plugins_enabled)) {
set_config('auth', $CFG->auth_plugins_enabled);
delete_records('config', 'name', 'auth_plugins_enabled');
unset($CFG->auth_plugins_enabled);
}
get_enabled_auth_plugins(true); // fix the list of enabled auths
if (empty($CFG->auth)) {
$authsenabled = array();
} else {
$authsenabled = explode(',', $CFG->auth);
}
if (!isset($CFG->registerauth)) {
set_config('registerauth', '');
}
if (!isset($CFG->auth_instructions)) {
set_config('auth_instructions', '');
}
if (!empty($auth) and !exists_auth_plugin($auth)) {
error(get_string('pluginnotinstalled', 'auth', $auth), $url);
}
// grab GET/POST parameters
$params = new object();
$params->action = optional_param('action', '', PARAM_ACTION);
$params->auth = optional_param('auth', $CFG->auth, PARAM_ALPHANUM);
////////////////////////////////////////////////////////////////////////////////
// process actions
switch ($params->action) {
$status = '';
switch ($action) {
case 'save':
if (data_submitted() and confirm_sesskey()) {
// save settings
set_config('guestloginbutton', required_param('guestloginbutton', PARAM_BOOL));
set_config('alternateloginurl', stripslashes(trim(required_param('alternateloginurl', PARAM_RAW))));
set_config('registerauth', required_param('register', PARAM_SAFEDIR));
set_config('auth_instructions', stripslashes(trim(required_param('auth_instructions', PARAM_RAW))));
// enable registerauth in $CFG->auth if needed
if (!empty($CFG->registerauth) and !in_array($CFG->registerauth, $authsenabled)) {
$authsenabled[] = $CFG->registerauth;
set_config('auth', implode(',', $authsenabled));
}
$status = get_string('changessaved');
}
break;
case 'disable':
// remove from enabled list
$key = array_search($params->auth, $authsenabled);
if ($key !== false and $params->auth != $CFG->auth) {
// remove from enabled list
$key = array_search($auth, $authsenabled);
if ($key !== false) {
unset($authsenabled[$key]);
set_config('auth_plugins_enabled', implode(',', $authsenabled));
set_config('auth', implode(',', $authsenabled));
}
if ($auth == $CFG->registerauth) {
set_config('registerauth', '');
}
break;
case 'enable':
// check auth plugin is valid first
if (!exists_auth_plugin($params->auth)) {
error(get_string('pluginnotinstalled', 'auth', $params->auth), $url);
}
// add to enabled list
if (!array_search($params->auth, $authsenabled)) {
$authsenabled[] = $params->auth;
if (!in_array($auth, $authsenabled)) {
$authsenabled[] = $auth;
$authsenabled = array_unique($authsenabled);
set_config('auth_plugins_enabled', implode(',', $authsenabled));
set_config('auth', implode(',', $authsenabled));
}
break;
case 'down':
$key = array_search($params->auth, $authsenabled);
$key = array_search($auth, $authsenabled);
// check auth plugin is valid
if ($key === false) {
error(get_string('pluginnotenabled', 'auth', $params->auth), $url);
error(get_string('pluginnotenabled', 'auth', $auth), $url);
}
// move down the list
if ($key < (count($authsenabled) - 1)) {
$fsave = $authsenabled[$key];
$authsenabled[$key] = $authsenabled[$key + 1];
$authsenabled[$key + 1] = $fsave;
set_config('auth_plugins_enabled', implode(',', $authsenabled));
set_config('auth', implode(',', $authsenabled));
}
break;
case 'up':
$key = array_search($params->auth, $authsenabled);
$key = array_search($auth, $authsenabled);
// check auth is valid
if ($key === false) {
error(get_string('pluginnotenabled', 'auth', $params->auth), $url);
error(get_string('pluginnotenabled', 'auth', $auth), $url);
}
// move up the list
if ($key >= 1) {
$fsave = $authsenabled[$key];
$authsenabled[$key] = $authsenabled[$key - 1];
$authsenabled[$key - 1] = $fsave;
set_config('auth_plugins_enabled', implode(',', $authsenabled));
set_config('auth', implode(',', $authsenabled));
}
break;
case 'save':
// save settings
set_config('auth_plugins_enabled', implode(',', $authsenabled));
set_config('auth', $authsenabled[0]);
redirect("auth.php?sesskey=$USER->sesskey", get_string('changessaved'), 1);
break;
default:
break;
@@ -132,43 +137,64 @@ $txt->updown = "$txt->up/$txt->down";
// construct the display array, with enabled auth plugins at the top, in order
$displayauths = array();
$registrationauths = array();
$registrationauths['manual'] = $txt->disable;
$registrationauths[''] = $txt->disable;
foreach ($authsenabled as $auth) {
$displayauths[$auth] = get_string("auth_{$auth}title", 'auth');
$authplugin = get_auth_plugin($auth);
if (method_exists($authplugin, 'user_signup')) {
$registrationauths[$auth] = get_string("auth_{$auth}title", 'auth');
}
/// Get the auth title (from core or own auth lang files)
$authtitle = get_string("auth_{$auth}title", "auth");
if ($authtitle == "[[auth_{$auth}title]]") {
$authtitle = get_string("auth_{$auth}title", "auth_{$auth}");
}
/// Apply titles
$displayauths[$auth] = $authtitle;
if ($authplugin->can_signup()) {
$registrationauths[$auth] = $authtitle;
}
}
foreach ($authsavailable as $auth) {
if (!array_key_exists($auth, $displayauths)) {
$displayauths[$auth] = get_string("auth_{$auth}title", 'auth');
if (array_key_exists($auth, $displayauths)) {
continue; //already in the list
}
$authplugin = get_auth_plugin($auth);
if (method_exists($authplugin, 'user_signup')) {
$registrationauths[$auth] = get_string("auth_{$auth}title", 'auth');
}
/// Get the auth title (from core or own auth lang files)
$authtitle = get_string("auth_{$auth}title", "auth");
if ($authtitle == "[[auth_{$auth}title]]") {
$authtitle = get_string("auth_{$auth}title", "auth_{$auth}");
}
/// Apply titles
$displayauths[$auth] = $authtitle;
if ($authplugin->can_signup()) {
$registrationauths[$auth] = $authtitle;
}
}
// build the display table
$table = new flexible_table('auth_admin_table');
$table->define_columns(array('name', 'enable', 'order', 'settings'));
$table->column_style('enable', 'text-align', 'center');
$table->column_style('order', 'text-align', 'center');
$table->column_style('settings', 'text-align', 'center');
$table->define_headers(array($txt->name, $txt->enable, $txt->updown, $txt->settings));
$table->define_baseurl("{$CFG->wwwroot}/{$CFG->admin}/auth.php");
$table->set_attribute('id', 'blocks');
$table->set_attribute('class', 'flexible generaltable generalbox');
$table->set_attribute('style', 'margin:auto;');
$table->set_attribute('cellpadding', '5');
$table->set_attribute('class', 'generaltable generalbox boxaligncenter boxwidthwide');
$table->setup();
//add always enabled plugins first
$displayname = "<span>".$displayauths['manual']."</span>";
$settings = "<a href=\"auth_config.php?sesskey={$USER->sesskey}&amp;auth=manual\">{$txt->settings}</a>";
$table->add_data(array($displayname, '', '', $settings));
$displayname = "<span>".$displayauths['nologin']."</span>";
$settings = "<a href=\"auth_config.php?sesskey={$USER->sesskey}&amp;auth=nologin\">{$txt->settings}</a>";
$table->add_data(array($displayname, '', '', $settings));
// iterate through auth plugins and add to the display table
$updowncount = 1;
$authcount = count($authsenabled);
$url = "auth.php?sesskey=" . sesskey();
foreach ($displayauths as $auth => $name) {
if ($auth == 'manual' or $auth == 'nologin') {
continue;
}
// hide/show link
if (in_array($auth, $authsenabled)) {
$hideshow = "<a href=\"$url&amp;action=disable&amp;auth=$auth\">";
@@ -204,7 +230,7 @@ foreach ($displayauths as $auth => $name) {
}
++ $updowncount;
}
// settings link
$settings = "<a href=\"auth_config.php?sesskey={$USER->sesskey}&amp;auth=$auth\">{$txt->settings}</a>";
@@ -214,65 +240,75 @@ foreach ($displayauths as $auth => $name) {
// output form
admin_externalpage_print_header($adminroot);
//print stus messages
if ($status !== '') {
notify($status, 'notifysuccess');
}
print_simple_box(get_string('configauthenticationplugins', 'admin'), 'center', '700');
echo "<form $CFG->frametarget id=\"authmenu\" method=\"post\" action=\"auth.php\">";
echo "<fieldset class=\"invisiblefieldset\"><input type=\"hidden\" name=\"sesskey\" value=\"".$USER->sesskey."\" /></fieldset>";
print_table($table);
$table->print_html();
////////////////////////////////////////////////////////////////////////////////
$guestoptions = array();
$guestoptions[0] = get_string("hide");
$guestoptions[1] = get_string("show");
echo '<hr />';
echo '<form '.$CFG->frametarget.' id="adminsettings" method="post" action="auth.php">';
echo '<div class="settingsform">';
print_heading(get_string('auth_common_settings', 'auth'));
echo '<table cellspacing="0" cellpadding="5" border="0" style="margin-left:auto;margin-right:auto">';
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
echo '<input type="hidden" name="action" value="save" />';
echo '<fieldset>';
##echo '<table cellspacing="0" cellpadding="5" border="0" style="margin-left:auto;margin-right:auto">';
// User self registration
echo "<tr valign=\"top\">\n";
echo "<td align=\"right\" style=\"white-space:nowrap\">\n";
print_string("selfregistration", "auth");
echo ":</td>\n";
echo "<td>\n";
choose_from_menu($registrationauths, "register", $CFG->auth, "");
echo "</td>\n";
echo "<td>\n";
print_string("selfregistration_help", "auth");
echo "</td></tr>\n";
echo '<div class="form-item" id="admin-register">';
echo '<label for = "menuregister">' . get_string("selfregistration", "auth");
echo '<span class="form-shortname">registerauth</span>';
echo '</label>';
choose_from_menu($registrationauths, "register", $CFG->registerauth, "");
echo '<div class="description">' . get_string("selfregistration_help", "auth") . '</div>';
echo '</div>';
// Login as guest button enabled
echo "<tr valign=\"top\">\n";
echo "<td style=\"white-space:nowrap;text-align:right\">\n";
print_string("guestloginbutton", "auth");
echo ":</td>\n";
echo "<td>\n";
echo '<div class="form-item" id="admin-guestloginbutton">';
echo '<label for = "menuguestloginbutton">' . get_string("guestloginbutton", "auth");
echo '<span class="form-shortname">guestloginbutton</span>';
echo '</label>';
choose_from_menu($guestoptions, "guestloginbutton", $CFG->guestloginbutton, "");
echo "</td>\n";
echo "<td>\n";
print_string("showguestlogin","auth");
echo "</td></tr>\n";
echo '<div class="description">' . get_string("showguestlogin", "auth") . '</div>';
echo '</div>';
/// An alternate url for the login form. It means we can use login forms that are integrated
/// into non-moodle pages
echo "<tr valign=\"top\">\n";
echo "<td align=\"right\" style=\"white-space:nowrap\">\n";
print_string('alternateloginurl', 'auth');
echo "</td>\n";
echo "<td>\n";
echo '<input type="text" size="40" name="alternateloginurl" alt="'.get_string('alternateloginurl', 'auth').'" value="'.$CFG->alternateloginurl."\" />\n";
echo "</td>\n";
echo "<td>\n";
print_string('alternatelogin', 'auth', htmlspecialchars($CFG->wwwroot.'/login/index.php'));
echo "</td>\n";
echo "</tr>\n";
echo '<div class="form-item" id="admin-alternateloginurl">';
echo '<label for = "alternateloginurl">' . get_string("alternateloginurl", "auth");
echo '<span class="form-shortname">alternateloginurl</span>';
echo '</label>';
echo '<input type="text" size="60" name="alternateloginurl" id="alternateloginurl" value="'.$CFG->alternateloginurl."\" />\n";
echo '<div class="description">' . get_string("alternatelogin", "auth", htmlspecialchars($CFG->wwwroot.'/login/index.php')) . '</div>';
echo '</div>';
echo "</table>\n";
/// Instructions about login/password
/// to be showed to users
echo '<div class="form-item" id="admin-auth_instructions">';
echo '<label for = "auth_instructions">' . get_string("instructions", "auth");
echo '<span class="form-shortname">auth_instructions</span>';
echo '</label>';
echo '<textarea cols="30" rows="4" name="auth_instructions" id="auth_instructions">'.s($CFG->auth_instructions)."</textarea>\n";
echo '<div class="description">' . get_string("authinstructions", "auth") . '</div>';
echo '</div>';
echo '</fieldset>';
////////////////////////////////////////////////////////////////////////////////
echo '<div style="text-align:center"><input type="submit" value="'.get_string('savechanges').'" /></div>';
echo '<div class="form-buttons"><input class="form-submit" type="submit" value="'.get_string('savechanges', 'admin').'" /></div>';
echo '</div>';
echo '</form>';
admin_externalpage_print_footer($adminroot);
+42 -32
View File
@@ -2,13 +2,14 @@
/**
* Edit configuration for an individual auth plugin
*/
require_once '../config.php';
require_once $CFG->libdir.'/adminlib.php';
$adminroot = admin_get_root();
admin_externalpage_setup('userauthentication', $adminroot);
$auth = optional_param('auth', '', PARAM_SAFEDIR);
$auth = required_param('auth', PARAM_SAFEDIR);
$CFG->pagepath = 'auth/' . $auth;
$authplugin = get_auth_plugin($auth);
$err = array();
@@ -19,9 +20,9 @@ if ($frm = data_submitted()) {
error(get_string('confirmsesskeybad', 'error'));
}
if (method_exists($authplugin, 'validate_form')) {
$authplugin->validate_form($frm, $err);
}
$frm = stripslashes_recursive($frm);
$authplugin->validate_form($frm, $err);
if (count($err) == 0) {
@@ -33,49 +34,56 @@ if ($frm = data_submitted()) {
if (preg_match('/^lockconfig_(.+?)$/', $name, $matches)) {
$plugin = "auth/$auth";
$name = $matches[1];
if (!set_config($name, $value, $plugin)) {
notify("Problem saving config $name as $value for plugin $plugin");
if (!set_config($name, $value, $plugin)) {
error("Problem saving config $name as $value for plugin $plugin");
}
}
}
redirect("auth.php?sesskey=$USER->sesskey", get_string("changessaved"), 1);
redirect("auth.php");
exit;
}
} else {
foreach ($err as $key => $value) {
$focus = "form.$key";
}
}
}
} else {
$frm = get_config("auth/$auth");
}
$user_fields = array("firstname", "lastname", "email", "phone1", "phone2", "department", "address", "city", "country", "description", "idnumber", "lang");
$user_fields = array("firstname", "lastname", "email", "phone1", "phone2", "institution", "department", "address", "city", "country", "description", "idnumber", "lang");
$modules = get_list_of_plugins('auth');
foreach ($modules as $module) {
$options[$module] = get_string("auth_{$module}title", 'auth');
}
asort($options);
/// Get the auth title (from core or own auth lang files)
$authtitle = get_string("auth_{$auth}title", "auth");
if ($authtitle == "[[auth_{$auth}title]]") {
$authtitle = get_string("auth_{$auth}title", "auth_{$auth}");
}
/// Get the auth descriptions (from core or own auth lang files)
$authdescription = get_string("auth_{$auth}description", "auth");
if ($authdescription == "[[auth_{$auth}description]]") {
$authdescription = get_string("auth_{$auth}description", "auth_{$auth}");
}
// output configuration form
admin_externalpage_print_header($adminroot);
// choose an authentication method
echo "<form $CFG->frametarget id=\"authmenu\" method=\"post\" action=\"auth_config.php\">\n";
echo "<div>\n";
echo "<input type=\"hidden\" name=\"sesskey\" value=\"".$USER->sesskey."\" />\n";
echo "<input type=\"hidden\" name=\"auth\" value=\"".$auth."\" />\n";
// auth plugin description
print_simple_box_start('center', '80%');
print_heading($options[$auth]);
print_simple_box_start('center', '60%', '', 5, 'informationbox');
print_string("auth_{$auth}description", 'auth');
print_heading($authtitle);
print_simple_box_start('center', '80%', '', 5, 'informationbox');
echo $authdescription;
print_simple_box_end();
echo "<hr />\n";
$authplugin->config_form($frm, $err);
$authplugin->config_form($frm, $err, $user_fields);
print_simple_box_end();
echo '<center><p><input type="submit" value="' . get_string("savechanges") . "\" /></p></center>\n";
echo '<p style="text-align: center"><input type="submit" value="' . get_string("savechanges") . "\" /></p>\n";
echo "</div>\n";
echo "</form>\n";
admin_externalpage_print_footer($adminroot);
@@ -86,7 +94,7 @@ exit;
// Good enough for most auth plugins
// but some may want a custom one if they are offering
// other options
// Note: lockconfig_ fields have special handling.
// Note: lockconfig_ fields have special handling.
function print_auth_lock_options ($auth, $user_fields, $helptext, $retrieveopts, $updateopts) {
echo '<tr><td colspan="3">';
@@ -104,7 +112,7 @@ function print_auth_lock_options ($auth, $user_fields, $helptext, $retrieveopts,
'onlogin' => get_string('update_onlogin', 'auth'));
$updateextoptions = array('0' => get_string('update_never', 'auth'),
'1' => get_string('update_onupdate', 'auth'));
$pluginconfig = get_config("auth/$auth");
// helptext is on a field with rowspan
@@ -138,30 +146,32 @@ function print_auth_lock_options ($auth, $user_fields, $helptext, $retrieveopts,
$fieldname = get_string($fieldname);
}
echo '<tr valign="top"><td align="right">';
echo $fieldname;
echo '</td><td>';
if ($retrieveopts) {
$varname = 'field_map_' . $field;
echo "<input name=\"lockconfig_{$varname}\" type=\"text\" size=\"30\" value=\"{$pluginconfig->$varname}\" />";
echo '<div align="right">';
echo get_string('auth_updatelocal', 'auth') . '&nbsp;&nbsp;';
echo '<tr valign="top"><td align="right">';
echo '<label for="lockconfig_'.$varname.'">'.$fieldname.'</label>';
echo '</td><td>';
echo "<input id=\"lockconfig_{$varname}\" name=\"lockconfig_{$varname}\" type=\"text\" size=\"30\" value=\"{$pluginconfig->$varname}\" />";
echo '<div style="text-align: right">';
echo '<label for="menulockconfig_field_updatelocal_'.$field.'">'.get_string('auth_updatelocal', 'auth') . '</label>&nbsp;';
choose_from_menu($updatelocaloptions, "lockconfig_field_updatelocal_{$field}", $pluginconfig->{"field_updatelocal_$field"}, "");
echo '<br />';
if ($updateopts) {
echo get_string('auth_updateremote', 'auth') . '&nbsp;&nbsp;';
'&nbsp;&nbsp;';
echo '<label for="menulockconfig_field_updateremote_'.$field.'">'.get_string('auth_updateremote', 'auth') . '</label>&nbsp;';
choose_from_menu($updateextoptions, "lockconfig_field_updateremote_{$field}", $pluginconfig->{"field_updateremote_$field"}, "");
echo '<br />';
}
echo get_string('auth_fieldlock', 'auth') . '&nbsp;&nbsp;';
echo '<label for="menulockconfig_field_lock_'.$field.'">'.get_string('auth_fieldlock', 'auth') . '</label>&nbsp;';
choose_from_menu($lockoptions, "lockconfig_field_lock_{$field}", $pluginconfig->{"field_lock_$field"}, "");
echo '</div>';
} else {
echo '<tr valign="top"><td align="right">';
echo '<label for="menulockconfig_field_lock_'.$field.'">'.$fieldname.'</label>';
echo '</td><td>';
choose_from_menu($lockoptions, "lockconfig_field_lock_{$field}", $pluginconfig->{"field_lock_$field"}, "");
}
echo '</td>';
+1 -1
View File
@@ -59,7 +59,7 @@
print_heading($strblockname);
print_simple_box('<center>'.get_string('configwarning', 'admin').'</center>', 'center', '50%');
print_simple_box(get_string('configwarning', 'admin'), 'center', '50%');
echo '<br />';
echo '<form method="post" action="block.php">';
+20 -12
View File
@@ -17,7 +17,6 @@
$delete = optional_param('delete', 0, PARAM_INT);
$multiple = optional_param('multiple', 0, PARAM_INT);
/// Print headings
$strmanageblocks = get_string('manageblocks');
@@ -29,6 +28,7 @@
$strcourses = get_string('blockinstances', 'admin');
$strname = get_string('name');
$strmultiple = get_string('blockmultiple', 'admin');
$strshowblockcourse = get_string('showblockcourse');
admin_externalpage_print_header($adminroot);
@@ -54,7 +54,7 @@
if (!$block = blocks_get_record($multiple)) {
error("Block doesn't exist!");
}
$block->multiple = !$block->multiple;
$block->multiple = intval(!$block->multiple);
update_record('block', $block);
}
@@ -165,11 +165,8 @@
$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.'/'.$CFG->admin.'/blocks.php');
$table->set_attribute('cellspacing', '0');
$table->set_attribute('id', 'blocks');
$table->set_attribute('class', 'generaltable generalbox');
$table->set_attribute('class', 'generaltable generalbox boxaligncenter boxwidthwide');
$table->setup();
foreach ($blockbyname as $blockname => $blockid) {
@@ -182,8 +179,20 @@
if($blockobject->has_config()) {
$settings = '<a href="block.php?block='.$blockid.'">'.$strsettings.'</a>';
}
$count = count_records('block_instance', 'blockid', $blockid);
// MDL-11167, blocks can be placed on mymoodle, or the blogs page
// and it should not show up on course search page
$count = count_records_sql('SELECT COUNT(*)
FROM '.$CFG->prefix.'block_instance
WHERE blockid = '.$blockid.' AND
pagetype = \'course-view\'');
if ($count>0) {
$blocklist = "<a href=\"{$CFG->wwwroot}/course/search.php?blocklist=$blockid&amp;sesskey={$USER->sesskey}\" ";
$blocklist .= "title=\"$strshowblockcourse\" >$count</a>";
}
else {
$blocklist = "$count";
}
$class = ''; // Nothing fancy, by default
if ($blocks[$blockid]->visible) {
@@ -208,8 +217,8 @@
$table->add_data(array(
'<span'.$class.'>'.$blockobject->get_title().'</span>',
$count,
$blockobject->get_version(),
$blocklist,
'<span'.$class.'>'.$blockobject->get_version().'</span>',
$visible,
$multiple,
$delete,
@@ -228,9 +237,8 @@
$table->define_headers(array($strname, $strdelete));
$table->define_baseurl($CFG->wwwroot.'/'.$CFG->admin.'/blocks.php');
$table->set_attribute('cellspacing', '0');
$table->set_attribute('id', 'incompatible');
$table->set_attribute('class', 'generaltable generalbox');
$table->set_attribute('class', 'generaltable generalbox boxaligncenter boxwidthwide');
$table->setup();
+45 -7
View File
@@ -98,11 +98,21 @@
$cron_function = $mod->name."_cron";
if (function_exists($cron_function)) {
mtrace("Processing module function $cron_function ...", '');
if (!empty($PERF->dbqueries)) {
$pre_dbqueries = $PERF->dbqueries;
$pre_time = microtime(1);
}
if ($cron_function()) {
if (! set_field("modules", "lastcron", $timenow, "id", $mod->id)) {
mtrace("Error: could not update timestamp for $mod->fullname");
}
}
if (isset($pre_dbqueries)) {
mtrace("... used " . ($PERF->dbqueries - $pre_dbqueries) . " dbqueries");
mtrace("... used " . (microtime(1) - $pre_time) . " seconds");
}
/// Reset possible changes by modules to time_limit. MDL-11597
@set_time_limit(0);
mtrace("done.");
}
}
@@ -127,17 +137,46 @@
mtrace('Error: could not update timestamp for '.$block->name);
}
}
/// Reset possible changes by blocks to time_limit. MDL-11597
@set_time_limit(0);
mtrace('done.');
}
}
}
}
mtrace("Finished blocks");
mtrace('Finished blocks');
if (!empty($CFG->langcache)) {
mtrace('Updating languages cache');
get_list_of_languages();
get_list_of_languages(true);
}
mtrace('Removing expired enrolments ...', ''); // See MDL-8785
$timenow = time();
$somefound = false;
// The preferred way saves memory, dmllib.php
// find courses where limited enrolment is enabled
global $CFG;
$rs_enrol = get_recordset_sql("SELECT ra.roleid, ra.userid, ra.contextid
FROM {$CFG->prefix}course c
INNER JOIN {$CFG->prefix}context cx ON cx.instanceid = c.id
INNER JOIN {$CFG->prefix}role_assignments ra ON ra.contextid = cx.id
WHERE cx.contextlevel = '".CONTEXT_COURSE."'
AND ra.timeend > 0
AND ra.timeend < '$timenow'
AND c.enrolperiod > 0
");
mtrace($rs_enrol->RecordCount().' to delete');
while ($oldenrolment = rs_fetch_next_record($rs_enrol)) {
role_unassign($oldenrolment->roleid, $oldenrolment->userid, 0, $oldenrolment->contextid);
$somefound = true;
}
rs_close($rs_enrol);
if($somefound) {
mtrace('Done');
} else {
mtrace('none found');
}
@@ -254,7 +293,7 @@
//Execute backup's cron
//Perhaps a long time and memory could help in large sites
@set_time_limit(0);
@raise_memory_limit("196M");
@raise_memory_limit("192M");
if (function_exists('apache_child_terminate')) {
// if we are running from Apache, give httpd a hint that
// it can recycle the process after it's done. Apache's
@@ -307,9 +346,8 @@
}
/// Run the auth cron, if any
if (!($auths = explode(',', $CFG->auth_plugins_enabled))) {
$auths = array($user->auth);
}
$auths = get_enabled_auth_plugins();
mtrace("Running auth crons if required...");
foreach ($auths as $auth) {
$authplugin = get_auth_plugin($auth);
@@ -326,7 +364,7 @@
if (!empty($CFG->enablestats) and empty($CFG->disablestatsprocessing)) {
// check we're not before our runtime
$timetocheck = strtotime("$CFG->statsruntimestarthour:$CFG->statsruntimestartminute today");
$timetocheck = strtotime("today $CFG->statsruntimestarthour:$CFG->statsruntimestartminute");
if (time() > $timetocheck) {
$time = 60*60*20; // set it to 20 here for first run... (overridden by $CFG)
+1 -1
View File
@@ -54,7 +54,7 @@ function delete_subdirectories($rootdir) {
$dir = opendir($rootdir);
while ($file = readdir($dir)) {
while (false !== ($file = readdir($dir))) {
if ($file != '.' and $file != '..') {
$fullfile = $rootdir .'/'. $file;
if (filetype($fullfile) == 'dir') {
+135
View File
@@ -117,6 +117,141 @@
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
</PHP_EXTENSIONS>
</MOODLE>
<MOODLE version="1.9">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mysql" version="4.1.16">
<FEEDBACK>
<ON_ERROR message="mysql416required" />
</FEEDBACK>
<BYPASS function="bypass_mysql416_reqs" message="mysql416bypassed" />
</VENDOR>
<VENDOR name="postgres" version="8.0" />
<VENDOR name="mssql" version="9.0" />
<VENDOR name="odbc_mssql" version="9.0" />
<VENDOR name="mssql_n" version="9.0" />
<VENDOR name="oracle" version="9.0" />
</DATABASE>
<PHP version="4.3.0" level="required">
<RESTRICT function="restrict_php50_version" message="php50restricted" />
</PHP>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="optional">
<FEEDBACK>
<ON_CHECK message="iconvrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
<FEEDBACK>
<ON_CHECK message="mbstringrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="optional">
<FEEDBACK>
<ON_CHECK message="curlrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="optional">
<FEEDBACK>
<ON_CHECK message="opensslrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
</PHP_EXTENSIONS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="question/upgrade.php" function="question_check_no_rqp_questions" level="optional">
<FEEDBACK>
<ON_CHECK message="qtyperqpwillberemovedanyway" />
<ON_OK message="qtyperqpwillberemoved" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="question/upgrade.php" function="question_random_check" level="optional">
<FEEDBACK>
<ON_OK message="questioncwqpfsok" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="2.0" requires="1.9">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mysql" version="4.1.16">
<FEEDBACK>
<ON_ERROR message="mysql416required" />
</FEEDBACK>
<BYPASS function="bypass_mysql416_reqs" message="mysql416bypassed" />
</VENDOR>
<VENDOR name="postgres" version="8.0" />
<VENDOR name="mssql" version="9.0" />
<VENDOR name="odbc_mssql" version="9.0" />
<VENDOR name="mssql_n" version="9.0" />
<VENDOR name="oracle" version="9.0" />
</DATABASE>
<PHP version="5.2.0" level="required">
</PHP>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="optional">
<FEEDBACK>
<ON_CHECK message="iconvrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
<FEEDBACK>
<ON_CHECK message="mbstringrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="optional">
<FEEDBACK>
<ON_CHECK message="curlrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="optional">
<FEEDBACK>
<ON_CHECK message="opensslrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
</PHP_EXTENSIONS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="question/upgrade.php" function="question_check_no_rqp_questions" level="optional">
<FEEDBACK>
<ON_CHECK message="qtyperqpwillberemovedanyway" />
<ON_OK message="qtyperqpwillberemoved" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
</COMPATIBILITY_MATRIX>
+5 -5
View File
@@ -59,10 +59,10 @@
// run through submitted data
// reject if does not start with filter_
foreach ($config as $name => $value) {
set_config( $name,$value );
set_config($name, stripslashes($value));
}
}
redirect( "$CFG->wwwroot/$CFG->admin/filters.php", get_string('changessaved'), 1);
redirect("$CFG->wwwroot/$CFG->admin/filters.php");
exit;
}
@@ -74,21 +74,21 @@
admin_externalpage_print_header($adminroot);
print_heading( $filtername );
print_simple_box("<center>".get_string("configwarning", "admin")."</center>", "center", "50%");
print_simple_box(get_string("configwarning", "admin"), "center", "50%");
echo "<br />";
print_simple_box_start("center",'');
?>
<form action="filter.php?filter=<?php echo urlencode($param->filter); ?>" method="post">
<div style="text-align: center">
<input type="hidden" name="sesskey" value="<?php echo sesskey(); ?>" />
<?php include "$CFG->dirroot/$param->filter/filterconfig.html"; ?>
<center>
<input type="submit" name="submit" value="<?php print_string('savechanges'); ?>" />
<input type="submit" name="reset" value="<?php echo print_string('resettodefaults'); ?>" />
</center>
</div>
</form>
<?php
+2 -7
View File
@@ -182,15 +182,10 @@
// construct the flexible table ready to display
$table = new flexible_table(FILTER_TABLE);
$table->define_columns(array('name', 'hideshow', 'order', 'settings'));
$table->column_style('hideshow', 'text-align', 'center');
$table->column_style('order', 'text-align', 'center');
$table->column_style('settings', 'text-align', 'center');
$table->define_headers(array($txt->name, $txt->hideshow, $txt->updown, $txt->settings));
$table->define_baseurl("$CFG->wwwroot/$CFG->admin/filters.php");
$table->set_attribute('id', 'blocks');
$table->set_attribute('class', 'flexible generaltable generalbox');
$table->set_attribute('style', 'margin:auto;');
$table->set_attribute('cellpadding', '5');
$table->set_attribute('id', 'filters');
$table->set_attribute('class', 'generaltable generalbox boxaligncenter boxwidthwide');
$table->setup();
// iterate through filters adding to display table
+2 -2
View File
@@ -40,7 +40,7 @@ while(!feof($fd)) {
$user = get_record("user","id",$log->userid);
$course = get_record("course","id",$log->course);
$subject = get_string('virusfoundsubject','moodle',$site->fullname);
$subject = get_string('virusfoundsubject','moodle',format_string($site->fullname));
$a->date = userdate($log->time);
$a->action = $action;
@@ -78,7 +78,7 @@ function notify_admins_unknown($file,$a) {
global $site;
$admins = get_admins();
$subject = get_string('virusfoundsubject','moodle',$site->fullname);
$subject = get_string('virusfoundsubject','moodle',format_string($site->fullname));
$body = get_string('virusfoundlateradminnolog','moodle',$a);
foreach ($admins as $admin) {
email_to_user($admin,$admin,$subject,$body);
+56 -36
View File
@@ -136,17 +136,18 @@
echo "<br />";
notice_yesno(get_string('doyouagree'), "index.php?agreelicense=1",
"http://docs.moodle.org/en/License");
print_footer('none');
exit;
}
if (empty($confirmrelease)) {
$strcurrentrelease = get_string("currentrelease");
print_header($strcurrentrelease, $strcurrentrelease, $strcurrentrelease, "", "", false, "&nbsp;", "&nbsp;");
print_heading("Moodle $release");
print_box(get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/en/Release_Notes'));
echo '<form action="index.php"><fieldset class="invisiblefieldset">';
print_box(get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/en/Release_Notes'), 'generalbox boxaligncenter boxwidthwide');
echo '<form action="index.php"><div>';
echo '<input type="hidden" name="agreelicense" value="1" />';
echo '<input type="hidden" name="confirmrelease" value="1" />';
echo '</fieldset>';
echo '</div>';
echo '<div class="continuebutton"><input name="autopilot" id="autopilot" type="checkbox" value="1" /><label for="autopilot">'.get_string('unattendedoperation', 'admin').'</label>';
echo '<br /><br /><input type="submit" value="'.get_string('continue').'" /></div>';
echo '</form>';
@@ -188,10 +189,16 @@
/// Continue with the instalation
$db->debug = false;
if ($status) {
//ugly hack - install new groups: MDL-9217
require("$CFG->dirroot/group/version.php");
set_config('group_version', $group_version);
//install_group_db();
// Install the roles system.
moodle_install_roles();
set_config('statsrolesupgraded',time());
// Write default settings unconditionally (i.e. even if a setting is already set, overwrite it)
// (this should only have any effect during initial install).
$adminroot = admin_get_root();
@@ -207,6 +214,7 @@
'enrol' => 'manual',
'enrol_plugins_enabled' => 'manual',
'guestloginbutton' => 1,
'registerauth' => 'email',
'style' => 'default',
'template' => 'default',
'theme' => 'standardwhite',
@@ -270,13 +278,29 @@
print_header($strcurrentrelease, $strcurrentrelease, $strcurrentrelease, "", "", false, "&nbsp;", "&nbsp;");
print_heading("Moodle $release");
print_box(get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/en/Release_Notes'));
echo '<form action="index.php"><fieldset class="invisiblefieldset">';
echo '<input type="hidden" name="confirmupgrade" value="1" />';
echo '<input type="hidden" name="confirmrelease" value="1" />';
echo '</fieldset>';
echo '<div class="continuebutton"><input name="autopilot" id="autopilot" type="checkbox" value="0" /><label for="autopilot">'.get_string('unattendedoperation', 'admin').'</label>';
echo '<br /><br /><input type="submit" value="'.get_string('continue').'" /></div>';
echo '</form>';
require_once($CFG->libdir.'/environmentlib.php');
print_heading(get_string('environment', 'admin'));
if (!check_moodle_environment($release, $environment_results, true)) {
print_box_start('generalbox', 'notice'); // MDL-8330
print_string('langpackwillbeupdated', 'admin');
print_box_end();
notice_yesno(get_string('environmenterrorupgrade', 'admin'),
'index.php?confirmupgrade=1&confirmrelease=1', 'index.php');
} else {
notify(get_string('environmentok', 'admin'), 'notifysuccess');
print_box_start('generalbox', 'notice'); // MDL-8330
print_string('langpackwillbeupdated', 'admin');
print_box_end();
echo '<form action="index.php"><div>';
echo '<input type="hidden" name="confirmupgrade" value="1" />';
echo '<input type="hidden" name="confirmrelease" value="1" />';
echo '</div>';
echo '<div class="continuebutton"><input name="autopilot" id="autopilot" type="checkbox" value="1" /><label for="autopilot">'.get_string('unattendedoperation', 'admin').'</label>';
echo '<br /><br /><input type="submit" value="'.get_string('continue').'" /></div>';
echo '</form>';
}
print_footer('none');
die;
} else {
@@ -307,6 +331,10 @@
/// If successful, continue upgrading roles and setting everything properly
if ($status) {
if (empty($CFG->rolesactive)) {
// ugly hack - upgrade to new groups (from 1.6) : MDL-9217
// require_once("$CFG->dirroot/group/db/upgrade.php");
// MDL-11062, proper group upgrade code is done in lib/db/upgrade.php
// install_group_db();
// Upgrade to the roles system.
moodle_install_roles();
set_config('rolesactive', 1);
@@ -354,6 +382,11 @@
}
}
/// ugly hack - convert to new groups if upgrading from 1.7; must be reworked
require_once("$CFG->dirroot/group/db/upgrade.php");
upgrade_group_db("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
/// Find and check all main modules and load them up or upgrade them if necessary
/// first old *.php update and then the new upgrade.php script
upgrade_activity_modules("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
@@ -381,6 +414,9 @@
/// first old *.php update and then the new upgrade.php script
upgrade_plugins('enrol', 'enrol', "$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
/// Check all auth plugins and upgrade if necessary
upgrade_plugins('auth','auth',"$CFG->wwwroot/$CFG->admin/index.php");
/// Check all course formats and upgrade if necessary
upgrade_plugins('format','course/format',"$CFG->wwwroot/$CFG->admin/index.php");
@@ -389,10 +425,6 @@
require_once("$CFG->dirroot/lib/locallib.php");
upgrade_local_db("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
/// Check for new groups and upgrade if necessary. TODO:
require_once("$CFG->dirroot/group/db/upgrade.php");
upgrade_group_db("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
/// Check for changes to RPC functions
require_once($CFG->dirroot.'/admin/mnet/adminlib.php');
upgrade_RPC_functions("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
@@ -466,19 +498,7 @@
/// Check if the guest user exists. If not, create one.
if (! record_exists("user", "username", "guest")) {
$guest->auth = "manual";
$guest->username = "guest";
$guest->password = md5("guest");
$guest->firstname = addslashes(get_string("guestuser"));
$guest->lastname = " ";
$guest->email = "root@localhost";
$guest->description = addslashes(get_string("guestuserinfo"));
$guest->mnethostid = $CFG->mnet_localhost_id;
$guest->confirmed = 1;
$guest->lang = $CFG->lang;
$guest->timemodified= time();
if (! $guest->id = insert_record("user", $guest)) {
if (! $guest = create_guest_record()) {
notify("Could not create guest user record !!!");
}
}
@@ -519,7 +539,7 @@
/// Deprecated database! Warning!!
if (!empty($CFG->migrated_to_new_db)) {
print_box(print_string('dbmigrationdeprecateddb','admin'));
print_box(print_string('dbmigrationdeprecateddb', 'admin'), 'generalbox adminwarning');
}
/// Check for any special upgrades that might need to be run
@@ -527,12 +547,12 @@
print_box(get_string("upgrade$CFG->upgrade", "admin", "$CFG->wwwroot/$CFG->admin/upgrade$CFG->upgrade.php"));
}
if (ini_get_bool('register_globals') && !ini_get_bool('magic_quotes_gpc')) {
print_box(get_string('globalsquoteswarning', 'admin'));
if (ini_get_bool('register_globals')) {
print_box(get_string('globalswarning', 'admin'), 'generalbox adminwarning');
}
if (is_dataroot_insecure()) {
print_box(get_string('datarootsecuritywarning', 'admin', $CFG->dataroot));
print_box(get_string('datarootsecuritywarning', 'admin', $CFG->dataroot), 'generalbox adminwarning');
}
/// If no recently cron run
@@ -540,17 +560,17 @@
if (time() - $lastcron > 3600 * 24) {
$strinstallation = get_string('installation', 'install');
$helpbutton = helpbutton('install', $strinstallation, 'moodle', true, false, '', true);
print_box(get_string('cronwarning', 'admin')."&nbsp;".$helpbutton);
print_box(get_string('cronwarning', 'admin')."&nbsp;".$helpbutton, 'generalbox adminwarning');
}
/// Print multilang upgrade notice if needed
if (empty($CFG->filter_multilang_converted)) {
print_box(get_string('multilangupgradenotice', 'admin'));
print_box(get_string('multilangupgradenotice', 'admin'), 'generalbox adminwarning');
}
/// Alert if we are currently in maintenance mode
if (file_exists($CFG->dataroot.'/1/maintenance.html')) {
print_box(get_string('sitemaintenancewarning', 'admin'));
print_box(get_string('sitemaintenancewarning', 'admin'), 'generalbox adminwarning');
}
@@ -560,7 +580,7 @@
if (!isset($CFG->registered) || $CFG->registered < (time() - 3600*24*30*6)) {
$options = array();
$options['sesskey'] = $USER->sesskey;
print_box_start();
print_box_start('generalbox adminwarning');
print_string('pleaseregister', 'admin');
print_single_button('register.php', $options, get_string('registration'));
print_box_end();
@@ -570,7 +590,7 @@
//////////////////////////////////////////////////////////////////////////////////////////////////
//// IT IS ILLEGAL AND A VIOLATION OF THE GPL TO HIDE, REMOVE OR MODIFY THIS COPYRIGHT NOTICE ///
$copyrighttext = '<a href="http://moodle.org/">Moodle</a> '.
'<a href="http://docs.moodle.org/en/Release">'.$CFG->release.'</a> ('.$CFG->version.')<br />'.
'<a href="http://docs.moodle.org/en/Release" title="'.$CFG->version.'">'.$CFG->release.'</a><br />'.
'Copyright &copy; 1999 onwards, Martin Dougiamas<br />'.
'and <a href="http://docs.moodle.org/en/Credits">many other contributors</a>.<br />'.
'<a href="http://docs.moodle.org/en/License">GNU Public License</a>';
+92 -14
View File
@@ -57,17 +57,17 @@
$navigation = "<a href=\"lang.php\">$strlanguage</a> -> $strmissingstrings";
$title = $strmissingstrings;
$button = '<form '.$CFG->frametarget.' method="get" action="'.$CFG->wwwroot.'/'.$CFG->admin.'/lang.php">'.
'<fieldset class="invisiblefieldset">'.
'<div>'.
'<input type="hidden" name="mode" value="compare" />'.
'<input type="submit" value="'.$streditstrings.'" /></fieldset></form>';
'<input type="submit" value="'.$streditstrings.'" /></div></form>';
break;
case "compare":
$navigation = "<a href=\"lang.php\">$strlanguage</a> -> $streditstrings";
$title = $streditstrings;
$button = '<form '.$CFG->frametarget.' method="get" action="'.$CFG->wwwroot.'/'.$CFG->admin.'/lang.php">'.
'<fieldset class="invisiblefieldset">'.
'<div>'.
'<input type="hidden" name="mode" value="missing" />'.
'<input type="submit" value="'.$strmissingstrings.'" /></fieldset></form>';
'<input type="submit" value="'.$strmissingstrings.'" /></div></form>';
break;
default:
$title = $strlanguage;
@@ -82,7 +82,7 @@
if (!$mode) {
print_box_start();
$currlang = current_language();
$langs = get_list_of_languages();
$langs = get_list_of_languages(false, true);
popup_form ("$CFG->wwwroot/$CFG->admin/lang.php?lang=", $langs, "chooselang", $currlang, "", "", "", false, 'self', $strcurrentlanguage.':');
print_heading("<a href=\"lang.php?mode=missing\">$strmissingstrings</a>");
print_heading("<a href=\"lang.php?mode=compare\">$streditstrings</a>");
@@ -170,7 +170,7 @@
$missinglinkend = '';
}
if (strlen($value) > LANG_MISSING_TEXT_MAX_LEN) {
$value = substr($value, 0, LANG_MISSING_TEXT_MAX_LEN) . ' ...';
$value = lang_xhtml_save_substr($value, 0, LANG_MISSING_TEXT_MAX_LEN) . ' ...'; // MDL-8852
}
$o .= "$"."string['".$missinglinkstart.$key.$missinglinkend."'] = \"$value\";<br />";
}
@@ -299,12 +299,12 @@
helpbutton('langswitchstorage', $strfilestoredinhelp, 'moodle');
echo '<form '.$CFG->frametarget.' method="get" action="'.$CFG->wwwroot.'/'.$CFG->admin.'/lang.php">'.
'<fieldset class="invisiblefieldset">'.
'<div>'.
'<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="'.$strswitchlang.'" />'.
'</fieldset></form>';
'</div></form>';
print_box_end();
if ($currentfile <> '') {
@@ -455,7 +455,7 @@
echo $missingnext . '</td>';
} else {
echo '<td bgcolor="'.$cellcolour.'" valign="top">'.$value.'</td>';
echo '<td '.$cellcolour.' valign="top">'.$value.'</td>';
}
echo '</tr>'."\n";
}
@@ -468,8 +468,10 @@
echo '</td></tr>';
}
echo '</table>';
echo '</div>';
echo '</form>';
if ($editable) {
echo '</div>';
echo '</form>';
}
} else {
// no $currentfile specified
@@ -526,10 +528,12 @@ function lang_save_file($path, $file, $strings, $local, $packstrings) {
$value = lang_fix_value_before_save($value);
if ($id == "string" and $value != ""){
if ((!$local) || (lang_fix_value_from_file($packstrings[$stringname]) <> lang_fix_value_from_file($value))) {
// Either we are saving the master language pack
// or we are saving local language pack and the strings differ.
fwrite($f,"\$string['$stringname'] = '$value';\n");
if (LANG_KEEP_ORPHANS && isset($orphans[$stringname])) {
unset($orphans[$stringname]);
}
}
if (LANG_KEEP_ORPHANS && isset($orphans[$stringname])) {
unset($orphans[$stringname]);
}
}
}
@@ -560,6 +564,7 @@ function lang_fix_value_from_file($value='') {
$value = trim($value); // Delete leading/trailing white space
$value = str_replace("\\","",$value); // Delete all slashes
$value = str_replace("%%","%",$value);
$value = str_replace("&","&amp;",$value); // Fixes MDL-9248
$value = str_replace("<","&lt;",$value);
$value = str_replace(">","&gt;",$value);
$value = str_replace('"',"&quot;",$value);
@@ -578,6 +583,9 @@ function lang_fix_value_before_save($value='') {
if ($CFG->lang != "zh_hk" and $CFG->lang != "zh_tw") { // Some MB languages include backslash bytes
$value = str_replace("\\","",$value); // Delete all slashes
}
if (ini_get_bool('magic_quotes_sybase')) { // Unescape escaped sybase quotes
$value = str_replace("''", "'", $value);
}
$value = str_replace("'", "\\'", $value); // Add slashes for '
$value = str_replace('"', "\\\"", $value); // Add slashes for "
$value = str_replace("%","%%",$value); // Escape % characters
@@ -629,5 +637,75 @@ function lang_file_string_key($keyfromform) {
return str_replace('##46#', '.', $keyfromform);
}
/**
* Return the substring of the string and take care of XHTML compliance.
*
* There was a problem with pure substr() which could possibly produce XHTML parsing error:
* substr('Marks &amp; Spencer', 0, 9) -> 'Marks &am' ... is not XHTML compliance
* This function takes care of these cases. Fixes MDL-8852.
*
* Thanks to kovacsendre, the author of the function at http://php.net/substr
*
* @param string $str The original string
* @param int $start Start position in the $value string
* @param int $length Optional length of the returned substring
* @return string The substring as returned by substr() with XHTML compliance
* @todo Seems the function does not work with negative $start together with $length being set
*/
function lang_xhtml_save_substr($str, $start, $length = NULL) {
if ($length === 0) {
//stop wasting our time ;)
return "";
}
//check if we can simply use the built-in functions
if (strpos($str, '&') === false) {
// No entities. Use built-in functions
if ($length === NULL) {
return substr($str, $start);
} else {
return substr($str, $start, $length);
}
}
// create our array of characters and html entities
$chars = preg_split('/(&[^;\s]+;)|/', $str, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_OFFSET_CAPTURE);
$html_length = count($chars);
// check if we can predict the return value and save some processing time, i.e.:
// input string was empty OR
// $start is longer than the input string OR
// all characters would be omitted
if (($html_length === 0) or ($start >= $html_length) or (isset($length) and ($length <= -$html_length))) {
return '';
}
//calculate start position
if ($start >= 0) {
$real_start = $chars[$start][1];
} else {
//start'th character from the end of string
$start = max($start,-$html_length);
$real_start = $chars[$html_length+$start][1];
}
if (!isset($length)) {
// no $length argument passed, return all remaining characters
return substr($str, $real_start);
} elseif ($length > 0) {
// copy $length chars
if ($start+$length >= $html_length) {
// return all remaining characters
return substr($str, $real_start);
} else {
//return $length characters
return substr($str, $real_start, $chars[max($start,0)+$length][1] - $real_start);
}
} else {
//negative $length. Omit $length characters from end
return substr($str, $real_start, $chars[$html_length+$length][1] - $real_start);
}
}
?>
+27 -20
View File
@@ -29,6 +29,12 @@
admin_externalpage_print_header($adminroot);
//reset and diagnose lang cache permissions
@unlink($CFG->dataroot.'/cache/languages');
if (file_exists($CFG->dataroot.'/cache/languages')) {
notify('Language cache can not be deleted, please check permissions in dataroot.');
}
get_list_of_languages(true); //refresh lang cache
switch ($mode){
@@ -44,10 +50,10 @@
$status = $cd->install(); //returns ERROR | UPTODATE | INSTALLED
switch ($status) {
case ERROR:
case ERROR:
if ($cd->get_error() == 'remotedownloadnotallowed') {
$a = new stdClass();
$a->url = 'http://download.moodle.org/lang16/'.$pack.'zip';
$a->url = 'http://download.moodle.org/lang16/'.$pack.'.zip';
$a->dest= $CFG->dataroot.'/lang';
error(get_string($cd->get_error(), 'error', $a));
} else {
@@ -56,8 +62,8 @@
break;
case INSTALLED:
@unlink($CFG->dataroot.'/cache/languages');
redirect('langimport.php', get_string('langpackupdated','admin',$pack));
get_list_of_languages(true); //refresh lang cache
redirect('langimport.php', get_string('langpackupdated','admin',$pack), -1, $adminroot);
break;
case UPTODATE:
@@ -103,14 +109,14 @@
if (file_exists($dest2)){
$rm2 = remove_dir($dest2);
}
get_list_of_languages(true); //refresh lang cache
//delete the direcotries
if ($rm1 or $rm2) {
redirect('langimport.php', get_string('langpackremoved','admin'));
redirect('langimport.php', get_string('langpackremoved','admin'), 3, $adminroot);
} else { //nothing deleted, possibly due to permission error
error('An error has occurred, language pack is not completely uninstalled, please check file permissions');
}
}
@unlink($CFG->dataroot.'/cache/languages');
break;
case UPDATE_ALL_LANG: //1 click update for all updatable language packs
@@ -120,8 +126,7 @@
$source = 'http://download.moodle.org/lang16/languages.md5';
$md5array = array();
$updated = 0; //any packs updated?
unset($CFG->langlist); // ignore admin's langlist
$alllangs = array_keys(get_list_of_languages());
$alllangs = array_keys(get_list_of_languages(false, true)); //get all available langs
$lang16 = array(); //all the Moodle 1.6 unicode lang packs (updated and not updated)
$packs = array(); //all the packs that needs updating
@@ -185,7 +190,7 @@
case ERROR:
if ($cd->get_error() == 'remotedownloadnotallowed') {
$a = new stdClass();
$a->url = 'http://download.moodle.org/lang16/'.$pack.'zip';
$a->url = 'http://download.moodle.org/lang16/'.$pack.'.zip';
$a->dest= $CFG->dataroot.'/lang';
error(get_string($cd->get_error(), 'error', $a));
} else {
@@ -208,9 +213,9 @@
}
if ($updated) {
notice(get_string('langupdatecomplete','admin'), 'langimport.php');
notice(get_string('langupdatecomplete','admin'), 'langimport.php', NULL, $adminroot);
} else {
notice(get_string('nolangupdateneeded','admin'), 'langimport.php');
notice(get_string('nolangupdateneeded','admin'), 'langimport.php', NULL, $adminroot);
}
break;
@@ -247,8 +252,7 @@
echo '<form id="uninstallform" action="langimport.php?mode=4" method="post">';
echo '<fieldset class="invisiblefieldset">';
echo '<input name="sesskey" type="hidden" value="'.sesskey().'" />';
unset($CFG->langlist); // ignore admin's langlist
$installedlangs = get_list_of_languages();
$installedlangs = get_list_of_languages(false, true);
/// display installed langs here
@@ -262,9 +266,9 @@
echo '</fieldset>';
echo '</form>';
echo '<form id="updateform" action="langimport.php?mode=5" method="post">';
echo '<fieldset class="invisiblefieldset">';
echo '<div>';
echo '<br /><input type="submit" value="'.get_string('updatelangs','admin').'" />';
echo '</fieldset>';
echo '</div>';
echo '</form>';
/// Display option to change site language
@@ -304,7 +308,7 @@
}
if ($remote) {
echo '</select>';
echo '<br /><input type="submit" value="&larr; '.get_string('install','admin').'" />';
echo '<br /><input type="submit" value="'.$THEME->larrow.' '.get_string('install','admin').'" />';
}
echo '</fieldset>';
echo '</form>';
@@ -368,13 +372,16 @@
return false; //failed
}
fputs($proxy_fp, "GET $url HTTP/1.0\r\nHost: $CFG->proxyhost\r\n\r\n");
$i = 0;
while(!feof($proxy_fp)) {
$headers_done = false;
while(!feof($proxy_fp)) {
$string = fgets($proxy_fp, 1024);
if ($i > 11) { //12 lines of info skipped
if(!$headers_done){
// A new line indicates end of HTTP headers
$headers_done = ("\r\n" == $string);
} else {
$availablelangs[] = split(',', $string);
}
$i++;
}
fclose($proxy_fp);
+3 -7
View File
@@ -127,15 +127,11 @@ $warn = '';
if (empty($CFG->mnet_dispatcher_mode) || $CFG->mnet_dispatcher_mode !== 'strict') {
$warn = '<p>' . get_string('mnetdisabled','mnet') .'</p>';
}
if (empty($CFG->auth_plugins_enabled)) {
if (!is_enabled_auth('mnet')) {
$warn .= '<p>' . get_string('authmnetdisabled','mnet').'</p>';
} else {
$auths = explode(',', $CFG->auth_plugins_enabled);
if (!in_array('mnet', $auths)) {
$warn .= '<p>' . get_string('authmnetdisabled','mnet').'</p>';
}
unset($auths);
}
if (get_config('auth/mnet', 'auto_add_remote_users') != true) {
$warn .= '<p>' . get_string('authmnetautoadddisabled','mnet').'</p>';
}
+2 -2
View File
@@ -29,7 +29,7 @@ function mnet_get_functions($type, $parentname) {
$docname = 'rpclib.php';
$relname = '/mod/'.$parentname.'/'.$docname;
$filename = $CFG->dirroot.$relname;
if (file_exists($filename)) include $filename;
if (file_exists($filename)) include_once $filename;
$mnet_publishes = $parentname.'_mnet_publishes';
if (function_exists($mnet_publishes)) {
(array)$publishes = $mnet_publishes();
@@ -38,7 +38,7 @@ function mnet_get_functions($type, $parentname) {
// auth or enrol
$relname = '/'.$type.'/'.$parentname.'/'.$docname;
$filename = $CFG->dirroot.$relname;
if (file_exists($filename)) include $filename;
if (file_exists($filename)) include_once $filename;
$class = $type.($type=='enrol'? 'ment':'').'_plugin_'.$parentname;
if (class_exists($class)) {
$object = new $class();
+5 -5
View File
@@ -5,8 +5,8 @@ print_header("$site->shortname: $strmnetsettings", "$site->fullname",
print_heading(get_string('mnetsettings', 'mnet'));
?>
<center>
<table align="center" class="generalbox" border="0" cellpadding="5" cellspacing="0">
<div id="trustedhosts"><!-- See theme/standard/styles_layout.css #trustedhosts .generaltable for rules -->
<table class="generalbox standard" border="0" cellpadding="5" cellspacing="0">
<tr>
<td class="generalboxcontent">
<table cellpadding="9" cellspacing="0" >
@@ -14,7 +14,7 @@ print_heading(get_string('mnetsettings', 'mnet'));
<td colspan="2" class="header" cellpadding="0"><span><?php print_string('deleteaserver', 'mnet'); ?>Deleting a Server</span></td>
</tr>
<?php
if (count($warn) > 0):
if (count($warn) > 0){
?>
<tr valign="top">
<td align="right" colspan="2"><?php print_string('receivedwarnings','mnet'); ?>:<br />
@@ -22,7 +22,7 @@ print_heading(get_string('mnetsettings', 'mnet'));
</td>
</tr>
<?php
endif;
}
?>
<tr valign="top">
<td colspan="2"><?php print_string('reallydeleteserver','mnet'); ?>: "<?php echo $mnet_peer->name; ?>"?</td>
@@ -46,7 +46,7 @@ print_heading(get_string('mnetsettings', 'mnet'));
</td>
</tr>
</table>
</center>
</div>
<?php
print_footer();
?>
+3 -1
View File
@@ -1,10 +1,11 @@
<form id="assignform" method="post" action="">
<div id="trustedhosts"><!-- See theme/standard/styles_layout.css #trustedhosts .generaltable for rules -->
<input type="hidden" name="previoussearch" value="<?php p($previoussearch) ?>" />
<input type="hidden" name="courseid" value="<?php p($courseid) ?>" />
<input type="hidden" name="host" value="<?php p($mnet_peer->id) ?>" />
<input type="hidden" name="sesskey" value="<?php p(sesskey()) ?>" />
<table align="center" border="0" cellpadding="5" cellspacing="0">
<table class="generaltable" border="0" cellpadding="5" cellspacing="0">
<tr>
<td valign="top">
<?php print_string('existingusers', 'role', count($mnetenrolledusers)); ?>
@@ -99,4 +100,5 @@
<td valign="top"></td>
</tr>
</table>
</div>
</form>
+1 -1
View File
@@ -258,7 +258,7 @@ $strsearchresults = get_string('searchresults');
admin_externalpage_print_header($adminroot);
print_box('<strong>' . s($mnet_peer->name) . ' : '
. s($course->shortname) .' '. s($course->fullname)
. format_string($course->shortname) .' '. format_string($course->fullname)
. '</strong><br />'
. get_string("enrolcourseenrol_desc", "mnet"));
+8 -7
View File
@@ -29,9 +29,10 @@
print_box('<strong>' . s($host->name) . ' </strong><br />'
. get_string("enrolcourses_desc", "mnet"));
echo "<hr />";
echo '<hr />';
print ('<table align="center" >');
echo '<div id="trustedhosts"><!-- See theme/standard/styles_layout.css #trustedhosts .generaltable for rules -->'
. '<table class="generaltable">';
$icon = "<img src=\"$CFG->pixpath/i/course.gif\"".
" class=\"icon\" alt=\"".get_string("course")."\" />";
@@ -39,18 +40,18 @@
foreach ($courses as $course) {
$link = $CFG->wwwroot . '/admin/mnet/enr_course_enrol.php?'
. "host={$mnethost}&amp;courseid={$course->id}&amp;sesskey={$USER->sesskey}";
print ('<tr>'
echo '<tr>'
. "<td>$icon</td>"
. "<td><a href=\"$link\">".s($course->fullname). "</a></td>"
. "<td><a href=\"$link\">".format_string($course->fullname). "</a></td>"
. '</tr><tr>'
. '<td></td>'
. '<td>'.s($course->shortname). ' - ' .s($course->cat_name).'</td>'
. '<td>'.format_string($course->shortname). ' - ' .format_string($course->cat_name).'</td>'
. '</tr><tr>'
. '<td></td>'
. "<td align=\"left\" >{$course->summary}</td>"
. '</tr>');
. '</tr>';
}
print ('</table>');
echo '</table></div>';
admin_externalpage_print_footer($adminroot);
+8 -6
View File
@@ -22,19 +22,20 @@
print_box(get_string("remoteenrolhosts_desc", "mnet"));
echo "<hr />";
echo '<hr />';
if (empty($CFG->mnet_dispatcher_mode) || $CFG->mnet_dispatcher_mode !== 'strict') {
print_box(get_string('mnetdisabled','mnet'));
}
print ('<table align="center" cellspacing="0" cellpadding="5" width="500" id="hosts" class="generaltable generalbox" >'
echo '<div id="trustedhosts"><!-- See theme/standard/styles_layout.css #trustedhosts .generaltable for rules -->'
. '<table cellspacing="0" cellpadding="5" id="hosts" class="generaltable generalbox" >'
. '<tr>'
. '<th class="header c0"> '.get_string('host', 'mnet').' </th>'
. '<th class="header c1"> '.get_string('enrolments', 'mnet').' </th>'
. '<th class="header c2"> '.get_string('courses', 'mnet').' </th>'
// . '<th class="header c3"> &nbsp; </th>'
. '</tr>');
. '</tr>';
$hosts = $enrolment->list_remote_servers();
foreach ($hosts as $host) {
$coursesurl = "{$CFG->wwwroot}/admin/mnet/enr_courses.php?host={$host->id}&amp;sesskey={$USER->sesskey}";
@@ -44,16 +45,17 @@
}
$enrolcount = get_field_sql("SELECT count(id) FROM {$CFG->prefix}mnet_enrol_assignments WHERE hostid={$host->id}");
print ('<tr>'
echo '<tr>'
. "<td><a href=\"{$coursesurl}\">{$host->name}</a></td>"
. "<td align=\"center\" >$enrolcount</td>"
. "<td align=\"center\" >$coursecount - <a href=\"{$coursesurl}\">".get_string('editenrolments', 'mnet')."</a></td>"
// TODO: teach report/log/index.php to show per-host-logs
// . '<td align="center" ><a href="{$CFG->wwwroot}/admin/report/log/index.php?course_host={$host->id}">'
// . get_string('logs', 'mnet').'</a> </td>'
. '</tr>');
. '</tr>';
}
print ('</table>');
echo '</table>'
. '</div>';
admin_externalpage_print_footer($adminroot);
+3 -3
View File
@@ -40,7 +40,7 @@
/// If data submitted, process and store
if (($form = data_submitted()) && confirm_sesskey()) {
if (!empty($form->submit) && $form->submit == get_string('savechanges')) {
if (in_array($form->mode, array("off", "strict", "promiscuous"))) {
if (in_array($form->mode, array("off", "strict", "dangerous"))) {
if (set_config('mnet_dispatcher_mode', $form->mode)) {
redirect('index.php', get_string('changessaved'));
} else {
@@ -112,8 +112,8 @@
<tr valign="top">
<td align="right"><?php print_string('net', 'mnet'); ?>:</td>
<td><input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<input type="radio" name="mode" value="off" <?php echo ("off" == $CFG->mnet_dispatcher_mode)? 'checked="true"' : '' ?> /> <?php print_string('off', 'mnet'); ?> <br />
<input type="radio" name="mode" value="strict" <?php echo ("strict" == $CFG->mnet_dispatcher_mode)? 'checked="true"' : '' ?> /> <?php print_string('on', 'mnet'); ?><br />
<input type="radio" name="mode" value="off" <?php echo ("off" == $CFG->mnet_dispatcher_mode)? 'checked="checked"' : '' ?> /> <?php print_string('off', 'mnet'); ?> <br />
<input type="radio" name="mode" value="strict" <?php echo ("strict" == $CFG->mnet_dispatcher_mode)? 'checked="checked"' : '' ?> /> <?php print_string('on', 'mnet'); ?><br />
<input type="submit" name="submit" value="<?php print_string('savechanges'); ?>" />
</td>
</tr>
+11 -9
View File
@@ -19,6 +19,7 @@ print_tabs(array($tabs), 'mnetdetails');
print_simple_box_start("center", "");
?>
<form method="post" action="peers.php">
<div>
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<input type="hidden" name="step" value="commit" />
<input type="hidden" name="last_connect_time" value="<?php echo $mnet_peer->last_connect_time; ?>" />
@@ -74,7 +75,7 @@ if (isset($mnet_peer->deleted) && $mnet_peer->deleted > 0) {
</tr>
<?php
if(!empty($currentkey)):
if(!empty($currentkey)) {
?>
<tr>
<td align="right" valign="top"></td>
@@ -85,30 +86,30 @@ if(!empty($currentkey)):
<td valign="top"><pre style="font-size: 8px;"><?php echo $currentkey;?></pre></td>
</tr>
<?php
endif;
}
if (isset($mnet_peer->id) && $mnet_peer->id > 0):
if (isset($mnet_peer->id) && $mnet_peer->id > 0) {
?>
<tr>
<td align="right" valign="top"><?php print_string('last_connect_time', 'mnet'); ?>:</td>
<td valign="top"><?php echo ($mnet_peer->last_connect_time == 0)? get_string('never','mnet') : date('H:i:s d/m/Y',$mnet_peer->last_connect_time);?></td>
</tr>
<?php
endif;
}
if (isset($mnet_peer->deleted) && $mnet_peer->deleted > 0):
if (isset($mnet_peer->deleted) && $mnet_peer->deleted > 0){
?>
<tr>
<td align="right" valign="top"><?php print_string('deleted'); ?>:</td>
<td valign="top">
<input type="radio" name="deleted" value="0" checked="true" /> <?php print_string('reenableserver','mnet'); ?><br />
<input type="radio" name="deleted" value="0" checked="checked" /> <?php print_string('reenableserver','mnet'); ?><br />
<input type="radio" name="deleted" value="1" /> <?php print_string('yes'); ?><br />
</td>
</tr>
<?php
endif;
}
if (isset($mnet_peer->ip_address) && '' != $mnet_peer->ip_address):
if (isset($mnet_peer->ip_address) && '' != $mnet_peer->ip_address){
?>
<tr>
<td align="right" valign="top"><?php print_string('ipaddress', 'mnet');
@@ -119,13 +120,14 @@ if (isset($mnet_peer->ip_address) && '' != $mnet_peer->ip_address):
</tr>
<?php
endif;
}
?>
<tr>
<td></td>
<td><input type="submit" value="<?php print_string("savechanges"); ?>" /></td>
</tr>
</table>
</div>
</form>
<?php
print_simple_box_end();
+31 -8
View File
@@ -16,21 +16,22 @@ print_simple_box_start("center", "");
?>
<form method="post" action="mnet_services.php">
<div>
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<input type="hidden" name="step" value="<?php echo $mnet_peer->nextstep; ?>" />
<input type="hidden" name="hostid" value="<?php echo ($mnet_peer->id)? $mnet_peer->id : '0' ; ?>" />
<table cellpadding="9" cellspacing="0" >
<?php
foreach($myservices as $name => $versions):
foreach($myservices as $name => $versions) {
$version = current($versions);
?>
<tr>
<td align="left" valign="top" colspan="2">
<h3><?php echo get_string($name.'_name', $version['parent_type'].'_'.$version['parent'] , $mnet_peer->name); ?></h3>
<p><?php echo get_string($name.'_description', $version['parent_type'].'_'.$version['parent'], $mnet_peer->name); ?></p>
<?php echo get_string($name.'_description', $version['parent_type'].'_'.$version['parent'], $mnet_peer->name); ?>
<?php
$breakstring = '';
foreach($versions as $version):
foreach($versions as $version){
if (count($versions) > 1) {
$versionstring = '('.get_string('version','mnet') .' '.$version['apiversion'].')';
} else {
@@ -40,16 +41,37 @@ print_simple_box_start("center", "");
echo $breakstring;
?>
<input type="hidden" name="exists[<?php echo $version['serviceid']; ?>]" value="1" />
<input type="checkbox" name="publish[<?php echo $version['serviceid']; ?>]" <?php echo (!empty($version['I_publish']))? 'checked="checked" ': '' ; ?>/><?php print_string('publish','mnet'); ?><?php echo $versionstring; if (!empty($version['hostsubscribes'])) echo '<a href="#" title="'.get_string('issubscribed','mnet', $mnet_peer->name).'">&radic;</a> '; if (!empty($version['allhosts_publish'])) print_string("enabled_for_all",'mnet',!empty($version['I_publish'])); ?><br />
<input type="checkbox" name="subscribe[<?php echo $version['serviceid']; ?>]" <?php echo (!empty($version['I_subscribe']))? 'checked="checked" ': '' ; ?>/><?php print_string('subscribe','mnet'); ?><?php echo $versionstring; if (!empty($version['hostpublishes'])) echo '<a href="#" title="'.get_string('ispublished','mnet', $mnet_peer->name).'">&radic;</a> '; if (!empty($version['allhosts_subscribe'])) print_string("enabled_for_all",'mnet',!empty($version['I_subscribe'])); ?><br />
<?php
<input type="checkbox" name="publish[<?php echo $version['serviceid']; ?>]" <?php echo (!empty($version['I_publish']))? 'checked="checked" ': '' ; ?>/>
<?php
print_string('publish','mnet');
echo $versionstring;
if (!empty($version['hostsubscribes'])) {
echo '<a href="#" title="'.get_string('issubscribed','mnet', $mnet_peer->name).'">&radic;</a> ';
}
if (!empty($version['allhosts_publish'])) {
print_string("enabled_for_all",'mnet',!empty($version['I_publish']));
}
echo '<br />';
?>
<input type="checkbox" name="subscribe[<?php echo $version['serviceid']; ?>]" <?php echo (!empty($version['I_subscribe']))? 'checked="checked" ': '' ; ?>/>
<?php
print_string('subscribe','mnet');
echo $versionstring;
if (!empty($version['hostpublishes'])) {
echo '<a href="#" title="'.get_string('ispublished','mnet', $mnet_peer->name).'">&radic;</a> ';
}
if (!empty($version['allhosts_subscribe'])) {
print_string("enabled_for_all",'mnet',!empty($version['I_subscribe']));
}
echo '<br />';
$breakstring = '. . . . . . . . . . . . . . . . . . . . . . . . <br>';
endforeach;
} // end foreach
?>
</td>
</tr>
<?php
endforeach;
} // end foreach
?>
<tr>
<td align="left" valign="top" colspan="2">
@@ -70,6 +92,7 @@ print_simple_box_start("center", "");
</td>
</tr>
</table>
</div>
</form>
<?php
print_simple_box_end();
+8 -1
View File
@@ -48,7 +48,14 @@
$publish = (isset($_POST['publish'][$key]) && $_POST['publish'][$key] == 'on')? 1 : 0;
$subscribe = (isset($_POST['subscribe'][$key]) && $_POST['subscribe'][$key] == 'on')? 1 : 0;
if (false == $host2service && ($publish == 1 || $subscribe == 1)) {
if ($publish != 1 && $subscribe != 1) {
if (false == $host2service) {
// We don't have or need a record - do nothing!
} else {
// We don't need the record - delete it
delete_records('mnet_host2service', 'hostid', $_POST['hostid'], 'serviceid', $key);
}
} elseif (false == $host2service && ($publish == 1 || $subscribe == 1)) {
$host2service = new stdClass();
$host2service->hostid = $_POST['hostid'];
$host2service->serviceid = $key;
+59 -54
View File
@@ -5,36 +5,38 @@ if (empty($CFG->mnet_dispatcher_mode) || $CFG->mnet_dispatcher_mode !== 'strict'
print_box(get_string('mnetdisabled','mnet'));
}
?>
<center>
<form method="post" action="peers.php">
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<input type="hidden" name="updateregisterall" value="1" />
<table cellspacing="0" cellpadding="5" width="500" id="hosts" class="generaltable generalbox" >
<tr>
<th class="header c0" nowrap="nowrap" colspan="2"><?php print_string('registerallhosts', 'mnet'); ?></th>
</tr>
<tr>
<td class="cell c1" colspan="2"><?php print_string('registerallhostsexplain', 'mnet'); ?></td>
</tr>
<tr>
<td class="cell c1"><input type="checkbox" name="registerallhosts" <?php if (!empty($CFG->mnet_register_allhosts)) echo 'checked="checked" '; ?>/></td>
<td class="cell c1"> <?php print_string('registerallhosts', 'mnet'); ?> </td>
</tr>
<tr>
<td align="right" colspan="2"><input type="submit" name="submit" value="<?php print_string('savechanges'); ?>" /></td>
</tr>
</table>
</form>
<table cellspacing="0" cellpadding="5" id="hosts" class="generaltable generalbox" >
<tr>
<th class="header c0" nowrap="nowrap"><?php print_string('site'); ?></th>
<th class="header c1" nowrap="nowrap"><?php print_string('system','mnet'); ?></th>
<th class="header c2" nowrap="nowrap"><?php print_string('last_connect_time', 'mnet'); ?></th>
<th class="header c3" nowrap="nowrap"></th>
</tr>
<div id="trustedhosts"><!-- See theme/standard/styles_layout.css #trustedhosts .generaltable for rules -->
<form method="post" action="peers.php">
<div>
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<input type="hidden" name="updateregisterall" value="1" />
<table cellspacing="0" cellpadding="5" class="generaltable generalbox" >
<tr>
<th class="header c0" colspan="2"><?php print_string('registerallhosts', 'mnet'); ?></th>
</tr>
<tr>
<td class="cell c1" colspan="2"><?php print_string('registerallhostsexplain', 'mnet'); ?></td>
</tr>
<tr>
<td class="cell c1"><input type="checkbox" name="registerallhosts" <?php if (!empty($CFG->mnet_register_allhosts)) echo 'checked="checked" '; ?>/></td>
<td class="cell c1"> <?php print_string('registerallhosts', 'mnet'); ?> </td>
</tr>
<tr>
<td align="right" colspan="2"><input type="submit" name="submit" value="<?php print_string('savechanges'); ?>" /></td>
</tr>
</table>
</div>
</form>
<table cellspacing="0" cellpadding="5" class="generaltable generalbox standard" >
<tr>
<th class="header c0"><?php print_string('site'); ?></th>
<th class="header c1"><?php print_string('system','mnet'); ?></th>
<th class="header c2"><?php print_string('last_connect_time', 'mnet'); ?></th>
<th class="header c3"></th>
</tr>
<?php
foreach($hosts as $host):
foreach($hosts as $host) {
if ($host->last_connect_time == 0) {
$last_connect = get_string('never');
@@ -46,43 +48,46 @@ if (empty($CFG->mnet_dispatcher_mode) || $CFG->mnet_dispatcher_mode !== 'strict'
<tr>
<td class="cell c0"><a href="peers.php?step=update&amp;hostid=<?php echo $host->id; ?>"><?php echo $host->name; ?></a></td>
<td class="cell c1"><a href="peers.php?step=update&amp;hostid=<?php echo $host->id; ?>"><?php echo $host->wwwroot; ?></a></td>
<td class="cell c2" nowrap="nowrap"><?php if ($host->id != $CFG->mnet_all_hosts_id) echo $last_connect; ?></td>
<td class="cell c2"><?php if ($host->id != $CFG->mnet_all_hosts_id) echo $last_connect; ?></td>
<td class="cell c3">
<?php if ($host->id != $CFG->mnet_all_hosts_id): ?>
<?php if ($host->id != $CFG->mnet_all_hosts_id){ ?>
<form method="post" action="delete.php">
<div>
<input type="hidden" name="hostid" value="<?php echo $host->id; ?>" />
<input type="hidden" name="step" value="verify" />
<input type="submit" name="submit" value="<?php print_string('delete'); ?>"/>
</div>
</form>
<?php endif; ?>
<?php } ?>
</td>
</tr>
<?php
endforeach;
}
?>
<tr>
<td class="cell c4" colspan="4">&nbsp;</td>
</tr>
</table>
<form method="post" action="peers.php">
<tr>
<th class="header c4" nowrap="nowrap" colspan="4">
<?php print_string('addnewhost', 'mnet'); ?>
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<input type="hidden" name="step" value="input" />
</th>
</tr>
<tr>
<td class="cell c0"></td>
<td class="cell c1"><input type="text" name="wwwroot" value="" /></td>
<td class="cell c2"></td>
<td class="cell c3"></td>
</tr>
<tr>
<td class="cell c4" align="right" colspan="4"><input type="submit" value="<?php print_string('addhost','mnet'); ?>" /></td>
</tr>
<table cellspacing="0" cellpadding="5" class="generaltable generalbox standard" >
<tr>
<th class="header c4" colspan="4">
<?php print_string('addnewhost', 'mnet'); ?>
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<input type="hidden" name="step" value="input" />
</th>
</tr>
<tr>
<td class="cell c0">wwwroot:</td>
<td class="cell c1"><input type="text" name="wwwroot" value="" /></td>
<td class="cell c2"></td>
<td class="cell c3"></td>
</tr>
<tr>
<td class="cell c4" align="right" colspan="4"><input type="submit" value="<?php print_string('addhost','mnet'); ?>" /></td>
</tr>
</table>
</form>
</table>
</center>
</div>
<?php
admin_externalpage_print_footer($adminroot);
?>
?>
+12
View File
@@ -50,7 +50,19 @@ if (($form = data_submitted()) && confirm_sesskey()) {
if (!empty($form->wwwroot)) {
// ensure we remove trailing slashes
$form->wwwroot = preg_replace(':/$:', '', $form->wwwroot);
// ensure the wwwroot starts with a http or https prefix
if (strtolower(substr($form->wwwroot, 0, 4)) != 'http') {
$form->wwwroot = 'http://'.$form->wwwroot;
}
}
if(!function_exists('xmlrpc_encode_request')) {
trigger_error("You must have xml-rpc enabled in your PHP build to use this feature.");
error(get_string('xmlrpc-missing', 'mnet'),'peers.php');
exit;
}
if (!empty($form->updateregisterall)) {
if (!empty($form->registerallhosts)) {
set_config('mnet_register_allhosts',1);
+25 -19
View File
@@ -1,36 +1,39 @@
<?php
admin_externalpage_print_header($adminroot);
?>
<center>
<table cellspacing="0" cellpadding="5" width="500" id="hosts" class="generaltable generalbox" >
<div id="trustedhosts"><!-- See theme/standard/styles_layout.css #trustedhosts .generaltable for rules -->
<table cellspacing="0" cellpadding="5" class="generaltable generalbox" >
<tr>
<th class="header c0" nowrap="nowrap" colspan="2"><?php print_string('trustedhosts', 'mnet'); ?></th>
<th class="header c0" colspan="2"><?php print_string('trustedhosts', 'mnet'); ?></th>
</tr>
<tr>
<td class="cell c1" colspan="2"><?php print_string('trustedhostsexplain', 'mnet'); ?></td>
</tr>
<tr>
<td class="cell c1" colspan="2"><form method="post" action="trustedhosts.php">
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<textarea name="hostlist" cols="40" rows="20"><?php echo $trusted_hosts; ?></textarea><br />
<input type="submit" value="<?php print_string('savechanges'); ?>" />
<td class="cell c1" colspan="2">
<form method="post" action="trustedhosts.php">
<div>
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<textarea name="hostlist" cols="40" rows="20"><?php echo $trusted_hosts; ?></textarea><br />
<input type="submit" value="<?php print_string('savechanges'); ?>" />
</div>
</form>
</td>
</tr>
</table>
<table cellspacing="0" cellpadding="5" width="500" id="hosts" class="generaltable generalbox" >
<table cellspacing="0" cellpadding="5" class="generaltable generalbox" >
<tr>
<th class="header c0" nowrap="nowrap" colspan="2"><?php print_string('testtrustedhosts', 'mnet'); ?></th>
<th class="header c0" colspan="2"><?php print_string('testtrustedhosts', 'mnet'); ?></th>
</tr>
<?php
if (!empty($test_ip_address)):
if (!empty($test_ip_address)){
?>
<tr>
<td class="cell c1" colspan="2">
<?php
if ($in_range) {
print_string('is_in_range', 'mnet', $test_ip_address);
echo '<br>';
echo '<br />';
print_string('validated_by', 'mnet', $validated_by);
} else {
print_string('not_in_range', 'mnet', $test_ip_address);
@@ -39,24 +42,27 @@ admin_externalpage_print_header($adminroot);
</td>
</tr>
<?php
else:
} else {
?>
<tr>
<td class="cell c1" colspan="2"><?php print_string('testtrustedhostsexplain', 'mnet'); ?></td>
</tr>
<?php
endif;
}
?>
<tr>
<td class="cell c1" colspan="2"><form method="get" action="trustedhosts.php">
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<input type="text" name="testipaddress" value="<?php echo $test_ip_address; ?>" />
<input type="submit" value="<?php print_string('go'); ?>" />
<td class="cell c1" colspan="2">
<form method="get" action="trustedhosts.php">
<div>
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<input type="text" name="testipaddress" value="<?php echo $test_ip_address; ?>" />
<input type="submit" value="<?php print_string('go'); ?>" />
</div>
</form>
</td>
</tr>
</table>
</center>
</div>
<?php
admin_externalpage_print_footer($adminroot);
?>
?>
-1
View File
@@ -49,7 +49,6 @@
/// If data submitted, process and store
if (($form = data_submitted()) && confirm_sesskey()) {
echo 'a';
$hostlist = preg_split("/[\s,]+/", $form->hostlist);
foreach($hostlist as $host) {
list($address, $mask) = explode('/', $host.'/');
+3 -3
View File
@@ -16,7 +16,7 @@
}
if ($module != '') {
require_once("$CFG->dirroot/mod/$module/lib.php");
include_once("$CFG->dirroot/mod/$module/lib.php");
// if the config.html contains a hidden form field giving
// the module name then the form does not have to prefix all
// its variable names, we will do it here.
@@ -43,7 +43,7 @@
/// Otherwise print the form.
$module = required_param('module', PARAM_SAFEDIR);
require_once("$CFG->dirroot/mod/$module/lib.php");
include_once("$CFG->dirroot/mod/$module/lib.php");
$strmodulename = get_string("modulename", $module);
@@ -55,7 +55,7 @@
print_heading($strmodulename);
print_simple_box("<center>".get_string("configwarning", 'admin')."</center>", "center", "60%");
print_simple_box(get_string("configwarning", 'admin'), "center", "60%");
echo "<br />";
print_simple_box_start("center", "");
+71 -32
View File
@@ -2,10 +2,15 @@
// Allows the admin to manage activity modules
require_once('../config.php');
require_once('../course/lib.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/tablelib.php');
// defines
define('MODULE_TABLE','module_administration_table');
$adminroot = admin_get_root();
admin_externalpage_setup('managemodules', $adminroot);
require_once('../course/lib.php');
$show = optional_param('show', '', PARAM_SAFEDIR);
$hide = optional_param('hide', '', PARAM_SAFEDIR);
@@ -23,34 +28,51 @@
$strsettings = get_string("settings");
$stractivities = get_string("activities");
$stractivitymodule = get_string("activitymodule");
$strshowmodulecourse = get_string('showmodulecourse');
admin_externalpage_print_header($adminroot);
print_heading($stractivities);
$coursesaffected = false;
/// If data submitted, then process and store.
if (!empty($hide) and confirm_sesskey()) {
if (!$module = get_record("modules", "name", $hide)) {
error("Module doesn't exist!");
}
set_field("modules", "visible", "0", "id", $module->id); // Hide main module
set_field('course_modules', 'visibleold', '1', 'visible' ,'1', 'module', $module->id); // Remember the previous visible state so we can toggle this back if the module is unhidden.
set_field('course_modules', 'visibleold', '0', 'visible' ,'0', 'module', $module->id);
set_field("course_modules", "visible", "0", "module", $module->id); // Hide all related activity modules
$coursesaffected = true;
set_field("modules", "visible", "0", "id", $module->id); // Hide main module
// Remember the visibility status in visibleold
// and hide...
$sql = "UPDATE {$CFG->prefix}course_modules
SET visibleold=visible,
visible=0
WHERE module={$module->id}";
execute_sql($sql, false);
// clear the course modinfo cache for courses
// where we just deleted something
$sql = "UPDATE {$CFG->prefix}course
SET modinfo=''
WHERE id IN (SELECT DISTINCT course
FROM {$CFG->prefix}course_modules
WHERE visibleold=1 AND module={$module->id})";
execute_sql($sql, false);
}
if (!empty($show) and confirm_sesskey()) {
if (!$module = get_record("modules", "name", $show)) {
error("Module doesn't exist!");
}
set_field("modules", "visible", "1", "id", $module->id); // Show main module
set_field('course_modules', 'visible', '1', 'visibleold', '1', 'module', $module->id); // Get the previous saved visible state for the course module.
$coursesaffected = true;
set_field("modules", "visible", "1", "id", $module->id); // Show main module
set_field('course_modules', 'visible', '1', 'visibleold',
'1', 'module', $module->id); // Get the previous saved visible state for the course module.
// clear the course modinfo cache for courses
// where we just made something visible
$sql = "UPDATE {$CFG->prefix}course
SET modinfo=''
WHERE id IN (SELECT DISTINCT course
FROM {$CFG->prefix}course_modules
WHERE visible=1 AND module={$module->id})";
execute_sql($sql, false);
}
if (!empty($delete) and confirm_sesskey()) {
@@ -83,6 +105,15 @@
}
}
// clear course.modinfo for courses
// that used this module...
$sql = "UPDATE {$CFG->prefix}course
SET modinfo=''
WHERE id IN (SELECT DISTINCT course
FROM {$CFG->prefix}course_modules
WHERE module={$module->id})";
execute_sql($sql, false);
// Now delete all the course module records
if (!delete_records("course_modules", "module", $module->id)) {
notify("Error occurred while deleting all $strmodulename records in course_modules table");
@@ -118,20 +149,12 @@
// Delete the capabilities that were defined by this module
capabilities_cleanup('mod/'.$module->name);
// rebuild_course_cache(); // Because things have changed
$coursesaffected = true;
$a->module = $strmodulename;
$a->directory = "$CFG->dirroot/mod/$delete";
notice(get_string("moduledeletefiles", "", $a), "modules.php");
}
}
if ($coursesaffected) {
rebuild_course_cache(); // Because things have changed
}
/// Get and sort the existing modules
if (!$modules = get_records("modules")) {
@@ -149,12 +172,14 @@
ksort($modulebyname);
/// Print the table of all modules
$table->head = array ($stractivitymodule, $stractivities, $strversion, "$strhide/$strshow", $strdelete, $strsettings);
$table->align = array ("left", "right", "left", "center", "center", "center");
$table->wrap = array ("nowrap", "", "", "", "","");
$table->size = array ("100%", "10", "10", "10", "10","12");
$table->width = "100";
// construct the flexible table ready to display
$table = new flexible_table(MODULE_TABLE);
$table->define_columns(array('name', 'instances', 'version', 'hideshow', 'delete', 'settings'));
$table->define_headers(array($stractivitymodule, $stractivities, $strversion, "$strhide/$strshow", $strdelete, $strsettings));
$table->define_baseurl($CFG->wwwroot.'/'.$CFG->admin.'/modules.php');
$table->set_attribute('id', 'modules');
$table->set_attribute('class', 'generaltable generalbox boxaligncenter boxwidthwide');
$table->setup();
foreach ($modulebyname as $modulename => $module) {
@@ -169,7 +194,14 @@
$settings = "";
}
$count = count_records("$module->name");
$count = count_records_select("$module->name",'course<>0');
if ($count>0) {
$countlink = "<a href=\"{$CFG->wwwroot}/course/search.php?modulelist=$module->name" .
"&amp;sesskey={$USER->sesskey}\" title=\"$strshowmodulecourse\">$count</a>";
}
else {
$countlink = "$count";
}
if ($module->visible) {
$visible = "<a href=\"modules.php?hide=$module->name&amp;sesskey=$USER->sesskey\" title=\"$strhide\">".
@@ -178,18 +210,25 @@
} else {
$visible = "<a href=\"modules.php?show=$module->name&amp;sesskey=$USER->sesskey\" title=\"$strshow\">".
"<img src=\"$CFG->pixpath/i/show.gif\" class=\"icon\" alt=\"$strshow\" /></a>";
$class = "class=\"dimmed_text\"";
$class = " class=\"dimmed_text\"";
}
if ($module->name == "forum") {
$delete = "";
$visible = "";
$class = "";
}
$table->data[] = array ("<span $class>$icon $modulename</span>", $count, $module->version, $visible, $delete, $settings);
}
print_table($table);
echo "<br /><br />";
$table->add_data(array(
'<span'.$class.'>'.$icon.' '.$modulename.'</span>',
$countlink,
'<span'.$class.'>'.$module->version.'</span>',
$visible,
$delete,
$settings
));
}
$table->print_html();
admin_externalpage_print_footer($adminroot);
+19 -7
View File
@@ -42,7 +42,7 @@ while(@ob_end_flush());
echo '<strong>Progress:</strong>';
$i = 0;
$skiptables = array($CFG->prefix.'config');//, $CFG->prefix.'sessions2');
$skiptables = array($CFG->prefix.'config', $CFG->prefix.'user_students', $CFG->prefix.'user_teachers');//, $CFG->prefix.'sessions2');
foreach ($tables as $table) {
if (($CFG->prefix && strpos($table, $CFG->prefix) !== 0)
@@ -63,12 +63,8 @@ foreach ($tables as $table) {
if ($rs and $rs->RecordCount() > 0) {
while (!$rs->EOF) {
$text = $rs->fields[$column];
$search = '/(<(?:lang|span) lang="[a-zA-Z0-9_-]*".*?>.+?<\/(?:lang|span)>)(\s*<(?:lang|span) lang="[a-zA-Z0-9_-]*".*?>.+?<\/(?:lang|span)>)+/is';
$newtext = preg_replace_callback($search, 'multilangupgrade_impl', $text);
if ($newtext != $text) {
$newtext = addslashes($newtext);
execute_sql("UPDATE $table SET $column='$newtext' WHERE id=".$rs->fields['id'], false);
}
$id = $rs->fields['id'];
if ($i % 600 == 0) {
echo '<br />';
}
@@ -77,6 +73,22 @@ foreach ($tables as $table) {
}
$i++;
$rs->MoveNext();
if (empty($text) or is_numeric($text)) {
continue; // nothing to do
}
$search = '/(<(?:lang|span) lang="[a-zA-Z0-9_-]*".*?>.+?<\/(?:lang|span)>)(\s*<(?:lang|span) lang="[a-zA-Z0-9_-]*".*?>.+?<\/(?:lang|span)>)+/is';
$newtext = preg_replace_callback($search, 'multilangupgrade_impl', $text);
if (is_null($newtext)) {
continue; // regex error
}
if ($newtext != $text) {
$newtext = addslashes($newtext);
execute_sql("UPDATE $table SET $column='$newtext' WHERE id=$id", false);
}
}
}
}
+2 -2
View File
@@ -46,7 +46,7 @@ function online_assignment_cleanup($output=false) {
/// get a list of all courses on this site
$courses = get_courses();
$courses = get_records('course');
/// cycle through each course
foreach ($courses as $course) {
@@ -99,7 +99,7 @@ function online_assignment_cleanup($output=false) {
/// grab the section record
if (!($section = get_record('course_sections', 'id', $newsection))) {
if ($output) echo 'Serious error: Cannot retrieve section: '.$newsection.' for course: '.$course->fullname.'<br />';
if ($output) echo 'Serious error: Cannot retrieve section: '.$newsection.' for course: '. format_string($course->fullname) .'<br />';
continue;
}
+4 -3
View File
@@ -116,11 +116,12 @@ class page_admin extends page_base {
$this->init_full($section); // we're trusting that init_full() has already been called by now; it should have.
// if not, print_header() has to be called with a $section parameter
if ($this->user_allowed_editing()) {
// The search page currently doesn't handle block editing
if ($this->section != 'search' and $this->user_allowed_editing()) {
$buttons = '<div><form '.$CFG->frametarget.' method="get" action="' . $this->url_get_path() . '">'.
'<fieldset class="invisiblefieldset"><input type="hidden" name="adminedit" value="'.($this->user_is_editing()?'off':'on').'" />'.
'<div><input type="hidden" name="adminedit" value="'.($this->user_is_editing()?'off':'on').'" />'.
'<input type="hidden" name="section" value="'.$this->section.'" />'.
'<input type="submit" value="'.get_string($this->user_is_editing()?'blockseditoff':'blocksediton').'" /></fieldset></form></div>';
'<input type="submit" value="'.get_string($this->user_is_editing()?'blockseditoff':'blocksediton').'" /></div></form></div>';
} else {
$buttons = '&nbsp;';
}
+3 -3
View File
@@ -16,8 +16,8 @@ if ($_ENV['RECIPIENT'] == $CFG->noreplyaddress) {
}
$site = get_site();
$subject = get_string('noreplybouncesubject','moodle',$site->fullname);
$body = get_string('noreplybouncemessage','moodle',$site->fullname)."\n\n";
$subject = get_string('noreplybouncesubject','moodle',format_string($site->fullname));
$body = get_string('noreplybouncemessage','moodle',format_string($site->fullname))."\n\n";
$fd = fopen('php://stdin','r');
if ($fd) {
@@ -54,7 +54,7 @@ if ($modid == '0') { // special
}
else {
$modname = get_field("modules","name","id",$modid);
require_once('mod/'.$modname.'/lib.php');
include_once('mod/'.$modname.'/lib.php');
}
$function = $modname.'_process_email';
+2 -2
View File
@@ -34,7 +34,7 @@
$strregistration = get_string("registration");
$strregistrationinfo = get_string("registrationinfo");
print_header("$site->shortname: $strregistration", "$site->fullname",
print_header("$site->shortname: $strregistration", $site->fullname,
"<a href=\"../$CFG->admin/index.php\">$stradministration</a> -> $strregistration");
print_heading($strregistration);
@@ -72,7 +72,7 @@
echo '<div class="fitem">';
echo '<div class="fitemtitle"><label for="sitename">'.get_string("fullsitename").'</label></div>';
echo '<div class="felement ftext">';
echo '<input size="50" id="sitename" type="text" name="sitename" value="'.$site->fullname.'" />';
echo '<input size="50" id="sitename" type="text" name="sitename" value="'.format_string($site->fullname).'" />';
echo '</div>';
echo '</div>';
+140
View File
@@ -0,0 +1,140 @@
<?php // $Id$
// index.php - scheduled backup logs
require_once('../../../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->dirroot.'/backup/lib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('reportbackups', $adminroot);
admin_externalpage_print_header($adminroot);
$courseid = optional_param('courseid', 0, PARAM_INT);
require_capability('moodle/site:backup', get_context_instance(CONTEXT_SYSTEM, SITEID));
/// Scheduled backups are disabled by the server admin
if (!empty($CFG->disablescheduledbackups)) {
print_error('scheduledbackupsdisabled', '', '', NULL, true);
}
/// Scheduled backups aren't active by the site admin
$backup_config = backup_get_config();
if (empty($backup_config->backup_sche_active)) {
notify(get_string('scheduledbackupsinactive'));
}
/// Get needed strings
$backuploglaststatus = get_string("backuploglaststatus");
$backuplogdetailed = get_string("backuplogdetailed");
$stradmin = get_string("administration");
$strconfiguration = get_string("configuration");
$strbackup = get_string("backup");
$strbackupdetails = get_string("backupdetails");
$strlogs = get_string("logs");
$strftimedatetime = get_string("strftimerecent");
$strftimetime = get_string("strftimetime").":%S";
$strerror = get_string("error");
$strok = get_string("ok");
$strunfinished = get_string("unfinished");
$strskipped = get_string("skipped");
$strcourse = get_string("course");
$strtimetaken = get_string("timetaken","quiz");
$strstatus = get_string("status");
$strnext = get_string("next");
/// Decide when to show last execution logs or detailed logs
/// Lastlog view
if (!$courseid) {
print_heading($backuploglaststatus);
print_simple_box_start('center');
/// Now, get every record from backup_courses
$courses = get_records("backup_courses");
if (!$courses) {
notify(get_string('nologsfound'));
} else {
echo "<table border=\"0\" align=\"center\" cellpadding=\"3\" cellspacing=\"3\">";
//Print table header
echo "<tr>";
echo "<td nowrap=\"nowrap\" align=\"center\"><font size=\"3\">$strcourse</font></td>";
echo "<td nowrap=\"nowrap\" align=\"center\" colspan=\"3\"><font size=\"3\">$strtimetaken</font></td>";
echo "<td nowrap=\"nowrap\" align=\"center\"><font size=\"3\">$strstatus</font></td>";
echo "<td nowrap=\"nowrap\" align=\"center\"><font size=\"3\">$strnext</font></td></tr>";
foreach ($courses as $course) {
/// Get the course shortname
$coursename = get_field ("course","fullname","id",$course->courseid);
if ($coursename) {
echo "<tr>";
echo "<td nowrap=\"nowrap\"><font size=\"2\"><a href=\"index.php?courseid=$course->courseid\">".$coursename."</a></font></td>";
echo "<td nowrap=\"nowrap\"><font size=\"2\">".userdate($course->laststarttime,$strftimedatetime)."</font></td>";
echo "<td nowrap=\"nowrap\"><font size=\"2\"> - </font></td>";
echo "<td nowrap=\"nowrap\"><font size=\"2\">".userdate($course->lastendtime,$strftimedatetime)."</font></td>";
if ($course->laststatus == 1) {
echo "<td nowrap=\"nowrap\" align=\"center\"><font size=\"2\" color=\"green\">".$strok."</font></td>";
} else if ($course->laststatus == 2) {
echo "<td nowrap=\"nowrap\" align=\"center\"><font size=\"2\" color=\"red\">".$strunfinished."</font></td>";
} else if ($course->laststatus == 3) {
echo "<td nowrap=\"nowrap\" align=\"center\"><font size=\"2\" color=\"green\">".$strskipped."</font></td>";
} else {
echo "<td nowrap=\"nowrap\" align=\"center\"><font size=\"2\" color=\"red\">".$strerror."</font></td>";
}
echo "<td nowrap=\"nowrap\"><font size=\"2\">".userdate($course->nextstarttime,$strftimedatetime)."</font></td>";
echo "</tr>";
}
}
echo "</table>";
}
print_simple_box_end();
/// Detailed View !!
} else {
print_heading($backuplogdetailed);
$coursename = get_field("course","fullname","id","$courseid");
print_heading("$strcourse: $coursename");
print_simple_box_start('center');
/// First, me get all the distinct backups for that course in backup_log
$executions = get_records_sql("SELECT DISTINCT laststarttime,laststarttime
FROM {$CFG->prefix}backup_log
WHERE courseid = '$courseid'
ORDER BY laststarttime DESC");
/// Iterate over backup executions
if (!$executions) {
notify(get_string('nologsfound'));
} else {
echo "<table border=\"0\" align=\"center\" cellpadding=\"3\" cellspacing=\"3\">";
foreach($executions as $execution) {
echo "<tr>";
echo "<td nowrap=\"nowrap\" align=\"center\" colspan=\"3\">";
print_simple_box("<center>".userdate($execution->laststarttime)."</center>", "center");
echo "</td>";
echo "</tr>";
$logs = get_records_sql("SELECT *
FROM {$CFG->prefix}backup_log
WHERE courseid = '$courseid' AND
laststarttime = '$execution->laststarttime'
ORDER BY id");
if ($logs) {
foreach ($logs as $log) {
echo "<tr>";
echo "<td nowrap=\"nowrap\"><font size=\"2\">".userdate($log->time,$strftimetime)."</font></td>";
$log->info = str_replace("- ERROR!!","- <font color=\"red\">ERROR!!</font>",$log->info);
$log->info = str_replace("- OK","- <font color=\"green\">OK</font>",$log->info);
echo "<td nowrap=\"nowrap\"><font size=\"2\">".str_replace(" ","&nbsp;&nbsp;&nbsp;&nbsp;",$log->info)."</font></td>";
echo "</tr>";
}
}
}
echo "</table>";
}
print_simple_box_end();
}
admin_externalpage_print_footer($adminroot);
?>
+2 -2
View File
@@ -17,7 +17,7 @@
require_capability('moodle/site:viewreports', get_context_instance(CONTEXT_SYSTEM, SITEID)); // needed?
if (empty($CFG->enablestats)) {
redirect("$CFG->wwwroot/$CFG->admin/settings.php?section=stats", get_string('mustenablestats', 'admin'));
redirect("$CFG->wwwroot/$CFG->admin/settings.php?section=stats", get_string('mustenablestats', 'admin'), 3, $adminroot);
}
@@ -117,4 +117,4 @@
}
admin_externalpage_print_footer($adminroot);
?>
?>
+2 -2
View File
@@ -10,9 +10,9 @@
require_login();
require_capability('moodle/site:viewreports', get_context_instance(CONTEXT_SYSTEM, SITEID));
require_capability('moodle/site:viewreports', get_context_instance(CONTEXT_SYSTEM));
stats_check_uptodate($course->id);
stats_check_uptodate();
$param = stats_get_parameters($time,$report,SITEID,STATS_MODE_RANKED);
+74
View File
@@ -0,0 +1,74 @@
<?php // $Id$
require_once('../../../config.php');
require_once($CFG->dirroot.'/question/upgrade.php');
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root();
admin_externalpage_setup('reportquestion', $adminroot);
admin_externalpage_print_header($adminroot);
print_heading(page_doc_link(get_string('adminreport', 'question')));
$probstr = '';
$contextupgradeversion = 2007081000;
if ($CFG->version < $contextupgradeversion){
///cwrqpfs issue
$probstr = print_heading(get_string('cwrqpfs', 'question'), '', 3, 'main', true);
if ($updates = question_cwqpfs_to_update()){
$probstr .=get_string('cwrqpfsinfo', 'question');
$probstr .= '<ul>';
$catlist = join(array_keys($updates), ',');
//get info about cateogries and no of questions used outside category's course
$categories = get_records_sql('SELECT qc.*, c.fullname as coursename FROM '.$CFG->prefix.'question_categories as qc, '
.$CFG->prefix.'course as c WHERE qc.course = c.id AND qc.id IN ('.$catlist.')');
foreach ($updates as $id => $publish){
$categories[$id]->caturl = "$CFG->wwwroot/question/category.php?sesskey=".sesskey().
"&amp;edit=$id&amp;id=".$categories[$id]->course;
if ($categories[$id]->publish){
$categories[$id]->changefrom = get_string('published', 'question');
$categories[$id]->changeto = get_string('unpublished', 'question');
} else {
$categories[$id]->changefrom = get_string('unpublished', 'question');
$categories[$id]->changeto = get_string('published', 'question');
}
$probstr .= '<li>'.get_string('changepublishstatuscat', 'question', $categories[$id]);
if ($questions = get_records_sql('SELECT q.*, qui.id as quizid, qui.name as quizname, cm.id as cmid, '
.'qui.course, c.fullname as coursename FROM '.$CFG->prefix.'question q, '
.$CFG->prefix.'quiz_question_instances qqi, '
.$CFG->prefix.'quiz qui, '
.$CFG->prefix.'course_modules cm, '
.$CFG->prefix.'modules m, '
.$CFG->prefix.'course c '
.'WHERE (q.category = '.$id.' AND qqi.question = q.id '
.'AND qqi.quiz = qui.id '
.'AND qui.course = c.id '
.'AND cm.instance = qui.id '
.'AND cm.module = m.id '
.'AND m.name = \'quiz\''
.'AND ('.$categories[$id]->course.' <> qui.course)) ORDER BY qui.id ASC')){
$probstr .= '<ul>';
foreach ($questions as $question){
$question->quizurl = "$CFG->wwwroot/mod/quiz/edit.php?cmid=".$question->cmid;
$question->qurl = "$CFG->wwwroot/question/question.php?cmid={$question->cmid}&amp;id={$question->id}&amp;returnurl=".urlencode($FULLME);
$probstr .= '<li>'.get_string('questionaffected', 'question', $question).'</li>';
}
$probstr .= '</ul>';
}
$probstr .= '</li>';
}
$probstr .= '</ul>';
} else {
$probstr .=('<p>'.get_string('cwrqpfsnoprob', 'question').'</p>');
}
}
if ($probstr) {
print_box($probstr);
} else {
print_box(get_string('noprobs', 'question'), 'boxwidthnarrow boxaligncenter generalbox');
}
admin_externalpage_print_footer($adminroot);
?>
+1 -2
View File
@@ -45,8 +45,7 @@ class ExHtmlReporter extends HtmlReporter {
$this->strrunonlyfolder = $this->get_string('runonlyfolder');
$this->strrunonlyfile = $this->get_string('runonlyfile');
check_theme_arrows();
$this->strseparator = ' <span class="sep">'.$THEME->rarrow.'</span> ';
$this->strseparator = get_separator();
}
/**
+2 -2
View File
@@ -30,7 +30,7 @@
}
if ($mode == STATS_MODE_RANKED) {
redirect($CFG->wwwroot.'/'.$CFG->admin.'/report/stats/index.php?time='.$time);
redirect($CFG->wwwroot.'/'.$CFG->admin.'/report/stats/index.php?time='.$time, '', 3, $adminroot);
}
if (!$course = get_record("course","id",$courseid)) {
@@ -46,7 +46,7 @@
require_login();
if (empty($CFG->enablestats)) {
redirect("$CFG->wwwroot/$CFG->admin/settings.php?section=stats", get_string('mustenablestats', 'admin'));
redirect("$CFG->wwwroot/$CFG->admin/settings.php?section=stats", get_string('mustenablestats', 'admin'), 3, $adminroot);
}
require_capability('moodle/site:viewreports', get_context_instance(CONTEXT_COURSE, $course->id));
+2 -2
View File
@@ -80,9 +80,9 @@
echo '<form action="allowassign.php" method="post">';
print_table($table);
echo '<div class="singlebutton"><input type="submit" value="'.get_string('savechanges').'"/></div>';
echo '<div class="buttons"><input type="submit" value="'.get_string('savechanges').'"/>';
echo '<input type="hidden" name="dummy" value="1" />'; // this is needed otherwise we do not know a form has been submitted
echo '</form>';
echo '</div></form>';
admin_externalpage_print_footer($adminroot);
+2 -2
View File
@@ -78,9 +78,9 @@
echo '<form action="allowoverride.php" method="post">';
print_table($table);
echo '<div class="singlebutton"><input type="submit" value="'.get_string('savechanges').'"/></div>';
echo '<div class="buttons"><input type="submit" value="'.get_string('savechanges').'"/>';
echo '<input type="hidden" name="dummy" value="1" />'; // this is needed otherwise we do not know a form has been submitted
echo '</form>';
echo '</div></form>';
admin_externalpage_print_footer($adminroot);
+40 -34
View File
@@ -15,25 +15,31 @@
onfocus="getElementById('assignform').add.disabled=true;
getElementById('assignform').remove.disabled=false;
getElementById('assignform').addselect.selectedIndex=-1;">
<?php
foreach ($contextusers as $contextuser) {
$fullname = fullname($contextuser, true);
if ($contextuser->hidden) {
$hidden=' ('.get_string('hiddenassign').') ';
} else {
$hidden="";
}
echo "<option value=\"$contextuser->id\">".$fullname.", ".$contextuser->email.$hidden."</option>\n";
}
$i = 0;
foreach ($contextusers as $contextuser) {
$fullname = fullname($contextuser, true);
if ($contextuser->hidden) {
$hidden=' ('.get_string('hiddenassign').') ';
} else {
$hidden="";
}
echo "<option value=\"$contextuser->id\">".$fullname.", ".$contextuser->email.$hidden."</option>\n";
$i++;
}
if ($i==0) {
echo '<option/>'; // empty select breaks xhtml strict
}
?>
<option/>
</select></td>
<td valign="top">
<br />
<label title="<?php print_string('hiddenassign') ?>">
<input type="checkbox" name="hidden" value="1" />
<img src="<?php echo $CFG->pixpath; ?>/t/hide.gif" alt="<?php print_string('hiddenassign') ?>" class="hide-show-image" />
<?php helpbutton('hiddenassign', get_string('hiddenassign')); ?>
</label>
<?php check_theme_arrows(); ?>
<p class="arrow_button">
@@ -50,32 +56,32 @@
getElementById('assignform').remove.disabled=true;
getElementById('assignform').removeselect.selectedIndex=-1;">
<?php
$i=0;
if (!empty($searchtext)) {
echo "<optgroup label=\"$strsearchresults (" . $usercount . ")\">\n";
while ($user = rs_fetch_next_record($availableusers)) {
$fullname = fullname($user, true);
echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
$i++;
}
echo "</optgroup>\n";
if (!empty($searchtext)) {
echo "<optgroup label=\"$strsearchresults (" . $availableusers->_numOfRows . ")\">\n";
while ($user = rs_fetch_next_record($availableusers)) {
if (!isset($contextusers[$user->id])) {
$fullname = fullname($user, true);
echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
}
}
echo "</optgroup>\n";
} else {
if ($usercount > MAX_USERS_PER_PAGE) {
echo '<optgroup label="'.get_string('toomanytoshow').'"><option></option></optgroup>'."\n"
} else {
if ($usercount > MAX_USERS_PER_PAGE) {
echo '<optgroup label="'.get_string('toomanytoshow').'"><option></option></optgroup>'."\n"
.'<optgroup label="'.get_string('trysearching').'"><option></option></optgroup>'."\n";
} else {
while ($user = rs_fetch_next_record($availableusers)) {
if (!isset($contextusers[$user->id])) {
$fullname = fullname($user, true);
echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
}
}
}
}
} else {
while ($user = rs_fetch_next_record($availableusers)) {
$fullname = fullname($user, true);
echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
$i++;
}
}
}
if ($i==0) {
echo '<option/>'; // empty select breaks xhtml strict
}
?>
<option/>
</select>
<br />
<label for="searchtext" class="accesshide"><?php p($strsearch) ?></label>
+116 -18
View File
@@ -19,7 +19,7 @@
$timeend = optional_param('timened', 0, PARAM_INT);
$userid = optional_param('userid', 0, PARAM_INT); // needed for user tabs
$courseid = optional_param('courseid', 0, PARAM_INT); // needed for user tabs
$errors = array();
$previoussearch = ($searchtext != '') or ($previoussearch) ? 1:0;
@@ -50,9 +50,11 @@
}
} else {
$courseid = SITEID;
$course = get_site();
$course = clone($SITE);
}
require_login($course);
if ($context->contextlevel == CONTEXT_COURSE) {
require_login($context->instanceid);
} else {
@@ -61,7 +63,10 @@
require_capability('moodle/role:assign', $context);
$assignableroles = get_assignable_roles($context);
/// needed for tabs.php
$overridableroles = get_overridable_roles($context);
$assignableroles = get_assignable_roles($context);
/// Get some language strings
$strassignusers = get_string('assignusers', 'role');
@@ -103,7 +108,7 @@
/// site header
} else {
print_header("$course->fullname: $fullname", "$course->fullname",
print_header("$course->fullname: $fullname", $course->fullname,
"<a href=\"$CFG->wwwroot/user/view.php?id=$userid&amp;course=$courseid\">$fullname</a> -> $straction", "", "", true, "&nbsp;", navmenu($course));
}
@@ -158,12 +163,14 @@
}
}
}
$rolename = get_field('role', 'name', 'id', $roleid);
add_to_log($course->id, 'role', 'assign', 'admin/roles/assign.php?contextid='.$context->id.'&roleid='.$roleid, $rolename, '', $USER->id);
} else if ($remove and !empty($frm->removeselect) and confirm_sesskey()) {
$sitecontext = get_context_instance(CONTEXT_SYSTEM);
$topleveladmin = false;
// we only worry about this if the role has doanything capability at site level
if ($context->id == $sitecontext->id && $adminroles = get_roles_with_capability('moodle/site:doanything', CAP_ALLOW, $sitecontext)) {
foreach ($adminroles as $adminrole) {
@@ -172,7 +179,7 @@
}
}
}
foreach ($frm->removeselect as $removeuser) {
$removeuser = clean_param($removeuser, PARAM_INT);
@@ -192,11 +199,16 @@
}
}
}
$rolename = get_field('role', 'name', 'id', $roleid);
add_to_log($course->id, 'role', 'unassign', 'admin/roles/assign.php?contextid='.$context->id.'&roleid='.$roleid, $rolename, '', $USER->id);
} else if ($showall) {
$searchtext = '';
$previoussearch = 0;
}
}
if ($context->contextlevel==CONTEXT_COURSE and $context->instanceid == SITEID) {
@@ -205,6 +217,10 @@
print_heading_with_help(get_string('assignroles', 'role'), 'assignroles');
}
if ($context->contextlevel==CONTEXT_SYSTEM) {
print_box(get_string('globalroleswarning', 'role'));
}
if ($roleid) { /// prints a form to swap roles
/// Get all existing participants in this context.
@@ -215,7 +231,7 @@
}
$select = "username <> 'guest' AND deleted = 0 AND confirmed = 1";
$usercount = count_records_select('user', $select) - count($contextusers);
$searchtext = trim($searchtext);
@@ -224,21 +240,103 @@
$LIKE = sql_ilike();
$FULLNAME = sql_fullname();
$select .= " AND ($FULLNAME $LIKE '%$searchtext%' OR email $LIKE '%$searchtext%') ";
$selectsql = " AND ($FULLNAME $LIKE '%$searchtext%' OR email $LIKE '%$searchtext%') ";
$select .= $selectsql;
} else {
$selectsql = "";
}
$availableusers = get_recordset_sql('SELECT id, firstname, lastname, email
FROM '.$CFG->prefix.'user
WHERE '.$select.'
ORDER BY lastname ASC, firstname ASC');
if ($context->contextlevel > CONTEXT_COURSE) { // mod or block (or group?)
/// In the .html file below we loop through these results and exclude any in $contextusers
/************************************************************************
* *
* context level is above or equal course context level *
* in this case we pull out all users matching search criteria (if any) *
* *
* MDL-11324 *
* a mini get_users_by_capability() call here, this is done instead of *
* get_users_by_capability() because *
* 1) get_users_by_capability() does not deal with searching by name *
* 2) exceptions array can be potentially large for large courses *
* 3) get_recordset_sql() is more efficient *
* *
************************************************************************/
if ($possibleroles = get_roles_with_capability('moodle/course:view', CAP_ALLOW, $context)) {
$doanythingroles = get_roles_with_capability('moodle/site:doanything', CAP_ALLOW, get_context_instance(CONTEXT_SYSTEM));
$validroleids = array();
foreach ($possibleroles as $possiblerole) {
if (isset($doanythingroles[$possiblerole->id])) { // We don't want these included
continue;
}
if ($caps = role_context_capabilities($possiblerole->id, $context, 'moodle/course:view')) { // resolved list
if (isset($caps['moodle/course:view']) && $caps['moodle/course:view'] > 0) { // resolved capability > 0
$validroleids[] = $possiblerole->id;
}
}
}
if ($validroleids) {
$roleids = '('.implode(',', $validroleids).')';
$select = " SELECT u.id, u.firstname, u.lastname, u.email";
$countselect = "SELECT COUNT(u.id)";
$from = " FROM {$CFG->prefix}user u
INNER JOIN {$CFG->prefix}role_assignments ra ON ra.userid = u.id
INNER JOIN {$CFG->prefix}role r ON r.id = ra.roleid";
$where = " WHERE ra.contextid ".get_related_contexts_string($context)."
AND u.deleted = 0
AND ra.roleid in $roleids";
$excsql = " AND u.id NOT IN (
SELECT u.id
FROM {$CFG->prefix}role_assignments r,
{$CFG->prefix}user u
WHERE r.contextid = $contextid
AND u.id = r.userid
AND r.roleid = $roleid
$selectsql)";
$availableusers = get_recordset_sql($select . $from . $where . $selectsql . $excsql);
}
$usercount = $availableusers->_numOfRows;
}
} else {
/************************************************************************
* *
* context level is above or equal course context level *
* in this case we pull out all users matching search criteria (if any) *
* *
************************************************************************/
/// MDL-11111 do not include user already assigned this role in this context as available users
/// so that the number of available users is right and we save time looping later
$availableusers = get_recordset_sql('SELECT id, firstname, lastname, email
FROM '.$CFG->prefix.'user
WHERE '.$select.'
AND id NOT IN (
SELECT u.id
FROM '.$CFG->prefix.'role_assignments r,
'.$CFG->prefix.'user u
WHERE r.contextid = '.$contextid.'
AND u.id = r.userid
AND r.roleid = '.$roleid.'
'.$selectsql.')
ORDER BY lastname ASC, firstname ASC');
$usercount = $availableusers->_numOfRows;
}
echo '<div style="text-align:center">'.$strcurrentcontext.': '.print_context_name($context).'<br/>';
echo '<label>'.$strroletoassign.'</label>: ';
$assignableroles = array('0'=>get_string('listallroles', 'role').'...') + $assignableroles;
$assignableroles = array('0'=>get_string('listallroles', 'role').'...') + $assignableroles;
popup_form("$CFG->wwwroot/$CFG->admin/roles/assign.php?userid=$userid&amp;courseid=$courseid&amp;contextid=$contextid&amp;roleid=",
$assignableroles, 'switchrole', $roleid, '');
$assignableroles, 'switchrole', $roleid, '', '', '', false, 'self', $strroletoassign);
echo '</div>';
print_simple_box_start('center');
+110 -57
View File
@@ -4,67 +4,98 @@
case 'add':
$submitlabel = get_string('addrole', 'role');
break;
case 'view':
$submitlabel = get_string('listallroles', 'role');
break;
case 'edit':
default:
$submitlabel = get_string('savechanges');
}
if ($action == 'view') {
?>
<?php
}
?>
<div align="right">
<a href="manage.php?roleid=<?php p($roleid); ?>&amp;action=duplicate"><?php print_string('duplicaterole'); ?></a>
</div>
<form id="rolesform" action="manage.php" method="post">
<fieldset class="invisiblefieldset">
<input type="hidden" name="roleid" value="<?php p($roleid) ?>" />
<input type="hidden" name="sesskey" value="<?php p(sesskey()) ?>" />
<input type="hidden" name="action" value="<?php if ($action != 'view') { echo p($action); } ?>" />
<table cellpadding="9" cellspacing="0" align="center">
<tr valign="top">
<td align="right"><?php print_string('name') ?>:</td>
<td><?php
if ($action == 'view') {
p($role->name);
} else {
echo '<input type="text" name="name" maxlength="254" size="50" value="'.s($role->name).'" />';
if (isset($errors["name"])) formerr($errors["name"]);
} ?></td>
</tr>
<tr valign="top">
<td align="right"><?php print_string('shortname') ?>:</td>
<td><?php
if ($action == 'view') {
p($role->shortname);
} else {
echo '<input type="text" name="shortname" maxlength="20" size="15" value="'.s($role->shortname).'" />';
if (isset($errors["shortname"])) formerr($errors["shortname"]);
} ?></td>
</tr>
<tr valign="top">
<td align="right"><?php print_string('description') ?>:</td>
<td><?php
if ($action == 'view') {
p($role->description);
$usehtmleditor = false;
} else {
print_textarea($usehtmleditor, 10, 50, 50, 10, 'description', $role->description);
} ?></td>
</tr>
</fieldset>
<table class="roledesc" cellpadding="9" cellspacing="0">
<?php if ($action == 'view') { ?>
<tr valign="top">
<td align="right"><?php print_string('name') ?>:</td>
<td><?php p($role->name); ?></td>
</tr>
<tr valign="top">
<td align="right"><?php print_string('shortname') ?>:</td>
<td><?php p($role->shortname); ?></td>
</tr>
<tr valign="top">
<td align="right"><?php print_string('description') ?>:</td>
<td><?php p($role->description); $usehtmleditor = false; ?></td>
</tr>
<tr valign="top">
<td align="right"><?php print_string('legacytype', 'role') ?>:</td>
<td><?php
$usehtmleditor = false;
if (empty($role->legacytype)) {
print_string('none');
} else {
print_string('legacy:'.$role->legacytype, 'role');
}
?>
</td>
</tr>
<?php } else { ?>
<tr valign="top">
<td align="right"><label for="name"><?php print_string('name') ?></label></td>
<td><?php
echo '<input type="text" id="name" name="name" maxlength="254" size="50" value="'.s($role->name).'" />';
if (isset($errors["name"])) formerr($errors["name"]);
?>
</td>
</tr>
<tr valign="top">
<td align="right"><label for="shortname"><?php print_string('shortname') ?></label></td>
<td><?php
echo '<input type="text" id="shortname" name="shortname" maxlength="20" size="15" value="'.s($role->shortname).'" />';
if (isset($errors["shortname"])) formerr($errors["shortname"]);
?>
</td>
</tr>
<tr valign="top">
<td align="right"><label for="edit-description"><?php print_string('description') ?></label></td>
<td><?php
print_textarea($usehtmleditor, 10, 50, 50, 10, 'description', $role->description);
?>
</td>
</tr>
<tr valign="top">
<td align="right"><label for="menulegacytype"><?php print_string('legacytype', 'role') ?></label></td>
<td><?php
$options = array();
$options[''] = get_string('none');
$legacyroles = get_legacy_roles();
foreach($legacyroles as $ltype=>$lcap) {
$options[$ltype] = get_string('legacy:'.$ltype, 'role');
}
choose_from_menu($options, 'legacytype', $role->legacytype, '');
?>
</td>
</tr>
<?php } ?>
</table>
<?php
<?php
print_heading_with_help(get_string('permissions','role'), 'permissions');
$strinherit = get_string('inherit','role');
$strinherit = get_string('notset','role');
$strallow = get_string('allow','role');
$strprevent = get_string('prevent','role');
$strprohibit = get_string('prohibit','role');
?>
<table class="rolecap" align="center">
<table class="rolecap">
<tr>
<th class="name" align="left" scope="col"><?php print_string('capability','role') ?></th>
@@ -82,9 +113,23 @@ $contextlevel = 0;
$component = '';
$strrisks = s(get_string('risks', 'role'));
$strcapabilities = s(get_string('capabilities', 'role'));
// MDL-11687
$strcapabilities = 'Capabilities';//s(get_string('capabilities', 'role'));
// prepare legacy defaults
if (!empty($role->legacytype)) {
$defaultcaps = get_default_capabilities($role->legacytype);
} else {
$defaultcaps = false;
}
foreach ($capabilities as $capability) {
//legacy caps have their own selector
if (islegacy($capability->name)) {
continue;
}
// prints a breaker if component or name or context level
if ($capability->component != $component or $capability->contextlevel != $contextlevel) {
echo ('<tr class="rolecapheading header"><td colspan="10" class="header"><strong>'.
@@ -97,7 +142,6 @@ foreach ($capabilities as $capability) {
if (empty($errors)) {
// check the capability override for this cap, this role in this context
$sitecontext = get_context_instance(CONTEXT_SYSTEM, SITEID);
$localoverride = get_local_override($roleid, $sitecontext->id, $capability->name);
} else {
$localoverride = new object();
@@ -109,44 +153,53 @@ foreach ($capabilities as $capability) {
$riskinfo = '<td class="risk managetrust">';
$rowclasses = '';
if (RISK_MANAGETRUST & (int)$capability->riskbitmask) {
$riskinfo .= '<a target="docspopup" title="'.get_string('riskmanagetrust', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">';
$riskinfo .= '<a onclick="this.target=\'docspopup\'" title="'.get_string('riskmanagetrust', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">';
$riskinfo .= '<img src="'.$CFG->pixpath.'/i/risk_managetrust.gif" alt="'.get_string('riskmanagetrustshort', 'admin').'" /></a>';
$rowclasses .= ' riskmanagetrust';
}
$riskinfo .= '</td><td class="risk config">';
if (RISK_CONFIG & (int)$capability->riskbitmask) {
$riskinfo .= '<a target="docspopup" title="'.get_string('riskconfig', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">';
$riskinfo .= '<a onclick="this.target=\'docspopup\'" title="'.get_string('riskconfig', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">';
$riskinfo .= '<img src="'.$CFG->pixpath.'/i/risk_config.gif" alt="'.get_string('riskconfigshort', 'admin').'" /></a>';
$rowclasses .= ' riskconfig';
}
$riskinfo .= '</td><td class="risk xss">';
if (RISK_XSS & (int)$capability->riskbitmask) {
$riskinfo .= '<a target="docspopup" title="'.get_string('riskxss', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">';
$riskinfo .= '<a onclick="this.target=\'docspopup\'" title="'.get_string('riskxss', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">';
$riskinfo .= '<img src="'.$CFG->pixpath.'/i/risk_xss.gif" alt="'.get_string('riskxssshort', 'admin').'" /></a>';
$rowclasses .= ' riskxss';
}
$riskinfo .= '</td><td class="risk personal">';
if (RISK_PERSONAL & (int)$capability->riskbitmask) {
$riskinfo .= '<a target="docspopup" title="'.get_string('riskpersonal', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">';
$riskinfo .= '<a onclick="this.target=\'docspopup\'" title="'.get_string('riskpersonal', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">';
$riskinfo .= '<img src="'.$CFG->pixpath.'/i/risk_personal.gif" alt="'.get_string('riskpersonalshort', 'admin').'" /></a>';
$rowclasses .= ' riskpersonal';
}
$riskinfo .= '</td><td class="risk spam">';
if (RISK_SPAM & (int)$capability->riskbitmask) {
$riskinfo .= '<a target="docspopup" title="'.get_string('riskspam', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">';
$riskinfo .= '<a onclick="this.target=\'docspopup\'" title="'.get_string('riskspam', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">';
$riskinfo .= '<img src="'.$CFG->pixpath.'/i/risk_spam.gif" alt="'.get_string('riskspamshort', 'admin').'" /></a>';
$rowclasses .= ' riskspam';
}
$riskinfo .= '</td>';
$isinherit = (!isset($defaultcaps[$capability->name]) or $defaultcaps[$capability->name] == CAP_INHERIT) ? 'capdefault' : '';
$isallow = (isset($defaultcaps[$capability->name]) and $defaultcaps[$capability->name] == CAP_ALLOW) ? 'capdefault' : '';
$isprevent = (isset($defaultcaps[$capability->name]) and $defaultcaps[$capability->name] == CAP_PREVENT) ? 'capdefault' : '';
$isprohibit = (isset($defaultcaps[$capability->name]) and $defaultcaps[$capability->name] == CAP_PROHIBIT) ? 'capdefault' : '';
?>
<tr class="rolecap <?php echo $rowclasses; ?>">
<td class="name"><span class="cap-desc"><a target="docspopup" href="<?php echo $CFG->docroot.'/'.$lang.'/'.$strcapabilities.'/'.$capability->name ?>"><?php echo get_capability_string($capability->name); ?></a><span class="cap-name"><?php echo $capability->name ?></span></span></td>
<td class="inherit"><input type="radio" title="<?php p($strinherit); ?>" name="<?php echo $capability->name; ?>" value="<?php echo CAP_INHERIT ?>" <?php if (!isset($localoverride->permission) || $localoverride->permission==CAP_INHERIT){ echo 'checked="checked"'; }?> <?php echo $disabled; ?>/></td>
<td class="allow"><input type="radio" title="<?php p($strallow); ?>" name="<?php echo $capability->name; ?>" value="<?php echo CAP_ALLOW ?>" <?php if (isset($localoverride->permission) && $localoverride->permission==CAP_ALLOW){ echo 'checked="checked"'; }?> <?php echo $disabled; ?>/></td>
<td class="prevent" ><input type="radio" title="<?php p($strprevent); ?>" name="<?php echo $capability->name; ?>" value="<?php echo CAP_PREVENT ?>" <?php if (isset($localoverride->permission) && $localoverride->permission==CAP_PREVENT){ echo 'checked="checked"'; }?> <?php echo $disabled; ?>/></td>
<td class="prohibit" ><input type="radio" title="<?php p($strprohibit); ?>" name="<?php echo $capability->name; ?>" value="<?php echo CAP_PROHIBIT ?>" <?php if (isset($localoverride->permission) && $localoverride->permission==CAP_PROHIBIT){ echo 'checked="checked"'; }?> <?php echo $disabled; ?>/></td>
<td class="name"><span class="cap-desc"><a onclick="this.target='docspopup'" href="<?php echo $CFG->docroot.'/'.$lang.'/'.$strcapabilities.'/'.$capability->name ?>"><?php echo get_capability_string($capability->name); ?></a><span class="cap-name"><?php echo $capability->name ?></span></span></td>
<td class="inherit <?php echo $isinherit ?>">
<input type="radio" title="<?php p($strinherit); ?>" name="<?php echo $capability->name; ?>" value="<?php echo CAP_INHERIT ?>" <?php if (!isset($localoverride->permission) || $localoverride->permission==CAP_INHERIT){ echo 'checked="checked"'; }?> <?php echo $disabled; ?>/></td>
<td class="allow <?php echo $isallow ?>">
<input type="radio" title="<?php p($strallow); ?>" name="<?php echo $capability->name; ?>" value="<?php echo CAP_ALLOW ?>" <?php if (isset($localoverride->permission) && $localoverride->permission==CAP_ALLOW){ echo 'checked="checked"'; }?> <?php echo $disabled; ?>/></td>
<td class="prevent <?php echo $isprevent ?>" >
<input type="radio" title="<?php p($strprevent); ?>" name="<?php echo $capability->name; ?>" value="<?php echo CAP_PREVENT ?>" <?php if (isset($localoverride->permission) && $localoverride->permission==CAP_PREVENT){ echo 'checked="checked"'; }?> <?php echo $disabled; ?>/></td>
<td class="prohibit <?php echo $isprohibit ?>" >
<input type="radio" title="<?php p($strprohibit); ?>" name="<?php echo $capability->name; ?>" value="<?php echo CAP_PROHIBIT ?>" <?php if (isset($localoverride->permission) && $localoverride->permission==CAP_PROHIBIT){ echo 'checked="checked"'; }?> <?php echo $disabled; ?>/></td>
<?php echo $riskinfo; ?>
@@ -155,11 +208,11 @@ foreach ($capabilities as $capability) {
<?php } ?>
</table>
<div class="submit" align="center">
<input type="submit" value="<?php p($submitlabel) ?>" />
<?php if ($action != 'view') { ?>
<div class="submit buttons">
<input type="submit" value="<?php p($submitlabel) ?>" />
<input type="submit" name="cancel" value="<?php print_string('cancel') ?>" />
<?php } ?>
</div>
<?php } ?>
</form>
+151 -30
View File
@@ -15,7 +15,9 @@
$confirm = optional_param('confirm', 0, PARAM_BOOL);
$cancel = optional_param('cancel', 0, PARAM_BOOL);
$sitecontext = get_context_instance(CONTEXT_SYSTEM, SITEID);
$sitecontext = get_context_instance(CONTEXT_SYSTEM);
require_capability('moodle/role:manage', $sitecontext);
if ($cancel) {
redirect('manage.php');
@@ -55,6 +57,12 @@
if ($data = data_submitted() and confirm_sesskey()) {
$shortname = moodle_strtolower(clean_param(clean_filename($shortname), PARAM_SAFEDIR)); // only lowercase safe ASCII characters
$legacytype = required_param('legacytype', PARAM_RAW);
$legacyroles = get_legacy_roles();
if (!array_key_exists($legacytype, $legacyroles)) {
$legacytype = '';
}
if (empty($name)) {
$errors['name'] = get_string('errorbadrolename', 'role');
@@ -69,12 +77,19 @@
}
if (empty($errors)) {
$newrole = create_role($name, $shortname, $description);
$newroleid = create_role($name, $shortname, $description);
// set proper legacy type
if (!empty($legacytype)) {
assign_capability($legacyroles[$legacytype], CAP_ALLOW, $newroleid, $sitecontext->id);
}
} else {
$newrole = new object();
$newrole->name = $name;
$newrole->shortname = $shortname;
$newrole->name = $name;
$newrole->shortname = $shortname;
$newrole->description = $description;
$newrole->legacytype = $legacytype;
}
$allowed_values = array(CAP_INHERIT, CAP_ALLOW, CAP_PREVENT, CAP_PROHIBIT);
@@ -84,6 +99,12 @@
if (!isset($data->{$cap->name})) {
continue;
}
// legacy caps have their own selector
if (islegacy($data->{$cap->name})) {
continue;
}
$capname = $cap->name;
$value = clean_param($data->{$cap->name}, PARAM_INT);
if (!in_array($value, $allowed_values)) {
@@ -91,21 +112,31 @@
}
if (empty($errors)) {
assign_capability($capname, $value, $newrole, $sitecontext->id);
assign_capability($capname, $value, $newroleid, $sitecontext->id);
} else {
$newrole->$capname = $value;
}
}
if (empty($errors)) {
$rolename = get_field('role', 'name', 'id', $newroleid);
add_to_log(SITEID, 'role', 'add', 'admin/roles/manage.php?action=add', $rolename, '', $USER->id);
redirect('manage.php');
}
}
break;
case 'edit':
if ($data = data_submitted() and confirm_sesskey()) {
$shortname = moodle_strtolower(clean_param(clean_filename($shortname), PARAM_SAFEDIR)); // only lowercase safe ASCII characters
$legacytype = required_param('legacytype', PARAM_RAW);
$legacyroles = get_legacy_roles();
if (!array_key_exists($legacytype, $legacyroles)) {
$legacytype = '';
}
if (empty($name)) {
$errors['name'] = get_string('errorbadrolename', 'role');
@@ -126,9 +157,10 @@
}
if (!empty($errors)) {
$newrole = new object();
$newrole->name = $name;
$newrole->shortname = $shortname;
$newrole->name = $name;
$newrole->shortname = $shortname;
$newrole->description = $description;
$newrole->legacytype = $legacytype;
}
$allowed_values = array(CAP_INHERIT, CAP_ALLOW, CAP_PREVENT, CAP_PROHIBIT);
@@ -138,6 +170,12 @@
if (!isset($data->{$cap->name})) {
continue;
}
// legacy caps have their own selector
if (islegacy($data->{$cap->name}) === 0 ) {
continue;
}
$capname = $cap->name;
$value = clean_param($data->{$cap->name}, PARAM_INT);
if (!in_array($value, $allowed_values)) {
@@ -171,6 +209,7 @@
assign_capability($capname, $value, $roleid, $sitecontext->id);
}
}
}
if (empty($errors)) {
@@ -183,14 +222,25 @@
if (!update_record('role', $role)) {
error('Could not update role!');
}
// set proper legacy type
foreach($legacyroles as $ltype=>$lcap) {
if ($ltype == $legacytype) {
assign_capability($lcap, CAP_ALLOW, $roleid, $sitecontext->id);
} else {
unassign_capability($lcap, $roleid);
}
}
add_to_log(SITEID, 'role', 'edit', 'admin/roles/manage.php?action=edit&roleid='.$role->id, $role->name, '', $USER->id);
redirect('manage.php');
}
}
break;
case 'delete':
if (in_array($roleid, $defaultroles)) {
error('This role is used as one of the default system roles, it can not be deleted');
error('This role is used as one of the default system roles, it can not be deleted');
}
if ($confirm and data_submitted() and confirm_sesskey()) {
if (!delete_role($roleid)) {
@@ -243,17 +293,38 @@
redirect('manage.php');
break;
case 'duplicate':
if (!array_key_exists($roleid, $roles)) {
redirect('manage.php');
}
if ($confirm and data_submitted() and confirm_sesskey()) {
//ok - lets duplicate!
} else {
// show confirmation
admin_externalpage_print_header($adminroot);
$optionsyes = array('action'=>'duplicate', 'roleid'=>$roleid, 'sesskey'=>sesskey(), 'confirm'=>1);
$optionsno = array('action'=>'view', 'roleid'=>$roleid);
$a = new object();
$a->id = $roleid;
$a->name = $roles[$roleid]->name;
$a->shortname = $roles[$roleid]->shortname;
notice_yesno(get_string('duplicaterolesure', 'role', $a), 'manage.php', 'manage.php', $optionsyes, $optionsno, 'post', 'get');
admin_externalpage_print_footer($adminroot);
die;
}
// duplicate current role
$sourcerole = get_record('role','id',$roleid);
$fullname = $sourcerole->name;
$shortname = $sourcerole->shortname;
$currentfullname = "";
$currentshortname = "";
$counter = 0;
// find a name for the duplicated role
// find a name for the duplicated role
do {
if ($counter) {
$suffixfull = " ".get_string("copyasnoun")." ".$counter;
@@ -269,14 +340,50 @@
$courseshort = get_record("role","shortname",addslashes($currentshortname));
$counter++;
} while ($coursefull || $courseshort);
$description = 'duplicate of '.$fullname;
$description = 'duplicate of '.$fullname;
if ($newrole = create_role($currentfullname, $currentshortname, $description)) {
// dupilcate all the capabilities
role_cap_duplicate($sourcerole, $newrole);
}
}
$rolename = get_field('role', 'name', 'id', $newrole);
add_to_log(SITEID, 'role', 'duplicate', 'admin/roles/manage.php?roleid='.$newrole.'&action=duplicate', $rolename, '', $USER->id);
redirect('manage.php');
break;
case 'reset':
if (!array_key_exists($roleid, $roles)) {
redirect('manage.php');
}
if ($confirm and data_submitted() and confirm_sesskey()) {
reset_role_capabilities($roleid);
$rolename = get_field('role', 'name', 'id', $roleid);
add_to_log(SITEID, 'role', 'reset', 'admin/roles/manage.php?roleid='.$roleid.'&action=reset', $rolename, '', $USER->id);
redirect('manage.php?action=view&amp;roleid='.$roleid);
} else {
// show confirmation
admin_externalpage_print_header($adminroot);
$optionsyes = array('action'=>'reset', 'roleid'=>$roleid, 'sesskey'=>sesskey(), 'confirm'=>1);
$optionsno = array('action'=>'view', 'roleid'=>$roleid);
$a = new object();
$a->id = $roleid;
$a->name = $roles[$roleid]->name;
$a->shortname = $roles[$roleid]->shortname;
$a->legacytype = get_legacy_type($roleid);
if (empty($a->legacytype)) {
$warning = get_string('resetrolesurenolegacy', 'role', $a);
} else {
$warning = get_string('resetrolesure', 'role', $a);
}
notice_yesno($warning, 'manage.php', 'manage.php', $optionsyes, $optionsno, 'post', 'get');
admin_externalpage_print_footer($adminroot);
die;
}
break;
default:
break;
}
@@ -294,9 +401,10 @@
$roleid = 0;
if (empty($errors) or empty($newrole)) {
$role = new object();
$role->name='';
$role->shortname='';
$role->description='';
$role->name = '';
$role->shortname = '';
$role->description = '';
$role->legacytype = '';
} else {
$role = stripslashes_safe($newrole);
}
@@ -306,6 +414,7 @@
if(!$role = get_record('role', 'id', $roleid)) {
error('Incorrect role ID!');
}
$role->legacytype = get_legacy_type($role->id);
}
foreach ($roles as $rolex) {
@@ -332,18 +441,28 @@
break;
}
echo '<div align="center" class="selector">';
echo '<div class="selector">';
if ($action == 'view') {
echo get_string('selectrole', 'role').': ';
echo '<form style="display:inline;" id="switchrole" action="manage.php" method="get">';
echo '<input type="hidden" name="action" value="view" />';
choose_from_menu ($roleoptions, 'roleid', $roleid, get_string('listallroles', 'role').'...', $script='switchrole.submit()');
echo '</form>';
echo '<form style="display:inline;" id="editrole" action="manage.php" method="get">';
echo '<input type="hidden" name="roleid" value="'.$roleid.'" />';
echo '<input type="hidden" name="action" value="edit" />';
echo '<input type="submit" value="'.get_string('edit').'" />';
echo '</form>';
popup_form('manage.php?action=view&amp;roleid=', $roleoptions, 'switchrole', $roleid, '', '', '',
false, 'self', get_string('selectrole', 'role'));
echo '<div class="buttons">';
$legacytype = get_legacy_type($roleid);
$options = array();
$options['roleid'] = $roleid;
$options['action'] = 'edit';
print_single_button('manage.php', $options, get_string('edit'));
$options['action'] = 'reset';
if (empty($legacytype)) {
print_single_button('manage.php', $options, get_string('resetrolenolegacy', 'role'));
} else {
print_single_button('manage.php', $options, get_string('resetrole', 'role'));
}
$options['action'] = 'duplicate';
print_single_button('manage.php', $options, get_string('duplicaterole', 'role'));
print_single_button('manage.php', null, get_string('listallroles', 'role'));
echo '</div>';
}
echo '</div>';
@@ -419,7 +538,9 @@
$options = new object();
$options->action = 'add';
echo '<div class="buttons">';
print_single_button('manage.php', $options, get_string('addrole', 'role'), 'get');
echo '</div>';
}
admin_externalpage_print_footer($adminroot);
@@ -468,12 +589,12 @@ function role_cap_duplicate($sourcerole, $targetrole) {
$systemcontext = get_context_instance(CONTEXT_SYSTEM);
$caps = get_records_sql("SELECT * FROM {$CFG->prefix}role_capabilities
WHERE roleid = $sourcerole->id
AND contextid = $systemcontext->id");
AND contextid = $systemcontext->id");
// adding capabilities
foreach ($caps as $cap) {
unset($cap->id);
$cap->roleid = $targetrole;
insert_record('role_capabilities', $cap);
}
}
}
?>
+6
View File
@@ -1,6 +1,12 @@
<?php
// this page deals with the 2 tabs for manage.php and grant.php
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
$toprow = array();
$toprow[] = new tabobject('manage', $CFG->wwwroot.'/'.$CFG->admin.'/roles/manage.php', get_string('manageroles', 'role'),'', true);
$toprow[] = new tabobject('allowassign', $CFG->wwwroot.'/'.$CFG->admin.'/roles/allowassign.php', get_string('allowassign', 'role'));
+18 -16
View File
@@ -6,11 +6,13 @@
?>
<form id="overrideform" action="override.php" method="post">
<fieldset class="invisiblefieldset">
<input type="hidden" name="contextid" value="<?php p($contextid) ?>" />
<input type="hidden" name="roleid" value="<?php p($roleid) ?>" />
<input type="hidden" name="sesskey" value="<?php p(sesskey()) ?>" />
<input type="hidden" name="userid" value="<?php p($userid) ?>" />
<input type="hidden" name="courseid" value="<?php p($courseid) ?>" />
</fieldset>
<table class="rolecap">
<tr>
@@ -28,9 +30,16 @@
$component = '';
$strrisks = s(get_string('risks', 'role'));
$strcapabilities = s(get_string('capabilities', 'role'));
// MDL-11687
$strcapabilities = 'Capabilities';//s(get_string('capabilities', 'role'));
foreach ($capabilities as $capability) {
// legacy caps should not be overriden - we must use proper capabilities if needed
if (islegacy($capability->name)) {
continue;
}
// prints a breaker if component or name or context level
if ($capability->component != $component or $capability->contextlevel != $contextlevel) {
echo ('<tr class="rolecapheading header"><td colspan="10" class="header"><strong>'.get_component_string($capability->component, $capability->contextlevel).'</strong></td></tr>');
@@ -57,36 +66,36 @@
$isprohibit = 0;
}
$isdisabled = $isprohibit || islegacy($capability->name);
$isdisabled = $isprohibit;
$riskinfo = '<td class="risk managetrust">';
$rowclasses = '';
if (RISK_MANAGETRUST & (int)$capability->riskbitmask) {
$riskinfo .= '<a target="docspopup" title="'.get_string('riskmanagetrust', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">';
$riskinfo .= '<a onclick="this.target=\'docspopup\'" title="'.get_string('riskmanagetrust', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">';
$riskinfo .= '<img src="'.$CFG->pixpath.'/i/risk_managetrust.gif" alt="'.get_string('riskmanagetrustshort', 'admin').'" /></a>';
$rowclasses .= ' riskmanagetrust';
}
$riskinfo .= '</td><td class="risk config">';
if (RISK_CONFIG & (int)$capability->riskbitmask) {
$riskinfo .= '<a target="docspopup" title="'.get_string('riskconfig', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">';
$riskinfo .= '<a onclick="this.target=\'docspopup\'" title="'.get_string('riskconfig', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">';
$riskinfo .= '<img src="'.$CFG->pixpath.'/i/risk_config.gif" alt="'.get_string('riskconfigshort', 'admin').'" /></a>';
$rowclasses .= ' riskconfig';
}
$riskinfo .= '</td><td class="risk xss">';
if (RISK_XSS & (int)$capability->riskbitmask) {
$riskinfo .= '<a target="docspopup" title="'.get_string('riskxss', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">';
$riskinfo .= '<a onclick="this.target=\'docspopup\'" title="'.get_string('riskxss', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">';
$riskinfo .= '<img src="'.$CFG->pixpath.'/i/risk_xss.gif" alt="'.get_string('riskxssshort', 'admin').'" /></a>';
$rowclasses .= ' riskxss';
}
$riskinfo .= '</td><td class="risk personal">';
if (RISK_PERSONAL & (int)$capability->riskbitmask) {
$riskinfo .= '<a target="docspopup" title="'.get_string('riskpersonal', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">';
$riskinfo .= '<a onclick="this.target=\'docspopup\'" title="'.get_string('riskpersonal', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">';
$riskinfo .= '<img src="'.$CFG->pixpath.'/i/risk_personal.gif" alt="'.get_string('riskpersonalshort', 'admin').'" /></a>';
$rowclasses .= ' riskpersonal';
}
$riskinfo .= '</td><td class="risk spam">';
if (RISK_SPAM & (int)$capability->riskbitmask) {
$riskinfo .= '<a target="docspopup" title="'.get_string('riskspam', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">';
$riskinfo .= '<a onclick="this.target=\'docspopup\'" title="'.get_string('riskspam', 'admin').'" href="'.$CFG->docroot.'/'.$lang.'/'.$strrisks.'">';
$riskinfo .= '<img src="'.$CFG->pixpath.'/i/risk_spam.gif" alt="'.get_string('riskspamshort', 'admin').'" /></a>';
$rowclasses .= ' riskspam';
}
@@ -96,13 +105,7 @@
?>
<tr class="rolecap <?php echo $rowclasses; ?>">
<td class="name">
<span class="cap-desc">
<a target="docspopup" href="<?php echo $CFG->docroot.'/'.$lang.'/'.$strcapabilities.'/'.$capability->name ?>">
<?php echo get_capability_string($capability->name); ?></a>
</span>
<span class="cap-name"><?php echo $capability->name ?></span>
</td>
<td class="name"><span class="cap-desc"><a onclick="this.target='docspopup'" href="<?php echo $CFG->docroot.'/'.$lang.'/'.$strcapabilities.'/'.$capability->name ?>"><?php echo get_capability_string($capability->name); ?></a><span class="cap-name"><?php echo $capability->name ?></span></span></td>
<td class="inherit">
<input type="radio" title="<?php p($strinherit); ?>" name="<?php echo $capability->name; ?>" value="0"
@@ -136,8 +139,7 @@
<?php } ?>
</table>
<br />
<div align="center">
<div class="submit buttons">
<input type="submit" value="<?php print_string('savechanges') ?>" />
<input type="submit" name="cancel" value="<?php print_string('cancel') ?>" />
</div>
+35 -16
View File
@@ -2,7 +2,7 @@
require_once('../../config.php');
$contextid = required_param('contextid',PARAM_INT); // context id
$contextid = required_param('contextid', PARAM_INT); // context id
$roleid = optional_param('roleid', 0, PARAM_INT); // requested role id
$userid = optional_param('userid', 0, PARAM_INT); // needed for user tabs
$courseid = optional_param('courseid', 0, PARAM_INT); // needed for user tabs
@@ -12,29 +12,34 @@
error('Bad context ID');
}
if (!$sitecontext = get_context_instance(CONTEXT_SYSTEM, SITEID)) {
if (!$sitecontext = get_context_instance(CONTEXT_SYSTEM)) {
error('No site ID');
}
if ($context->id == $sitecontext->id) {
error ('Can not override base role capabilities');
error('Can not override base role capabilities');
}
require_capability('moodle/role:override', $context); // Just to make sure
if (!has_capability('moodle/role:override', $context)) {
error('You do not have permission to change overrides in this context!');
}
if ($courseid) {
if (!$course = get_record('course', 'id', $courseid)) {
error('Bad course ID');
}
} else {
$course = $SITE;
$course = clone($SITE);
$courseid = SITEID;
}
require_login($course);
$baseurl = 'override.php?contextid='.$context->id;
if (!empty($userid)) {
$baseurl .= '&amp;userid='.$userid;
}
if (!empty($courseid)) {
if ($courseid != SITEID) {
$baseurl .= '&amp;courseid='.$courseid;
}
@@ -42,6 +47,9 @@
redirect($baseurl);
}
/// needed for tabs.php
$overridableroles = get_overridable_roles($context);
$assignableroles = get_assignable_roles($context);
/// Get some language strings
@@ -53,6 +61,7 @@
$strparticipants = get_string('participants');
/// Make sure this user can override that role
if ($roleid) {
if (!user_can_override($context, $roleid)) {
error ('you can not override this role in this context');
@@ -64,18 +73,27 @@
$fullname = fullname($user, has_capability('moodle/site:viewfullnames', $context));
}
/// get all cababilities
$capabilities = fetch_context_capabilities($context);
/// Process incoming role override
if ($data = data_submitted() and $roleid and confirm_sesskey()) {
$allowed_values = array(CAP_INHERIT, CAP_ALLOW, CAP_PREVENT, CAP_PROHIBIT);
$capabilities = fetch_context_capabilities($context); // capabilities applicable in this context
$localoverrides = get_records_select('role_capabilities', "roleid = $roleid AND contextid = $context->id",
'', 'capability, permission, id');
foreach ($capabilities as $cap) {
if (!isset($data->{$cap->name})) {
//cap not specified in form
continue;
}
if (islegacy($data->{$cap->name})) {
continue;
}
$capname = $cap->name;
$value = clean_param($data->{$cap->name}, PARAM_INT);
if (!in_array($value, $allowed_values)) {
@@ -112,6 +130,8 @@
}
}
}
$rolename = get_field('role', 'name', 'id', $roleid);
add_to_log($course->id, 'role', 'override', 'admin/roles/override.php?contextid='.$context->id.'&roleid='.$roleid, $rolename, '', $USER->id);
redirect($baseurl);
}
@@ -129,7 +149,7 @@
/// site header
} else {
print_header("$course->fullname: $fullname", "$course->fullname",
print_header("$course->fullname: $fullname", $course->fullname,
"<a href=\"$CFG->wwwroot/user/view.php?id=$userid&amp;course=$course->id\">$fullname</a> -> $straction", "", "", true, "&nbsp;", navmenu($course));
}
$showroles = 1;
@@ -151,15 +171,13 @@
print_heading_with_help(get_string('overrides', 'role'), 'overrides');
$overridableroles = get_overridable_roles($context);
if ($roleid) {
/// prints a form to swap roles
echo '<div align="center">'.$strcurrentcontext.': '.print_context_name($context).'<br/>';
echo $strroletooverride.': ';
$overridableroles = array('0'=>get_string('listallroles', 'role').'...') + $overridableroles;
echo '<div class="selector">';
echo $strcurrentcontext.': '.print_context_name($context).'<br/>';
$overridableroles = array('0'=>get_string('listallroles', 'role').'...') + $overridableroles;
popup_form("$CFG->wwwroot/$CFG->admin/roles/override.php?userid=$userid&amp;courseid=$courseid&amp;contextid=$contextid&amp;roleid=",
$overridableroles, 'switchrole', $roleid, '');
$overridableroles, 'switchrole', $roleid, '', '', '', false, 'self', $strroletooverride);
echo '</div>';
$parentcontexts = get_parent_contexts($context);
@@ -177,11 +195,12 @@
$lang = str_replace('_utf8', '', current_language());
// Get the capabilities overrideable in this context
if ($capabilities = fetch_context_capabilities($context)) {
if (!empty($capabilities)) {
// Print the capabilities overrideable in this context
print_simple_box_start('center');
include_once('override.html');
print_simple_box_end();
} else {
notice(get_string('nocapabilitiesincontext', 'role'),
$CFG->wwwroot.'/'.$CFG->admin.'/roles/'.$baseurl);
+37 -13
View File
@@ -1,6 +1,11 @@
<?php // $Id$
// Handles headers and tabs for the roles control at any level apart from SYSTEM level
// We also assume that $currenttab, $assignableroles and $overridableroles are defined
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
if ($currenttab != 'update') {
switch ($context->contextlevel) {
@@ -29,11 +34,14 @@ if ($currenttab != 'update') {
case CONTEXT_COURSE:
if ($context->instanceid != SITEID) {
$streditcoursesettings = get_string("editcoursesettings");
$course = get_record('course', 'id', $context->instanceid);
print_header($streditcoursesettings, "$course->fullname",
require_login($course);
print_header($streditcoursesettings, $course->fullname,
"<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a> -> $straction");
}
}
break;
case CONTEXT_GROUP:
@@ -54,6 +62,8 @@ if ($currenttab != 'update') {
error("The required instance of this module doesn't exist");
}
require_login($course);
$strnav = "<a href=\"$CFG->wwwroot/mod/$module->name/view.php?id=$cm->id\">$instance->name</a> ->";
$fullmodulename = get_string("modulename", $module->name);
$streditinga = get_string("editinga", "moodle", $fullmodulename);
@@ -65,7 +75,6 @@ if ($currenttab != 'update') {
$focuscursor = "form.name";
}
$COURSE = $course;
print_header_simple($streditinga, '',
"<a href=\"$CFG->wwwroot/mod/$module->name/index.php?id=$course->id\">$strmodulenameplural</a> ->
$strnav <a href=\"$CFG->wwwroot/course/mod.php?update=$cm->id&amp;sesskey=".sesskey()."\">$streditinga</a> -> $straction", $focuscursor, "", false);
@@ -81,6 +90,9 @@ if ($currenttab != 'update') {
switch ($blockinstance->pagetype) {
case 'course-view':
if ($course = get_record('course', 'id', $blockinstance->pageid)) {
require_login($course);
if ($course->id != SITEID) {
$navigation = "<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a> -> $navigation";
}
@@ -104,7 +116,7 @@ if ($currenttab != 'update') {
break;
default:
error ('This is an unknown context!');
error ('This is an unknown context (' . $context->contextlevel . ') in admin/roles/tabs.php!');
return false;
}
@@ -123,14 +135,7 @@ if ($context->contextlevel != CONTEXT_SYSTEM) { // Print tabs for anything ex
$toprow[] = new tabobject('roles', $CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.
$context->id, get_string('roles'));
if (isset($tabsmode)) {
if (!isset($assignableroles)) {
$assignableroles = get_assignable_roles($context);
}
if (!isset($overridableroles)) {
$overridableroles = get_overridable_roles($context);
}
if (!empty($tabsmode)) {
if (!empty($assignableroles)) {
$secondrow[] = new tabobject('assign',
@@ -157,6 +162,25 @@ if ($context->contextlevel != CONTEXT_SYSTEM) { // Print tabs for anything ex
$activetwo = array();
}
/// Here other core tabs should go (always calling tabs.php files)
/// All the logic to decide what to show must be self-cointained in the tabs file
/// ej.:
/// include_once($CFG->dirroot . '/grades/tabs.php');
/// Finally, we support adding some 'on-the-fly' tabs here
/// All the logic to decide what to show must be self-cointained in the tabs file
if (isset($CFG->extratabs) && !empty($CFG->extratabs)) {
if ($extratabs = explode(',', $CFG->extratabs)) {
asort($extratabs);
foreach($extratabs as $extratab) {
/// Each extra tab mus be one $CFG->dirroot relative file
if (file_exists($CFG->dirroot . '/' . $extratab)) {
include_once($CFG->dirroot . '/' . $extratab);
}
}
}
}
if (!empty($secondrow)) {
$tabs = array($toprow, $secondrow);
} else {
+7
View File
@@ -59,8 +59,10 @@ if ($statusmsg != '') {
$resultshtml = search_settings_html(admin_get_root(), $query);
echo '<form action="search.php" method="post" id="adminsettings">';
echo '<div>';
echo '<input type="hidden" name="sesskey" value="' . sesskey() . '" />';
echo '<input type="hidden" name="query" value="' . s($query) . '" />';
echo '</div>';
echo '<fieldset>';
echo '<div class="clearer"><!-- --></div>';
if ($resultshtml != '') {
@@ -112,6 +114,11 @@ function search_settings(&$node, $query) {
function search_settings_html(&$node, $query) {
global $CFG;
if ($query == ''){
return '';
}
if (is_a($node, 'admin_category')) {
$entries = array_keys($node->children);
$return = '';
+7 -1
View File
@@ -10,14 +10,20 @@ $temp->add(new admin_setting_configcheckbox('allowuserthemes', get_string('allow
$temp->add(new admin_setting_configcheckbox('allowcoursethemes', get_string('allowcoursethemes', 'admin'), get_string('configallowcoursethemes', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('allowuserblockhiding', get_string('allowuserblockhiding', 'admin'), get_string('configallowuserblockhiding', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('showblocksonmodpages', get_string('showblocksonmodpages', 'admin'), get_string('configshowblocksonmodpages', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('tabselectedtofront', get_string('tabselectedtofronttext', 'admin'), get_string('tabselectedtofront', 'admin'), 0));
$ADMIN->add('themes', $temp);
$ADMIN->add('themes', new admin_externalpage('themeselector', get_string('themeselector','admin'), $CFG->wwwroot . '/theme/index.php'));
# for CALENDAR_TF_12 and CALENDAR_TF_24 ...
require_once($CFG->dirroot . '/calendar/lib.php');
// calendar
$temp = new admin_settingpage('calendar', get_string('calendarsettings','admin'));
$temp->add(new admin_setting_special_adminseesall());
$temp->add(new admin_setting_configselect('calendar_site_timeformat', get_string('pref_timeformat', 'calendar'), get_string('explain_site_timeformat', 'calendar'), '0',
array( 0 => get_string('default', 'calendar'),
CALENDAR_TF_12 => get_string('timeformat_12', 'calendar'),
CALENDAR_TF_24 => get_string('timeformat_24', 'calendar')
)));
$temp->add(new admin_setting_configselect('calendar_startwday', get_string('configstartwday', 'admin'), get_string('helpstartofweek', 'admin'), 0,
array(
0 => get_string('sunday', 'calendar'),
+2 -2
View File
@@ -3,7 +3,7 @@
// This file defines settingpages and externalpages under the "courses" category
$ADMIN->add('courses', new admin_externalpage('coursemgmt', get_string('coursemgmt', 'admin'), $CFG->wwwroot . '/course/index.php?categoryedit=on'));
$ADMIN->add('courses', new admin_externalpage('coursemgmt', get_string('coursemgmt', 'admin'), $CFG->wwwroot . '/course/index.php?categoryedit=on','moodle/category:update'));
$ADMIN->add('courses', new admin_externalpage('enrolment', get_string('enrolments'), $CFG->wwwroot . '/'.$CFG->admin.'/enrol.php'));
@@ -17,7 +17,7 @@ $ADMIN->add('courses', $temp);
// "backups" settingpage
$temp = new admin_settingpage('backups', get_string('backups','admin'));
$temp = new admin_settingpage('backups', get_string('backups','admin'),'moodle/site:backup');
$temp->add(new admin_setting_backupcheckbox('backup_sche_modules', get_string('includemodules'), get_string('backupincludemoduleshelp'), 0));
$temp->add(new admin_setting_backupcheckbox('backup_sche_withuserdata', get_string('includemoduleuserdata'), get_string('backupincludemoduleuserdatahelp'), 0));
$temp->add(new admin_setting_backupcheckbox('backup_sche_metacourse', get_string('metacourse'), get_string('backupmetacoursehelp'), 0));
+6 -3
View File
@@ -6,13 +6,16 @@
$temp = new admin_settingpage('langsettings', get_string('languagesettings', 'admin'));
$temp->add(new admin_setting_configselect('lang', get_string('lang', 'admin'), get_string('configlang', 'admin'), current_language(), get_list_of_languages())); // $CFG->lang might be set in installer already, default en or en_utf8 is in setup.php
$temp->add(new admin_setting_configcheckbox('langmenu', get_string('langmenu', 'admin'), get_string('configlangmenu', 'admin'), 1));
$temp->add(new admin_setting_configtext('langlist', get_string('langlist', 'admin'), get_string('configlanglist', 'admin'), '', PARAM_NOTAGS));
$temp->add(new admin_setting_langlist());
$temp->add(new admin_setting_configcheckbox('langcache', get_string('langcache', 'admin'), get_string('configlangcache', 'admin'), 1));
$temp->add(new admin_setting_configtext('locale', get_string('localetext', 'admin'), get_string('configlocale', 'admin'), '', PARAM_FILE));
// new CFG variable for excel encoding
$temp->add(new admin_setting_configselect('latinexcelexport', get_string('latinexcelexport', 'admin'), get_string('configlatinexcelexport', 'admin'), '0', array('0'=>'Unicode','1'=>'Latin')));
$ADMIN->add('language', $temp);
$ADMIN->add('language', new admin_externalpage('langedit', get_string('langedit', 'admin'), "$CFG->wwwroot/$CFG->admin/lang.php"));
$ADMIN->add('language', new admin_externalpage('langimport', get_string('langpacks', 'admin'), "$CFG->wwwroot/$CFG->admin/langimport.php"));
-1
View File
@@ -5,7 +5,6 @@ $temp = new admin_settingpage('locationsettings', get_string('locationsettings',
$options = get_list_of_timezones();
$options[99] = get_string('serverlocaltime');
$temp->add(new admin_setting_configselect('timezone', get_string('timezone','admin'), get_string('configtimezone', 'admin'), 99, $options));
$options = get_list_of_timezones();
$options[99] = get_string('timezonenotforced', 'admin');
$temp->add(new admin_setting_configselect('forcetimezone', get_string('forcetimezone', 'admin'), get_string('helpforcetimezone', 'admin'), 99, $options));
$options = get_list_of_countries();
+1 -1
View File
@@ -25,7 +25,7 @@ $temp->add(new admin_setting_configselect('fullnamedisplay', get_string('fullnam
'lastname firstname' => get_string('lastname') . ' + ' . get_string('firstname'),
'firstname' => get_string('firstname'))));
$temp->add(new admin_setting_configcheckbox('extendedusernamechars', get_string('extendedusernamechars', 'admin'), get_string('configextendedusernamechars', 'admin'), 0));
$temp->add(new admin_setting_configtext('sitepolicy', get_string('sitepolicy', 'admin'), get_string('configsitepolicy', 'admin'), '', PARAM_URL));
$temp->add(new admin_setting_configtext('sitepolicy', get_string('sitepolicy', 'admin'), get_string('configsitepolicy', 'admin'), '', PARAM_RAW));
$temp->add(new admin_setting_configselect('bloglevel', get_string('bloglevel', 'admin'), get_string('configbloglevel', 'admin'), 4, array(5 => get_string('worldblogs','blog'),
4 => get_string('siteblogs','blog'),
3 => get_string('courseblogs','blog'),
+2
View File
@@ -48,6 +48,7 @@ $temp->add(new admin_setting_configselect('digestmailtime', get_string('digestma
'22' => '22',
'23' => '23')));
$charsets = get_list_of_charsets();
unset($charsets['UTF-8']); // not needed here
$options = array();
$options['0'] = get_string('none');
$options = array_merge($options, $charsets);
@@ -85,6 +86,7 @@ $ADMIN->add('server', $temp);
$temp = new admin_settingpage('debugging', get_string('debugging', 'admin'));
$temp->add(new admin_setting_special_debug());
$temp->add(new admin_setting_special_debugdisplay());
$temp->add(new admin_setting_configcheckbox('debugsmtp', get_string('debugsmtp', 'admin'), get_string('configdebugsmtp', 'admin'), 0));
$temp->add(new admin_setting_special_perfdebug());
$ADMIN->add('server', $temp);
+11 -1
View File
@@ -23,7 +23,7 @@ $ADMIN->add('accounts', new admin_externalpage('profilefields', get_string('prof
$ADMIN->add('users', new admin_category('roles', get_string('permissions', 'role')));
$ADMIN->add('roles', new admin_externalpage('defineroles', get_string('defineroles', 'role'), "$CFG->wwwroot/$CFG->admin/roles/manage.php"));
$sitecontext = get_context_instance(CONTEXT_SYSTEM);
$ADMIN->add('roles', new admin_externalpage('assignroles', get_string('assignroles', 'role'), "$CFG->wwwroot/$CFG->admin/roles/assign.php?contextid=" . $sitecontext->id));
$ADMIN->add('roles', new admin_externalpage('assignroles', get_string('assignglobalroles', 'role'), "$CFG->wwwroot/$CFG->admin/roles/assign.php?contextid=" . $sitecontext->id));
// "userpolicies" settingpage
@@ -43,6 +43,14 @@ if ($userroles = get_roles_with_capability('moodle/legacy:user', CAP_ALLOW)) {
} else {
$userrole->id = 0;
}
if (empty($CFG->creatornewroleid)) {
if ($teacherroles = get_roles_with_capability('moodle/legacy:editingteacher', CAP_ALLOW, $context)) {
$teachereditrole = array_shift($teacherroles);
set_config('creatornewroleid', $teachereditrole->id);
} else {
set_config('creatornewroleid', 0);
}
}
// we must not use assignable roles here:
// 1/ unsetting roles as assignable for admin might bork the settings!
// 2/ default user role should not be assignable anyway
@@ -61,6 +69,8 @@ $temp->add(new admin_setting_configselect('defaultuserroleid', get_string('defau
get_string('configdefaultuserroleid', 'admin'), $userrole->id, $allroles));
$temp->add(new admin_setting_configselect('defaultcourseroleid', get_string('defaultcourseroleid', 'admin'),
get_string('configdefaultcourseroleid', 'admin'), $studentrole->id, $allroles));
$temp->add(new admin_setting_configselect('creatornewroleid', get_string('creatornewroleid', 'admin'),
get_string('configcreatornewroleid', 'admin'), $CFG->creatornewroleid, $allroles));
$temp->add(new admin_setting_configcheckbox('autologinguests', get_string('autologinguests', 'admin'), get_string('configautologinguests', 'admin'), 0));
+1 -1
View File
@@ -72,7 +72,7 @@
if (!empty($pt)) {
echo '</td>';
echo '<td valign="top" style="width: '.$blocks_preferred_width.'px;" id="left-column">';
echo '<td valign="top" style="width: '.$blocks_preferred_width.'px;" id="right-column">';
blocks_print_group($PAGE, $blocks, BLOCK_POS_RIGHT);
echo '</td>';
echo '</tr></table>';
+9 -9
View File
@@ -24,9 +24,9 @@
if (!$ok or !confirm_sesskey()) {
$message = '<br /><br />';
$message .= $CFG->dataroot.'/temp/olson.txt<br />';
$message .= $CFG->dataroot.'/temp/timezones.txt<br />';
$message .= '<a href="http://download.moodle.org/timezones/">http://download.moodle.org/timezones/</a><br />';
$message .= '<a href="'.$CFG->wwwroot.'/lib/timezones.txt">'.$CFG->dirroot.'/lib/timezones.txt</a><br />';
$message .= $CFG->dataroot.'/temp/timezone.txt<br />';
$message .= '<a href="http://download.moodle.org/timezone/">http://download.moodle.org/timezone/</a><br />';
$message .= '<a href="'.$CFG->wwwroot.'/lib/timezone.txt">'.$CFG->dirroot.'/lib/timezone.txt</a><br />';
$message .= '<br />';
$message = get_string("configintrotimezones", 'admin', $message);
@@ -54,7 +54,7 @@
/// Next, look for a CSV file locally
$source = $CFG->dataroot.'/temp/timezones.txt';
$source = $CFG->dataroot.'/temp/timezone.txt';
if (!$importdone and is_readable($source)) {
if ($timezones = get_records_csv($source, 'timezone')) {
update_timezone_records($timezones);
@@ -64,17 +64,17 @@
/// Otherwise, let's try moodle.org's copy
$source = 'http://download.moodle.org/timezones/';
$source = 'http://download.moodle.org/timezone/';
if (!$importdone and ini_get('allow_url_fopen')) {
if (is_readable($source) && $contents = file_get_contents($source)) { // Grab whole page
if ($file = fopen($CFG->dataroot.'/temp/timezones.txt', 'w')) { // Make local copy
if ($file = fopen($CFG->dataroot.'/temp/timezone.txt', 'w')) { // Make local copy
fwrite($file, $contents);
fclose($file);
if ($timezones = get_records_csv($CFG->dataroot.'/temp/timezones.txt', 'timezone')) { // Parse it
if ($timezones = get_records_csv($CFG->dataroot.'/temp/timezone.txt', 'timezone')) { // Parse it
update_timezone_records($timezones);
$importdone = $source;
}
unlink($CFG->dataroot.'/temp/timezones.txt');
unlink($CFG->dataroot.'/temp/timezone.txt');
}
}
}
@@ -82,7 +82,7 @@
/// Final resort, use the copy included in Moodle
$source = $CFG->dirroot.'/lib/timezones.txt';
$source = $CFG->dirroot.'/lib/timezone.txt';
if (!$importdone and is_readable($source)) { // Distribution file
if ($timezones = get_records_csv($source, 'timezone')) {
update_timezone_records($timezones);
+3
View File
@@ -6,6 +6,9 @@
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
/// no guest autologin
require_login(0, false);
$adminroot = admin_get_root();
admin_externalpage_setup('upgradesettings', $adminroot); // now hidden page
+10 -11
View File
@@ -62,13 +62,16 @@ if ($um->preprocess_files() && confirm_sesskey()) {
// that we'll take longer, and that the process should be recycled soon
// to free up memory.
@set_time_limit(0);
@raise_memory_limit("196M");
@raise_memory_limit("192M");
if (function_exists('apache_child_terminate')) {
@apache_child_terminate();
}
//Fix mac/dos newlines
$text = my_file_get_contents($filename);
//trim utf-8 bom
$textlib = new textlib();
$text = $textlib->trim_utf8_bom($text);
//Fix mac/dos newlines
$text = preg_replace('!\r\n?!',"\n",$text);
$fp = fopen($filename, "w");
fwrite($fp,$text);
@@ -101,8 +104,6 @@ if ($um->preprocess_files() && confirm_sesskey()) {
"maildisplay" => 1,
"htmleditor" => 1,
"autosubscribe" => 1,
"idnumber" => 1,
"icq" => 1,
"course1" => 1,
"course2" => 1,
"course3" => 1,
@@ -131,10 +132,10 @@ if ($um->preprocess_files() && confirm_sesskey()) {
// check for valid field names
foreach ($header as $i => $h) {
$h = trim($h); $header[$i] = $h; // remove whitespace
if (!($required[$h] or $optionalDefaults[$h] or $optional[$h])) {
if (!(isset($required[$h]) or isset($optionalDefaults[$h]) or isset($optional[$h]))) {
error(get_string('invalidfieldname', 'error', $h), 'uploaduser.php?sesskey='.$USER->sesskey);
}
if ($required[$h]) {
if (isset($required[$h])) {
$required[$h] = 0;
}
}
@@ -173,7 +174,7 @@ if ($um->preprocess_files() && confirm_sesskey()) {
// add fields to object $user
foreach ($record as $name => $value) {
// check for required values
if ($required[$name] and !$value) {
if (isset($required[$name]) and !$value) {
error(get_string('missingfield', 'error', $name). " ".
get_string('erroronline', 'error', $linenum) .". ".
get_string('processingstops', 'error'),
@@ -265,7 +266,6 @@ if ($um->preprocess_files() && confirm_sesskey()) {
//This can be used to obtain a list of userids for existing users
notify("$olduser->id ".get_string('usernotaddedregistered', 'error', $username));
$userserrors++;
continue;
}
} else { // new user
@@ -299,8 +299,8 @@ if ($um->preprocess_files() && confirm_sesskey()) {
if (!$course[$i]) {
notify(get_string('coursegroupunknown','error',$addgroup[$i]));
} else {
if ($groupid = groups_get_group_by_name($course[$i]->id, $addgroup[$i])) { //TODO:check.
$groupid[$i] = $groupid;
if ($gid = groups_get_group_by_name($course[$i]->id, $addgroup[$i])) {
$groupid[$i] = $gid;
} else {
notify(get_string('groupunknown','error',$addgroup[$i]));
}
@@ -419,4 +419,3 @@ function my_file_get_contents($filename, $use_include_path = 0) {
}
?>
+31 -27
View File
@@ -63,19 +63,24 @@
$strsearch = get_string('search');
$strshowallusers = get_string('showallusers');
if (empty($CFG->loginhttps)) {
$securewwwroot = $CFG->wwwroot;
} else {
$securewwwroot = str_replace('http:','https:',$CFG->wwwroot);
}
admin_externalpage_print_header($adminroot);
if ($confirmuser and confirm_sesskey()) {
if (!$user = get_record('user', 'id', $confirmuser)) {
error("No such user!");
error("No such user!", '', true);
}
$confirmeduser = new object();
$confirmeduser->id = $confirmuser;
$confirmeduser->confirmed = 1;
$confirmeduser->timemodified = time();
$auth = get_auth_plugin($user->auth);
if (update_record('user', $confirmeduser)) {
$result = $auth->user_confirm(addslashes($user->username), addslashes($user->secret));
if ($result == AUTH_CONFIRM_OK or $result == AUTH_CONFIRM_ALREADY) {
notify(get_string('userconfirmed', '', fullname($user, true)) );
} else {
notify(get_string('usernotconfirmed', '', fullname($user, true)));
@@ -88,12 +93,12 @@
}
if (!$user = get_record('user', 'id', $delete)) {
error("No such user!");
error("No such user!", '', true);
}
$primaryadmin = get_admin();
if ($user->id == $primaryadmin->id) {
error("You are not allowed to delete the primary admin user!");
error("You are not allowed to delete the primary admin user!", '', true);
}
if ($confirm != md5($delete)) {
@@ -104,16 +109,18 @@
admin_externalpage_print_footer($adminroot);
die;
} else if (data_submitted() and !$user->deleted) {
//following code is also used in auth sync scripts
$updateuser = new object();
$updateuser->id = $user->id;
$updateuser->deleted = 1;
$updateuser->username = addslashes("$user->email.".time()); // Remember it just in case
$updateuser->email = ''; // Clear this field to free it up
$updateuser->idnumber = ''; // Clear this field to free it up
$updateuser->id = $user->id;
$updateuser->deleted = 1;
$updateuser->username = addslashes("$user->email.".time()); // Remember it just in case
$updateuser->email = ''; // Clear this field to free it up
$updateuser->idnumber = ''; // Clear this field to free it up
$updateuser->timemodified = time();
if (update_record('user', $updateuser)) {
// not sure if this is needed. unenrol_student($user->id); // From all courses
delete_records('role_assignments', 'userid', $user->id); // unassign all roles
// Removing a user may have more requirements than just removing their role assignments.
// Use 'role_unassign' to make sure that all necessary actions occur.
role_unassign(0, $user->id);
// remove all context assigned on this user?
notify(get_string('deletedactivity', '', fullname($user, true)) );
} else {
@@ -126,7 +133,7 @@
error('You are not permitted to modify the MNET access control list.');
}
if (!$user = get_record('user', 'id', $acl)) {
error("No such user.");
error("No such user.", '', true);
}
if (!is_mnet_remote_user($user)) {
error('Users in the MNET access control list must be remote MNET users.');
@@ -142,12 +149,12 @@
$aclrecord->username = $user->username;
$aclrecord->accessctrl = $accessctrl;
if (!insert_record('mnet_sso_access_control', $aclrecord)) {
error("Database error - Couldn't modify the MNET access control list.");
error("Database error - Couldn't modify the MNET access control list.", '', true);
}
} else {
$aclrecord->accessctrl = $accessctrl;
if (!update_record('mnet_sso_access_control', $aclrecord)) {
error("Database error - Couldn't modify the MNET access control list.");
error("Database error - Couldn't modify the MNET access control list.", '', true);
}
}
$mnethosts = get_records('mnet_host', '', '', 'id', 'id,wwwroot,name');
@@ -196,7 +203,7 @@
}
}
$users = get_users_listing($sort, $dir, $page*$perpage, $perpage, $search, $firstinitial, $lastinitial, $remotewhere);
$users = get_users_listing($sort, $dir, $page*$perpage, $perpage, $search, $firstinitial, $lastinitial, $remotewhere, false);
$usercount = get_users(false);
$usersearchcount = get_users(false, $search, true, "", "", $firstinitial, $lastinitial);
@@ -296,11 +303,6 @@
}
$mainadmin = get_admin();
if(empty($CFG->loginhttps)) {
$securewwwroot = $CFG->wwwroot;
} else {
$securewwwroot = str_replace('http:','https:',$CFG->wwwroot);
}
$table->head = array ("$firstname / $lastname", $email, $city, $country, $lastaccess, "", "", "");
$table->align = array ("left", "left", "left", "left", "left", "center", "center", "center");
@@ -354,7 +356,9 @@
. get_string($changeaccessto, 'mnet') . " access</a>)";
}
// mnet info in edit column
$editbutton = $mnethosts[$user->mnethostid]->name;
if (isset($mnethosts[$user->mnethostid])) {
$editbutton = $mnethosts[$user->mnethostid]->name;
}
}
if ($user->lastaccess) {
@@ -405,7 +409,7 @@
echo "</td></tr></table>";
if (has_capability('moodle/user:create', $sitecontext)) {
print_heading('<a href="../user/editadvanced.php?id=-1">'.get_string('addnewuser').'</a>');
print_heading('<a href="'.$securewwwroot.'/user/editadvanced.php?id=-1">'.get_string('addnewuser').'</a>');
}
if (!empty($table)) {
print_table($table);
@@ -413,7 +417,7 @@
"user.php?sort=$sort&amp;dir=$dir&amp;perpage=$perpage".
"&amp;firstinitial=$firstinitial&amp;lastinitial=$lastinitial&amp;search=".urlencode(stripslashes($search))."&amp;");
if (has_capability('moodle/user:create', $sitecontext)) {
print_heading('<a href="../user/editadvanced.php?id=-1">'.get_string('addnewuser').'</a>');
print_heading('<a href="'.$securewwwroot.'/user/editadvanced.php?id=-1">'.get_string('addnewuser').'</a>');
}
}
@@ -0,0 +1,271 @@
<?php // $Id$
///////////////////////////////////////////////////////////////////////////
// //
// NOTICE OF COPYRIGHT //
// //
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
// http://moodle.com //
// //
// Copyright (C) 2001-3001 Martin Dougiamas http://dougiamas.com //
// (C) 2001-3001 Eloy Lafuente (stronk7) http://contiento.com //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details: //
// //
// http://www.gnu.org/copyleft/gpl.html //
// //
///////////////////////////////////////////////////////////////////////////
/// This class will compare all the indexes found in the XMLDB definitions
/// with the phisical DB implementation, reporting about all the missing
/// indexes to be created to be 100% ok.
class check_indexes extends XMLDBAction {
/**
* Init method, every subclass will have its own
*/
function init() {
parent::init();
/// Set own core attributes
/// Set own custom attributes
/// Get needed strings
$this->loadStrings(array(
'confirmcheckindexes' => 'xmldb',
'ok' => '',
'missing' => 'xmldb',
'table' => 'xmldb',
'key' => 'xmldb',
'index' => 'xmldb',
'searchresults' => 'xmldb',
'missingindexes' => 'xmldb',
'completelogbelow' => 'xmldb',
'nomissingindexesfound' => 'xmldb',
'yesmissingindexesfound' => 'xmldb',
'yes' => '',
'no' => '',
'back' => 'xmldb'
));
}
/**
* Invoke method, every class will have its own
* returns true/false on completion, setting both
* errormsg and output as necessary
*/
function invoke() {
parent::invoke();
$result = true;
/// Set own core attributes
$this->does_generate = ACTION_GENERATE_HTML;
/// These are always here
global $CFG, $XMLDB;
/// And we nedd some ddl suff
require_once ($CFG->libdir . '/ddllib.php');
/// Here we'll acummulate all the missing indexes found
$missing_indexes = array();
/// Do the job, setting $result as needed
/// Get the confirmed to decide what to do
$confirmed = optional_param('confirmed', false, PARAM_BOOL);
/// If not confirmed, show confirmation box
if (!$confirmed) {
$o = '<table class="generalbox" border="0" cellpadding="5" cellspacing="0" id="notice">';
$o.= ' <tr><td class="generalboxcontent">';
$o.= ' <p class="centerpara">' . $this->str['confirmcheckindexes'] . '</p>';
$o.= ' <table class="boxaligncenter" cellpadding="20"><tr><td>';
$o.= ' <div class="singlebutton">';
$o.= ' <form action="index.php?action=check_indexes&amp;confirmed=yes" method="post"><fieldset class="invisiblefieldset">';
$o.= ' <input type="submit" value="'. $this->str['yes'] .'" /></fieldset></form></div>';
$o.= ' </td><td>';
$o.= ' <div class="singlebutton">';
$o.= ' <form action="index.php?action=main_view" method="post"><fieldset class="invisiblefieldset">';
$o.= ' <input type="submit" value="'. $this->str['no'] .'" /></fieldset></form></div>';
$o.= ' </td></tr>';
$o.= ' </table>';
$o.= ' </td></tr>';
$o.= '</table>';
$this->output = $o;
} else {
/// The back to edit table button
$b = ' <p class="centerpara buttons">';
$b .= '<a href="index.php">[' . $this->str['back'] . ']</a>';
$b .= '</p>';
/// Iterate over $XMLDB->dbdirs, loading their XML data to memory
if ($XMLDB->dbdirs) {
$dbdirs =& $XMLDB->dbdirs;
$o='<ul>';
foreach ($dbdirs as $dbdir) {
/// Only if the directory exists
if (!$dbdir->path_exists) {
continue;
}
/// Load the XML file
$xmldb_file = new XMLDBFile($dbdir->path . '/install.xml');
/// Load the needed XMLDB generator
$classname = 'XMLDB' . $CFG->dbtype;
$generator = new $classname();
$generator->setPrefix($CFG->prefix);
/// Only if the file exists
if (!$xmldb_file->fileExists()) {
continue;
}
/// Load the XML contents to structure
$loaded = $xmldb_file->loadXMLStructure();
if (!$loaded || !$xmldb_file->isLoaded()) {
notify('Errors found in XMLDB file: '. $dbdir->path . '/install.xml');
continue;
}
/// Arriving here, everything is ok, get the XMLDB structure
$structure = $xmldb_file->getStructure();
$o.=' <li>' . str_replace($CFG->dirroot . '/', '', $dbdir->path . '/install.xml');
/// Getting tables
if ($xmldb_tables = $structure->getTables()) {
$o.=' <ul>';
/// Foreach table, process its indexes and keys
foreach ($xmldb_tables as $xmldb_table) {
/// Skip table if not exists
if (!table_exists($xmldb_table)) {
continue;
}
$o.=' <li>' . $xmldb_table->getName();
/// Keys
if ($xmldb_keys = $xmldb_table->getKeys()) {
$o.=' <ul>';
foreach ($xmldb_keys as $xmldb_key) {
$o.=' <li>' . $this->str['key'] . ': ' . $xmldb_key->readableInfo() . ' ';
/// Primaries are skipped
if ($xmldb_key->getType() == XMLDB_KEY_PRIMARY) {
$o.='<font color="green">' . $this->str['ok'] . '</font></li>';
continue;
}
/// If we aren't creating the keys or the key is a XMLDB_KEY_FOREIGN (not underlying index generated
/// automatically by the RDBMS) create the underlying (created by us) index (if doesn't exists)
if (!$generator->getKeySQL($xmldb_table, $xmldb_key) || $xmldb_key->getType() == XMLDB_KEY_FOREIGN) {
/// Create the interim index
$xmldb_index = new XMLDBIndex('anyname');
$xmldb_index->setFields($xmldb_key->getFields());
switch ($xmldb_key->getType()) {
case XMLDB_KEY_UNIQUE:
case XMLDB_KEY_FOREIGN_UNIQUE:
$xmldb_index->setUnique(true);
break;
case XMLDB_KEY_FOREIGN:
$xmldb_index->setUnique(false);
break;
}
/// Check if the index exists in DB
if (index_exists($xmldb_table, $xmldb_index)) {
$o.='<font color="green">' . $this->str['ok'] . '</font>';
} else {
$o.='<font color="red">' . $this->str['missing'] . '</font>';
/// Add the missing index to the list
$obj = new object;
$obj->table = $xmldb_table;
$obj->index = $xmldb_index;
$missing_indexes[] = $obj;
}
}
$o.='</li>';
}
$o.=' </ul>';
}
/// Indexes
if ($xmldb_indexes = $xmldb_table->getIndexes()) {
$o.=' <ul>';
foreach ($xmldb_indexes as $xmldb_index) {
$o.=' <li>' . $this->str['index'] . ': ' . $xmldb_index->readableInfo() . ' ';
/// Check if the index exists in DB
if (index_exists($xmldb_table, $xmldb_index)) {
$o.='<font color="green">' . $this->str['ok'] . '</font>';
} else {
$o.='<font color="red">' . $this->str['missing'] . '</font>';
/// Add the missing index to the list
$obj = new object;
$obj->table = $xmldb_table;
$obj->index = $xmldb_index;
$missing_indexes[] = $obj;
}
$o.='</li>';
}
$o.=' </ul>';
}
$o.=' </li>';
}
$o.=' </ul>';
}
$o.=' </li>';
}
$o.='</ul>';
}
/// We have finished, let's show the results of the search
$s = '';
$r = '<table class="generalbox boxaligncenter boxwidthwide" border="0" cellpadding="5" cellspacing="0" id="results">';
$r.= ' <tr><td class="generalboxcontent">';
$r.= ' <h2 class="main">' . $this->str['searchresults'] . '</h2>';
$r.= ' <p class="centerpara">' . $this->str['missingindexes'] . ': ' . count($missing_indexes) . '</p>';
$r.= ' </td></tr>';
$r.= ' <tr><td class="generalboxcontent">';
/// If we have found missing indexes inform about them
if (count($missing_indexes)) {
$r.= ' <p class="centerpara">' . $this->str['yesmissingindexesfound'] . '</p>';
$r.= ' <ul>';
foreach ($missing_indexes as $obj) {
$xmldb_table = $obj->table;
$xmldb_index = $obj->index;
$sqlarr = $xmldb_table->getAddIndexSQL($CFG->dbtype, $CFG->prefix, $xmldb_index, true);
$r.= ' <li>' . $this->str['table'] . ': ' . $xmldb_table->getName() . '. ' .
$this->str['index'] . ': ' . $xmldb_index->readableInfo() . '</li>';
$s.= '<code>' . str_replace("\n", '<br />', implode('<br />', $sqlarr)) . '</code><br />';
}
$r.= ' </ul>';
/// Add the SQL statements (all together)
$r.= '<hr />' . $s;
} else {
$r.= ' <p class="centerpara">' . $this->str['nomissingindexesfound'] . '</p>';
}
$r.= ' </td></tr>';
$r.= ' <tr><td class="generalboxcontent">';
/// Add the complete log message
$r.= ' <p class="centerpara">' . $this->str['completelogbelow'] . '</p>';
$r.= ' </td></tr>';
$r.= '</table>';
$this->output = $b . $r . $o;
}
/// Launch postaction if exists (leave this here!)
if ($this->getPostAction() && $result) {
return $this->launch($this->getPostAction());
}
/// Return ok if arrived here
return $result;
}
}
?>
@@ -173,7 +173,7 @@ class edit_field extends XMLDBAction {
$o.= ' </table>';
$o.= '</div></form>';
/// Calculate the buttons
$b = ' <p class="buttons">';
$b = ' <p class="centerpara buttons">';
/// The view original XML button
if ($table->getField($fieldparam)) {
$b .= '&nbsp;<a href="index.php?action=view_field_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;select=original&amp;table=' . $tableparam . '&amp;field=' . $fieldparam . '">[' . $this->str['vieworiginal'] . ']</a>';
@@ -112,7 +112,7 @@ class edit_index extends XMLDBAction {
if ($structure->getIndexUses($table->getName(), $index->getName())) {
$disabled = ' disabled="disabled " ';
}
$o.= ' <tr valign="top"><td><label for="name" accesskey="n">Name:</label></td><td colspan="2"><input name="name" type="text" size="30" id="name"' . $disabled . 'value="' . s($index->getName()) . '" /></td></tr>';
$o.= ' <tr valign="top"><td><label for="name" accesskey="n">Name:</label></td><td colspan="2"><input name="name" type="text" size="30" id="name"' . $disabled . ' value="' . s($index->getName()) . '" /></td></tr>';
/// XMLDB key comment
$o.= ' <tr valign="top"><td><label for="comment" accesskey="c">Comment:</label></td><td colspan="2"><textarea name="comment" rows="3" cols="80" id="comment">' . s($index->getComment()) . '</textarea></td></tr>';
/// XMLDBIndex Type
@@ -128,7 +128,7 @@ class edit_index extends XMLDBAction {
$o.= ' </table>';
$o.= '</div></form>';
/// Calculate the buttons
$b = ' <p class="buttons">';
$b = ' <p class="centerpara buttons">';
/// The view original XML button
if ($table->getIndex($indexparam)) {
$b .= '&nbsp;<a href="index.php?action=view_index_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;select=original&amp;table=' . $tableparam . '&amp;index=' . $indexparam . '">[' . $this->str['vieworiginal'] . ']</a>';
@@ -112,7 +112,7 @@ class edit_key extends XMLDBAction {
if ($structure->getKeyUses($table->getName(), $key->getName())) {
$disabled = ' disabled="disabled " ';
}
$o.= ' <tr valign="top"><td><label for="name" accesskey="n">Name:</label></td><td colspan="2"><input name="name" type="text" size="30" id="name"' . $disabled . 'value="' . s($key->getName()) . '" /></td></tr>';
$o.= ' <tr valign="top"><td><label for="name" accesskey="n">Name:</label></td><td colspan="2"><input name="name" type="text" size="30" id="name"' . $disabled . ' value="' . s($key->getName()) . '" /></td></tr>';
/// XMLDB key comment
$o.= ' <tr valign="top"><td><label for="comment" accesskey="c">Comment:</label></td><td colspan="2"><textarea name="comment" rows="3" cols="80" id="comment">' . s($key->getComment()) . '</textarea></td></tr>';
/// XMLDBKey Type
@@ -140,7 +140,7 @@ class edit_key extends XMLDBAction {
$o.= ' </table>';
$o.= '</div></form>';
/// Calculate the buttons
$b = ' <p class="buttons">';
$b = ' <p class="centerpara buttons">';
/// The view original XML button
if ($table->getKey($keyparam)) {
$b .= '&nbsp;<a href="index.php?action=view_key_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;select=original&amp;table=' . $tableparam . '&amp;key=' . $keyparam . '">[' . $this->str['vieworiginal'] . ']</a>';
@@ -133,7 +133,7 @@ class edit_sentence extends XMLDBAction {
$o.= ' </table>';
$o.= '</div></form>';
/// Calculate the buttons
$b = ' <p class="buttons">';
$b = ' <p class="centerpara buttons">';
/// The back to edit statement button
$b .= '&nbsp;<a href="index.php?action=edit_statement&amp;statement=' . urlencode($statementparam) . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '">[' . $this->str['back'] . ']</a>';
$b .= '</p>';
@@ -115,7 +115,7 @@ class edit_statement extends XMLDBAction {
$o.= ' </table>';
$o.= '</div></form>';
/// Calculate the buttons
$b = ' <p class="buttons">';
$b = ' <p class="centerpara buttons">';
/// The view original XML button
if ($origstructure->getStatement($statementparam)) {
$b .= '&nbsp;<a href="index.php?action=view_statement_xml&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '&amp;select=original&amp;statement=' . $statementparam . '">[' . $this->str['vieworiginal'] . ']</a>';
@@ -107,7 +107,7 @@ class edit_table_save extends XMLDBAction {
"<a href=\"../index.php\">" . $this->str['administration'] . "</a> -> <a href=\"index.php\">XMLDB</a>");
notice ('<p>' .implode(', ', $errors) . '</p>
<p>' . $temptable->readableInfo(),
'index.php?action=edit_table&amp;table=' . $tableparam . '&amp;dir=' . str_replace($CFG->dirroot, '', urlencode($dirpath)));
'index.php?action=edit_table&amp;table=' . $tableparam . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)));
die; /// re-die :-P
}
@@ -130,6 +130,18 @@ class get_db_directories extends XMLDBAction {
}
}
/// Now, course formats (course/format/xxx/db)
if ($plugins = get_list_of_plugins('course/format', 'db')) {
foreach ($plugins as $plugin) {
$dbdir = new stdClass;
$dbdir->path = $CFG->dirroot . '/course/format/' . $plugin . '/db';
if (!isset($XMLDB->dbdirs[$dbdir->path])) {
$XMLDB->dbdirs[$dbdir->path] = $dbdir;
}
$XMLDB->dbdirs[$dbdir->path]->path_exists = file_exists($dbdir->path); //Update status
}
}
/// Now, enrolment plugins (enrol/xxx/db)
if ($plugins = get_list_of_plugins('enrol', 'db')) {
foreach ($plugins as $plugin) {
@@ -141,7 +153,7 @@ class get_db_directories extends XMLDBAction {
$XMLDB->dbdirs[$dbdir->path]->path_exists = file_exists($dbdir->path); //Update status
}
}
/// Now, groups
$dbdir = new stdClass;
$dbdir->path = $CFG->dirroot . '/group/db';
@@ -81,6 +81,9 @@ class load_xml_file extends XMLDBAction {
return false;
}
$xmldb_file = new XMLDBFile($dbdir->path . '/install.xml');
///Set the XML DTD and schema
$xmldb_file->setDTD($CFG->dirroot . '/lib/xmldb/xmldb.dtd');
$xmldb_file->setSchema($CFG->dirroot . '/lib/xmldb/xmldb.xsd');
/// Set dbdir as necessary
if ($xmldb_file->fileExists()) {
$dbdir->xml_exists = true;
@@ -92,6 +95,7 @@ class load_xml_file extends XMLDBAction {
$loaded = $xmldb_file->loadXMLStructure();
if ($loaded && $xmldb_file->isLoaded()) {
$dbdir->xml_loaded = true;
$dbdir->filemtime = filemtime($dbdir->path . '/install.xml');
}
$dbdir->xml_file = $xmldb_file;
} else {
@@ -47,7 +47,8 @@ class main_view extends XMLDBAction {
'delete' => 'xmldb',
'reservedwords' => 'xmldb',
'test' => 'xmldb',
'gotolastused' => 'xmldb'
'gotolastused' => 'xmldb',
'checkindexes' => 'xmldb'
));
}
@@ -84,6 +85,8 @@ class main_view extends XMLDBAction {
$b .= '&nbsp;<a href="index.php?action=view_reserved_words">[' . $this->str['reservedwords'] . ']</a>';
/// The test button
$b .= '&nbsp;<a href="index.php?action=test">[' . $this->str['test'] . ']</a>';
/// The check indexes button
$b .= '&nbsp;<a href="index.php?action=check_indexes">[' . $this->str['checkindexes'] . ']</a>';
$b .= '</p>';
/// Send buttons to output
$o .= $b;
@@ -152,11 +155,18 @@ class main_view extends XMLDBAction {
/// The save button
if ($dbdir->path_exists &&
file_exists($key . '/install.xml') &&
is_readable($key . '/install.xml') &&
is_writeable($key . '/install.xml') &&
is_writeable($key) &&
!empty($dbdir->xml_loaded) &&
!empty($dbdir->xml_changed)) {
$b .= '<a href="index.php?action=save_xml_file&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $key)) . '&amp;time=' . time() . '&amp;postaction=main_view#lastused">[' . $this->str['save'] . ']</a>';
/// Check if the file has been manually edited while being modified in the editor
if ($dbdir->filemtime != filemtime($key . '/install.xml')) {
/// File manually modified. Add to errors.
if ($structure =& $dbdir->xml_file->getStructure()) {
$structure->errormsg = 'Warning: File locally modified while using the XMLDB Editor. Saving will overwrite local changes';
}
}
} else {
$b .= '[' . $this->str['save'] . ']';
}
@@ -88,6 +88,7 @@ class new_table extends XMLDBAction {
$field->setType(XMLDB_TYPE_INTEGER);
$field->setLength(10);
$field->setNotNull(true);
$field->setUnsigned(true);
$field->setSequence(true);
$field->setComment('id of the table, please edit me');
$field->setLoaded(true);
@@ -88,7 +88,7 @@ class new_table_from_mysql extends XMLDBAction {
$dbtables = $db->MetaTables('TABLES');
$selecttables = array();
foreach ($dbtables as $dbtable) {
$dbtable = str_replace($CFG->prefix, '', $dbtable);
$dbtable = strtolower(str_replace($CFG->prefix, '', $dbtable));
$i = $structure->findTableInArray($dbtable);
if ($i === NULL) {
$selecttables[$dbtable] = $dbtable;
+52 -35
View File
@@ -92,7 +92,7 @@ class test extends XMLDBAction {
$table->addFieldInfo('course', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0');
$table->addFieldInfo('type', XMLDB_TYPE_CHAR, '20', null, XMLDB_NOTNULL, null, XMLDB_ENUM, array('single', 'news', 'general', 'social', 'eachuser', 'teacher', 'qanda'), 'general');
$table->addFieldInfo('name', XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null, null, '');
$table->addFieldInfo('intro', XMLDB_TYPE_TEXT, 'small', null, XMLDB_NOTNULL, null, null, null, '');
$table->addFieldInfo('intro', XMLDB_TYPE_TEXT, 'small', null, XMLDB_NOTNULL, null, null, null, null);
$table->addFieldInfo('logo', XMLDB_TYPE_BINARY, 'big', null, XMLDB_NOTNULL, null, null, null);
$table->addFieldInfo('assessed', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0');
$table->addFieldInfo('assesstimestart', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0');
@@ -114,6 +114,8 @@ class test extends XMLDBAction {
$table->addIndexInfo('course', XMLDB_INDEX_NOTUNIQUE, array('course'));
$table->addIndexInfo('rsstype', XMLDB_INDEX_UNIQUE, array('rsstype'));
$table->setComment("This is a test'n drop table. You can drop it safely");
/// Get SQL code and execute it
$test = new stdClass;
$test->sql = $table->getCreateTableSQL($CFG->dbtype, $CFG->prefix, true);
@@ -275,7 +277,7 @@ class test extends XMLDBAction {
/// Get SQL code and execute it
$test = new stdClass;
$field = new XMLDBField('grade');
$field->setAttributes(XMLDB_TYPE_CHAR, '20', null, XMLDB_NOTNULL, null, null, null, 'test');
$field->setAttributes(XMLDB_TYPE_CHAR, '20', null, XMLDB_NOTNULL, null, null, null, "test'n drop");
$test->sql = $table->getAlterFieldSQL($CFG->dbtype, $CFG->prefix, $field, true);
$test->status = change_field_type($table, $field, false, false);
@@ -376,7 +378,22 @@ class test extends XMLDBAction {
$tests['change field precision (number)'] = $test;
}
/// 18th test. Change the sign of one numeric field to unsigned
/// 18th test. Change the precision of one integer field to a smaller one
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
$field = new XMLDBField('course');
$field->setAttributes(XMLDB_TYPE_INTEGER, '5', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0');
$test->sql = $table->getAlterFieldSQL($CFG->dbtype, $CFG->prefix, $field, true);
$test->status = change_field_precision($table, $field, false, false);
if (!$test->status) {
$test->error = $db->ErrorMsg();
}
$tests['change field precision (integer) to smaller one'] = $test;
}
/// 19th test. Change the sign of one numeric field to unsigned
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -391,7 +408,7 @@ class test extends XMLDBAction {
$tests['change field sign (unsigned)'] = $test;
}
/// 19th test. Change the sign of one numeric field to signed
/// 20th test. Change the sign of one numeric field to signed
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -406,7 +423,7 @@ class test extends XMLDBAction {
$tests['change field sign (signed)'] = $test;
}
/// 20th test. Change the nullability of one char field to not null
/// 21th test. Change the nullability of one char field to not null
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -421,7 +438,7 @@ class test extends XMLDBAction {
$tests['change field nullability (not null)'] = $test;
}
/// 21th test. Change the nullability of one char field to null
/// 22th test. Change the nullability of one char field to null
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -436,7 +453,7 @@ class test extends XMLDBAction {
$tests['change field nullability (null)'] = $test;
}
/// 22th test. Dropping the default of one field
/// 23th test. Dropping the default of one field
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -451,7 +468,7 @@ class test extends XMLDBAction {
$tests['drop field default of NULL field'] = $test;
}
/// 23th test. Creating the default for one field
/// 24th test. Creating the default for one field
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -466,7 +483,7 @@ class test extends XMLDBAction {
$tests['add field default of NULL field'] = $test;
}
/// 24th test. Creating the default for one field
/// 25th test. Creating the default for one field
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -482,7 +499,7 @@ class test extends XMLDBAction {
}
/// 25th test. Dropping the default of one NOT NULL field
/// 26th test. Dropping the default of one NOT NULL field
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -497,7 +514,7 @@ class test extends XMLDBAction {
$tests['drop field default of NOT NULL field'] = $test;
}
/// 26th test. Adding one unique index to the table
/// 27th test. Adding one unique index to the table
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -512,7 +529,7 @@ class test extends XMLDBAction {
$tests['add unique index'] = $test;
}
/// 27th test. Adding one not unique index to the table
/// 28th test. Adding one not unique index to the table
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -527,7 +544,7 @@ class test extends XMLDBAction {
$tests['add not unique index'] = $test;
}
/// 28th test. Re-add the same index than previous test. Check find_index_name() works.
/// 29th test. Re-add the same index than previous test. Check find_index_name() works.
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -546,7 +563,7 @@ class test extends XMLDBAction {
$tests['check find_index_name()'] = $test;
}
/// 29th test. Dropping one index from the table
/// 30th test. Dropping one index from the table
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -561,7 +578,7 @@ class test extends XMLDBAction {
$tests['drop index'] = $test;
}
/// 30th test. Adding one unique key to the table
/// 31th test. Adding one unique key to the table
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -576,7 +593,7 @@ class test extends XMLDBAction {
$tests['add unique key'] = $test;
}
/// 31th test. Adding one foreign+unique key to the table
/// 32th test. Adding one foreign+unique key to the table
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -591,7 +608,7 @@ class test extends XMLDBAction {
$tests['add foreign+unique key'] = $test;
}
/// 32th test. Drop one key
/// 33th test. Drop one key
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -606,7 +623,7 @@ class test extends XMLDBAction {
$tests['drop foreign+unique key'] = $test;
}
/// 33th test. Adding one foreign key to the table
/// 34th test. Adding one foreign key to the table
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -621,7 +638,7 @@ class test extends XMLDBAction {
$tests['add foreign key'] = $test;
}
/// 34th test. Drop one foreign key
/// 35th test. Drop one foreign key
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -636,7 +653,7 @@ class test extends XMLDBAction {
$tests['drop foreign key'] = $test;
}
/// 35th test. Adding one complex enum field
/// 36th test. Adding one complex enum field
if ($test->status) {
/// Create a new field with complex specs (enums are good candidates)
$field = new XMLDBField('type');
@@ -651,7 +668,7 @@ class test extends XMLDBAction {
$tests['add field with enum'] = $test;
}
/// 36th test. Dropping the enum of one field
/// 37th test. Dropping the enum of one field
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -666,7 +683,7 @@ class test extends XMLDBAction {
$tests['delete enumlist from one field'] = $test;
}
/// 37th test. Creating the enum for one field
/// 38th test. Creating the enum for one field
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -680,7 +697,7 @@ class test extends XMLDBAction {
$tests['add enumlist to one field'] = $test;
}
/// 38th test. Renaming one index
/// 39th test. Renaming one index
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -695,7 +712,7 @@ class test extends XMLDBAction {
$tests['rename index (experimental. DO NOT USE IT)'] = $test;
}
/// 39th test. Renaming one key
/// 40th test. Renaming one key
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
@@ -710,13 +727,13 @@ class test extends XMLDBAction {
$tests['rename key (experimental. DO NOT USE IT)'] = $test;
}
/// 40th test. Renaming one field
/// 41th test. Renaming one field
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
$field = new XMLDBField('type');
$field->setAttributes(XMLDB_TYPE_CHAR, '20', null, XMLDB_NOTNULL, null, XMLDB_ENUM, array('single', 'news', 'general', 'social', 'eachuser', 'teacher', 'qanda'), 'general', 'course');
$test->sql = $table->getRenameFieldSQL($CFG->dbtype, $CFG->prefix, $field, 'newnameforthefield', true);
$test->status = rename_field($table, $field, 'newnameforthefield', false, false);
if (!$test->status) {
@@ -725,11 +742,11 @@ class test extends XMLDBAction {
$tests['rename field'] = $test;
}
/// 41th test. Renaming one table
/// 42th test. Renaming one table
if ($test->status) {
/// Get SQL code and execute it
$test = new stdClass;
$test->sql = $table->getRenameTableSQL($CFG->dbtype, $CFG->prefix, 'newnameforthetable', true);
$test->status = rename_table($table, 'newnameforthetable', false, false);
if (!$test->status) {
@@ -738,7 +755,7 @@ class test extends XMLDBAction {
$tests['rename table'] = $test;
}
/// 42th test. Getting the PK sequence name for one table
/// 43th test. Getting the PK sequence name for one table
if ($test->status) {
$test = new stdClass;
$table->setName('newnameforthetable');
@@ -753,13 +770,13 @@ class test extends XMLDBAction {
$tests['find sequence name'] = $test;
}
/// 43th test. Inserting TEXT contents
/// 44th test. Inserting TEXT contents
$textlib = textlib_get_instance();
if ($test->status) {
$test = new stdClass;
$test->status = false;
$test->sql = array();
$basetext = '日本語 • Русский • Deutsch • English • Español • Français • Italiano • Nederlands • Polski • Português • Svenska • العربية • فارسی 한국어 • עברית • ไทย中文 Ελληνικά • Български • Српски • Українська • Bosanski • Català • Česky • Dansk • Eesti • Simple English • Esperanto • Euskara • Galego • Hrvatski • Ido • Bahasa Indonesia • Íslenska • Lëtzebuergesch • Lietuvių • Magyar • Bahasa Melayu اردو • ئۇيغۇرچه • हिन्दी • नेपाल भाषा मराठी • தமிழ் Հայերեն • Беларуская • Чăваш • Ирон æвзаг • Македонски • Сибирской говор • Afrikaans • Aragonés • Arpitan • Asturianu • Kreyòl Ayisyen • Azərbaycan • Bân-lâm-gú • Basa Banyumasan • Brezhoneg • Corsu • Cymraeg • Deitsch • Føroyskt • Frysk • Furlan • Gaeilge • Gàidhlig • Ilokano • Interlingua • Basa Jawa • Kapampangan • Kernewek • Kurdî كوردی • Ladino לאדינו • Latina • Latviešu • Limburgs • Lumbaart • Nedersaksisch • Nouormand • Occitan • Ozbek • Piemontèis • Plattdüütsch • Ripoarisch • Sámegiella • Scots • Shqip • Sicilianu • Sinugboanon • Srpskohrvatski / Српскохрватски • Basa Sunda • Kiswahili • Tagalog • Tatarça • Walon • Winaray Авар • Башҡорт • Кыргызча Монгол • Қазақша • Тоҷикӣ • Удмурт • Armãneashce • Bamanankan • Eald Englisc • Gaelg • Interlingue • Kaszëbsczi • Kongo • Ligure • Lingála • lojban • Malagasy • Malti • Māori • Nāhuatl • Ekakairũ Naoero • Novial • Pangasinán • Tok Pisin • Romani / रोमानी • Rumantsch • Runa Simi • Sardu • Tetun • Türkmen / تركمن / Туркмен • Vèneto • Volapük • Võro • West-Vlaoms • Wollof • Zazaki • Žemaitėška';
$basetext = "\\ ''語 • Русский • Deutsch • English • Español • Français • Italiano • Nederlands • Polski • Português • Svenska • العربية • فارسی 한국어 • עברית • ไทย中文 Ελληνικά • Български • Српски • Українська • Bosanski • Català • Česky • Dansk • Eesti • Simple English • Esperanto • Euskara • Galego • Hrvatski • Ido • Bahasa Indonesia • Íslenska • Lëtzebuergesch • Lietuvių • Magyar • Bahasa Melayu اردو • ئۇيغۇرچه • हिन्दी • नेपाल भाषा मराठी • தமிழ் Հայերեն • Беларуская • Чăваш • Ирон æвзаг • Македонски • Сибирской говор • Afrikaans • Aragonés • Arpitan • Asturianu • Kreyòl Ayisyen • Azərbaycan • Bân-lâm-gú • Basa Banyumasan • Brezhoneg • Corsu • Cymraeg • Deitsch • Føroyskt • Frysk • Furlan • Gaeilge • Gàidhlig • Ilokano • Interlingua • Basa Jawa • Kapampangan • Kernewek • Kurdî كوردی • Ladino לאדינו • Latina • Latviešu • Limburgs • Lumbaart • Nedersaksisch • Nouormand • Occitan • Ozbek • Piemontèis • Plattdüütsch • Ripoarisch • Sámegiella • Scots • Shqip • Sicilianu • Sinugboanon • Srpskohrvatski / Српскохрватски • Basa Sunda • Kiswahili • Tagalog • Tatarça • Walon • Winaray Авар • Башҡорт • Кыргызча Монгол • Қазақша • Тоҷикӣ • Удмурт • Armãneashce • Bamanankan • Eald Englisc • Gaelg • Interlingue • Kaszëbsczi • Kongo • Ligure • Lingála • lojban • Malagasy • Malti • Māori • Nāhuatl • Ekakairũ Naoero • Novial • Pangasinán • Tok Pisin • Romani / रोमानी • Rumantsch • Runa Simi • Sardu • Tetun • Türkmen / تركمن / Туркмен • Vèneto • Volapük • Võro • West-Vlaoms • Wollof • Zazaki • Žemaitėška";
/// Create one big text (1.500.000 chars)
$fulltext = '';
for ($i=0; $i<1000; $i++) { //1500 * 1000 chars
@@ -792,7 +809,7 @@ class test extends XMLDBAction {
$tests['insert record '. $textlen . ' cc. (text)'] = $test;
}
/// 44th test. Inserting BINARY contents
/// 45th test. Inserting BINARY contents
if ($test->status) {
$test = new stdClass;
$test->status = false;
@@ -821,7 +838,7 @@ class test extends XMLDBAction {
$tests['insert record '. $textlen . ' bytes (binary)'] = $test;
}
/// 45th test. update_record with TEXT and BINARY contents
/// 46th test. update_record with TEXT and BINARY contents
if ($test->status) {
$test = new stdClass;
$test->status = false;
@@ -861,7 +878,7 @@ class test extends XMLDBAction {
$tests['update record '. $textlen . ' cc. (text) and ' . $imglen . ' bytes (binary)'] = $test;
}
/// 46th test. set_field with TEXT contents
/// 47th test. set_field with TEXT contents
if ($test->status) {
$test = new stdClass;
$test->status = false;
@@ -891,7 +908,7 @@ class test extends XMLDBAction {
$tests['set field '. $textlen . ' cc. (text)'] = $test;
}
/// 47th test. set_field with BINARY contents
/// 48th test. set_field with BINARY contents
if ($test->status) {
$test = new stdClass;
$test->status = false;
+34 -168
View File
@@ -1,15 +1,16 @@
This directory contains authentication modules.
Each of these modules describes a different way to
check that a user has provided a correct
Each of these modules describes a different way to
check that a user has provided a correct
- username, and
- username, and
- password.
Even when external forms of authentication are being used, Moodle still
maintains the internal "user" table with all the associated information about
that user such as name, email address and so on.
Multiauthentication in Moodle 1.8
-------------------------------------
@@ -22,20 +23,26 @@ part of the enabled plugin sequence).
email - authentication by email (DEFAULT METHOD)
- user fills out form with email address
- email sent to user with link
- email sent to user with link
- user clicks on link in email to confirm
- user account is created
- user can log in
none - no authentication at all .. very insecure!!
- user logs in using ANY username and password
- if the username doesn't already exist then
a new account is created
- when user tries to access a course they
- when user tries to access a course they
are forced to set up their account details
nologin - user can not log in, login as is possible
- this plugin can be used to prevent normal user login
manual - internal authentication only
- user logs in using username and password
@@ -81,7 +88,7 @@ nntp - Uses an external NNTP server
db - Uses an external database to check username/password
- user logs in using username and password
- these are checked against an external database
- if correct, user is logged in
@@ -94,6 +101,9 @@ db - Uses an external database to check username/password
Authentication API
------------------
AUTHENTICATION PLUGINS
----------------------
Each authentication plugin is now contained in a subfolder as a class definition
in the auth.php file. For instance, the LDAP authentication plugin is the class
called auth_plugin_ldap defined in:
@@ -105,13 +115,17 @@ get_auth_plugin() that does the work for you:
$ldapauth = get_auth_plugin('ldap');
If an auth is not specified, get_auth_plugin() will return you the auth plugin
defined in the $CFG->auth variable.
Auth plugin classes are pretty basic and should be extending auth_plugin_base class.
They contain the same functions that were previously in each plugin's lib.php file,
but refactored to become class methods, and tweaked to reference the plugin's instantiated
config to get at the settings, rather than the global $CFG variable.
Auth plugin classes are pretty basic. They contain the same functions that were
previously in each plugin's lib.php file, but refactored to become class
methods, and tweaked to reference the plugin's instantiated config to get at the
settings, rather than the global $CFG variable.
When creating new plugins you can either extend the abstract auth_plugin_base class
(defined in lib/authlib.php) or create a new one and implement all methods from
auth_plugin_base.
The new plugin architecture allows creating of more advanced types such as custom SSO
without the need to patch login and logout pages (see *_hook() methods in existing plugins).
Configuration
-----------------
@@ -130,12 +144,6 @@ is now accessed as
Authentication settings have been moved to the config_plugins database table,
with the plugin field set to "auth/foo" (for instance, "auth/ldap").
Upgrading from Moodle 1.7
-----------------------------
Moodle will upgrade the old auth settings (in $CFG->auth_foobar where foo is the
auth plugin and bar is the setting) to the new style in the config_plugin
database table.
Method Names
-----------------
@@ -153,155 +161,13 @@ this also avoids having to worry about which auth/lib file to include since
Moodle takes care of it for you when you create an instance with
get_auth_plugin().
Code Usage
-----------------
Code calling auth plugins can use method_exists() to determine plugin
functionality, much in the same way that function_exists() was used until now.
In addition, auth plugins provide some methods by default that can be called:
user_login($username, $password)
This is the primary method that is used by the authenticate_user_login()
function in moodlelib.php. This method should return a boolean indicating
whether or not the username and password authenticate successfully.
is_internal()
Returns true if this authentication plugin is "internal" (which means that
Moodle stores the users' passwords and other details in the local Moodle
database).
can_change_password()
Returns true if the plugin can change the users' passwords.
change_password_url()
Returns the URL for changing the users' passwords, or false if the default
URL can be used.
user_update_password($user, $newpassword)
Updates the user's password. In previous versions of Moodle, the function
auth_user_update_password accepted a username as the first parameter. The
revised function expects a user object.
config_form()
Displays the configuration form for the auth plugin, for use in the admin
pages.
process_config()
Saves the auth plugin's configuration to the database.
Other Methods
------------------
Most of functions are from ldap-authentication module and are not implemented
(yet?) on other modules. Please feel free to extend other modules to support
same features or roll your own module.
Some of the new functions are still to be tested and are not documented here
yet.
AUTHENTICATION
Basic fuctions to authenticate users with external db.
Mandatory:
auth_plugin_foo()
Constructor. At the least, it populates config member variable with settings
from the Moodle database. It makes sense to put other startup code here.
user_login($username, $password)
Authenticate username, password with userdatabase.
Returns:
true if the username and password work
and false if they don't
Optional:
get_userinfo($username)
Query other userinformation from database.
Returns:
Userinformation in array ( name => value, ....
or false in case of error
The basic class defines all applicable methods that moodle uses, you can find
more information in lib/authlib.php file.
validate_form(&$form, &$err)
Validate form data.
Returns:
Bool. Manipulates $form and $err arrays in place
COURSE CREATING
iscreator($username)
should user have rights to create courses
Returns:
True if user have rights to crete cources otherwise false
USER CREATION
Functions that enable usercreation, activation and deactivation
from moodle to external database
user_exists ($username)
Checks if given username exist on external db
Returns:
true if given usernname exist or false
user_create ($userobject,$plainpass)
Creates new user to external db. User should be created
in inactive stage until confirmed by email.
Returns:
True on success otherwise false
user_activate ($username)
activate new user after email-address is confirmed
Returns:
True on success otherwise false
user_disable ($username) {
deactivate user in external db.
Returns:
True on success otherwise false
USER INFORMATION AND SYNCRONIZATION
get_userlist ()
Get list of usernames in external db.
Returns:
All usernames in array or false on error.
get_users($filter='*')
Get ALL USEROBJECTS FROM EXTERNAL DB.
Returns:
Array of all users as objects from external db
Upgrading from Moodle 1.7
-----------------------------
Moodle will upgrade the old auth settings (in $CFG->auth_foobar where foo is the
auth plugin and bar is the setting) to the new style in the config_plugin
database table.
-92
View File
@@ -1,92 +0,0 @@
AUTHENTICATION PLUGINS
----------------------
Each authentication plugin is now contained in a subfolder as a class definition
in the auth.php file. For instance, the LDAP authentication plugin is the class
called auth_plugin_ldap defined in:
/auth/ldap/auth.php
To instantiate the class, there is a function in lib/moodlelib called
get_auth_plugin() that does the work for you:
$ldapauth = get_auth_plugin('ldap');
If an auth is not specified, get_auth_plugin() will return you the auth plugin
defined in the $CFG->auth variable.
Auth plugin classes are pretty basic. They contain the same functions that were
previously in each plugin's lib.php file, but refactored to become class
methods, and tweaked to reference the plugin's instantiated config to get at the
settings, rather than the global $CFG variable.
Configuration
-----------------
All auth plugins must have a config property that contains the name value pairs
from the config_plugins table. This is populated using the get_config() function
in the constructor. The settings keys have also had the "auth_" prefix, as well
as the auth plugin name, trimmed. For instance, what used to be
echo $CFG->auth_ldapversion;
is now accessed as
echo $ldapauth->config->version;
Authentication settings have been moved to the config_plugins database table,
with the plugin field set to "auth/foo" (for instance, "auth/ldap").
Method Names
-----------------
When the functions from lib.php were ported to methods in auth.php, the "auth_"
prefix was dropped. For instance, calls to
auth_user_login($user, $pass);
now become
$ldapauth->user_login($user, $pass);
this also avoids having to worry about which auth/lib file to include since
Moodle takes care of it for you when you create an instance with
get_auth_plugin().
Code Use
-----------------
Code calling auth plugins can use method_exists() to determine plugin
functionality, much in the same way that function_exists() was used until now.
In addition, auth plugins provide some methods by default that can be called:
user_login($username, $password)
This is the primary method that is used by the authenticate_user_login()
function in moodlelib.php. This method should return a boolean indicating
whether or not the username and password authenticate successfully.
is_internal()
Returns true if this authentication plugin is "internal" (which means that
Moodle stores the users' passwords and other details in the local Moodle
database).
can_change_password()
Returns true if the plugin can change the users' passwords.
change_password_url()
Returns the URL for changing the users' passwords, or false if the default
URL can be used.
Other Methods
-----------------
get_userinfo()
This method should return an array of fields from the authentication source
for the given username.
Upgrading from Moodle 1.7
-----------------------------
Moodle will upgrade the old auth settings (in $CFG->auth_foobar where foo is the
auth plugin and bar is the setting) to the new style in the config_plugin
database table.
-33
View File
@@ -1,33 +0,0 @@
<?php
/**
* @author Martin Dougiamas
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @package moodle multiauth
*
* Multiple plugin authentication
* Support library
*
* 2006-08-28 File created, AUTH return values defined.
*/
/**
* Returned when the login was successful.
*/
define('AUTH_OK', 0);
/**
* Returned when the login was unsuccessful.
*/
define('AUTH_FAIL', 1);
/**
* Returned when the login was denied (a reason for AUTH_FAIL).
*/
define('AUTH_DENIED', 2);
/**
* Returned when some error occurred (a reason for AUTH_FAIL).
*/
define('AUTH_ERROR', 4);
?>
File diff suppressed because it is too large Load Diff
@@ -1,190 +1,568 @@
<?php
/**
* @file CAS/PGTStorage/pgt-db.php
* Basic class for PGT database storage
*/
// include phpDB library (the test was introduced in release 0.4.8 for
// the integration into Tikiwiki).
if (!class_exists('DB')) {
include_once('DB.php');
@include_once('DB.php');
}
/**
* @class PGTStorageDB
* The PGTStorageDB class is a class for PGT database storage. An instance of
* this class is returned by CASClient::SetPGTStorageDB().
*
* @author Pascal Aubry <pascal.aubry at univ-rennes1.fr>
*
* @ingroup internalPGTStorageDB
*/
class PGTStorageDB extends PGTStorage
{
/**
* @addtogroup internalPGTStorageDB
* @{
*/
/**
* a string representing a PEAR DB URL to connect to the database. Written by
* PGTStorageDB::PGTStorageDB(), read by getURL().
*
* @hideinitializer
* @private
*/
var $_url='';
/**
* This method returns the PEAR DB URL to use to connect to the database.
*
* @return a PEAR DB URL
*
* @private
*/
function getURL()
{
return $this->_url;
}
/**
* The handle of the connection to the database where PGT's are stored. Written by
* PGTStorageDB::init(), read by getLink().
* This method returns the PEAR DB URL to use to connect to the database.
*
* @hideinitializer
* @return a PEAR DB URL
*
* @private
*/
function getURL()
{
return $this->_url;
}
/**
* The handle of the connection to the database where PGT's are stored. Written by
* PGTStorageDB::init(), read by getLink().
*
* @hideinitializer
* @private
*/
var $_link = null;
/**
* This method returns the handle of the connection to the database where PGT's are
* stored.
*
* @return a handle of connection.
*
* @private
*/
function getLink()
{
return $this->_link;
}
/**
* The name of the table where PGT's are stored. Written by
* PGTStorageDB::PGTStorageDB(), read by getTable().
* This method returns the handle of the connection to the database where PGT's are
* stored.
*
* @hideinitializer
* @return a handle of connection.
*
* @private
*/
function getLink()
{
return $this->_link;
}
/**
* The name of the table where PGT's are stored. Written by
* PGTStorageDB::PGTStorageDB(), read by getTable().
*
* @hideinitializer
* @private
*/
var $_table = '';
/**
* This method returns the name of the table where PGT's are stored.
*
* @return the name of a table.
*
* @private
*/
function getTable()
{
return $this->_table;
}
// ########################################################################
// DEBUGGING
// ########################################################################
/**
* This method returns an informational string giving the type of storage
* used by the object (used for debugging purposes).
*
* @return an informational string.
* @public
*/
function getStorageType()
{
return "database";
}
/**
* This method returns an informational string giving informations on the
* parameters of the storage.(used for debugging purposes).
*
* @public
*/
function getStorageInfo()
{
return 'url=`'.$this->getURL().'\', table=`'.$this->getTable().'\'';
}
// ########################################################################
// CONSTRUCTOR
// ########################################################################
/**
* The class constructor, called by CASClient::SetPGTStorageDB().
*
* @param $cas_parent the CASClient instance that creates the object.
* @param $user the user to access the data with
* @param $password the user's password
* @param $database_type the type of the database hosting the data
* @param $hostname the server hosting the database
* @param $port the port the server is listening on
* @param $database the name of the database
* @param $table the name of the table storing the data
*
* @public
*/
function PGTStorageDB($cas_parent,$user,$password,$database_type,$hostname,$port,$database,$table)
{
phpCAS::traceBegin();
// call the ancestor's constructor
$this->PGTStorage($cas_parent);
if ( empty($database_type) ) $database_type = CAS_PGT_STORAGE_DB_DEFAULT_DATABASE_TYPE;
if ( empty($hostname) ) $hostname = CAS_PGT_STORAGE_DB_DEFAULT_HOSTNAME;
if ( $port==0 ) $port = CAS_PGT_STORAGE_DB_DEFAULT_PORT;
if ( empty($database) ) $database = CAS_PGT_STORAGE_DB_DEFAULT_DATABASE;
if ( empty($table) ) $table = CAS_PGT_STORAGE_DB_DEFAULT_TABLE;
// build and store the PEAR DB URL
$this->_url = $database_type.':'.'//'.$user.':'.$password.'@'.$server.':'.$port.'/'.$database;
$this->_url = $database_type.':'.'//'.$user.':'.$password.'@'.$hostname.':'.$port.'/'.$database;
// XXX should use setURL and setTable
phpCAS::traceEnd();
}
// ########################################################################
// INITIALIZATION
// ########################################################################
/**
* This method is used to initialize the storage. Halts on error.
*
* @public
*/
function init()
{
phpCAS::traceBegin();
// if the storage has already been initialized, return immediatly
if ( $this->isInitialized() )
return;
// call the ancestor's method (mark as initialized)
parent::init();
// try to connect to the database
$this->_link = DB::connect($this->getURL());
if ( DB::isError($this->_link) ) {
phpCAS::error('could not connect to database ('.DB::errorMessage($this->_link).')');
}
var_dump($this->_link);
phpCAS::traceBEnd();
}
/** @} */
}
?>
@@ -1,237 +1,718 @@
<?php
/**
* @file CAS/PGTStorage/pgt-file.php
* Basic class for PGT file storage
*/
/**
* @class PGTStorageFile
* The PGTStorageFile class is a class for PGT file storage. An instance of
* this class is returned by CASClient::SetPGTStorageFile().
*
* @author Pascal Aubry <pascal.aubry at univ-rennes1.fr>
*
* @ingroup internalPGTStorageFile
* @file CAS/PGTStorage/pgt-file.php
* Basic class for PGT file storage
*/
/**
* @class PGTStorageFile
* The PGTStorageFile class is a class for PGT file storage. An instance of
* this class is returned by CASClient::SetPGTStorageFile().
*
* @author Pascal Aubry <pascal.aubry at univ-rennes1.fr>
*
* @ingroup internalPGTStorageFile
*/
class PGTStorageFile extends PGTStorage
{
/**
* @addtogroup internalPGTStorageFile
* @{
*/
/**
* a string telling where PGT's should be stored on the filesystem. Written by
* PGTStorageFile::PGTStorageFile(), read by getPath().
*
* @private
*/
var $_path;
/**
* This method returns the name of the directory where PGT's should be stored
* on the filesystem.
*
* @return the name of a directory (with leading and trailing '/')
*
* @private
*/
function getPath()
{
return $this->_path;
}
/**
* a string telling the format to use to store PGT's (plain or xml). Written by
* PGTStorageFile::PGTStorageFile(), read by getFormat().
* This method returns the name of the directory where PGT's should be stored
* on the filesystem.
*
* @return the name of a directory (with leading and trailing '/')
*
* @private
*/
function getPath()
{
return $this->_path;
}
/**
* a string telling the format to use to store PGT's (plain or xml). Written by
* PGTStorageFile::PGTStorageFile(), read by getFormat().
*
* @private
*/
var $_format;
/**
* This method returns the format to use when storing PGT's on the filesystem.
*
* @return a string corresponding to the format used (plain or xml).
*
* @private
*/
function getFormat()
{
return $this->_format;
}
// ########################################################################
// DEBUGGING
// ########################################################################
/**
* This method returns an informational string giving the type of storage
* used by the object (used for debugging purposes).
*
* @return an informational string.
* @public
*/
function getStorageType()
{
return "file";
}
/**
* This method returns an informational string giving informations on the
* parameters of the storage.(used for debugging purposes).
*
* @return an informational string.
* @public
*/
function getStorageInfo()
{
return 'path=`'.$this->getPath().'\', format=`'.$this->getFormat().'\'';
}
// ########################################################################
// CONSTRUCTOR
// ########################################################################
/**
* The class constructor, called by CASClient::SetPGTStorageFile().
*
* @param $cas_parent the CASClient instance that creates the object.
* @param $format the format used to store the PGT's (`plain' and `xml' allowed).
* @param $path the path where the PGT's should be stored
*
* @public
*/
function PGTStorageFile($cas_parent,$format,$path)
{
phpCAS::traceBegin();
// call the ancestor's constructor
$this->PGTStorage($cas_parent);
if (empty($format) ) $format = CAS_PGT_STORAGE_FILE_DEFAULT_FORMAT;
if (empty($path) ) $path = CAS_PGT_STORAGE_FILE_DEFAULT_PATH;
// check that the path is an absolute path
if ( $path[0] != '/' ) {
phpCAS::error('an absolute path is needed for PGT storage to file');
}
// store the path (with a leading and trailing '/')
$path = preg_replace('|[/]*$|','/',$path);
$path = preg_replace('|^[/]*|','/',$path);
$this->_path = $path;
// check the format and store it
switch ($format) {
case CAS_PGT_STORAGE_FILE_FORMAT_PLAIN:
case CAS_PGT_STORAGE_FILE_FORMAT_XML:
$this->_format = $format;
break;
default:
phpCAS::error('unknown PGT file storage format (`'.CAS_PGT_STORAGE_FILE_FORMAT_PLAIN.'\' and `'.CAS_PGT_STORAGE_FILE_FORMAT_XML.'\' allowed)');
}
phpCAS::traceEnd();
}
// ########################################################################
// INITIALIZATION
// ########################################################################
/**
* This method is used to initialize the storage. Halts on error.
*
* @public
*/
function init()
{
phpCAS::traceBegin();
// if the storage has already been initialized, return immediatly
if ( $this->isInitialized() )
return;
// call the ancestor's method (mark as initialized)
parent::init();
phpCAS::traceEnd();
}
// ########################################################################
// PGT I/O
// ########################################################################
/**
* This method returns the filename corresponding to a PGT Iou.
*
* @param $pgt_iou the PGT iou.
*
* @return a filename
* @private
*/
function getPGTIouFilename($pgt_iou)
{
phpCAS::traceBegin();
return $this->getPath().$pgt_iou.'.'.$this->getFormat();
phpCAS::traceEnd();
}
/**
* This method stores a PGT and its corresponding PGT Iou into a file. Echoes a
* warning on error.
*
* @param $pgt the PGT
* @param $pgt_iou the PGT iou
*
* @public
*/
function write($pgt,$pgt_iou)
{
phpCAS::traceBegin();
$fname = $this->getPGTIouFilename($pgt_iou);
if ( $f=fopen($fname,"w") ) {
if ( fputs($f,$pgt) === FALSE ) {
phpCAS::error('could not write PGT to `'.$fname.'\'');
}
fclose($f);
} else {
phpCAS::error('could not open `'.$fname.'\'');
}
phpCAS::traceEnd();
}
/**
* This method reads a PGT corresponding to a PGT Iou and deletes the
* corresponding file.
* This method returns the filename corresponding to a PGT Iou.
*
* @param $pgt_iou the PGT iou
* @param $pgt_iou the PGT iou.
*
* @return the corresponding PGT, or FALSE on error
*
* @public
* @return a filename
* @private
*/
function read($pgt_iou)
function getPGTIouFilename($pgt_iou)
{
phpCAS::traceBegin();
$pgt = FALSE;
$filename = $this->getPath().$pgt_iou.'.'.$this->getFormat();
phpCAS::traceEnd($filename);
return $filename;
}
/**
* This method stores a PGT and its corresponding PGT Iou into a file. Echoes a
* warning on error.
*
* @param $pgt the PGT
* @param $pgt_iou the PGT iou
*
* @public
*/
function write($pgt,$pgt_iou)
{
phpCAS::traceBegin();
$fname = $this->getPGTIouFilename($pgt_iou);
if ( !($f=fopen($fname,"r")) ) {
phpCAS::trace('could not open `'.$fname.'\'');
} else {
if ( ($pgt=fgets($f)) === FALSE ) {
phpCAS::trace('could not read PGT from `'.$fname.'\'');
}
if ( $f=fopen($fname,"w") ) {
if ( fputs($f,$pgt) === FALSE ) {
phpCAS::error('could not write PGT to `'.$fname.'\'');
}
fclose($f);
} else {
phpCAS::error('could not open `'.$fname.'\'');
}
phpCAS::traceEnd();
}
/**
* This method reads a PGT corresponding to a PGT Iou and deletes the
* corresponding file.
*
* @param $pgt_iou the PGT iou
*
* @return the corresponding PGT, or FALSE on error
*
* @public
*/
function read($pgt_iou)
{
phpCAS::traceBegin();
$pgt = FALSE;
$fname = $this->getPGTIouFilename($pgt_iou);
if ( !($f=fopen($fname,"r")) ) {
phpCAS::trace('could not open `'.$fname.'\'');
} else {
if ( ($pgt=fgets($f)) === FALSE ) {
phpCAS::trace('could not read PGT from `'.$fname.'\'');
}
fclose($f);
}
// delete the PGT file
@unlink($fname);
phpCAS::traceEnd($pgt);
return $pgt;
}
/** @} */
}
/** @} */
}
?>
+188
View File
@@ -0,0 +1,188 @@
<?php
/**
* @file CAS/PGTStorage/pgt-main.php
* Basic class for PGT storage
*/
/**
* @class PGTStorage
* The PGTStorage class is a generic class for PGT storage. This class should
* not be instanciated itself but inherited by specific PGT storage classes.
*
* @author Pascal Aubry <pascal.aubry at univ-rennes1.fr>
*
* @ingroup internalPGTStorage
*/
class PGTStorage
{
/**
* @addtogroup internalPGTStorage
* @{
*/
// ########################################################################
// CONSTRUCTOR
// ########################################################################
/**
* The constructor of the class, should be called only by inherited classes.
*
* @param $cas_parent the CASclient instance that creates the current object.
*
* @protected
*/
function PGTStorage($cas_parent)
{
phpCAS::traceBegin();
if ( !$cas_parent->isProxy() ) {
phpCAS::error('defining PGT storage makes no sense when not using a CAS proxy');
}
phpCAS::traceEnd();
}
// ########################################################################
// DEBUGGING
// ########################################################################
/**
* This virtual method returns an informational string giving the type of storage
* used by the object (used for debugging purposes).
*
* @public
*/
function getStorageType()
{
phpCAS::error(__CLASS__.'::'.__FUNCTION__.'() should never be called');
}
/**
* This virtual method returns an informational string giving informations on the
* parameters of the storage.(used for debugging purposes).
*
* @public
*/
function getStorageInfo()
{
phpCAS::error(__CLASS__.'::'.__FUNCTION__.'() should never be called');
}
// ########################################################################
// ERROR HANDLING
// ########################################################################
/**
* string used to store an error message. Written by PGTStorage::setErrorMessage(),
* read by PGTStorage::getErrorMessage().
*
* @hideinitializer
* @private
* @deprecated not used.
*/
var $_error_message=FALSE;
/**
* This method sets en error message, which can be read later by
* PGTStorage::getErrorMessage().
*
* @param $error_message an error message
*
* @protected
* @deprecated not used.
*/
function setErrorMessage($error_message)
File diff suppressed because it is too large Load Diff
@@ -1,277 +1,829 @@
<?php
/**
* @file domxml-php4-php5.php
* Require PHP5, uses built-in DOM extension.
* To be used in PHP4 scripts using DOMXML extension.
* Allows PHP4/DOMXML scripts to run on PHP5/DOM.
* (Requires PHP5/XSL extension for domxml_xslt functions)
*
* Typical use:
* <pre>
* {
* if (version_compare(PHP_VERSION,'5','>='))
* require_once('domxml-php4-to-php5.php');
* }
* </pre>
*
* Version 1.5.5, 2005-01-18, http://alexandre.alapetite.net/doc-alex/domxml-php4-php5/
*
* ------------------------------------------------------------------<br>
* Written by Alexandre Alapetite, http://alexandre.alapetite.net/cv/
*
* Copyright 2004, Licence: Creative Commons "Attribution-ShareAlike 2.0 France" BY-SA (FR),
* http://creativecommons.org/licenses/by-sa/2.0/fr/
* http://alexandre.alapetite.net/divers/apropos/#by-sa
* - Attribution. You must give the original author credit
* - Share Alike. If you alter, transform, or build upon this work,
* you may distribute the resulting work only under a license identical to this one
* - The French law is authoritative
* - Any of these conditions can be waived if you get permission from Alexandre Alapetite
* - Please send to Alexandre Alapetite the modifications you make,
* in order to improve this file for the benefit of everybody
*
* If you want to distribute this code, please do it as a link to:
* http://alexandre.alapetite.net/doc-alex/domxml-php4-php5/
*/
function domxml_new_doc($version) {return new php4DOMDocument('');}
function domxml_open_file($filename) {return new php4DOMDocument($filename);}
function domxml_open_mem($str)
{
$dom=new php4DOMDocument('');
$dom->myDOMNode->loadXML($str);
return $dom;
}
function xpath_eval($xpath_context,$eval_str,$contextnode=null) {return $xpath_context->query($eval_str,$contextnode);}
function xpath_new_context($dom_document) {return new php4DOMXPath($dom_document);}
class php4DOMAttr extends php4DOMNode
{
function php4DOMAttr($aDOMAttr) {$this->myDOMNode=$aDOMAttr;}
function Name() {return $this->myDOMNode->name;}
function Specified() {return $this->myDOMNode->specified;}
function Value() {return $this->myDOMNode->value;}
}
class php4DOMDocument extends php4DOMNode
{
function php4DOMDocument($filename='')
{
$this->myDOMNode=new DOMDocument();
if ($filename!='') $this->myDOMNode->load($filename);
}
function create_attribute($name,$value)
{
$myAttr=$this->myDOMNode->createAttribute($name);
$myAttr->value=$value;
return new php4DOMAttr($myAttr,$this);
}
function create_cdata_section($content) {return new php4DOMNode($this->myDOMNode->createCDATASection($content),$this);}
function create_comment($data) {return new php4DOMNode($this->myDOMNode->createComment($data),$this);}
function create_element($name) {return new php4DOMElement($this->myDOMNode->createElement($name),$this);}
function create_text_node($content) {return new php4DOMNode($this->myDOMNode->createTextNode($content),$this);}
function document_element() {return new php4DOMElement($this->myDOMNode->documentElement,$this);}
function dump_file($filename,$compressionmode=false,$format=false) {return $this->myDOMNode->save($filename);}
function dump_mem($format=false,$encoding=false) {return $this->myDOMNode->saveXML();}
function get_element_by_id($id) {return new php4DOMElement($this->myDOMNode->getElementById($id),$this);}
function get_elements_by_tagname($name)
{
$myDOMNodeList=$this->myDOMNode->getElementsByTagName($name);
$nodeSet=array();
$i=0;
if (isset($myDOMNodeList))
while ($node=$myDOMNodeList->item($i))
{
$nodeSet[]=new php4DOMElement($node,$this);
$i++;
}
return $nodeSet;
}
function html_dump_mem() {return $this->myDOMNode->saveHTML();}
function root() {return new php4DOMElement($this->myDOMNode->documentElement,$this);}
}
class php4DOMElement extends php4DOMNode
{
function get_attribute($name) {return $this->myDOMNode->getAttribute($name);}
function get_elements_by_tagname($name)
{
$myDOMNodeList=$this->myDOMNode->getElementsByTagName($name);
$nodeSet=array();
$i=0;
if (isset($myDOMNodeList))
while ($node=$myDOMNodeList->item($i))
{
$nodeSet[]=new php4DOMElement($node,$this->myOwnerDocument);
$i++;
}
return $nodeSet;
}
function has_attribute($name) {return $this->myDOMNode->hasAttribute($name);}
function remove_attribute($name) {return $this->myDOMNode->removeAttribute($name);}
function set_attribute($name,$value) {return $this->myDOMNode->setAttribute($name,$value);}
function tagname() {return $this->myDOMNode->tagName;}
}
class php4DOMNode
{
var $myDOMNode;
var $myOwnerDocument;
function php4DOMNode($aDomNode,$aOwnerDocument)
{
$this->myDOMNode=$aDomNode;
$this->myOwnerDocument=$aOwnerDocument;
}
function __get($name)
{
if ($name=='type') return $this->myDOMNode->nodeType;
elseif ($name=='tagname') return $this->myDOMNode->tagName;
elseif ($name=='content') return $this->myDOMNode->textContent;
else
{
$myErrors=debug_backtrace();
trigger_error('Undefined property: '.get_class($this).'::$'.$name.' ['.$myErrors[0]['file'].':'.$myErrors[0]['line'].']',E_USER_NOTICE);
return false;
}
}
function append_child($newnode) {return new php4DOMElement($this->myDOMNode->appendChild($newnode->myDOMNode),$this->myOwnerDocument);}
function append_sibling($newnode) {return new php4DOMElement($this->myDOMNode->parentNode->appendChild($newnode->myDOMNode),$this->myOwnerDocument);}
function attributes()
{
$myDOMNodeList=$this->myDOMNode->attributes;
$nodeSet=array();
$i=0;
if (isset($myDOMNodeList))
while ($node=$myDOMNodeList->item($i))
{
$nodeSet[]=new php4DOMAttr($node,$this->myOwnerDocument);
$i++;
}
return $nodeSet;
}
function child_nodes()
{
$myDOMNodeList=$this->myDOMNode->childNodes;
$nodeSet=array();
$i=0;
if (isset($myDOMNodeList))
while ($node=$myDOMNodeList->item($i))
{
$nodeSet[]=new php4DOMElement($node,$this->myOwnerDocument);
$i++;
}
return $nodeSet;
}
function children() {return $this->child_nodes();}
function clone_node($deep=false) {return new php4DOMElement($this->myDOMNode->cloneNode($deep),$this->myOwnerDocument);}
function first_child() {return new php4DOMElement($this->myDOMNode->firstChild,$this->myOwnerDocument);}
function get_content() {return $this->myDOMNode->textContent;}
function has_attributes() {return $this->myDOMNode->hasAttributes();}
function has_child_nodes() {return $this->myDOMNode->hasChildNodes();}
function insert_before($newnode,$refnode) {return new php4DOMElement($this->myDOMNode->insertBefore($newnode->myDOMNode,$refnode->myDOMNode),$this->myOwnerDocument);}
function is_blank_node()
{
$myDOMNodeList=$this->myDOMNode->childNodes;
$i=0;
if (isset($myDOMNodeList))
while ($node=$myDOMNodeList->item($i))
{
if (($node->nodeType==XML_ELEMENT_NODE)||
(($node->nodeType==XML_TEXT_NODE)&&!ereg('^([[:cntrl:]]|[[:space:]])*$',$node->nodeValue)))
return false;
$i++;
}
return true;
}
function last_child() {return new php4DOMElement($this->myDOMNode->lastChild,$this->myOwnerDocument);}
function new_child($name,$content)
{
$mySubNode=$this->myDOMNode->ownerDocument->createElement($name);
$mySubNode->appendChild($this->myDOMNode->ownerDocument->createTextNode($content));
$this->myDOMNode->appendChild($mySubNode);
return new php4DOMElement($mySubNode,$this->myOwnerDocument);
}
function next_sibling() {return new php4DOMElement($this->myDOMNode->nextSibling,$this->myOwnerDocument);}
function node_name() {return $this->myDOMNode->localName;}
function node_type() {return $this->myDOMNode->nodeType;}
function node_value() {return $this->myDOMNode->nodeValue;}
function owner_document() {return $this->myOwnerDocument;}
function parent_node() {return new php4DOMElement($this->myDOMNode->parentNode,$this->myOwnerDocument);}
function prefix() {return $this->myDOMNode->prefix;}
function previous_sibling() {return new php4DOMElement($this->myDOMNode->previousSibling,$this->myOwnerDocument);}
function remove_child($oldchild) {return new php4DOMElement($this->myDOMNode->removeChild($oldchild->myDOMNode),$this->myOwnerDocument);}
function replace_child($oldnode,$newnode) {return new php4DOMElement($this->myDOMNode->replaceChild($oldnode->myDOMNode,$newnode->myDOMNode),$this->myOwnerDocument);}
function set_content($text)
{
if (($this->myDOMNode->hasChildNodes())&&($this->myDOMNode->firstChild->nodeType==XML_TEXT_NODE))
$this->myDOMNode->removeChild($this->myDOMNode->firstChild);
return $this->myDOMNode->appendChild($this->myDOMNode->ownerDocument->createTextNode($text));
}
}
class php4DOMNodelist
{
var $myDOMNodelist;
var $nodeset;
function php4DOMNodelist($aDOMNodelist,$aOwnerDocument)
{
$this->myDOMNodelist=$aDOMNodelist;
$this->nodeset=array();
$i=0;
if (isset($this->myDOMNodelist))
while ($node=$this->myDOMNodelist->item($i))
{
$this->nodeset[]=new php4DOMElement($node,$aOwnerDocument);
$i++;
}
}
}
class php4DOMXPath
{
var $myDOMXPath;
var $myOwnerDocument;
function php4DOMXPath($dom_document)
{
$this->myOwnerDocument=$dom_document;
$this->myDOMXPath=new DOMXPath($dom_document->myDOMNode);
}
function query($eval_str,$contextnode)
{
if (isset($contextnode)) return new php4DOMNodelist($this->myDOMXPath->query($eval_str,$contextnode->myDOMNode),$this->myOwnerDocument);
else return new php4DOMNodelist($this->myDOMXPath->query($eval_str),$this->myOwnerDocument);
}
function xpath_register_ns($prefix,$namespaceURI) {return $this->myDOMXPath->registerNamespace($prefix,$namespaceURI);}
}
if (extension_loaded('xsl'))
{//See also: http://alexandre.alapetite.net/doc-alex/xslt-php4-php5/
function domxml_xslt_stylesheet($xslstring) {return new php4DomXsltStylesheet(DOMDocument::loadXML($xslstring));}
function domxml_xslt_stylesheet_doc($dom_document) {return new php4DomXsltStylesheet($dom_document);}
function domxml_xslt_stylesheet_file($xslfile) {return new php4DomXsltStylesheet(DOMDocument::load($xslfile));}
class php4DomXsltStylesheet
{
var $myxsltProcessor;
function php4DomXsltStylesheet($dom_document)
{
$this->myxsltProcessor=new xsltProcessor();
$this->myxsltProcessor->importStyleSheet($dom_document);
}
function process($dom_document,$xslt_parameters=array(),$param_is_xpath=false)
{
foreach ($xslt_parameters as $param=>$value)
$this->myxsltProcessor->setParameter('',$param,$value);
$myphp4DOMDocument=new php4DOMDocument();
$myphp4DOMDocument->myDOMNode=$this->myxsltProcessor->transformToDoc($dom_document->myDOMNode);
return $myphp4DOMDocument;
}
function result_dump_file($dom_document,$filename)
{
$html=$dom_document->myDOMNode->saveHTML();
file_put_contents($filename,$html);
return $html;
}
function result_dump_mem($dom_document) {return $dom_document->myDOMNode->saveHTML();}
}
}
?>
@@ -1,27 +1,79 @@
<?php
/**
* @file languages/english.php
* @author Pascal Aubry <pascal.aubry at univ-rennes1.fr>
* @sa @link internalLang Internationalization @endlink
* @ingroup internalLang
*/
$this->_strings = array(
CAS_STR_USING_SERVER
=> 'using server',
CAS_STR_AUTHENTICATION_WANTED
=> 'CAS Authentication wanted!',
CAS_STR_LOGOUT
=> 'CAS logout wanted!',
CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED
=> 'You should already have been redirected to the CAS server. Click <a href="%s">here</a> to continue.',
CAS_STR_AUTHENTICATION_FAILED
=> 'CAS Authentication failed!',
CAS_STR_YOU_WERE_NOT_AUTHENTICATED
=> '<p>You were not authenticated.</p><p>You may submit your request again by clicking <a href="%s">here</a>.</p><p>If the problem persists, you may contact <a href="mailto:%s">the administrator of this site</a>.</p>',
CAS_STR_SERVICE_UNAVAILABLE
=> 'The service `<b>%s</b>\' is not available (<b>%s</b>).'
);
?>
@@ -1,28 +1,82 @@
<?php
/**
* @file languages/english.php
* @author Pascal Aubry <pascal.aubry at univ-rennes1.fr>
* @sa @link internalLang Internationalization @endlink
* @ingroup internalLang
*/
$this->_strings = array(
CAS_STR_USING_SERVER
=> 'utilisant le serveur',
CAS_STR_AUTHENTICATION_WANTED
=> 'Authentication CAS nécessaire&nbsp;!',
CAS_STR_LOGOUT
=> 'Déconnexion demandée&nbsp;!',
CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED
=> 'Vous auriez du etre redirigé(e) vers le serveur CAS. Cliquez <a href="%s">ici</a> pour continuer.',
CAS_STR_AUTHENTICATION_FAILED
=> 'Authentification CAS infructueuse&nbsp;!',
CAS_STR_YOU_WERE_NOT_AUTHENTICATED
=> '<p>Vous n\'avez pas été authentifié(e).</p><p>Vous pouvez soumettre votre requete à nouveau en cliquant <a href="%s">ici</a>.</p><p>Si le problème persiste, vous pouvez contacter <a href="mailto:%s">l\'administrateur de ce site</a>.</p>',
CAS_STR_SERVICE_UNAVAILABLE
=> 'Le service `<b>%s</b>\' est indisponible (<b>%s</b>)'
);
?>
+79
View File
@@ -0,0 +1,79 @@
<?php
/**
* @file languages/german.php
* @author Henrik Genssen <hg at mediafactory.de>
* @sa @link internalLang Internationalization @endlink
* @ingroup internalLang
*/
$this->_strings = array(
CAS_STR_USING_SERVER
=> 'via Server',
CAS_STR_AUTHENTICATION_WANTED
=> 'CAS Authentifizierung erforderlich!',
CAS_STR_LOGOUT
=> 'CAS Abmeldung!',
CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED
=> 'eigentlich h&auml;ten Sie zum CAS Server weitergeleitet werden sollen. Dr&uuml;cken Sie <a href="%s">hier</a> um fortzufahren.',
CAS_STR_AUTHENTICATION_FAILED
=> 'CAS Anmeldung fehlgeschlagen!',
CAS_STR_YOU_WERE_NOT_AUTHENTICATED
=> '<p>Sie wurden nicht angemeldet.</p><p>Um es erneut zu versuchen klicken Sie <a href="%s">hier</a>.</p><p>Wenn das Problem bestehen bleibt, kontkatieren Sie den <a href="mailto:%s">Administrator</a> dieser Seite.</p>',
CAS_STR_SERVICE_UNAVAILABLE
=> 'Der Dienst `<b>%s</b>\' ist nicht verf&uuml;gbar (<b>%s</b>).'
);
?>
@@ -1,27 +1,79 @@
<?php
/**
* @file languages/greek.php
* @author Vangelis Haniotakis <haniotak at ucnet.uoc.gr>
* @sa @link internalLang Internationalization @endlink
* @ingroup internalLang
*/
$this->_strings = array(
CAS_STR_USING_SERVER
=> '÷ñçóéìïðïéåßôáé ï åîõðçñåôçôÞò',
CAS_STR_AUTHENTICATION_WANTED
=> 'Áðáéôåßôáé ç ôáõôïðïßçóç CAS!',
CAS_STR_LOGOUT
=> 'Áðáéôåßôáé ç áðïóýíäåóç áðü CAS!',
CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED
=> 'Èá Ýðñåðå íá åß÷áôå áíáêáôåõèõíèåß óôïí åîõðçñåôçôÞ CAS. ÊÜíôå êëßê <a href="%s">åäþ</a> ãéá íá óõíå÷ßóåôå.',
CAS_STR_AUTHENTICATION_FAILED
=> 'Ç ôáõôïðïßçóç CAS áðÝôõ÷å!',
CAS_STR_YOU_WERE_NOT_AUTHENTICATED
=> '<p>Äåí ôáõôïðïéçèÞêáôå.</p><p>Ìðïñåßôå íá îáíáðñïóðáèÞóåôå, êÜíïíôáò êëßê <a href="%s">åäþ</a>.</p><p>Åáí ôï ðñüâëçìá åðéìåßíåé, åëÜôå óå åðáöÞ ìå ôïí <a href="mailto:%s">äéá÷åéñéóôÞ</a>.</p>',
CAS_STR_SERVICE_UNAVAILABLE
=> 'Ç õðçñåóßá `<b>%s</b>\' äåí åßíáé äéáèÝóéìç (<b>%s</b>).'
);
<?php
/**
* @file languages/greek.php
* @author Vangelis Haniotakis <haniotak at ucnet.uoc.gr>
* @sa @link internalLang Internationalization @endlink
* @ingroup internalLang
*/
$this->_strings = array(
CAS_STR_USING_SERVER
=> '÷ñçóéìïðïéåßôáé ï åîõðçñåôçôÞò',
CAS_STR_AUTHENTICATION_WANTED
=> 'Áðáéôåßôáé ç ôáõôïðïßçóç CAS!',
CAS_STR_LOGOUT
=> 'Áðáéôåßôáé ç áðïóýíäåóç áðü CAS!',
CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED
=> 'Èá Ýðñåðå íá åß÷áôå áíáêáôåõèõíèåß óôïí åîõðçñåôçôÞ CAS. ÊÜíôå êëßê <a href="%s">åäþ</a> ãéá íá óõíå÷ßóåôå.',
CAS_STR_AUTHENTICATION_FAILED
=> 'Ç ôáõôïðïßçóç CAS áðÝôõ÷å!',
CAS_STR_YOU_WERE_NOT_AUTHENTICATED
=> '<p>Äåí ôáõôïðïéçèÞêáôå.</p><p>Ìðïñåßôå íá îáíáðñïóðáèÞóåôå, êÜíïíôáò êëßê <a href="%s">åäþ</a>.</p><p>Åáí ôï ðñüâëçìá åðéìåßíåé, åëÜôå óå åðáöÞ ìå ôïí <a href="mailto:%s">äéá÷åéñéóôÞ</a>.</p>',
CAS_STR_SERVICE_UNAVAILABLE
=> 'Ç õðçñåóßá `<b>%s</b>\' äåí åßíáé äéáèÝóéìç (<b>%s</b>).'
);
?>
+53
View File
@@ -0,0 +1,53 @@
<?php
/**
* @file languages/japanese.php
* @author fnorif (fnorif@yahoo.co.jp)
*
* Now Encoding is EUC-JP and LF
**/
$this->_strings = array(
CAS_STR_USING_SERVER
=> 'using server',
CAS_STR_AUTHENTICATION_WANTED
=> 'CASによる認証を行います',
CAS_STR_LOGOUT
=> 'CASからログアウトします!',
CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED
=> 'CASサーバに行く必要があります。自動的に転送されない場合は <a href="%s">こちら</a> をクリックして続行します。',
CAS_STR_AUTHENTICATION_FAILED
=> 'CASによる認証に失敗しました',
CAS_STR_YOU_WERE_NOT_AUTHENTICATED
=> '<p>認証できませんでした.</p><p>もう一度リクエストを送信する場合は<a href="%s">こちら</a>をクリック.</p><p>問題が解決しない場合は <a href="mailto:%s">このサイトの管理者</a>に問い合わせてください.</p>',
CAS_STR_SERVICE_UNAVAILABLE
=> 'サービス `<b>%s</b>\' は利用できません (<b>%s</b>).'
);
?>
@@ -1,24 +1,70 @@
<?php
/**
* @file languages/languages.php
* Internationalization constants
* @author Pascal Aubry <pascal.aubry at univ-rennes1.fr>
* @sa @link internalLang Internationalization @endlink
* @ingroup internalLang
*/
//@{
/**
* a phpCAS string index
*/
define("CAS_STR_USING_SERVER", 1);
define("CAS_STR_AUTHENTICATION_WANTED", 2);
define("CAS_STR_LOGOUT", 3);
define("CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED", 4);
define("CAS_STR_AUTHENTICATION_FAILED", 5);
define("CAS_STR_YOU_WERE_NOT_AUTHENTICATED", 6);
define("CAS_STR_SERVICE_UNAVAILABLE", 7);
//@}
?>
+4 -3
View File
@@ -1,7 +1,8 @@
CAS-module README
Please read comments from lib.php for auth/cas module
The auth/cas module is using part of the /auth/ldap module. The /auth/ldap directory should exist.
The auth/cas use the PHPCAS project from http://esup-phpcas.sourceforge.net
+1043 -217
View File
File diff suppressed because it is too large Load Diff
+24
View File
@@ -0,0 +1,24 @@
<div class="loginbox clearfix">
<div class="loginpanel">
<div>
<a href="<?php echo $CFG->wwwroot.'/login/index.php?authCAS=CAS';?>"><?php print_string("accesCAS","auth");?></a>
</div>
<br/>
<div>
<a href="<?php echo $CFG->wwwroot.'/login/index.php?authCAS=NOCAS';?>"><?php print_string("accesNOCAS","auth");?></a>
</div>
</div>
</div>
@@ -2,31 +2,33 @@
/** auth_ldap_sync_users.php
* Modified for cas Module
*
* This script is meant to be called from a cronjob to sync moodle with the LDAP
* This script is meant to be called from a cronjob to sync moodle with the LDAP
* backend in those setups where the LDAP backend acts as 'master'.
*
*
* Recommended cron entry:
* # 5 minutes past 4am
* 5 4 * * * /usr/bin/php -c /etc/php4/cli/php.ini /var/www/moodle/auth/ldap/auth_ldap_sync_users.php
*
* Notes:
*
* Notes:
* - If you have a large number of users, you may want to raise the memory limits
* by passing -d momory_limit=256M
* - For debugging & better logging, you are encouraged to use in the command line:
* -d log_errors=1 -d error_reporting=E_ALL -d display_errors=0 -d html_errors=0
*
*
* Performance notes:
* We have optimized it as best as we could for Postgres and mySQL, with 27K students
* we have seen this take 10 minutes.
*
* we have seen this take 10 minutes.
*
*/
if (!empty($_SERVER['GATEWAY_INTERFACE'])) {
error_log("should not be called from apache!");
if (isset($_SERVER['REMOTE_ADDR'])) {
error_log("should not be called from web server!");
exit;
}
$nomoodlecookie = true; // cookie not needed
require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); // global moodle config file.
require_once($CFG->dirroot.'/course/lib.php');
@@ -34,7 +36,12 @@ require_once($CFG->dirroot.'/lib/blocklib.php');
require_once($CFG->dirroot.'/mod/resource/lib.php');
require_once($CFG->dirroot.'/mod/forum/lib.php');
require_once($CFG->dirroot.'/lib/moodlelib.php');
$CFG->debug=10;
if (!is_enabled_auth('cas')) {
echo "Plugin not enabled!";
die;
}
$casauth = get_auth_plugin('cas');
$casauth->sync_users(1000, true);
+713 -72
View File
@@ -1,187 +1,828 @@
<?php
global $CFG;
require_once 'languages.php';
$createoptions[0] = get_string("no");
$createoptions[1] = get_string("yes");
// set to defaults if undefined
if (!isset ($config->hostname)) {
// set to defaults if undefined (CAS)
if (!isset ($config->hostname))
$config->hostname = '';
}
if (!isset ($config->port)) {
if (!isset ($config->port))
$config->port = '';
}
if (!isset ($config->casversion)) {
if (!isset ($config->casversion))
$config->casversion = '';
}
if (!isset ($config->baseuri)) {
if (!isset ($config->baseuri))
$config->baseuri = '';
}
if (!isset ($config->language)) {
if (!isset ($config->language))
$config->language = '';
}
if (!isset ($config->use_cas)) {
$config->use_cas = '';
}
if (!isset ($config->auth_user_create)) {
$config->auth_user_create = '0';
}
if (!isset ($config->create_user)) {
$config->create_user = '0';
}
if (!isset($config->changepasswordurl)) {
$config->changepasswordurl = '';
}
if (!isset ($config->proxycas))
$config->proxycas = '';
if (!isset ($config->logoutcas))
$config->logoutcas = '';
if (!isset ($config->multiauth))
$config->multiauth = '';
// set to defaults if undefined (LDAP)
if (!isset($config->host_url))
{ $config->host_url = ''; }
if (empty($config->ldapencoding))
{ $config->ldapencoding = 'utf-8'; }
if (!isset($config->contexts))
{ $config->contexts = ''; }
if (!isset($config->user_type))
{ $config->user_type = 'default'; }
if (!isset($config->user_attribute))
{ $config->user_attribute = ''; }
if (!isset($config->search_sub))
{ $config->search_sub = ''; }
if (!isset($config->opt_deref))
{ $config->opt_deref = LDAP_DEREF_NEVER; }
if (!isset($config->bind_dn))
{$config->bind_dn = ''; }
if (!isset($config->bind_pw))
{$config->bind_pw = ''; }
if (!isset($config->version))
{$config->version = '2'; }
if (!isset($config->objectclass))
{$config->objectclass = ''; }
if (!isset($config->memberattribute))
{$config->memberattribute = ''; }
if (!isset($config->memberattribute_isdn))
{$config->memberattribute_isdn = ''; }
if (!isset($config->groupecreators))
{$config->groupecreators = ''; }
if (!isset($config->attrcreators))
{$config->attrcreators = ''; }
if (!isset($config->removeuser))
{$config->removeuser = 0; }
$yesno = array( get_string('no'), get_string('yes') );
if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
notify(get_string('auth_ldap_noextension','auth'));
}
?>
<table cellspacing="0" cellpadding="5" border="0" align="center">
<tr>
<td colspan="2">
<h4><?php print_string('auth_cas_server_settings', 'auth') ?> </h4>
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><?php print_string('auth_cas_use_cas', 'auth') ?>:</td>
<td>
<?php
unset($options);
$options[1] = get_string('yes');
choose_from_menu ($options, 'use_cas', $config->use_cas, get_string('no'), '', '');
?>
</td>
<td><?php print_string('auth_cas_enabled', 'auth') ?></td>
</tr>
<tr valign="top" class="required">
<td align="right"><?php print_string('auth_cas_hostname_key', 'auth') ?>:</td>
<td>
<input name="hostname" type="text" size="30" value="<?php echo $config->hostname ?>" />
<?php
if (isset($err['hostname'])) {
formerr($err['hostname']);
}
}
?>
</td>
<td><?php print_string('auth_cas_hostname', 'auth') ?></td>
</tr>
<tr valign="top" class="required">
<td align="right"><?php print_string('auth_cas_baseuri_key', 'auth') ?>:</td>
<td>
<input name="baseuri" type="text" size="30" value="<?php echo $config->baseuri ?>" />
<?php
if (isset($err['baseuri'])) {
formerr($err['baseuri']);
}
?>
</td>
<td><?php print_string('auth_cas_baseuri', 'auth') ?></td>
</tr>
<tr valign="top" class="required">
<td align="right"><?php print_string('auth_cas_port_key', 'auth') ?>:</td>
<td>
<input name="port" type="text" size="30" value="<?php echo $config->port ?>" />
<?php
if (isset($err['port'])) {
formerr($err['port']);
}
?>
</td>
<td><?php print_string('auth_cas_port', 'auth') ?></td>
</tr>
<tr valign="top" class="required">
<td align="right"><?php print_string('auth_cas_casversion', 'auth') ?>:</td>
<td>
<input name="casversion" type="text" size="30" value="<?php echo $config->casversion ?>" />
<?php
if (isset($err['casversion'])) {
formerr($err['casversion']);
}
?>
</td>
<td><?php print_string('auth_cas_version', 'auth') ?></td>
</tr>
<tr valign="top" class="required">
<td align="right"><?php print_string('auth_cas_language_key', 'auth') ?>:</td>
<td>
<?php
choose_from_menu($CASLANGUAGES, 'language', $config->language, '');
?>
</td>
<td><?php print_string('auth_cas_language', 'auth') ?></td>
</tr>
<tr valign="top">
<td align="right"><?php print_string('auth_cas_auth_user_create', 'auth') ?>: </td>
<td>
<?php
choose_from_menu($createoptions, 'auth_user_create', $config->auth_user_create, '');
if (isset($err['auth_user_create'])) {
formerr($err['auth_user_create']);
}
?>
</td>
<td>
<?php print_string("auth_user_creation","auth"); ?>
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><?php print_string('auth_cas_create_user_key', 'auth') ?>:</td>
<td align="right"><?php print_string('auth_cas_proxycas_key', 'auth') ?>:</td>
<td>
<?php
unset($options);
$options[0] = get_string('no');
$options[1] = get_string('yes');
choose_from_menu($options, 'create_user', $config->create_user, '');
choose_from_menu ($options, 'proxycas', $config->proxycas, get_string('no'), '', '');
?>
</td>
<td><?php print_string('auth_cas_create_user', 'auth') ?></td>
<td><?php print_string('auth_cas_proxycas', 'auth') ?></td>
</tr>
<tr valign="top">
<td align="right"><?php print_string('auth_cas_changepasswordurl', 'auth') ?>: </td>
<tr valign="top" class="required">
<td align="right"><?php print_string('auth_cas_logoutcas_key', 'auth') ?>:</td>
<td>
<input name="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
<?php
if (isset($err['changepasswordurl'])) {
formerr($err['changepasswordurl']);
}
unset($options);
$options[1] = get_string('yes');
choose_from_menu ($options, 'logoutcas', $config->logoutcas, get_string('no'), '', '');
?>
</td>
<td><?php print_string('changepasswordhelp', 'auth') ?></td>
<td><?php print_string('auth_cas_logoutcas', 'auth') ?></td>
</tr>
</table>
<tr valign="top" class="required">
<td align="right"><?php print_string('auth_cas_multiauth_key', 'auth') ?>:</td>
<td>
<?php
unset($options);
$options[1] = get_string('yes');
choose_from_menu ($options, 'multiauth', $config->multiauth, get_string('no'), '', '');
?>
</td>
<td><?php print_string('auth_cas_multiauth', 'auth') ?></td>
</tr>
<tr>
<td colspan="2">
<h4><?php print_string('auth_ldap_server_settings', 'auth') ?> </h4>
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><label for="host_url"><?php print_string('auth_ldap_host_url_key','auth') ?></label></td>
<td>
<input name="host_url" id="host_url" type="text" size="30" value="<?php echo $config->host_url?>" />
<?php if (isset($err['host_url'])) formerr($err['host_url']); ?>
</td>
<td>
<?php print_string('auth_ldap_host_url','auth') ?>
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><label for="menuversion"><?php print_string('auth_ldap_version_key','auth') ?></label></td>
<td>
<?php
$versions = array();
$versions[2] = '2';
$versions[3] = '3';
choose_from_menu($versions, 'version', $config->version, '');
if (isset($err['version'])) formerr($err['version']);
?>
</td>
<td>
<?php print_string('auth_ldap_version','auth') ?>
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><label for="ldapencoding"><?php print_string("auth_ldap_ldap_encoding_key", "auth") ?></label></td>
<td>
<input id="ldapencoding" name="ldapencoding" type="text" value="<?php echo $config->ldapencoding ?>" />
<?php
if (isset($err['ldapencoding'])) {
formerr($err['ldapencoding']);
}
?>
</td>
<td><?php print_string('auth_ldap_ldap_encoding', 'auth') ?></td>
</tr>
<tr>
<td colspan="2">
<h4><?php print_string('auth_ldap_bind_settings', 'auth') ?> </h4>
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><label for="bind_dn"><?php print_string('auth_ldap_bind_dn_key','auth') ?></label></td>
<td>
<input name="bind_dn" id="bind_dn" type="text" size="30" value="<?php echo $config->bind_dn?>" />
<?php if (isset($err['bind_dn'])) formerr($err['bind_dn']); ?>
</td><td>
<?php print_string('auth_ldap_bind_dn','auth') ?>
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><label for="bind_pw"><?php print_string('auth_ldap_bind_pw_key','auth') ?></label></td>
<td>
<input name="bind_pw" id="bind_pw" type="password" size="30" value="<?php echo $config->bind_pw?>" />
<?php if (isset($err['bind_pw'])) formerr($err['bind_pw']); ?>
</td><td>
<?php print_string('auth_ldap_bind_pw','auth') ?>
</td>
</tr>
<tr>
<td colspan="2">
<h4><?php print_string('auth_ldap_user_settings', 'auth') ?> </h4>
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><label for="menuuser_type"><?php print_string('auth_ldap_user_type_key','auth') ?></label></td>
<td>
<?php choose_from_menu($this->ldap_suppported_usertypes(), 'user_type', $config->user_type, ''); ?>
<?php if (isset($err['user_type'])) formerr($err['user_type']); ?>
</td>
<td>
<?php print_string('auth_ldap_user_type', 'auth') ?>
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><label for="contexts"><?php print_string('auth_ldap_contexts_key','auth') ?></label></td>
<td>
<input name="contexts" id="contexts" type="text" size="30" value="<?php echo $config->contexts?>" />
<?php if (isset($err['contexts'])) formerr($err['contexts']); ?>
</td>
<td>
<?php print_string('auth_ldap_contexts', 'auth') ?>
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><label for="menusearch_sub"><?php print_string('auth_ldap_search_sub_key','auth') ?></label></td>
<td>
<?php choose_from_menu($yesno, 'search_sub', $config->search_sub, ''); ?>
</td>
<td>
<?php print_string('auth_ldap_search_sub','auth') ?>
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><label for="menuopt_deref"><?php print_string('auth_ldap_opt_deref_key','auth') ?></label></td>
<td>
<?php
$opt_deref = array();
$opt_deref[LDAP_DEREF_NEVER] = get_string('no');
$opt_deref[LDAP_DEREF_ALWAYS] = get_string('yes');
choose_from_menu($opt_deref, 'opt_deref', $config->opt_deref, LDAP_DEREF_NEVER, '');
if (isset($err['opt_deref'])) formerr($err['opt_deref']);
?>
</td>
<td>
<?php print_string('auth_ldap_opt_deref','auth') ?>
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><label for="user_attribute"><?php print_string('auth_ldap_user_attribute_key','auth') ?></label></td>
<td>
<input name="user_attribute" id="user_attribute" type="text" size="30" value="<?php echo $config->user_attribute?>" />
<?php if (isset($err['user_attribute'])) formerr($err['user_attribute']); ?>
</td>
<td>
<?php print_string('auth_ldap_user_attribute','auth') ?>
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><label for="memberattribute"><?php print_string('auth_ldap_memberattribute_key','auth') ?></label></td>
<td>
<input name="memberattribute" id="memberattribute" type="text" size="30" value="<?php echo $config->memberattribute?>" />
<?php if (isset($err['memberattribute'])) formerr($err['memberattribute']); ?>
</td><td>
<?php print_string('auth_ldap_memberattribute','auth') ?>
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><label for="memberattribute_isdn"><?php print_string('auth_ldap_memberattribute_isdn_key','auth') ?></label></td>
<td>
<input name="memberattribute_isdn" id="memberattribute_isdn" type="text" size="30" value="<?php echo $config->memberattribute_isdn?>" />
<?php if (isset($err['memberattribute_isdn'])) formerr($err['memberattribute_isdn']); ?>
</td><td>
<?php print_string('auth_ldap_memberattribute_isdn','auth') ?>
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><label for="objectclass"><?php print_string('auth_ldap_objectclass_key','auth') ?></label></td>
<td>
<input name="objectclass" id="objectclass" type="text" size="30" value="<?php echo $config->objectclass?>" />
<?php if (isset($err['objectclass'])) formerr($err['objectclass']); ?>
</td>
<td>
<?php print_string('auth_ldap_objectclass','auth') ?>
</td>
</tr>
<tr>
<td colspan="2">
<h4><?php print_string('coursecreators') ?> </h4>
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><label for="attrcreators_key"><?php print_string('auth_ldap_attrcreators_key','auth') ?></label></td>
<td>
<input name="attrcreators" id="attrcreators" type="text" size="30" value="<?php echo $config->attrcreators?>" />
<?php if (isset($err['attrcreators'])) formerr($err['attrcreators']); ?>
</td><td>
<?php print_string('auth_ldap_attrcreators','auth') ?>
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><label for="groupecreators_key"><?php print_string('auth_ldap_groupecreators_key','auth') ?></label></td>
<td>
<input name="groupecreators" id="groupecreators" type="text" size="30" value="<?php echo $config->groupecreators?>" />
<?php if (isset($err['groupecreators'])) formerr($err['groupecreators']); ?>
</td><td>
<?php print_string('auth_ldap_groupecreators','auth') ?>
</td>
</tr>
<tr>
<td colspan="2">
<h4><?php print_string('auth_sync_script', 'auth') ?> </h4>
</td>
</tr>
<tr valign="top">
<td align="right"><label for="menuremoveuser"><?php print_string('auth_remove_user_key','auth') ?></label></td>
<td>
<?php
$deleteopt = array();
$deleteopt['0'] = get_string('auth_remove_keep','auth');
$deleteopt['1'] = get_string('auth_remove_suspend','auth');
$deleteopt['2'] = get_string('auth_remove_delete','auth');
choose_from_menu($deleteopt, 'removeuser', $config->removeuser, '');
?>
</td>
<td>
<?php print_string('auth_remove_user','auth') ?>
</td>
</tr>
<?php
$ldapplugin = get_auth_plugin('ldap');
$ldapplugin->config_form(get_config('auth/ldap'), $err);
$help = get_string('auth_ldapextrafields','auth');
$help .= get_string('auth_updatelocal_expl','auth');
$help .= get_string('auth_fieldlock_expl','auth');
$help .= get_string('auth_updateremote_expl','auth');
$help .= '<hr />';
$help .= get_string('auth_updateremote_ldap','auth');
print_auth_lock_options('cas', $user_fields, $help, true, true);
?>
</table>
-8
View File
@@ -1,8 +0,0 @@
<table width="90%" border="0" cellspacing="10" cellpadding="5" align="center" style="font-size: small">
<tr>
<td width="50%" class="required" class="headingblock">
<p align="center"><b><font size="3"><?php formerr($errormsg) ?></font></b></p>
</td>
</tr>
</table>
-18
View File
@@ -1,18 +0,0 @@
<?php
// version $Id$
// Page for forbidden access from CAS
require("../../config.php");
if (!$site = get_site()) {
print_error('nosite', '', '', NULL, true);
}
$loginsite = get_string("loginsite");
$errormsg = get_string("auth_cas_invalidcaslogin", "auth");
print_header("$site->fullname: $loginsite", "$site->fullname", $loginsite);
include("forbidden.html");
print_footer();
exit;
?>

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